diff options
Diffstat (limited to 'WebKit')
374 files changed, 40689 insertions, 3021 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 90a6a28..1b7118f 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,76 @@ +2010-01-29 Mark Rowe <mrowe@apple.com> + + Sort Xcode projects. + + * WebKit.xcodeproj/project.pbxproj: + +2010-01-19 Dan Bernstein <mitz@apple.com> + + Redo DumpRenderTree build fix without making WebTypesInternal.h a private header + + * WebKit.xcodeproj/project.pbxproj: + +2010-01-19 Simon Fraser <simon.fraser@apple.com> + + Build fix, no review. + + Fix build of DumpRenderTree by making the header WebTypesInternal.h Private + in WebKit. + + * WebKit.xcodeproj/project.pbxproj: + +2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: The child <option> elements of a non-multiple <select> are not + exposed + + https://bugs.webkit.org/show_bug.cgi?id=33773 + <rdar://problem/7550556> + + Reviewed by Alice Liu. + + * English.lproj/Localizable.strings: + Add new localized strings. + +2010-01-13 Kevin Decker <kdecker@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=33610 + <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard. + + * WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL. + +2009-12-25 Darin Adler <darin@apple.com> + + * StringsNotToBeLocalized.txt: Updated for recent changes. + +2009-12-18 Dan Bernstein <mitz@apple.com> + + Updated localizable strings after r52368 + + * English.lproj/Localizable.strings: + +2009-12-18 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Add Mac WebKit side of the client based geolocation provider. + + * WebKit.xcodeproj/project.pbxproj: + +2009-12-16 Mark Rowe <mrowe@apple.com> + + Build fix. Disable debug variants of WebKit frameworks. + + * WebKit.xcodeproj/project.pbxproj: + +2009-12-16 John Sullivan <sullivan@apple.com> + + Brought this file up to date, sans review. + + * StringsNotToBeLocalized.txt: + 2009-11-30 Mark Rowe <mrowe@apple.com> Use the correct path to Info.plist to avoid creating an empty file at the top of the WebKit directory. diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings Binary files differindex fb857f5..42c1386 100644 --- a/WebKit/English.lproj/Localizable.strings +++ b/WebKit/English.lproj/Localizable.strings diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt index 90b29be..b39a1b0 100644 --- a/WebKit/StringsNotToBeLocalized.txt +++ b/WebKit/StringsNotToBeLocalized.txt @@ -15,6 +15,7 @@ "%.2lu/%.2lu/%.10lu-%.10lu.cache" "%.2u/%.2u/%.10u-%.10u.cache" "%0.fpx" +"%02d:%02d" "%20" "%2d) " "%4u" @@ -32,10 +33,12 @@ "%@://%@/%@" "%@://%@:%d" "%d" +"%d:%02d:%02d" "%d_%d" "%d_%d_%d" "%dpx" "%ld" +"%u" "&ie=UTF-8&oe=UTF-8" "(%.0f, %.0f)" "+" @@ -135,6 +138,7 @@ "Content-Encoding" "Content-Length" "Content-Type" +"ControlsPanel" "CurrentTimeDisplay" "D" "DCMDictionaryServiceWindowShow" @@ -163,6 +167,7 @@ "HIDictionaryWindowShow" "HTTP " "Helvetica" +"HideClosedCaptionsButton" "HostedNetscapePluginStream" "IDNScriptWhiteList" "IDNScriptWhiteList.txt" @@ -184,6 +189,7 @@ "InsertNewline" "InsertTab" "Intel" +"JSDOMWindowShell" "JavaScript" "JavaScriptFreeSize" "JavaScriptHeapSize" @@ -259,6 +265,7 @@ "SeekBackButton" "SeekForwardButton" "SelectAll" +"ShowClosedCaptionsButton" "Slider" "SliderThumb" "StatusDisplay" @@ -380,6 +387,7 @@ "WebMainResource" "WebModalDialogPretendWindow" "WebMutableURLRequest" +"WebNavigationData" "WebNodeHighlightPointer" "WebNodeHighlightWindowClass" "WebNotification" @@ -424,8 +432,10 @@ "WebScriptErrorDomain" "WebScriptErrorLineNumber" "WebScriptObject" +"WebScriptWorld" "WebScrollBar" "WebSecurityOrigin" +"WebSerializedJSValue" "WebSiteURLToIconURLKey" "WebSubframeArchives" "WebSubresources" @@ -466,12 +476,15 @@ "\n--------------------------------------------\n" "\r" "\xFF\xD8\xFF\xE0" -"_isUsingAcceleratedCompositing" +"_WebViewDidStartAcceleratedCompositing" "_top" "a" "ab" "about:" "actions" +"allowedFileTypes" +"allowsMultipleSelection" +"allowsOtherFileTypes" "anchorPoint" "applewebdata" "applewebdata://%@" @@ -492,8 +505,12 @@ "bounds" "bundlePath" "c" +"canChooseDirectories" +"canChooseFiles" +"canCreateDirectories" "canGoBack" "canGoForward" +"canSelectHiddenExtension" "com.RealNetworks.RealOne Player" "com.adiumX.adiumX" "com.adobe.Acrobat" @@ -599,6 +616,7 @@ "info.colloquy" "insertText:" "inspectorStartsAttached" +"isExtensionHidden" "isLoading" "isindex" "javascript:" @@ -623,6 +641,7 @@ "mimeType" "missingImage" "name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@" +"nameFieldLabel" "net.hmdt-web.Shiira" "nullPlugin" "nullplugin" @@ -641,11 +660,14 @@ "pluginHostPath" "pluginspage" "position" +"privateBrowsingEnabled" "public.url" "public.url-name" "r" "r+b" "redirectURLs" +"requiredFileType" +"resolvesAliases" "rgb(%.0f,%.0f,%.0f)" "rgba(%.0f,%.0f,%.0f,%f)" "s" @@ -653,6 +675,7 @@ "searchCancelPressed" "searchMagnifier" "searchMagnifierResults" +"showsHiddenFiles" "sourceURL" "src" "sub" @@ -677,9 +700,11 @@ "textAreaResizeCorner" "tiff" "transform" +"treatsFilePackagesAsDirectories" "txt" "u" "uk.co.opencommunity.vienna2" +"useProxiedOpenPanel" "userAgent" "userInfo" "utf-16" @@ -710,6 +735,11 @@ WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:" OK\n" WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:": " WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:"identity" WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:"localization" +WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"extensions" +WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"filenames" +WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"message" +WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"prompt" +WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm:"title" WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:" OK\n" WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:": " WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm:"identity" @@ -743,7 +773,9 @@ WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width" WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Menlo" WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Monaco" WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2" +WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"false" WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector" +WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"true" WebKit/mac/WebView/WebHTMLView.mm:"'%@'" WebKit/mac/WebView/WebHTMLView.mm:"Version:" WebKit/mac/WebView/WebHTMLView.mm:"applet" @@ -768,6 +800,8 @@ WebKit/mac/WebView/WebHTMLView.mm:"super" WebKit/mac/WebView/WebHTMLView.mm:"transparent" WebKit/mac/WebView/WebHTMLView.mm:"underline" WebKit/mac/WebView/WebHTMLView.mm:"white" +WebKit/mac/WebView/WebJSPDFDoc.mm +WebKit/mac/WebView/WebPDFDocumentExtras.mm WebKit/mac/WebView/WebPreferenceKeysPrivate.h WebKit/mac/WebView/WebPreferences.mm:"Apple Chancery" WebKit/mac/WebView/WebPreferences.mm:"Courier" @@ -775,6 +809,7 @@ WebKit/mac/WebView/WebPreferences.mm:"ISO-8859-1" WebKit/mac/WebView/WebPreferences.mm:"Identifier" WebKit/mac/WebView/WebPreferences.mm:"Papyrus" WebKit/mac/WebView/WebPreferences.mm:"Values" +WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm:"maxValue" WebKit/mac/WebView/WebView.mm:"At least one WebView is still open." WebKit/mac/WebView/WebView.mm:"At least one WebView was closed with fast teardown." WebKit/mac/WebView/WebView.mm:"Preferences" @@ -786,7 +821,6 @@ WebKit/mac/WebView/WebView.mm:"frame" WebKit/mac/WebView/WebView.mm:"return " WebKit/win/AccessibleBase.cpp:"Alt+" WebKit/win/AccessibleBase.cpp:"Ctrl+" -WebKit/win/AccessibleBase.cpp:"Description: " WebKit/win/AccessibleBase.cpp:"Shift+" WebKit/win/AccessibleBase.cpp:"Win+" WebKit/win/ProgIDMacros.h:"OpenSource" @@ -797,7 +831,9 @@ WebKit/win/WebCache.cpp:"style sheets" WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Courier New" WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector " WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector" +WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"false" WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"inspector" +WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"true" WebKit/win/WebDatabaseManager.cpp:"Databases" WebKit/win/WebHistoryItem.cpp:"title" WebKit/win/WebPreferenceKeysPrivate.h diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj index de8c687..f6f4a9e 100644 --- a/WebKit/WebKit.xcodeproj/project.pbxproj +++ b/WebKit/WebKit.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ 0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0A2D87FC107AF52B00CDDEE3 /* WebPluginHalterClient.mm */; }; 0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */; }; 0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */; }; + 0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACE917210FE47E30096A45F /* OpenGL.framework */; }; 0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */; }; 0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */; }; @@ -332,6 +333,11 @@ BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */; }; BC542C420FD7766F00D8AB5D /* WebDelegateImplementationCaching.h in Headers */ = {isa = PBXBuildFile; fileRef = BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */; }; BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */; }; + BC7F884B10C8775A00D6133D /* WebGeolocationControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */; }; + BC7F884C10C8775A00D6133D /* WebGeolocationControllerClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */; }; + BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */; }; + BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */; }; BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC97E7E110963D260010D361 /* WebViewEventHandling.mm */; }; C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0167BF60D7F5DD00028696E /* WebScriptDebugger.h */; }; C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0167BF70D7F5DD00028696E /* WebScriptDebugger.mm */; }; @@ -361,6 +367,7 @@ 0A2D87FC107AF52B00CDDEE3 /* WebPluginHalterClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPluginHalterClient.mm; sourceTree = "<group>"; }; 0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapeContainerCheckContextInfo.h; sourceTree = "<group>"; }; 0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckContextInfo.mm; sourceTree = "<group>"; }; + 0ACE917210FE47E30096A45F /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; }; 0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = WebNetscapeContainerCheckPrivate.h; sourceTree = "<group>"; }; 0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckPrivate.mm; sourceTree = "<group>"; }; 0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenController.h; sourceTree = "<group>"; }; @@ -610,6 +617,11 @@ BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewData.mm; sourceTree = "<group>"; }; BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDelegateImplementationCaching.h; sourceTree = "<group>"; }; BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDelegateImplementationCaching.mm; sourceTree = "<group>"; }; + BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationControllerClient.h; sourceTree = "<group>"; }; + BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationControllerClient.mm; sourceTree = "<group>"; }; + BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationPosition.h; sourceTree = "<group>"; }; + BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationPosition.mm; sourceTree = "<group>"; }; + BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationPositionInternal.h; sourceTree = "<group>"; }; BC97E7E110963D260010D361 /* WebViewEventHandling.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewEventHandling.mm; sourceTree = "<group>"; }; BE4FBECB0653DF47005EDE15 /* WebEditingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebEditingDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; BE6DC39904C62C4E004D0EF6 /* WebNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSURLExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; @@ -714,6 +726,7 @@ 9398112A0824BF01008DF038 /* Cocoa.framework in Frameworks */, 9398112B0824BF01008DF038 /* JavaScriptCore.framework in Frameworks */, 9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */, + 0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */, 1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */, 9398112F0824BF01008DF038 /* Security.framework in Frameworks */, 9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */, @@ -766,6 +779,7 @@ F5C2869502846DCD018635CA /* Cocoa.framework */, F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */, 93D623DD051E791F002F47DD /* libicucore.dylib */, + 0ACE917210FE47E30096A45F /* OpenGL.framework */, 1A20D08A0ED384F20043FA9F /* QuartzCore.framework */, 830E81E005853AC000AD0891 /* Security.framework */, F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */, @@ -1115,9 +1129,12 @@ 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */, 51A8B53204282BD200CA2D3A /* WebFrameViewInternal.h */, 93C6F14507920B93002449CD /* WebFrameViewPrivate.h */, + BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */, + BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */, + BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */, 5158F6EE106D862A00AF457C /* WebHistoryDelegate.h */, - 5185F62710712B97007AA393 /* WebNavigationData.mm */, 5185F62510712B80007AA393 /* WebNavigationData.h */, + 5185F62710712B97007AA393 /* WebNavigationData.mm */, 51443F9A0429392B00CA2D3A /* WebPolicyDelegate.h */, 51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */, 51443F9C0429392B00CA2D3A /* WebPolicyDelegatePrivate.h */, @@ -1140,8 +1157,8 @@ C0B1F7E510AC8E3100C925D9 /* WebScriptWorld.h */, C0B1F7E610AC8E3100C925D9 /* WebScriptWorld.mm */, C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */, - BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */, BC26C69D10B743F400B687ED /* WebSerializedJSValue.h */, + BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */, 936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */, 936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */, F834AAD50E64B1C700E2737C /* WebTextIterator.h */, @@ -1156,9 +1173,9 @@ 51A8B57A042834F700CA2D3A /* WebView.mm */, BC2E464B0FD8A96800A9D9DE /* WebViewData.h */, BC2E464C0FD8A96800A9D9DE /* WebViewData.mm */, + BC97E7E110963D260010D361 /* WebViewEventHandling.mm */, 930D02BB06275F640076701E /* WebViewInternal.h */, 51A8B57D0428353A00CA2D3A /* WebViewPrivate.h */, - BC97E7E110963D260010D361 /* WebViewEventHandling.mm */, 0FD3B0F61076C3F700039B96 /* WebWindowAnimation.h */, 0FD3B0F71076C3F700039B96 /* WebWindowAnimation.m */, ); @@ -1200,8 +1217,6 @@ F5B36B400281DE87018635CB /* WebCoreSupport */ = { isa = PBXGroup; children = ( - 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */, - 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */, B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */, B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */, 51CBFCAC0D10E6C5002DBF51 /* WebCachedFramePlatformData.h */, @@ -1215,6 +1230,10 @@ 4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */, 931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */, 931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */, + BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */, + BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */, + 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */, + 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */, 51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */, 51494CD50C7EBDE0004178C5 /* WebIconDatabaseClient.mm */, 9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */, @@ -1388,12 +1407,18 @@ 939810530824BF01008DF038 /* WebFrame.h in Headers */, 9398109C0824BF01008DF038 /* WebFrameInternal.h in Headers */, 9398105B0824BF01008DF038 /* WebFrameLoadDelegate.h in Headers */, + C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */, 931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */, 939810540824BF01008DF038 /* WebFramePrivate.h in Headers */, 9398106E0824BF01008DF038 /* WebFrameView.h in Headers */, 9398106F0824BF01008DF038 /* WebFrameViewInternal.h in Headers */, 939810AF0824BF01008DF038 /* WebFrameViewPrivate.h in Headers */, + BC7F884B10C8775A00D6133D /* WebGeolocationControllerClient.h in Headers */, + 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */, + BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */, + BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */, 939810120824BF01008DF038 /* WebHistory.h in Headers */, + 5158F6EF106D862A00AF457C /* WebHistoryDelegate.h in Headers */, 93FDE9330D79CAF30074F029 /* WebHistoryInternal.h in Headers */, 939810130824BF01008DF038 /* WebHistoryItem.h in Headers */, 939810630824BF01008DF038 /* WebHistoryItemInternal.h in Headers */, @@ -1418,6 +1443,7 @@ 7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */, 939810A00824BF01008DF038 /* WebJavaPlugIn.h in Headers */, 939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */, + 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */, 939810850824BF01008DF038 /* WebKeyGenerator.h in Headers */, 9398101B0824BF01008DF038 /* WebKit.h in Headers */, 9398101C0824BF01008DF038 /* WebKitErrors.h in Headers */, @@ -1436,6 +1462,7 @@ 9398107A0824BF01008DF038 /* WebKitSystemBits.h in Headers */, 1C0D40870AC1C8F40009C113 /* WebKitVersionChecks.h in Headers */, 939810790824BF01008DF038 /* WebLocalizableStrings.h in Headers */, + 5185F62610712B80007AA393 /* WebNavigationData.h in Headers */, 0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */, 0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */, 226E9E6A09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h in Headers */, @@ -1467,6 +1494,7 @@ 939810340824BF01008DF038 /* WebNullPluginView.h in Headers */, 9398102A0824BF01008DF038 /* WebPanelAuthenticationHandler.h in Headers */, A7D3C5BC0B5773C5002CA450 /* WebPasteboardHelper.h in Headers */, + 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */, 939810A50824BF01008DF038 /* WebPDFRepresentation.h in Headers */, 939810A40824BF01008DF038 /* WebPDFView.h in Headers */, 939810350824BF01008DF038 /* WebPlugin.h in Headers */, @@ -1475,6 +1503,7 @@ 939810B00824BF01008DF038 /* WebPluginContainerPrivate.h in Headers */, 939810370824BF01008DF038 /* WebPluginController.h in Headers */, 939810380824BF01008DF038 /* WebPluginDatabase.h in Headers */, + 0A2D87FD107AF52B00CDDEE3 /* WebPluginHalterClient.h in Headers */, 939810390824BF01008DF038 /* WebPluginPackage.h in Headers */, 225F881509F97E8A00423A40 /* WebPluginPrivate.h in Headers */, 1A77B02E0EE7730500C8A1F9 /* WebPluginRequest.h in Headers */, @@ -1494,8 +1523,11 @@ 939810890824BF01008DF038 /* WebResourcePrivate.h in Headers */, 7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */, C0167BF80D7F5DD00028696E /* WebScriptDebugger.h in Headers */, + C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */, + C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */, 51079D180CED11B00077247D /* WebSecurityOriginInternal.h in Headers */, 51079D190CED11B00077247D /* WebSecurityOriginPrivate.h in Headers */, + BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */, 939810270824BF01008DF038 /* WebStringTruncator.h in Headers */, 93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */, 936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */, @@ -1505,25 +1537,15 @@ 939810750824BF01008DF038 /* WebUIDelegate.h in Headers */, 939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */, 939810150824BF01008DF038 /* WebURLsWithTitles.h in Headers */, + 0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */, + 0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */, 939810700824BF01008DF038 /* WebView.h in Headers */, BC2E464D0FD8A96800A9D9DE /* WebViewData.h in Headers */, 939810460824BF01008DF038 /* WebViewFactory.h in Headers */, 9398109B0824BF01008DF038 /* WebViewInternal.h in Headers */, 939810710824BF01008DF038 /* WebViewPrivate.h in Headers */, - 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */, - 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */, - 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */, - 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */, - 5158F6EF106D862A00AF457C /* WebHistoryDelegate.h in Headers */, - 5185F62610712B80007AA393 /* WebNavigationData.h in Headers */, - 0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */, - 0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */, 0FD3B0F81076C3F700039B96 /* WebWindowAnimation.h in Headers */, - 0A2D87FD107AF52B00CDDEE3 /* WebPluginHalterClient.h in Headers */, - C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */, - C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */, - C0B88E8B10A08F3D00FBB3F5 /* WebFrameLoadDelegatePrivate.h in Headers */, - BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */, + 41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1775,6 +1797,9 @@ 939810F20824BF01008DF038 /* WebFrame.mm in Sources */, 931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */, 939811060824BF01008DF038 /* WebFrameView.mm in Sources */, + BC7F884C10C8775A00D6133D /* WebGeolocationControllerClient.mm in Sources */, + 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */, + BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */, 939811130824BF01008DF038 /* WebHistory.mm in Sources */, 939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */, 1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */, @@ -1788,6 +1813,7 @@ 06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */, 1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */, 939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */, + 37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */, 939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */, 939811030824BF01008DF038 /* WebKitErrors.m in Sources */, 939810C30824BF01008DF038 /* WebKitLogging.m in Sources */, @@ -1799,6 +1825,7 @@ 9398110E0824BF01008DF038 /* WebKitSystemBits.m in Sources */, 1C0D40880AC1C8F40009C113 /* WebKitVersionChecks.m in Sources */, 9398110D0824BF01008DF038 /* WebLocalizableStrings.m in Sources */, + 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */, 0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */, 0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */, 226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */, @@ -1829,11 +1856,13 @@ 939810D90824BF01008DF038 /* WebNullPluginView.mm in Sources */, 939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */, A7D3C5BD0B5773C5002CA450 /* WebPasteboardHelper.mm in Sources */, + 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */, 9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */, 9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */, 939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */, 939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */, 939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */, + 0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */, 939810DC0824BF01008DF038 /* WebPluginPackage.m in Sources */, 1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */, 224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */, @@ -1843,28 +1872,23 @@ 9398111A0824BF01008DF038 /* WebResource.mm in Sources */, 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */, C0167BF90D7F5DD00028696E /* WebScriptDebugger.mm in Sources */, + C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */, 51079D170CED11B00077247D /* WebSecurityOrigin.mm in Sources */, + BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */, 939810CC0824BF01008DF038 /* WebStringTruncator.mm in Sources */, 93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */, 936A2DE80FD2D08000D312DB /* WebTextCompletionController.mm in Sources */, 1A74A28F0F4F75400082E228 /* WebTextInputWindowController.m in Sources */, F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */, 939810BE0824BF01008DF038 /* WebURLsWithTitles.m in Sources */, + 0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */, + 0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */, 939811070824BF01008DF038 /* WebView.mm in Sources */, BC2E464E0FD8A96800A9D9DE /* WebViewData.mm in Sources */, + BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */, 939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */, - 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */, - 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */, - 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */, - 37D1DCA91065928C0068F7EF /* WebJSPDFDoc.mm in Sources */, - 5185F62810712B97007AA393 /* WebNavigationData.mm in Sources */, - 0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */, - 0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */, 0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */, - 0A2D87FE107AF52B00CDDEE3 /* WebPluginHalterClient.mm in Sources */, - BC97E7E210963D260010D361 /* WebViewEventHandling.mm in Sources */, - C0B1F7E910AC8E3100C925D9 /* WebScriptWorld.mm in Sources */, - BC26C6A510B7447A00B687ED /* WebSerializedJSValue.mm in Sources */, + 41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1931,10 +1955,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1C904FD20BA9DD0F0081E9D0 /* WebKit.xcconfig */; buildSettings = { - BUILD_VARIANTS = ( - normal, - debug, - ); + BUILD_VARIANTS = normal; OTHER_LDFLAGS = ( "$(OTHER_LDFLAGS)", "-lWebKitSystemInterface", diff --git a/WebKit/cf/ChangeLog b/WebKit/cf/ChangeLog index 1d061fb..1f59dec 100644 --- a/WebKit/cf/ChangeLog +++ b/WebKit/cf/ChangeLog @@ -1,3 +1,15 @@ +2010-01-07 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=33057 + REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows + + <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark + + * WebCoreSupport/WebInspectorClientCF.cpp: Define JS_EXPORTCLASS. I'm not sure why this + isn't done in JSC globally for all possible clients, but keeping the current design for now. + 2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com> Reviewed by Timothy Hatcher. diff --git a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp index cb47205..0d66b83 100644 --- a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp +++ b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp @@ -43,8 +43,10 @@ #else #define JS_EXPORTDATA __declspec(dllimport) #endif +#define JS_EXPORTCLASS JS_EXPORTDATA #else #define JS_EXPORTDATA +#define JS_EXPORTCLASS #endif #include "WebInspectorClient.h" diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog index 97b361a..24fa84d 100644 --- a/WebKit/chromium/ChangeLog +++ b/WebKit/chromium/ChangeLog @@ -1,3 +1,1358 @@ +<<<<<<< HEAD +======= +2010-01-31 Kent Tamura <tkent@chromium.org> + + Reviewed by Jeremy Orlow. + + [Chromium] Fix a bug that a selected word is not recognized as a + spell-check source. + https://bugs.webkit.org/show_bug.cgi?id=33660 + + * src/ContextMenuClientImpl.cpp: + (WebKit::isASingleWord): Use wordBreakIterator(), and correctly check + the return value of textBreakNext(). + +2010-01-29 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dimitri Glazkov. + + A first step towards the Indexed Database API + https://bugs.webkit.org/show_bug.cgi?id=34342 + + Add runtime enable support for Indexed Database API. + + * features.gypi: + * public/WebRuntimeFeatures.h: + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableIndexedDatabase): + (WebKit::WebRuntimeFeatures::isIndexedDatabaseEnabled): + +2010-01-29 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Add API methods for loading inspector utility scripts. + + https://bugs.webkit.org/show_bug.cgi?id=34326 + + * public/WebDevToolsAgentClient.h: + (WebKit::WebDevToolsAgentClient::injectedScriptSource): + (WebKit::WebDevToolsAgentClient::injectedScriptDispatcherSource): + +2010-01-29 Darin Fisher <darin@chromium.org> + + Reviewed by Adam Barth. + + Add FrameLoaderClient::allowImages method to allow the client to + overrule image loading policy on a per frame basis. + + https://bugs.webkit.org/show_bug.cgi?id=34225 + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::allowImages): + * public/WebSettings.h: + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::allowImages): + * src/FrameLoaderClientImpl.h: + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setImagesEnabled): + * src/WebSettingsImpl.h: + +2010-01-28 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + StorageNamespaceProxy::copy() should be a no-op + https://bugs.webkit.org/show_bug.cgi?id=34298 + + The comment in the code should make clear why. + + * public/WebViewClient.h: + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespaceProxy::copy): + +2010-01-28 Michael Nordman <michaeln@google.com> + + Reviewed by Alexey Proskuryakov. + + ApplicationCache events should be deferred until after Document onload has fired. + https://bugs.webkit.org/show_bug.cgi?id=29690 + + * src/ApplicationCacheHost.cpp: + (WebCore::ApplicationCacheHost::ApplicationCacheHost): Initialize m_isDeferringEvents to true. + (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): Depending, defer or raise the event. + (WebCore::ApplicationCacheHost::stopDeferringEvents): Raise any deferred events and reset the flag. + +2010-01-27 Aaron Boodman <aa@chromium.org> + + Reviewed by Darin Adler. + + Send full URL and application id of requesting context to Chromium + when checking notification permissions. + + https://bugs.webkit.org/show_bug.cgi?id=34238 + + * public/WebDocument.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::applicationID): + Implement applicationID() method. + + * public/WebNotificationPresenter.h: + * src/NotificationPresenterImpl.cpp: + (WebKit::NotificationPresenterImpl::checkPermission): + * src/NotificationPresenterImpl.h: + Send applicationID and full URL through to Chromium. + +2010-01-27 Darin Fisher <darin@chromium.org> + + Reviewed by Pavel Feldman. + + Expose HistoryItem::documentSequenceNumber + https://bugs.webkit.org/show_bug.cgi?id=34243 + + * public/WebHistoryItem.h: + * src/WebHistoryItem.cpp: + (WebKit::WebHistoryItem::documentSequenceNumber): + (WebKit::WebHistoryItem::setDocumentSequenceNumber): + +2010-01-26 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + Add methods to support running a nested modal loop outside of WebKit. + https://bugs.webkit.org/show_bug.cgi?id=34199 + + * public/WebView.h: + * src/WebViewImpl.cpp: + (WebKit::WebView::willEnterModalLoop): Create PageGroupLoadDeferrer + (WebKit::WebView::didExitModalLoop): Destroy PageGroupLoadDeferrer + +2010-01-27 Darin Fisher <darin@chromium.org> + + Reviewed by Dimitri Glazkov. + + Adding missing WebMutationEvent.cpp file to fix build bustage. + https://bugs.webkit.org/show_bug.cgi?id=33882 + + * public/WebMutationEvent.h: Remove unnecessary constructor. + * src/WebEvent.cpp: Remove unnecessary include of WebMutationEvent.h. + * src/WebMutationEvent.cpp: Added. + +2010-01-27 Jay Campan <jcampan@google.com> + + Reviewed by Darin Fisher. + + Adding EventListeners to the chromium API. + + https://bugs.webkit.org/show_bug.cgi?id=33882 + + * WebKit.gyp: + * public/WebEvent.h: Added. + * public/WebEventListener.h: Added. + * public/WebMutationEvent.h: Added. + * public/WebNode.h: + * public/WebString.h: + (WebKit::operator==): + (WebKit::operator!=): + * src/EventListenerWrapper.cpp: Added. + * src/EventListenerWrapper.h: Added. + * src/WebEvent.cpp: Added. + * src/WebEventListener.cpp: Added. + * src/WebEventListenerPrivate.cpp: Added. + * src/WebEventListenerPrivate.h: Added. + * src/WebNode.cpp: + (WebKit::WebNode::addEventListener): + (WebKit::WebNode::removeEventListener): + * src/WebString.cpp: + (WebKit::WebString::equals): + +2010-01-26 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Darin Fisher. + + Add KeyboardTest to WebKit API tests + https://bugs.webkit.org/show_bug.cgi?id=34178 + + * WebKit.gyp: + * tests/KeyboardTest.cpp: Added. + +2010-01-22 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Adler. + + Make storage events match the spec. + https://bugs.webkit.org/show_bug.cgi?id=30546 + + Update the storageEvent algorithm to match the change in WebCore. + + * src/StorageAreaProxy.cpp: + (WebCore::StorageAreaProxy::storageEvent): + +2010-01-22 Elliot Glaysher <erg@chromium.org> + + Reviewed by David Levin. + + Chromium: theme selection colors to match gtk theme + Add functions to RenderThemeChromiumLinux to change the selection color + according to the current GTK+ theme. + + Since the change is to the Chromium WebKit API layer, testing is done + in Chromium's test shell (see Chromium side of this patch: + http://codereview.chromium.org/554004) + + https://bugs.webkit.org/show_bug.cgi?id=33921 + + * public/WebView.h: Adds interface to change the selection colors + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::setSelectionColors): Implements new interface. + * src/WebViewImpl.h: + +2010-01-22 Steve VanDeBogart <vandebo@chromium.org> + + Reviewed by David Levin. + + Middle clicking the main scroll bars should not trigger a paste event + in Linux chromium. + https://bugs.webkit.org/show_bug.cgi?id=33062 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::mouseUp): + +2010-01-22 Albert J. Wong <ajwong@chromium.org> + + Not reviewed. backout. + + Backout r53705. + Causes ui_tests to timeout, and browser_tests to fail with + TestConnectToBadPort and WindowOpenInvalidExtension. + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): + (WebKit::FrameLoaderClientImpl::postProgressStartedNotification): + (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + * src/WebViewImpl.h: + +2010-01-22 Peter Kasting <pkasting@google.com> + + Not reviewed, backout. + + Back out r52673, which caused several regressions. + https://bugs.webkit.org/show_bug.cgi?id=32533 + + * src/AutocompletePopupMenuClient.cpp: + (WebKit::AutocompletePopupMenuClient::initialize): + (WebKit::AutocompletePopupMenuClient::popupDidHide): + (WebKit::AutocompletePopupMenuClient::setTextFromItem): + * src/AutocompletePopupMenuClient.h: + +2010-01-21 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + The Chromium WebKit API needs to expose storage event related data + https://bugs.webkit.org/show_bug.cgi?id=33985 + + setItem and removeItem on WebStorageArea need to expose what the previous + value was for the key being modified. Clear needs to return whether it + actually cleared anything. + + * public/WebStorageArea.h: + (WebKit::WebStorageArea::setItem): + (WebKit::WebStorageArea::removeItem): + (WebKit::WebStorageArea::clear): + * src/StorageAreaProxy.cpp: + (WebCore::StorageAreaProxy::StorageAreaProxy): + (WebCore::StorageAreaProxy::setItem): + (WebCore::StorageAreaProxy::removeItem): + (WebCore::StorageAreaProxy::clear): + (WebCore::StorageAreaProxy::storageEvent): + * src/StorageAreaProxy.h: + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::localStorageNamespace): + (WebCore::StorageNamespace::sessionStorageNamespace): + (WebCore::StorageNamespaceProxy::StorageNamespaceProxy): + (WebCore::StorageNamespaceProxy::copy): + (WebCore::StorageNamespaceProxy::storageArea): + * src/StorageNamespaceProxy.h: + * src/WebStorageAreaImpl.cpp: + (WebKit::WebStorageAreaImpl::setItem): + (WebKit::WebStorageAreaImpl::removeItem): + (WebKit::WebStorageAreaImpl::clear): + * src/WebStorageAreaImpl.h: + +2010-01-21 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [Chromium] spurious WebViewClient::didStopLoading if changing + location.hash while a subframe is still loading + + https://bugs.webkit.org/show_bug.cgi?id=33884 + + This is a refinement of http://trac.webkit.org/changeset/51548 + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): + (WebKit::FrameLoaderClientImpl::postProgressStartedNotification): + (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + (WebKit::WebViewImpl::didStartLoading): + (WebKit::WebViewImpl::didStopLoading): + * src/WebViewImpl.h: + +2010-01-21 Adam Barth <abarth@webkit.org> + + Unreviewed. Added a blank line requested by the great an powerful + fishd. + + * public/WebFrameClient.h: + +2010-01-21 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + [chromium] Add allowPlugins callback to allow per-site enabling of plugins + https://bugs.webkit.org/show_bug.cgi?id=33974 + + Forward the new allowPlugins callback to WebKitClient so that it can + make the policy decision. + + * public/WebFrameClient.h: + (WebKit::WebFrameClient::allowPlugins): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::allowJavaScript): + (WebKit::FrameLoaderClientImpl::allowPlugins): + * src/FrameLoaderClientImpl.h: + +2010-01-21 James Robinson <jamesr@chromium.org> + + Reviewed by Darin Fisher. + + Bumps the refcount when WebNode::toElement/toConstElement are called. + https://bugs.webkit.org/show_bug.cgi?id=33977 + + Ensures that when a wrapper around a WebNode is create via the + toElement() or toConstElement() calls that the refcount on the WebNode + is increased, by forcing a call to WebNode::assign(). This is needed + so that the following code: + { + WebNode n = someNode(); + WebElement e = n.toElement<WebElement>(); + } + does not decrease the overall refcount on the Node that someNode() + returns. + + This caused crashes in the 'Save page as..' feature. + + * public/WebNode.h: + (WebKit::WebNode::toElement): + (WebKit::WebNode::toConstElement): + +2010-01-21 Michael Nordman <michaeln@google.com> + + Reviewed by Darin Fisher. + + Adds WebKit::WebDataSource::applicationCacheHost() to the API. + https://bugs.webkit.org/show_bug.cgi?id=33880 + + * WebKit.gyp: + * public/WebDataSource.h: + * src/ApplicationCacheHost.cpp: + * src/ApplicationCacheHostInternal.h: Copied from WebKit/chromium/src/ApplicationCacheHost.cpp. + (WebCore::ApplicationCacheHostInternal::notifyEventListener): + (WebCore::ApplicationCacheHostInternal::toWebApplicationCacheHost): + * src/WebDataSourceImpl.cpp: + (WebKit::WebDataSourceImpl::applicationCacheHost): + * src/WebDataSourceImpl.h: + +2010-01-21 Eric Uhrhane <ericu@chromium.org> + + Reviewed by Dmitry Titov. + + Add changes missing from r53595, without which Chromium has no database. + + https://bugs.webkit.org/show_bug.cgi?id=33966 + + No new tests - fixes database layout tests in Chromium. + + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableDatabase): + (WebKit::WebRuntimeFeatures::isDatabaseEnabled): + +2010-01-21 Kenneth Russell <kbr@google.com> + + Reviewed by Oliver Hunt. + + [Chromium] Implement texSubImage2D taking WebGLArray + https://bugs.webkit.org/show_bug.cgi?id=33932 + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::texSubImage2D): + +2010-01-20 Vitaly Repeshko <vitalyr@chromium.org> + + Reviewed by Pavel Feldman. + + [V8] Support SerializedScriptValue. + https://bugs.webkit.org/show_bug.cgi?id=32920 + http://crbug.com/30620 + + Updated uses of SerializedScriptValue: + * src/PlatformMessagePortChannel.cpp: + (WebCore::PlatformMessagePortChannel::postMessageToRemote): + (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::postMessageToWorkerObject): + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): + (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): + * src/WebWorkerImpl.cpp: + (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): + +2010-01-20 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] computePageRectsForFrame seems to be unnecessary + https://bugs.webkit.org/show_bug.cgi?id=33881 + + * src/WebFrameImpl.cpp: Stop including FrameChromium.h + +2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> + + Chromium build fix. + + * public/WebAccessibilityRole.h: + (WebKit::): + Correct enum names. + + * src/LocalizedStrings.cpp: + (WebCore::AXMenuListPopupActionVerb): + Stubbed. + (WebCore::AXMenuListActionVerb): + Stubbed. + +2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> + + Chromium build fix. + + * public/WebAccessibilityRole.h: + (WebKit::): + + * src/AssertMatchingEnums.cpp: + +2010-01-18 Jonathan Dixon <joth@chromium.org> + + Reviewed by Adam Barth. + + Add support for enabling navigator.geolocation at runtime in the V8 bindings. + Adds the [EnabledAtRuntime] modifier to the navigator IDL. + https://bugs.webkit.org/show_bug.cgi?id=33467 + + * public/WebRuntimeFeatures.h: + * src/WebRuntimeFeatures.cpp: + (WebKit::WebRuntimeFeatures::enableGeolocation): + (WebKit::WebRuntimeFeatures::isGeolocationEnabled): + +2010-01-17 Kent Tamura <tkent@chromium.org> + + Reviewed by Shinichiro Hamaji. + + [Chromium] Remove an old runFileChooser() method. + https://bugs.webkit.org/show_bug.cgi?id=33778 + + Chromium code switched to new runFileChooser() introduced by + r53269. The old one is not needed anymore. + + * public/WebViewClient.h: + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::runOpenPanel): + +2010-01-15 Eric Seidel <eric@webkit.org> + + No review, rolling out r53344. + http://trac.webkit.org/changeset/53344 + https://bugs.webkit.org/show_bug.cgi?id=32920 + + Broke the Chromium Mac builder. + + * src/PlatformMessagePortChannel.cpp: + (WebCore::PlatformMessagePortChannel::postMessageToRemote): + (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::postMessageToWorkerObject): + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): + (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): + * src/WebWorkerImpl.cpp: + (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): + +2010-01-15 Vitaly Repeshko <vitalyr@chromium.org> + + Reviewed by David Levin. + + [V8] Support SerializedScriptValue. + https://bugs.webkit.org/show_bug.cgi?id=32920 + http://crbug.com/30620 + + Updated uses of SerializedScriptValue: + * src/PlatformMessagePortChannel.cpp: + (WebCore::PlatformMessagePortChannel::postMessageToRemote): + (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::postMessageToWorkerObject): + * src/WebWorkerClientImpl.cpp: + (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): + (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): + * src/WebWorkerImpl.cpp: + (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): + +2010-01-14 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Oliver Hunt. + + [Chromium] Forgot to adopt a ref counted object in StorageNamespaceProxy + https://bugs.webkit.org/show_bug.cgi?id=33704 + + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::localStorageNamespace): + (WebCore::StorageNamespace::sessionStorageNamespace): + +2010-01-14 Marcus Bulach <bulach@chromium.org> + + Reviewed by Dimitri Glazkov. + + Adds WebKit::WebSecurityOrigin::createFromDatabaseIdentifier. + https://bugs.webkit.org/show_bug.cgi?id=33648 + + * public/WebSecurityOrigin.h: + * src/WebSecurityOrigin.cpp: + (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): + +2010-01-14 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Drag and Drop source/destination code needs cleanup. + <https://bugs.webkit.org/show_bug.cgi?id=33691>. + + Update to new way of calling sourceOperation. + + * src/DragClientImpl.cpp: + (WebKit::DragClientImpl::startDrag): + +2010-01-14 Nate Chapin <japhet@chromium.org> + + Reviewed by Dimitri Glazkov. + + Remove references to V8DOMWrapper::convertToNative*(). + + https://bugs.webkit.org/show_bug.cgi?id=33677 + + * src/WebBindings.cpp: + (WebKit::getDragDataImpl): + (WebKit::getRangeImpl): + +2010-01-14 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Fisher. + + Introduce WebFileChooserParams to convey parameters for + WebViewClient::runFileChooser(), and add new parameters to it. + https://bugs.webkit.org/show_bug.cgi?id=32473 + + The new parameters are + - selected file names + - "accept" attribute value + + * WebKit.gyp: Add WebFileChooserParams.h + * public/WebFileChooserParams.h: Added. + * public/WebViewClient.h: + (WebKit::WebViewClient::runFileChooser): + Add runFileChooser() with WebFileChooserParams, and mark the old one deprecated. + * src/ChromeClientImpl.cpp: + (WebKit::ChromeClientImpl::runOpenPanel): + Call the new runFileChooser() first, then call the old + runFileChooser() if the new one failed. + +2010-01-13 Kenneth Russell <kbr@google.com> + + Reviewed by Oliver Hunt. + + Need to implement WebGLContextAttributes + https://bugs.webkit.org/show_bug.cgi?id=31169 + + Added the WebGLContextAttributes class and custom JavaScript + bindings to accept a native object as the second argument to + getContext("experimental-webgl") per the WebGL specification. + Added GraphicsContext3D::Attributes struct to isolate DOM and + graphics layers. Added getContextAttributes() to + WebGLRenderingContext. Added test case ensuring that context + attributes can be passed down and returned. Tested in Safari and + Chromium. The attributes will be hooked up to the creation of the + OpenGL context in bug 33416. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::getContextAttributes): + (WebCore::GraphicsContext3D::create): + (WebCore::GraphicsContext3D::GraphicsContext3D): + (WebCore::GraphicsContext3D::getContextAttributes): + +2010-01-13 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: selected, selectable, extended selectable, and multiple + selectable states are not reported + + https://bugs.webkit.org/show_bug.cgi?id=33574 + <rdar://problem/7536826> + + Reviewed by Darin Adler. + + * public/WebAccessibilityObject.h: + Update for WebCore::AccessibilityObject function rename. + + * src/WebAccessibilityObject.cpp: + (WebKit::WebAccessibilityObject::isMultiSelectable): + Ditto. + +2010-01-13 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient + https://bugs.webkit.org/show_bug.cgi?id=33492 + + * public/WebKitClient.h: + * public/WebViewClient.h: + (WebKit::WebViewClient::createSessionStorageNamespace): + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::sessionStorageNamespace): + +2010-01-13 Jeremy Orlow <jorlow@chromium.org> + + No reviewer. More or less a build fix. My 53180 broke some + stuff on the Chromium port so I'm reverting. + + * public/WebKitClient.h: + * public/WebViewClient.h: + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::sessionStorageNamespace): + +2010-01-11 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient + https://bugs.webkit.org/show_bug.cgi?id=33492 + + * public/WebKitClient.h: + * public/WebViewClient.h: + (WebKit::WebViewClient::getSessionStorageNamespace): + * src/StorageNamespaceProxy.cpp: + (WebCore::StorageNamespace::sessionStorageNamespace): + +2010-01-11 Darin Fisher <darin@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] Re-work webkit_unit_tests so that WebKit is initialized only once + https://bugs.webkit.org/show_bug.cgi?id=33504 + + * WebKit.gyp: + * tests/KURLTest.cpp: + (ComponentCase::TEST): + * tests/RunAllTests.cpp: Added. + (main): + * tests/WebKitTest.h: Removed. + +2010-01-09 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + ScriptController::isEnabled needs to be renamed + https://bugs.webkit.org/show_bug.cgi?id=32063 + + Rename ScriptController::isEnabled to + ScriptController::canExecuteScripts. + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::bindToWindowObject): + +2010-01-08 Daniel Bates <dbates@webkit.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=33417 + + Cleans up style errors exposed by the patch for bug #33198. + + No functionality was changed. So, no new tests. + + * src/GraphicsContext3D.cpp: + +2010-01-08 Darin Fisher <darin@chromium.org> + + Reviewed by Dimitri Glazkov. + + [Chromium] Upstream webkit unit tests from the chromium repository + https://bugs.webkit.org/show_bug.cgi?id=33351 + + This adds one such test (for KURL) and sets up the test framework. + + Switch WebKit to build a static library on all platforms. Add a + webkit_unit_tests executable target that runs the unit tests and also + ensures that we don't have any missing symbols (a function that WebKit + as a shared library used to serve). + + Changes chromium_src_dir to ../../WebKit/chromium to match how + WebCore.gyp defines that variable. + + * WebKit.gyp: + * public/WebKitClient.h: + (WebKit::WebKitClient::getPluginList): Remove bogus trailing semi-colon. + (WebKit::WebKitClient::decrementStatsCounter): Remove bogus trailing semi-colon. + (WebKit::WebKitClient::incrementStatsCounter): Remove bogus trailing semi-colon. + (WebKit::WebKitClient::traceEventBegin): Remove bogus trailing semi-colon. + (WebKit::WebKitClient::traceEventEnd): Remove bogus trailing semi-colon. + (WebKit::WebKitClient::histogramCounts): Remove bogus trailing semi-colon. + * tests: Added. + * tests/KURLTest.cpp: Added. + * tests/WebKitTest.h: Added. + +2010-01-07 Mike Belshe <mbelshe@chromium.org> + + Reviewed by Darin Adler. + + Fix Spdy casing to match style guide. + + https://bugs.webkit.org/show_bug.cgi?id=33326 + + * public/WebURLResponse.h: + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::wasFetchedViaSPDY): + (WebKit::WebURLResponse::setWasFetchedViaSPDY): + +2010-01-07 Daniel Bates <dbates@rim.com> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=32987 + + Added ENABLE_XHTMLMP flag. Disabled by default. + + * features.gypi: + +2010-01-07 Adam Barth <abarth@webkit.org> + + No review, rolling out r52847. + http://trac.webkit.org/changeset/52847 + https://bugs.webkit.org/show_bug.cgi?id=33232 + + Might have caused a perf regression. + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::detachedFromParent3): + +2010-01-06 Mike Belshe <mike@belshe.com> + + Add a flag to the ResourceResponse for tracking if a request was + fetched via SPDY. This is plumbed through so that we can inform + a webpage via JavaScript if it was fecthed via the experimental + SPDY protocol. + + https://bugs.webkit.org/show_bug.cgi?id=33186 + + * public/WebURLResponse.h: + * src/WebURLResponse.cpp: + (WebKit::WebURLResponse::wasFetchedViaSpdy): + (WebKit::WebURLResponse::setWasFetchedViaSpdy): + +2010-01-06 Darin Fisher <darin@chromium.org> + + Fix release build bustage. + + * src/WebKit.cpp: Need to include Logging.h + +2010-01-05 Darin Fisher <darin@chromium.org> + + Reviewed by Adam Barth. + + [Chromium] Expose more APIs to eliminate WebCore usage in Chromium. + https://bugs.webkit.org/show_bug.cgi?id=33249 + + * WebKit.gyp: + * public/WebFrame.h: + * public/WebGlyphCache.h: Added. + * public/WebKit.h: + * src/WebFrameImpl.cpp: + (WebKit::WebFrame::instanceCount): + (WebKit::WebFrameImpl::WebFrameImpl): + (WebKit::WebFrameImpl::~WebFrameImpl): + * src/WebFrameImpl.h: + * src/WebGlyphCache.cpp: Added. + (WebKit::WebGlyphCache::pageCount): + * src/WebKit.cpp: + (WebKit::enableLogChannel): + +2010-01-05 Adam Barth <abarth@webkit.org> + + Reviewed by Dimitri Glazkov. + + [v8] Move V8DOMWindowShell to ScriptController + https://bugs.webkit.org/show_bug.cgi?id=33232 + + Update FrameLoaderClientImpl.cpp to call clearForClose on + ScriptController instead of on V8Proxy. + + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::detachedFromParent3): + +2010-01-05 Rachel Petterson <rlp@google.com> + + Reviewed by Adam Barth. + + Matches the texImage2D and texSubImage2D functions to their + declarations. Elminates uncessary versions of those functions. + https://bugs.webkit.org/show_bug.cgi?id=31562 + Also bug: https://bugs.webkit.org/show_bug.cgi?id=31493 + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::texImage2D): + (WebCore::GraphicsContext3D::texSubImage2D): + +2010-01-04 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin Fisher. + + Reorganize, document and rename OS() platform macros. + https://bugs.webkit.org/show_bug.cgi?id=33198 + + Adapt to name changes. + + * src/ChromiumBridge.cpp: + * src/EditorClientImpl.cpp: + (WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled): + (WebKit::): + (WebKit::EditorClientImpl::handleEditingKeyboardEvent): + * src/FrameLoaderClientImpl.cpp: + (WebKit::FrameLoaderClientImpl::createPlugin): + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::makeContextCurrent): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::selectionAsText): + (WebKit::WebFrameImpl::printPage): + * src/WebPluginContainerImpl.cpp: + (WebKit::WebPluginContainerImpl::handleMouseEvent): + (WebKit::WebPluginContainerImpl::handleKeyboardEvent): + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::mouseDown): + (WebKit::WebViewImpl::mouseContextMenu): + (WebKit::WebViewImpl::mouseUp): + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::sendContextMenuEvent): + (WebKit::WebViewImpl::setScrollbarColors): + (WebKit::WebViewImpl::navigationPolicyFromMouseEvent): + +2010-01-04 Darin Fisher <darin@chromium.org> + + Reviewed by Eric Seidel. + + [Chromium] Expose more DOM methods to support LayoutTests + https://bugs.webkit.org/show_bug.cgi?id=33185 + + * public/WebDocument.h: Adds documentElement method. + * public/WebElement.h: Adds innerText method. + * public/WebFrame.h: Adds renderTreeAsText and counterValueForElementById + methods, and fixes a few whitespace issues. + * src/WebDocument.cpp: + (WebKit::WebDocument::documentElement): + * src/WebElement.cpp: + (WebKit::WebElement::innerText): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::clearName): + (WebKit::WebFrameImpl::renderTreeAsText): + (WebKit::WebFrameImpl::counterValueForElementById): + * src/WebFrameImpl.h: + +2010-01-04 Darin Fisher <darin@chromium.org> + + Fix Chromium build bustage. + + * src/WebAnimationControllerImpl.h: + +2010-01-04 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Darin Fisher. + + Adding WebAnimationController to chromium's WebKit API. + + https://bugs.webkit.org/show_bug.cgi?id=32870 + + * WebKit.gyp: + * public/WebAnimationController.h: Added. + (WebKit::WebAnimationController::~WebAnimationController): + * public/WebFrame.h: + * src/WebAnimationControllerImpl.cpp: Added. + (WebKit::WebAnimationControllerImpl::WebAnimationControllerImpl): + (WebKit::WebAnimationControllerImpl::pauseAnimationAtTime): + (WebKit::WebAnimationControllerImpl::pauseTransitionAtTime): + (WebKit::WebAnimationControllerImpl::numberOfActiveAnimations): + * src/WebAnimationControllerImpl.h: Added. + (WebKit::WebAnimationControllerImpl::~WebAnimationControllerImpl): + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::animationController): + (WebKit::WebFrameImpl::WebFrameImpl): + * src/WebFrameImpl.h: + +2010-01-04 Jay Campan <jcampan@google.com> + + Reviewed by Darin Fisher + + Adding more DOM API methods. They are needed for the upcoming + translate feature. + + * public/WebElement.h: + * public/WebNode.h: + * src/WebElement.cpp: + (WebKit::WebElement::tagName): + (WebKit::WebElement::setAttribute): + * src/WebNode.cpp: + (WebKit::WebNode::setNodeValue): + +2010-01-03 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + [Chromium] Implement CookieJarChromium::cookiesEnabled + https://bugs.webkit.org/show_bug.cgi?id=33123 + + Call out to the webKitClient() to see if cookies are enabled. Also + remove some straggling references to policyURL! + + * public/WebKitClient.h: + (WebKit::WebKitClient::setCookies): + (WebKit::WebKitClient::cookies): + (WebKit::WebKitClient::rawCookies): + (WebKit::WebKitClient::cookiesEnabled): + * src/ChromiumBridge.cpp: + (WebCore::ChromiumBridge::cookiesEnabled): + +2010-01-03 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + [Chromium] Remove evaluateInNewContext (it's useless) + https://bugs.webkit.org/show_bug.cgi?id=33068 + + This function has no clients and makes life complicated. Isolated + worlds won out over NewContext and there's not really any going back + now. + + * public/WebFrame.h: + * src/FrameLoaderClientImpl.h: + * src/WebFrameImpl.cpp: + * src/WebFrameImpl.h: + +2009-12-30 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [Chromium] Delete ResourceRequest::securityInfo + https://bugs.webkit.org/show_bug.cgi?id=26847 + + * src/WebWorkerBase.cpp: + (WebKit::WebWorkerBase::initializeLoader): + +2009-12-30 Albert J. Wong <ajwong@chromium.org> + + Not reviewed. Trivial Chromium build fix. + + Add static_cast<unsigned>() to fix signed/unsigned comparison warning. + + * src/AutocompletePopupMenuClient.cpp: + (WebKit::AutocompletePopupMenuClient::selectionChanged): + +2009-12-30 Zelidrag Hornung <zelidrag@chromium.org> + + Reviewed by Dimitri Glazkov. + + Autocomplete in Chromium now offers suggestions within the input element as a user + a) types text that produces some autocomplete suggestions, and + b) scrolls through suggested values in the menu + The suggested value is rendered but not exposed through JS unti the + user makes the final selection. + + No new tests since this new functionality (autocomplete suggestions) + is intentionally hidden from everything else than renderer. + + * src/AutocompletePopupMenuClient.cpp: + (WebKit::AutocompletePopupMenuClient::initialize): + (WebKit::AutocompletePopupMenuClient::setInitialAutocompleteValue): + (WebKit::AutocompletePopupMenuClient::selectionChanged): + (WebKit::AutocompletePopupMenuClient::popupDidHide): + (WebKit::AutocompletePopupMenuClient::setTextFromItem): + (WebKit::AutocompletePopupMenuClient::resetLastFieldValue): + * src/AutocompletePopupMenuClient.h: + + +2009-12-28 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Maciej Stachowiak. + + Fixed isKeypadEvent behavior for chromium/Mac to correctly report + keyLocation as DOM_KEY_LOCATION_NUMPAD for numeric pad key events. + https://bugs.webkit.org/show_bug.cgi?id=28247 + + Test: fast/events/keydown-numpad-keys.html + + * src/mac/WebInputEventFactory.mm: + (WebKit::isKeypadEvent): + +2009-12-22 Kenneth Russell <kbr@google.com> + + Reviewed by Eric Seidel. + + [Chromium] Garbage in transparent regions of images uploaded as textures + https://bugs.webkit.org/show_bug.cgi?id=32888 + + Test: fast/canvas/webgl/bug-32888.html (works in Safari / DumpRenderTree) + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3D::texImage2D): + +2009-12-22 Adam Langley <agl@google.com> + + Build fix: not reviewed. + + r52504 (https://bugs.webkit.org/show_bug.cgi?id=32845) broke the + Chromium build on Windows and Mac due to a misplaced #endif. The + buildbot didn't find the problem because it runs on Linux. + + Have verified this patch with the author of the above. + + * src/GraphicsContext3D.cpp: + +2009-12-22 Kenneth Russell <kbr@google.com> + + Reviewed by Eric Seidel. + + [Chromium] WebGL crashes intermittently on Linux + https://bugs.webkit.org/show_bug.cgi?id=32845 + + The dlclose'ing of libGL.so.1 and dlopen'ing of it each time a + GraphicsContext3D was created was occasionally causing it to be + re-mapped at a different base address. Since GLEW is not + re-initialized every time, primarily for performance reasons, its + cached function pointers were pointing to garbage. Stopped closing + and re-opening libGL.so.1 each time; now it is loaded lazily, when + the first 3D context is created. Also reused the X display + connection since the GLX routines' correctness might hinge upon it + not resulting in a change of GL implementation. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GLConnection::chooseFBConfig): + (WebCore::GraphicsContext3DInternal::GLConnection::createNewContext): + (WebCore::GraphicsContext3DInternal::GLConnection::createPbuffer): + (WebCore::GraphicsContext3DInternal::GLConnection::destroyPbuffer): + (WebCore::GraphicsContext3DInternal::GLConnection::makeCurrent): + (WebCore::GraphicsContext3DInternal::GLConnection::destroyContext): + (WebCore::GraphicsContext3DInternal::GLConnection::getCurrentContext): + (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection): + (WebCore::GraphicsContext3DInternal::GLConnection::tryLoad): + (WebCore::GraphicsContext3DInternal::GLConnection::create): + (WebCore::GraphicsContext3DInternal::GLConnection::~GLConnection): + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::makeContextCurrent): + +2009-12-22 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Darin Fisher. + + autoComplete and getElementById methods for WebKit API + + https://bugs.webkit.org/show_bug.cgi?id=32866 + + * public/WebDocument.h: + * public/WebInputElement.h: + * src/WebDocument.cpp: + (WebKit::WebDocument::getElementById): + * src/WebInputElement.cpp: + (WebKit::WebInputElement::autoComplete): + +2009-12-18 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + [Chromium] Eliminate redundant data copy in GraphicsContext3D readback + https://bugs.webkit.org/show_bug.cgi?id=32763 + + Eliminated useless creation of a CGBitmapContext and from there a + CGImage. Now create CGImage directly from data. Also changed + readPixels parameters and CGImage alpha info to try to avoid byte + swapping, and disabled interpolation when drawing the GL content. + Some test cases run twice as fast with these changes, though more + work is needed to achieve desired performance. + + No test case; performance optimization only. Ran WebGL demos from + Khronos site to verify changes. + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::beginPaint): + +2009-12-18 Peter Kasting <pkasting@google.com> + + Reviewed by Adam Barth. + + Chromium build fix + https://bugs.webkit.org/show_bug.cgi?id=32756 + + * public/WebAccessibilityRole.h: + (WebKit::): + * src/AssertMatchingEnums.cpp: + +2009-12-18 Adam Roben <aroben@apple.com> + + Chromium build fix + + * src/ChromiumBridge.cpp: + * src/WebPluginContainerImpl.cpp: + * src/WebViewImpl.cpp: + Added #includes. + +2009-12-17 Eric Seidel <eric@webkit.org> + + No review, rolling out r52291. + http://trac.webkit.org/changeset/52291 + https://bugs.webkit.org/show_bug.cgi?id=32618 + + Darin Fisher points out that this will likely break + the SSL security indicator in Chromium. Rolling out for now. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + +2009-12-17 Alexander Pavlov <apavlov@chromium.org> + + Reviewed by Eric Seidel. + + Disable memory cache client calls so that a new identifier isn't created + for the same resource on reload. + + With the calls enabled, duplicate entries for cached resources are created + in the Web Inspector. Safari for Windows disables the calls near the point of the + Frame instance creation, and we just follow this for Chromium. + https://bugs.webkit.org/show_bug.cgi?id=32618 + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::WebViewImpl): + +2009-12-17 Yaar Schnitman <yaar@chromium.org> + + Reviewed by Darin Fisher. + + Added WebPageSerializer to WebKit API and enriched the WebNode hierarchy to support + downstream unit-testing of serialization. + + WebPageSerializer was adapted from Chromium's dom_serializer, originally authored by Johnny Ding. + + https://bugs.webkit.org/show_bug.cgi?id=31737 + + * WebKit.gyp: + * public/WebDocument.h: Added. + (WebKit::WebDocument::WebDocument): + (WebKit::WebDocument::operator=): + (WebKit::WebDocument::assign): + * public/WebElement.h: + * public/WebFormElement.h: + (WebKit::WebFormElement::operator=): + * public/WebFrame.h: + * public/WebNode.h: + (WebKit::WebNode::): + (WebKit::WebNode::toConstElement): + * public/WebNodeCollection.h: Added. + (WebKit::WebNodeCollection::~WebNodeCollection): + (WebKit::WebNodeCollection::WebNodeCollection): + (WebKit::WebNodeCollection::operator=): + * public/WebNodeList.h: Added. + (WebKit::WebNodeList::~WebNodeList): + (WebKit::WebNodeList::WebNodeList): + (WebKit::WebNodeList::operator=): + * public/WebPageSerializer.h: Added. + * public/WebPageSerializerClient.h: Added. + (WebKit::WebPageSerializerClient::): + (WebKit::WebPageSerializerClient::WebPageSerializerClient): + (WebKit::WebPageSerializerClient::~WebPageSerializerClient): + * public/WebString.h: + * public/WebView.h: + * src/AssertMatchingEnums.cpp: + * src/DOMUtilitiesPrivate.cpp: + (WebKit::elementHasLegalLinkAttribute): + * src/DOMUtilitiesPrivate.h: + * src/WebDocument.cpp: Added. + (WebKit::WebDocument::WebDocument): + (WebKit::WebDocument::operator=): + (WebKit::WebDocument::operator WTF::PassRefPtr<Document>): + (WebKit::WebDocument::frame): + (WebKit::WebDocument::isHTMLDocument): + (WebKit::WebDocument::baseURL): + (WebKit::WebDocument::body): + (WebKit::WebDocument::head): + (WebKit::WebDocument::all): + (WebKit::WebDocument::completeURL): + * src/WebElement.cpp: + (WebKit::WebElement::hasTagName): + (WebKit::WebElement::hasAttribute): + (WebKit::WebElement::getAttribute): + * src/WebEntities.cpp: Added. + (WebKit::populateMap): + (WebKit::): + (WebKit::WebEntities::WebEntities): + (WebKit::WebEntities::entityNameByCode): + (WebKit::WebEntities::convertEntitiesInString): + * src/WebEntities.h: Added. + * src/WebFrameImpl.cpp: + (WebKit::WebFrame::fromFrameOwnerElement): + (WebKit::WebFrameImpl::encoding): + (WebKit::WebFrameImpl::document): + (WebKit::WebFrameImpl::fromFrameOwnerElement): + * src/WebFrameImpl.h: + * src/WebNode.cpp: + (WebKit::WebNode::nodeType): + (WebKit::WebNode::nodeValue): + (WebKit::WebNode::document): + (WebKit::WebNode::firstChild): + (WebKit::WebNode::lastChild): + (WebKit::WebNode::previousSibling): + (WebKit::WebNode::nextSibling): + (WebKit::WebNode::hasChildNodes): + (WebKit::WebNode::childNodes): + (WebKit::WebNode::createMarkup): + (WebKit::WebNode::isTextNode): + (WebKit::WebNode::isElementNode): + * src/WebNodeCollection.cpp: Added. + (WebKit::WebNodeCollection::reset): + (WebKit::WebNodeCollection::assign): + (WebKit::WebNodeCollection::WebNodeCollection): + (WebKit::WebNodeCollection::length): + (WebKit::WebNodeCollection::nextItem): + (WebKit::WebNodeCollection::firstItem): + * src/WebNodeList.cpp: Added. + (WebKit::WebNodeList::reset): + (WebKit::WebNodeList::assign): + (WebKit::WebNodeList::WebNodeList): + (WebKit::WebNodeList::length): + (WebKit::WebNodeList::item): + * src/WebPageSerializer.cpp: Added. + (WebKit::WebPageSerializer::serialize): + (WebKit::WebPageSerializer::generateMetaCharsetDeclaration): + (WebKit::WebPageSerializer::generateMarkOfTheWebDeclaration): + (WebKit::WebPageSerializer::generateBaseTagDeclaration): + * src/WebPageSerializerImpl.cpp: Added. + (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam): + (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): + (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag): + (WebKit::WebPageSerializerImpl::preActionBeforeSerializeEndTag): + (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag): + (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer): + (WebKit::WebPageSerializerImpl::openTagToString): + (WebKit::WebPageSerializerImpl::endTagToString): + (WebKit::WebPageSerializerImpl::buildContentForNode): + (WebKit::WebPageSerializerImpl::WebPageSerializerImpl): + (WebKit::WebPageSerializerImpl::collectTargetFrames): + (WebKit::WebPageSerializerImpl::serialize): + * src/WebPageSerializerImpl.h: Added. + * src/WebString.cpp: + (WebKit::WebString::WebString): + (WebKit::WebString::operator=): + * src/WebViewImpl.cpp: + +2009-12-17 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by David Levin. + + Provide explicit implementation of 'non-template' WebVector<T>::operator= + + https://bugs.webkit.org/show_bug.cgi?id=32363 + + * public/WebVector.h: + +2009-12-16 Fumitoshi Ukai <ukai@chromium.org> + + Unreviewed, build fix. + + [Chromium] Add EditableTextRole to catch up with + http://trac.webkit.org/changeset/52233 + + * public/WebAccessibilityRole.h: + (WebKit::): Added WebAccessibilityRoleEditableText + * src/AssertMatchingEnums.cpp: Added matching compile assert. + +2009-12-15 Kenneth Russell <kbr@google.com> + + Reviewed by Darin Fisher. + + Don't allow default framebuffer to be mutated + https://bugs.webkit.org/show_bug.cgi?id=32391 + + * src/GraphicsContext3D.cpp: + (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): + (WebCore::GraphicsContext3DInternal::reshape): + (WebCore::GraphicsContext3DInternal::beginPaint): + (WebCore::GraphicsContext3DInternal::bindFramebuffer): + (WebCore::GraphicsContext3D::bindFramebuffer): + +2009-12-15 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, build fix. + + [Chromium] Add TreeGridRole to catch up with + http://trac.webkit.org/changeset/52159. + + * public/WebAccessibilityRole.h: + (WebKit::): Added WebAccessibilityRoleTreeGrid. + * src/AssertMatchingEnums.cpp: Added matching compile assert. + +2009-12-15 Jian Li <jianli@chromium.org> + + Reviewed by Dmitry Titov. + + Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard. + https://bugs.webkit.org/show_bug.cgi?id=31090 + + The proposal to whatwg can be found here: + http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html + + * public/WebDragData.h: + * src/WebDragData.cpp: + (WebKit::WebDragData::downloadURL): + (WebKit::WebDragData::setDownloadURL): + +2009-12-14 Evan Stade <estade@chromium.org> + + Reviewed by Darin Fisher. + + https://bugs.webkit.org/show_bug.cgi?id=32347 + Chromium: Context menu launched by menu key has funky behavior + + Make the context menu's position depend on the selection only when an + editable field has focus. Also, don't send multiple context menu events + for a single keypress. + + * src/WebViewImpl.cpp: + (WebKit::WebViewImpl::keyEvent): + (WebKit::WebViewImpl::sendContextMenuEvent): + +>>>>>>> webkit.org at r54127 2009-12-13 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. @@ -13,6 +1368,54 @@ * src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl): +<<<<<<< HEAD +======= +2009-12-13 Charles Reis <creis@chromium.org> + + Reviewed by Adam Barth. + + Refactor some security code out of V8 bindings + https://bugs.webkit.org/show_bug.cgi?id=32326 + + * src/WebBindings.cpp: + (WebKit::getDragDataImpl): + +2009-12-11 Nate Chapin <japhet@chromium.org> + + Reviewed by Darin Fisher. + + Expose shouldHideReferrer() in WebSecurityPolicy. + + https://bugs.webkit.org/show_bug.cgi?id=32398 + + * public/WebSecurityPolicy.h: Add shouldHideReferrer(). + * src/WebSecurityPolicy.cpp: + (WebKit:: WebSecurityPolicy::shouldHideReferrer): Added. + +2009-12-11 Avi Drissman <avi@chromium.org> + + Reviewed by Darin Fisher. + + Tickmarks in the scrollbar are not cleared for non-main frames + https://bugs.webkit.org/show_bug.cgi?id=32385 + + * src/WebFrameImpl.cpp: + (WebKit::WebFrameImpl::stopFinding): + +2009-12-11 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Remove obsolete message handling methods from WebDevTools* interfaces + + https://bugs.webkit.org/show_bug.cgi?id=32320 + + * public/WebDevToolsAgent.h: + * public/WebDevToolsAgentClient.h: + * public/WebDevToolsFrontend.h: + * public/WebDevToolsFrontendClient.h: + +>>>>>>> webkit.org at r54127 2009-12-10 Mike Belshe <mike@belshe.com> Unreviewed, build fix for chromium. diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp index c41bf5b..3b5a17f 100644 --- a/WebKit/chromium/WebKit.gyp +++ b/WebKit/chromium/WebKit.gyp @@ -33,33 +33,23 @@ 'features.gypi', ], 'variables': { + 'webkit_target_type': 'static_library', 'conditions': [ # Location of the chromium src directory and target type is different # if webkit is built inside chromium or as standalone project. ['inside_chromium_build==0', { # Webkit is being built outside of the full chromium project. # e.g. via build-webkit --chromium - 'chromium_src_dir': '.', - # FIXME: To enable shared_library in linux all code (including - # dependencies) must be complied with -fPIC flag. That is - # pending on changes in gyp. - 'webkit_target_type': 'shared_library', + 'chromium_src_dir': '../../WebKit/chromium', },{ # WebKit is checked out in src/chromium/third_party/WebKit 'chromium_src_dir': '../../../..', - 'webkit_target_type': 'static_library', }], # We can't turn on warnings on Windows and Linux until we upstream the # WebKit API. ['OS=="mac"', { 'chromium_code': 1, }], - # FIXME: To enable shared_library in linux all code (including - # dependencies) must be complied with -fPIC flag. That is - # pending on changes in gyp. - ['OS=="linux" or OS=="freebsd"', { - 'webkit_target_type': 'static_library', - }], ], }, 'targets': [ @@ -86,6 +76,7 @@ 'public/WebAccessibilityCache.h', 'public/WebAccessibilityObject.h', 'public/WebAccessibilityRole.h', + 'public/WebAnimationController.h', 'public/WebApplicationCacheHost.h', 'public/WebApplicationCacheHostClient.h', 'public/WebBindings.h', @@ -112,15 +103,20 @@ 'public/WebDevToolsFrontend.h', 'public/WebDevToolsFrontendClient.h', 'public/WebDevToolsMessageData.h', + 'public/WebDocument.h', 'public/WebDragData.h', 'public/WebEditingAction.h', 'public/WebElement.h', + 'public/WebEvent.h', + 'public/WebEventListener.h', 'public/WebFileChooserCompletion.h', + 'public/WebFileChooserParams.h', 'public/WebFindOptions.h', 'public/WebFrame.h', 'public/WebFrameClient.h', 'public/WebFontCache.h', 'public/WebFormElement.h', + 'public/WebGlyphCache.h', 'public/WebHistoryItem.h', 'public/WebHTTPBody.h', 'public/WebImage.h', @@ -136,12 +132,17 @@ 'public/WebMessagePortChannel.h', 'public/WebMessagePortChannelClient.h', 'public/WebMimeRegistry.h', + 'public/WebMutationEvent.h', 'public/WebNavigationType.h', 'public/WebNode.h', + 'public/WebNodeCollection.h', + 'public/WebNodeList.h', 'public/WebNonCopyable.h', 'public/WebNotification.h', 'public/WebNotificationPresenter.h', 'public/WebNotificationPermissionCallback.h', + 'public/WebPageSerializer.h', + 'public/WebPageSerializerClient.h', 'public/WebPasswordAutocompleteListener.h', 'public/WebPasswordFormData.h', 'public/WebPlugin.h', @@ -192,6 +193,7 @@ 'public/win/WebScreenInfoFactory.h', 'public/win/WebScreenInfoFactory.h', 'src/ApplicationCacheHost.cpp', + 'src/ApplicationCacheHostInternal.h', 'src/AssertMatchingEnums.cpp', 'src/AutocompletePopupMenuClient.cpp', 'src/AutocompletePopupMenuClient.h', @@ -211,6 +213,8 @@ 'src/DragClientImpl.h', 'src/EditorClientImpl.cpp', 'src/EditorClientImpl.h', + 'src/EventListenerWrapper.cpp', + 'src/EventListenerWrapper.h', 'src/FrameLoaderClientImpl.cpp', 'src/FrameLoaderClientImpl.h', 'src/gtk/WebFontInfo.cpp', @@ -243,6 +247,8 @@ 'src/WebAccessibilityCacheImpl.cpp', 'src/WebAccessibilityCacheImpl.h', 'src/WebAccessibilityObject.cpp', + 'src/WebAnimationControllerImpl.cpp', + 'src/WebAnimationControllerImpl.h', 'src/WebBindings.cpp', 'src/WebCache.cpp', 'src/WebColor.cpp', @@ -253,14 +259,22 @@ 'src/WebDatabase.cpp', 'src/WebDataSourceImpl.cpp', 'src/WebDataSourceImpl.h', + 'src/WebDocument.cpp', 'src/WebDragData.cpp', 'src/WebElement.cpp', + 'src/WebEntities.cpp', + 'src/WebEntities.h', + 'src/WebEvent.cpp', + 'src/WebEventListener.cpp', + 'src/WebEventListenerPrivate.cpp', + 'src/WebEventListenerPrivate.h', 'src/WebFileChooserCompletionImpl.cpp', 'src/WebFileChooserCompletionImpl.h', 'src/WebFontCache.cpp', 'src/WebFormElement.cpp', 'src/WebFrameImpl.cpp', 'src/WebFrameImpl.h', + 'src/WebGlyphCache.cpp', 'src/WebHistoryItem.cpp', 'src/WebHTTPBody.cpp', 'src/WebImageCG.cpp', @@ -272,8 +286,14 @@ 'src/WebKit.cpp', 'src/WebMediaPlayerClientImpl.cpp', 'src/WebMediaPlayerClientImpl.h', + 'src/WebMutationEvent.cpp', 'src/WebNode.cpp', + 'src/WebNodeCollection.cpp', + 'src/WebNodeList.cpp', 'src/WebNotification.cpp', + 'src/WebPageSerializer.cpp', + 'src/WebPageSerializerImpl.cpp', + 'src/WebPageSerializerImpl.h', 'src/WebPasswordFormData.cpp', 'src/WebPasswordFormUtils.cpp', 'src/WebPasswordFormUtils.h', @@ -393,6 +413,27 @@ }], ], }, + { + 'target_name': 'webkit_unit_tests', + 'type': 'executable', + 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD', + 'dependencies': [ + 'webkit', + '../../WebCore/WebCore.gyp/WebCore.gyp:webcore', + '<(chromium_src_dir)/testing/gtest.gyp:gtest', + '<(chromium_src_dir)/base/base.gyp:base', + '<(chromium_src_dir)/base/base.gyp:base_i18n', + ], + 'include_dirs': [ + 'public', + 'src', + ], + 'sources': [ + 'tests/KeyboardTest.cpp', + 'tests/KURLTest.cpp', + 'tests/RunAllTests.cpp', + ], + }, ], # targets } diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi index 8dd0d0d..da2386b 100644 --- a/WebKit/chromium/features.gypi +++ b/WebKit/chromium/features.gypi @@ -50,9 +50,11 @@ 'ENABLE_JAVASCRIPT_DEBUGGER=0', 'ENABLE_JSC_MULTIPLE_THREADS=0', 'ENABLE_ICONDATABASE=0', + 'ENABLE_INDEXED_DATABASE=1', 'ENABLE_NOTIFICATIONS=1', 'ENABLE_OPENTYPE_SANITIZER=1', 'ENABLE_ORIENTATION_EVENTS=0', + 'ENABLE_XHTMLMP=0', 'ENABLE_XSLT=1', 'ENABLE_XPATH=1', 'ENABLE_SHARED_WORKERS=1', diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h index d32c548..f46c0d8 100644 --- a/WebKit/chromium/public/WebAccessibilityObject.h +++ b/WebKit/chromium/public/WebAccessibilityObject.h @@ -85,7 +85,7 @@ public: bool isEnabled() const; bool isHovered() const; bool isIndeterminate() const; - bool isMultiSelect() const; + bool isMultiSelectable() const; bool isOffScreen() const; bool isPasswordField() const; bool isPressed() const; diff --git a/WebKit/chromium/public/WebAccessibilityRole.h b/WebKit/chromium/public/WebAccessibilityRole.h index e836c56..ec041e0 100644 --- a/WebKit/chromium/public/WebAccessibilityRole.h +++ b/WebKit/chromium/public/WebAccessibilityRole.h @@ -106,8 +106,14 @@ enum WebAccessibilityRole { WebAccessibilityRoleTabList, WebAccessibilityRoleTabPanel, WebAccessibilityRoleTreeRole, + WebAccessibilityRoleTreeGrid, WebAccessibilityRoleTreeItemRole, WebAccessibilityRoleDirectory, + WebAccessibilityRoleEditableText, + + WebAccessibilityRoleListItem, + WebAccessibilityRoleMenuListPopup, + WebAccessibilityRoleMenuListOption, WebAccessibilityRoleLandmarkApplication, WebAccessibilityRoleLandmarkBanner, diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h new file mode 100644 index 0000000..d727d70 --- /dev/null +++ b/WebKit/chromium/public/WebAnimationController.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebAnimationController_h +#define WebAnimationController_h + +#include "WebCommon.h" + +namespace WebKit { + +class WebElement; +class WebString; +class WebURL; + +// WebAnimationController can be used to control animations in a frame. It is +// owned by a WebFrame and its life span is bound to that WebFrame. +class WebAnimationController { +public: + WEBKIT_API virtual bool pauseAnimationAtTime(WebElement&, + const WebString& animationName, + double time) = 0; + WEBKIT_API virtual bool pauseTransitionAtTime(WebElement&, + const WebString& propertyName, + double time) = 0; + + WEBKIT_API virtual unsigned numberOfActiveAnimations() const = 0; +protected: + ~WebAnimationController() { } +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebDataSource.h b/WebKit/chromium/public/WebDataSource.h index 3a83341..1aa7a98 100644 --- a/WebKit/chromium/public/WebDataSource.h +++ b/WebKit/chromium/public/WebDataSource.h @@ -36,6 +36,7 @@ namespace WebKit { +class WebApplicationCacheHost; class WebString; class WebURL; class WebURLRequest; @@ -91,6 +92,9 @@ public: virtual ExtraData* extraData() const = 0; virtual void setExtraData(ExtraData*) = 0; + // The application cache host associated with this datasource. + virtual WebApplicationCacheHost* applicationCacheHost() = 0; + protected: ~WebDataSource() { } }; diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h index 9c27628..e3b5186 100644 --- a/WebKit/chromium/public/WebDevToolsAgent.h +++ b/WebKit/chromium/public/WebDevToolsAgent.h @@ -55,12 +55,6 @@ public: virtual void didNavigate() = 0; - // TODO(32320): remove this method from API. - virtual void dispatchMessageFromFrontend(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3) = 0; virtual void dispatchMessageFromFrontend(const WebDevToolsMessageData&) = 0; virtual void inspectElementAt(const WebPoint&) = 0; @@ -79,12 +73,6 @@ public: // Asynchronously request debugger to pause immediately. WEBKIT_API static void debuggerPauseScript(); - // TODO(32320): remove this method from API. - WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3); WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebDevToolsMessageData&); typedef void (*MessageLoopDispatchHandler)(); diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h index ec51654..d78a6f1 100644 --- a/WebKit/chromium/public/WebDevToolsAgentClient.h +++ b/WebKit/chromium/public/WebDevToolsAgentClient.h @@ -31,6 +31,7 @@ #ifndef WebDevToolsAgentClient_h #define WebDevToolsAgentClient_h +#include "WebCString.h" #include "WebCommon.h" namespace WebKit { @@ -39,12 +40,6 @@ struct WebDevToolsMessageData; class WebDevToolsAgentClient { public: - // TODO(32320): remove this method from API. - virtual void sendMessageToFrontend(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3) {} virtual void sendMessageToFrontend(const WebDevToolsMessageData&) { } // Invalidates widget which leads to the repaint. @@ -56,14 +51,11 @@ public: // Notifies host upon runtime feature being enabled/disabled. virtual void runtimeFeatureStateChanged(const WebString& feature, bool enabled) { } - // TODO(32320): remove this method from API. - WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3); WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData&); + virtual WebCString injectedScriptSource() { return WebCString(); } + virtual WebCString injectedScriptDispatcherSource() { return WebCString(); } + protected: ~WebDevToolsAgentClient() { } }; diff --git a/WebKit/chromium/public/WebDevToolsFrontend.h b/WebKit/chromium/public/WebDevToolsFrontend.h index b7d7189..d95f35a 100644 --- a/WebKit/chromium/public/WebDevToolsFrontend.h +++ b/WebKit/chromium/public/WebDevToolsFrontend.h @@ -50,11 +50,6 @@ public: virtual ~WebDevToolsFrontend() {} - virtual void dispatchMessageFromAgent(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3) = 0; virtual void dispatchMessageFromAgent(const WebDevToolsMessageData&) = 0; }; diff --git a/WebKit/chromium/public/WebDevToolsFrontendClient.h b/WebKit/chromium/public/WebDevToolsFrontendClient.h index 2f74a8c..6200709 100644 --- a/WebKit/chromium/public/WebDevToolsFrontendClient.h +++ b/WebKit/chromium/public/WebDevToolsFrontendClient.h @@ -40,11 +40,6 @@ class WebDevToolsFrontendClient { public: WebDevToolsFrontendClient() {} - virtual void sendMessageToAgent(const WebString& className, - const WebString& methodName, - const WebString& param1, - const WebString& param2, - const WebString& param3) {}; virtual void sendMessageToAgent(const WebDevToolsMessageData&) {}; virtual void sendDebuggerCommandToAgent(const WebString& command) {}; virtual void sendDebuggerPauseScript() {} diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h new file mode 100644 index 0000000..e158c41 --- /dev/null +++ b/WebKit/chromium/public/WebDocument.h @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebDocument_h +#define WebDocument_h + +#include "WebNode.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class Document; } +namespace WTF { template <typename T> class PassRefPtr; } +#endif + +namespace WebKit { +class WebElement; +class WebFrame; +class WebNodeCollection; +class WebString; +class WebURL; + +// Provides readonly access to some properties of a DOM document. +class WebDocument : public WebNode { +public: + WebDocument() { } + WebDocument(const WebDocument& e) : WebNode(e) { } + + WebDocument& operator=(const WebDocument& e) + { + WebNode::assign(e); + return *this; + } + void assign(const WebDocument& e) { WebNode::assign(e); } + + // Returns the frame the document belongs to or 0 if the document is frameless. + WEBKIT_API WebFrame* frame() const; + WEBKIT_API bool isHTMLDocument() const; + WEBKIT_API WebURL baseURL() const; + WEBKIT_API WebElement documentElement() const; + WEBKIT_API WebElement body() const; + WEBKIT_API WebElement head(); + WEBKIT_API WebNodeCollection all(); + WEBKIT_API WebURL completeURL(const WebString&) const; + WEBKIT_API WebElement getElementById(const WebString& id) const; + WEBKIT_API WebString applicationID() const; + +#if WEBKIT_IMPLEMENTATION + WebDocument(const WTF::PassRefPtr<WebCore::Document>&); + WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); + operator WTF::PassRefPtr<WebCore::Document>() const; +#endif +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h index f7a165d..01582a9 100644 --- a/WebKit/chromium/public/WebDragData.h +++ b/WebKit/chromium/public/WebDragData.h @@ -72,6 +72,9 @@ public: WEBKIT_API WebString urlTitle() const; WEBKIT_API void setURLTitle(const WebString&); + WEBKIT_API WebURL downloadURL() const; + WEBKIT_API void setDownloadURL(const WebURL&); + WEBKIT_API WebString fileExtension() const; WEBKIT_API void setFileExtension(const WebString&); diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h index d7a2cbf..20f6c9a 100644 --- a/WebKit/chromium/public/WebElement.h +++ b/WebKit/chromium/public/WebElement.h @@ -39,15 +39,21 @@ namespace WTF { template <typename T> class PassRefPtr; } #endif namespace WebKit { - - // Provides readonly access to some properties of a DOM element node. + // Provides access to some properties of a DOM element node. class WebElement : public WebNode { public: WebElement() : WebNode() { } WebElement(const WebElement& e) : WebNode(e) { } WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; } - WEBKIT_API void assign(const WebElement& e) { WebNode::assign(e); } + void assign(const WebElement& e) { WebNode::assign(e); } + + WEBKIT_API WebString tagName() const; + WEBKIT_API bool hasTagName(const WebString&) const; + WEBKIT_API bool hasAttribute(const WebString&) const; + WEBKIT_API WebString getAttribute(const WebString&) const; + WEBKIT_API bool setAttribute(const WebString& name, const WebString& value); + WEBKIT_API WebString innerText() const; #if WEBKIT_IMPLEMENTATION WebElement(const WTF::PassRefPtr<WebCore::Element>&); diff --git a/WebKit/chromium/public/WebEvent.h b/WebKit/chromium/public/WebEvent.h new file mode 100644 index 0000000..b0964d1 --- /dev/null +++ b/WebKit/chromium/public/WebEvent.h @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebEvent_h +#define WebEvent_h + +#include "WebCommon.h" +#include "WebNode.h" +#include "WebString.h" + +namespace WebCore { class Event; } +#if WEBKIT_IMPLEMENTATION +namespace WTF { template <typename T> class PassRefPtr; } +#endif + +namespace WebKit { + +class WebEvent { +public: + enum PhaseType { + CapturingPhase = 1, + AtTarget = 2, + BubblingPhase = 3 + }; + + WebEvent() : m_private(0) { } + WebEvent(const WebEvent& e) : m_private(0) { assign(e); } + WebEvent& operator=(const WebEvent& e) + { + assign(e); + return *this; + } + + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebEvent&); + + bool isNull() const { return !m_private; } + + WEBKIT_API WebString type() const; + WEBKIT_API WebNode target() const; + WEBKIT_API WebNode currentTarget() const; + + WEBKIT_API PhaseType eventPhase() const; + WEBKIT_API bool bubbles() const; + WEBKIT_API bool cancelable() const; + + WEBKIT_API bool isUIEvent() const; + WEBKIT_API bool isMouseEvent() const; + WEBKIT_API bool isMutationEvent() const; + WEBKIT_API bool isKeyboardEvent() const; + WEBKIT_API bool isTextEvent() const; + WEBKIT_API bool isCompositionEvent() const; + WEBKIT_API bool isDragEvent() const; + WEBKIT_API bool isClipboardEvent() const; + WEBKIT_API bool isMessageEvent() const; + WEBKIT_API bool isWheelEvent() const; + WEBKIT_API bool isBeforeTextInsertedEvent() const; + WEBKIT_API bool isOverflowEvent() const; + WEBKIT_API bool isPageTransitionEvent() const; + WEBKIT_API bool isPopStateEvent() const; + WEBKIT_API bool isProgressEvent() const; + WEBKIT_API bool isXMLHttpRequestProgressEvent() const; + WEBKIT_API bool isWebKitAnimationEvent() const; + WEBKIT_API bool isWebKitTransitionEvent() const; + WEBKIT_API bool isBeforeLoadEvent() const; + +#if WEBKIT_IMPLEMENTATION + WebEvent(const WTF::PassRefPtr<WebCore::Event>&); +#endif + +protected: + typedef WebCore::Event WebEventPrivate; + void assign(WebEventPrivate*); + WebEventPrivate* m_private; + + template<typename T> T* unwrap() + { + return static_cast<T*>(m_private); + } + + template<typename T> const T* constUnwrap() const + { + return static_cast<const T*>(m_private); + } +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebEventListener.h new file mode 100644 index 0000000..52de1cd --- /dev/null +++ b/WebKit/chromium/public/WebEventListener.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebEventListener_h +#define WebEventListener_h + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class Node; } +#endif + +namespace WebKit { + +class EventListenerWrapper; +class WebEvent; +class WebEventListenerPrivate; +class WebNode; +class WebString; + +class WebEventListener { +public: + WebEventListener(); + virtual ~WebEventListener(); + + // Called when an event is received. + virtual void handleEvent(const WebEvent&) = 0; + +#if WEBKIT_IMPLEMENTATION + void notifyEventListenerDeleted(EventListenerWrapper*); + EventListenerWrapper* createEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node); + EventListenerWrapper* getEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node); +#endif + +private: + WebEventListenerPrivate* m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebFileChooserParams.h b/WebKit/chromium/public/WebFileChooserParams.h new file mode 100644 index 0000000..6359f14 --- /dev/null +++ b/WebKit/chromium/public/WebFileChooserParams.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebFileChooserParams_h +#define WebFileChooserParams_h + +#include "WebFileChooserCompletion.h" +#include "WebString.h" +#include "WebVector.h" + +namespace WebKit { + +struct WebFileChooserParams { + // If |multiSelect| is true, the dialog allow to select multiple files. + bool multiSelect; + // |title| is a title of a file chooser dialog. It can be an empty string. + WebString title; + // |initialValue| is a filename which the dialog should select by default. + // It can be an empty string. + WebString initialValue; + // |acceptTypes| has a comma-separated MIME types such as "audio/*,text/plain". + // The dialog may restrict selectable files to the specified MIME types. + // This value comes from an 'accept' attribute value of an INPUT element. + // So it might be a wrong formatted string. + WebString acceptTypes; + // |selectedFiles| has filenames which a file upload control already select. + // A WebViewClient implementation may ask a user to select + // - removing a file from the selected files, + // - appending other files, or + // - replacing with other files + // before opening a file chooser dialog. + WebVector<WebString> selectedFiles; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h index 27a1edb..b07bff9 100644 --- a/WebKit/chromium/public/WebFormElement.h +++ b/WebKit/chromium/public/WebFormElement.h @@ -50,7 +50,11 @@ namespace WebKit { WebFormElement() : WebElement() { } WebFormElement(const WebFormElement& e) : WebElement(e) { } - WebElement& operator=(const WebFormElement& e) { WebElement::assign(e); return *this; } + WebFormElement& operator=(const WebFormElement& e) + { + WebElement::assign(e); + return *this; + } WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); } #if WEBKIT_IMPLEMENTATION diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h index 44b57aa..4197c23 100644 --- a/WebKit/chromium/public/WebFrame.h +++ b/WebKit/chromium/public/WebFrame.h @@ -45,8 +45,11 @@ template <class T> class Local; namespace WebKit { +class WebAnimationController; class WebData; class WebDataSource; +class WebDocument; +class WebElement; class WebFormElement; class WebHistoryItem; class WebInputElement; @@ -66,6 +69,9 @@ template <typename T> class WebVector; class WebFrame { public: + // Returns the number of live WebFrame objects, used for leak checking. + WEBKIT_API static int instanceCount(); + // The two functions below retrieve the WebFrame instances relating the // currently executing JavaScript. Since JavaScript can make function // calls across frames, though, we need to be more precise. @@ -85,11 +91,16 @@ public: WEBKIT_API static WebFrame* frameForEnteredContext(); WEBKIT_API static WebFrame* frameForCurrentContext(); + // Returns the frame inside a given frame or iframe element. Returns 0 if + // the given element is not a frame, iframe or if the frame is empty. + WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&); + // Basic properties --------------------------------------------------- // The name of this frame. virtual WebString name() const = 0; + virtual void clearName() = 0; // The url of the document loaded in this frame. This is equivalent to // dataSource()->request().url(). @@ -103,6 +114,9 @@ public: // the document loaded in this frame. virtual WebURL openSearchDescriptionURL() const = 0; + // Return the frame's encoding. + virtual WebString encoding() const = 0; + // Geometry ----------------------------------------------------------- @@ -164,8 +178,12 @@ public: // Content ------------------------------------------------------------ + virtual WebDocument document() const = 0; + virtual void forms(WebVector<WebFormElement>&) const = 0; + virtual WebAnimationController* animationController() = 0; + // Scripting ---------------------------------------------------------- @@ -186,17 +204,6 @@ public: // Executes script in the context of the current page. virtual void executeScript(const WebScriptSource&) = 0; - // Executes script in a new context associated with the frame. The - // script gets its own global scope and its own prototypes for - // intrinsic JS objects (String, Array, and so-on). It shares the - // wrappers for all DOM nodes and DOM constructors. extensionGroup is - // an embedder-provided specifier that controls which v8 extensions are - // loaded into the new context - see WebKit::registerExtension for the - // corresponding specifier. - virtual void executeScriptInNewContext(const WebScriptSource* sources, - unsigned numSources, - int extensionGroup) = 0; - // Executes JavaScript in a new world associated with the web frame. // The script gets its own global scope and its own prototypes for // intrinsic JavaScript objects (String, Array, and so-on). It also @@ -428,6 +435,7 @@ public: // of matches found during the scoping effort. virtual void resetMatchCount() = 0; + // Password autocompletion --------------------------------------------- // Registers a listener for the specified user name input element. The @@ -438,12 +446,14 @@ public: WebInputElement, WebPasswordAutocompleteListener*) = 0; + // Utility ------------------------------------------------------------- // Given a relative URL, returns an absolute URL by resolving the URL // relative to the base URL of the frame's document. This uses the // same algorithm that WebKit uses to resolve hyperlinks found in a // HTML document. + // Deprecated. Use document().completeURL() instead. virtual WebURL completeURL(const WebString&) const = 0; // Returns the contents of this frame as a string. If the text is @@ -460,6 +470,14 @@ public: // from the DOM. virtual WebString contentAsMarkup() const = 0; + // Returns a text representation of the render tree. This method is used + // to support layout tests. + virtual WebString renderTreeAsText() const = 0; + + // Returns the counter value for the specified element. This method is + // used to support layout tests. + virtual WebString counterValueForElementById(const WebString& id) const = 0; + protected: ~WebFrame() { } }; diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h index 297eb62..4078151 100644 --- a/WebKit/chromium/public/WebFrameClient.h +++ b/WebKit/chromium/public/WebFrameClient.h @@ -80,6 +80,12 @@ public: // This frame is about to be closed. virtual void willClose(WebFrame*) { } + // Controls whether plugins are allowed for this frame. + virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } + + // Controls whether images are allowed for this frame. + virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } + // Load commands ------------------------------------------------------- diff --git a/WebKit/chromium/public/WebGlyphCache.h b/WebKit/chromium/public/WebGlyphCache.h new file mode 100644 index 0000000..661767d --- /dev/null +++ b/WebKit/chromium/public/WebGlyphCache.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebGlyphCache_h +#define WebGlyphCache_h + +#include "WebCommon.h" + +namespace WebKit { + +// An interface to query WebKit's glyph cache (which maps unicode characters to +// glyphs in particular fonts). +class WebGlyphCache { +public: + // Returns the number of pages in the glyph cache. + WEBKIT_API static size_t pageCount(); + +private: + WebGlyphCache(); // Not intended to be instanced. +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h index f15a62c..e248a61 100644 --- a/WebKit/chromium/public/WebHistoryItem.h +++ b/WebKit/chromium/public/WebHistoryItem.h @@ -105,6 +105,9 @@ public: WEBKIT_API WebVector<WebString> documentState() const; WEBKIT_API void setDocumentState(const WebVector<WebString>&); + WEBKIT_API long long documentSequenceNumber() const; + WEBKIT_API void setDocumentSequenceNumber(long long); + WEBKIT_API WebString httpContentType() const; WEBKIT_API void setHTTPContentType(const WebString&); diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h index 75e44b9..226624a 100644 --- a/WebKit/chromium/public/WebInputElement.h +++ b/WebKit/chromium/public/WebInputElement.h @@ -82,6 +82,7 @@ namespace WebKit { Week }; + WEBKIT_API bool autoComplete() const; WEBKIT_API bool isEnabledFormControl() const; WEBKIT_API InputType inputType() const; WEBKIT_API WebString formControlType() const; diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h index b9e6407..732cac6 100644 --- a/WebKit/chromium/public/WebKit.h +++ b/WebKit/chromium/public/WebKit.h @@ -55,6 +55,9 @@ WEBKIT_API WebKitClient* webKitClient(); WEBKIT_API void setLayoutTestMode(bool); WEBKIT_API bool layoutTestMode(); +// Enables the named log channel. See WebCore/platform/Logging.h for details. +WEBKIT_API void enableLogChannel(const char*); + // Purge the plugin list cache. If |reloadPages| is true, any pages // containing plugins will be reloaded after refreshing the plugin list. WEBKIT_API void resetPluginCache(bool reloadPages); diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h index 2a00a9a..fe6c801 100644 --- a/WebKit/chromium/public/WebKitClient.h +++ b/WebKit/chromium/public/WebKitClient.h @@ -89,6 +89,7 @@ public: virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; } // Return a new SessionStorage namespace. + // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this. virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; } // Called when storage events fire. @@ -178,10 +179,11 @@ public: // Network ------------------------------------------------------------- virtual void setCookies( - const WebURL& url, const WebURL& policyURL, const WebString& cookies) { } - virtual WebString cookies(const WebURL& url, const WebURL& policyURL) { return WebString(); } - virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) { return false; } + const WebURL& url, const WebURL& firstPartyForCookies, const WebString& cookies) { } + virtual WebString cookies(const WebURL& url, const WebURL& firstPartyForCookies) { return WebString(); } + virtual bool rawCookies(const WebURL& url, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; } virtual void deleteCookie(const WebURL& url, const WebString& cookieName) { } + virtual bool cookiesEnabled(const WebURL& url, const WebURL& firstPartyForCookies) { return true; } // A suggestion to prefetch IP information for the given hostname. virtual void prefetchHostName(const WebString&) { } @@ -200,23 +202,23 @@ public: // If refresh is true, then cached information should not be used to // satisfy this call. - virtual void getPluginList(bool refresh, WebPluginListBuilder*) { }; + virtual void getPluginList(bool refresh, WebPluginListBuilder*) { } // Profiling ----------------------------------------------------------- - virtual void decrementStatsCounter(const char* name) { }; - virtual void incrementStatsCounter(const char* name) { }; + virtual void decrementStatsCounter(const char* name) { } + virtual void incrementStatsCounter(const char* name) { } // An event is identified by the pair (name, id). The extra parameter // specifies additional data to log with the event. - virtual void traceEventBegin(const char* name, void* id, const char* extra) { }; - virtual void traceEventEnd(const char* name, void* id, const char* extra) { }; + virtual void traceEventBegin(const char* name, void* id, const char* extra) { } + virtual void traceEventEnd(const char* name, void* id, const char* extra) { } // Generic callback for reporting histogram data. Range is identified by the min, max pair. // By default, histogram is exponential, so that min=1, max=1000000, bucketCount=50 would do. Setting // linear to true would require bucket count to cover whole min-max range. - virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { }; + virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { } // Resources ----------------------------------------------------------- diff --git a/WebKit/chromium/public/WebMutationEvent.h b/WebKit/chromium/public/WebMutationEvent.h new file mode 100644 index 0000000..75eb9c4 --- /dev/null +++ b/WebKit/chromium/public/WebMutationEvent.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef WebMutationEvent_h +#define WebMutationEvent_h + +#include "WebEvent.h" + +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class Event; } +#endif + +namespace WebKit { + +class WebMutationEvent : public WebEvent { +public: + enum AttrChangeType { + Modification = 1, + Addition = 2, + Removal = 3 + }; + + WEBKIT_API WebNode relatedNode() const; + WEBKIT_API WebString prevValue() const; + WEBKIT_API WebString newValue() const; + WEBKIT_API WebString attrName() const; + WEBKIT_API AttrChangeType attrChange() const; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h index 03afa90..4d2a0e9 100644 --- a/WebKit/chromium/public/WebNode.h +++ b/WebKit/chromium/public/WebNode.h @@ -40,9 +40,13 @@ namespace WTF { template <typename T> class PassRefPtr; } #endif namespace WebKit { +class WebDocument; +class WebEventListener; +class WebEventListenerPrivate; class WebFrame; +class WebNodeList; -// Provides readonly access to some properties of a DOM node. +// Provides access to some properties of a DOM node. class WebNode { public: virtual ~WebNode() { reset(); } @@ -66,14 +70,52 @@ public: operator WTF::PassRefPtr<WebCore::Node>() const; #endif + enum NodeType { + ElementNode = 1, + AttributeNode, + TextNode, + CDataSectionNode, + EntityReferenceNode, + EntityNode, + ProcessingInstructionsNode, + CommentNode, + DocumentNode, + DocumentTypeNode, + DocumentFragmentNode, + NotationNode, + XPathNamespaceNode + }; + WEBKIT_API NodeType nodeType() const; WEBKIT_API WebNode parentNode() const; WEBKIT_API WebString nodeName() const; + WEBKIT_API WebString nodeValue() const; + WEBKIT_API bool setNodeValue(const WebString&); + // Deprecated. Use document().frame() instead. WEBKIT_API WebFrame* frame() const; + WEBKIT_API WebDocument document() const; + WEBKIT_API WebNode firstChild() const; + WEBKIT_API WebNode lastChild() const; + WEBKIT_API WebNode previousSibling() const; + WEBKIT_API WebNode nextSibling() const; + WEBKIT_API bool hasChildNodes() const; + WEBKIT_API WebNodeList childNodes(); + WEBKIT_API WebString createMarkup() const; + WEBKIT_API bool isTextNode() const; + WEBKIT_API bool isElementNode() const; + WEBKIT_API void addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture); + WEBKIT_API void removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture); template<typename T> T toElement() { T res; - res.m_private = m_private; + res.WebNode::assign(*this); + return res; + } + + template<typename T> const T toConstElement() const + { + T res; + res.WebNode::assign(*this); return res; } diff --git a/WebKit/chromium/public/WebNodeCollection.h b/WebKit/chromium/public/WebNodeCollection.h new file mode 100644 index 0000000..fee4f44 --- /dev/null +++ b/WebKit/chromium/public/WebNodeCollection.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebNodeCollection_h +#define WebNodeCollection_h + +#include "WebCommon.h" + +namespace WebCore { class HTMLCollection; } +#if WEBKIT_IMPLEMENTATION +namespace WTF { template <typename T> class PassRefPtr; } +#endif + +namespace WebKit { +class WebNode; + +// Provides readonly access to some properties of a DOM node. +class WebNodeCollection { +public: + ~WebNodeCollection() { reset(); } + + WebNodeCollection() : m_private(0) { } + WebNodeCollection(const WebNodeCollection& n) : m_private(0) { assign(n); } + WebNodeCollection& operator=(const WebNodeCollection& n) + { + assign(n); + return *this; + } + + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebNodeCollection&); + + WEBKIT_API unsigned length() const; + WEBKIT_API WebNode nextItem() const; + WEBKIT_API WebNode firstItem() const; + +#if WEBKIT_IMPLEMENTATION + WebNodeCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&); +#endif + +private: + void assign(WebCore::HTMLCollection*); + WebCore::HTMLCollection* m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebNodeList.h b/WebKit/chromium/public/WebNodeList.h new file mode 100644 index 0000000..23efab0 --- /dev/null +++ b/WebKit/chromium/public/WebNodeList.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebNodeList_h +#define WebNodeList_h + +#include "WebCommon.h" + +namespace WebCore { class NodeList; } +#if WEBKIT_IMPLEMENTATION +namespace WTF { template <typename T> class PassRefPtr; } +#endif + +namespace WebKit { +class WebNode; + +// Provides readonly access to some properties of a DOM node. +class WebNodeList { +public: + ~WebNodeList() { reset(); } + + WebNodeList() : m_private(0) { } + WebNodeList(const WebNodeList& n) : m_private(0) { assign(n); } + WebNodeList& operator=(const WebNodeList& n) + { + assign(n); + return *this; + } + + WEBKIT_API void reset(); + WEBKIT_API void assign(const WebNodeList&); + + WEBKIT_API unsigned length() const; + WEBKIT_API WebNode item(size_t) const; + +#if WEBKIT_IMPLEMENTATION + WebNodeList(const WTF::PassRefPtr<WebCore::NodeList>&); +#endif + +private: + void assign(WebCore::NodeList*); + WebCore::NodeList* m_private; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h index 653b142..a3764aa 100644 --- a/WebKit/chromium/public/WebNotificationPresenter.h +++ b/WebKit/chromium/public/WebNotificationPresenter.h @@ -35,8 +35,10 @@ namespace WebKit { +class WebDocument; class WebNotification; class WebNotificationPermissionCallback; +class WebURL; // Provides the services to show desktop notifications to the user. class WebNotificationPresenter { @@ -57,8 +59,9 @@ public: // being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events. virtual void objectDestroyed(const WebNotification&) = 0; - // Checks the permission level of a given origin. - virtual Permission checkPermission(const WebString& origin) = 0; + // Checks the permission level for the given URL. If the URL is being displayed in a document + // (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided. + virtual Permission checkPermission(const WebURL& url, WebDocument* document) = 0; // Requests permission for a given origin. This operation is asynchronous and the callback provided // will be invoked when the permission decision is made. Callback pointer must remain diff --git a/WebKit/chromium/public/WebPageSerializer.h b/WebKit/chromium/public/WebPageSerializer.h new file mode 100644 index 0000000..94f7994 --- /dev/null +++ b/WebKit/chromium/public/WebPageSerializer.h @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebPageSerializer_h +#define WebPageSerializer_h + +#include "WebCommon.h" + +namespace WebKit { +class WebFrame; +class WebPageSerializerClient; +class WebString; +class WebURL; +template <typename T> class WebVector; + +// Get html data by serializing all frames of current page with lists +// which contain all resource links that have local copy. +class WebPageSerializer { +public: + // This function will find out all frames and serialize them to HTML data. + // We have a data buffer to temporary saving generated html data. We will + // sequentially call WebPageSeriazlierClient once the data buffer is full. + // + // Return false means no available frame has been serialized, otherwise + // return true. + // + // The parameter frame specifies which frame need to be serialized. + // The parameter recursive specifies whether we need to + // serialize all sub frames of the specified frame or not. + // The parameter client specifies the pointer of interface + // WebPageSerializerClient providing a sink interface to receive the + // individual chunks of data to be saved. + // The parameter links contain original URLs of all saved links. + // The parameter localPaths contain corresponding local file paths of all + // saved links, which matched with vector:links one by one. + // The parameter localDirectoryName is relative path of directory which + // contain all saved auxiliary files included all sub frames and resources. + WEBKIT_API static bool serialize(WebFrame* frame, + bool recursive, + WebPageSerializerClient* client, + const WebVector<WebURL>& links, + const WebVector<WebString>& localPaths, + const WebString& localDirectoryName); + + // FIXME: The following are here for unit testing purposes. Consider + // changing the unit tests instead. + + // Generate the META for charset declaration. + WEBKIT_API static WebString generateMetaCharsetDeclaration(const WebString& charset); + // Generate the MOTW declaration. + WEBKIT_API static WebString generateMarkOfTheWebDeclaration(const WebURL& url); + // Generate the default base tag declaration. + WEBKIT_API static WebString generateBaseTagDeclaration(const WebString& baseTarget); +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebPageSerializerClient.h b/WebKit/chromium/public/WebPageSerializerClient.h new file mode 100644 index 0000000..c30ddbc --- /dev/null +++ b/WebKit/chromium/public/WebPageSerializerClient.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebPageSerializerClient_h +#define WebPageSerializerClient_h + +namespace WebKit { +class WebCString; +class WebURL; + +// This class is used for providing sink interface that can be used to receive +// the individual chunks of data to be saved. +class WebPageSerializerClient { +public: + // This enum indicates This sink interface can receive the individual chunks + // of serialized data to be saved, so we use values of following enum + // definition to indicate the serialization status of serializing all html + // content. If current frame is not complete serialized, call + // didSerializeDataForFrame with URL of current frame, data, data length and + // flag CurrentFrameIsNotFinished. + // If current frame is complete serialized, call didSerializeDataForFrame + // with URL of current frame, data, data length and flag + // CurrentFrameIsFinished. + // If all frames of page are complete serialized, call + // didSerializeDataForFrame with empty URL, empty data, 0 and flag + // AllFramesAreFinished. + enum PageSerializationStatus { + CurrentFrameIsNotFinished, + CurrentFrameIsFinished, + AllFramesAreFinished, + }; + + // Receive the individual chunks of serialized and encoded data to be saved. + // The parameter frameURL specifies what frame the data belongs. The + // parameter data contains the available data for saving. The parameter + // status indicates the status of data serialization. + virtual void didSerializeDataForFrame(const WebURL& frameURL, + const WebCString& data, + PageSerializationStatus status) = 0; + WebPageSerializerClient() { } + +protected: + virtual ~WebPageSerializerClient() { } +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h index eb6b2da..04f88c9 100644 --- a/WebKit/chromium/public/WebRuntimeFeatures.h +++ b/WebKit/chromium/public/WebRuntimeFeatures.h @@ -62,6 +62,12 @@ public: WEBKIT_API static void enableApplicationCache(bool); WEBKIT_API static bool isApplicationCacheEnabled(); + WEBKIT_API static void enableGeolocation(bool); + WEBKIT_API static bool isGeolocationEnabled(); + + WEBKIT_API static void enableIndexedDatabase(bool); + WEBKIT_API static bool isIndexedDatabaseEnabled(); + private: WebRuntimeFeatures(); }; diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h index d04fbc6..7b04aac 100644 --- a/WebKit/chromium/public/WebSecurityOrigin.h +++ b/WebKit/chromium/public/WebSecurityOrigin.h @@ -55,6 +55,8 @@ public: return *this; } + WEBKIT_API static WebSecurityOrigin* createFromDatabaseIdentifier(const WebString& databaseIdentifier); + WEBKIT_API void reset(); WEBKIT_API void assign(const WebSecurityOrigin&); diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h index 47dfe87..8e1ee52 100644 --- a/WebKit/chromium/public/WebSecurityPolicy.h +++ b/WebKit/chromium/public/WebSecurityPolicy.h @@ -55,6 +55,10 @@ public: const WebURL& sourceOrigin, const WebString& destinationProtocol, const WebString& destinationHost, bool allowDestinationSubdomains); WEBKIT_API static void resetOriginAccessWhiteLists(); + + // Returns whether the url should be allowed to see the referrer + // based on their respective protocols. + WEBKIT_API static bool shouldHideReferrer(const WebURL& url, const WebString& referrer); private: WebSecurityPolicy(); diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h index da36806..d75ccde 100644 --- a/WebKit/chromium/public/WebSettings.h +++ b/WebKit/chromium/public/WebSettings.h @@ -58,6 +58,7 @@ public: virtual void setWebSecurityEnabled(bool) = 0; virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0; virtual void setLoadsImagesAutomatically(bool) = 0; + virtual void setImagesEnabled(bool) = 0; virtual void setPluginsEnabled(bool) = 0; virtual void setDOMPasteAllowed(bool) = 0; virtual void setDeveloperExtrasEnabled(bool) = 0; diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h index 71dc7a5..302e10c 100644 --- a/WebKit/chromium/public/WebStorageArea.h +++ b/WebKit/chromium/public/WebStorageArea.h @@ -32,10 +32,10 @@ #define WebStorageArea_h #include "WebCommon.h" +#include "WebString.h" namespace WebKit { -class WebString; class WebURL; // In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This @@ -60,14 +60,41 @@ public: // Set the value that corresponds to a specific key. QuotaException is set if we've // the StorageArea would have exceeded its quota. The value is NOT set when there's // an exception. url is the url that should be used if a storage event fires. - virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException) = 0; + // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon. + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException) // Deprecated. + { + WebString oldValue; + setItem(key, newValue, url, quotaException, oldValue); + } + virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue) + { + setItem(key, newValue, url, quotaException); + } // Remove the value associated with a particular key. url is the url that should be used // if a storage event fires. - virtual void removeItem(const WebString& key, const WebURL& url) = 0; + // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon. + virtual void removeItem(const WebString& key, const WebURL& url) // Deprecated. + { + WebString oldValue; + removeItem(key, url, oldValue); + } + virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue) + { + removeItem(key, url); + } // Clear all key/value pairs. url is the url that should be used if a storage event fires. - virtual void clear(const WebURL& url) = 0; + // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon. + virtual void clear(const WebURL& url) // Deprecated. + { + bool somethingCleared; + clear(url, somethingCleared); + } + virtual void clear(const WebURL& url, bool& somethingCleared) + { + clear(url); + } }; } // namespace WebKit diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h index d9b66b2..d2cf9ea 100644 --- a/WebKit/chromium/public/WebString.h +++ b/WebKit/chromium/public/WebString.h @@ -76,6 +76,8 @@ public: WEBKIT_API void assign(const WebString&); WEBKIT_API void assign(const WebUChar* data, size_t len); + WEBKIT_API bool equals(const WebString& s) const; + WEBKIT_API size_t length() const; WEBKIT_API const WebUChar* data() const; @@ -87,6 +89,18 @@ public: WEBKIT_API static WebString fromUTF8(const char* data, size_t length); WEBKIT_API static WebString fromUTF8(const char* data); + template <int N> WebString(const char (&data)[N]) + : m_private(0) + { + assign(fromUTF8(data, N - 1)); + } + + template <int N> WebString& operator=(const char (&data)[N]) + { + assign(fromUTF8(data, N - 1)); + return *this; + } + #if WEBKIT_IMPLEMENTATION WebString(const WebCore::String&); WebString& operator=(const WebCore::String&); @@ -96,6 +110,7 @@ public: WebString& operator=(const WebCore::AtomicString&); operator WebCore::AtomicString() const; #else + WebString(const string16& s) : m_private(0) { assign(s.data(), s.length()); @@ -150,6 +165,16 @@ private: WebStringPrivate* m_private; }; +inline bool operator==(const WebString& a, const WebString& b) +{ + return a.equals(b); +} + +inline bool operator!=(const WebString& a, const WebString& b) +{ + return !(a == b); +} + } // namespace WebKit #endif diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h index cdac83c..1dac069 100644 --- a/WebKit/chromium/public/WebURLResponse.h +++ b/WebKit/chromium/public/WebURLResponse.h @@ -118,6 +118,11 @@ public: const WebCore::ResourceResponse& toResourceResponse() const; #endif + // Flag whether this request was loaded via the SPDY protocol or not. + // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy + WEBKIT_API bool wasFetchedViaSPDY() const; + WEBKIT_API void setWasFetchedViaSPDY(bool); + protected: void assign(WebURLResponsePrivate*); diff --git a/WebKit/chromium/public/WebVector.h b/WebKit/chromium/public/WebVector.h index d1f99b4..0520895 100644 --- a/WebKit/chromium/public/WebVector.h +++ b/WebKit/chromium/public/WebVector.h @@ -84,6 +84,13 @@ public: initializeFrom(other.size() ? &other[0] : 0, other.size()); } + WebVector& operator=(const WebVector& other) + { + if (this != &other) + assign(other); + return *this; + } + template <typename C> WebVector<T>& operator=(const C& other) { diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h index 5e1f15d..aba556c 100644 --- a/WebKit/chromium/public/WebView.h +++ b/WebKit/chromium/public/WebView.h @@ -251,11 +251,25 @@ public: WEBKIT_API static void resetVisitedLinkState(); - // Scrollbar colors ---------------------------------------------------- + // Custom colors ------------------------------------------------------- + virtual void setScrollbarColors(unsigned inactiveColor, unsigned activeColor, unsigned trackColor) = 0; + virtual void setSelectionColors(unsigned activeBackgroundColor, + unsigned activeForegroundColor, + unsigned inactiveBackgroundColor, + unsigned inactiveForegroundColor) = 0; + + + // Modal dialog support ------------------------------------------------ + + // Call these methods before and after running a nested, modal event loop + // to suspend script callbacks and resource loads. + WEBKIT_API static void willEnterModalLoop(); + WEBKIT_API static void didExitModalLoop(); + protected: ~WebView() {} }; diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h index 2e2f953..964d382 100644 --- a/WebKit/chromium/public/WebViewClient.h +++ b/WebKit/chromium/public/WebViewClient.h @@ -34,6 +34,7 @@ #include "WebDragOperation.h" #include "WebEditingAction.h" #include "WebFileChooserCompletion.h" +#include "WebFileChooserParams.h" #include "WebString.h" #include "WebTextAffinity.h" #include "WebTextDirection.h" @@ -48,6 +49,7 @@ class WebFrame; class WebNode; class WebNotificationPresenter; class WebRange; +class WebStorageNamespace; class WebURL; class WebView; class WebWidget; @@ -63,7 +65,9 @@ class WebViewClient : virtual public WebWidgetClient { public: // Factory methods ----------------------------------------------------- - // Create a new related WebView. + // Create a new related WebView. This method must clone its session storage + // so any subsequent calls to createSessionStorageNamespace conform to the + // WebStorage specification. virtual WebView* createView(WebFrame* creator) { return 0; } // Create a new WebPopupMenu. In the second form, the client is @@ -71,6 +75,8 @@ public: virtual WebWidget* createPopupMenu(bool activatable) { return 0; } virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; } + // Create a session storage namespace object associated with this WebView. + virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; } // Misc ---------------------------------------------------------------- @@ -161,9 +167,8 @@ public: // dialog is closed, it should call the WebFileChooserCompletion to // pass the results of the dialog. Returns false if // WebFileChooseCompletion will never be called. - virtual bool runFileChooser( - bool multiSelect, const WebString& title, - const WebString& initialValue, WebFileChooserCompletion*) { return false; } + virtual bool runFileChooser(const WebFileChooserParams&, + WebFileChooserCompletion*) { return false; } // Displays a modal alert dialog containing the given message. Returns // once the user dismisses the dialog. diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp index ef8f860..5fa4a66 100644 --- a/WebKit/chromium/src/ApplicationCacheHost.cpp +++ b/WebKit/chromium/src/ApplicationCacheHost.cpp @@ -33,14 +33,11 @@ #if ENABLE(OFFLINE_WEB_APPLICATIONS) +#include "ApplicationCacheHostInternal.h" #include "DocumentLoader.h" #include "DOMApplicationCache.h" #include "Frame.h" #include "Settings.h" -#include "WebApplicationCacheHost.h" -#include "WebApplicationCacheHostClient.h" -#include "WebKit.h" -#include "WebKitClient.h" #include "WebURL.h" #include "WebURLError.h" #include "WebURLResponse.h" @@ -51,27 +48,6 @@ using namespace WebKit; namespace WebCore { -// ApplicationCacheHostInternal ----------------------------------------------- - -class ApplicationCacheHostInternal : public WebApplicationCacheHostClient { -public: - ApplicationCacheHostInternal(ApplicationCacheHost* host) - : m_innerHost(host) - { - m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this)); - } - - virtual void notifyEventListener(WebApplicationCacheHost::EventID eventID) - { - m_innerHost->notifyDOMApplicationCache( - static_cast<ApplicationCacheHost::EventID>(eventID)); - } - - ApplicationCacheHost* m_innerHost; - OwnPtr<WebApplicationCacheHost> m_outerHost; -}; - -// ApplicationCacheHost ------------------------------------------------------- // We provide a custom implementation of this class that calls out to the // embedding application instead of using WebCore's built in appcache system. // This file replaces webcore/appcache/ApplicationCacheHost.cpp in our build. @@ -79,6 +55,7 @@ public: ApplicationCacheHost::ApplicationCacheHost(DocumentLoader* documentLoader) : m_domApplicationCache(0) , m_documentLoader(documentLoader) + , m_defersEvents(true) { ASSERT(m_documentLoader); } @@ -220,15 +197,32 @@ void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplic void ApplicationCacheHost::notifyDOMApplicationCache(EventID id) { + if (m_defersEvents) { + m_deferredEvents.append(id); + return; + } if (m_domApplicationCache) { ExceptionCode ec = 0; - m_domApplicationCache->dispatchEvent( - Event::create(DOMApplicationCache::toEventType(id), false, false), - ec); + m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec); ASSERT(!ec); } } +void ApplicationCacheHost::stopDeferringEvents() +{ + RefPtr<DocumentLoader> protect(documentLoader()); + for (unsigned i = 0; i < m_deferredEvents.size(); ++i) { + EventID id = m_deferredEvents[i]; + if (m_domApplicationCache) { + ExceptionCode ec = 0; + m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec); + ASSERT(!ec); + } + } + m_deferredEvents.clear(); + m_defersEvents = false; +} + ApplicationCacheHost::Status ApplicationCacheHost::status() const { return m_internal ? static_cast<Status>(m_internal->m_outerHost->status()) : UNCACHED; diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h new file mode 100644 index 0000000..3e52c1b --- /dev/null +++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "ApplicationCacheHost.h" + +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + +#include "WebApplicationCacheHostClient.h" +#include "WebKit.h" +#include "WebKitClient.h" + +namespace WebCore { + +class ApplicationCacheHostInternal : public WebKit::WebApplicationCacheHostClient { +public: + ApplicationCacheHostInternal(ApplicationCacheHost* host) + : m_innerHost(host) + { + m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this)); + } + + virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID) + { + m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID)); + } + + static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost) + { + if (innerHost && innerHost->m_internal.get()) + return innerHost->m_internal->m_outerHost.get(); + return 0; + } + +private: + friend class ApplicationCacheHost; + ApplicationCacheHost* m_innerHost; + OwnPtr<WebKit::WebApplicationCacheHost> m_outerHost; +}; + +} + +#endif // ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp index 35e2057..1d2948f 100644 --- a/WebKit/chromium/src/AssertMatchingEnums.cpp +++ b/WebKit/chromium/src/AssertMatchingEnums.cpp @@ -116,6 +116,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebArea, WebAreaRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleHeading, HeadingRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBox, ListBoxRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBoxOption, ListBoxOptionRole); +COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListOption, MenuListOptionRole); +COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListPopup, MenuListPopupRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTableHeaderContainer, TableHeaderContainerRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListTerm, DefinitionListTermRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListDefinition, DefinitionListDefinitionRole); @@ -126,8 +128,11 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTab, TabRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabList, TabListRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabPanel, TabPanelRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeRole, TreeRole); +COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeGrid, TreeGridRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole); +COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole); +COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole); COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole); @@ -245,6 +250,20 @@ COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Month, HTMLInputElement::MONTH); COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Time, HTMLInputElement::TIME); COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Week, HTMLInputElement::WEEK); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::CDataSectionNode, Node::CDATA_SECTION_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityReferenceNode, Node::ENTITY_REFERENCE_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityNode, Node::ENTITY_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::ProcessingInstructionsNode, Node::PROCESSING_INSTRUCTION_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::CommentNode, Node::COMMENT_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentNode, Node::DOCUMENT_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentTypeNode, Node::DOCUMENT_TYPE_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentFragmentNode, Node::DOCUMENT_FRAGMENT_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::NotationNode, Node::NOTATION_NODE); +COMPILE_ASSERT_MATCHING_ENUM(WebNode::XPathNamespaceNode, Node::XPATH_NAMESPACE_NODE); + #if ENABLE(VIDEO) COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Empty, MediaPlayer::Empty); COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Idle, MediaPlayer::Idle); diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp index 4e20124..9079094 100644 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/WebKit/chromium/src/ChromeClientImpl.cpp @@ -560,22 +560,20 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh if (!client) return; - bool multipleFiles = fileChooser->allowsMultipleFiles(); - - WebString suggestion; - if (fileChooser->filenames().size() > 0) - suggestion = fileChooser->filenames()[0]; - + WebFileChooserParams params; + params.multiSelect = fileChooser->allowsMultipleFiles(); + params.acceptTypes = fileChooser->acceptTypes(); + params.selectedFiles = fileChooser->filenames(); + if (params.selectedFiles.size() > 0) + params.initialValue = params.selectedFiles[0]; WebFileChooserCompletionImpl* chooserCompletion = new WebFileChooserCompletionImpl(fileChooser); - bool ok = client->runFileChooser(multipleFiles, - WebString(), - suggestion, - chooserCompletion); - if (!ok) { - // Choosing failed, so do callback with an empty list. - chooserCompletion->didChooseFile(WebVector<WebString>()); - } + + if (client->runFileChooser(params, chooserCompletion)) + return; + + // Choosing failed, so do callback with an empty list. + chooserCompletion->didChooseFile(WebVector<WebString>()); } void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp index 93d92ba..0fd0825 100644 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ b/WebKit/chromium/src/ChromiumBridge.cpp @@ -33,6 +33,7 @@ #include <googleurl/src/url_util.h> +#include "Chrome.h" #include "ChromeClientImpl.h" #include "WebClipboard.h" #include "WebCookie.h" @@ -54,13 +55,13 @@ #include "WebViewImpl.h" #include "WebWorkerClientImpl.h" -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) #include "WebRect.h" #include "WebSandboxSupport.h" #include "WebThemeEngine.h" #endif -#if PLATFORM(LINUX) +#if OS(LINUX) #include "WebSandboxSupport.h" #include "WebFontInfo.h" #endif @@ -212,6 +213,12 @@ void ChromiumBridge::deleteCookie(const KURL& url, const String& cookieName) webKitClient()->deleteCookie(url, cookieName); } +bool ChromiumBridge::cookiesEnabled(const KURL& url, + const KURL& firstPartyForCookies) +{ + return webKitClient()->cookiesEnabled(url, firstPartyForCookies); +} + // DNS ------------------------------------------------------------------------ void ChromiumBridge::prefetchDNS(const String& hostname) @@ -278,7 +285,7 @@ KURL ChromiumBridge::filePathToURL(const String& path) // Font ----------------------------------------------------------------------- -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) bool ChromiumBridge::ensureFontLoaded(HFONT font) { WebSandboxSupport* ss = webKitClient()->sandboxSupport(); @@ -289,7 +296,7 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font) } #endif -#if PLATFORM(LINUX) +#if OS(LINUX) String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters) { if (webKitClient()->sandboxSupport()) @@ -473,7 +480,7 @@ double ChromiumBridge::currentTime() // Theming -------------------------------------------------------------------- -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) void ChromiumBridge::paintButton( GraphicsContext* gc, int part, int state, int classicState, diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp index f23919e..72b861f 100644 --- a/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -79,11 +79,11 @@ static WebURL urlFromFrame(Frame* frame) return WebURL(); } -// Helper function to determine whether text is a single word or a sentence. +// Helper function to determine whether text is a single word. static bool isASingleWord(const String& text) { - TextBreakIterator* it = characterBreakIterator(text.characters(), text.length()); - return it && textBreakNext(it) == TextBreakDone; + TextBreakIterator* it = wordBreakIterator(text.characters(), text.length()); + return it && textBreakNext(it) == static_cast<int>(text.length()); } // Helper function to get misspelled word on which context menu diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp b/WebKit/chromium/src/DOMUtilitiesPrivate.cpp index ffdd85d..4081db6 100644 --- a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp +++ b/WebKit/chromium/src/DOMUtilitiesPrivate.cpp @@ -84,4 +84,53 @@ String nameOfInputElement(HTMLInputElement* element) return WebInputElement(element).nameForAutofill(); } +bool elementHasLegalLinkAttribute(const Element* element, + const QualifiedName& attrName) +{ + if (attrName == HTMLNames::srcAttr) { + // Check src attribute. + if (element->hasTagName(HTMLNames::imgTag) + || element->hasTagName(HTMLNames::scriptTag) + || element->hasTagName(HTMLNames::iframeTag) + || element->hasTagName(HTMLNames::frameTag)) + return true; + if (element->hasTagName(HTMLNames::inputTag)) { + const HTMLInputElement* input = + static_cast<const HTMLInputElement*>(element); + if (input->inputType() == HTMLInputElement::IMAGE) + return true; + } + } else if (attrName == HTMLNames::hrefAttr) { + // Check href attribute. + if (element->hasTagName(HTMLNames::linkTag) + || element->hasTagName(HTMLNames::aTag) + || element->hasTagName(HTMLNames::areaTag)) + return true; + } else if (attrName == HTMLNames::actionAttr) { + if (element->hasTagName(HTMLNames::formTag)) + return true; + } else if (attrName == HTMLNames::backgroundAttr) { + if (element->hasTagName(HTMLNames::bodyTag) + || element->hasTagName(HTMLNames::tableTag) + || element->hasTagName(HTMLNames::trTag) + || element->hasTagName(HTMLNames::tdTag)) + return true; + } else if (attrName == HTMLNames::citeAttr) { + if (element->hasTagName(HTMLNames::blockquoteTag) + || element->hasTagName(HTMLNames::qTag) + || element->hasTagName(HTMLNames::delTag) + || element->hasTagName(HTMLNames::insTag)) + return true; + } else if (attrName == HTMLNames::classidAttr + || attrName == HTMLNames::dataAttr) { + if (element->hasTagName(HTMLNames::objectTag)) + return true; + } else if (attrName == HTMLNames::codebaseAttr) { + if (element->hasTagName(HTMLNames::objectTag) + || element->hasTagName(HTMLNames::appletTag)) + return true; + } + return false; +} + } // namespace WebKit diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.h b/WebKit/chromium/src/DOMUtilitiesPrivate.h index c02bf84..253ab3f 100644 --- a/WebKit/chromium/src/DOMUtilitiesPrivate.h +++ b/WebKit/chromium/src/DOMUtilitiesPrivate.h @@ -32,11 +32,13 @@ #define DOMUtilitiesPrivate_h namespace WebCore { +class Element; class HTMLInputElement; class HTMLLinkElement; class HTMLMetaElement; class HTMLOptionElement; class Node; +class QualifiedName; class String; } @@ -53,6 +55,16 @@ WebCore::HTMLOptionElement* toHTMLOptionElement(WebCore::Node*); // FIXME: Deprecate. Use WebInputElement::nameForAutofill instead. WebCore::String nameOfInputElement(WebCore::HTMLInputElement*); +// For img, script, iframe, frame element, when attribute name is src, +// for link, a, area element, when attribute name is href, +// for form element, when attribute name is action, +// for input, type=image, when attribute name is src, +// for body, table, tr, td, when attribute name is background, +// for blockquote, q, del, ins, when attribute name is cite, +// we can consider the attribute value has legal link. +bool elementHasLegalLinkAttribute(const WebCore::Element* element, + const WebCore::QualifiedName& attrName); + } // namespace WebKit #endif diff --git a/WebKit/chromium/src/DragClientImpl.cpp b/WebKit/chromium/src/DragClientImpl.cpp index 5d8a9c3..671e7ca 100644 --- a/WebKit/chromium/src/DragClientImpl.cpp +++ b/WebKit/chromium/src/DragClientImpl.cpp @@ -79,9 +79,7 @@ void DragClientImpl::startDrag(DragImageRef dragImage, WebDragData dragData = static_cast<ClipboardChromium*>(clipboard)->dataObject(); - DragOperation dragOperationMask; - if (!clipboard->sourceOperation(dragOperationMask)) - dragOperationMask = DragOperationEvery; + DragOperation dragOperationMask = clipboard->sourceOperation(); m_webView->startDragging( eventPos, dragData, static_cast<WebDragOperationsMask>(dragOperationMask)); diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp index 5db8ff7..e035e6a 100644 --- a/WebKit/chromium/src/EditorClientImpl.cpp +++ b/WebKit/chromium/src/EditorClientImpl.cpp @@ -105,7 +105,7 @@ bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() { if (m_webView->client()) return m_webView->client()->isSelectTrailingWhitespaceEnabled(); -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) return true; #else return false; @@ -357,7 +357,7 @@ static const unsigned CtrlKey = 1 << 0; static const unsigned AltKey = 1 << 1; static const unsigned ShiftKey = 1 << 2; static const unsigned MetaKey = 1 << 3; -#if PLATFORM(DARWIN) +#if OS(DARWIN) // Aliases for the generic key defintions to make kbd shortcuts definitions more // readable on OS X. static const unsigned OptionKey = AltKey; @@ -387,7 +387,7 @@ struct KeyPressEntry { static const KeyDownEntry keyDownEntries[] = { { VKEY_LEFT, 0, "MoveLeft" }, { VKEY_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_LEFT, OptionKey, "MoveWordLeft" }, { VKEY_LEFT, OptionKey | ShiftKey, "MoveWordLeftAndModifySelection" }, @@ -398,7 +398,7 @@ static const KeyDownEntry keyDownEntries[] = { #endif { VKEY_RIGHT, 0, "MoveRight" }, { VKEY_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_RIGHT, OptionKey, "MoveWordRight" }, { VKEY_RIGHT, OptionKey | ShiftKey, "MoveWordRightAndModifySelection" }, @@ -418,12 +418,12 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_HOME, 0, "MoveToBeginningOfLine" }, { VKEY_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_LEFT, CommandKey, "MoveToBeginningOfLine" }, { VKEY_LEFT, CommandKey | ShiftKey, "MoveToBeginningOfLineAndModifySelection" }, #endif -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_UP, CommandKey, "MoveToBeginningOfDocument" }, { VKEY_UP, CommandKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" }, @@ -434,7 +434,7 @@ static const KeyDownEntry keyDownEntries[] = { #endif { VKEY_END, 0, "MoveToEndOfLine" }, { VKEY_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_DOWN, CommandKey, "MoveToEndOfDocument" }, { VKEY_DOWN, CommandKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, @@ -443,7 +443,7 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" }, #endif -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_RIGHT, CommandKey, "MoveToEndOfLine" }, { VKEY_RIGHT, CommandKey | ShiftKey, "MoveToEndOfLineAndModifySelection" }, @@ -451,7 +451,7 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_BACK, 0, "DeleteBackward" }, { VKEY_BACK, ShiftKey, "DeleteBackward" }, { VKEY_DELETE, 0, "DeleteForward" }, -#if PLATFORM(DARWIN) +#if OS(DARWIN) { VKEY_BACK, OptionKey, "DeleteWordBackward" }, { VKEY_DELETE, OptionKey, "DeleteWordForward" }, #else @@ -473,7 +473,7 @@ static const KeyDownEntry keyDownEntries[] = { { VKEY_INSERT, CtrlKey, "Copy" }, { VKEY_INSERT, ShiftKey, "Paste" }, { VKEY_DELETE, ShiftKey, "Cut" }, -#if !PLATFORM(DARWIN) +#if !OS(DARWIN) // On OS X, we pipe these back to the browser, so that it can do menu item // blinking. { 'C', CtrlKey, "Copy" }, @@ -600,13 +600,13 @@ bool EditorClientImpl::handleEditingKeyboardEvent(KeyboardEvent* evt) // unexpected behaviour if (ch < ' ') return false; -#if !PLATFORM(WIN_OS) +#if !OS(WINDOWS) // Don't insert ASCII character if ctrl w/o alt or meta is on. // On Mac, we should ignore events when meta is on (Command-<x>). if (ch < 0x80) { if (evt->keyEvent()->ctrlKey() && !evt->keyEvent()->altKey()) return false; -#if PLATFORM(DARWIN) +#if OS(DARWIN) if (evt->keyEvent()->metaKey()) return false; #endif diff --git a/WebKit/chromium/src/EventListenerWrapper.cpp b/WebKit/chromium/src/EventListenerWrapper.cpp new file mode 100644 index 0000000..f2d2979 --- /dev/null +++ b/WebKit/chromium/src/EventListenerWrapper.cpp @@ -0,0 +1,72 @@ +/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EventListenerWrapper.h"
+
+#include "Event.h"
+#include "EventListener.h"
+
+#include "WebEvent.h"
+#include "WebEventListener.h"
+
+namespace WebKit {
+
+EventListenerWrapper::EventListenerWrapper(WebEventListener* webEventListener)
+ : EventListener(EventListener::JSEventListenerType)
+ , m_webEventListener(webEventListener)
+{
+}
+
+EventListenerWrapper::~EventListenerWrapper()
+{
+ if (m_webEventListener)
+ m_webEventListener->notifyEventListenerDeleted(this);
+}
+
+bool EventListenerWrapper::operator==(const EventListener& listener)
+{
+ return this == &listener;
+}
+
+void EventListenerWrapper::handleEvent(ScriptExecutionContext* context, Event* event)
+{
+ if (!m_webEventListener)
+ return;
+ WebEvent webEvent(event);
+ m_webEventListener->handleEvent(webEvent);
+}
+
+void EventListenerWrapper::webEventListenerDeleted()
+{
+ m_webEventListener = 0;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/EventListenerWrapper.h b/WebKit/chromium/src/EventListenerWrapper.h new file mode 100644 index 0000000..2a0cbbb --- /dev/null +++ b/WebKit/chromium/src/EventListenerWrapper.h @@ -0,0 +1,62 @@ +/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EventListenerWrapper_h
+#define EventListenerWrapper_h
+
+#include "EventListener.h"
+
+namespace WebCore {
+class ScriptExecutionContext;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class WebEventListener;
+
+class EventListenerWrapper : public EventListener {
+public:
+ EventListenerWrapper(WebEventListener*);
+ ~EventListenerWrapper();
+
+ virtual bool operator==(const EventListener&);
+ virtual void handleEvent(ScriptExecutionContext*, Event*);
+
+ void webEventListenerDeleted();
+
+private:
+ WebEventListener* m_webEventListener;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp index 3ca8e8d..b984308 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp @@ -164,6 +164,22 @@ bool FrameLoaderClientImpl::allowJavaScript(bool enabledPerSettings) return enabledPerSettings; } +bool FrameLoaderClientImpl::allowPlugins(bool enabledPerSettings) +{ + if (m_webFrame->client()) + return m_webFrame->client()->allowPlugins(m_webFrame, enabledPerSettings); + + return enabledPerSettings; +} + +bool FrameLoaderClientImpl::allowImages(bool enabledPerSettings) +{ + if (m_webFrame->client()) + return m_webFrame->client()->allowImages(m_webFrame, enabledPerSettings); + + return enabledPerSettings; +} + bool FrameLoaderClientImpl::hasWebView() const { return m_webFrame->viewImpl(); @@ -1325,7 +1341,7 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin( const String& mimeType, bool loadManually) { -#if !PLATFORM(WIN_OS) +#if !OS(WINDOWS) // WebCore asks us to make a plugin even if we don't have a // registered handler, with a comment saying it's so we can display // the broken plugin icon. In Chromium, we normally register a diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h index 4ddfe5f..901600c 100644 --- a/WebKit/chromium/src/FrameLoaderClientImpl.h +++ b/WebKit/chromium/src/FrameLoaderClientImpl.h @@ -66,7 +66,7 @@ public: virtual void didCreateScriptContextForFrame(); virtual void didDestroyScriptContextForFrame(); - // A context untied to a frame was created (through evaluateInNewContext). + // A context untied to a frame was created (through evaluateInIsolatedWorld). // This context is not tied to the lifetime of its frame, and is destroyed // in garbage collection. virtual void didCreateIsolatedScriptContext(); @@ -192,6 +192,8 @@ public: virtual void registerForIconNotification(bool listen = true); virtual void didChangeScrollOffset(); virtual bool allowJavaScript(bool enabledPerSettings); + virtual bool allowPlugins(bool enabledPerSettings); + virtual bool allowImages(bool enabledPerSettings); private: void makeDocumentView(); diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp index c9ba5a1..7fe31b0 100644 --- a/WebKit/chromium/src/GraphicsContext3D.cpp +++ b/WebKit/chromium/src/GraphicsContext3D.cpp @@ -56,7 +56,7 @@ #include <stdio.h> #include <wtf/FastMalloc.h> -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) #include <windows.h> #endif @@ -76,11 +76,11 @@ #include "NativeImageSkia.h" #endif -#if PLATFORM(DARWIN) +#if OS(DARWIN) #define USE_TEXTURE_RECTANGLE_FOR_FRAMEBUFFER #endif -#if PLATFORM(LINUX) +#if OS(LINUX) #include <dlfcn.h> #include "GL/glxew.h" #endif @@ -98,7 +98,7 @@ namespace WebCore { class GraphicsContext3DInternal { public: - GraphicsContext3DInternal(); + GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs); ~GraphicsContext3DInternal(); bool makeContextCurrent(); @@ -116,12 +116,15 @@ public: void activeTexture(unsigned long texture); void bindBuffer(unsigned long target, WebGLBuffer* buffer); + void bindFramebuffer(unsigned long target, + WebGLFramebuffer* framebuffer); void bindTexture(unsigned long target, WebGLTexture* texture); void bufferDataImpl(unsigned long target, int size, const void* data, unsigned long usage); void disableVertexAttribArray(unsigned long index); void enableVertexAttribArray(unsigned long index); unsigned long getError(); + GraphicsContext3D::Attributes getContextAttributes(); void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, unsigned long stride, unsigned long offset); void viewportImpl(long x, long y, unsigned long width, unsigned long height); @@ -129,11 +132,16 @@ public: void synthesizeGLError(unsigned long error); private: + GraphicsContext3D::Attributes m_attrs; + unsigned int m_texture; unsigned int m_fbo; unsigned int m_depthBuffer; unsigned int m_cachedWidth, m_cachedHeight; + // For tracking which FBO is bound + unsigned int m_boundFBO; + #ifdef FLIP_FRAMEBUFFER_VERTICALLY unsigned char* m_scanline; void flipVertically(unsigned char* framebuffer, @@ -176,7 +184,8 @@ private: SkBitmap* m_resizingBitmap; #endif -#if PLATFORM(WIN_OS) + static bool s_initializedGLEW; +#if OS(WINDOWS) HWND m_canvasWindow; HDC m_canvasDC; HGLRC m_contextObj; @@ -184,30 +193,170 @@ private: CGLPBufferObj m_pbuffer; CGLContextObj m_contextObj; unsigned char* m_renderOutput; - CGContextRef m_cgContext; -#elif PLATFORM(LINUX) - Display* m_display; +#elif OS(LINUX) GLXContext m_contextObj; GLXPbuffer m_pbuffer; + // In order to avoid problems caused by linking against libGL, we // dynamically look up all the symbols we need. // http://code.google.com/p/chromium/issues/detail?id=16800 - void* m_libGL; - PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig; - PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext; - PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer; - PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer; - typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx); - PFNGLXMAKECURRENTPROC m_glXMakeCurrent; - typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx); - PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext; - typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void); - PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext; + class GLConnection { + public: + ~GLConnection(); + + static GLConnection* create(); + + GLXFBConfig* chooseFBConfig(int screen, const int *attrib_list, int *nelements) + { + return m_glXChooseFBConfig(m_display, screen, attrib_list, nelements); + } + + GLXContext createNewContext(GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) + { + return m_glXCreateNewContext(m_display, config, renderType, shareList, direct); + } + + GLXPbuffer createPbuffer(GLXFBConfig config, const int *attribList) + { + return m_glXCreatePbuffer(m_display, config, attribList); + } + + void destroyPbuffer(GLXPbuffer pbuf) + { + m_glXDestroyPbuffer(m_display, pbuf); + } + + Bool makeCurrent(GLXDrawable drawable, GLXContext ctx) + { + return m_glXMakeCurrent(m_display, drawable, ctx); + } + + void destroyContext(GLXContext ctx) + { + m_glXDestroyContext(m_display, ctx); + } + + GLXContext getCurrentContext() + { + return m_glXGetCurrentContext(); + } + + private: + Display* m_display; + void* m_libGL; + PFNGLXCHOOSEFBCONFIGPROC m_glXChooseFBConfig; + PFNGLXCREATENEWCONTEXTPROC m_glXCreateNewContext; + PFNGLXCREATEPBUFFERPROC m_glXCreatePbuffer; + PFNGLXDESTROYPBUFFERPROC m_glXDestroyPbuffer; + typedef Bool (* PFNGLXMAKECURRENTPROC)(Display* dpy, GLXDrawable drawable, GLXContext ctx); + PFNGLXMAKECURRENTPROC m_glXMakeCurrent; + typedef void (* PFNGLXDESTROYCONTEXTPROC)(Display* dpy, GLXContext ctx); + PFNGLXDESTROYCONTEXTPROC m_glXDestroyContext; + typedef GLXContext (* PFNGLXGETCURRENTCONTEXTPROC)(void); + PFNGLXGETCURRENTCONTEXTPROC m_glXGetCurrentContext; + + GLConnection(Display* display, + void* libGL, + PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig, + PFNGLXCREATENEWCONTEXTPROC createNewContext, + PFNGLXCREATEPBUFFERPROC createPbuffer, + PFNGLXDESTROYPBUFFERPROC destroyPbuffer, + PFNGLXMAKECURRENTPROC makeCurrent, + PFNGLXDESTROYCONTEXTPROC destroyContext, + PFNGLXGETCURRENTCONTEXTPROC getCurrentContext) + : m_libGL(libGL) + , m_display(display) + , m_glXChooseFBConfig(chooseFBConfig) + , m_glXCreateNewContext(createNewContext) + , m_glXCreatePbuffer(createPbuffer) + , m_glXDestroyPbuffer(destroyPbuffer) + , m_glXMakeCurrent(makeCurrent) + , m_glXDestroyContext(destroyContext) + , m_glXGetCurrentContext(getCurrentContext) + { + } + + static void* tryLoad(const char* libName) + { + // We use RTLD_GLOBAL semantics so that GLEW initialization works; + // GLEW expects to be able to open the current process's handle + // and do dlsym's of GL entry points from there. + return dlopen(libName, RTLD_LAZY | RTLD_GLOBAL); + } + }; + + static GLConnection* s_gl; #else #error Must port GraphicsContext3D to your platform #endif }; +bool GraphicsContext3DInternal::s_initializedGLEW = false; + +#if OS(LINUX) +GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::s_gl = 0; + +GraphicsContext3DInternal::GLConnection* GraphicsContext3DInternal::GLConnection::create() +{ + Display* dpy = XOpenDisplay(0); + if (!dpy) { + printf("GraphicsContext3D: error opening X display\n"); + return 0; + } + + void* libGL = 0; + const char* libNames[] = { + "/usr/lib/libGL.so.1", + "/usr/lib32/libGL.so.1", + "/usr/lib64/libGL.so.1", + }; + for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) { + libGL = tryLoad(libNames[i]); + if (libGL) + break; + } + if (!libGL) { + printf("GraphicsContext3D: error opening libGL.so.1\n"); + printf("GraphicsContext3D: tried:\n"); + for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) + printf(" %s\n", libNames[i]); + return 0; + } + + PFNGLXCHOOSEFBCONFIGPROC chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(libGL, "glXChooseFBConfig"); + PFNGLXCREATENEWCONTEXTPROC createNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(libGL, "glXCreateNewContext"); + PFNGLXCREATEPBUFFERPROC createPbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(libGL, "glXCreatePbuffer"); + PFNGLXDESTROYPBUFFERPROC destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(libGL, "glXDestroyPbuffer"); + PFNGLXMAKECURRENTPROC makeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(libGL, "glXMakeCurrent"); + PFNGLXDESTROYCONTEXTPROC destroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(libGL, "glXDestroyContext"); + PFNGLXGETCURRENTCONTEXTPROC getCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(libGL, "glXGetCurrentContext"); + if (!chooseFBConfig || !createNewContext || !createPbuffer + || !destroyPbuffer || !makeCurrent || !destroyContext + || !getCurrentContext) { + XCloseDisplay(dpy); + dlclose(libGL); + printf("GraphicsContext3D: error looking up bootstrapping entry points\n"); + return 0; + } + return new GLConnection(dpy, + libGL, + chooseFBConfig, + createNewContext, + createPbuffer, + destroyPbuffer, + makeCurrent, + destroyContext, + getCurrentContext); +} + +GraphicsContext3DInternal::GLConnection::~GLConnection() +{ + XCloseDisplay(m_display); + dlclose(m_libGL); +} + +#endif // OS(LINUX) + GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState() : enabled(false) , buffer(0) @@ -220,20 +369,12 @@ GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState() { } -#if PLATFORM(LINUX) -static void* tryLoad(const char* libName) -{ - // We use RTLD_GLOBAL semantics so that GLEW initialization works; - // GLEW expects to be able to open the current process's handle - // and do dlsym's of GL entry points from there. - return dlopen(libName, RTLD_LAZY | RTLD_GLOBAL); -} -#endif - -GraphicsContext3DInternal::GraphicsContext3DInternal() - : m_texture(0) +GraphicsContext3DInternal::GraphicsContext3DInternal(GraphicsContext3D::Attributes attrs) + : m_attrs(attrs) + , m_texture(0) , m_fbo(0) , m_depthBuffer(0) + , m_boundFBO(0) #ifdef FLIP_FRAMEBUFFER_VERTICALLY , m_scanline(0) #endif @@ -241,7 +382,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() #if PLATFORM(SKIA) , m_resizingBitmap(0) #endif -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) , m_canvasWindow(0) , m_canvasDC(0) , m_contextObj(0) @@ -249,23 +390,24 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() , m_pbuffer(0) , m_contextObj(0) , m_renderOutput(0) - , m_cgContext(0) -#elif PLATFORM(LINUX) - , m_display(0) +#elif OS(LINUX) , m_contextObj(0) , m_pbuffer(0) - , m_glXChooseFBConfig(0) - , m_glXCreateNewContext(0) - , m_glXCreatePbuffer(0) - , m_glXDestroyPbuffer(0) - , m_glXMakeCurrent(0) - , m_glXDestroyContext(0) - , m_glXGetCurrentContext(0) #else #error Must port to your platform #endif { -#if PLATFORM(WIN_OS) + // FIXME: we need to take into account the user's requested + // context creation attributes, in particular stencil and + // antialias, and determine which could and could not be honored + // based on the capabilities of the OpenGL implementation. + m_attrs.alpha = true; + m_attrs.depth = true; + m_attrs.stencil = false; + m_attrs.antialias = false; + m_attrs.premultipliedAlpha = true; + +#if OS(WINDOWS) WNDCLASS wc; if (!GetClassInfo(GetModuleHandle(0), L"CANVASGL", &wc)) { ZeroMemory(&wc, sizeof(WNDCLASS)); @@ -377,43 +519,13 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() } m_pbuffer = pbuffer; m_contextObj = context; -#elif PLATFORM(LINUX) - m_display = XOpenDisplay(0); - if (!m_display) { - printf("GraphicsContext3D: error opening X display\n"); - return; +#elif OS(LINUX) + if (!s_gl) { + s_gl = GLConnection::create(); + if (!s_gl) + return; } - const char* libNames[] = { - "/usr/lib/libGL.so.1", - "/usr/lib32/libGL.so.1", - "/usr/lib64/libGL.so.1", - }; - for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) { - m_libGL = tryLoad(libNames[i]); - if (m_libGL) - break; - } - if (!m_libGL) { - printf("GraphicsContext3D: error opening libGL.so.1\n"); - printf("GraphicsContext3D: tried:"); - for (int i = 0; i < sizeof(libNames) / sizeof(const char*); i++) - printf(" %s", libNames[i]); - return; - } - m_glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) dlsym(m_libGL, "glXChooseFBConfig"); - m_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC) dlsym(m_libGL, "glXCreateNewContext"); - m_glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC) dlsym(m_libGL, "glXCreatePbuffer"); - m_glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) dlsym(m_libGL, "glXDestroyPbuffer"); - m_glXMakeCurrent = (PFNGLXMAKECURRENTPROC) dlsym(m_libGL, "glXMakeCurrent"); - m_glXDestroyContext = (PFNGLXDESTROYCONTEXTPROC) dlsym(m_libGL, "glXDestroyContext"); - m_glXGetCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC) dlsym(m_libGL, "glXGetCurrentContext"); - if (!m_glXChooseFBConfig || !m_glXCreateNewContext || !m_glXCreatePbuffer - || !m_glXDestroyPbuffer || !m_glXMakeCurrent || !m_glXDestroyContext - || !m_glXGetCurrentContext) { - printf("GraphicsContext3D: error looking up bootstrapping entry points\n"); - return; - } int configAttrs[] = { GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, @@ -424,7 +536,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() 0 }; int nelements = 0; - GLXFBConfig* config = m_glXChooseFBConfig(m_display, 0, configAttrs, &nelements); + GLXFBConfig* config = s_gl->chooseFBConfig(0, configAttrs, &nelements); if (!config) { printf("GraphicsContext3D: glXChooseFBConfig failed\n"); return; @@ -434,7 +546,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() XFree(config); return; } - GLXContext context = m_glXCreateNewContext(m_display, config[0], GLX_RGBA_TYPE, 0, True); + GLXContext context = s_gl->createNewContext(config[0], GLX_RGBA_TYPE, 0, True); if (!context) { printf("GraphicsContext3D: glXCreateNewContext failed\n"); XFree(config); @@ -447,13 +559,13 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() 1, 0 }; - GLXPbuffer pbuffer = m_glXCreatePbuffer(m_display, config[0], pbufferAttrs); + GLXPbuffer pbuffer = s_gl->createPbuffer(config[0], pbufferAttrs); XFree(config); if (!pbuffer) { printf("GraphicsContext3D: glxCreatePbuffer failed\n"); return; } - if (!m_glXMakeCurrent(m_display, pbuffer, context)) { + if (!s_gl->makeCurrent(pbuffer, context)) { printf("GraphicsContext3D: glXMakeCurrent failed\n"); return; } @@ -463,8 +575,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() #error Must port to your platform #endif - static bool initializedGLEW = false; - if (!initializedGLEW) { + if (!s_initializedGLEW) { // Initialize GLEW and check for GL 2.0 support by the drivers. GLenum glewInitResult = glewInit(); if (glewInitResult != GLEW_OK) { @@ -475,7 +586,7 @@ GraphicsContext3DInternal::GraphicsContext3DInternal() printf("GraphicsContext3D: OpenGL 2.0 not supported\n"); return; } - initializedGLEW = true; + s_initializedGLEW = true; } } @@ -495,7 +606,7 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal() if (m_resizingBitmap) delete m_resizingBitmap; #endif -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) wglMakeCurrent(0, 0); wglDeleteContext(m_contextObj); ReleaseDC(m_canvasWindow, m_canvasDC); @@ -504,16 +615,12 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal() CGLSetCurrentContext(0); CGLDestroyContext(m_contextObj); CGLDestroyPBuffer(m_pbuffer); - if (m_cgContext) - CGContextRelease(m_cgContext); if (m_renderOutput) delete[] m_renderOutput; -#elif PLATFORM(LINUX) - m_glXMakeCurrent(m_display, 0, 0); - m_glXDestroyContext(m_display, m_contextObj); - m_glXDestroyPbuffer(m_display, m_pbuffer); - XCloseDisplay(m_display); - dlclose(m_libGL); +#elif OS(LINUX) + s_gl->makeCurrent(0, 0); + s_gl->destroyContext(m_contextObj); + s_gl->destroyPbuffer(m_pbuffer); #else #error Must port to your platform #endif @@ -522,7 +629,7 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal() bool GraphicsContext3DInternal::makeContextCurrent() { -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) if (wglGetCurrentContext() != m_contextObj) if (wglMakeCurrent(m_canvasDC, m_contextObj)) return true; @@ -530,9 +637,9 @@ bool GraphicsContext3DInternal::makeContextCurrent() if (CGLGetCurrentContext() != m_contextObj) if (CGLSetCurrentContext(m_contextObj) == kCGLNoError) return true; -#elif PLATFORM(LINUX) - if (m_glXGetCurrentContext() != m_contextObj) - if (m_glXMakeCurrent(m_display, m_pbuffer, m_contextObj)) +#elif OS(LINUX) + if (s_gl->getCurrentContext() != m_contextObj) + if (s_gl->makeCurrent(m_pbuffer, m_contextObj)) return true; #else #error Must port to your platform @@ -594,6 +701,7 @@ void GraphicsContext3DInternal::reshape(int width, int height) glBindTexture(target, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + m_boundFBO = m_fbo; glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthBuffer); glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); @@ -623,20 +731,12 @@ void GraphicsContext3DInternal::reshape(int width, int height) #if PLATFORM(CG) // Need to reallocate the client-side backing store. // FIXME: make this more efficient. - if (m_cgContext) { - CGContextRelease(m_cgContext); - m_cgContext = 0; - } if (m_renderOutput) { delete[] m_renderOutput; m_renderOutput = 0; } int rowBytes = width * 4; m_renderOutput = new unsigned char[height * rowBytes]; - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - m_cgContext = CGBitmapContextCreate(m_renderOutput, width, height, 8, rowBytes, - colorSpace, kCGImageAlphaPremultipliedLast); - CGColorSpaceRelease(colorSpace); #endif // PLATFORM(CG) } @@ -681,6 +781,9 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) HTMLCanvasElement* canvas = context->canvas(); ImageBuffer* imageBuffer = canvas->buffer(); unsigned char* pixels = 0; + bool mustRestoreFBO = (m_boundFBO != m_fbo); + if (mustRestoreFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); #if PLATFORM(SKIA) const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap(); const SkBitmap* readbackBitmap = 0; @@ -721,15 +824,16 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_BYTE, pixels); #elif PLATFORM(CG) if (m_renderOutput) { - ASSERT(CGBitmapContextGetWidth(m_cgContext) == m_cachedWidth); - ASSERT(CGBitmapContextGetHeight(m_cgContext) == m_cachedHeight); pixels = m_renderOutput; - glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels); + glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels); } #else #error Must port to your platform #endif + if (mustRestoreFBO) + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); + #ifdef FLIP_FRAMEBUFFER_VERTICALLY if (pixels) flipVertically(pixels, m_cachedWidth, m_cachedHeight); @@ -745,7 +849,20 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) } #elif PLATFORM(CG) if (m_renderOutput) { - CGImageRef cgImage = CGBitmapContextCreateImage(m_cgContext); + int rowBytes = m_cachedWidth * 4; + CGDataProviderRef dataProvider = CGDataProviderCreateWithData(0, m_renderOutput, rowBytes * m_cachedHeight, 0); + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGImageRef cgImage = CGImageCreate(m_cachedWidth, + m_cachedHeight, + 8, + 32, + rowBytes, + colorSpace, + kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, + dataProvider, + 0, + false, + kCGRenderingIntentDefault); // CSS styling may cause the canvas's content to be resized on // the page. Go back to the Canvas to figure out the correct // width and height to draw. @@ -756,9 +873,13 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context) // rendering results. CGContextSetBlendMode(imageBuffer->context()->platformContext(), kCGBlendModeCopy); + CGContextSetInterpolationQuality(imageBuffer->context()->platformContext(), + kCGInterpolationNone); CGContextDrawImage(imageBuffer->context()->platformContext(), rect, cgImage); CGImageRelease(cgImage); + CGColorSpaceRelease(colorSpace); + CGDataProviderRelease(dataProvider); } #else #error Must port to your platform @@ -788,6 +909,17 @@ void GraphicsContext3DInternal::bindBuffer(unsigned long target, glBindBuffer(target, bufID); } +void GraphicsContext3DInternal::bindFramebuffer(unsigned long target, + WebGLFramebuffer* framebuffer) +{ + makeContextCurrent(); + GLuint id = EXTRACT(framebuffer); + if (!id) + id = m_fbo; + glBindFramebufferEXT(target, id); + m_boundFBO = id; +} + // If we didn't have to hack GL_TEXTURE_WRAP_R for cube maps, // we could just use: // GL_SAME_METHOD_2_X2(BindTexture, bindTexture, unsigned long, WebGLTexture*) @@ -864,6 +996,11 @@ unsigned long GraphicsContext3DInternal::getError() return glGetError(); } +GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes() +{ + return m_attrs; +} + void GraphicsContext3DInternal::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, unsigned long stride, unsigned long offset) { @@ -1012,17 +1149,17 @@ void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 gl##glname(a1, a2, a3, a4, a5, a6, a7, a8); \ } -PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create() +PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs) { - PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D(); + PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D(attrs); // FIXME: add error checking return context; } -GraphicsContext3D::GraphicsContext3D() +GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs) : m_currentWidth(0) , m_currentHeight(0) - , m_internal(new GraphicsContext3DInternal()) + , m_internal(new GraphicsContext3DInternal(attrs)) { } @@ -1190,7 +1327,10 @@ void GraphicsContext3D::bindBuffer(unsigned long target, m_internal->bindBuffer(target, buffer); } -GL_SAME_METHOD_2_X2(BindFramebufferEXT, bindFramebuffer, unsigned long, WebGLFramebuffer*) +void GraphicsContext3D::bindFramebuffer(unsigned long target, WebGLFramebuffer* framebuffer) +{ + m_internal->bindFramebuffer(target, framebuffer); +} GL_SAME_METHOD_2_X2(BindRenderbufferEXT, bindRenderbuffer, unsigned long, WebGLRenderbuffer*) @@ -1448,6 +1588,11 @@ void GraphicsContext3D::getBufferParameteriv(unsigned long target, unsigned long glGetBufferParameteriv(target, pname, value); } +GraphicsContext3D::Attributes GraphicsContext3D::getContextAttributes() +{ + return m_internal->getContextAttributes(); +} + unsigned long GraphicsContext3D::getError() { return m_internal->getError(); @@ -1735,7 +1880,7 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned border, unsigned format, unsigned type, - WebGLArray* pixels) + void* pixels) { // FIXME: must do validation similar to JOGL's to ensure that // the incoming array is of the appropriate length. @@ -1747,25 +1892,10 @@ int GraphicsContext3D::texImage2D(unsigned target, border, format, type, - pixels->baseAddress()); + pixels); return 0; } -int GraphicsContext3D::texImage2D(unsigned target, - unsigned level, - unsigned internalformat, - unsigned width, - unsigned height, - unsigned border, - unsigned format, - unsigned type, - ImageData* pixels) -{ - // FIXME: implement. - notImplemented(); - return -1; -} - // Remove premultiplied alpha from color channels. // FIXME: this is lossy. Must retrieve original values from HTMLImageElement. static void unmultiplyAlpha(unsigned char* rgbaData, int numPixels) @@ -1926,6 +2056,7 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, colorSpace, kCGImageAlphaPremultipliedLast); CGColorSpaceRelease(colorSpace); + CGContextSetBlendMode(tmpContext, kCGBlendModeCopy); CGContextDrawImage(tmpContext, CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)), cgImage); @@ -1939,14 +2070,6 @@ int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image, return res; } -int GraphicsContext3D::texImage2D(unsigned target, unsigned level, HTMLVideoElement* video, - bool flipY, bool premultiplyAlpha) -{ - // FIXME: implement. - notImplemented(); - return -1; -} - GL_SAME_METHOD_3(TexParameterf, texParameterf, unsigned, unsigned, float); GL_SAME_METHOD_3(TexParameteri, texParameteri, unsigned, unsigned, int); @@ -1959,34 +2082,16 @@ int GraphicsContext3D::texSubImage2D(unsigned target, unsigned height, unsigned format, unsigned type, - WebGLArray* pixels) + void* pixels) { - // FIXME: implement. - notImplemented(); - return -1; -} - -int GraphicsContext3D::texSubImage2D(unsigned target, - unsigned level, - unsigned xoffset, - unsigned yoffset, - unsigned width, - unsigned height, - unsigned format, - unsigned type, - ImageData* pixels) -{ - // FIXME: implement. - notImplemented(); - return -1; + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + return 0; } int GraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, - unsigned width, - unsigned height, Image* image, bool flipY, bool premultiplyAlpha) @@ -1996,21 +2101,6 @@ int GraphicsContext3D::texSubImage2D(unsigned target, return -1; } -int GraphicsContext3D::texSubImage2D(unsigned target, - unsigned level, - unsigned xoffset, - unsigned yoffset, - unsigned width, - unsigned height, - HTMLVideoElement* video, - bool flipY, - bool premultiplyAlpha) -{ - // FIXME: implement. - notImplemented(); - return -1; -} - GL_SAME_METHOD_2(Uniform1f, uniform1f, long, float) void GraphicsContext3D::uniform1fv(long location, float* v, int size) diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp index 1121931..4e01848 100644 --- a/WebKit/chromium/src/LocalizedStrings.cpp +++ b/WebKit/chromium/src/LocalizedStrings.cpp @@ -165,6 +165,16 @@ String AXLinkActionVerb() return query(WebLocalizedString::AXLinkActionVerb); } +String AXMenuListPopupActionVerb() +{ + return String(); +} + +String AXMenuListActionVerb() +{ + return String(); +} + String multipleFileUploadText(unsigned numberOfFiles) { return query(WebLocalizedString::MultipleFileUploadText, numberOfFiles); diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp index 6b22319..a38b8b5 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.cpp +++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp @@ -33,12 +33,15 @@ #if ENABLE(NOTIFICATIONS) +#include "Document.h" #include "Notification.h" #include "SecurityOrigin.h" +#include "WebDocument.h" #include "WebNotification.h" #include "WebNotificationPermissionCallback.h" #include "WebNotificationPresenter.h" +#include "WebURL.h" #include <wtf/PassRefPtr.h> @@ -89,9 +92,13 @@ void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); } -NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(SecurityOrigin* origin) +NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& url, Document* document) { - int result = m_presenter->checkPermission(origin->toString()); + WebDocument webDocument; + if (document) + webDocument = document; + + int result = m_presenter->checkPermission(url, document ? &webDocument : 0); return static_cast<NotificationPresenter::Permission>(result); } diff --git a/WebKit/chromium/src/NotificationPresenterImpl.h b/WebKit/chromium/src/NotificationPresenterImpl.h index 4afe9dc..8e3799c 100644 --- a/WebKit/chromium/src/NotificationPresenterImpl.h +++ b/WebKit/chromium/src/NotificationPresenterImpl.h @@ -54,7 +54,7 @@ public: virtual bool show(WebCore::Notification* object); virtual void cancel(WebCore::Notification* object); virtual void notificationObjectDestroyed(WebCore::Notification* object); - virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin); + virtual WebCore::NotificationPresenter::Permission checkPermission(const WebCore::KURL& url, WebCore::Document* document); virtual void requestPermission(WebCore::SecurityOrigin* origin, WTF::PassRefPtr<WebCore::VoidCallback> callback); private: diff --git a/WebKit/chromium/src/PlatformMessagePortChannel.cpp b/WebKit/chromium/src/PlatformMessagePortChannel.cpp index f8c41d3..aa42a10 100644 --- a/WebKit/chromium/src/PlatformMessagePortChannel.cpp +++ b/WebKit/chromium/src/PlatformMessagePortChannel.cpp @@ -179,7 +179,7 @@ void PlatformMessagePortChannel::postMessageToRemote(PassOwnPtr<MessagePortChann if (!m_localPort || !m_webChannel) return; - WebString messageString = message->message()->toString(); + WebString messageString = message->message()->toWireString(); OwnPtr<WebCore::MessagePortChannelArray> channels = message->channels(); WebMessagePortChannelArray* webChannels = 0; if (channels.get() && channels->size()) { @@ -211,7 +211,7 @@ bool PlatformMessagePortChannel::tryGetMessageFromRemote(OwnPtr<MessagePortChann (*channels)[i] = MessagePortChannel::create(platformChannel); } } - RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::create(message); + RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::createFromWire(message); result = MessagePortChannel::EventData::create(serializedMessage.release(), channels.release()); } diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp index 551507f..c9185fe 100644 --- a/WebKit/chromium/src/StorageAreaProxy.cpp +++ b/WebKit/chromium/src/StorageAreaProxy.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All Rights Reserved. + * (C) 2008 Apple Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,11 +29,16 @@ #if ENABLE(DOM_STORAGE) +#include "DOMWindow.h" #include "Document.h" +#include "EventNames.h" #include "ExceptionCode.h" #include "Frame.h" +#include "Page.h" +#include "PageGroup.h" #include "SecurityOrigin.h" #include "StorageAreaImpl.h" +#include "StorageEvent.h" #include "WebStorageArea.h" #include "WebString.h" @@ -40,8 +46,9 @@ namespace WebCore { -StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea) +StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea, StorageType storageType) : m_storageArea(storageArea) + , m_storageType(storageType) { } @@ -64,21 +71,34 @@ String StorageAreaProxy::getItem(const String& key) const return m_storageArea->getItem(key); } -void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) +String StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) { bool quotaException = false; - m_storageArea->setItem(key, value, frame->document()->url(), quotaException); + WebKit::WebString oldValue; + m_storageArea->setItem(key, value, frame->document()->url(), quotaException, oldValue); ec = quotaException ? QUOTA_EXCEEDED_ERR : 0; + String oldValueString = oldValue; + if (oldValueString != value) + storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame); + return oldValue; } -void StorageAreaProxy::removeItem(const String& key, Frame* frame) +String StorageAreaProxy::removeItem(const String& key, Frame* frame) { - m_storageArea->removeItem(key, frame->document()->url()); + WebKit::WebString oldValue; + m_storageArea->removeItem(key, frame->document()->url(), oldValue); + if (!oldValue.isNull()) + storageEvent(key, oldValue, String(), m_storageType, frame->document()->securityOrigin(), frame); + return oldValue; } -void StorageAreaProxy::clear(Frame* frame) +bool StorageAreaProxy::clear(Frame* frame) { - m_storageArea->clear(frame->document()->url()); + bool clearedSomething; + m_storageArea->clear(frame->document()->url(), clearedSomething); + if (clearedSomething) + storageEvent(String(), String(), String(), m_storageType, frame->document()->securityOrigin(), frame); + return clearedSomething; } bool StorageAreaProxy::contains(const String& key) const @@ -86,6 +106,41 @@ bool StorageAreaProxy::contains(const String& key) const return !getItem(key).isNull(); } +// Copied from WebCore/storage/StorageEventDispatcher.cpp out of necessity. It's probably best to keep it current. +void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Frame* sourceFrame) +{ + Page* page = sourceFrame->page(); + if (!page) + return; + + // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree + // of any given page in the group or mutate the page group itself. + Vector<RefPtr<Frame> > frames; + if (storageType == SessionStorage) { + // Send events only to our page. + for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) { + if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin)) + frames.append(frame); + } + + for (unsigned i = 0; i < frames.size(); ++i) + frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage())); + } else { + // Send events to every page. + const HashSet<Page*>& pages = page->group().pages(); + HashSet<Page*>::const_iterator end = pages.end(); + for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) { + for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) { + if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin)) + frames.append(frame); + } + } + + for (unsigned i = 0; i < frames.size(); ++i) + frames[i]->document()->enqueueStorageEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->localStorage())); + } +} + } // namespace WebCore #endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/StorageAreaProxy.h b/WebKit/chromium/src/StorageAreaProxy.h index 5d09d82..b169828 100644 --- a/WebKit/chromium/src/StorageAreaProxy.h +++ b/WebKit/chromium/src/StorageAreaProxy.h @@ -34,22 +34,28 @@ namespace WebKit { class WebStorageArea; } namespace WebCore { +class Frame; +class SecurityOrigin; + class StorageAreaProxy : public StorageArea { public: - StorageAreaProxy(WebKit::WebStorageArea* storageArea); + StorageAreaProxy(WebKit::WebStorageArea*, StorageType); virtual ~StorageAreaProxy(); // The HTML5 DOM Storage API virtual unsigned length() const; virtual String key(unsigned index) const; virtual String getItem(const String& key) const; - virtual void setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame); - virtual void removeItem(const String& key, Frame* sourceFrame); - virtual void clear(Frame* sourceFrame); + virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame); + virtual String removeItem(const String& key, Frame* sourceFrame); + virtual bool clear(Frame* sourceFrame); virtual bool contains(const String& key) const; private: + void storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame); + OwnPtr<WebKit::WebStorageArea> m_storageArea; + StorageType m_storageType; }; } // namespace WebCore diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp index e22bbef..1be1967 100644 --- a/WebKit/chromium/src/StorageNamespaceProxy.cpp +++ b/WebKit/chromium/src/StorageNamespaceProxy.cpp @@ -28,27 +28,35 @@ #if ENABLE(DOM_STORAGE) +#include "Chrome.h" +#include "ChromeClientImpl.h" +#include "Page.h" #include "SecurityOrigin.h" #include "StorageAreaProxy.h" #include "WebKit.h" #include "WebKitClient.h" #include "WebStorageNamespace.h" #include "WebString.h" +#include "WebViewClient.h" +#include "WebViewImpl.h" namespace WebCore { PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path, unsigned quota) { - return new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota)); + return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota), LocalStorage)); } -PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace() +PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page) { - return new StorageNamespaceProxy(WebKit::webKitClient()->createSessionStorageNamespace()); + WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client()); + WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client(); + return adoptRef(new StorageNamespaceProxy(webViewClient->createSessionStorageNamespace(), SessionStorage)); } -StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace) +StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace, StorageType storageType) : m_storageNamespace(storageNamespace) + , m_storageType(storageType) { } @@ -58,12 +66,19 @@ StorageNamespaceProxy::~StorageNamespaceProxy() PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy() { - return adoptRef(new StorageNamespaceProxy(m_storageNamespace->copy())); + ASSERT(m_storageType == SessionStorage); + // The WebViewClient knows what its session storage namespace id is but we + // do not. Returning 0 here causes it to be fetched (via the WebViewClient) + // on its next use. Note that it is WebViewClient::createView's + // responsibility to clone the session storage namespace id and that the + // only time copy() is called is directly after the createView call...which + // is why all of this is safe. + return 0; } PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOrigin> origin) { - return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString()))); + return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString()), m_storageType)); } void StorageNamespaceProxy::close() diff --git a/WebKit/chromium/src/StorageNamespaceProxy.h b/WebKit/chromium/src/StorageNamespaceProxy.h index 9ff624b..28d7a23 100644 --- a/WebKit/chromium/src/StorageNamespaceProxy.h +++ b/WebKit/chromium/src/StorageNamespaceProxy.h @@ -28,6 +28,7 @@ #if ENABLE(DOM_STORAGE) +#include "StorageArea.h" #include "StorageNamespace.h" namespace WebKit { class WebStorageNamespace; } @@ -36,7 +37,7 @@ namespace WebCore { class StorageNamespaceProxy : public StorageNamespace { public: - StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace); + StorageNamespaceProxy(WebKit::WebStorageNamespace*, StorageType); virtual ~StorageNamespaceProxy(); virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>); virtual PassRefPtr<StorageNamespace> copy(); @@ -45,6 +46,7 @@ public: private: OwnPtr<WebKit::WebStorageNamespace> m_storageNamespace; + StorageType m_storageType; }; } // namespace WebCore diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp index bdbd260..c386d44 100644 --- a/WebKit/chromium/src/WebAccessibilityObject.cpp +++ b/WebKit/chromium/src/WebAccessibilityObject.cpp @@ -231,13 +231,13 @@ bool WebAccessibilityObject::isIndeterminate() const return m_private->isIndeterminate(); } -bool WebAccessibilityObject::isMultiSelect() const +bool WebAccessibilityObject::isMultiSelectable() const { if (!m_private) return 0; m_private->updateBackingStore(); - return m_private->isMultiSelect(); + return m_private->isMultiSelectable(); } bool WebAccessibilityObject::isOffScreen() const diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.cpp b/WebKit/chromium/src/WebAnimationControllerImpl.cpp new file mode 100644 index 0000000..32a7a61 --- /dev/null +++ b/WebKit/chromium/src/WebAnimationControllerImpl.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebAnimationControllerImpl.h" + +#include "AnimationController.h" +#include "Element.h" + +#include "WebElement.h" +#include "WebFrameImpl.h" +#include "WebString.h" + +using namespace WebCore; + +namespace WebKit { + +WebAnimationControllerImpl::WebAnimationControllerImpl(WebFrameImpl* frameImpl) + : m_frameImpl(frameImpl) +{ + ASSERT(m_frameImpl); +} + +AnimationController* WebAnimationControllerImpl::animationController() const +{ + if (!m_frameImpl->frame()) + return 0; + return m_frameImpl->frame()->animation(); +} + +bool WebAnimationControllerImpl::pauseAnimationAtTime(WebElement& element, + const WebString& animationName, + double time) +{ + AnimationController* controller = animationController(); + if (!controller) + return 0; + return controller->pauseAnimationAtTime(PassRefPtr<Element>(element)->renderer(), + animationName, + time); +} + +bool WebAnimationControllerImpl::pauseTransitionAtTime(WebElement& element, + const WebString& propertyName, + double time) +{ + AnimationController* controller = animationController(); + if (!controller) + return 0; + return controller->pauseTransitionAtTime(PassRefPtr<Element>(element)->renderer(), + propertyName, + time); +} + +unsigned WebAnimationControllerImpl::numberOfActiveAnimations() const +{ + AnimationController* controller = animationController(); + if (!controller) + return 0; + return controller->numberOfActiveAnimations(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.h b/WebKit/chromium/src/WebAnimationControllerImpl.h new file mode 100644 index 0000000..8b0676e --- /dev/null +++ b/WebKit/chromium/src/WebAnimationControllerImpl.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebAnimationControllerImpl_h +#define WebAnimationControllerImpl_h + +// FIXME: This relative path is a temporary hack to support using this +// header from webkit/glue. +#include "../public/WebAnimationController.h" + +namespace WebCore { +class AnimationController; +} + +namespace WebKit { +class WebFrameImpl; + +class WebAnimationControllerImpl : public WebAnimationController { +public: + explicit WebAnimationControllerImpl(WebFrameImpl*); + virtual ~WebAnimationControllerImpl() { } + + virtual bool pauseAnimationAtTime(WebElement&, + const WebString& animationName, + double time); + virtual bool pauseTransitionAtTime(WebElement&, + const WebString& propertyName, + double time); + virtual unsigned numberOfActiveAnimations() const; +private: + WebFrameImpl* m_frameImpl; + WebCore::AnimationController* animationController() const; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp index 0bc67b6..04f2f85 100644 --- a/WebKit/chromium/src/WebBindings.cpp +++ b/WebKit/chromium/src/WebBindings.cpp @@ -44,9 +44,12 @@ #include "MouseEvent.h" #include "NPV8Object.h" // for PrivateIdentifier #include "Range.h" +#include "V8BindingState.h" #include "V8DOMWrapper.h" +#include "V8Event.h" #include "V8Helpers.h" #include "V8Proxy.h" +#include "V8Range.h" #elif USE(JSC) #include "bridge/c/c_utility.h" #endif @@ -223,20 +226,20 @@ static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data) // Get the current WebCore event. v8::Handle<v8::Value> currentEvent(getEvent(context)); - Event* event = V8DOMWrapper::convertToNativeEvent(currentEvent); + Event* event = V8Event::toNative(v8::Handle<v8::Object>::Cast(currentEvent)); if (!event) return false; // Check that the given npobj is that event. V8NPObject* object = reinterpret_cast<V8NPObject*>(npobj); - Event* given = V8DOMWrapper::convertToNativeEvent(object->v8Object); + Event* given = V8Event::toNative(object->v8Object); if (given != event) return false; // Check the execution frames are same origin. V8Proxy* current = V8Proxy::retrieve(V8Proxy::retrieveFrameForCurrentContext()); Frame* frame = V8Proxy::retrieveFrame(context); - if (!current || !current->canAccessFrame(frame, false)) + if (!current || !V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, false)) return false; const EventNames& names(eventNames()); @@ -284,7 +287,7 @@ static bool getRangeImpl(NPObject* npobj, WebRange* range) if (V8ClassIndex::RANGE != V8DOMWrapper::domWrapperType(v8object)) return false; - Range* native = V8DOMWrapper::convertToNativeObject<WebCore::Range>(V8ClassIndex::RANGE, v8object); + Range* native = V8Range::toNative(v8object); if (!native) return false; diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp index 456706a..5a315cf 100644 --- a/WebKit/chromium/src/WebDataSourceImpl.cpp +++ b/WebKit/chromium/src/WebDataSourceImpl.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "WebDataSourceImpl.h" +#include "ApplicationCacheHostInternal.h" #include "WebURL.h" #include "WebURLError.h" #include "WebVector.h" @@ -108,6 +109,14 @@ void WebDataSourceImpl::setExtraData(ExtraData* extraData) m_extraData.set(extraData); } +WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() { +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + return ApplicationCacheHostInternal::toWebApplicationCacheHost(DocumentLoader::applicationCacheHost()); +#else + return 0; +#endif +} + WebNavigationType WebDataSourceImpl::toWebNavigationType(NavigationType type) { switch (type) { diff --git a/WebKit/chromium/src/WebDataSourceImpl.h b/WebKit/chromium/src/WebDataSourceImpl.h index 8860fe4..f868e95 100644 --- a/WebKit/chromium/src/WebDataSourceImpl.h +++ b/WebKit/chromium/src/WebDataSourceImpl.h @@ -46,7 +46,6 @@ #include <wtf/PassOwnPtr.h> #include <wtf/Vector.h> - namespace WebKit { class WebPluginLoadObserver; @@ -73,6 +72,7 @@ public: virtual double triggeringEventTime() const; virtual ExtraData* extraData() const; virtual void setExtraData(ExtraData*); + virtual WebApplicationCacheHost* applicationCacheHost(); static WebNavigationType toWebNavigationType(WebCore::NavigationType type); diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp new file mode 100644 index 0000000..84f3004 --- /dev/null +++ b/WebKit/chromium/src/WebDocument.cpp @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebDocument.h" + +#include "Document.h" +#include "DocumentLoader.h" +#include "Element.h" +#include "HTMLAllCollection.h" +#include "HTMLBodyElement.h" +#include "HTMLCollection.h" +#include "HTMLElement.h" +#include "HTMLHeadElement.h" +#include "NodeList.h" + +#include "WebElement.h" +#include "WebFrameImpl.h" +#include "WebNodeCollection.h" +#include "WebURL.h" + +#include <wtf/PassRefPtr.h> + +using namespace WebCore; + +namespace WebKit { + +WebDocument::WebDocument(const PassRefPtr<Document>& elem) + : WebNode(elem.releaseRef()) +{ +} + +WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) +{ + WebNode::assign(elem.releaseRef()); + return *this; +} + +WebDocument::operator PassRefPtr<Document>() const +{ + return PassRefPtr<Document>(static_cast<Document*>(m_private)); +} + +WebFrame* WebDocument::frame() const +{ + return WebFrameImpl::fromFrame(constUnwrap<Document>()->frame()); +} + +bool WebDocument::isHTMLDocument() const +{ + return constUnwrap<Document>()->isHTMLDocument(); +} + +WebURL WebDocument::baseURL() const +{ + return constUnwrap<Document>()->baseURL(); +} + +WebElement WebDocument::documentElement() const +{ + return WebElement(constUnwrap<Document>()->documentElement()); +} + +WebElement WebDocument::body() const +{ + return WebElement(constUnwrap<Document>()->body()); +} + +WebElement WebDocument::head() +{ + return WebElement(unwrap<Document>()->head()); +} + +WebNodeCollection WebDocument::all() +{ + return WebNodeCollection(unwrap<Document>()->all()); +} + +WebURL WebDocument::completeURL(const WebString& partialURL) const +{ + return constUnwrap<Document>()->completeURL(partialURL); +} + +WebElement WebDocument::getElementById(const WebString& id) const +{ + return WebElement(constUnwrap<Document>()->getElementById(id)); +} + +WebString WebDocument::applicationID() const +{ + const char* kChromeApplicationHeader = "x-chrome-application"; + + // First check if the document's response included a header indicating the + // application it should go with. + const Document* document = constUnwrap<Document>(); + Frame* frame = document->frame(); + if (!frame) + return WebString(); + + DocumentLoader* loader = frame->loader()->documentLoader(); + if (!loader) + return WebString(); + + WebString headerValue = + loader->response().httpHeaderField(kChromeApplicationHeader); + if (!headerValue.isEmpty()) + return headerValue; + + // Otherwise, fall back to looking for the meta tag. + RefPtr<NodeList> metaTags = + const_cast<Document*>(document)->getElementsByTagName("meta"); + for (unsigned i = 0; i < metaTags->length(); ++i) { + Element* element = static_cast<Element*>(metaTags->item(i)); + if (element->getAttribute("http-equiv").lower() == + kChromeApplicationHeader) { + return element->getAttribute("value"); + } + } + + return WebString(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp index 4af1119..3bd4a02 100644 --- a/WebKit/chromium/src/WebDragData.cpp +++ b/WebKit/chromium/src/WebDragData.cpp @@ -88,6 +88,18 @@ void WebDragData::setURLTitle(const WebString& urlTitle) m_private->urlTitle = urlTitle; } +WebURL WebDragData::downloadURL() const +{ + ASSERT(!isNull()); + return m_private->downloadURL; +} + +void WebDragData::setDownloadURL(const WebURL& downloadURL) +{ + ensureMutable(); + m_private->downloadURL = downloadURL; +} + WebString WebDragData::fileExtension() const { ASSERT(!isNull()); diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp index 3f13ee1..d0a0862 100644 --- a/WebKit/chromium/src/WebElement.cpp +++ b/WebKit/chromium/src/WebElement.cpp @@ -54,5 +54,38 @@ WebElement::operator WTF::PassRefPtr<Element>() const return PassRefPtr<Element>(static_cast<Element*>(m_private)); } +WebString WebElement::tagName() const +{ + return constUnwrap<Element>()->tagName(); +} + +bool WebElement::hasTagName(const WebString& tagName) const +{ + return equalIgnoringCase(constUnwrap<Element>()->tagName(), + tagName.operator WebCore::String()); +} + +bool WebElement::hasAttribute(const WebString& attrName) const +{ + return constUnwrap<Element>()->hasAttribute(attrName); +} + +WebString WebElement::getAttribute(const WebString& attrName) const +{ + return constUnwrap<Element>()->getAttribute(attrName); +} + +bool WebElement::setAttribute(const WebString& attrName, const WebString& attrValue) +{ + ExceptionCode exceptionCode = 0; + unwrap<Element>()->setAttribute(attrName, attrValue, exceptionCode); + return !exceptionCode; +} + +WebString WebElement::innerText() const +{ + return constUnwrap<Element>()->innerText(); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp new file mode 100644 index 0000000..b9143d9 --- /dev/null +++ b/WebKit/chromium/src/WebEntities.cpp @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebEntities.h" + +#include <string.h> + +#include "PlatformString.h" +#include "StringBuilder.h" +#include <wtf/HashMap.h> + +#include "WebString.h" + +using namespace WebCore; + +namespace { +// Note that this file is also included by HTMLTokenizer.cpp so we are getting +// two copies of the data in memory. We can fix this by changing the script +// that generated the array to create a static const that is its length, but +// this is low priority since the data is less than 4K. We use anonymous +// namespace to prevent name collisions. +#include "HTMLEntityNames.c" // NOLINT +} + +namespace WebKit { + +void populateMap(WTF::HashMap<int, WebCore::String>& map, + const Entity* entities, + size_t entitiesCount, + bool standardHTML) +{ + ASSERT(map.isEmpty()); + const Entity* entity = &entities[0]; + for (size_t i = 0; i < entitiesCount; i++, entity++) { + int code = entity->code; + String name = entity->name; + // For consistency, use the lowe case for entities that have both. + if (map.contains(code) && map.get(code) == name.lower()) + continue; + // Don't register %, ⊅ and &supl;. + if (standardHTML && (code == '%' || code == 0x2285 || code == 0x00b9)) + continue; + map.set(code, name); + } + if (standardHTML) + map.set(static_cast<int>(0x0027), String("#39")); +} + +static const Entity xmlBuiltInEntityCodes[] = { + { "lt", 0x003c }, + { "gt", 0x003e }, + { "amp", 0x0026 }, + { "apos", 0x0027 }, + { "quot", 0x0022 } +}; + +WebEntities::WebEntities(bool xmlEntities) +{ + if (xmlEntities) + populateMap(m_entitiesMap, + xmlBuiltInEntityCodes, + sizeof(xmlBuiltInEntityCodes) / sizeof(Entity), + false); + else + populateMap(m_entitiesMap, + wordlist, + sizeof(wordlist) / sizeof(Entity), + true); +} + +String WebEntities::entityNameByCode(int code) const +{ + if (m_entitiesMap.contains(code)) + return m_entitiesMap.get(code); + return ""; +} + +String WebEntities::convertEntitiesInString(const String& value) const +{ + unsigned len = value.length(); + const UChar* startPos = value.characters(); + const UChar* curPos = startPos; + + // FIXME: Optimize - create StringBuilder only if value has any entities. + StringBuilder result; + while (len--) { + if (m_entitiesMap.contains(*curPos)) { + // Append content before entity code. + if (curPos > startPos) + result.append(String(startPos, curPos - startPos)); + result.append("&"); + result.append(m_entitiesMap.get(*curPos)); + result.append(";"); + startPos = ++curPos; + } else + curPos++; + } + // Append the remaining content. + if (curPos > startPos) + result.append(String(startPos, curPos - startPos)); + + return result.toString(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebEntities.h b/WebKit/chromium/src/WebEntities.h new file mode 100644 index 0000000..ad3c310 --- /dev/null +++ b/WebKit/chromium/src/WebEntities.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebEntities_h +#define WebEntities_h + +#include "PlatformString.h" +#include <wtf/HashMap.h> + +namespace WebKit { + +class WebEntities { +public: + // ', %, ⊅, &supl; are not defined by the HTML standards. + // - IE does not support ' as an HTML entity (but support it as an XML + // entity.) + // - Firefox supports ' as an HTML entity. + // - Both of IE and Firefox don't support %, ⊅ and &supl;. + // + // A web page saved by Chromium should be able to be read by other browsers + // such as IE and Firefox. Chromium should produce only the standard entity + // references which other browsers can recognize. + // So if standard_html_entities_ is true, we will use a numeric character + // reference for ', and don't use entity references for %, ⊅ + // and &supl; for serialization. + // + // If xmlEntities is true, WebEntities will only contain standard XML + // entities. + explicit WebEntities(bool xmlEntities); + + // Check whether specified unicode has corresponding html or xml built-in + // entity name. If yes, return the entity notation. If not, returns an + // empty string. Parameter isHTML indicates check the code in html entity + // map or in xml entity map. + WebCore::String entityNameByCode(int code) const; + + // Returns a new string with corresponding entity names replaced. + WebCore::String convertEntitiesInString(const WebCore::String&) const; +private: + typedef HashMap<int, WebCore::String> EntitiesMapType; + // An internal object that maps the Unicode character to corresponding + // entity notation. + EntitiesMapType m_entitiesMap; +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/src/WebEvent.cpp b/WebKit/chromium/src/WebEvent.cpp new file mode 100644 index 0000000..8c68959 --- /dev/null +++ b/WebKit/chromium/src/WebEvent.cpp @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebEvent.h" + +#include "Event.h" +#include "Node.h" +#include <wtf/PassRefPtr.h> + +namespace WebKit { + +class WebEventPrivate : public WebCore::Event { +}; + +void WebEvent::reset() +{ + assign(0); +} + +void WebEvent::assign(const WebEvent& other) +{ + WebEventPrivate* p = const_cast<WebEventPrivate*>(other.m_private); + if (p) + p->ref(); + assign(p); +} + +void WebEvent::assign(WebEventPrivate* p) +{ + // p is already ref'd for us by the caller + if (m_private) + m_private->deref(); + m_private = p; +} + +WebEvent::WebEvent(const WTF::PassRefPtr<WebCore::Event>& event) + : m_private(static_cast<WebEventPrivate*>(event.releaseRef())) +{ +} + +WebString WebEvent::type() const +{ + ASSERT(m_private); + return m_private->type(); +} + +WebNode WebEvent::target() const +{ + ASSERT(m_private); + return WebNode(m_private->target()->toNode()); +} + +WebNode WebEvent::currentTarget() const +{ + ASSERT(m_private); + return WebNode(m_private->currentTarget()->toNode()); +} + +WebEvent::PhaseType WebEvent::eventPhase() const +{ + ASSERT(m_private); + return static_cast<WebEvent::PhaseType>(m_private->eventPhase()); +} + +bool WebEvent::bubbles() const +{ + ASSERT(m_private); + return m_private->bubbles(); +} + +bool WebEvent::cancelable() const +{ + ASSERT(m_private); + return m_private->cancelable(); +} + +bool WebEvent::isUIEvent() const +{ + ASSERT(m_private); + return m_private->isUIEvent(); +} + +bool WebEvent::isMouseEvent() const +{ + ASSERT(m_private); + return m_private->isMouseEvent(); +} + +bool WebEvent::isMutationEvent() const +{ + ASSERT(m_private); + return m_private->isMutationEvent(); +} + +bool WebEvent::isKeyboardEvent() const +{ + ASSERT(m_private); + return m_private->isKeyboardEvent(); +} + +bool WebEvent::isTextEvent() const +{ + ASSERT(m_private); + return m_private->isTextEvent(); +} + +bool WebEvent::isCompositionEvent() const +{ + ASSERT(m_private); + return m_private->isCompositionEvent(); +} + +bool WebEvent::isDragEvent() const +{ + ASSERT(m_private); + return m_private->isDragEvent(); +} + +bool WebEvent::isClipboardEvent() const +{ + ASSERT(m_private); + return m_private->isClipboardEvent(); +} + +bool WebEvent::isMessageEvent() const +{ + ASSERT(m_private); + return m_private->isMessageEvent(); +} + +bool WebEvent::isWheelEvent() const +{ + ASSERT(m_private); + return m_private->isWheelEvent(); +} + +bool WebEvent::isBeforeTextInsertedEvent() const +{ + ASSERT(m_private); + return m_private->isBeforeTextInsertedEvent(); +} + +bool WebEvent::isOverflowEvent() const +{ + ASSERT(m_private); + return m_private->isOverflowEvent(); +} + +bool WebEvent::isPageTransitionEvent() const +{ + ASSERT(m_private); + return m_private->isPageTransitionEvent(); +} + +bool WebEvent::isPopStateEvent() const +{ + ASSERT(m_private); + return m_private->isPopStateEvent(); +} + +bool WebEvent::isProgressEvent() const +{ + ASSERT(m_private); + return m_private->isProgressEvent(); +} + +bool WebEvent::isXMLHttpRequestProgressEvent() const +{ + ASSERT(m_private); + return m_private->isXMLHttpRequestProgressEvent(); +} + +bool WebEvent::isWebKitAnimationEvent() const +{ + ASSERT(m_private); + return m_private->isWebKitAnimationEvent(); +} + +bool WebEvent::isWebKitTransitionEvent() const +{ + ASSERT(m_private); + return m_private->isWebKitTransitionEvent(); +} + +bool WebEvent::isBeforeLoadEvent() const +{ + ASSERT(m_private); + return m_private->isBeforeLoadEvent(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebEventListener.cpp b/WebKit/chromium/src/WebEventListener.cpp new file mode 100644 index 0000000..8d9a887 --- /dev/null +++ b/WebKit/chromium/src/WebEventListener.cpp @@ -0,0 +1,64 @@ +/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebEventListener.h"
+
+#include "WebEventListenerPrivate.h"
+
+namespace WebKit {
+
+WebEventListener::WebEventListener()
+ : m_private(new WebEventListenerPrivate(this))
+{
+}
+
+WebEventListener::~WebEventListener()
+{
+ m_private->webEventListenerDeleted();
+ delete m_private;
+}
+
+void WebEventListener::notifyEventListenerDeleted(EventListenerWrapper* wrapper)
+{
+ m_private->eventListenerDeleted(wrapper);
+}
+
+EventListenerWrapper* WebEventListener::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->createEventListenerWrapper(eventType, useCapture, node);
+}
+
+EventListenerWrapper* WebEventListener::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->getEventListenerWrapper(eventType, useCapture, node);
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.cpp b/WebKit/chromium/src/WebEventListenerPrivate.cpp new file mode 100644 index 0000000..bd14baf --- /dev/null +++ b/WebKit/chromium/src/WebEventListenerPrivate.cpp @@ -0,0 +1,87 @@ +/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebEventListenerPrivate.h"
+
+#include "EventListenerWrapper.h"
+#include "WebEventListener.h"
+
+namespace WebKit {
+
+WebEventListenerPrivate::WebEventListenerPrivate(WebEventListener* webEventListener)
+ : m_webEventListener(webEventListener)
+{
+}
+
+WebEventListenerPrivate::~WebEventListenerPrivate()
+{
+}
+
+EventListenerWrapper* WebEventListenerPrivate::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ EventListenerWrapper* listenerWrapper = new EventListenerWrapper(m_webEventListener);
+ WebEventListenerPrivate::ListenerInfo listenerInfo(eventType, useCapture, listenerWrapper, node);
+ m_listenerWrappers.append(listenerInfo);
+ return listenerWrapper;
+}
+
+EventListenerWrapper* WebEventListenerPrivate::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) {
+ if (iter->node == node)
+ return iter->eventListenerWrapper;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebEventListenerPrivate::webEventListenerDeleted()
+{
+ // Notifies all WebEventListenerWrappers that we are going away so they can
+ // invalidate their pointer to us.
+ Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter)
+ iter->eventListenerWrapper->webEventListenerDeleted();
+}
+
+void WebEventListenerPrivate::eventListenerDeleted(EventListenerWrapper* eventListener)
+{
+ for (size_t i = 0; i < m_listenerWrappers.size(); ++i) {
+ if (m_listenerWrappers[i].eventListenerWrapper == eventListener) {
+ m_listenerWrappers.remove(i);
+ return;
+ }
+ }
+ ASSERT_NOT_REACHED();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.h b/WebKit/chromium/src/WebEventListenerPrivate.h new file mode 100644 index 0000000..0ba2b5d --- /dev/null +++ b/WebKit/chromium/src/WebEventListenerPrivate.h @@ -0,0 +1,95 @@ +/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebEventListenerPrivate_h
+#define WebEventListenerPrivate_h
+
+#include "WebString.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+class Node;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebEventListener;
+
+class WebEventListenerPrivate {
+public:
+ WebEventListenerPrivate(WebEventListener* webEventListener);
+ ~WebEventListenerPrivate();
+
+ EventListenerWrapper* createEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Gets the ListenerEventWrapper for a specific node.
+ // Used by WebNode::removeEventListener().
+ EventListenerWrapper* getEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Called by the WebEventListener when it is about to be deleted.
+ void webEventListenerDeleted();
+
+ // Called by the EventListenerWrapper when it is about to be deleted.
+ void eventListenerDeleted(EventListenerWrapper* eventListener);
+
+ struct ListenerInfo {
+ ListenerInfo(const WebString& eventType, bool useCapture,
+ EventListenerWrapper* eventListenerWrapper,
+ Node* node)
+ : eventType(eventType)
+ , useCapture(useCapture)
+ , eventListenerWrapper(eventListenerWrapper)
+ , node(node)
+ {
+ }
+
+ WebString eventType;
+ bool useCapture;
+ EventListenerWrapper* eventListenerWrapper;
+ Node* node;
+ };
+
+private:
+ WebEventListener* m_webEventListener;
+
+ // We keep a list of the wrapper for the WebKit EventListener, it is needed
+ // to implement WebNode::removeEventListener().
+ Vector<ListenerInfo> m_listenerWrappers;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp index ab6769f..28c27cc 100644 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ b/WebKit/chromium/src/WebFrameImpl.cpp @@ -84,7 +84,6 @@ #include "Editor.h" #include "EventHandler.h" #include "FormState.h" -#include "FrameChromium.h" #include "FrameLoader.h" #include "FrameLoadRequest.h" #include "FrameTree.h" @@ -104,6 +103,7 @@ #include "PlatformContextSkia.h" #include "PrintContext.h" #include "RenderFrame.h" +#include "RenderTreeAsText.h" #include "RenderView.h" #include "RenderWidget.h" #include "ReplaceSelectionCommand.h" @@ -120,8 +120,10 @@ #include "SubstituteData.h" #include "TextAffinity.h" #include "TextIterator.h" +#include "WebAnimationControllerImpl.h" #include "WebConsoleMessage.h" #include "WebDataSourceImpl.h" +#include "WebDocument.h" #include "WebFindOptions.h" #include "WebFormElement.h" #include "WebFrameClient.h" @@ -142,11 +144,11 @@ #include <wtf/CurrentTime.h> -#if PLATFORM(DARWIN) +#if OS(DARWIN) #include "LocalCurrentGraphicsContext.h" #endif -#if PLATFORM(LINUX) +#if OS(LINUX) #include <gdk/gdk.h> #endif @@ -154,6 +156,8 @@ using namespace WebCore; namespace WebKit { +static int frameCount = 0; + // Key for a StatsCounter tracking how many WebFrames are active. static const char* const webFrameActiveCount = "WebFrameActiveCount"; @@ -329,6 +333,11 @@ private: // WebFrame ------------------------------------------------------------------- +int WebFrame::instanceCount() +{ + return frameCount; +} + WebFrame* WebFrame::frameForEnteredContext() { Frame* frame = @@ -343,11 +352,22 @@ WebFrame* WebFrame::frameForCurrentContext() return WebFrameImpl::fromFrame(frame); } +WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& element) +{ + return WebFrameImpl::fromFrameOwnerElement( + PassRefPtr<Element>(element).get()); +} + WebString WebFrameImpl::name() const { return m_frame->tree()->name(); } +void WebFrameImpl::clearName() +{ + m_frame->tree()->clearName(); +} + WebURL WebFrameImpl::url() const { const WebDataSource* ds = dataSource(); @@ -391,6 +411,11 @@ WebURL WebFrameImpl::openSearchDescriptionURL() const return WebURL(); } +WebString WebFrameImpl::encoding() const +{ + return frame()->loader()->encoding(); +} + WebSize WebFrameImpl::scrollOffset() const { FrameView* view = frameView(); @@ -515,6 +540,13 @@ WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const return fromFrame(frameElement->contentFrame()); } +WebDocument WebFrameImpl::document() const +{ + if (!m_frame || !m_frame->document()) + return WebDocument(); + return WebDocument(m_frame->document()); +} + void WebFrameImpl::forms(WebVector<WebFormElement>& results) const { if (!m_frame) @@ -533,6 +565,11 @@ void WebFrameImpl::forms(WebVector<WebFormElement>& results) const results.swap(temp); } +WebAnimationController* WebFrameImpl::animationController() +{ + return &m_animationController; +} + WebSecurityOrigin WebFrameImpl::securityOrigin() const { if (!m_frame || !m_frame->document()) @@ -559,7 +596,7 @@ NPObject* WebFrameImpl::windowObject() const void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object) { ASSERT(m_frame); - if (!m_frame || !m_frame->script()->isEnabled()) + if (!m_frame || !m_frame->script()->canExecuteScripts()) return; String key = name; @@ -576,19 +613,6 @@ void WebFrameImpl::executeScript(const WebScriptSource& source) ScriptSourceCode(source.code, source.url, source.startLine)); } -void WebFrameImpl::executeScriptInNewContext( - const WebScriptSource* sourcesIn, unsigned numSources, int extensionGroup) -{ - Vector<ScriptSourceCode> sources; - - for (unsigned i = 0; i < numSources; ++i) { - sources.append(ScriptSourceCode( - sourcesIn[i].code, sourcesIn[i].url, sourcesIn[i].startLine)); - } - - m_frame->script()->evaluateInNewContext(sources, extensionGroup); -} - void WebFrameImpl::executeScriptInIsolatedWorld( int worldId, const WebScriptSource* sourcesIn, unsigned numSources, int extensionGroup) @@ -1037,7 +1061,7 @@ WebString WebFrameImpl::selectionAsText() const return WebString(); String text = range->text(); -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) replaceNewlinesWithWindowsStyleNewlines(text); #endif replaceNBSPWithSpace(text); @@ -1087,10 +1111,10 @@ float WebFrameImpl::printPage(int page, WebCanvas* canvas) return 0; } -#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(FREEBSD) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) PlatformContextSkia context(canvas); GraphicsContext spool(&context); -#elif PLATFORM(DARWIN) +#elif OS(DARWIN) GraphicsContext spool(canvas); LocalCurrentGraphicsContext localContext(&spool); #endif @@ -1212,8 +1236,7 @@ void WebFrameImpl::stopFinding(bool clearSelection) cancelPendingScopingEffort(); // Remove all markers for matches found and turn off the highlighting. - if (!parent()) - frame()->document()->removeMarkers(DocumentMarker::TextMatch); + frame()->document()->removeMarkers(DocumentMarker::TextMatch); frame()->setMarkedTextMatchesAreHighlighted(false); // Let the frame know that we don't want tickmarks or highlighting anymore. @@ -1456,9 +1479,24 @@ WebString WebFrameImpl::contentAsMarkup() const return createFullMarkup(m_frame->document()); } -// WebFrameImpl public --------------------------------------------------------- +WebString WebFrameImpl::renderTreeAsText() const +{ + return externalRepresentation(m_frame); +} + +WebString WebFrameImpl::counterValueForElementById(const WebString& id) const +{ + if (!m_frame) + return WebString(); + + Element* element = m_frame->document()->getElementById(id); + if (!element) + return WebString(); -int WebFrameImpl::m_liveObjectCount = 0; + return counterValueForElement(element); +} + +// WebFrameImpl public --------------------------------------------------------- PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client) { @@ -1477,15 +1515,16 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client) , m_framesScopingCount(-1) , m_scopingComplete(false) , m_nextInvalidateAfter(0) + , m_animationController(this) { ChromiumBridge::incrementStatsCounter(webFrameActiveCount); - m_liveObjectCount++; + frameCount++; } WebFrameImpl::~WebFrameImpl() { ChromiumBridge::decrementStatsCounter(webFrameActiveCount); - m_liveObjectCount--; + frameCount--; cancelPendingScopingEffort(); clearPasswordListeners(); @@ -1631,6 +1670,19 @@ WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFrame(); } +WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) +{ + if (!element + || !element->isFrameOwnerElement() + || (!element->hasTagName(HTMLNames::iframeTag) + && !element->hasTagName(HTMLNames::frameTag))) + return 0; + + HTMLFrameOwnerElement* frameElement = + static_cast<HTMLFrameOwnerElement*>(element); + return fromFrame(frameElement->contentFrame()); +} + WebViewImpl* WebFrameImpl::viewImpl() const { if (!m_frame) diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h index 2cd332a..ba8d279 100644 --- a/WebKit/chromium/src/WebFrameImpl.h +++ b/WebKit/chromium/src/WebFrameImpl.h @@ -39,6 +39,8 @@ #include <wtf/OwnPtr.h> #include <wtf/RefCounted.h> +#include "WebAnimationControllerImpl.h" + namespace WebCore { class HistoryItem; class KURL; @@ -62,9 +64,11 @@ class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> { public: // WebFrame methods: virtual WebString name() const; + virtual void clearName(); virtual WebURL url() const; virtual WebURL favIconURL() const; virtual WebURL openSearchDescriptionURL() const; + virtual WebString encoding() const; virtual WebSize scrollOffset() const; virtual WebSize contentsSize() const; virtual int contentsPreferredWidth() const; @@ -82,14 +86,14 @@ public: virtual WebFrame* traversePrevious(bool wrap) const; virtual WebFrame* findChildByName(const WebString&) const; virtual WebFrame* findChildByExpression(const WebString&) const; + virtual WebDocument document() const; virtual void forms(WebVector<WebFormElement>&) const; + virtual WebAnimationController* animationController(); virtual WebSecurityOrigin securityOrigin() const; virtual void grantUniversalAccess(); virtual NPObject* windowObject() const; virtual void bindToWindowObject(const WebString& name, NPObject*); virtual void executeScript(const WebScriptSource&); - virtual void executeScriptInNewContext( - const WebScriptSource* sources, unsigned numSources, int extensionGroup); virtual void executeScriptInIsolatedWorld( int worldId, const WebScriptSource* sources, unsigned numSources, int extensionGroup); @@ -157,12 +161,12 @@ public: virtual WebURL completeURL(const WebString& url) const; virtual WebString contentAsText(size_t maxChars) const; virtual WebString contentAsMarkup() const; + virtual WebString renderTreeAsText() const; + virtual WebString counterValueForElementById(const WebString& id) const; static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); ~WebFrameImpl(); - static int liveObjectCount() { return m_liveObjectCount; } - // Called by the WebViewImpl to initialize its main frame: void initializeAsMainFrame(WebViewImpl*); @@ -174,6 +178,7 @@ public: void createFrameView(); static WebFrameImpl* fromFrame(WebCore::Frame* frame); + static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element); WebViewImpl* viewImpl() const; @@ -276,9 +281,6 @@ private: void loadJavaScriptURL(const WebCore::KURL&); - // Used to check for leaks of this object. - static int m_liveObjectCount; - FrameLoaderClientImpl m_frameLoaderClient; WebFrameClient* m_client; @@ -348,6 +350,9 @@ private: typedef HashMap<RefPtr<WebCore::HTMLInputElement>, WebPasswordAutocompleteListener*> PasswordListenerMap; PasswordListenerMap m_passwordListeners; + + // Keeps a reference to the frame's WebAnimationController. + WebAnimationControllerImpl m_animationController; }; } // namespace WebKit diff --git a/WebKit/chromium/src/WebGlyphCache.cpp b/WebKit/chromium/src/WebGlyphCache.cpp new file mode 100644 index 0000000..272c6cd --- /dev/null +++ b/WebKit/chromium/src/WebGlyphCache.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebGlyphCache.h" + +#include "GlyphPageTreeNode.h" + +using namespace WebCore; + +namespace WebKit { + +size_t WebGlyphCache::pageCount() +{ + return GlyphPageTreeNode::treeGlyphPageCount(); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebHistoryItem.cpp b/WebKit/chromium/src/WebHistoryItem.cpp index d4ee50a..4ca8cc7 100644 --- a/WebKit/chromium/src/WebHistoryItem.cpp +++ b/WebKit/chromium/src/WebHistoryItem.cpp @@ -218,6 +218,18 @@ void WebHistoryItem::setDocumentState(const WebVector<WebString>& state) m_private->setDocumentState(ds); } +long long WebHistoryItem::documentSequenceNumber() const +{ + ASSERT(!isNull()); + return m_private->documentSequenceNumber(); +} + +void WebHistoryItem::setDocumentSequenceNumber(long long documentSequenceNumber) +{ + ensureMutable(); + m_private->setDocumentSequenceNumber(documentSequenceNumber); +} + WebString WebHistoryItem::httpContentType() const { ASSERT(!isNull()); diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp index d403120..ee799f6 100644 --- a/WebKit/chromium/src/WebInputElement.cpp +++ b/WebKit/chromium/src/WebInputElement.cpp @@ -56,6 +56,11 @@ WebInputElement::operator WTF::PassRefPtr<HTMLInputElement>() const return PassRefPtr<HTMLInputElement>(static_cast<HTMLInputElement*>(m_private)); } +bool WebInputElement::autoComplete() const +{ + return constUnwrap<HTMLInputElement>()->autoComplete(); +} + bool WebInputElement::isEnabledFormControl() const { return constUnwrap<HTMLInputElement>()->isEnabledFormControl(); diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp index a129f85..a8e1851 100644 --- a/WebKit/chromium/src/WebKit.cpp +++ b/WebKit/chromium/src/WebKit.cpp @@ -33,6 +33,7 @@ #include "AtomicString.h" #include "DOMTimer.h" +#include "Logging.h" #include "Page.h" #include "RuntimeEnabledFeatures.h" #include "TextEncoding.h" @@ -94,6 +95,13 @@ bool layoutTestMode() return s_layoutTestMode; } +void enableLogChannel(const char* name) +{ + WTFLogChannel* channel = WebCore::getChannelFromName(name); + if (channel) + channel->state = WTFLogChannelOn; +} + void resetPluginCache(bool reloadPages) { WebCore::Page::refreshPlugins(reloadPages); diff --git a/WebKit/chromium/src/WebMutationEvent.cpp b/WebKit/chromium/src/WebMutationEvent.cpp new file mode 100644 index 0000000..511b615 --- /dev/null +++ b/WebKit/chromium/src/WebMutationEvent.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebMutationEvent.h" + +#include "MutationEvent.h" + +using namespace WebCore; + +namespace WebKit { + +WebNode WebMutationEvent::relatedNode() const +{ + return WebNode(constUnwrap<MutationEvent>()->relatedNode()); +} + +WebString WebMutationEvent::prevValue() const +{ + return WebString(constUnwrap<MutationEvent>()->prevValue()); +} + +WebString WebMutationEvent::newValue() const +{ + return WebString(constUnwrap<MutationEvent>()->newValue()); +} + +WebString WebMutationEvent::attrName() const +{ + return WebString(constUnwrap<MutationEvent>()->attrName()); +} + +WebMutationEvent::AttrChangeType WebMutationEvent::attrChange() const +{ + return static_cast<AttrChangeType>(constUnwrap<MutationEvent>()->attrChange()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp index 965c412..9fbf573 100644 --- a/WebKit/chromium/src/WebNode.cpp +++ b/WebKit/chromium/src/WebNode.cpp @@ -35,9 +35,18 @@ #include "Frame.h" #include "FrameLoaderClientImpl.h" #include "Node.h" +#include "NodeList.h" +#include "EventListenerWrapper.h" +#include "WebDocument.h" +#include "WebEvent.h" +#include "WebEventListener.h" #include "WebFrameImpl.h" +#include "WebNodeList.h" #include "WebString.h" +#include "WebVector.h" + +#include "markup.h" #include <wtf/PassRefPtr.h> @@ -61,6 +70,11 @@ void WebNode::assign(const WebNode& other) assign(p); } +WebNode::NodeType WebNode::nodeType() const +{ + return static_cast<NodeType>(m_private->nodeType()); +} + WebNode WebNode::parentNode() const { return PassRefPtr<Node>(const_cast<Node*>(m_private->parentNode())); @@ -71,18 +85,30 @@ WebString WebNode::nodeName() const return m_private->nodeName(); } -WebNode::WebNode(const WTF::PassRefPtr<WebCore::Node>& node) +WebString WebNode::nodeValue() const +{ + return m_private->nodeValue(); +} + +bool WebNode::setNodeValue(const WebString& value) +{ + ExceptionCode exceptionCode = 0; + m_private->setNodeValue(value, exceptionCode); + return !exceptionCode; +} + +WebNode::WebNode(const PassRefPtr<Node>& node) : m_private(static_cast<WebNodePrivate*>(node.releaseRef())) { } -WebNode& WebNode::operator=(const WTF::PassRefPtr<WebCore::Node>& node) +WebNode& WebNode::operator=(const PassRefPtr<Node>& node) { assign(static_cast<WebNodePrivate*>(node.releaseRef())); return *this; } -WebNode::operator WTF::PassRefPtr<WebCore::Node>() const +WebNode::operator PassRefPtr<Node>() const { return PassRefPtr<Node>(const_cast<WebNodePrivate*>(m_private)); } @@ -100,4 +126,72 @@ WebFrame* WebNode::frame() const return WebFrameImpl::fromFrame(m_private->document()->frame()); } +WebDocument WebNode::document() const +{ + return WebDocument(m_private->document()); +} + +WebNode WebNode::firstChild() const +{ + return WebNode(m_private->firstChild()); +} + +WebNode WebNode::lastChild() const +{ + return WebNode(m_private->lastChild()); +} + +WebNode WebNode::previousSibling() const +{ + return WebNode(m_private->previousSibling()); +} + +WebNode WebNode::nextSibling() const +{ + return WebNode(m_private->nextSibling()); +} + +bool WebNode::hasChildNodes() const +{ + return m_private->hasChildNodes(); +} + +WebNodeList WebNode::childNodes() +{ + return WebNodeList(m_private->childNodes()); +} + +WebString WebNode::createMarkup() const +{ + return WebCore::createMarkup(m_private); +} + +bool WebNode::isTextNode() const +{ + return m_private->isTextNode(); +} + +bool WebNode::isElementNode() const +{ + return m_private->isElementNode(); +} + +void WebNode::addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture) +{ + EventListenerWrapper* listenerWrapper = + listener->createEventListenerWrapper(eventType, useCapture, m_private); + // The listenerWrapper is only referenced by the actual Node. Once it goes + // away, the wrapper notifies the WebEventListener so it can clear its + // pointer to it. + m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture); +} + +void WebNode::removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture) +{ + EventListenerWrapper* listenerWrapper = + listener->getEventListenerWrapper(eventType, useCapture, m_private); + m_private->removeEventListener(eventType, listenerWrapper, useCapture); + // listenerWrapper is now deleted. +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebNodeCollection.cpp b/WebKit/chromium/src/WebNodeCollection.cpp new file mode 100644 index 0000000..a9e532f --- /dev/null +++ b/WebKit/chromium/src/WebNodeCollection.cpp @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebNodeCollection.h" + +#include "HTMLCollection.h" +#include "Node.h" +#include <wtf/PassRefPtr.h> + +#include "WebNode.h" + +using namespace WebCore; + +namespace WebKit { + +void WebNodeCollection::reset() +{ + assign(0); +} + +void WebNodeCollection::assign(const WebNodeCollection& other) +{ + HTMLCollection* p = const_cast<HTMLCollection*>(other.m_private); + if (p) + p->ref(); + assign(p); +} + +WebNodeCollection::WebNodeCollection(const PassRefPtr<HTMLCollection>& col) + : m_private(static_cast<HTMLCollection*>(col.releaseRef())) +{ +} + +void WebNodeCollection::assign(HTMLCollection* p) +{ + // p is already ref'd for us by the caller + if (m_private) + m_private->deref(); + m_private = p; +} + +unsigned WebNodeCollection::length() const +{ + return m_private->length(); +} + +WebNode WebNodeCollection::nextItem() const +{ + return WebNode(m_private->nextItem()); +} + +WebNode WebNodeCollection::firstItem() const +{ + return WebNode(m_private->firstItem()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebNodeList.cpp b/WebKit/chromium/src/WebNodeList.cpp new file mode 100644 index 0000000..f68f961 --- /dev/null +++ b/WebKit/chromium/src/WebNodeList.cpp @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebNodeList.h" + +#include "Node.h" +#include "NodeList.h" +#include <wtf/PassRefPtr.h> + +#include "WebNode.h" + +using namespace WebCore; + +namespace WebKit { + +void WebNodeList::reset() +{ + assign(0); +} + +void WebNodeList::assign(const WebNodeList& other) +{ + NodeList* p = const_cast<NodeList*>(other.m_private); + if (p) + p->ref(); + assign(p); +} + +WebNodeList::WebNodeList(const PassRefPtr<NodeList>& col) + : m_private(static_cast<NodeList*>(col.releaseRef())) +{ +} + +void WebNodeList::assign(NodeList* p) +{ + // p is already ref'd for us by the caller + if (m_private) + m_private->deref(); + m_private = p; +} + +unsigned WebNodeList::length() const +{ + return m_private->length(); +} + +WebNode WebNodeList::item(size_t index) const +{ + return WebNode(m_private->item(index)); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializer.cpp b/WebKit/chromium/src/WebPageSerializer.cpp new file mode 100644 index 0000000..1010285 --- /dev/null +++ b/WebKit/chromium/src/WebPageSerializer.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebPageSerializer.h" + +#include "KURL.h" +#include "PlatformString.h" + +#include "WebFrame.h" +#include "WebPageSerializerClient.h" +#include "WebPageSerializerImpl.h" +#include "WebString.h" +#include "WebURL.h" +#include "WebVector.h" + +using namespace WebCore; + +namespace WebKit { + +bool WebPageSerializer::serialize(WebFrame* frame, + bool recursive, + WebPageSerializerClient* client, + const WebVector<WebURL>& links, + const WebVector<WebString>& localPaths, + const WebString& localDirectoryName) +{ + WebPageSerializerImpl serializerImpl( + frame, recursive, client, links, localPaths, localDirectoryName); + return serializerImpl.serialize(); +} + +WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset) +{ + return String::format("<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">", + charset.utf8().data()); +} + +WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url) +{ + return String::format("\n<!-- saved from url=(%04d)%s -->\n", + static_cast<int>(url.spec().length()), + url.spec().data()); +} + +WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTarget) +{ + String targetDeclaration; + if (!baseTarget.isEmpty()) + targetDeclaration = String::format(" target=\"%s\"", baseTarget.utf8().data()); + return String::format("<BASE href=\".\"%s>", targetDeclaration.utf8().data()); +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp new file mode 100644 index 0000000..d5b2b7f --- /dev/null +++ b/WebKit/chromium/src/WebPageSerializerImpl.cpp @@ -0,0 +1,547 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// How we handle the base tag better. +// Current status: +// At now the normal way we use to handling base tag is +// a) For those links which have corresponding local saved files, such as +// savable CSS, JavaScript files, they will be written to relative URLs which +// point to local saved file. Why those links can not be resolved as absolute +// file URLs, because if they are resolved as absolute URLs, after moving the +// file location from one directory to another directory, the file URLs will +// be dead links. +// b) For those links which have not corresponding local saved files, such as +// links in A, AREA tags, they will be resolved as absolute URLs. +// c) We comment all base tags when serialzing DOM for the page. +// FireFox also uses above way to handle base tag. +// +// Problem: +// This way can not handle the following situation: +// the base tag is written by JavaScript. +// For example. The page "www.yahoo.com" use +// "document.write('<base href="http://www.yahoo.com/"...');" to setup base URL +// of page when loading page. So when saving page as completed-HTML, we assume +// that we save "www.yahoo.com" to "c:\yahoo.htm". After then we load the saved +// completed-HTML page, then the JavaScript will insert a base tag +// <base href="http://www.yahoo.com/"...> to DOM, so all URLs which point to +// local saved resource files will be resolved as +// "http://www.yahoo.com/yahoo_files/...", which will cause all saved resource +// files can not be loaded correctly. Also the page will be rendered ugly since +// all saved sub-resource files (such as CSS, JavaScript files) and sub-frame +// files can not be fetched. +// Now FireFox, IE and WebKit based Browser all have this problem. +// +// Solution: +// My solution is that we comment old base tag and write new base tag: +// <base href="." ...> after the previous commented base tag. In WebKit, it +// always uses the latest "href" attribute of base tag to set document's base +// URL. Based on this behavior, when we encounter a base tag, we comment it and +// write a new base tag <base href="."> after the previous commented base tag. +// The new added base tag can help engine to locate correct base URL for +// correctly loading local saved resource files. Also I think we need to inherit +// the base target value from document object when appending new base tag. +// If there are multiple base tags in original document, we will comment all old +// base tags and append new base tag after each old base tag because we do not +// know those old base tags are original content or added by JavaScript. If +// they are added by JavaScript, it means when loading saved page, the script(s) +// will still insert base tag(s) to DOM, so the new added base tag(s) can +// override the incorrect base URL and make sure we alway load correct local +// saved resource files. + +#include "config.h" +#include "WebPageSerializerImpl.h" + +#include "Document.h" +#include "DocumentType.h" +#include "Element.h" +#include "FrameLoader.h" +#include "HTMLAllCollection.h" +#include "HTMLElement.h" +#include "HTMLFormElement.h" +#include "HTMLMetaElement.h" +#include "HTMLNames.h" +#include "KURL.h" +#include "PlatformString.h" +#include "StringBuilder.h" +#include "TextEncoding.h" +#include "markup.h" + +#include "DOMUtilitiesPrivate.h" +#include "WebFrameImpl.h" +#include "WebURL.h" +#include "WebVector.h" + +using namespace WebCore; + +namespace WebKit { + +// Maximum length of data buffer which is used to temporary save generated +// html content data. This is a soft limit which might be passed if a very large +// contegious string is found in the page. +static const unsigned dataBufferCapacity = 65536; + +WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& currentFrameURL, + const TextEncoding& textEncoding, + Document* doc, + const String& directoryName) + : currentFrameURL(currentFrameURL) + , textEncoding(textEncoding) + , doc(doc) + , directoryName(directoryName) + , hasDoctype(false) + , hasCheckedMeta(false) + , skipMetaElement(0) + , isInScriptOrStyleTag(false) + , hasDocDeclaration(false) +{ + // Cache the value since we check it lots of times. + isHTMLDocument = doc->isHTMLDocument(); +} + +String WebPageSerializerImpl::preActionBeforeSerializeOpenTag( + const Element* element, SerializeDomParam* param, bool* needSkip) +{ + StringBuilder result; + + *needSkip = false; + if (param->isHTMLDocument) { + // Skip the open tag of original META tag which declare charset since we + // have overrided the META which have correct charset declaration after + // serializing open tag of HEAD element. + if (element->hasTagName(HTMLNames::metaTag)) { + const HTMLMetaElement* meta = static_cast<const HTMLMetaElement*>(element); + // Check whether the META tag has declared charset or not. + String equiv = meta->httpEquiv(); + if (equalIgnoringCase(equiv, "content-type")) { + String content = meta->content(); + if (content.length() && content.contains("charset", false)) { + // Find META tag declared charset, we need to skip it when + // serializing DOM. + param->skipMetaElement = element; + *needSkip = true; + } + } + } else if (element->hasTagName(HTMLNames::htmlTag)) { + // Check something before processing the open tag of HEAD element. + // First we add doc type declaration if original doc has it. + if (!param->hasDoctype) { + param->hasDoctype = true; + result.append(createMarkup(param->doc->doctype())); + } + + // Add MOTW declaration before html tag. + // See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx. + result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->currentFrameURL)); + } else if (element->hasTagName(HTMLNames::baseTag)) { + // Comment the BASE tag when serializing dom. + result.append("<!--"); + } + } else { + // Write XML declaration. + if (!param->hasDocDeclaration) { + param->hasDocDeclaration = true; + // Get encoding info. + String xmlEncoding = param->doc->xmlEncoding(); + if (xmlEncoding.isEmpty()) + xmlEncoding = param->doc->frame()->loader()->encoding(); + if (xmlEncoding.isEmpty()) + xmlEncoding = UTF8Encoding().name(); + result.append("<?xml version=\""); + result.append(param->doc->xmlVersion()); + result.append("\" encoding=\""); + result.append(xmlEncoding); + if (param->doc->xmlStandalone()) + result.append("\" standalone=\"yes"); + result.append("\"?>\n"); + } + // Add doc type declaration if original doc has it. + if (!param->hasDoctype) { + param->hasDoctype = true; + result.append(createMarkup(param->doc->doctype())); + } + } + return result.toString(); +} + +String WebPageSerializerImpl::postActionAfterSerializeOpenTag( + const Element* element, SerializeDomParam* param) +{ + StringBuilder result; + + param->hasAddedContentsBeforeEnd = false; + if (!param->isHTMLDocument) + return result.toString(); + // Check after processing the open tag of HEAD element + if (!param->hasCheckedMeta + && element->hasTagName(HTMLNames::headTag)) { + param->hasCheckedMeta = true; + // Check meta element. WebKit only pre-parse the first 512 bytes + // of the document. If the whole <HEAD> is larger and meta is the + // end of head part, then this kind of pages aren't decoded correctly + // because of this issue. So when we serialize the DOM, we need to + // make sure the meta will in first child of head tag. + // See http://bugs.webkit.org/show_bug.cgi?id=16621. + // First we generate new content for writing correct META element. + result.append(WebPageSerializer::generateMetaCharsetDeclaration( + String(param->textEncoding.name()))); + + param->hasAddedContentsBeforeEnd = true; + // Will search each META which has charset declaration, and skip them all + // in PreActionBeforeSerializeOpenTag. + } else if (element->hasTagName(HTMLNames::scriptTag) + || element->hasTagName(HTMLNames::styleTag)) { + param->isInScriptOrStyleTag = true; + } + + return result.toString(); +} + +String WebPageSerializerImpl::preActionBeforeSerializeEndTag( + const Element* element, SerializeDomParam* param, bool* needSkip) +{ + String result; + + *needSkip = false; + if (!param->isHTMLDocument) + return result; + // Skip the end tag of original META tag which declare charset. + // Need not to check whether it's META tag since we guarantee + // skipMetaElement is definitely META tag if it's not 0. + if (param->skipMetaElement == element) + *needSkip = true; + else if (element->hasTagName(HTMLNames::scriptTag) + || element->hasTagName(HTMLNames::styleTag)) { + ASSERT(param->isInScriptOrStyleTag); + param->isInScriptOrStyleTag = false; + } + + return result; +} + +// After we finish serializing end tag of a element, we give the target +// element a chance to do some post work to add some additional data. +String WebPageSerializerImpl::postActionAfterSerializeEndTag( + const Element* element, SerializeDomParam* param) +{ + StringBuilder result; + + if (!param->isHTMLDocument) + return result.toString(); + // Comment the BASE tag when serializing DOM. + if (element->hasTagName(HTMLNames::baseTag)) { + result.append("-->"); + // Append a new base tag declaration. + result.append(WebPageSerializer::generateBaseTagDeclaration( + param->doc->baseTarget())); + } + + return result.toString(); +} + +void WebPageSerializerImpl::saveHTMLContentToBuffer( + const String& result, SerializeDomParam* param) +{ + m_dataBuffer.append(result); + encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsNotFinished, + param, + 0); +} + +void WebPageSerializerImpl::encodeAndFlushBuffer( + WebPageSerializerClient::PageSerializationStatus status, + SerializeDomParam* param, + bool force) +{ + // Data buffer is not full nor do we want to force flush. + if (!force && m_dataBuffer.length() <= dataBufferCapacity) + return; + + String content = m_dataBuffer.toString(); + m_dataBuffer.clear(); + + // Convert the unicode content to target encoding + CString encodedContent = param->textEncoding.encode( + content.characters(), content.length(), EntitiesForUnencodables); + + // Send result to the client. + m_client->didSerializeDataForFrame(param->currentFrameURL, + WebCString(encodedContent.data(), encodedContent.length()), + status); +} + +void WebPageSerializerImpl::openTagToString(const Element* element, + SerializeDomParam* param) +{ + // FIXME: use StringBuilder instead of String. + bool needSkip; + // Do pre action for open tag. + String result = preActionBeforeSerializeOpenTag(element, param, &needSkip); + if (needSkip) + return; + // Add open tag + result += "<" + element->nodeName(); + // Go through all attributes and serialize them. + const NamedNodeMap *attrMap = element->attributes(true); + if (attrMap) { + unsigned numAttrs = attrMap->length(); + for (unsigned i = 0; i < numAttrs; i++) { + result += " "; + // Add attribute pair + const Attribute *attribute = attrMap->attributeItem(i); + result += attribute->name().toString(); + result += "=\""; + if (!attribute->value().isEmpty()) { + const String& attrValue = attribute->value(); + + // Check whether we need to replace some resource links + // with local resource paths. + const QualifiedName& attrName = attribute->name(); + if (elementHasLegalLinkAttribute(element, attrName)) { + // For links start with "javascript:", we do not change it. + if (attrValue.startsWith("javascript:", false)) + result += attrValue; + else { + // Get the absolute link + String completeURL = param->doc->completeURL(attrValue); + // Check whether we have local files for those link. + if (m_localLinks.contains(completeURL)) { + if (!m_localDirectoryName.isEmpty()) + result += "./" + m_localDirectoryName + "/"; + result += m_localLinks.get(completeURL); + } else + result += completeURL; + } + } else { + if (param->isHTMLDocument) + result += m_htmlEntities.convertEntitiesInString(attrValue); + else + result += m_xmlEntities.convertEntitiesInString(attrValue); + } + } + result += "\""; + } + } + + // Do post action for open tag. + String addedContents = postActionAfterSerializeOpenTag(element, param); + // Complete the open tag for element when it has child/children. + if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd) + result += ">"; + // Append the added contents generate in post action of open tag. + result += addedContents; + // Save the result to data buffer. + saveHTMLContentToBuffer(result, param); +} + +// Serialize end tag of an specified element. +void WebPageSerializerImpl::endTagToString(const Element* element, + SerializeDomParam* param) +{ + bool needSkip; + // Do pre action for end tag. + String result = preActionBeforeSerializeEndTag(element, + param, + &needSkip); + if (needSkip) + return; + // Write end tag when element has child/children. + if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd) { + result += "</"; + result += element->nodeName(); + result += ">"; + } else { + // Check whether we have to write end tag for empty element. + if (param->isHTMLDocument) { + result += ">"; + const HTMLElement* htmlElement = + static_cast<const HTMLElement*>(element); + if (htmlElement->endTagRequirement() == TagStatusRequired) { + // We need to write end tag when it is required. + result += "</"; + result += element->nodeName(); + result += ">"; + } + } else { + // For xml base document. + result += " />"; + } + } + // Do post action for end tag. + result += postActionAfterSerializeEndTag(element, param); + // Save the result to data buffer. + saveHTMLContentToBuffer(result, param); +} + +void WebPageSerializerImpl::buildContentForNode(const Node* node, + SerializeDomParam* param) +{ + switch (node->nodeType()) { + case Node::ELEMENT_NODE: + // Process open tag of element. + openTagToString(static_cast<const Element*>(node), param); + // Walk through the children nodes and process it. + for (const Node *child = node->firstChild(); child; child = child->nextSibling()) + buildContentForNode(child, param); + // Process end tag of element. + endTagToString(static_cast<const Element*>(node), param); + break; + case Node::TEXT_NODE: + saveHTMLContentToBuffer(createMarkup(node), param); + break; + case Node::ATTRIBUTE_NODE: + case Node::DOCUMENT_NODE: + case Node::DOCUMENT_FRAGMENT_NODE: + // Should not exist. + ASSERT_NOT_REACHED(); + break; + // Document type node can be in DOM? + case Node::DOCUMENT_TYPE_NODE: + param->hasDoctype = true; + default: + // For other type node, call default action. + saveHTMLContentToBuffer(createMarkup(node), param); + break; + } +} + +WebPageSerializerImpl::WebPageSerializerImpl(WebFrame* frame, + bool recursiveSerialization, + WebPageSerializerClient* client, + const WebVector<WebURL>& links, + const WebVector<WebString>& localPaths, + const WebString& localDirectoryName) + : m_client(client) + , m_recursiveSerialization(recursiveSerialization) + , m_framesCollected(false) + , m_localDirectoryName(localDirectoryName) + , m_htmlEntities(false) + , m_xmlEntities(true) +{ + // Must specify available webframe. + ASSERT(frame); + m_specifiedWebFrameImpl = static_cast<WebFrameImpl*>(frame); + // Make sure we have non 0 client. + ASSERT(client); + // Build local resources map. + ASSERT(links.size() == localPaths.size()); + for (size_t i = 0; i < links.size(); i++) { + KURL url = links[i]; + ASSERT(!m_localLinks.contains(url.string())); + m_localLinks.set(url.string(), localPaths[i]); + } + + ASSERT(!m_dataBuffer.length()); +} + +void WebPageSerializerImpl::collectTargetFrames() +{ + ASSERT(!m_framesCollected); + m_framesCollected = true; + + // First, process main frame. + m_frames.append(m_specifiedWebFrameImpl); + // Return now if user only needs to serialize specified frame, not including + // all sub-frames. + if (!m_recursiveSerialization) + return; + // Collect all frames inside the specified frame. + for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) { + WebFrameImpl* currentFrame = m_frames[i]; + // Get current using document. + Document* currentDoc = currentFrame->frame()->document(); + // Go through sub-frames. + RefPtr<HTMLAllCollection> all = currentDoc->all(); + for (Node* node = all->firstItem(); node; node = all->nextItem()) { + if (!node->isHTMLElement()) + continue; + Element* element = static_cast<Element*>(node); + WebFrameImpl* webFrame = + WebFrameImpl::fromFrameOwnerElement(element); + if (webFrame) + m_frames.append(webFrame); + } + } +} + +bool WebPageSerializerImpl::serialize() +{ + // Collect target frames. + if (!m_framesCollected) + collectTargetFrames(); + bool didSerialization = false; + // Get KURL for main frame. + KURL mainPageURL = m_specifiedWebFrameImpl->frame()->loader()->url(); + + // Go through all frames for serializing DOM for whole page, include + // sub-frames. + for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) { + // Get current serializing frame. + WebFrameImpl* currentFrame = m_frames[i]; + // Get current using document. + Document* currentDoc = currentFrame->frame()->document(); + // Get current frame's URL. + const KURL& currentFrameURL = currentFrame->frame()->loader()->url(); + + // Check whether we have done this document. + if (m_localLinks.contains(currentFrameURL.string())) { + // A new document, we will serialize it. + didSerialization = true; + // Get target encoding for current document. + String encoding = currentFrame->frame()->loader()->encoding(); + // Create the text encoding object with target encoding. + TextEncoding textEncoding(encoding); + // Construct serialize parameter for late processing document. + SerializeDomParam param(currentFrameURL, + encoding.length() ? textEncoding : UTF8Encoding(), + currentDoc, + currentFrameURL == mainPageURL ? m_localDirectoryName : ""); + + // Process current document. + Element* rootElement = currentDoc->documentElement(); + if (rootElement) + buildContentForNode(rootElement, ¶m); + + // Flush the remainder data and finish serializing current frame. + encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, + ¶m, + 1); + } + } + + // We have done call frames, so we send message to embedder to tell it that + // frames are finished serializing. + ASSERT(!m_dataBuffer.length()); + m_client->didSerializeDataForFrame(KURL(), + WebCString("", 0), + WebPageSerializerClient::AllFramesAreFinished); + return didSerialization; +} + +} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializerImpl.h b/WebKit/chromium/src/WebPageSerializerImpl.h new file mode 100644 index 0000000..8f6a99f --- /dev/null +++ b/WebKit/chromium/src/WebPageSerializerImpl.h @@ -0,0 +1,199 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebPageSerializerImpl_h +#define WebPageSerializerImpl_h + +#include "PlatformString.h" +#include "StringBuilder.h" +#include "StringHash.h" +#include <wtf/HashMap.h> +#include <wtf/Vector.h> + +#include "WebEntities.h" +#include "WebPageSerializer.h" +#include "WebPageSerializerClient.h" +#include "WebString.h" +#include "WebURL.h" + +namespace WebCore { +class Document; +class Element; +class Node; +class String; +class TextEncoding; +} + +namespace WebKit { +class WebFrameImpl; + +// Get html data by serializing all frames of current page with lists +// which contain all resource links that have local copy. +// contain all saved auxiliary files included all sub frames and resources. +// This function will find out all frames and serialize them to HTML data. +// We have a data buffer to temporary saving generated html data. We will +// sequentially call WebViewDelegate::SendSerializedHtmlData once the data +// buffer is full. See comments of WebViewDelegate::SendSerializedHtmlData +// for getting more information. +class WebPageSerializerImpl { +public: + // Do serialization action. Return false means no available frame has been + // serialized, otherwise return true. + bool serialize(); + + // The parameter specifies which frame need to be serialized. + // The parameter recursive_serialization specifies whether we need to + // serialize all sub frames of the specified frame or not. + // The parameter delegate specifies the pointer of interface + // DomSerializerDelegate provide sink interface which can receive the + // individual chunks of data to be saved. + // The parameter links contain original URLs of all saved links. + // The parameter local_paths contain corresponding local file paths of all + // saved links, which matched with vector:links one by one. + // The parameter local_directory_name is relative path of directory which + // contain all saved auxiliary files included all sub frames and resources. + WebPageSerializerImpl(WebFrame* frame, + bool recursive, + WebPageSerializerClient* client, + const WebVector<WebURL>& links, + const WebVector<WebString>& localPaths, + const WebString& localDirectoryName); + +private: + // Specified frame which need to be serialized; + WebFrameImpl* m_specifiedWebFrameImpl; + // Pointer of WebPageSerializerClient + WebPageSerializerClient* m_client; + // This hash map is used to map resource URL of original link to its local + // file path. + typedef HashMap<WebCore::String, WebCore::String> LinkLocalPathMap; + // local_links_ include all pair of local resource path and corresponding + // original link. + LinkLocalPathMap m_localLinks; + // Data buffer for saving result of serialized DOM data. + WebCore::StringBuilder m_dataBuffer; + // Passing true to recursive_serialization_ indicates we will serialize not + // only the specified frame but also all sub-frames in the specific frame. + // Otherwise we only serialize the specified frame excluded all sub-frames. + bool m_recursiveSerialization; + // Flag indicates whether we have collected all frames which need to be + // serialized or not; + bool m_framesCollected; + // Local directory name of all local resource files. + WebCore::String m_localDirectoryName; + // Vector for saving all frames which need to be serialized. + Vector<WebFrameImpl*> m_frames; + + // Web entities conversion maps. + WebEntities m_htmlEntities; + WebEntities m_xmlEntities; + + struct SerializeDomParam { + // Frame URL of current processing document presented by GURL + const WebCore::KURL& currentFrameURL; + // Current using text encoding object. + const WebCore::TextEncoding& textEncoding; + + // Document object of current frame. + WebCore::Document* doc; + // Local directory name of all local resource files. + const WebCore::String& directoryName; + + // Flag indicates current doc is html document or not. It's a cache value + // of Document.isHTMLDocument(). + bool isHTMLDocument; + // Flag which indicate whether we have met document type declaration. + bool hasDoctype; + // Flag which indicate whether will process meta issue. + bool hasCheckedMeta; + // This meta element need to be skipped when serializing DOM. + const WebCore::Element* skipMetaElement; + // Flag indicates we are in script or style tag. + bool isInScriptOrStyleTag; + // Flag indicates whether we have written xml document declaration. + // It is only used in xml document + bool hasDocDeclaration; + // Flag indicates whether we have added additional contents before end tag. + // This flag will be re-assigned in each call of function + // PostActionAfterSerializeOpenTag and it could be changed in function + // PreActionBeforeSerializeEndTag if the function adds new contents into + // serialization stream. + bool hasAddedContentsBeforeEnd; + + // Constructor. + SerializeDomParam(const WebCore::KURL& currentFrameURL, + const WebCore::TextEncoding& textEncoding, + WebCore::Document* doc, + const WebCore::String& directoryName); + }; + + // Collect all target frames which need to be serialized. + void collectTargetFrames(); + // Before we begin serializing open tag of a element, we give the target + // element a chance to do some work prior to add some additional data. + WebCore::String preActionBeforeSerializeOpenTag(const WebCore::Element* element, + SerializeDomParam* param, + bool* needSkip); + // After we finish serializing open tag of a element, we give the target + // element a chance to do some post work to add some additional data. + WebCore::String postActionAfterSerializeOpenTag(const WebCore::Element* element, + SerializeDomParam* param); + // Before we begin serializing end tag of a element, we give the target + // element a chance to do some work prior to add some additional data. + WebCore::String preActionBeforeSerializeEndTag(const WebCore::Element* element, + SerializeDomParam* param, + bool* needSkip); + // After we finish serializing end tag of a element, we give the target + // element a chance to do some post work to add some additional data. + WebCore::String postActionAfterSerializeEndTag(const WebCore::Element* element, + SerializeDomParam* param); + // Save generated html content to data buffer. + void saveHTMLContentToBuffer(const WebCore::String& content, + SerializeDomParam* param); + // Flushes the content buffer by encoding and sending the content to the + // WebPageSerializerClient. Content is not flushed if the buffer is not full + // unless force is 1. + void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status, + SerializeDomParam* param, + bool force); + // Serialize open tag of an specified element. + void openTagToString(const WebCore::Element* element, + SerializeDomParam* param); + // Serialize end tag of an specified element. + void endTagToString(const WebCore::Element* element, + SerializeDomParam* param); + // Build content for a specified node + void buildContentForNode(const WebCore::Node* node, + SerializeDomParam* param); +}; + +} // namespace WebKit + +#endif diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp index 43f3cef..86cac26 100644 --- a/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "WebPluginContainerImpl.h" +#include "Chrome.h" #include "ChromeClientImpl.h" #include "WebCursorInfo.h" #include "WebDataSourceImpl.h" @@ -353,7 +354,7 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) WebCursorInfo cursorInfo; bool handled = m_webPlugin->handleInputEvent(webEvent, cursorInfo); -#if !PLATFORM(DARWIN) +#if !OS(DARWIN) // TODO(pkasting): http://b/1119691 This conditional seems exactly // backwards, but if I reverse it, giving focus to a transparent // (windowless) plugin fails. @@ -389,7 +390,7 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) WebCursorInfo cursor_info; bool handled = m_webPlugin->handleInputEvent(webEvent, cursor_info); -#if !PLATFORM(DARWIN) +#if !OS(DARWIN) // TODO(pkasting): http://b/1119691 See above. handled = !handled; #endif diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp index b630a09..0ef8b9b 100644 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "WebRuntimeFeatures.h" +#include "Database.h" #include "RuntimeEnabledFeatures.h" #include "WebMediaPlayerClientImpl.h" #include "WebSocket.h" @@ -42,14 +43,14 @@ namespace WebKit { void WebRuntimeFeatures::enableDatabase(bool enable) { #if ENABLE(DATABASE) - RuntimeEnabledFeatures::setDatabaseEnabled(enable); + Database::setIsAvailable(enable); #endif } bool WebRuntimeFeatures::isDatabaseEnabled() { #if ENABLE(DATABASE) - return RuntimeEnabledFeatures::databaseEnabled(); + return Database::isAvailable(); #else return false; #endif @@ -151,4 +152,36 @@ bool WebRuntimeFeatures::isApplicationCacheEnabled() #endif } +void WebRuntimeFeatures::enableGeolocation(bool enable) +{ +#if ENABLE(GEOLOCATION) + RuntimeEnabledFeatures::setGeolocationEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isGeolocationEnabled() +{ +#if ENABLE(GEOLOCATION) + return RuntimeEnabledFeatures::geolocationEnabled(); +#else + return false; +#endif +} + +void WebRuntimeFeatures::enableIndexedDatabase(bool enable) +{ +#if ENABLE(INDEXED_DATABASE) + RuntimeEnabledFeatures::setIndexedDatabaseEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isIndexedDatabaseEnabled() +{ +#if ENABLE(INDEXED_DATABASE) + return RuntimeEnabledFeatures::indexedDatabaseEnabled(); +#else + return false; +#endif +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebSecurityOrigin.cpp b/WebKit/chromium/src/WebSecurityOrigin.cpp index 3cf7364..87916ca 100644 --- a/WebKit/chromium/src/WebSecurityOrigin.cpp +++ b/WebKit/chromium/src/WebSecurityOrigin.cpp @@ -42,6 +42,11 @@ namespace WebKit { class WebSecurityOriginPrivate : public SecurityOrigin { }; +WebSecurityOrigin* WebSecurityOrigin::createFromDatabaseIdentifier(const WebString& databaseIdentifier) +{ + return new WebSecurityOrigin(SecurityOrigin::createFromDatabaseIdentifier(databaseIdentifier)); +} + void WebSecurityOrigin::reset() { assign(0); diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp index c66c805..48b445c 100644 --- a/WebKit/chromium/src/WebSecurityPolicy.cpp +++ b/WebKit/chromium/src/WebSecurityPolicy.cpp @@ -66,4 +66,9 @@ void WebSecurityPolicy::resetOriginAccessWhiteLists() SecurityOrigin::resetOriginAccessWhiteLists(); } +bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer) +{ + return SecurityOrigin::shouldHideReferrer(url, referrer); +} + } // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp index e019653..5cfbd4f 100644 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/WebKit/chromium/src/WebSettingsImpl.cpp @@ -130,6 +130,11 @@ void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically) m_settings->setLoadsImagesAutomatically(loadsImagesAutomatically); } +void WebSettingsImpl::setImagesEnabled(bool enabled) +{ + m_settings->setImagesEnabled(enabled); +} + void WebSettingsImpl::setPluginsEnabled(bool enabled) { m_settings->setPluginsEnabled(enabled); diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h index 9c0f9f4..3b69fe6 100644 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ b/WebKit/chromium/src/WebSettingsImpl.h @@ -60,6 +60,7 @@ public: virtual void setWebSecurityEnabled(bool); virtual void setJavaScriptCanOpenWindowsAutomatically(bool); virtual void setLoadsImagesAutomatically(bool); + virtual void setImagesEnabled(bool); virtual void setPluginsEnabled(bool); virtual void setDOMPasteAllowed(bool); virtual void setDeveloperExtrasEnabled(bool); diff --git a/WebKit/chromium/src/WebStorageAreaImpl.cpp b/WebKit/chromium/src/WebStorageAreaImpl.cpp index f24bee3..92a923a 100644 --- a/WebKit/chromium/src/WebStorageAreaImpl.cpp +++ b/WebKit/chromium/src/WebStorageAreaImpl.cpp @@ -66,12 +66,12 @@ WebString WebStorageAreaImpl::getItem(const WebString& key) return m_storageArea->getItem(key); } -void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException) +void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException, WebString& oldValue) { int exceptionCode = 0; ScopedStorageEventURL scope(url); - m_storageArea->setItem(key, value, exceptionCode, 0); + oldValue = m_storageArea->setItem(key, value, exceptionCode, 0); if (exceptionCode) { ASSERT(exceptionCode == WebCore::QUOTA_EXCEEDED_ERR); @@ -80,16 +80,16 @@ void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, c quotaException = false; } -void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url) +void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url, WebString& oldValue) { ScopedStorageEventURL scope(url); - m_storageArea->removeItem(key, 0); + oldValue = m_storageArea->removeItem(key, 0); } -void WebStorageAreaImpl::clear(const WebURL& url) +void WebStorageAreaImpl::clear(const WebURL& url, bool& somethingCleared) { ScopedStorageEventURL scope(url); - m_storageArea->clear(0); + somethingCleared = m_storageArea->clear(0); } } // namespace WebKit diff --git a/WebKit/chromium/src/WebStorageAreaImpl.h b/WebKit/chromium/src/WebStorageAreaImpl.h index e1f74e0..7e90531 100644 --- a/WebKit/chromium/src/WebStorageAreaImpl.h +++ b/WebKit/chromium/src/WebStorageAreaImpl.h @@ -45,9 +45,9 @@ public: virtual unsigned length(); virtual WebString key(unsigned index); virtual WebString getItem(const WebString& key); - virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException); - virtual void removeItem(const WebString& key, const WebURL& url); - virtual void clear(const WebURL& url); + virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException, WebString& oldValue); + virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue); + virtual void clear(const WebURL& url, bool& somethingCleared); // For storage events in single-process mode and test shell. static const WebURL* currentStorageEventURL() { return storageEventURL; } diff --git a/WebKit/chromium/src/WebString.cpp b/WebKit/chromium/src/WebString.cpp index f45e05f..36d5f86 100644 --- a/WebKit/chromium/src/WebString.cpp +++ b/WebKit/chromium/src/WebString.cpp @@ -86,6 +86,11 @@ WebString WebString::fromUTF8(const char* data) return WebCore::String::fromUTF8(data); } +bool WebString::equals(const WebString& s) const +{ + return equal(m_private, s.m_private); +} + WebString::WebString(const WebCore::String& s) : m_private(static_cast<WebStringPrivate*>(s.impl())) { diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp index 49f07f9..95e0be2 100644 --- a/WebKit/chromium/src/WebURLResponse.cpp +++ b/WebKit/chromium/src/WebURLResponse.cpp @@ -255,6 +255,16 @@ const ResourceResponse& WebURLResponse::toResourceResponse() const return *m_private->m_resourceResponse; } +bool WebURLResponse::wasFetchedViaSPDY() const +{ + return m_private->m_resourceResponse->wasFetchedViaSPDY(); +} + +void WebURLResponse::setWasFetchedViaSPDY(bool value) +{ + m_private->m_resourceResponse->setWasFetchedViaSPDY(value); +} + void WebURLResponse::assign(WebURLResponsePrivate* p) { // Subclasses may call this directly so a self-assignment check is needed diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp index 030c4bd..97825e9 100644 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ b/WebKit/chromium/src/WebViewImpl.cpp @@ -33,6 +33,7 @@ #include "AutocompletePopupMenuClient.h" #include "AXObjectCache.h" +#include "Chrome.h" #include "ContextMenu.h" #include "ContextMenuController.h" #include "ContextMenuItem.h" @@ -65,6 +66,7 @@ #include "NodeRenderStyle.h" #include "Page.h" #include "PageGroup.h" +#include "PageGroupLoadDeferrer.h" #include "Pasteboard.h" #include "PlatformContextSkia.h" #include "PlatformKeyboardEvent.h" @@ -96,11 +98,11 @@ #include "WebVector.h" #include "WebViewClient.h" -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) #include "KeyboardCodesWin.h" #include "RenderThemeChromiumWin.h" #else -#if PLATFORM(LINUX) +#if OS(LINUX) #include "RenderThemeChromiumLinux.h" #endif #include "KeyboardCodesPosix.h" @@ -129,6 +131,10 @@ static const double maxTextSizeMultiplier = 3.0; // one page group. const char* pageGroupName = "default"; +// Used to defer all page activity in cases where the embedder wishes to run +// a nested event loop. +static PageGroupLoadDeferrer* pageGroupLoadDeferrer; + // Ensure that the WebDragOperation enum values stay in sync with the original // DragOperation constants. #define COMPILE_ASSERT_MATCHING_ENUM(coreName) \ @@ -174,6 +180,28 @@ void WebView::resetVisitedLinkState() Page::allVisitedStateChanged(PageGroup::pageGroup(pageGroupName)); } +void WebView::willEnterModalLoop() +{ + // It is not valid to nest more than once. + ASSERT(!pageGroupLoadDeferrer); + + PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); + ASSERT(pageGroup); + ASSERT(!pageGroup->pages().isEmpty()); + + // Pick any page in the page group since we are deferring all pages. + pageGroupLoadDeferrer = new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true); +} + +void WebView::didExitModalLoop() +{ + // The embedder must have called willEnterNestedEventLoop. + ASSERT(pageGroupLoadDeferrer); + + delete pageGroupLoadDeferrer; + pageGroupLoadDeferrer = 0; +} + void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient) { // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame @@ -327,12 +355,12 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event) // Dispatch the contextmenu event regardless of if the click was swallowed. // On Windows, we handle it on mouse up, not down. -#if PLATFORM(DARWIN) +#if OS(DARWIN) if (event.button == WebMouseEvent::ButtonRight || (event.button == WebMouseEvent::ButtonLeft && event.modifiers & WebMouseEvent::ControlKey)) mouseContextMenu(event); -#elif PLATFORM(LINUX) +#elif OS(LINUX) if (event.button == WebMouseEvent::ButtonRight) mouseContextMenu(event); #endif @@ -355,7 +383,7 @@ void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) else targetFrame = m_page->focusController()->focusedOrMainFrame(); -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) targetFrame->view()->setCursor(pointerCursor()); #endif @@ -371,7 +399,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event) if (!mainFrameImpl() || !mainFrameImpl()->frameView()) return; -#if PLATFORM(LINUX) +#if OS(LINUX) // If the event was a middle click, attempt to copy text into the focused // frame. We execute this before we let the page have a go at the event // because the page may change what is focused during in its event handler. @@ -390,14 +418,14 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event) // handleMouseReleaseEvent() earlier in this function if (event.button == WebMouseEvent::ButtonMiddle) { Frame* focused = focusedWebCoreFrame(); + FrameView* view = m_page->mainFrame()->view(); IntPoint clickPoint(m_lastMouseDownPoint.x, m_lastMouseDownPoint.y); - clickPoint = m_page->mainFrame()->view()->windowToContents(clickPoint); - HitTestResult hitTestResult = - focused->eventHandler()->hitTestResultAtPoint(clickPoint, false, false, - ShouldHitTestScrollbars); + IntPoint contentPoint = view->windowToContents(clickPoint); + HitTestResult hitTestResult = focused->eventHandler()->hitTestResultAtPoint(contentPoint, false, false, ShouldHitTestScrollbars); // We don't want to send a paste when middle clicking a scroll bar or a - // link (which will navigate later in the code). - if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused) { + // link (which will navigate later in the code). The main scrollbars + // have to be handled separately. + if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused && !view->scrollbarAtPoint(clickPoint)) { Editor* editor = focused->editor(); Pasteboard* pasteboard = Pasteboard::generalPasteboard(); bool oldSelectionMode = pasteboard->isSelectionMode(); @@ -412,7 +440,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event) mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent( PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) // Dispatch the contextmenu event regardless of if the click was swallowed. // On Mac/Linux, we handle it on mouse down, not up. if (event.button == WebMouseEvent::ButtonRight) @@ -452,9 +480,17 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) if (!handler) return keyEventDefault(event); -#if PLATFORM(WIN_OS) || PLATFORM(LINUX) - if ((!event.modifiers && (event.windowsKeyCode == VKEY_APPS)) - || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) { +#if OS(WINDOWS) || OS(LINUX) + const WebInputEvent::Type contextMenuTriggeringEventType = +#if OS(WINDOWS) + WebInputEvent::KeyUp; +#elif OS(LINUX) + WebInputEvent::RawKeyDown; +#endif + + if (((!event.modifiers && (event.windowsKeyCode == VKEY_APPS)) + || ((event.modifiers == WebInputEvent::ShiftKey) && (event.windowsKeyCode == VKEY_F10))) + && event.type == contextMenuTriggeringEventType) { sendContextMenuEvent(event); return true; } @@ -574,7 +610,7 @@ bool WebViewImpl::charEvent(const WebKeyboardEvent& event) // // This function is an ugly copy/paste and should be cleaned up when the // WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438 -#if PLATFORM(WIN_OS) || PLATFORM(LINUX) +#if OS(WINDOWS) || OS(LINUX) // FIXME: implement on Mac bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event) { @@ -585,22 +621,19 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event) return false; IntPoint coords(-1, -1); -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) int rightAligned = ::GetSystemMetrics(SM_MENUDROPALIGNMENT); #else int rightAligned = 0; #endif IntPoint location; - // The context menu event was generated from the keyboard, so show the - // context menu by the current selection. - Position start = mainFrameImpl->selection()->selection().start(); - Position end = mainFrameImpl->selection()->selection().end(); Frame* focusedFrame = page()->focusController()->focusedOrMainFrame(); Node* focusedNode = focusedFrame->document()->focusedNode(); + Position start = mainFrameImpl->selection()->selection().start(); - if (start.node() && end.node()) { + if (focusedFrame->editor() && focusedFrame->editor()->canEdit() && start.node()) { RenderObject* renderer = start.node()->renderer(); if (!renderer) return false; @@ -1641,13 +1674,26 @@ bool WebViewImpl::isActive() const void WebViewImpl::setScrollbarColors(unsigned inactiveColor, unsigned activeColor, unsigned trackColor) { -#if PLATFORM(LINUX) +#if OS(LINUX) RenderThemeChromiumLinux::setScrollbarColors(inactiveColor, activeColor, trackColor); #endif } +void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, + unsigned activeForegroundColor, + unsigned inactiveBackgroundColor, + unsigned inactiveForegroundColor) { +#if OS(LINUX) + RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor, + activeForegroundColor, + inactiveBackgroundColor, + inactiveForegroundColor); + theme()->platformColorsDidChange(); +#endif +} + void WebViewImpl::didCommitLoad(bool* isNewNavigation) { if (isNewNavigation) @@ -1666,9 +1712,9 @@ bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button, bool alt, bool meta, WebNavigationPolicy* policy) { -#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(FREEBSD) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) const bool newTabModifier = (button == 1) || ctrl; -#elif PLATFORM(DARWIN) +#elif OS(DARWIN) const bool newTabModifier = (button == 1) || meta; #endif if (!newTabModifier && !shift && !alt) diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h index dd5191e..ed5cc5f 100644 --- a/WebKit/chromium/src/WebViewImpl.h +++ b/WebKit/chromium/src/WebViewImpl.h @@ -157,6 +157,10 @@ public: virtual void setScrollbarColors(unsigned inactiveColor, unsigned activeColor, unsigned trackColor); + virtual void setSelectionColors(unsigned activeBackgroundColor, + unsigned activeForegroundColor, + unsigned inactiveBackgroundColor, + unsigned inactiveForegroundColor); virtual void performCustomContextMenuAction(unsigned action); // WebViewImpl diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp index 85a263b..7fd3749 100644 --- a/WebKit/chromium/src/WebWorkerBase.cpp +++ b/WebKit/chromium/src/WebWorkerBase.cpp @@ -132,8 +132,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url) int len = static_cast<int>(content.length()); RefPtr<SharedBuffer> buf(SharedBuffer::create(content.data(), len)); SubstituteData substData(buf, String("text/html"), String("UTF-8"), KURL()); - ResourceRequest request(url, CString()); - webFrame->frame()->loader()->load(request, substData, false); + webFrame->frame()->loader()->load(ResourceRequest(url), substData, false); // This document will be used as 'loading context' for the worker. m_loadingDocument = webFrame->frame()->document(); @@ -158,7 +157,7 @@ void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> PassOwnPtr<MessagePortChannelArray> channels) { dispatchTaskToMainThread(createCallbackTask(&postMessageTask, this, - message->toString(), channels)); + message->toWireString(), channels)); } void WebWorkerBase::postMessageTask(ScriptExecutionContext* context, diff --git a/WebKit/chromium/src/WebWorkerClientImpl.cpp b/WebKit/chromium/src/WebWorkerClientImpl.cpp index 6be03a7..598a078 100644 --- a/WebKit/chromium/src/WebWorkerClientImpl.cpp +++ b/WebKit/chromium/src/WebWorkerClientImpl.cpp @@ -173,7 +173,7 @@ void WebWorkerClientImpl::postMessageToWorkerContext( if (!isMainThread()) { WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&postMessageToWorkerContextTask, this, - message->toString(), + message->toWireString(), channels)); return; } @@ -184,7 +184,7 @@ void WebWorkerClientImpl::postMessageToWorkerContext( webchannel->setClient(0); webChannels[i] = webchannel; } - m_webWorker->postMessageToWorkerContext(message->toString(), webChannels); + m_webWorker->postMessageToWorkerContext(message->toWireString(), webChannels); } bool WebWorkerClientImpl::hasPendingActivity() const @@ -356,7 +356,7 @@ void WebWorkerClientImpl::postMessageToWorkerObjectTask( OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*context, channels.release()); RefPtr<SerializedScriptValue> serializedMessage = - SerializedScriptValue::create(message); + SerializedScriptValue::createFromWire(message); thisPtr->m_worker->dispatchEvent(MessageEvent::create(ports.release(), serializedMessage.release())); } diff --git a/WebKit/chromium/src/WebWorkerImpl.cpp b/WebKit/chromium/src/WebWorkerImpl.cpp index 744be30..5b5e053 100644 --- a/WebKit/chromium/src/WebWorkerImpl.cpp +++ b/WebKit/chromium/src/WebWorkerImpl.cpp @@ -88,7 +88,7 @@ void WebWorkerImpl::postMessageToWorkerContextTask(WebCore::ScriptExecutionConte OwnPtr<MessagePortArray> ports = MessagePort::entanglePorts(*context, channels.release()); RefPtr<SerializedScriptValue> serializedMessage = - SerializedScriptValue::create(message); + SerializedScriptValue::createFromWire(message); workerContext->dispatchEvent(MessageEvent::create( ports.release(), serializedMessage.release())); thisPtr->confirmMessageFromWorkerObject(workerContext->hasPendingActivity()); diff --git a/WebKit/chromium/src/mac/WebInputEventFactory.mm b/WebKit/chromium/src/mac/WebInputEventFactory.mm index d618228..46b0afe 100644 --- a/WebKit/chromium/src/mac/WebInputEventFactory.mm +++ b/WebKit/chromium/src/mac/WebInputEventFactory.mm @@ -92,6 +92,9 @@ static bool isKeypadEvent(NSEvent* event) return false; } + if ([event modifierFlags] & NSNumericPadKeyMask) + return true; + switch ([event keyCode]) { case 71: // Clear case 81: // = diff --git a/WebKit/chromium/tests/KURLTest.cpp b/WebKit/chromium/tests/KURLTest.cpp new file mode 100644 index 0000000..b316683 --- /dev/null +++ b/WebKit/chromium/tests/KURLTest.cpp @@ -0,0 +1,611 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// Basic tests that verify our KURL's interface behaves the same as the +// original KURL's. + +#include "config.h" + +#include <gtest/gtest.h> + +#include "KURL.h" + +namespace { + +// Output stream operator so gTest's macros work with WebCore strings. +std::ostream& operator<<(std::ostream& out, const WebCore::String& str) +{ + return str.isEmpty() ? out : out << str.utf8().data(); +} + +struct ComponentCase { + const char* url; + const char* protocol; + const char* host; + const int port; + const char* user; + const char* pass; + const char* path; + const char* lastPath; + const char* query; + const char* ref; +}; + +// Test the cases where we should be the same as WebKit's old KURL. +TEST(KURLTest, SameGetters) +{ + struct GetterCase { + const char* url; + const char* protocol; + const char* host; + int port; + const char* user; + const char* pass; + const char* lastPathComponent; + const char* query; + const char* ref; + bool hasRef; + } cases[] = { + {"http://www.google.com/foo/blah?bar=baz#ref", "http", "www.google.com", 0, "", 0, "blah", "bar=baz", "ref", true}, + {"http://foo.com:1234/foo/bar/", "http", "foo.com", 1234, "", 0, "bar", 0, 0, false}, + {"http://www.google.com?#", "http", "www.google.com", 0, "", 0, 0, "", "", true}, + {"https://me:pass@google.com:23#foo", "https", "google.com", 23, "me", "pass", 0, 0, "foo", true}, + {"javascript:hello!//world", "javascript", "", 0, "", 0, "world", 0, 0, false}, + }; + + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { + // UTF-8 + WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); + + EXPECT_EQ(cases[i].protocol, kurl.protocol()); + EXPECT_EQ(cases[i].host, kurl.host()); + EXPECT_EQ(cases[i].port, kurl.port()); + EXPECT_EQ(cases[i].user, kurl.user()); + EXPECT_EQ(cases[i].pass, kurl.pass()); + EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent()); + EXPECT_EQ(cases[i].query, kurl.query()); + EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier()); + EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier()); + + // UTF-16 + WebCore::String utf16(cases[i].url); + kurl = WebCore::KURL(WebCore::ParsedURLString, utf16); + + EXPECT_EQ(cases[i].protocol, kurl.protocol()); + EXPECT_EQ(cases[i].host, kurl.host()); + EXPECT_EQ(cases[i].port, kurl.port()); + EXPECT_EQ(cases[i].user, kurl.user()); + EXPECT_EQ(cases[i].pass, kurl.pass()); + EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent()); + EXPECT_EQ(cases[i].query, kurl.query()); + EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier()); + EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier()); + } +} + +// Test a few cases where we're different just to make sure we give reasonable +// output. +TEST(KURLTest, DifferentGetters) +{ + ComponentCase cases[] = { + // url protocol host port user pass path lastPath query ref + + // Old WebKit allows references and queries in what we call "path" URLs + // like javascript, so the path here will only consist of "hello!". + {"javascript:hello!?#/\\world", "javascript", "", 0, "", 0, "hello!?#/\\world", "world", 0, 0}, + + // Old WebKit doesn't handle "parameters" in paths, so will + // disagree with us about where the path is for this URL. + {"http://a.com/hello;world", "http", "a.com", 0, "", 0, "/hello;world", "hello", 0, 0}, + + // WebKit doesn't like UTF-8 or UTF-16 input. + {"http://\xe4\xbd\xa0\xe5\xa5\xbd\xe4\xbd\xa0\xe5\xa5\xbd/", "http", "xn--6qqa088eba", 0, "", 0, "/", 0, 0, 0}, + + // WebKit %-escapes non-ASCII characters in reference, but we don't. + {"http://www.google.com/foo/blah?bar=baz#\xce\xb1\xce\xb2", "http", "www.google.com", 0, "", 0, "/foo/blah/", "blah", "bar=baz", "\xce\xb1\xce\xb2"}, + }; + + for (size_t i = 0; i < arraysize(cases); i++) { + WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); + + EXPECT_EQ(cases[i].protocol, kurl.protocol()); + EXPECT_EQ(cases[i].host, kurl.host()); + EXPECT_EQ(cases[i].port, kurl.port()); + EXPECT_EQ(cases[i].user, kurl.user()); + EXPECT_EQ(cases[i].pass, kurl.pass()); + EXPECT_EQ(cases[i].lastPath, kurl.lastPathComponent()); + EXPECT_EQ(cases[i].query, kurl.query()); + // Want to compare UCS-16 refs (or to null). + if (cases[i].ref) + EXPECT_EQ(WebCore::String::fromUTF8(cases[i].ref), kurl.fragmentIdentifier()); + else + EXPECT_TRUE(kurl.fragmentIdentifier().isNull()); + } +} + +// Ensures that both ASCII and UTF-8 canonical URLs are handled properly and we +// get the correct string object out. +TEST(KURLTest, UTF8) +{ + const char asciiURL[] = "http://foo/bar#baz"; + WebCore::KURL asciiKURL(WebCore::ParsedURLString, asciiURL); + EXPECT_TRUE(asciiKURL.string() == WebCore::String(asciiURL)); + + // When the result is ASCII, we should get an ASCII String. Some + // code depends on being able to compare the result of the .string() + // getter with another String, and the isASCIIness of the two + // strings must match for these functions (like equalIgnoringCase). + EXPECT_TRUE(WebCore::equalIgnoringCase(asciiKURL, WebCore::String(asciiURL))); + + // Reproduce code path in FrameLoader.cpp -- equalIgnoringCase implicitly + // expects gkurl.protocol() to have been created as ascii. + WebCore::KURL mailto(WebCore::ParsedURLString, "mailto:foo@foo.com"); + EXPECT_TRUE(WebCore::equalIgnoringCase(mailto.protocol(), "mailto")); + + const char utf8URL[] = "http://foo/bar#\xe4\xbd\xa0\xe5\xa5\xbd"; + WebCore::KURL utf8KURL(WebCore::ParsedURLString, utf8URL); + + EXPECT_TRUE(utf8KURL.string() == WebCore::String::fromUTF8(utf8URL)); +} + +TEST(KURLTest, Setters) +{ + // Replace the starting URL with the given components one at a time and + // verify that we're always the same as the old KURL. + // + // Note that old KURL won't canonicalize the default port away, so we + // can't set setting the http port to "80" (or even "0"). + // + // We also can't test clearing the query. + // + // The format is every other row is a test, and the row that follows it is the + // expected result. + struct ExpectedComponentCase { + const char* url; + const char* protocol; + const char* host; + const int port; + const char* user; + const char* pass; + const char* path; + const char* query; + const char* ref; + + // The full expected URL with the given "set" applied. + const char* expectedProtocol; + const char* expectedHost; + const char* expectedPort; + const char* expectedUser; + const char* expectedPass; + const char* expectedPath; + const char* expectedQuery; + const char* expectedRef; + } cases[] = { + // url protocol host port user pass path query ref + {"http://www.google.com/", "https", "news.google.com", 8888, "me", "pass", "/foo", "?q=asdf", "heehee", + "https://www.google.com/", + "https://news.google.com/", + "https://news.google.com:8888/", + "https://me@news.google.com:8888/", + "https://me:pass@news.google.com:8888/", + "https://me:pass@news.google.com:8888/foo", + "https://me:pass@news.google.com:8888/foo?q=asdf", + "https://me:pass@news.google.com:8888/foo?q=asdf#heehee"}, + + {"https://me:pass@google.com:88/a?f#b", "http", "goo.com", 92, "", "", "/", 0, "", + "http://me:pass@google.com:88/a?f#b", + "http://me:pass@goo.com:88/a?f#b", + "http://me:pass@goo.com:92/a?f#b", + "http://:pass@goo.com:92/a?f#b", + "http://goo.com:92/a?f#b", + "http://goo.com:92/?f#b", + "http://goo.com:92/#b", + "https://goo.com:92/"}, + }; + + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { + WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); + + kurl.setProtocol(cases[i].protocol); + EXPECT_STREQ(cases[i].expectedProtocol, kurl.string().utf8().data()); + + kurl.setHost(cases[i].host); + EXPECT_STREQ(cases[i].expectedHost, kurl.string().utf8().data()); + + kurl.setPort(cases[i].port); + EXPECT_STREQ(cases[i].expectedPort, kurl.string().utf8().data()); + + kurl.setUser(cases[i].user); + EXPECT_STREQ(cases[i].expectedUser, kurl.string().utf8().data()); + + kurl.setPass(cases[i].pass); + EXPECT_STREQ(cases[i].expectedPass, kurl.string().utf8().data()); + + kurl.setPath(cases[i].path); + EXPECT_STREQ(cases[i].expectedPath, kurl.string().utf8().data()); + + kurl.setQuery(cases[i].query); + EXPECT_STREQ(cases[i].expectedQuery, kurl.string().utf8().data()); + + // Refs are tested below. On the Safari 3.1 branch, we don't match their + // KURL since we integrated a fix from their trunk. + } +} + +// Tests that KURL::decodeURLEscapeSequences works as expected +#if USE(GOOGLEURL) +TEST(KURLTest, Decode) +{ + struct DecodeCase { + const char* input; + const char* output; + } decodeCases[] = { + {"hello, world", "hello, world"}, + {"%01%02%03%04%05%06%07%08%09%0a%0B%0C%0D%0e%0f/", "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0B\x0C\x0D\x0e\x0f/"}, + {"%10%11%12%13%14%15%16%17%18%19%1a%1B%1C%1D%1e%1f/", "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1B\x1C\x1D\x1e\x1f/"}, + {"%20%21%22%23%24%25%26%27%28%29%2a%2B%2C%2D%2e%2f/", " !\"#$%&'()*+,-.//"}, + {"%30%31%32%33%34%35%36%37%38%39%3a%3B%3C%3D%3e%3f/", "0123456789:;<=>?/"}, + {"%40%41%42%43%44%45%46%47%48%49%4a%4B%4C%4D%4e%4f/", "@ABCDEFGHIJKLMNO/"}, + {"%50%51%52%53%54%55%56%57%58%59%5a%5B%5C%5D%5e%5f/", "PQRSTUVWXYZ[\\]^_/"}, + {"%60%61%62%63%64%65%66%67%68%69%6a%6B%6C%6D%6e%6f/", "`abcdefghijklmno/"}, + {"%70%71%72%73%74%75%76%77%78%79%7a%7B%7C%7D%7e%7f/", "pqrstuvwxyz{|}~\x7f/"}, + // Test un-UTF-8-ization. + {"%e4%bd%a0%e5%a5%bd", "\xe4\xbd\xa0\xe5\xa5\xbd"}, + }; + + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(decodeCases); i++) { + WebCore::String input(decodeCases[i].input); + WebCore::String str = WebCore::decodeURLEscapeSequences(input); + EXPECT_STREQ(decodeCases[i].output, str.utf8().data()); + } + + // Our decode should decode %00 + WebCore::String zero = WebCore::decodeURLEscapeSequences("%00"); + EXPECT_STRNE("%00", zero.utf8().data()); + + // Test the error behavior for invalid UTF-8 (we differ from WebKit here). + WebCore::String invalid = WebCore::decodeURLEscapeSequences( + "%e4%a0%e5%a5%bd"); + char16 invalidExpectedHelper[4] = { 0x00e4, 0x00a0, 0x597d, 0 }; + WebCore::String invalidExpected( + reinterpret_cast<const ::UChar*>(invalidExpectedHelper), + 3); + EXPECT_EQ(invalidExpected, invalid); +} +#endif + +TEST(KURLTest, Encode) +{ + // Also test that it gets converted to UTF-8 properly. + char16 wideInputHelper[3] = { 0x4f60, 0x597d, 0 }; + WebCore::String wideInput( + reinterpret_cast<const ::UChar*>(wideInputHelper), 2); + WebCore::String wideReference("\xe4\xbd\xa0\xe5\xa5\xbd", 6); + WebCore::String wideOutput = + WebCore::encodeWithURLEscapeSequences(wideInput); + EXPECT_EQ(wideReference, wideOutput); + + // Our encode only escapes NULLs for safety (see the implementation for + // more), so we only bother to test a few cases. + WebCore::String input( + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 16); + WebCore::String reference( + "%00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 18); + WebCore::String output = WebCore::encodeWithURLEscapeSequences(input); + EXPECT_EQ(reference, output); +} + +TEST(KURLTest, ResolveEmpty) +{ + WebCore::KURL emptyBase; + + // WebKit likes to be able to resolve absolute input agains empty base URLs, + // which would normally be invalid since the base URL is invalid. + const char abs[] = "http://www.google.com/"; + WebCore::KURL resolveAbs(emptyBase, abs); + EXPECT_TRUE(resolveAbs.isValid()); + EXPECT_STREQ(abs, resolveAbs.string().utf8().data()); + + // Resolving a non-relative URL agains the empty one should still error. + const char rel[] = "foo.html"; + WebCore::KURL resolveErr(emptyBase, rel); + EXPECT_FALSE(resolveErr.isValid()); +} + +// WebKit will make empty URLs and set components on them. kurl doesn't allow +// replacements on invalid URLs, but here we do. +TEST(KURLTest, ReplaceInvalid) +{ + WebCore::KURL kurl; + + EXPECT_FALSE(kurl.isValid()); + EXPECT_TRUE(kurl.isEmpty()); + EXPECT_STREQ("", kurl.string().utf8().data()); + + kurl.setProtocol("http"); + // GKURL will say that a URL with just a scheme is invalid, KURL will not. +#if USE(GOOGLEURL) + EXPECT_FALSE(kurl.isValid()); +#else + EXPECT_TRUE(kurl.isValid()); +#endif + EXPECT_FALSE(kurl.isEmpty()); + // At this point, we do things slightly differently if there is only a scheme. + // We check the results here to make it more obvious what is going on, but it + // shouldn't be a big deal if these change. +#if USE(GOOGLEURL) + EXPECT_STREQ("http:", kurl.string().utf8().data()); +#else + EXPECT_STREQ("http:/", kurl.string().utf8().data()); +#endif + + kurl.setHost("www.google.com"); + EXPECT_TRUE(kurl.isValid()); + EXPECT_FALSE(kurl.isEmpty()); + EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data()); + + kurl.setPort(8000); + EXPECT_TRUE(kurl.isValid()); + EXPECT_FALSE(kurl.isEmpty()); + EXPECT_STREQ("http://www.google.com:8000/", kurl.string().utf8().data()); + + kurl.setPath("/favicon.ico"); + EXPECT_TRUE(kurl.isValid()); + EXPECT_FALSE(kurl.isEmpty()); + EXPECT_STREQ("http://www.google.com:8000/favicon.ico", kurl.string().utf8().data()); + + // Now let's test that giving an invalid replacement still fails. +#if USE(GOOGLEURL) + kurl.setProtocol("f/sj#@"); + EXPECT_FALSE(kurl.isValid()); +#endif +} + +TEST(KURLTest, Path) +{ + const char initial[] = "http://www.google.com/path/foo"; + WebCore::KURL kurl(WebCore::ParsedURLString, initial); + + // Clear by setting a null string. + WebCore::String nullString; + EXPECT_TRUE(nullString.isNull()); + kurl.setPath(nullString); + EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data()); +} + +// Test that setting the query to different things works. Thq query is handled +// a littler differently than some of the other components. +TEST(KURLTest, Query) +{ + const char initial[] = "http://www.google.com/search?q=awesome"; + WebCore::KURL kurl(WebCore::ParsedURLString, initial); + + // Clear by setting a null string. + WebCore::String nullString; + EXPECT_TRUE(nullString.isNull()); + kurl.setQuery(nullString); + EXPECT_STREQ("http://www.google.com/search", kurl.string().utf8().data()); + + // Clear by setting an empty string. + kurl = WebCore::KURL(WebCore::ParsedURLString, initial); + WebCore::String emptyString(""); + EXPECT_FALSE(emptyString.isNull()); + kurl.setQuery(emptyString); + EXPECT_STREQ("http://www.google.com/search?", kurl.string().utf8().data()); + + // Set with something that begins in a question mark. + const char question[] = "?foo=bar"; + kurl.setQuery(question); + EXPECT_STREQ("http://www.google.com/search?foo=bar", + kurl.string().utf8().data()); + + // Set with something that doesn't begin in a question mark. + const char query[] = "foo=bar"; + kurl.setQuery(query); + EXPECT_STREQ("http://www.google.com/search?foo=bar", + kurl.string().utf8().data()); +} + +TEST(KURLTest, Ref) +{ + WebCore::KURL kurl(WebCore::ParsedURLString, "http://foo/bar#baz"); + + // Basic ref setting. + WebCore::KURL cur(WebCore::ParsedURLString, "http://foo/bar"); + cur.setFragmentIdentifier("asdf"); + EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data()); + cur = kurl; + cur.setFragmentIdentifier("asdf"); + EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data()); + + // Setting a ref to the empty string will set it to "#". + cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar"); + cur.setFragmentIdentifier(""); + EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data()); + cur = kurl; + cur.setFragmentIdentifier(""); + EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data()); + + // Setting the ref to the null string will clear it altogether. + cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar"); + cur.setFragmentIdentifier(WebCore::String()); + EXPECT_STREQ("http://foo/bar", cur.string().utf8().data()); + cur = kurl; + cur.setFragmentIdentifier(WebCore::String()); + EXPECT_STREQ("http://foo/bar", cur.string().utf8().data()); +} + +TEST(KURLTest, Empty) +{ + WebCore::KURL kurl; + + // First test that regular empty URLs are the same. + EXPECT_TRUE(kurl.isEmpty()); + EXPECT_FALSE(kurl.isValid()); + EXPECT_TRUE(kurl.isNull()); + EXPECT_TRUE(kurl.string().isNull()); + EXPECT_TRUE(kurl.string().isEmpty()); + + // Test resolving a null URL on an empty string. + WebCore::KURL kurl2(kurl, ""); + EXPECT_FALSE(kurl2.isNull()); + EXPECT_TRUE(kurl2.isEmpty()); + EXPECT_FALSE(kurl2.isValid()); + EXPECT_FALSE(kurl2.string().isNull()); + EXPECT_TRUE(kurl2.string().isEmpty()); + EXPECT_FALSE(kurl2.string().isNull()); + EXPECT_TRUE(kurl2.string().isEmpty()); + + // Resolve the null URL on a null string. + WebCore::KURL kurl22(kurl, WebCore::String()); + EXPECT_FALSE(kurl22.isNull()); + EXPECT_TRUE(kurl22.isEmpty()); + EXPECT_FALSE(kurl22.isValid()); + EXPECT_FALSE(kurl22.string().isNull()); + EXPECT_TRUE(kurl22.string().isEmpty()); + EXPECT_FALSE(kurl22.string().isNull()); + EXPECT_TRUE(kurl22.string().isEmpty()); + + // Test non-hierarchical schemes resolving. The actual URLs will be different. + // WebKit's one will set the string to "something.gif" and we'll set it to an + // empty string. I think either is OK, so we just check our behavior. +#if USE(GOOGLEURL) + WebCore::KURL kurl3(WebCore::KURL(WebCore::ParsedURLString, "data:foo"), + "something.gif"); + EXPECT_TRUE(kurl3.isEmpty()); + EXPECT_FALSE(kurl3.isValid()); +#endif + + // Test for weird isNull string input, + // see: http://bugs.webkit.org/show_bug.cgi?id=16487 + WebCore::KURL kurl4(WebCore::ParsedURLString, kurl.string()); + EXPECT_TRUE(kurl4.isEmpty()); + EXPECT_FALSE(kurl4.isValid()); + EXPECT_TRUE(kurl4.string().isNull()); + EXPECT_TRUE(kurl4.string().isEmpty()); + + // Resolving an empty URL on an invalid string. + WebCore::KURL kurl5(WebCore::KURL(), "foo.js"); + // We'll be empty in this case, but KURL won't be. Should be OK. + // EXPECT_EQ(kurl5.isEmpty(), kurl5.isEmpty()); + // EXPECT_EQ(kurl5.string().isEmpty(), kurl5.string().isEmpty()); + EXPECT_FALSE(kurl5.isValid()); + EXPECT_FALSE(kurl5.string().isNull()); + + // Empty string as input + WebCore::KURL kurl6(WebCore::ParsedURLString, ""); + EXPECT_TRUE(kurl6.isEmpty()); + EXPECT_FALSE(kurl6.isValid()); + EXPECT_FALSE(kurl6.string().isNull()); + EXPECT_TRUE(kurl6.string().isEmpty()); + + // Non-empty but invalid C string as input. + WebCore::KURL kurl7(WebCore::ParsedURLString, "foo.js"); + // WebKit will actually say this URL has the string "foo.js" but is invalid. + // We don't do that. + // EXPECT_EQ(kurl7.isEmpty(), kurl7.isEmpty()); + EXPECT_FALSE(kurl7.isValid()); + EXPECT_FALSE(kurl7.string().isNull()); +} + +TEST(KURLTest, UserPass) +{ + const char* src = "http://user:pass@google.com/"; + WebCore::KURL kurl(WebCore::ParsedURLString, src); + + // Clear just the username. + kurl.setUser(""); + EXPECT_EQ("http://:pass@google.com/", kurl.string()); + + // Clear just the password. + kurl = WebCore::KURL(WebCore::ParsedURLString, src); + kurl.setPass(""); + EXPECT_EQ("http://user@google.com/", kurl.string()); + + // Now clear both. + kurl.setUser(""); + EXPECT_EQ("http://google.com/", kurl.string()); +} + +TEST(KURLTest, Offsets) +{ + const char* src1 = "http://user:pass@google.com/foo/bar.html?baz=query#ref"; + WebCore::KURL kurl1(WebCore::ParsedURLString, src1); + + EXPECT_EQ(17u, kurl1.hostStart()); + EXPECT_EQ(27u, kurl1.hostEnd()); + EXPECT_EQ(27u, kurl1.pathStart()); + EXPECT_EQ(40u, kurl1.pathEnd()); + EXPECT_EQ(32u, kurl1.pathAfterLastSlash()); + + const char* src2 = "http://google.com/foo/"; + WebCore::KURL kurl2(WebCore::ParsedURLString, src2); + + EXPECT_EQ(7u, kurl2.hostStart()); + EXPECT_EQ(17u, kurl2.hostEnd()); + EXPECT_EQ(17u, kurl2.pathStart()); + EXPECT_EQ(22u, kurl2.pathEnd()); + EXPECT_EQ(22u, kurl2.pathAfterLastSlash()); + + const char* src3 = "javascript:foobar"; + WebCore::KURL kurl3(WebCore::ParsedURLString, src3); + + EXPECT_EQ(11u, kurl3.hostStart()); + EXPECT_EQ(11u, kurl3.hostEnd()); + EXPECT_EQ(11u, kurl3.pathStart()); + EXPECT_EQ(17u, kurl3.pathEnd()); + EXPECT_EQ(11u, kurl3.pathAfterLastSlash()); +} + +TEST(KURLTest, DeepCopy) +{ + const char url[] = "http://www.google.com/"; + WebCore::KURL src(WebCore::ParsedURLString, url); + EXPECT_TRUE(src.string() == url); // This really just initializes the cache. + WebCore::KURL dest = src.copy(); + EXPECT_TRUE(dest.string() == url); // This really just initializes the cache. + + // The pointers should be different for both UTF-8 and UTF-16. + EXPECT_NE(dest.string().characters(), src.string().characters()); + EXPECT_NE(dest.utf8String().data(), src.utf8String().data()); +} + +TEST(KURLTest, ProtocolIs) +{ + WebCore::KURL url1(WebCore::ParsedURLString, "foo://bar"); + EXPECT_TRUE(url1.protocolIs("foo")); + EXPECT_FALSE(url1.protocolIs("foo-bar")); + + WebCore::KURL url2(WebCore::ParsedURLString, "foo-bar:"); + EXPECT_TRUE(url2.protocolIs("foo-bar")); + EXPECT_FALSE(url2.protocolIs("foo")); +} + +} // namespace diff --git a/WebKit/chromium/tests/KeyboardTest.cpp b/WebKit/chromium/tests/KeyboardTest.cpp new file mode 100644 index 0000000..07bed3c --- /dev/null +++ b/WebKit/chromium/tests/KeyboardTest.cpp @@ -0,0 +1,213 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include <gtest/gtest.h> + +#include "EditorClientImpl.h" +#include "EventTarget.h" +#include "KeyboardCodes.h" +#include "KeyboardEvent.h" +#include "WebInputEvent.h" +#include "WebInputEventConversion.h" + +using namespace WebCore; +using namespace WebKit; + +namespace { + +class KeyboardTest : public testing::Test { +public: + + // Pass a WebKeyboardEvent into the EditorClient and get back the string + // name of which editing event that key causes. + // E.g., sending in the enter key gives back "InsertNewline". + const char* interpretKeyEvent( + const WebKeyboardEvent& webKeyboardEvent, + PlatformKeyboardEvent::Type keyType) + { + EditorClientImpl editorImpl(0); + PlatformKeyboardEventBuilder evt(webKeyboardEvent); + evt.setKeyType(keyType); + RefPtr<KeyboardEvent> keyboardEvent = KeyboardEvent::create(evt, 0); + return editorImpl.interpretKeyEvent(keyboardEvent.get()); + } + + // Set up a WebKeyboardEvent KEY_DOWN event with key code and modifiers. + void setupKeyDownEvent(WebKeyboardEvent* keyboardEvent, + char keyCode, + int modifiers) + { + keyboardEvent->windowsKeyCode = keyCode; + keyboardEvent->modifiers = modifiers; + keyboardEvent->type = WebInputEvent::KeyDown; + keyboardEvent->text[0] = keyCode; + keyboardEvent->setKeyIdentifierFromWindowsKeyCode(); + } + + // Like interpretKeyEvent, but with pressing down OSModifier+|keyCode|. + // OSModifier is the platform's standard modifier key: control on most + // platforms, but meta (command) on Mac. + const char* interpretOSModifierKeyPress(char keyCode) + { + WebKeyboardEvent keyboardEvent; +#if OS(DARWIN) + WebInputEvent::Modifiers osModifier = WebInputEvent::MetaKey; +#else + WebInputEvent::Modifiers osModifier = WebInputEvent::ControlKey; +#endif + setupKeyDownEvent(&keyboardEvent, keyCode, osModifier); + return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown); + } + + // Like interpretKeyEvent, but with pressing down ctrl+|keyCode|. + const char* interpretCtrlKeyPress(char keyCode) + { + WebKeyboardEvent keyboardEvent; + setupKeyDownEvent(&keyboardEvent, keyCode, WebInputEvent::ControlKey); + return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown); + } + + // Like interpretKeyEvent, but with typing a tab. + const char* interpretTab(int modifiers) + { + WebKeyboardEvent keyboardEvent; + setupKeyDownEvent(&keyboardEvent, '\t', modifiers); + return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char); + } + + // Like interpretKeyEvent, but with typing a newline. + const char* interpretNewLine(int modifiers) + { + WebKeyboardEvent keyboardEvent; + setupKeyDownEvent(&keyboardEvent, '\r', modifiers); + return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char); + } + + // A name for "no modifiers set". + static const int noModifiers = 0; +}; + +TEST_F(KeyboardTest, TestCtrlReturn) +{ + EXPECT_STREQ("InsertNewline", interpretCtrlKeyPress(0xD)); +} + +TEST_F(KeyboardTest, TestOSModifierZ) +{ +#if !OS(DARWIN) + EXPECT_STREQ("Undo", interpretOSModifierKeyPress('Z')); +#endif +} + +TEST_F(KeyboardTest, TestOSModifierY) +{ +#if !OS(DARWIN) + EXPECT_STREQ("Redo", interpretOSModifierKeyPress('Y')); +#endif +} + +TEST_F(KeyboardTest, TestOSModifierA) +{ +#if !OS(DARWIN) + EXPECT_STREQ("SelectAll", interpretOSModifierKeyPress('A')); +#endif +} + +TEST_F(KeyboardTest, TestOSModifierX) +{ +#if !OS(DARWIN) + EXPECT_STREQ("Cut", interpretOSModifierKeyPress('X')); +#endif +} + +TEST_F(KeyboardTest, TestOSModifierC) +{ +#if !OS(DARWIN) + EXPECT_STREQ("Copy", interpretOSModifierKeyPress('C')); +#endif +} + +TEST_F(KeyboardTest, TestOSModifierV) +{ +#if !OS(DARWIN) + EXPECT_STREQ("Paste", interpretOSModifierKeyPress('V')); +#endif +} + +TEST_F(KeyboardTest, TestEscape) +{ + WebKeyboardEvent keyboardEvent; + setupKeyDownEvent(&keyboardEvent, WebCore::VKEY_ESCAPE, noModifiers); + + const char* result = interpretKeyEvent(keyboardEvent, + PlatformKeyboardEvent::RawKeyDown); + EXPECT_STREQ("Cancel", result); +} + +TEST_F(KeyboardTest, TestInsertTab) +{ + EXPECT_STREQ("InsertTab", interpretTab(noModifiers)); +} + +TEST_F(KeyboardTest, TestInsertBackTab) +{ + EXPECT_STREQ("InsertBacktab", interpretTab(WebInputEvent::ShiftKey)); +} + +TEST_F(KeyboardTest, TestInsertNewline) +{ + EXPECT_STREQ("InsertNewline", interpretNewLine(noModifiers)); +} + +TEST_F(KeyboardTest, TestInsertNewline2) +{ + EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::ControlKey)); +} + +TEST_F(KeyboardTest, TestInsertLineBreak) +{ + EXPECT_STREQ("InsertLineBreak", interpretNewLine(WebInputEvent::ShiftKey)); +} + +TEST_F(KeyboardTest, TestInsertNewline3) +{ + EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::AltKey)); +} + +TEST_F(KeyboardTest, TestInsertNewline4) +{ + int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey; + const char* result = interpretNewLine(modifiers); + EXPECT_STREQ("InsertNewline", result); +} + +} // empty namespace diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp new file mode 100644 index 0000000..0f3f82f --- /dev/null +++ b/WebKit/chromium/tests/RunAllTests.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// FIXME: Avoid this source dependency on Chromium's base module. +#include <base/test/test_suite.h> + +#include "WebKit.h" +#include "WebKitClient.h" + +// WebKitClient has a protected destructor, so we need to subclass. +class DummyWebKitClient : public WebKit::WebKitClient { +}; + +int main(int argc, char** argv) +{ + DummyWebKitClient dummyClient; + WebKit::initialize(&dummyClient); + + int result = TestSuite(argc, argv).Run(); + + WebKit::shutdown(); + return result; +} diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog index a72e2c9..b112460 100644 --- a/WebKit/gtk/ChangeLog +++ b/WebKit/gtk/ChangeLog @@ -1,3 +1,572 @@ +<<<<<<< HEAD +======= +2010-01-27 Martin Robinson <mrobinson@webkit.org> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Expose the IM context via the API + https://bugs.webkit.org/show_bug.cgi?id=33327 + + Expose the GtkIMMultiContext as a property of WebKitWebView. This will + allow embedders to generate the input method context menu entries and + make testing certain IM context behavior possible. + + * webkit/webkitwebview.cpp: + (webkit_web_view_get_property): + (DNDContentsRequest::webkit_web_view_get_im_context): + (DNDContentsRequest::webkit_web_view_class_init): + +2010-01-19 Joanmarie Diggs <joanmarie.diggs@gmail.com> + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=30883 + [Gtk] Implement AtkText for HTML elements which contain text + + Adds two news tests. + + * tests/testatk.c + (testWebkitAtkGetTextInParagraphAndBodySimple): + (testWebkitAtkGetTextInParagraphAndBodyModerate): + (main): + +2010-01-19 Gustavo Noronha Silva <gns@gnome.org> + + Unreviewed. Changes to the test I forgot to make after a last + minute change before landing 53294 - this causes make distcheck to + fail. + + * tests/testloading.c: + (load_error_status_changed_cb): + (test_loading_error): + +2010-01-19 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Xan Lopez. + + News items for 1.1.19. + + * NEWS: + +2010-01-19 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Xan Lopez. + + [GTK] More crashes related to the clipboard management + https://bugs.webkit.org/show_bug.cgi?id=33746 + + Pass the WebKitWebView object (which is a GObject, thus + ref-counted) to the clipboard functions instead of passing the + Page - this allows us to explicitely protect the object inbetween + the clipboard call and its callbacks, which fixes the crash. + + * WebCoreSupport/EditorClientGtk.cpp: + (WebKit::EditorClient::respondToChangedSelection): + * WebCoreSupport/PasteboardHelperGtk.cpp: + (WebKit::getClipboardContentsCallback): + (WebKit::clearClipboardContentsCallback): + (WebKit::PasteboardHelperGtk::writeClipboardContents): + +2010-01-15 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + Original patch by David Ronis <david.ronis@mcgill.ca> + + Upgrade 1.1.17->1.1.18 fails: GTK_WIDGET_TOPLEVEL' was not declared in this scope + https://bugs.webkit.org/show_bug.cgi?id=33486 + + Deprecated symbols replaced for gtk+ versions over 2.18. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::windowRect): + * webkit/webkitprivate.cpp: + (currentToplevelCallback): + * webkit/webkitwebframe.cpp: + (webkit_web_frame_print_full): + (webkit_web_frame_print): + * webkit/webkitwebview.cpp: + (webkit_web_view_focus_in_event): + +2010-01-14 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Eric Seidel. + + [GTK] Crashes cleaning clipboard contents, with page cache enabled + https://bugs.webkit.org/show_bug.cgi?id=32900 + + Null-check the focus controller to avoid crashing. Could not find + a way to reproduce this consistently, thus no test. + + * WebCoreSupport/PasteboardHelperGtk.cpp: + (WebKit::clearClipboardContentsCallback): + +2010-01-14 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Oliver Hunter. + + [GTK] couple fixes for signal emissions, and property notifications + https://bugs.webkit.org/show_bug.cgi?id=33428 + + Do not emit signals and property notifications for error + pages. The notifications are not really useful for anything, you + can get them back by overriding the error pages, and it avoids a + number of hacks. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::FrameLoaderClient): + (WebKit::FrameLoaderClient::dispatchDidFinishLoad): + (WebKit::FrameLoaderClient::dispatchDidReceiveIcon): + (WebKit::FrameLoaderClient::dispatchDidStartProvisionalLoad): + (WebKit::FrameLoaderClient::dispatchDidReceiveTitle): + (WebKit::FrameLoaderClient::dispatchDidCommitLoad): + (WebKit::FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout): + (WebKit::FrameLoaderClient::dispatchDidFailLoad): + * WebCoreSupport/FrameLoaderClientGtk.h: + * tests/testloading.c: + (load_error_status_changed_cb): + (test_loading_error): + +2010-01-14 Martin Robinson <martin.james.robinson@gmail.com> + + Reviewed by Xan Lopez. + + [GTK] Enable DOM clipboard and drag-and-drop access + https://bugs.webkit.org/show_bug.cgi?id=30623 + + Use DataObjectGtk when setting and clearing pasteboard data on + the GDK_SELECTION_PRIMARY clipboard. + + * WebCoreSupport/EditorClientGtk.cpp: + (WebKit::EditorClient::respondToChangedSelection): + (WebKit::EditorClient::EditorClient): + * WebCoreSupport/EditorClientGtk.h: + * WebCoreSupport/PasteboardHelperGtk.cpp: + (WebKit::fillSelectionData): + (WebKit::targetListForDataObject): + (WebKit::getClipboardContentsCallback): + (WebKit::clearClipboardContentsCallback): + (WebKit::PasteboardHelperGtk::writeClipboardContents): + * WebCoreSupport/PasteboardHelperGtk.h: + +2010-01-14 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + Review the tooltip implementation + https://bugs.webkit.org/show_bug.cgi?id=32819 + + Change the GTK tooltip implementation to avoid the workaround that + we are currently using. Now we use a new private API to set the + text and all the tooltip handling is done in the webview widget. + + * WebCoreSupport/ChromeClientGtk.cpp: + * webkit/webkitprivate.h: + * webkit/webkitwebview.cpp: + (webkit_web_view_set_tooltip_text): Added, new private API. + (webkit_web_view_query_tooltip): Added + +2010-01-09 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Xan Lopez. + + [GTK] couple fixes for signal emissions, and property notifications + https://bugs.webkit.org/show_bug.cgi?id=33428 + + Fix commitedLoad being called where it should not, causing it to + be called one time too many in some cases. We now match Qt's and + Mac's behavior here. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::finishedLoading): + * tests/testloading.c: + (load_error_status_changed_cb): + +2010-01-08 Gustavo Noronha Silva <gns@gnome.org> + + Reviewed by Xan Lopez. + + [GTK] loading test should use SoupServer instead of actual sites + https://bugs.webkit.org/show_bug.cgi?id=33353 + + Make all the loading tests use SoupServer, instead of fetching + stuff from the Internet. + + * tests/testloading.c: + (server_callback): + (get_uri_for_path): + (test_loading_status): + (test_loading_error): + (test_loading_cancelled): + (load_wentback_status_changed_cb): + (load_error_test): + (test_loading_goback): + (main): + +2010-01-06 Joanmarie Diggs <joanmarie.diggs@gmail.com> + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=30883 + [Gtk] Implement AtkText for HTML elements which contain text + + * tests/testatk.c + (test_webkit_atk_get_text_at_offset): + (test_webkit_atk_get_text_at_offset_forms): + (test_webkit_atk_get_text_at_offset_newlines): + +2010-01-05 Gustavo Noronha Silva <gns@gnome.org> + + Updated docs for 1.1.18 release. + + * docs/webkitgtk-docs.sgml: + * docs/webkitgtk-sections.txt: + +2010-01-05 Xan Lopez <xlopez@igalia.com> + + Update for 1.1.18 release. + + * NEWS: + +2010-01-04 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin Fisher. + + Reorganize, document and rename OS() platform macros. + https://bugs.webkit.org/show_bug.cgi?id=33198 + + Adapt to name changes. + + * webkit/webkitwebsettings.cpp: + (webkit_get_user_agent): + +2010-01-04 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Adam Barth. + + Reorganize, document and rename CPU() platform macros. + https://bugs.webkit.org/show_bug.cgi?id=33145 + + * webkit/webkitwebsettings.cpp: + (webkit_get_user_agent): + +2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Remove emission of signal that does not exist. + + * WebCoreSupport/InspectorClientGtk.cpp: + (WebKit::InspectorClient::inspectorDestroyed): + (WebKit::InspectorClient::webViewDestroyed): + +2009-12-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Unset the adjustments in our FrameView when detaching from + parent. Fixes some crashers when transitioning to a new page from + a scrolled page. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::detachedFromParent2): + +2009-12-20 Xan Lopez <xlopez@igalia.com> + + Rubber-stamped by Gustavo Noronha. + + Disable the page cache by default since: + + - It was previously off by default. + - There are still some issues when enabling it. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + +2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Provides a new API to copy WebKitWebHistoryItem objects. + + * webkit/webkitwebhistoryitem.cpp: + (webkit_web_history_item_copy): + * webkit/webkitwebhistoryitem.h: + +2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Make sure we get the URI that is being loaded when updating + WebKitWebFrame's knowledge of it. This was causing problems now + that page cache is enabled. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::dispatchDidCommitLoad): + * tests/testloading.c: + (load_goback_status_changed_cb): + (load_wentback_status_changed_cb): + (test_loading_goback): + (main): + +2009-12-20 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Cache control APIs + https://bugs.webkit.org/show_bug.cgi?id=24001 + + Original patch by Bobby Powers <bobby@laptop.org> + + Added new API to specify cache models for GTK port. + + * webkit/webkitprivate.cpp: + (webkit_init): set a default cache model. + * webkit/webkitwebview.cpp: + * webkit/webkitwebview.h: + (webkit_set_cache_model): Added function. + (webkit_get_cache_model): Added function. + +2009-12-20 Xan Lopez <xlopez@igalia.com> + + Revert the previous patch, it introduces some failures in the + bots. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::committedLoad): + (WebKit::FrameLoaderClient::transitionToCommittedForNewPage): + +2009-12-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [GTK] crash when loading new page + https://bugs.webkit.org/show_bug.cgi?id=32752 + + Wait until the document is attached to adjust our alignments, + since we need to make sure the FrameView in the document content + render object matches the newly created FrameView for the new + page, otherwise we'll try to relayout the wrong view. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::committedLoad): + (WebKit::FrameLoaderClient::transitionToCommittedForNewPage): + +2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Create a new WebKitDataSource object when attaching to a frame, if + one does not exist. This may happen when we are fetching data from + the page cache. + + * WebCoreSupport/DocumentLoaderGtk.cpp: + (WebKit::DocumentLoader::attachToFrame): + (WebKit::DocumentLoader::unrefDataSource): + +2009-12-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Rubber-stamped by Xan Lopez. + + Make sure the text encoding machinery is initialized from the main + frame, before opening the icon database. + + * webkit/webkitprivate.cpp: + (webkit_init): + +2009-12-19 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + Fixed the problem when pasting in the same window with the + middle-button, now we store a reference to the range instead of + requesting it every time, and we do not release it until the + clipboard is requested. + https://bugs.webkit.org/show_bug.cgi?id=28153 + + * WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp: + * WebKit/gtk/WebCoreSupport/EditorClientGtk.h: + +2009-12-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Protect download objects when reporting errors, to make sure the + download stays alive between the status change notification, and + the error signal emission. + + * webkit/webkitdownload.cpp: + (webkit_download_error): + +2009-12-18 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Fix gtk-doc of webkit_web_resource_new. + + * webkit/webkitwebresource.cpp: + +2009-12-18 Adam Roben <aroben@apple.com> + + GTK build fix + + * webkit/webkitprivate.cpp: Added #include. + +2009-12-18 Kalle Vahlman <kalle.vahlman@movial.com> and Alejandro G. Castro <alex@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Add enable-page-cache property to WebSettings for disabling the Page Cache + + * webkit/webkitwebsettings.cpp: + (_WebKitWebSettingsPrivate::): + (_WebKitWebSettingsPrivate::webkit_web_settings_class_init): + (_WebKitWebSettingsPrivate::webkit_web_settings_set_property): + (_WebKitWebSettingsPrivate::webkit_web_settings_get_property): + (_WebKitWebSettingsPrivate::webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + +2009-12-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + More make distcheck fixes. Use a more robust solution to making + sure we are in the correct directory for running these tests. + + * tests/testmimehandling.c: + (main): + * tests/testwebview.c: + (main): + +2009-12-17 Christian Dywan <christian@twotoasts.de> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Don't assume downloads are always synchronous + http://bugs.webkit.org/show_bug.cgi?id=32359 + + * tests/testdownload.c: + (download_requested_cb): + (set_filename): + (test_webkit_download_perform): + (test_webkit_download_synch): + (test_webkit_download_asynch): + (main): Test downloads synchronously and asynchronously. + * webkit/webkitwebview.cpp: + (webkit_web_view_class_init): + (webkit_web_view_request_download): Only try to start a requested + download if the destination URI is set and clarify the documentation. + +2009-12-17 Christian Dywan <christian@twotoasts.de> + + Reviewed by Xan Lopez. + + Deprecate the title-changed signal of WebKitWebFrame. + + * webkit/webkitwebframe.cpp: + (webkit_web_frame_class_init): + +2009-12-17 Martin Robinson <martin.james.robinson@gmail.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs + https://bugs.webkit.org/show_bug.cgi?id=21599 + + Convert a use of GOwnPtr for a reference counted type to GRefPtr. + + * WebCoreSupport/FrameLoaderClientGtk.cpp: + (WebKit::FrameLoaderClient::createPlugin): + +2009-12-17 Evan Martin <evan@chromium.org> + + Reviewed by Xan Lopez. + + Expose the page workarounds ("quirks") setting to the GTK+ WebKit API. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + (webkit_web_view_update_settings): + +2009-12-16 Dan Winship <danw@gnome.org> + + Reviewed by Gustavo Noronha Silva. + + Content-Encoding support + + https://bugs.webkit.org/show_bug.cgi?id=522772 + + * webkit/webkitprivate.cpp: + (webkit_init): add a SoupContentDecoder feature to the session + +2009-12-16 Christian Dywan <christian@twotoasts.de> + + Reviewed by Gustavo Noronha Silva. + + Deprecate the old loading signals load-started, load-committed, + load-finished, load-progress-changed and change unit tests to use + load-status instead. + + * tests/testmimehandling.c: + (idle_quit_loop_cb): + (test_mime_type): use notify::load-status + * tests/testwebdatasource.c: + (notify_load_status_unreachable_cb): + (notify_load_status_cb): + (test_webkit_web_data_source): + (test_webkit_web_data_source_unreachable_uri): Remove uses of + g_main_loop_is_running. It's an error if the loop is wrongly terminated. + * tests/testwebresource.c: + (notify_load_status_cb): + (test_web_resource_loading): + (notify_load_status_sub_cb): + (test_web_resource_sub_resource_loading): use notify::load-status + * tests/testwebview.c: + (idle_quit_loop_cb): + (test_webkit_web_view_icon_uri): + * tests/testwindow.c: + (notify_load_status_cb): + (test_webkit_window_scrollbar_policy): use notify::load-status + * webkit/webkitwebframe.cpp: + (webkit_web_frame_class_init): + * webkit/webkitwebview.cpp: + (webkit_web_view_class_init): Deprecate old load signals. + +2009-12-16 Christian Dywan <christian@twotoasts.de> + + Reviewed by Gustavo Noronha Silva. + + Take into account favicon.ico in the webresource test. + + * tests/testwebresource.c: + (test_web_resource_sub_resource_loading): + +2009-12-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Rubber-stamped by Xan Lopez. + + Add tab_key_cycles_through_elements to copies of + WebKitWebSettings. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_copy): + +2009-12-16 Martin Robinson <martin.james.robinson@gmail.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] webkit_web_navigation_action_get_button() documentation + https://bugs.webkit.org/show_bug.cgi?id=25555 + + Small documentation improvement for webkit_web_navigation_action_get_button. + + * webkit/webkitwebnavigationaction.cpp: + +>>>>>>> webkit.org at r54127 2009-12-13 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. @@ -13,6 +582,61 @@ * webkit/webkitwebview.cpp: (webkit_web_view_init): +<<<<<<< HEAD +======= +2009-12-14 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + New setting to allow applications to completely suppress the + default context menu that is generated by WebKit. This allows them + to still pass the event to the default handler without needing to + use ugly hacks such as handling populate-popup, and removing all + the items from the default context menu. + + * webkit/webkitwebsettings.cpp: + (webkit_web_settings_class_init): + (webkit_web_settings_set_property): + (webkit_web_settings_get_property): + (webkit_web_settings_copy): + * webkit/webkitwebview.cpp: + (webkit_web_view_forward_context_menu_event): + +2009-12-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Xan Lopez. + + Also give the right click event to the frame's event handler, if + there WebCore decides to not generate the default context + menu. This fixes some pages that handle right-button clicks for + things other than context menu creation. + + * webkit/webkitwebview.cpp: + (webkit_web_view_forward_context_menu_event): + +2009-12-13 Christian Dywan <christian@twotoasts.de> + + Reviewed by Holger Freyther. + + http://bugs.webkit.org/show_bug.cgi?id=31014 + [Gtk] Build fails with gtk+-2.10 (no tested with older releases) + + Guard GTK+ 2.12 specific tooltip code with #ifdef. + + * WebCoreSupport/ChromeClientGtk.cpp: + (WebKit::ChromeClient::mouseDidMoveOverElement): + +2009-12-11 Christian Dywan <christian@twotoasts.de> + + Reviewed by Eric Seidel. + + [GTK] Build with --disable-svg is broken + http://bugs.webkit.org/show_bug.cgi?id=32361 + + * webkit/webkitwebframe.cpp: + (webkit_web_frame_pause_svg_animation): Fix ENABLE(SVG) guards. + +>>>>>>> webkit.org at r54127 2009-12-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Xan Lopez. diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS index f40390e..18b5e3c 100644 --- a/WebKit/gtk/NEWS +++ b/WebKit/gtk/NEWS @@ -1,4 +1,50 @@ ================= +WebKitGTK+ 1.1.19 +================= + +What's new in WebKitGTK+ 1.1.19? + + - Improvements to AtkText implementation + - RGBA colormap support has been added + - Improvements to the HTML5 media player + - Crashes related to clipboard handling, which were hitting many + users and seemed to be random have been fixed + +================= +WebKitGTK+ 1.1.18 +================= + +What's new in WebKitGTK+ 1.1.18? + + - Add methods to set and get a cache model in WebKitGTK+. We offer + two possibilites: document viewer (no caches are used) and browser + (similar to the previous defaults). + - Add WebKitWebSettings::enable-page-cache. Controls whether the + Page Cache is enabled or not. For details about what the page + cache is and does see + http://webkit.org/blog/427/webkit-page-cache-i-the-basics/ + The page cache is disabled by default, since the gtk+ port still + presents some small bugs when it's enabled. + - Add WebKitWebSettings::enable-site-specific-quirks. Controls + whether a series of page-specific workarounds are used by WebKit. + - Use Content-Encoding support available in libsoup 2.28.2 and + newer. + - Add WebKitWebSettings::enable-default-context-menu. Controls + whether webkitgtk+ will show a default context menu on right click + in the view. Note that even with the property set to FALSE right + clicks can be handled by the page, either by actions or by + ad-hoc in-page context menus. + - Make the WebKitWebView::icon-loaded signal carry a string with the + favicon's URI. This is an API break, but the signal already had a + broken signature and was useless anyway, so it's extremely + unlikely that anybody was using it. Also, add the 'icon-uri' + property to the view, holding the URI for its current favicon. + - Respect Content-Disposition header in downloads (fixes downloads + in gmail). + - Various accessibility improvements. + - Many bugfixes. + +================= WebKitGTK+ 1.1.17 ================= diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index d9a043b..8ea8991 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -64,7 +64,11 @@ void ChromeClient::chromeDestroyed() FloatRect ChromeClient::windowRect() { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); +#if GTK_CHECK_VERSION(2, 18, 0) + if (gtk_widget_is_toplevel(window)) { +#else if (GTK_WIDGET_TOPLEVEL(window)) { +#endif gint left, top, width, height; gtk_window_get_position(GTK_WINDOW(window), &left, &top); gtk_window_get_size(GTK_WINDOW(window), &width, &height); @@ -106,7 +110,11 @@ void ChromeClient::focus() void ChromeClient::unfocus() { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); +#if GTK_CHECK_VERSION(2, 18, 0) + if (gtk_widget_is_toplevel(window)) +#else if (GTK_WIDGET_TOPLEVEL(window)) +#endif gtk_window_set_focus(GTK_WINDOW(window), NULL); } @@ -234,7 +242,11 @@ void ChromeClient::closeWindowSoon() bool ChromeClient::canTakeFocus(FocusDirection) { +#if GTK_CHECK_VERSION(2, 18, 0) + return gtk_widget_get_can_focus(GTK_WIDGET(m_webView)); +#else return GTK_WIDGET_CAN_FOCUS(m_webView); +#endif } void ChromeClient::takeFocus(FocusDirection) @@ -442,20 +454,6 @@ void ChromeClient::scrollbarsModeDidChange() const void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned modifierFlags) { - // If a tooltip must be displayed it will be, afterwards, when - // setToolTip is called; this is just a work-around to make sure - // it updates its location correctly; see - // https://bugs.webkit.org/show_bug.cgi?id=15793. - g_object_set(m_webView, "has-tooltip", FALSE, NULL); - - GdkDisplay* gdkDisplay; - GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); - if (GTK_WIDGET_TOPLEVEL(window)) - gdkDisplay = gtk_widget_get_display(window); - else - gdkDisplay = gdk_display_get_default(); - gtk_tooltip_trigger_tooltip_query(gdkDisplay); - // check if the element is a link... bool isLink = hit.isLiveLink(); if (isLink) { @@ -475,16 +473,7 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo void ChromeClient::setToolTip(const String& toolTip, TextDirection) { -#if GTK_CHECK_VERSION(2,12,0) - if (toolTip.isEmpty()) - g_object_set(m_webView, "has-tooltip", FALSE, NULL); - else - gtk_widget_set_tooltip_text(GTK_WIDGET(m_webView), toolTip.utf8().data()); -#else - // TODO: Support older GTK+ versions - // See http://bugs.webkit.org/show_bug.cgi?id=15793 - notImplemented(); -#endif + webkit_web_view_set_tooltip_text(m_webView, toolTip.utf8().data()); } void ChromeClient::print(Frame* frame) diff --git a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp index 0efc9fa..2b355cb 100644 --- a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp @@ -30,6 +30,7 @@ #include "config.h" #include "DocumentLoaderGtk.h" +#include "webkitprivate.h" #include "webkitwebdatasource.h" using namespace WebCore; @@ -60,7 +61,16 @@ void DocumentLoader::attachToFrame() { WebCore::DocumentLoader::attachToFrame(); - refDataSource(); + if (m_dataSource) { + refDataSource(); + return; + } + + // We may get to here without having a datasource, when the data + // is coming from the page cache. + WebKitWebDataSource* dataSource = webkit_web_data_source_new_with_loader(this); + setDataSource(dataSource); + g_object_unref(dataSource); } void DocumentLoader::detachFromFrame() @@ -110,6 +120,7 @@ void DocumentLoader::unrefDataSource() ASSERT(m_dataSource); m_isDataSourceReffed = false; g_object_unref(m_dataSource); + m_dataSource = 0; } } // end namespace WebKit diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp index 6ec6baf..02d1a53 100644 --- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp @@ -24,6 +24,7 @@ #include "EditorClientGtk.h" #include "CString.h" +#include "DataObjectGtk.h" #include "EditCommand.h" #include "Editor.h" #include <enchant.h> @@ -35,6 +36,7 @@ #include "KeyboardEvent.h" #include "NotImplemented.h" #include "Page.h" +#include "PasteboardHelperGtk.h" #include "PlatformKeyboardEvent.h" #include "markup.h" #include "webkitprivate.h" @@ -185,35 +187,11 @@ void EditorClient::respondToChangedContents() notImplemented(); } -static void clipboard_get_contents_cb(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data) -{ - WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data); - Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); - PassRefPtr<Range> selectedRange = frame->selection()->toNormalizedRange(); - - if (static_cast<gint>(info) == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) { - String markup = createMarkup(selectedRange.get(), 0, AnnotateForInterchange); - gtk_selection_data_set(selection_data, selection_data->target, 8, - reinterpret_cast<const guchar*>(markup.utf8().data()), markup.utf8().length()); - } else { - String text = selectedRange->text(); - gtk_selection_data_set_text(selection_data, text.utf8().data(), text.utf8().length()); - } -} - -static void clipboard_clear_contents_cb(GtkClipboard* clipboard, gpointer data) -{ - WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data); - Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); - - // Collapse the selection without clearing it - frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity()); -} - void EditorClient::respondToChangedSelection() { WebKitWebViewPrivate* priv = m_webView->priv; - Frame* targetFrame = core(m_webView)->focusController()->focusedOrMainFrame(); + WebCore::Page* corePage = core(m_webView); + Frame* targetFrame = corePage->focusController()->focusedOrMainFrame(); if (!targetFrame) return; @@ -221,16 +199,16 @@ void EditorClient::respondToChangedSelection() if (targetFrame->editor()->ignoreCompositionSelectionChange()) return; +#if PLATFORM(X11) GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(m_webView), GDK_SELECTION_PRIMARY); + DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); + if (targetFrame->selection()->isRange()) { - GtkTargetList* targetList = webkit_web_view_get_copy_target_list(m_webView); - gint targetCount; - GtkTargetEntry* targets = gtk_target_table_new_from_list(targetList, &targetCount); - gtk_clipboard_set_with_owner(clipboard, targets, targetCount, - clipboard_get_contents_cb, clipboard_clear_contents_cb, G_OBJECT(m_webView)); - gtk_target_table_free(targets, targetCount); - } else if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(m_webView)) - gtk_clipboard_clear(clipboard); + dataObject->clear(); + dataObject->setRange(targetFrame->selection()->toNormalizedRange()); + pasteboardHelperInstance()->writeClipboardContents(clipboard, m_webView); + } +#endif if (!targetFrame->editor()->hasComposition()) return; diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 0eaa7c8..8f1bec2 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -33,6 +33,7 @@ #include "FrameView.h" #include "FrameTree.h" #include "GOwnPtr.h" +#include "GRefPtr.h" #include "GtkPluginWidget.h" #include "HTMLAppletElement.h" #include "HTMLFormElement.h" @@ -76,6 +77,7 @@ namespace WebKit { FrameLoaderClient::FrameLoaderClient(WebKitWebFrame* frame) : m_frame(frame) , m_policyDecision(0) + , m_loadingErrorPage(false) , m_pluginView(0) , m_hasSentResponseToPlugin(false) { @@ -440,7 +442,7 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT CString mimeTypeString = mimeType.utf8(); ASSERT(paramNames.size() == paramValues.size()); - GOwnPtr<GHashTable> hash(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free)); + GRefPtr<GHashTable> hash = adoptGRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free)); for (unsigned i = 0; i < paramNames.size(); ++i) { g_hash_table_insert(hash.get(), g_strdup(paramNames[i].utf8().data()), @@ -567,6 +569,11 @@ bool FrameLoaderClient::hasWebView() const void FrameLoaderClient::dispatchDidFinishLoad() { + if (m_loadingErrorPage) { + m_loadingErrorPage = false; + return; + } + loadDone(m_frame, true); } @@ -639,7 +646,9 @@ void FrameLoaderClient::setCopiesOnScroll() void FrameLoaderClient::detachedFromParent2() { - notImplemented(); + FrameView *view = core(m_frame)->view(); + if (view) + view->setGtkAdjustments(0, 0); } void FrameLoaderClient::detachedFromParent3() @@ -700,6 +709,9 @@ void FrameLoaderClient::dispatchWillClose() void FrameLoaderClient::dispatchDidReceiveIcon() { + if (m_loadingErrorPage) + return; + WebKitWebView* webView = getViewFromFrame(m_frame); // Avoid reporting favicons for non-main frames. @@ -712,11 +724,17 @@ void FrameLoaderClient::dispatchDidReceiveIcon() void FrameLoaderClient::dispatchDidStartProvisionalLoad() { + if (m_loadingErrorPage) + return; + notifyStatus(m_frame, WEBKIT_LOAD_PROVISIONAL); } void FrameLoaderClient::dispatchDidReceiveTitle(const String& title) { + if (m_loadingErrorPage) + return; + WebKitWebFramePrivate* priv = m_frame->priv; g_free(priv->title); priv->title = g_strdup(title.utf8().data()); @@ -733,6 +751,9 @@ void FrameLoaderClient::dispatchDidReceiveTitle(const String& title) void FrameLoaderClient::dispatchDidCommitLoad() { + if (m_loadingErrorPage) + return; + /* Update the URI once first data has been received. * This means the URI is valid and successfully identify the page that's going to be loaded. */ @@ -740,7 +761,7 @@ void FrameLoaderClient::dispatchDidCommitLoad() WebKitWebFramePrivate* priv = m_frame->priv; g_free(priv->uri); - priv->uri = g_strdup(core(m_frame)->loader()->url().prettyURL().utf8().data()); + priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().prettyURL().utf8().data()); g_free(priv->title); priv->title = NULL; g_object_notify(G_OBJECT(m_frame), "uri"); @@ -773,6 +794,9 @@ void FrameLoaderClient::dispatchDidFirstLayout() void FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() { + if (m_loadingErrorPage) + return; + notifyStatus(m_frame, WEBKIT_LOAD_FIRST_VISUALLY_NON_EMPTY_LAYOUT); } @@ -837,9 +861,10 @@ String FrameLoaderClient::generatedMIMETypeForURLScheme(const String&) const void FrameLoaderClient::finishedLoading(WebCore::DocumentLoader* documentLoader) { - if (!m_pluginView) - committedLoad(documentLoader, 0, 0); - else { + if (!m_pluginView) { + FrameLoader* loader = documentLoader->frameLoader(); + loader->setEncoding(m_response.textEncodingName(), false); + } else { m_pluginView->didFinishLoading(); m_pluginView = 0; m_hasSentResponseToPlugin = false; @@ -933,6 +958,9 @@ void FrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& erro void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error) { + if (m_loadingErrorPage) + return; + notifyStatus(m_frame, WEBKIT_LOAD_FAILED); WebKitWebView* webView = getViewFromFrame(m_frame); @@ -952,6 +980,8 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error) return; } + m_loadingErrorPage = true; + String content; gchar* fileContent = 0; gchar* errorURI = g_filename_to_uri(DATA_DIR"/webkit-1.0/resources/error.html", NULL, NULL); diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h index cace770..b364873 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h @@ -184,6 +184,8 @@ namespace WebKit { WebCore::ResourceResponse m_response; WebKitWebPolicyDecision* m_policyDecision; + bool m_loadingErrorPage; + // Plugin view to redirect data to WebCore::PluginView* m_pluginView; bool m_hasSentResponseToPlugin; diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp index a06ff50..99bc627 100644 --- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp @@ -44,13 +44,8 @@ InspectorClient::InspectorClient(WebKitWebView* webView) void InspectorClient::inspectorDestroyed() { - if (m_webView) { - gboolean handled = FALSE; - g_signal_emit_by_name(m_webInspector, "destroy", &handled); - - /* we can now dispose our own reference */ + if (m_webInspector) g_object_unref(m_webInspector); - } delete this; } @@ -64,6 +59,7 @@ void InspectorClient::webViewDestroyed() // something else, and the inspector will be referenced again, // there. g_object_unref(m_webInspector); + m_webInspector = 0; } Page* InspectorClient::createPage() diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp index c71ef1b..8406ada 100644 --- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp @@ -20,13 +20,14 @@ #include "config.h" #include "PasteboardHelperGtk.h" +#include "DataObjectGtk.h" +#include "FocusController.h" #include "Frame.h" +#include <gtk/gtk.h> #include "webkitwebframe.h" #include "webkitwebview.h" #include "webkitprivate.h" -#include <gtk/gtk.h> - using namespace WebCore; namespace WebKit { @@ -79,4 +80,102 @@ gint PasteboardHelperGtk::getWebViewTargetInfoHtml() const return WEBKIT_WEB_VIEW_TARGET_INFO_HTML; } +static void fillSelectionData(GtkSelectionData* selectionData, guint info, DataObjectGtk* dataObject) +{ + if (info == WEBKIT_WEB_VIEW_TARGET_INFO_TEXT) + gtk_selection_data_set_text(selectionData, dataObject->text().utf8().data(), -1); + else if (info == WEBKIT_WEB_VIEW_TARGET_INFO_HTML) { + GOwnPtr<gchar> markup(g_strdup(dataObject->markup().utf8().data())); + gtk_selection_data_set(selectionData, selectionData->target, 8, + reinterpret_cast<const guchar*>(markup.get()), + strlen(markup.get())); + } +} + +static GtkTargetList* targetListForDataObject(DataObjectGtk* dataObject) +{ + GtkTargetList* list = gtk_target_list_new(0, 0); + + if (dataObject->hasText()) + gtk_target_list_add_text_targets(list, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT); + + if (dataObject->hasMarkup()) + gtk_target_list_add(list, gdkMarkupAtom, 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML); + + return list; +} + +static bool settingClipboard = false; +static void getClipboardContentsCallback(GtkClipboard* clipboard, GtkSelectionData *selectionData, guint info, gpointer data) +{ + DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); + ASSERT(dataObject); + fillSelectionData(selectionData, info, dataObject); +} + +static void clearClipboardContentsCallback(GtkClipboard* clipboard, gpointer data) +{ + // GTK will call the clear clipboard callback while setting clipboard data. + // We don't actually want to clear the DataObject during that time. + if (settingClipboard) + return; + + DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); + ASSERT(dataObject); + dataObject->clear(); + + // This will be true for clipboards other than X11 primary. + if (!data) + return; + + WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data); + WebCore::Page* corePage = core(webView); + + if (!corePage || !corePage->focusController()) { + g_object_unref(webView); + return; + } + + Frame* frame = corePage->focusController()->focusedOrMainFrame(); + + // Collapse the selection without clearing it + ASSERT(frame); + frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity()); + + g_object_unref(webView); +} + +void PasteboardHelperGtk::writeClipboardContents(GtkClipboard* clipboard, gpointer data) +{ + DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard); + GtkTargetList* list = targetListForDataObject(dataObject); + + int numberOfTargets; + GtkTargetEntry* table = gtk_target_table_new_from_list(list, &numberOfTargets); + + if (numberOfTargets > 0 && table) { + settingClipboard = true; + + // Protect the web view from being destroyed before one of the clipboard callbacks + // is called. Balanced in both getClipboardContentsCallback and + // clearClipboardContentsCallback. + WebKitWebView* webView = static_cast<WebKitWebView*>(data); + g_object_ref(webView); + + gboolean succeeded = gtk_clipboard_set_with_data(clipboard, table, numberOfTargets, + getClipboardContentsCallback, + clearClipboardContentsCallback, data); + if (!succeeded) + g_object_unref(webView); + + settingClipboard = false; + } else + gtk_clipboard_clear(clipboard); + + if (table) + gtk_target_table_free(table, numberOfTargets); + + gtk_target_list_unref(list); +} + } diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h index 12ba207..97eff90 100644 --- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h +++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h @@ -47,6 +47,8 @@ public: virtual GtkTargetList* targetList() const; virtual gint getWebViewTargetInfoHtml() const; + void writeClipboardContents(GtkClipboard* clipboard, gpointer data = 0); + private: GtkTargetList* m_targetList; }; diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml index ca478f9..d61a4fd 100644 --- a/WebKit/gtk/docs/webkitgtk-docs.sgml +++ b/WebKit/gtk/docs/webkitgtk-docs.sgml @@ -29,6 +29,7 @@ <xi:include href="xml/webkitsoupauthdialog.xml"/> <xi:include href="xml/webkitsecurityorigin.xml"/> <xi:include href="xml/webkitwebwindowfeatures.xml"/> + <xi:include href="xml/webkitcachemodel.xml"/> </chapter> <chapter> @@ -96,4 +97,7 @@ <index id="index-1.1.17" role="1.1.17"> <title>Index of new symbols in 1.1.17</title> </index> + <index id="index-1.1.18" role="1.1.18"> + <title>Index of new symbols in 1.1.18</title> + </index> </book> diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt index 1f4d1b7..9574280 100644 --- a/WebKit/gtk/docs/webkitgtk-sections.txt +++ b/WebKit/gtk/docs/webkitgtk-sections.txt @@ -58,6 +58,7 @@ WebKitWebBackForwardListClass <FILE>webkitwebhistoryitem</FILE> <TITLE>WebKitWebHistoryItem</TITLE> WebKitWebHistoryItem +webkit_web_history_item_copy webkit_web_history_item_get_alternate_title webkit_web_history_item_get_last_visited_time webkit_web_history_item_get_original_uri @@ -91,6 +92,7 @@ webkit_web_frame_get_global_context webkit_web_frame_get_horizontal_scrollbar_policy webkit_web_frame_get_load_status webkit_web_frame_get_name +webkit_web_frame_get_network_response webkit_web_frame_get_parent webkit_web_frame_get_provisional_data_source webkit_web_frame_get_security_origin @@ -419,6 +421,7 @@ webkit_web_view_get_encoding webkit_web_view_get_focused_frame webkit_web_view_get_full_content_zoom webkit_web_view_get_hit_test_result +webkit_web_view_get_icon_uri webkit_web_view_get_inspector webkit_web_view_get_load_status webkit_web_view_get_main_frame @@ -581,3 +584,9 @@ webkit_micro_version webkit_minor_version </SECTION> +<SECTION> +<FILE>webkitcachemodel</FILE> +WebKitCacheModel +webkit_get_cache_model +webkit_set_cache_model +</SECTION> diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c index c5f4db3..7db274a 100644 --- a/WebKit/gtk/tests/testatk.c +++ b/WebKit/gtk/tests/testatk.c @@ -34,6 +34,10 @@ static const char* contentsInTextarea = "<html><body><textarea cols='80'>This is static const char* contentsInTextInput = "<html><body><input type='text' size='80' value='This is a test. This is the second sentence. And this the third.'/></body></html>"; +static const char* contentsInParagraphAndBodySimple = "<html><body><p>This is a test.</p>Hello world.</body></html>"; + +static const char* contentsInParagraphAndBodyModerate = "<html><body><p>This is a test.</p>Hello world.<br /><font color='#00cc00'>This sentence is green.</font><br />This one is not.</body></html>"; + static gboolean bail_out(GMainLoop* loop) { if (g_main_loop_is_running(loop)) @@ -221,8 +225,6 @@ static void test_webkit_atk_get_text_at_offset_forms(void) g_assert(obj); obj = atk_object_ref_accessible_child(obj, 0); g_assert(obj); - obj = atk_object_ref_accessible_child(obj, 0); - g_assert(obj); text_obj = ATK_TEXT(obj); g_assert(ATK_IS_TEXT(text_obj)); @@ -254,8 +256,6 @@ static void test_webkit_atk_get_text_at_offset(void) g_assert(obj); obj = atk_object_ref_accessible_child(obj, 0); g_assert(obj); - obj = atk_object_ref_accessible_child(obj, 0); - g_assert(obj); text_obj = ATK_TEXT(obj); g_assert(ATK_IS_TEXT(text_obj)); @@ -287,8 +287,6 @@ static void test_webkit_atk_get_text_at_offset_newlines(void) g_assert(obj); obj = atk_object_ref_accessible_child(obj, 0); g_assert(obj); - obj = atk_object_ref_accessible_child(obj, 0); - g_assert(obj); text_obj = ATK_TEXT(obj); g_assert(ATK_IS_TEXT(text_obj)); @@ -364,6 +362,94 @@ static void test_webkit_atk_get_text_at_offset_text_input(void) g_object_unref(webView); } +static void testWebkitAtkGetTextInParagraphAndBodySimple(void) +{ + WebKitWebView* webView; + AtkObject* obj; + AtkObject* obj1; + AtkObject* obj2; + GMainLoop* loop; + AtkText* textObj1; + AtkText* textObj2; + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation alloc = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); + webkit_web_view_load_string(webView, contentsInParagraphAndBodySimple, NULL, NULL, NULL); + loop = g_main_loop_new(NULL, TRUE); + + g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_main_loop_run(loop); + + /* Get to the inner AtkText object */ + obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + obj1 = atk_object_ref_accessible_child(obj, 0); + g_assert(obj1); + obj2 = atk_object_ref_accessible_child(obj, 1); + g_assert(obj2); + + textObj1 = ATK_TEXT(obj1); + g_assert(ATK_IS_TEXT(textObj1)); + textObj2 = ATK_TEXT(obj2); + g_assert(ATK_IS_TEXT(textObj2)); + + char *text = atk_text_get_text(textObj1, 0, -1); + g_assert_cmpstr(text, ==, "This is a test."); + + text = atk_text_get_text(textObj2, 0, 12); + g_assert_cmpstr(text, ==, "Hello world."); + + g_object_unref(obj1); + g_object_unref(obj2); + g_object_unref(webView); +} + +static void testWebkitAtkGetTextInParagraphAndBodyModerate(void) +{ + WebKitWebView* webView; + AtkObject* obj; + AtkObject* obj1; + AtkObject* obj2; + GMainLoop* loop; + AtkText* textObj1; + AtkText* textObj2; + + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + g_object_ref_sink(webView); + GtkAllocation alloc = { 0, 0, 800, 600 }; + gtk_widget_size_allocate(GTK_WIDGET(webView), &alloc); + webkit_web_view_load_string(webView, contentsInParagraphAndBodyModerate, NULL, NULL, NULL); + loop = g_main_loop_new(NULL, TRUE); + + g_timeout_add(100, (GSourceFunc)bail_out, loop); + g_main_loop_run(loop); + + /* Get to the inner AtkText object */ + obj = gtk_widget_get_accessible(GTK_WIDGET(webView)); + g_assert(obj); + obj1 = atk_object_ref_accessible_child(obj, 0); + g_assert(obj1); + obj2 = atk_object_ref_accessible_child(obj, 1); + g_assert(obj2); + + textObj1 = ATK_TEXT(obj1); + g_assert(ATK_IS_TEXT(textObj1)); + textObj2 = ATK_TEXT(obj2); + g_assert(ATK_IS_TEXT(textObj2)); + + char *text = atk_text_get_text(textObj1, 0, -1); + g_assert_cmpstr(text, ==, "This is a test."); + + text = atk_text_get_text(textObj2, 0, 53); + g_assert_cmpstr(text, ==, "Hello world.\nThis sentence is green.\nThis one is not."); + + g_object_unref(obj1); + g_object_unref(obj2); + g_object_unref(webView); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -375,6 +461,8 @@ int main(int argc, char** argv) g_test_add_func("/webkit/atk/get_text_at_offset_newlines", test_webkit_atk_get_text_at_offset_newlines); g_test_add_func("/webkit/atk/get_text_at_offset_textarea", test_webkit_atk_get_text_at_offset_textarea); g_test_add_func("/webkit/atk/get_text_at_offset_text_input", test_webkit_atk_get_text_at_offset_text_input); + g_test_add_func("/webkit/atk/getTextInParagraphAndBodySimple", testWebkitAtkGetTextInParagraphAndBodySimple); + g_test_add_func("/webkit/atk/getTextInParagraphAndBodyModerate", testWebkitAtkGetTextInParagraphAndBodyModerate); return g_test_run (); } diff --git a/WebKit/gtk/tests/testdownload.c b/WebKit/gtk/tests/testdownload.c index 0d964ed..05c3a8d 100644 --- a/WebKit/gtk/tests/testdownload.c +++ b/WebKit/gtk/tests/testdownload.c @@ -26,6 +26,7 @@ GMainLoop* loop; char* temporaryFilename = NULL; +WebKitDownload* theDownload = NULL; static void test_webkit_download_create(void) @@ -87,6 +88,7 @@ download_requested_cb(WebKitWebView* web_view, WebKitDownload* download, gboolean* beenThere) { + theDownload = download; *beenThere = TRUE; if (temporaryFilename) { gchar *uri = g_filename_to_uri(temporaryFilename, NULL, NULL); @@ -101,8 +103,19 @@ download_requested_cb(WebKitWebView* web_view, return TRUE; } +static gboolean +set_filename(gchar* filename) +{ + gchar *uri = g_filename_to_uri(filename, NULL, NULL); + webkit_download_set_destination_uri(theDownload, uri); + g_free(uri); + temporaryFilename = filename; + webkit_download_start(theDownload); + return FALSE; +} + static void -test_webkit_download_perform(void) +test_webkit_download_perform(gboolean asynch) { WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); @@ -121,16 +134,23 @@ test_webkit_download_perform(void) * utilities file, because we have a very similar one in * testwebframe.c */ GError *error = NULL; - int fd = g_file_open_tmp ("webkit-testwebdownload-XXXXXX", - &temporaryFilename, &error); + gchar* filename; + int fd = g_file_open_tmp("webkit-testwebdownload-XXXXXX", &filename, &error); close(fd); if (error) g_critical("Failed to open a temporary file for writing: %s.", error->message); - if (g_unlink(temporaryFilename) == -1) + if (g_unlink(filename) == -1) g_critical("Failed to delete the temporary file: %s.", g_strerror(errno)); + if (asynch) + g_idle_add((GSourceFunc)set_filename, filename); + else + temporaryFilename = filename; + + theDownload = NULL; + loop = g_main_loop_new(NULL, TRUE); webkit_web_view_load_uri(webView, "http://gnome.org/"); g_main_loop_run(loop); @@ -145,6 +165,18 @@ test_webkit_download_perform(void) g_object_unref(webView); } +static void +test_webkit_download_synch(void) +{ + test_webkit_download_perform(FALSE); +} + +static void +test_webkit_download_asynch(void) +{ + test_webkit_download_perform(TRUE); +} + int main(int argc, char** argv) { g_thread_init(NULL); @@ -152,7 +184,8 @@ int main(int argc, char** argv) g_test_bug_base("https://bugs.webkit.org/"); g_test_add_func("/webkit/download/create", test_webkit_download_create); - g_test_add_func("/webkit/download/perform", test_webkit_download_perform); + g_test_add_func("/webkit/download/synch", test_webkit_download_synch); + g_test_add_func("/webkit/download/asynch", test_webkit_download_asynch); return g_test_run (); } diff --git a/WebKit/gtk/tests/testloading.c b/WebKit/gtk/tests/testloading.c index c1f0fac..fd9a05c 100644 --- a/WebKit/gtk/tests/testloading.c +++ b/WebKit/gtk/tests/testloading.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Gustavo Noronha Silva + * Copyright (C) 2009, 2010 Gustavo Noronha Silva * Copyright (C) 2009 Igalia S.L. * * This library is free software; you can redistribute it and/or @@ -19,10 +19,45 @@ */ #include <gtk/gtk.h> +#include <libsoup/soup.h> +#include <string.h> #include <webkit/webkit.h> #if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) +/* This string has to be rather big because of the cancelled test - it + * looks like soup refuses to send or receive a too small chunk */ +#define HTML_STRING "<html><body>Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!Testing!</body></html>" + +SoupURI* base_uri; + +/* For real request testing */ +static void +server_callback(SoupServer* server, SoupMessage* msg, + const char* path, GHashTable* query, + SoupClientContext* context, gpointer data) +{ + if (msg->method != SOUP_METHOD_GET) { + soup_message_set_status(msg, SOUP_STATUS_NOT_IMPLEMENTED); + return; + } + + soup_message_set_status(msg, SOUP_STATUS_OK); + + if (g_str_equal(path, "/test_loading_status") || g_str_equal(path, "/test_loading_status2")) + soup_message_body_append(msg->response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING)); + else if (g_str_equal(path, "/test_load_error")) { + soup_message_set_status(msg, SOUP_STATUS_CANT_CONNECT); + } else if (g_str_equal(path, "/test_loading_cancelled")) { + soup_message_headers_set_encoding(msg->response_headers, SOUP_ENCODING_CHUNKED); + soup_message_body_append(msg->response_body, SOUP_MEMORY_STATIC, HTML_STRING, strlen(HTML_STRING)); + soup_server_unpause_message(server, msg); + return; + } + + soup_message_body_complete(msg->response_body); +} + typedef struct { WebKitWebView* webView; GMainLoop *loop; @@ -53,6 +88,18 @@ static void web_loading_fixture_teardown(WebLoadingFixture* fixture, gconstpoint g_main_loop_unref(fixture->loop); } +static char* get_uri_for_path(const char* path) +{ + SoupURI* uri; + char* uri_string; + + uri = soup_uri_new_with_base(base_uri, path); + uri_string = soup_uri_to_string(uri, FALSE); + soup_uri_free (uri); + + return uri_string; +} + static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, WebLoadingFixture* fixture) { g_assert(fixture->has_been_provisional); @@ -98,6 +145,8 @@ static void status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixt static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data) { + char* uri_string; + g_assert_cmpint(webkit_web_view_get_load_status(fixture->webView), ==, WEBKIT_LOAD_PROVISIONAL); g_object_connect(G_OBJECT(fixture->webView), @@ -105,10 +154,13 @@ static void test_loading_status(WebLoadingFixture* fixture, gconstpointer data) "signal::load-finished", G_CALLBACK(load_finished_cb), fixture, NULL); + uri_string = get_uri_for_path("/test_loading_status"); + /* load_uri will trigger the navigation-policy-decision-requested * signal emission; */ - webkit_web_view_load_uri(fixture->webView, "http://gnome.org/"); + webkit_web_view_load_uri(fixture->webView, uri_string); + g_free(uri_string); g_main_loop_run(fixture->loop); } @@ -119,23 +171,24 @@ static void load_error_status_changed_cb(GObject* object, GParamSpec* pspec, Web switch(status) { case WEBKIT_LOAD_PROVISIONAL: - /* We are going to go through here twice, so don't assert - * anything */ + g_assert(!fixture->has_been_provisional); fixture->has_been_provisional = TRUE; break; + case WEBKIT_LOAD_COMMITTED: + g_assert(!fixture->has_been_committed); + fixture->has_been_committed = TRUE; + break; case WEBKIT_LOAD_FINISHED: g_assert(fixture->has_been_provisional); g_assert(fixture->has_been_load_error); g_assert(fixture->has_been_failed); - /* We are checking that only one FINISHED is received in the - whole cycle, so assert it's FALSE */ g_assert(!fixture->has_been_finished); fixture->has_been_finished = TRUE; - g_main_loop_quit(fixture->loop); break; case WEBKIT_LOAD_FAILED: g_assert(!fixture->has_been_failed); fixture->has_been_failed = TRUE; + g_main_loop_quit(fixture->loop); break; default: break; @@ -153,13 +206,24 @@ static gboolean load_error_cb(WebKitWebView* webView, WebKitWebFrame* frame, con static void test_loading_error(WebLoadingFixture* fixture, gconstpointer data) { + char* uri_string; + g_test_bug("28842"); g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_error_cb), fixture); g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_error_status_changed_cb), fixture); - webkit_web_view_load_uri(fixture->webView, "http://snoetuhsetuhseoutoeutc.com/"); + uri_string = get_uri_for_path("/test_load_error"); + webkit_web_view_load_uri(fixture->webView, uri_string); + g_free(uri_string); + g_main_loop_run(fixture->loop); + + g_assert(fixture->has_been_provisional); + g_assert(!fixture->has_been_committed); + g_assert(fixture->has_been_load_error); + g_assert(fixture->has_been_failed); + g_assert(!fixture->has_been_finished); } /* Cancelled load */ @@ -211,20 +275,142 @@ static void load_cancelled_status_changed_cb(GObject* object, GParamSpec* pspec, static void test_loading_cancelled(WebLoadingFixture* fixture, gconstpointer data) { + char* uri_string; + g_test_bug("29644"); g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_cancelled_cb), fixture); g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_cancelled_status_changed_cb), fixture); - webkit_web_view_load_uri(fixture->webView, "http://google.com/"); + uri_string = get_uri_for_path("/test_loading_cancelled"); + webkit_web_view_load_uri(fixture->webView, uri_string); + g_free(uri_string); + g_main_loop_run(fixture->loop); } +static void load_goback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture) +{ + WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object)); + + switch(status) { + case WEBKIT_LOAD_PROVISIONAL: + g_assert(!fixture->has_been_provisional); + fixture->has_been_provisional = TRUE; + break; + case WEBKIT_LOAD_COMMITTED: + g_assert(fixture->has_been_provisional); + fixture->has_been_committed = TRUE; + break; + case WEBKIT_LOAD_FAILED: + g_assert_not_reached(); + break; + case WEBKIT_LOAD_FINISHED: + g_assert(fixture->has_been_provisional); + g_assert(fixture->has_been_committed); + fixture->has_been_finished = TRUE; + g_main_loop_quit(fixture->loop); + break; + default: + break; + } +} + +static void load_wentback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture) +{ + WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object)); + char* uri_string; + char* uri_string2; + + uri_string = get_uri_for_path("/test_loading_status"); + uri_string2 = get_uri_for_path("/test_loading_status2"); + + switch(status) { + case WEBKIT_LOAD_PROVISIONAL: + g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string2); + break; + case WEBKIT_LOAD_COMMITTED: + g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string); + break; + case WEBKIT_LOAD_FAILED: + g_assert_not_reached(); + break; + case WEBKIT_LOAD_FINISHED: + g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, uri_string); + g_main_loop_quit(fixture->loop); + break; + default: + break; + } + + g_free(uri_string); + g_free(uri_string2); +} + +static void load_error_test(WebKitWebView* webview, WebKitWebFrame* frame, const char* uri, GError* error) +{ + g_debug("Error: %s", error->message); +} + +static void test_loading_goback(WebLoadingFixture* fixture, gconstpointer data) +{ + char* uri_string; + + g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_goback_status_changed_cb), fixture); + + g_signal_connect(fixture->webView, "load-error", G_CALLBACK(load_error_test), fixture); + + uri_string = get_uri_for_path("/test_loading_status"); + webkit_web_view_load_uri(fixture->webView, uri_string); + g_free(uri_string); + + g_main_loop_run(fixture->loop); + + fixture->has_been_provisional = FALSE; + fixture->has_been_committed = FALSE; + fixture->has_been_first_visually_non_empty_layout = FALSE; + fixture->has_been_finished = FALSE; + fixture->has_been_failed = FALSE; + fixture->has_been_load_error = FALSE; + + uri_string = get_uri_for_path("/test_loading_status2"); + webkit_web_view_load_uri(fixture->webView, uri_string); + g_free(uri_string); + + g_main_loop_run(fixture->loop); + + g_signal_handlers_disconnect_by_func(fixture->webView, load_goback_status_changed_cb, fixture); + + fixture->has_been_provisional = FALSE; + fixture->has_been_committed = FALSE; + fixture->has_been_first_visually_non_empty_layout = FALSE; + fixture->has_been_finished = FALSE; + fixture->has_been_failed = FALSE; + fixture->has_been_load_error = FALSE; + + g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_wentback_status_changed_cb), fixture); + webkit_web_view_go_back(fixture->webView); + + g_main_loop_run(fixture->loop); + + g_signal_handlers_disconnect_by_func(fixture->webView, load_wentback_status_changed_cb, fixture); +} + int main(int argc, char** argv) { + SoupServer* server; + g_thread_init(NULL); gtk_test_init(&argc, &argv, NULL); + server = soup_server_new(SOUP_SERVER_PORT, 0, NULL); + soup_server_run_async(server); + + soup_server_add_handler(server, NULL, server_callback, NULL, NULL); + + base_uri = soup_uri_new("http://127.0.0.1/"); + soup_uri_set_port(base_uri, soup_server_get_port(server)); + g_test_bug_base("https://bugs.webkit.org/"); g_test_add("/webkit/loading/status", WebLoadingFixture, NULL, @@ -241,6 +427,11 @@ int main(int argc, char** argv) web_loading_fixture_setup, test_loading_cancelled, web_loading_fixture_teardown); + g_test_add("/webkit/loading/goback", + WebLoadingFixture, NULL, + web_loading_fixture_setup, + test_loading_goback, + web_loading_fixture_teardown); return g_test_run(); } diff --git a/WebKit/gtk/tests/testmimehandling.c b/WebKit/gtk/tests/testmimehandling.c index e68dcdf..bfe3148 100644 --- a/WebKit/gtk/tests/testmimehandling.c +++ b/WebKit/gtk/tests/testmimehandling.c @@ -23,6 +23,7 @@ #include <libsoup/soup.h> #include <string.h> #include <webkit/webkit.h> +#include <unistd.h> #if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) @@ -87,10 +88,11 @@ server_callback(SoupServer *server, SoupMessage *msg, soup_message_body_complete(msg->response_body); } -static gboolean idle_quit_loop_cb(gpointer data) +static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { - g_main_loop_quit(loop); - return FALSE; + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED || + webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED) + g_main_loop_quit(loop); } static gboolean mime_type_policy_decision_requested_cb(WebKitWebView* view, WebKitWebFrame* frame, @@ -138,7 +140,7 @@ static void test_mime_type(const char* name) loop = g_main_loop_new(NULL, TRUE); g_object_connect(G_OBJECT(view), - "signal::load-finished", idle_quit_loop_cb, NULL, + "signal::notify::load-status", idle_quit_loop_cb, NULL, "signal::mime-type-policy-decision-requested", mime_type_policy_decision_requested_cb, g_strdup(name), NULL); @@ -175,22 +177,20 @@ int main(int argc, char** argv) { SoupServer* server; SoupURI* soup_uri; - char* test_dir; - char* resources_dir; g_thread_init(NULL); gtk_test_init(&argc, &argv, NULL); /* Hopefully make test independent of the path it's called from. */ - test_dir = g_path_get_dirname(argv[0]); - resources_dir = g_build_path(G_DIR_SEPARATOR_S, test_dir, - "..", "..", "..", "..", - "WebKit", "gtk", "tests", "resources", - NULL); - g_free(test_dir); - - g_chdir(resources_dir); - g_free(resources_dir); + while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { + char path_name[PATH_MAX]; + + g_chdir(".."); + + g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/")); + } + + g_chdir("WebKit/gtk/tests/resources/"); server = soup_server_new(SOUP_SERVER_PORT, 0, NULL); soup_server_run_async(server); diff --git a/WebKit/gtk/tests/testwebdatasource.c b/WebKit/gtk/tests/testwebdatasource.c index fe5c62f..5c0568e 100644 --- a/WebKit/gtk/tests/testwebdatasource.c +++ b/WebKit/gtk/tests/testwebdatasource.c @@ -55,35 +55,45 @@ static void test_webkit_web_data_source_get_initial_request() g_object_unref(view); } -static void load_finished_unreachable_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLoop* loop) +static void notify_load_status_unreachable_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop) { + WebKitLoadStatus status = webkit_web_view_get_load_status (view); + WebKitWebFrame* frame = webkit_web_view_get_main_frame(view); + + if (status != WEBKIT_LOAD_FINISHED) + return; + if (waitTimer) { g_source_remove(waitTimer); waitTimer = 0; } - WebKitWebDataSource* datasource; - frame = webkit_web_view_get_main_frame(view); - datasource = webkit_web_frame_get_data_source(frame); + WebKitWebDataSource* datasource = webkit_web_frame_get_data_source(frame); g_assert_cmpstr("http://this.host.does.not.exist/doireallyexist.html", ==, webkit_web_data_source_get_unreachable_uri(datasource)); - if (g_main_loop_is_running(loop)) - g_main_loop_quit(loop); + g_main_loop_quit(loop); } -static void load_finished_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLoop* loop) +static void notify_load_status_cb(WebKitWebView* view, GParamSpec* pspec, GMainLoop* loop) { + WebKitLoadStatus status = webkit_web_view_get_load_status (view); + WebKitWebFrame* frame = webkit_web_view_get_main_frame(view); + WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame); + + if (status == WEBKIT_LOAD_COMMITTED) { + g_assert(webkit_web_data_source_is_loading(dataSource)); + return; + } + else if (status != WEBKIT_LOAD_FINISHED) + return; + if (waitTimer) { g_source_remove(waitTimer); waitTimer = 0; } - WebKitWebDataSource* dataSource; - frame = webkit_web_view_get_main_frame(view); - dataSource = webkit_web_frame_get_data_source(frame); - /* Test get_request */ g_test_message("Testing webkit_web_data_source_get_request"); WebKitNetworkRequest* request = webkit_web_data_source_get_request(dataSource); @@ -102,21 +112,13 @@ static void load_finished_cb(WebKitWebView* view, WebKitWebFrame* frame, GMainLo /* FIXME: Add test for get_encoding */ - if (g_main_loop_is_running(loop)) - g_main_loop_quit(loop); -} - -static void load_committed_cb(WebKitWebView* view, WebKitWebFrame* frame) -{ - WebKitWebDataSource* dataSource = webkit_web_frame_get_data_source(frame); - g_assert(webkit_web_data_source_is_loading(dataSource)); + g_main_loop_quit(loop); } static gboolean wait_timer_fired(GMainLoop* loop) { waitTimer = 0; - if (g_main_loop_is_running(loop)) - g_main_loop_quit(loop); + g_main_loop_quit(loop); return FALSE; } @@ -129,8 +131,7 @@ static void test_webkit_web_data_source() view = WEBKIT_WEB_VIEW(webkit_web_view_new()); g_object_ref_sink(view); loop = g_main_loop_new(NULL, TRUE); - g_signal_connect(view, "load-committed", G_CALLBACK(load_committed_cb), loop); - g_signal_connect(view, "load-finished", G_CALLBACK(load_finished_cb), loop); + g_signal_connect(view, "notify::load-status", G_CALLBACK(notify_load_status_cb), loop); webkit_web_view_load_uri(view, "http://webkit.org"); if (!waitTimer) @@ -148,7 +149,7 @@ static void test_webkit_web_data_source_unreachable_uri() view = WEBKIT_WEB_VIEW(webkit_web_view_new()); g_object_ref_sink(view); loop = g_main_loop_new(NULL, TRUE); - g_signal_connect(view, "load-finished", G_CALLBACK(load_finished_unreachable_cb), loop); + g_signal_connect(view, "notify::load-status", G_CALLBACK(notify_load_status_unreachable_cb), loop); webkit_web_view_load_uri(view, "http://this.host.does.not.exist/doireallyexist.html"); if (!waitTimer) diff --git a/WebKit/gtk/tests/testwebresource.c b/WebKit/gtk/tests/testwebresource.c index b9cd40b..81457a4 100644 --- a/WebKit/gtk/tests/testwebresource.c +++ b/WebKit/gtk/tests/testwebresource.c @@ -163,14 +163,16 @@ static void resource_request_starting_cb(WebKitWebView* web_view, WebKitWebFrame } } -static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data) +static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { - gboolean* been_there = data; - *been_there = TRUE; + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) { + gboolean* been_there = data; + *been_there = TRUE; - g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, "about:blank"); + g_assert_cmpstr(webkit_web_view_get_uri(web_view), ==, "about:blank"); - g_main_loop_quit(loop); + g_main_loop_quit(loop); + } } static void test_web_resource_loading() @@ -189,8 +191,8 @@ static void test_web_resource_loading() G_CALLBACK(resource_request_starting_cb), &been_to_resource_request_starting); - g_signal_connect(web_view, "load-finished", - G_CALLBACK(load_finished_cb), + g_signal_connect(web_view, "notify::load-status", + G_CALLBACK(notify_load_status_cb), &been_to_load_finished); webkit_web_view_load_uri(web_view, base_uri); @@ -220,9 +222,10 @@ static void resource_request_starting_sub_cb(WebKitWebView* web_view, WebKitWebF sub_resource = g_object_ref(web_resource); } -static void load_finished_sub_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data) +static void notify_load_status_sub_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { - g_main_loop_quit(loop); + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) + g_main_loop_quit(loop); } static gboolean idle_quit_loop_cb(gpointer data) @@ -249,8 +252,8 @@ static void test_web_resource_sub_resource_loading() G_CALLBACK(resource_request_starting_sub_cb), NULL); - g_signal_connect(web_view, "load-finished", - G_CALLBACK(load_finished_sub_cb), + g_signal_connect(web_view, "notify::load-status", + G_CALLBACK(notify_load_status_sub_cb), NULL); webkit_web_view_load_uri(web_view, uri); @@ -271,8 +274,10 @@ static void test_web_resource_sub_resource_loading() g_object_unref(main_resource); sub_resources = webkit_web_data_source_get_subresources(data_source); + // Expected resources: javascripts.js, favicon.ico g_assert(sub_resources); - g_assert(!sub_resources->next); + g_assert(sub_resources->next); + g_assert(!sub_resources->next->next); g_assert(WEBKIT_WEB_RESOURCE(sub_resources->data) == sub_resource); diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c index e0921c0..7482747 100644 --- a/WebKit/gtk/tests/testwebview.c +++ b/WebKit/gtk/tests/testwebview.c @@ -63,10 +63,11 @@ server_callback(SoupServer* server, SoupMessage* msg, soup_message_body_complete(msg->response_body); } -static gboolean idle_quit_loop_cb(gpointer data) +static void idle_quit_loop_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { - g_main_loop_quit(loop); - return FALSE; + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED || + webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FAILED) + g_main_loop_quit(loop); } static void icon_uri_changed_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) @@ -105,7 +106,7 @@ static void test_webkit_web_view_icon_uri() loop = g_main_loop_new(NULL, TRUE); g_object_connect(G_OBJECT(view), - "signal::load-finished", idle_quit_loop_cb, NULL, + "signal::notify::progress", idle_quit_loop_cb, NULL, "signal::notify::icon-uri", icon_uri_changed_cb, &been_to_uri_changed, "signal::icon-loaded", icon_loaded_cb, &been_to_icon_loaded, NULL); @@ -124,22 +125,20 @@ int main(int argc, char** argv) { SoupServer* server; SoupURI* soup_uri; - char* test_dir; - char* resources_dir; g_thread_init(NULL); gtk_test_init(&argc, &argv, NULL); /* Hopefully make test independent of the path it's called from. */ - test_dir = g_path_get_dirname(argv[0]); - resources_dir = g_build_path(G_DIR_SEPARATOR_S, test_dir, - "..", "..", "..", "..", - "WebKit", "gtk", "tests", "resources", - NULL); - g_free(test_dir); - - g_chdir(resources_dir); - g_free(resources_dir); + while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) { + char path_name[PATH_MAX]; + + g_chdir(".."); + + g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/")); + } + + g_chdir("WebKit/gtk/tests/resources/"); server = soup_server_new(SOUP_SERVER_PORT, 0, NULL); soup_server_run_async(server); diff --git a/WebKit/gtk/tests/testwindow.c b/WebKit/gtk/tests/testwindow.c index 41ff323..106f934 100644 --- a/WebKit/gtk/tests/testwindow.c +++ b/WebKit/gtk/tests/testwindow.c @@ -22,11 +22,13 @@ #if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0) -static void load_finished_cb(WebKitWebView* web_view, WebKitWebFrame* web_frame, gpointer data) +static void notify_load_status_cb(WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { - GMainLoop* loop = (GMainLoop*)data; + if (webkit_web_view_get_load_status(web_view) == WEBKIT_LOAD_FINISHED) { + GMainLoop* loop = (GMainLoop*)data; - g_main_loop_quit(loop); + g_main_loop_quit(loop); + } } static void test_webkit_window_scrollbar_policy(void) @@ -47,8 +49,8 @@ static void test_webkit_window_scrollbar_policy(void) webView = webkit_web_view_new(); g_object_ref_sink(webView); - g_signal_connect(webView, "load-finished", - G_CALLBACK(load_finished_cb), loop); + g_signal_connect(webView, "notify::load-status", + G_CALLBACK(notify_load_status_cb), loop); gtk_container_add(GTK_CONTAINER(scrolledWindow), webView); diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp index dd6629b..1912a12 100644 --- a/WebKit/gtk/webkit/webkitdownload.cpp +++ b/WebKit/gtk/webkit/webkitdownload.cpp @@ -22,6 +22,7 @@ #include "CString.h" #include <glib/gi18n-lib.h> +#include "GRefPtr.h" #include "Noncopyable.h" #include "NotImplemented.h" #include "ResourceHandleClient.h" @@ -853,22 +854,24 @@ static void webkit_download_received_data(WebKitDownload* download, const gchar* if (priv->currentSize > webkit_download_get_total_size(download)) g_object_notify(G_OBJECT(download), "total-size"); - gdouble lastProgress = webkit_download_get_progress(download); - // Throttle progress notification to not consume high amounts of - // CPU on fast links, except when the progress is >= 3%, or we - // reached the end. + // CPU on fast links, except when the last notification occured + // in more then 0.7 secs from now, or the last notified progress + // is passed in 1% or we reached the end. + static gdouble lastProgress = 0; static gdouble lastElapsed = 0; gdouble currentElapsed = g_timer_elapsed(priv->timer, NULL); + gdouble currentProgress = webkit_download_get_progress(download); if (lastElapsed - && (currentElapsed - lastElapsed) < 0.1 - && (webkit_download_get_progress(download) - lastProgress) < 0.03 - && webkit_download_get_progress(download) < 1.0) { - lastElapsed = currentElapsed; + && lastProgress + && (currentElapsed - lastElapsed) < 0.7 + && (currentProgress - lastProgress) < 0.01 + && currentProgress < 1.0) { return; } lastElapsed = currentElapsed; + lastProgress = currentProgress; g_object_notify(G_OBJECT(download), "progress"); } @@ -890,6 +893,7 @@ static void webkit_download_error(WebKitDownload* download, const ResourceError& webkit_download_close_stream(download); WebKitDownloadPrivate* priv = download->priv; + GRefPtr<WebKitDownload> protect(download); g_timer_stop(priv->timer); webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_ERROR); diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp index c80160c..be88bb5 100644 --- a/WebKit/gtk/webkit/webkitprivate.cpp +++ b/WebKit/gtk/webkit/webkitprivate.cpp @@ -23,6 +23,7 @@ #include "webkitsoupauthdialog.h" #include "webkitprivate.h" #include "ApplicationCacheStorage.h" +#include "Chrome.h" #include "ChromeClientGtk.h" #include "Frame.h" #include "FrameLoader.h" @@ -42,6 +43,7 @@ #include <runtime/InitializeThreading.h> #include "SecurityOrigin.h" #include <stdlib.h> +#include "TextEncodingRegistry.h" #include "webkitnetworkresponse.h" #if ENABLE(DATABASE) @@ -221,7 +223,11 @@ static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMes return NULL; GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformPageClient())); +#if GTK_CHECK_VERSION(2, 18, 0) + if (gtk_widget_is_toplevel(toplevel)) +#else if (GTK_WIDGET_TOPLEVEL(toplevel)) +#endif return toplevel; else return NULL; @@ -245,10 +251,14 @@ void webkit_init() JSC::initializeThreading(); WebCore::InitializeLoggingChannelsIfNecessary(); + // We make sure the text codecs have been initialized, because + // that may only be done by the main thread. + atomicCanonicalTextEncodingName("UTF-8"); + // Page cache capacity (in pages). Comment from Mac port: // (Research indicates that value / page drops substantially after 3 pages.) // FIXME: Expose this with an API and/or calculate based on available resources - WebCore::pageCache()->setCapacity(3); + webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER); #if ENABLE(DATABASE) gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL); @@ -280,6 +290,8 @@ void webkit_init() SoupSessionFeature* sniffer = static_cast<SoupSessionFeature*>(g_object_new(SOUP_TYPE_CONTENT_SNIFFER, NULL)); soup_session_add_feature(session, sniffer); g_object_unref(sniffer); + + soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER); } void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains) diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index e17e79e..e9d61a6 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -152,6 +152,7 @@ extern "C" { WebKitWebResource* mainResource; char* mainResourceIdentifier; GHashTable* subResources; + char* tooltipText; }; #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate)) @@ -254,6 +255,9 @@ extern "C" { GList* webkit_web_view_get_subresources(WebKitWebView*); + void + webkit_web_view_set_tooltip_text(WebKitWebView*, const char*); + WebKitDownload* webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response); diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp index 64fdc40..35d9524 100644 --- a/WebKit/gtk/webkit/webkitwebframe.cpp +++ b/WebKit/gtk/webkit/webkitwebframe.cpp @@ -54,7 +54,9 @@ #include "JSDOMBinding.h" #include "ScriptController.h" #include "SubstituteData.h" +#if ENABLE(SVG) #include "SVGSMILElement.h" +#endif #include <atk/atk.h> #include <JavaScriptCore/APICast.h> @@ -182,6 +184,14 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** + * WebKitWebFrame::load-done + * @web_frame: the object on which the signal is emitted + * + * Emitted when frame loading is done. + * + * Deprecated: Use the "load-status" property instead. + */ webkit_web_frame_signals[LOAD_COMMITTED] = g_signal_new("load-committed", G_TYPE_FROM_CLASS(frameClass), (GSignalFlags)G_SIGNAL_RUN_LAST, @@ -197,7 +207,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass) * * Emitted when frame loading is done. * - * Deprecated: Use WebKitWebView::load-finished instead, and/or + * Deprecated: Use the "load-status" property instead, and/or * WebKitWebView::load-error to be notified of load errors */ webkit_web_frame_signals[LOAD_DONE] = g_signal_new("load-done", @@ -210,6 +220,15 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass) G_TYPE_NONE, 1, G_TYPE_BOOLEAN); + /** + * WebKitWebFrame::title-changed: + * @frame: the object on which the signal is emitted + * @title: the new title + * + * When a #WebKitWebFrame changes the document title this signal is emitted. + * + * Deprecated: 1.1.18: Use "notify::title" instead. + */ webkit_web_frame_signals[TITLE_CHANGED] = g_signal_new("title-changed", G_TYPE_FROM_CLASS(frameClass), (GSignalFlags)G_SIGNAL_RUN_LAST, @@ -891,7 +910,12 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr g_return_val_if_fail(GTK_IS_PRINT_OPERATION(operation), GTK_PRINT_OPERATION_RESULT_ERROR); GtkWidget* topLevel = gtk_widget_get_toplevel(GTK_WIDGET(webkit_web_frame_get_web_view(frame))); + +#if GTK_CHECK_VERSION(2, 18, 0) + if (!gtk_widget_is_toplevel(topLevel)) +#else if (!GTK_WIDGET_TOPLEVEL(topLevel)) +#endif topLevel = NULL; Frame* coreFrame = core(frame); @@ -930,11 +954,20 @@ void webkit_web_frame_print(WebKitWebFrame* frame) if (error) { GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(priv->webView)); +#if GTK_CHECK_VERSION(2, 18, 0) + GtkWidget* dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + "%s", error->message); +#else GtkWidget* dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); +#endif + g_error_free(error); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); @@ -963,13 +996,13 @@ bool webkit_web_frame_pause_transition(WebKitWebFrame* frame, const gchar* name, bool webkit_web_frame_pause_svg_animation(WebKitWebFrame* frame, const gchar* animationId, double time, const gchar* elementId) { ASSERT(core(frame)); +#if ENABLE(SVG) Document* document = core(frame)->document(); if (!document || !document->svgExtensions()) return false; Element* coreElement = document->getElementById(AtomicString(animationId)); if (!coreElement || !SVGSMILElement::isSMILElement(coreElement)) return false; -#if ENABLE(SVG) return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreElement), time); #else return false; diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp index aab8b51..f2811ea 100644 --- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp +++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp @@ -432,6 +432,33 @@ gdouble webkit_web_history_item_get_last_visited_time(WebKitWebHistoryItem* webH return item->lastVisitedTime(); } +/** + * webkit_web_history_item_copy : + * @web_history_item: a #WebKitWebHistoryItem + * + * Makes a copy of the item for use with other WebView objects. + * + * Since: 1.1.18 + * + * Return value: the new #WebKitWebHistoryItem. + */ +WebKitWebHistoryItem* webkit_web_history_item_copy(WebKitWebHistoryItem* self) +{ + WebKitWebHistoryItemPrivate* selfPrivate = self->priv; + + WebKitWebHistoryItem* item = WEBKIT_WEB_HISTORY_ITEM(g_object_new(WEBKIT_TYPE_WEB_HISTORY_ITEM, 0)); + WebKitWebHistoryItemPrivate* priv = item->priv; + + priv->title = selfPrivate->title; + priv->alternateTitle = selfPrivate->alternateTitle; + priv->uri = selfPrivate->uri; + priv->originalUri = selfPrivate->originalUri; + + priv->historyItem = selfPrivate->historyItem->copy().releaseRef(); + + return item; +} + /* private methods */ G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem* webHistoryItem) diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.h b/WebKit/gtk/webkit/webkitwebhistoryitem.h index cafeb36..1820736 100644 --- a/WebKit/gtk/webkit/webkitwebhistoryitem.h +++ b/WebKit/gtk/webkit/webkitwebhistoryitem.h @@ -82,6 +82,9 @@ webkit_web_history_item_get_original_uri (WebKitWebHistoryItem *web_history WEBKIT_API gdouble webkit_web_history_item_get_last_visited_time (WebKitWebHistoryItem *web_history_item); +WEBKIT_API WebKitWebHistoryItem* +webkit_web_history_item_copy (WebKitWebHistoryItem *web_history_item); + G_END_DECLS #endif /* webkitwebhistoryitem_h */ diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp index c866c0f..f421f40 100644 --- a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp +++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp @@ -177,7 +177,9 @@ static void webkit_web_navigation_action_class_init(WebKitWebNavigationActionCla /** * WebKitWebNavigationAction:button: * - * The button used to click if the action was a mouse event. + * The DOM identifier for the mouse button used to click. DOM button values + * are 0, 1 and 2 for left, middle and right buttons. If the action was not + * initiated by a mouse click the value will be -1. * * Since: 1.0.3 */ @@ -308,8 +310,9 @@ void webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* na * webkit_web_navigation_action_get_button: * @navigationAction: a #WebKitWebNavigationAction * - * Returns the mouse button used to click if the action was a mouse event. - * Otherwise returns -1. + * Returns the DOM identifier for the mouse button used to click. + * DOM button values are 0, 1 and 2 for left, middle and right buttons. + * If the action was not initiated by a mouse click, returns -1. * * Return value: the mouse button used to click * diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp index e995e08..bd3cd69 100644 --- a/WebKit/gtk/webkit/webkitwebresource.cpp +++ b/WebKit/gtk/webkit/webkitwebresource.cpp @@ -245,13 +245,13 @@ void webkit_web_resource_init_with_core_resource(WebKitWebResource* webResource, /** * webkit_web_resource_new: * @data: the data to initialize the #WebKitWebResource - * @length: the length of @data + * @size: the length of @data * @uri: the uri of the #WebKitWebResource * @mime_type: the MIME type of the #WebKitWebResource - * @text_encoding_name: the text encoding name of the #WebKitWebResource + * @encoding: the text encoding name of the #WebKitWebResource * @frame_name: the frame name of the #WebKitWebResource * - * Returns a new #WebKitWebResource. The @text_encoding_name can be %NULL. The + * Returns a new #WebKitWebResource. The @encoding can be %NULL. The * @frame_name argument can be used if the resource represents contents of an * entire HTML frame, otherwise pass %NULL. * diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp index 143ae06..1e2f8cc 100644 --- a/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -4,6 +4,8 @@ * Copyright (C) 2008 Collabora Ltd. * Copyright (C) 2008 Holger Hans Peter Freyther * Copyright (C) 2009 Jan Michael Alonzo + * Copyright (C) 2009 Movial Creative Technologies Inc. + * Copyright (C) 2009 Igalia S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -35,7 +37,7 @@ #include "PlatformString.h" #include <glib/gi18n-lib.h> -#if PLATFORM(UNIX) +#if OS(UNIX) #include <sys/utsname.h> #endif @@ -98,6 +100,9 @@ struct _WebKitWebSettingsPrivate { gboolean enable_universal_access_from_file_uris; gboolean enable_dom_paste; gboolean tab_key_cycles_through_elements; + gboolean enable_default_context_menu; + gboolean enable_site_specific_quirks; + gboolean enable_page_cache; }; #define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate)) @@ -139,7 +144,10 @@ enum { PROP_EDITING_BEHAVIOR, PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS, PROP_ENABLE_DOM_PASTE, - PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS + PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS, + PROP_ENABLE_DEFAULT_CONTEXT_MENU, + PROP_ENABLE_SITE_SPECIFIC_QUIRKS, + PROP_ENABLE_PAGE_CACHE }; // Create a default user agent string @@ -152,7 +160,7 @@ static String webkit_get_user_agent() #if PLATFORM(X11) platform = g_strdup("X11"); -#elif PLATFORM(WIN_OS) +#elif OS(WINDOWS) platform = g_strdup("Windows"); #elif PLATFORM(MAC) platform = g_strdup("Macintosh"); @@ -163,22 +171,22 @@ static String webkit_get_user_agent() #endif // FIXME: platform/version detection can be shared. -#if PLATFORM(DARWIN) +#if OS(DARWIN) -#if PLATFORM(X86) +#if CPU(X86) osVersion = g_strdup("Intel Mac OS X"); #else osVersion = g_strdup("PPC Mac OS X"); #endif -#elif PLATFORM(UNIX) +#elif OS(UNIX) struct utsname name; if (uname(&name) != -1) osVersion = g_strdup_printf("%s %s", name.sysname, name.machine); else osVersion = g_strdup("Unknown"); -#elif PLATFORM(WIN_OS) +#elif OS(WINDOWS) // FIXME: Compute the Windows version osVersion = g_strdup("Windows"); @@ -686,6 +694,71 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) TRUE, flags)); + /** + * WebKitWebSettings:enable-default-context-menu: + * + * Whether right-clicks should be handled automatically to create, + * and display the context menu. Turning this off will make + * WebKitGTK+ not emit the populate-popup signal. Notice that the + * default button press event handler may still handle right + * clicks for other reasons, such as in-page context menus, or + * right-clicks that are handled by the page itself. + * + * Since: 1.1.18 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_DEFAULT_CONTEXT_MENU, + g_param_spec_boolean( + "enable-default-context-menu", + _("Enable Default Context Menu"), + _("Enables the handling of right-clicks for the creation of the default context menu"), + TRUE, + flags)); + + /** + * WebKitWebSettings::enable-site-specific-quirks + * + * Whether to turn on site-specific hacks. Turning this on will + * tell WebKitGTK+ to use some site-specific workarounds for + * better web compatibility. For example, older versions of + * MediaWiki will incorrectly send WebKit a css file with KHTML + * workarounds. By turning on site-specific quirks, WebKit will + * special-case this and other cases to make the sites work. + * + * Since: 1.1.18 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_SITE_SPECIFIC_QUIRKS, + g_param_spec_boolean( + "enable-site-specific-quirks", + _("Enable Site Specific Quirks"), + _("Enables the site-specific compatibility workarounds"), + FALSE, + flags)); + + /** + * WebKitWebSettings:enable-page-cache: + * + * Enable or disable the page cache. Disabling the page cache is + * generally only useful for special circumstances like low-memory + * scenarios or special purpose applications like static HTML + * viewers. This setting only controls the Page Cache, this cache + * is different than the disk-based or memory-based traditional + * resource caches, its point is to make going back and forth + * between pages much faster. For details about the different types + * of caches and their purposes see: + * http://webkit.org/blog/427/webkit-page-cache-i-the-basics/ + * + * Since: 1.1.18 + */ + g_object_class_install_property(gobject_class, + PROP_ENABLE_PAGE_CACHE, + g_param_spec_boolean("enable-page-cache", + _("Enable page cache"), + _("Whether the page cache should be used"), + FALSE, + flags)); + g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate)); } @@ -883,7 +956,16 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con priv->enable_dom_paste = g_value_get_boolean(value); break; case PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS: - priv->tab_key_cycles_through_elements = g_value_get_boolean(value); + priv->tab_key_cycles_through_elements = g_value_get_boolean(value); + break; + case PROP_ENABLE_DEFAULT_CONTEXT_MENU: + priv->enable_default_context_menu = g_value_get_boolean(value); + break; + case PROP_ENABLE_SITE_SPECIFIC_QUIRKS: + priv->enable_site_specific_quirks = g_value_get_boolean(value); + break; + case PROP_ENABLE_PAGE_CACHE: + priv->enable_page_cache = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); @@ -1002,7 +1084,16 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa case PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS: g_value_set_boolean(value, priv->tab_key_cycles_through_elements); break; - default: + case PROP_ENABLE_DEFAULT_CONTEXT_MENU: + g_value_set_boolean(value, priv->enable_default_context_menu); + break; + case PROP_ENABLE_SITE_SPECIFIC_QUIRKS: + g_value_set_boolean(value, priv->enable_site_specific_quirks); + break; + case PROP_ENABLE_PAGE_CACHE: + g_value_set_boolean(value, priv->enable_page_cache); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } @@ -1067,6 +1158,10 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings) "editing-behavior", priv->editing_behavior, "enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris, "enable-dom-paste", priv->enable_dom_paste, + "tab-key-cycles-through-elements", priv->tab_key_cycles_through_elements, + "enable-default-context-menu", priv->enable_default_context_menu, + "enable-site-specific-quirks", priv->enable_site_specific_quirks, + "enable-page-cache", priv->enable_page_cache, NULL)); return copy; diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 211f671..ad13895 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -8,6 +8,8 @@ * Copyright (C) 2008 Nuanti Ltd. * Copyright (C) 2008, 2009 Collabora Ltd. * Copyright (C) 2009 Igalia S.L. + * Copyright (C) 2009 Movial Creative Technologies Inc. + * Copyright (C) 2009 Bobby Powers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -40,6 +42,7 @@ #include "AXObjectCache.h" #include "NotImplemented.h" #include "BackForwardList.h" +#include "Cache.h" #include "CString.h" #include "ChromeClientGtk.h" #include "ContextMenu.h" @@ -64,6 +67,7 @@ #include "FrameLoader.h" #include "FrameView.h" #include "MouseEventWithHitTestResults.h" +#include "PageCache.h" #include "Pasteboard.h" #include "PasteboardHelper.h" #include "PasteboardHelperGtk.h" @@ -112,6 +116,7 @@ */ static const double defaultDPI = 96.0; +static WebKitCacheModel cacheModel; using namespace WebKit; using namespace WebCore; @@ -174,7 +179,8 @@ enum { PROP_PROGRESS, PROP_ENCODING, PROP_CUSTOM_ENCODING, - PROP_ICON_URI + PROP_ICON_URI, + PROP_IM_CONTEXT }; static guint webkit_web_view_signals[LAST_SIGNAL] = { 0, }; @@ -184,6 +190,8 @@ G_DEFINE_TYPE(WebKitWebView, webkit_web_view, GTK_TYPE_CONTAINER) static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GParamSpec* pspec, WebKitWebView* webView); static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWebWindowFeatures* webWindowFeatures); +static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*); + static void destroy_menu_cb(GtkObject* object, gpointer data) { WebKitWebView* webView = WEBKIT_WEB_VIEW(data); @@ -207,8 +215,28 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie if (!handledEvent) return FALSE; + // If coreMenu is NULL, this means WebCore decided to not create + // the default context menu; this may still mean that the frame + // wants to consume the event - this happens when the page is + // handling the right-click for reasons other than a context menu, + // so we give it to it. ContextMenu* coreMenu = page->contextMenuController()->contextMenu(); - if (!coreMenu) + if (!coreMenu) { + Frame* frame = core(webView)->mainFrame(); + if (frame->view() && frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(event))) + return TRUE; + + return FALSE; + } + + // If we reach here, it's because WebCore is going to show the + // default context menu. We check our setting to figure out + // whether we want it or not. + WebKitWebSettings* settings = webkit_web_view_get_settings(webView); + gboolean enableDefaultContextMenu; + g_object_get(settings, "enable-default-context-menu", &enableDefaultContextMenu, NULL); + + if (!enableDefaultContextMenu) return FALSE; GtkMenu* menu = GTK_MENU(coreMenu->platformDescription()); @@ -359,6 +387,9 @@ static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue* case PROP_ICON_URI: g_value_set_string(value, webkit_web_view_get_icon_uri(webView)); break; + case PROP_IM_CONTEXT: + g_value_set_object(value, webkit_web_view_get_im_context(webView)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } @@ -625,7 +656,11 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus* // TODO: Improve focus handling as suggested in // http://bugs.webkit.org/show_bug.cgi?id=16910 GtkWidget* toplevel = gtk_widget_get_toplevel(widget); +#if GTK_CHECK_VERSION(2, 18, 0) + if (gtk_widget_is_toplevel(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) { +#else if (GTK_WIDGET_TOPLEVEL(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) { +#endif WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); FocusController* focusController = core(webView)->focusController(); @@ -814,7 +849,11 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF } window = gtk_widget_get_toplevel(GTK_WIDGET(webView)); +#if GTK_CHECK_VERSION(2, 18, 0) + dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message); +#else dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message); +#endif gchar* title = g_strconcat("JavaScript - ", webkit_web_frame_get_uri(frame), NULL); gtk_window_set_title(GTK_WINDOW(dialog), title); g_free(title); @@ -1028,6 +1067,7 @@ static void webkit_web_view_finalize(GObject* object) WebKitWebView* webView = WEBKIT_WEB_VIEW(object); WebKitWebViewPrivate* priv = webView->priv; + g_free(priv->tooltipText); g_free(priv->mainResourceIdentifier); g_free(priv->encoding); g_free(priv->customEncoding); @@ -1251,6 +1291,26 @@ static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* con clipboard_contents_received, contents_request); } +#if GTK_CHECK_VERSION(2, 12, 0) +static gboolean webkit_web_view_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip) +{ + WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(widget); + + if (priv->tooltipText) { + gtk_tooltip_set_text(tooltip, priv->tooltipText); + return TRUE; + } + + return FALSE; +} +#endif + +static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView* webView) +{ + g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0); + return GTK_IM_CONTEXT(webView->priv->imContext); +} + static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) { GtkBindingSet* binding_set; @@ -1521,9 +1581,10 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @return: %TRUE if the download should be performed, %FALSE to cancel it. * * A new Download is being requested. By default, if the signal is - * not handled, the download is cancelled. Notice that while - * handling this signal you must set the target URI using - * webkit_download_set_target_uri(). + * not handled, the download is cancelled. If you handle the download + * and call webkit_download_set_destination_uri(), it will be + * started for you. If you need to set the destination asynchronously + * you are responsible for starting or cancelling it yourself. * * If you intend to handle downloads yourself rather than using * the #WebKitDownload helper object you must handle this signal, @@ -1558,6 +1619,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @frame: the frame going to do the load * * When a #WebKitWebFrame begins to load this signal is emitted. + * + * Deprecated: Use the "load-status" property instead. */ webkit_web_view_signals[LOAD_STARTED] = g_signal_new("load-started", G_TYPE_FROM_CLASS(webViewClass), @@ -1575,6 +1638,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * @frame: the main frame that received the first data * * When a #WebKitWebFrame loaded the first data this signal is emitted. + * + * Deprecated: Use the "load-status" property instead. */ webkit_web_view_signals[LOAD_COMMITTED] = g_signal_new("load-committed", G_TYPE_FROM_CLASS(webViewClass), @@ -1591,6 +1656,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * WebKitWebView::load-progress-changed: * @web_view: the #WebKitWebView * @progress: the global progress + * + * Deprecated: Use the "progress" property instead. */ webkit_web_view_signals[LOAD_PROGRESS_CHANGED] = g_signal_new("load-progress-changed", G_TYPE_FROM_CLASS(webViewClass), @@ -1627,6 +1694,13 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) G_TYPE_STRING, G_TYPE_POINTER); + /** + * WebKitWebView::load-finished: + * @web_view: the #WebKitWebView + * @frame: the #WebKitWebFrame + * + * Deprecated: Use the "load-status" property instead. + */ webkit_web_view_signals[LOAD_FINISHED] = g_signal_new("load-finished", G_TYPE_FROM_CLASS(webViewClass), (GSignalFlags)G_SIGNAL_RUN_LAST, @@ -2106,6 +2180,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) widgetClass->screen_changed = webkit_web_view_screen_changed; widgetClass->drag_end = webkit_web_view_drag_end; widgetClass->drag_data_get = webkit_web_view_drag_data_get; +#if GTK_CHECK_VERSION(2, 12, 0) + widgetClass->query_tooltip = webkit_web_view_query_tooltip; +#endif GtkContainerClass* containerClass = GTK_CONTAINER_CLASS(webViewClass); containerClass->add = webkit_web_view_container_add; @@ -2369,6 +2446,16 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) * * Determines the current status of the load. * + * Connect to "notify::load-status" to monitor loading. + * + * Some versions of WebKitGTK+ emitted this signal for the default + * error page, while loading it. This behavior was considered bad, + * because it was essentially exposing an implementation + * detail. From 1.1.19 onwards this signal is no longer emitted for + * the default error pages, but keep in mind that if you override + * the error pages by using webkit_web_frame_load_alternate_string() + * the signals will be emitted. + * * Since: 1.1.7 */ g_object_class_install_property(objectClass, PROP_LOAD_STATUS, @@ -2406,6 +2493,23 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) _("The URI for the favicon for the #WebKitWebView."), NULL, WEBKIT_PARAM_READABLE)); + /** + * WebKitWebView:im-context: + * + * The GtkIMMulticontext for the #WebKitWebView. + * + * This is the input method context used for all text entry widgets inside + * the #WebKitWebView. It can be used to generate context menu items for + * controlling the active input method. + * + * Since: 1.1.20 + */ + g_object_class_install_property(objectClass, PROP_IM_CONTEXT, + g_param_spec_object("im-context", + "IM Context", + "The GtkIMMultiContext for the #WebKitWebView.", + GTK_TYPE_IM_CONTEXT, + WEBKIT_PARAM_READABLE)); g_type_class_add_private(webViewClass, sizeof(WebKitWebViewPrivate)); } @@ -2421,7 +2525,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas, enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage, enableXSSAuditor, javascriptCanOpenWindows, enableOfflineWebAppCache, - enableUniversalAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements; + enableUniversalAccessFromFileURI, enableDOMPaste, tabKeyCyclesThroughElements, + enableSiteSpecificQuirks, usePageCache; WebKitEditingBehavior editingBehavior; @@ -2452,6 +2557,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) "enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI, "enable-dom-paste", &enableDOMPaste, "tab-key-cycles-through-elements", &tabKeyCyclesThroughElements, + "enable-site-specific-quirks", &enableSiteSpecificQuirks, + "enable-page-cache", &usePageCache, NULL); settings->setDefaultTextEncodingName(defaultEncoding); @@ -2479,6 +2586,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView) settings->setEditingBehavior(core(editingBehavior)); settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI); settings->setDOMPasteAllowed(enableDOMPaste); + settings->setNeedsSiteSpecificQuirks(enableSiteSpecificQuirks); + settings->setUsesPageCache(usePageCache); Page* page = core(webView); if (page) @@ -2575,7 +2684,10 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar Page* page = core(webView); if (page) page->setTabKeyCyclesThroughElements(g_value_get_boolean(&value)); - } + } else if (name == g_intern_string("enable-site-specific-quirks")) + settings->setNeedsSiteSpecificQuirks(g_value_get_boolean(&value)); + else if (name == g_intern_string("enable-page-cache")) + settings->setUsesPageCache(g_value_get_boolean(&value)); else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name)) g_warning("Unexpected setting '%s'", name); g_value_unset(&value); @@ -2618,6 +2730,8 @@ static void webkit_web_view_init(WebKitWebView* webView) priv->webWindowFeatures = webkit_web_window_features_new(); priv->subResources = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); + + priv->tooltipText = 0; } GtkWidget* webkit_web_view_new(void) @@ -2656,7 +2770,10 @@ void webkit_web_view_request_download(WebKitWebView* webView, WebKitNetworkReque return; } - webkit_download_start(download); + /* Start the download now if it has a destination URI, otherwise it + may be handled asynchronously by the application. */ + if (webkit_download_get_destination_uri(download)) + webkit_download_start(download); } bool webkit_web_view_use_primary_for_paste(WebKitWebView* webView) @@ -3969,6 +4086,27 @@ static IntPoint documentPointForWindowPoint(Frame* frame, const IntPoint& window return view ? view->windowToContents(windowPoint) : windowPoint; } +void webkit_web_view_set_tooltip_text(WebKitWebView* webView, const char* tooltip) +{ +#if GTK_CHECK_VERSION(2, 12, 0) + WebKitWebViewPrivate* priv = webView->priv; + g_free(priv->tooltipText); + if (tooltip && *tooltip != '\0') { + priv->tooltipText = g_strdup(tooltip); + gtk_widget_set_has_tooltip(GTK_WIDGET(webView), TRUE); + } else { + priv->tooltipText = 0; + gtk_widget_set_has_tooltip(GTK_WIDGET(webView), FALSE); + } + + gtk_widget_trigger_tooltip_query(GTK_WIDGET(webView)); +#else + // TODO: Support older GTK+ versions + // See http://bugs.webkit.org/show_bug.cgi?id=15793 + notImplemented(); +#endif +} + /** * webkit_web_view_get_hit_test_result: * @webView: a #WebKitWebView @@ -4019,3 +4157,81 @@ G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView) priv->iconURI = g_strdup(iconURL.utf8().data()); return priv->iconURI; } + +/** + * webkit_set_cache_model: + * @cache_model: a #WebKitCacheModel + * + * Specifies a usage model for WebViews, which WebKit will use to + * determine its caching behavior. All web views follow the cache + * model. This cache model determines the RAM and disk space to use + * for caching previously viewed content . + * + * Research indicates that users tend to browse within clusters of + * documents that hold resources in common, and to revisit previously + * visited documents. WebKit and the frameworks below it include + * built-in caches that take advantage of these patterns, + * substantially improving document load speed in browsing + * situations. The WebKit cache model controls the behaviors of all of + * these caches, including various WebCore caches. + * + * Browsers can improve document load speed substantially by + * specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a + * browsing interface can reduce memory usage substantially by + * specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. Default value is + * WEBKIT_CACHE_MODEL_WEB_BROWSER. + * + * Since: 1.1.18 + */ +void webkit_set_cache_model(WebKitCacheModel model) +{ + if (cacheModel == model) + return; + + // FIXME: Add disk cache handling when soup has the API + guint cacheTotalCapacity; + guint cacheMinDeadCapacity; + guint cacheMaxDeadCapacity; + gdouble deadDecodedDataDeletionInterval; + guint pageCacheCapacity; + + switch (model) { + case WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: + pageCacheCapacity = 0; + cacheTotalCapacity = 0; + cacheMinDeadCapacity = 0; + cacheMaxDeadCapacity = 0; + deadDecodedDataDeletionInterval = 0; + break; + case WEBKIT_CACHE_MODEL_WEB_BROWSER: + pageCacheCapacity = 3; + cacheTotalCapacity = 32 * 1024 * 1024; + cacheMinDeadCapacity = cacheTotalCapacity / 4; + cacheMaxDeadCapacity = cacheTotalCapacity / 2; + deadDecodedDataDeletionInterval = 60; + break; + default: + g_return_if_reached(); + } + + cache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity); + cache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval); + pageCache()->setCapacity(pageCacheCapacity); + cacheModel = model; +} + +/** + * webkit_get_cache_model: + * + * Returns the current cache model. For more information about this + * value check the documentation of the function + * webkit_set_cache_model(). + * + * Return value: the current #WebKitCacheModel + * + * Since: 1.1.18 + */ +WebKitCacheModel webkit_get_cache_model() +{ + return cacheModel; +} diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h index 8dd7f39..e69de0a 100644 --- a/WebKit/gtk/webkit/webkitwebview.h +++ b/WebKit/gtk/webkit/webkitwebview.h @@ -49,6 +49,11 @@ typedef enum { WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD } WebKitNavigationResponse; +typedef enum { + WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER = 1, + WEBKIT_CACHE_MODEL_WEB_BROWSER +} WebKitCacheModel; + typedef enum { WEBKIT_WEB_VIEW_TARGET_INFO_HTML, @@ -370,6 +375,12 @@ webkit_web_view_get_hit_test_result (WebKitWebView *webView, WEBKIT_API G_CONST_RETURN gchar * webkit_web_view_get_icon_uri (WebKitWebView *webView); +WEBKIT_API void +webkit_set_cache_model (WebKitCacheModel cache_model); + +WEBKIT_API WebKitCacheModel +webkit_get_cache_model (void); + G_END_DECLS #endif diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog index 17c7470..13dd4e1 100644 --- a/WebKit/mac/ChangeLog +++ b/WebKit/mac/ChangeLog @@ -1,3 +1,4 @@ +<<<<<<< HEAD 2010-01-19 Steve Block <steveblock@google.com> Reviewed by Adam Barth. @@ -22570,3 +22571,6 @@ (-[WebView initWithCoder:]): == Rolled over to ChangeLog-2007-10-14 == +======= +== Rolled over to ChangeLog-2010-01-29 == +>>>>>>> webkit.org at r54127 diff --git a/WebKit/mac/ChangeLog-2010-01-29 b/WebKit/mac/ChangeLog-2010-01-29 new file mode 100644 index 0000000..e734309 --- /dev/null +++ b/WebKit/mac/ChangeLog-2010-01-29 @@ -0,0 +1,23230 @@ +2010-01-29 Mark Rowe <mrowe@apple.com> + + Fix the Mac build. + + Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional". + + As the comment in FeatureDefines.xcconfig notes, the list of feature defines + needs to be kept in sync across the various files. The default values also + need to be kept in sync between these files and build-webkit. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-29 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7441982> REGRESSION (TOT): Adobe CS4: Installer alerts are displayed as + blank windows + + * WebView/WebView.mm: + (shouldEnableLoadDeferring): Load deferring is enabled unless the application is Adobe + Installer. + (-[WebView _preferencesChangedNotification:]): Call setLoadDeferringEnabled(). + +2010-01-28 Enrica Casucci <enrica@apple.com> + + Reviewed by Maciej Stachowiak. + + Huge plain text pastes are slow + <rdar://problem/5195056> + https://bugs.webkit.org/show_bug.cgi?id=34237 + + Mail is ignoring the fragment created from plain text or HTML that is + passed to the delegate function, that creates a new one. + This fix avoids creating the fragment twice. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): + +2010-01-25 Anders Carlsson <andersca@apple.com> + + Featureless build fixes. + + * Misc/WebCache.mm: + (+[WebCache empty]): + * WebCoreSupport/WebApplicationCache.mm: + * WebCoreSupport/WebChromeClient.h: + * WebView/WebDataSource.mm: + (-[WebDataSource _transferApplicationCache:]): + * WebView/WebFrame.mm: + (-[WebFrame _cacheabilityDictionary]): + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + (-[WebView _close]): + * WebView/WebViewData.mm: + (-[WebViewPrivate dealloc]): + (-[WebViewPrivate finalize]): + +2010-01-25 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Simon Fraser. + + A WebGeolocationControllerClient is leaked for every WebView + https://bugs.webkit.org/show_bug.cgi?id=34145 + + * WebCoreSupport/WebGeolocationControllerClient.h: + * WebCoreSupport/WebGeolocationControllerClient.mm: + (WebGeolocationControllerClient::geolocationDestroyed): + +2010-01-22 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=34025 + Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-22 Brady Eidson <beidson@apple.com> + + Reviewed by Adele Peterson. + + [WebFrame loadRequest:] does not null check the WebCore::Frame + <rdar://problem/7416286> and https://bugs.webkit.org/show_bug.cgi?id=34021 + + * WebView/WebFrame.mm: + (-[WebFrame loadRequest:]): Null check the WebCore::Frame as it can disappear + out of underneath a WebFrame. + +2010-01-22 Peter Kasting <pkasting@google.com> + + Reviewed by David Hyatt. + + When scrolling by page, hold back 1/8th of the visible size instead of + 40 px. + https://bugs.webkit.org/show_bug.cgi?id=32595 + + * WebView/WebFrameView.mm: + (-[WebFrameView _verticalPageScrollDistance]): + (-[WebFrameView initWithFrame:]): + (-[WebFrameView _horizontalPageScrollDistance]): + +2010-01-20 Jian Li <jianli@chromium.org> + + Reviewed by Dmitry Titov. + + Implement File and Blob interfaces as defined in File API spec. + https://bugs.webkit.org/show_bug.cgi?id=32912 + + * MigrateHeaders.make: + +2010-01-19 Timothy Hatcher <timothy@apple.com> + + Fix erroneous page scrolls when trying to select text or use form elements + with the Web Inspector docked. + + http://webkit.org/b/24403 + rdar://problem/6753925 + + Reviewed by John Sullivan and Darin Adler. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was + incorrectly converting the rect under the assumption that the frame view + is the same size as the WebView. Using convertRect:fromView: instead + is enough to fix the bug, but that code isn't needed since WebCore + already takes care of scrolling the main frame's document view, so it + was redundant to do it here too. + +2010-01-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler and Adam Roben. + + Feature defines are difficult to maintain on Windows builds + https://bugs.webkit.org/show_bug.cgi?id=33883 + + * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync. + +2010-01-20 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7489504> Clicking on an overflow scrollbar when the window doesn't have + focus only focuses the window; it should start scrolling too + https://bugs.webkit.org/show_bug.cgi?id=33906 + + * Misc/WebElementDictionary.mm: + (+[WebElementDictionary initializeLookupTable]): Initialize WebElementIsInScrollBarKey. + (-[WebElementDictionary _isInScrollBar]): Added. Returns whether the HitTestResult contains + a scroll bar. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _isScrollBarEvent:]): Added. Returns whether the event point is in a scroll + bar in this view. + (-[WebHTMLView acceptsFirstMouse:]): Accept scroll bar events. + * WebView/WebView.mm: Define WebElementIsInScrollBarKey. + * WebView/WebViewPrivate.h: Declare WebElementIsInScrollBarKey. + +2010-01-19 Dan Bernstein <mitz@apple.com> + + Redo Tiger build fix without making WebTypesInternal.h a private header + + * WebView/WebHTMLRepresentation.h: Define and use WebNSUInteger. + * WebView/WebHTMLRepresentation.mm: Import WebTypesInternal.h. + +2009-12-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7068584> Crash at NetscapePluginHostProxy::processRequests + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::waitForReply): Wrapped with calls + to willCallPluginFunction/didCallPluginFunction. This prevents the plug-in + from being stopped while waiting for reply. + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Protect the + instance proxy in case the plug-in host crashes while waiting for reply. + * Plugins/Hosted/ProxyInstance.h: + (WebKit::ProxyInstance::waitForReply): Added. Calls through to + NetscapePluginInstanceProxy::waitForReply(), but returns a null reply if the + proxy gets invalidated while waiting for the reply. + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): Use ProxyInstance::waitForReply(). + (WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto. + (WebKit::ProxyInstance::supportsConstruct): Ditto. + (WebKit::ProxyInstance::getPropertyNames): Ditto. + (WebKit::ProxyInstance::methodsNamed): Ditto. + (WebKit::ProxyInstance::fieldNamed): Ditto. + (WebKit::ProxyInstance::fieldValue): Ditto. + (WebKit::ProxyInstance::setFieldValue): Ditto. + +2010-01-19 John Sullivan <sullivan@apple.com> + + Tiger build fix. + + * WebView/WebHTMLRepresentation.h: + Added #import for WebTypesInternal.h so NSUInteger will be defined on Tiger. + +2010-01-19 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Tim Hatcher. + + Part of <http://webkit.org/b/28622>. + Caught exceptions still pause the debugger. + + Update WebScriptDebugger::exception to have the hasHandler parameter. + + This just adds a new parameter, no behavior is changed. + + * WebView/WebScriptDebugger.h: + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::exception): + +2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: The child <option> elements of a non-multiple <select> are not + exposed + + https://bugs.webkit.org/show_bug.cgi?id=33773 + <rdar://problem/7550556> + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXMenuListPopupActionVerb]): + Stubbed. + (-[WebViewFactory AXMenuListActionVerb]): + Stubbed. + +2010-01-19 John Sullivan <sullivan@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=33854 + Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns + more info about where the result was found + + Reviewed by Darin Adler + + * WebView/WebHTMLRepresentation.h: + Declare -searchForLabels:beforeElement:resultDistance:resultIsInCellAbove. + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation searchForLabels:beforeElement:]): + Now calls through to searchForLabels:beforeElement:resultDistance:resultIsInCellAbove. + (-[WebHTMLRepresentation searchForLabels:beforeElement:resultDistance:resultIsInCellAbove:]): + New method, calls through to WebCore. + +2010-01-19 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Add an API to obtain the WebScriptWorld for a given JSGlobalContextRef. + + * WebView/WebScriptWorld.h: + * WebView/WebScriptWorld.mm: + (+[WebScriptWorld scriptWorldForGlobalContext:]): + +2010-01-19 Steve Block <steveblock@google.com> + + Unreviewed build fix. + + Fixes Snow Leopard build due to http://trac.webkit.org/changeset/53464 + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: Modified. Import <WebCore/Bridge.h> + +2010-01-19 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + + Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h] + https://bugs.webkit.org/show_bug.cgi?id=33801 + + * Plugins/Hosted/ProxyInstance.h: + +2010-01-18 Enrica Casucci <enrica@apple.com> + + Reviewed by Darin Adler. + + Script attributes are copied and pasted, making cross-domain attacks possible (30019) + <rdar://problem/6008809> + https://bugs.webkit.org/show_bug.cgi?id=30019 + + * WebView/WebFrame.mm: + (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Modified the call to createMarkupString. + +2010-01-18 Steve Falkenburg <sfalken@apple.com> + + Rubber-stamped by Sam Weinig. + + Add missing export for Geolocation. + + * WebKit.exp: + +2010-01-18 Adam Roben <aroben@apple.com> + + Add +[WebView _setDomainRelaxationForbidden:forURLScheme:] + + WebKit/mac part of fixing <http://webkit.org/b/33806> + <rdar://problem/7552837> Would like API to disallow setting of + document.domain for pages with certain URL schemes + + Reviewed by Sam Weinig. + + * WebView/WebView.mm: + (+[WebView _setDomainRelaxationForbidden:forURLScheme:]): + * WebView/WebViewPrivate.h: + Added. Calls through to SecurityOrigin. + +2010-01-16 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Oliver Hunt. + + Cache JS string values made from DOM strings (Dromaeo speedup) + https://bugs.webkit.org/show_bug.cgi?id=33768 + <rdar://problem/7353576> + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::stringValue): Explicitly make a String, since char* + is now ambiguous. + +2010-01-13 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7532544> + + Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will + be used for a shadow drawing fix. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2010-01-13 Kevin Decker <kdecker@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=33610 + <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView _workaroundSilverlightFullScreenBug:]): Added. Work around Silverlight full screen + performance issue by maintaining an accelerated GL pixel format. We can safely remove this at some point in + the future when both Microsoft releases a genuine fix for 7288546 and enough Silverlight users update to the + new Silverlight. For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it + resolved its full screen badness. + (-[WebNetscapePluginView _createPlugin]): Call _workaroundSilverlightFullScreenBug:YES if this is Silverlight. + (-[WebNetscapePluginView _destroyPlugin]): Call _workaroundSilverlightFullScreenBug:NO if this is Silverlight. + +2010-01-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7512726> Flash full-screen does not work correctly with Flash 10.1 beta + + Explicitly track when the plug-in shows and hides a full-screen window to determine + whether a plug-in is currently full-screen, rather than relying on menu bar visibility. + This ensures that we activate the plug-in host process and client application as + appropriate when the plug-in enters or exits full-screen. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::isFullScreenWindowShowing): + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::setMenuBarVisible): + (WebKit::NetscapePluginHostProxy::didEnterFullScreen): + (WebKit::NetscapePluginHostProxy::didExitFullScreen): + (WebKit::NetscapePluginHostProxy::setFullScreenWindowIsShowing): + (WKPCSetMenuBarVisible): + (WKPCSetFullScreenWindowIsShowing): + * Plugins/Hosted/WebKitPluginClient.defs: + +2010-01-11 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=33455 + Allows plugins to participate in accelerated compositing + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): If accelerated compositing is + available, don't use a layer-backed NSView for plugins. Instead, tickle the + accelerated compositing code via setNeedsStyleRecalc(SyntheticStyleChange), + which will parent the plugin's layer in the accelerated compositing layer + tree. + +2010-01-09 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + ScriptController::isEnabled needs to be renamed + https://bugs.webkit.org/show_bug.cgi?id=32063 + + Rename ScriptController::isEnabled to + ScriptController::canExecuteScripts. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + +2010-01-07 Daniel Bates <dbates@rim.com> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=32987 + + Added ENABLE_XHTMLMP flag. Disabled by default. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-07 Alexey Proskuryakov <ap@apple.com> + + More build fix. + + * WebKitPrefix.h: Define JS_EXPORTCLASS here, as well (as empty). + +2010-01-07 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Simon Fraser. + + REGRESSION (r48075): Clicking and dragging in a widget's text field doesn't create a selection; drags widget instead ( Translation, Weather, Ski Report ) + https://bugs.webkit.org/show_bug.cgi?id=33348 + <rdar://problem/7310616> + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): We only want to + handle file: URLs for the user stylesheet now, so special-case the + DashboardClient's funky user stylesheet URL by mapping it to the + equivalent file URL. + +2010-01-07 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=33331 + (WebHostedNetscapePluginView should pass acceleratedCompositingEnabled bool to NetscapePluginHostManager when instantiating plug-ins) + + * Plugins/Hosted/NetscapePluginHostManager.h: Modify method signature for instantiatePlugin to include acceleratedCompositingEnabled bool. + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): Pass accelerated compositing status to NetscapePluginHostManage + +2010-01-06 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + Third step of: + <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView getVariable:value:]): Add case for WKNVSupportsCompositingCoreAnimationPluginsBool. + +2010-01-06 Kevin Decker <kdecker@apple.com> + + Reviewed by Simon Fraser. + + Second step of: + <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism + + * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method. + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView pluginLayer]): Added. + * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method. + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView pluginLayer]): Added. + +2010-01-06 Kevin Decker <kdecker@apple.com> + + Reviewed by Eric Carlson. + + First step toward: + <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism + + Small refactoring moving the PluginWidget class from WebKit to WebCore. + + * WebCoreSupport/WebFrameLoaderClient.mm: Use the WebCore version of PluginWidget. + +2010-01-05 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + Re-enable plug-in halting on Mac after r51953 + + * WebCoreSupport/WebPluginHalterClient.mm: + (WebPluginHalterClient::enabled): Test for the correct selector. + +2010-01-04 Dan Bernstein <mitz@apple.com> + + Reviewed by Ada Chan and Mark Rowe. + + Updated copyright string + + * Info.plist: + +2009-12-27 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Alexey Proskuryakov. + + plugins/get-url-with-iframe-target.html fails on SnowLeopard (64-bit) + https://bugs.webkit.org/show_bug.cgi?id=32982 + + This test has been failing on SnowLeopard since it was landed. + + The problem is that we never delivered the notification for + NPN_GetURLNotify, in the frame-targeting case, for out-of-process + plugins on Mac. + + I implemented support for this based on how in-process Mac plugins + do it. + + * Plugins/Hosted/HostedNetscapePluginStream.h: + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::reasonForError): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::PluginRequest::create): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest): + (WebKit::NetscapePluginInstanceProxy::destroy): + (WebKit::NetscapePluginInstanceProxy::performRequest): + (WebKit::NetscapePluginInstanceProxy::webFrameDidFinishLoadWithReason): + (WebKit::NetscapePluginInstanceProxy::requestTimerFired): + (WebKit::NetscapePluginInstanceProxy::loadRequest): + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithError:]): + +2009-12-22 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + Turn off datagrid by default, at least for all platforms Apple ships. + The datagrid implementation isn't ready for general web use yet. + + * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default. + +2009-12-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Don't allocate a WebGeolocationControllerClient unless that compile-time setting is enabled. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2009-12-18 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Add Mac WebKit side of the client based geolocation provider. + + * Misc/WebKitErrors.m: + (registerErrors): Add Geolocation errors. + * Misc/WebKitErrorsPrivate.h: + * WebCoreSupport/WebGeolocationControllerClient.h: Added. + (WebGeolocationControllerClient::webView): + * WebCoreSupport/WebGeolocationControllerClient.mm: Added. + (WebGeolocationControllerClient::WebGeolocationControllerClient): + (WebGeolocationControllerClient::startUpdating): + (WebGeolocationControllerClient::stopUpdating): + (WebGeolocationControllerClient::lastPosition): + Add implementation of the WebGeolocationControllerClient. + + * WebView/WebGeolocationPosition.h: Added. + * WebView/WebGeolocationPosition.mm: Added. + (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]): + (core): + (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]): + * WebView/WebGeolocationPositionInternal.h: Added. + Add an Objective-C wrapper for GeolocationPosition. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Set the GeolocationControllerClient. + (-[WebView _setGeolocationProvider:]): Set the GeolocationProvider + (-[WebView _geolocationProvider]): Return the GeolocationProvider. + (-[WebView _geolocationDidChangePosition:]): Notify WebCore that the position changed. + (-[WebView _geolocationDidFailWithError:]): Notify WebCore that an error occured. + * WebView/WebViewData.h: + * WebView/WebViewPrivate.h: + +2009-12-18 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + REGRESSION(52325) Chromium build broken due to link failure + https://bugs.webkit.org/show_bug.cgi?id=32753 + + * WebCoreSupport/WebSystemInterface.m: + - Chromium Mac builds use this file, but do not + enable Pre-compiled Header (PCH) files so that + Chromium build bots can take advantage of the faster + distcc 3. Eventually all mac builds will likely use + distcc, but for now we'll add Platform.h here and document + its usage so it's not removed by accident. + +2009-12-18 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Fix preference key name. + + * WebView/WebPreferenceKeysPrivate.h: + +2009-12-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Pass preference to plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): + +2009-12-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add WKPCRunSyncOpenPanel implementation. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCRunSyncOpenPanel): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-12-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add a useProxiedOpenPanel WebPreference and tunnel it through to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::hostForPackage): + (WebKit::NetscapePluginHostManager::spawnPluginHost): + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences usesProxiedOpenPanel]): + (-[WebPreferences setUsesProxiedOpenPanel:]): + * WebView/WebPreferencesPrivate.h: + +2009-12-18 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Update WebKitSystemInterface for <rdar://problem/7237059>. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2009-12-18 Adam Roben <aroben@apple.com> + + Add #includes needed after WebCore clean-up + + Rubber-stamped by Anders Carlsson. + + Fixes <http://webkit.org/b/32718>. + + * WebView/WebFrame.mm: + * WebView/WebFrameView.mm: + * WebView/WebView.mm: + +2009-12-17 Adam Roben <aroben@apple.com> + + Mac build fix + + * WebView/WebVideoFullscreenController.mm: Added now-needed #import. + +2009-12-13 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=32499 + Add client based Geolocation provider + + Add first cut of a client based Geolocation provider. This is guarded by + ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a + GeolocationControllerClient interface that no-one currently implements, + but will in a subsequent patch. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2009-12-10 Jon Honeycutt <jhoneycutt@apple.com> + + Mac build fix. Unreviewed. + + Re-adds code that was mistakenly removed from my last patch. + + * WebCoreSupport/WebPluginHalterClient.mm: + Add necessary #import. + + * WebView/WebDelegateImplementationCaching.h: + Declare a new overload of CallUIDelegateReturningBoolean. + + * WebView/WebDelegateImplementationCaching.mm: + (CallDelegateReturningBoolean): + Add a new overload with different arguments. + (CallUIDelegateReturningBoolean): + Ditto. + +2009-12-10 Jon Honeycutt <jhoneycutt@apple.com> + + Pass more information about a plug-in to the PluginHalterDelegate + + Reviewed by Adam Roben. + + * Plugins/WebBaseNetscapePluginView.mm: + (WebHaltablePlugin::isWindowed): + Return false - the Mac doesn't really have windowed plug-ins. + (WebHaltablePlugin::pluginName): + Return the name from the plug-in package. + + * WebCoreSupport/WebPluginHalterClient.h: + Update for new parameters. + + * WebCoreSupport/WebPluginHalterClient.mm: + (WebPluginHalterClient::shouldHaltPlugin): + Ditto; pass them when making the delegate call. + + * WebView/WebUIDelegatePrivate.h: + Update for new parameters. + +2009-12-08 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7295070> WebKit video fullscreen keeps playing after closing the window + + Fix a leak of the QTMovieView when exiting fullscreen video, and remove the + old workaround. + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController windowDidLoad]): Set the movie view as the contentView directly. + (-[WebVideoFullscreenController setMediaElement:WebCore::]): Cast the contentView to a movie view. + (-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the old workaround. + +2009-12-08 Dmitry Titov <dimich@chromium.org> + + Rubber-stamped by David Levin. + + Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread." + It may have caused massive increase of reported leaks on the bots. + https://bugs.webkit.org/show_bug.cgi?id=31639 + + * ForwardingHeaders/wtf/ThreadVerifier.h: Removed. + +2009-12-08 Dmitry Titov <dimich@chromium.org> + + Reviewed by Darin Adler. + + Add asserts to RefCounted to make sure ref/deref happens on the right thread. + https://bugs.webkit.org/show_bug.cgi?id=31639 + + * ForwardingHeaders/wtf/ThreadVerifier.h: Added. + +2009-12-07 Dmitry Titov <dimich@chromium.org> + + Rubber-stamped by Darin Adler. + + Remove ENABLE_SHARED_SCRIPT flags + https://bugs.webkit.org/show_bug.cgi?id=32245 + This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. + + * Configurations/FeatureDefines.xcconfig: + +2009-12-07 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7450481> One compositing test keeps DRT in "compositing mode", breaks repaint tests + + The counter that WebView used to keep track of the number of enclosed WebHTMLViews using + accelerated compositing was hard to manage, and maintained incorrectly in a number of cases. + This caused one compositing test make DumpRenderTree think that all subsequent tests + were compositing too. + + Replace this counter with notifications, which are only fired if a client (DRT) requests them. The + notification informs the client that a WebHTMLView entered compositing mode (or an already- + compositing WebHTML was added); it does not say when a view becomes uncomposited, or all + compositing subviews were removed, since this is tricky to get right. + + Change -[WebView _isUsingAcceleratedCompositing] to manually walk the frames, and + return YES if any document view is composited. + + * WebKit.exp: + * WebView/WebHTMLView.mm: + (-[WebHTMLView close]): + (-[WebHTMLView viewDidMoveToSuperview]): + (-[WebHTMLView attachRootLayer:]): + (-[WebHTMLView detachRootLayer]): + * WebView/WebView.mm: + (+[WebView automaticallyNotifiesObserversForKey:]): + (-[WebView _postsAcceleratedCompositingNotifications]): + (-[WebView _setPostsAcceleratedCompositingNotifications:]): + (-[WebView _isUsingAcceleratedCompositing]): + * WebView/WebViewData.h: + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2009-12-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32184 + Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing. + Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on. + + * WebView/WebView.mm: + (aeDescFromJSValue): + +2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Holger Hans Peter Freyther. + + Turn on (SVG) Filters support, by default. + https://bugs.webkit.org/show_bug.cgi?id=32224 + + * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag. + +2009-12-03 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidPushStateWithinPage): + (WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): + (WebFrameLoaderClient::dispatchDidPopStateWithinPage): + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebFrameLoadDelegatePrivate.h: + * WebView/WebView.mm: + (-[WebView _cacheFrameLoadDelegateImplementations]): + +2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com> + + Reviewed by Timothy Hatcher. + + Web Inspector: Simplify the settings support in inspector controller. + + https://bugs.webkit.org/show_bug.cgi?id=32076 + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): + (-[WebInspectorWindowController attach]): + (-[WebInspectorWindowController detach]): + +2009-12-03 Ben Murdoch <benm@google.com> + + Reviewed by Brady Eidson. + + [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed. + https://bugs.webkit.org/show_bug.cgi?id=31915 + + * History/WebHistoryItem.mm: + (WKNotifyHistoryItemChanged): Update WKNotifyHistoryItemChanged() to add the new HistoryItem parameter added in the WebCore portion of this patch. + * History/WebHistoryItemInternal.h: ditto. + +2009-12-03 Ben Murdoch <benm@google.com> + + Reviewed by Brady Eidson. + + [Android] The FrameLoaderClient is unaware of BackForwardList changes. + https://bugs.webkit.org/show_bug.cgi?id=31914 + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). + (WebFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto. + (WebFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto. + +2009-12-02 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + Fix a mistake in the previous change + + * WebView/WebView.mm: + (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]): + Make sure to include the image types’ view and representation classes + even when plug-ins are not allowed. + +2009-12-02 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Fixed <rdar://problem/7254127> WebKit can load plug-ins even when + plug-ins are disabled + + Ensure that the shared WebPluginDatabase is not instantiated if no + WebViews are used that have plug-ins enabled. + + * DefaultDelegates/WebDefaultPolicyDelegate.m: + (-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): + Call -[WebView _canShowMIMEType:] on the WebView instead of calling the + class method. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::canShowMIMEType): Ditto. + (WebFrameLoaderClient::transitionToCommittedForNewPage): Call + -[WebFrameView _viewClassForMIMEType:] on the WebView instead of calling + the class method. + (WebFrameLoaderClient::objectContentType): Ditto. + + * WebView/WebDataSource.mm: + (+[WebDataSource _representationClassForMIMEType:allowingPlugins:]): + Added the allowPlugins parameter, which is passed through to + +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]. + (-[WebDataSource _makeRepresentation]): Pass an allowPlugins value + based on the WebView’s preferences. + + * WebView/WebFrameView.mm: + (-[WebFrameView _makeDocumentViewForDataSource:]): Call + -[WebFrameView _viewClassForMIMEType:] instead of calling the class + method. + (+[WebFrameView _viewClassForMIMEType:allowingPlugins:]): Added the + allowPlugins parameter, which is passed through to + +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]. + (-[WebFrameView _viewClassForMIMEType:]): Added. Passes an allowPlugins + value based on the WebView’s preferences. + + * WebView/WebFrameViewInternal.h: + * WebView/WebView.mm: + (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]): + Added the allowPlugins parameter. If false, skip the instantiation of + the shared WebPluginDatabase. + (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Pass an + allowPlugins value based on the WebView’s preferences. + (+[WebView _canShowMIMEType:allowingPlugins:]): Passes allowPlugins to + +_viewClass:andRepresentationClass:forMIMEType:allowingPlugins:. + (+[WebView canShowMIMEType:]): Changed to pass YES to + +_canShowMIMEType:allowingPlugins:. + (-[WebView _canShowMIMEType:]): Added. Passes an allowPlugins value + based on the WebView’s preferences. + (-[WebView _pluginForMIMEType:]): Return nil if plug-ins are disabled. + (-[WebView _pluginForExtension:]): Ditto. + (-[WebView _isMIMETypeRegisteredAsPlugin:]): Return NO if plug-ins are + disabled. + * WebView/WebViewInternal.h: + +2009-12-02 Timothy Hatcher <timothy@apple.com> + + Fixes a crash when scrolling a frame that goes away mid-scroll. + + <rdar://problem/7400263> + + Reviewed by John Sullivan. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView scrollWheel:]): Retain self incase the last + reference is released when calling super. + +2009-11-13 Timothy Hatcher <timothy@apple.com> + + Migrate DOMHTMLInputElementPrivate.h as a private header. + + Reviewed by Darin Adler. + + * MigrateHeaders.make: + +2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Simon Fraser. + + Add SVG animation test framework with 'snapshot' functionality + https://bugs.webkit.org/show_bug.cgi?id=31897 + + Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method, + forwarding the call to SVGDocumentExtensions, if SVG is enabled. + + Implemented just like the existing pauseAnimation* methods for CSS animations. + + * WebView/WebFrame.mm: + (-[WebFrame _pauseSVGAnimation:onSMILNode:atTime:]): + * WebView/WebFramePrivate.h: + +2009-12-01 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Simplify [WebView userAgentForURL:]. No need to call into helper function. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::userAgent): + * WebView/WebView.mm: + (-[WebView userAgentForURL:]): + * WebView/WebViewInternal.h: + +2009-11-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 31859 - Make world selection for JSC IsolatedWorlds automagical. + + WebCore presently has to explicitly specify the world before entering into JSC, + which is a little fragile (particularly since property access via a + getter/setter might invoke execution). Instead derive the current world from + the lexical global object. + + Since WebCore no longer needs to explicitly specify the world on entry to JSC DebuggerCallFrame::evaluate can be called directly. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + +2009-11-24 Dmitry Titov <dimich@chromium.org> + + Reviewed by Eric Seidel. + + Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit + https://bugs.webkit.org/show_bug.cgi?id=31444 + + * Configurations/FeatureDefines.xcconfig: + +2009-11-24 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Brady Eidson. + + https://bugs.webkit.org/show_bug.cgi?id=31844 + SocketStreamHandleCFNet should support CONNECT proxy credentials + + * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add WKSI methods. + +2009-11-23 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + DocumentMarkers need to be educated about transforms + https://bugs.webkit.org/show_bug.cgi?id=31751 + + Find highlight is incorrect with transforms + <rdar://problem/6358394> + + Allow callers to specify that Frame::selectionTextRects() takes transforms into account + when computing the set of rects that encompass a selection. For transformed elemenets, the + selection rect will be the bounding box of the selected content. + + Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView selectionTextRects]): + Pass RespectTransforms to get a list of rects with transforms taken into account. + +2009-11-23 Kevin Decker <kdecker@apple.com> + + Reviewed by Adam Roben. + + <rdar://problem/7401503> + + Added a workaround for plug-ins not drawing immediately. + + * Plugins/WebBaseNetscapePluginView.mm: Added new constant. + (-[WebBaseNetscapePluginView _clearSubstituteImage]): Added. + (-[WebBaseNetscapePluginView resumeFromHalt]): Call above new method. + +2009-11-20 Dave Hyatt <hyatt@apple.com> + + Reviewed by Darin Adler. + + Make sure to export WebSerializedJSValue. + + * WebKit.exp: + +2009-11-20 Dave Hyatt <hyatt@apple.com> + + Reviewed by Oliver Hunt and Jon Honeycutt. + + Add support for WebSerializedJSValue to WebKit. This object wraps the SerializedScriptValue functionality in WebCore + and exposes the ability to do JS value serialization/deserialization to WebKit clients. + + * WebView/WebSerializedJSValue.h: Added. + * WebView/WebSerializedJSValue.mm: Added. + (-[WebSerializedJSValue initWithValue:context:]): + (-[WebSerializedJSValue deserialize:]): + (-[WebSerializedJSValue dealloc]): + +2009-11-20 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin. + + WAI-ARIA: add support for 'math' role + https://bugs.webkit.org/show_bug.cgi?id=31706 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-11-19 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7035231> + Support closed caption in <video> element + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory localizedMediaControlElementString:]): + (-[WebViewFactory localizedMediaControlElementHelpText:]): + Add accessibility help strings for media controller closed caption button. + +2009-11-18 Michelangelo De Simone <micdesim@gmail.com> + + Reviewed by Darin Adler. + + Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>. + Support for validationMessage attribute, as per HTML5 specs. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory validationMessageValueMissingText]): + (-[WebViewFactory validationMessageTypeMismatchText]): + (-[WebViewFactory validationMessagePatternMismatchText]): + (-[WebViewFactory validationMessageTooLongText]): + (-[WebViewFactory validationMessageRangeUnderflowText]): + (-[WebViewFactory validationMessageRangeOverflowText]): + (-[WebViewFactory validationMessageStepMismatchText]): + +2009-11-18 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Make the Mac Geolocation API async. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestGeolocationPermissionForFrame): + (-[WebGeolocationPolicyListener initWithGeolocation:]): + (-[WebGeolocationPolicyListener allow]): + (-[WebGeolocationPolicyListener deny]): + Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener + protocol and use if to implement requestGeolocationPermissionForFrame using the new async + API. + + * WebCoreSupport/WebGeolocation.mm: Removed. + * WebCoreSupport/WebGeolocationInternal.h: Removed. + * WebCoreSupport/WebGeolocationMock.mm: Remove bogus include. + * WebCoreSupport/WebGeolocationPrivate.h: Removed. + * WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add + WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate + method. + +2009-11-18 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Add Preferences for WebKitShowDebugBorders and WebKitShowRepaintCounter + https://bugs.webkit.org/show_bug.cgi?id=31601 + + These are used to debug accelerated compositing layers + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences showDebugBorders]): + (-[WebPreferences setShowDebugBorders:]): + (-[WebPreferences showRepaintCounter]): + (-[WebPreferences setShowRepaintCounter:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-11-17 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: Make DRT show web inspector for tests in inspector/ folder. + - Updated DRT to show/close inspector for all tests under /inspector + - Introduced LayoutTestController::setTimelineProfilingEnabled and + WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled + - Removed reload on each inspector test + - Renamed fast/inspector to fast/inspector-support in order not to trigger + inspector for those. + - Reimplemented timeline tests in order to get rid of reload there. + - Moved tests that don't require harness into the fast group. + + https://bugs.webkit.org/show_bug.cgi?id=31472 + + * WebInspector/WebInspector.h: + * WebInspector/WebInspector.mm: + (-[WebInspector isTimelineProfilingEnabled]): + (-[WebInspector setTimelineProfilingEnabled:]): + +2009-11-14 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + Need to implement ARIA role="directory" + https://bugs.webkit.org/show_bug.cgi?id=31516 + + Fix a spelling error in the comment of a localized (accessibility) string. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-11-14 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/7287487> + Do not use QuickTime version to detect media controller theme + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Initialize wkMediaControllerThemeAvailable. + +2009-11-13 Adam Roben <aroben@apple.com> + + Tell the WebFrameLoadDelegate when window objects in isolated worlds + are cleared + + Fixes <http://webkit.org/b/31124>. + + Reviewed by Dave Hyatt. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): + Replaced windowObjectCleared with this function. If the delegate + implements it, call + -webView:didClearWindowObjectForFrame:inScriptWorld:. Otherwise, if + the passed-in world is the mainThreadNormalWorld(), call + -webView:didClearWindowObject:forFrame:. + + * WebView/WebDelegateImplementationCaching.h: Added a new entry in the + frame load delegate implementation cache for the new delegate method. + + * WebView/WebFrameLoadDelegatePrivate.h: + * WebView/WebScriptWorld.mm: + (allWorlds): Added. Returns a HashMap of all the WebScriptWorlds in + existence. + (-[WebScriptWorld initWithWorld:]): Add ourselves to allWorlds(). + (-[WebScriptWorld dealloc]): Remove ourselves from allWorlds(). + (+[WebScriptWorld findOrCreateWorld:]): Returns the existing + WebScriptWorld for this DOMWrapperWorld, or a new one if one doesn't + already exist. + + * WebView/WebScriptWorldInternal.h: Declared +findOrCreateWorld:. + + * WebView/WebView.mm: + (-[WebView _cacheFrameLoadDelegateImplementations]): Cache the + implementation of the new frame load delegate method. + +2009-11-13 Adam Roben <aroben@apple.com> + + Finish replacing worldIDs with world objects + + The only remaining use of worldIDs was in a method only used by DRT + for the isolated worlds tests. + + Fixes <http://webkit.org/b/31414> Replace worldIDs with world objects + + Reviewed by Mark Rowe. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): + * WebView/WebFramePrivate.h: + Renamed from + _stringByEvaluatingJavaScriptInIsolatedWorld:WithGobalObject:FromString:. + Now takes a WebScriptWorld instead of a worldID, so we don't need to + maintain a map of worldID -> world anymore. + +2009-11-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Adele Peterson. + + When exiting full-screen video, rather than resetting the system UI + mode, restore it to what it was when full-screen mode was entered. + + * WebView/WebVideoFullscreenController.h: Cleaned up style, removed + unnecessary imports, and added _savedUIMode and _savedUIOptions ivars. + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController delegate]): Cleaned up style. + (-[WebVideoFullscreenController setDelegate:]): Ditto. + (-[WebVideoFullscreenController windowDidExitFullscreen]): Restore the + system UI mode. + (-[WebVideoFullscreenController windowDidEnterFullscreen]): Save the + system UI mode. + * WebView/WebView.mm: Added now-necessary import. + +2009-11-12 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Darin Adler. + + externalRepresentation should take Frame as the argument + https://bugs.webkit.org/show_bug.cgi?id=31393 + + No new tests as this is just a refactoring. + + * Misc/WebCoreStatistics.mm: + (-[WebFrame renderTreeAsExternalRepresentation]): + +2009-11-12 Adam Roben <aroben@apple.com> + + Replace worldIDs with world objects + + WebScriptWorld is the new object that represents a world. The only + place worldID is still used is in -[WebFrame + _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:], + but that will change soon. + + Part of <http://webkit.org/b/31414> Implement new SPI for dealing with + user scripts/stylesheets and isolated worlds + + Reviewed by Sam Weinig. + + * WebKit.exp: Export WebScriptWorld. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]): + Moved the bizarre world caching/creation logic that DRT depends on + here from the findWorld function in ScriptController.cpp. Updated to + use ScriptController::executeScriptInWorld instead of + ScriptController::executeScriptInIsolatedWorld. + (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now + takes a WebScriptWorld. + + * WebView/WebFramePrivate.h: Replaced contextForWorldID: with + _contextForWorld:. + + * WebView/WebScriptWorld.h: Added. + * WebView/WebScriptWorld.mm: Added. + (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our + _private member. + (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to + -initWithWorld:. + (-[WebScriptWorld dealloc]): Release _private. + (+[WebScriptWorld standardWorld]): Returns a shared instance that + represents WebCore's mainThreadNormalWorld(). + (+[WebScriptWorld world]): Returns a new instance. + (core): Returns the DOMWrapperWorld for this WebScriptWorld. + + * WebView/WebScriptWorldInternal.h: Added. + + * WebView/WebView.mm: + (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]): + (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]): + (+[WebView _removeUserScriptFromGroup:world:url:]): + (+[WebView _removeUserStyleSheetFromGroup:world:url:]): + (+[WebView _removeUserScriptsFromGroup:world:]): + (+[WebView _removeUserStyleSheetsFromGroup:world:]): + * WebView/WebViewPrivate.h: + Changed these functions to take a WebScriptWorld instead of a worldID. + +2009-11-12 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + ARIA: add alert type roles + https://bugs.webkit.org/show_bug.cgi?id=31392 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-11-10 Daniel Bates <dbates@webkit.org> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=30754 + + Removed method draggedImage:movedTo: + + * WebView/WebFrame.mm: + * WebView/WebFrameInternal.h: + * WebView/WebHTMLView.mm: + +2009-11-10 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Small WebKit part of: + Fix for <rdar://problem/7059710> + -and corresponding- + https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit- + color-correction for CSS colors + + * Misc/WebKitNSStringExtras.mm: + (-[NSString _web_drawAtPoint:font:textColor:]): setFillColor now + requires callers to pass a ColorSpace. + +2009-11-10 Dan Bernstein <mitz@apple.com> + + Reviewed by Eric Carlson and Darin Adler. + + WebKit part of making full-screen video pause during scrubbing. + + * WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing + ivar. + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController dealloc]): Assert that + _isScrubbing is NO. + (-[WebVideoFullscreenHUDWindowController endScrubbing]): Call + HTMLMediaElement::endScrubbing(). + (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]): + If scrubbing has just begun, call HTMLMediaElement::beginScrubbing() + and schedule -endScrubbing to be called when mouse tracking ends. + +2009-11-09 Mark Mentovai <mark@chromium.org> + + Reviewed by Dan Bernstein. + + Track "can have scrollbar" state within FrameView independently of the + individual scrollbar states in ScrollView. + + rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167 + REGRESSION (r48064): mint.com loses scrollbars after coming out of + edit mode. + + rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517 + REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store. + + Test: fast/overflow/scrollbar-restored.html + + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): + +2009-11-08 Dan Bernstein <mitz@apple.com> + + Reviewed by Eric Carlson. + + Made the full-screen video HUD appear when playback stops, such as when + the end of the video is reached. + + * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up. + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated + for the renaming of -updateRate to -updatePlayButton. + (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed + -updateRate to this. + (-[WebVideoFullscreenHUDWindowController updateRate]): This method now + responds to changes to the playback rate by updating the play button + and showing or hiding the HUD as necessary. + (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only + toggles playing. UI updates are driven by -updateRate being called. + (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up. + +2009-11-02 Eric Carlson <eric.carlson@apple.com> + + Reviewed by John Sullivan and Mark Rowe. + + <rdar://problem/7356733> Voiceover does not read correct media controller time values + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory localizedMediaTimeDescription:]): + +2009-11-02 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Made the remaining time display show negative zero at the end of the + video. + + Made other cleanup. + + * WebView/WebVideoFullscreenHUDWindowController.h: Reverted the types of + _timeline and _volumeSlider to the more generic NSControl. + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Cleaned + up style. + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Added an + assertion that the cast to NSButton * is legal. Removed casts. + (-[WebVideoFullscreenHUDWindowController updateTime]): Use + -setValue:forKey: instead of an NSSlider method. + (timeToString): Changed to support only non-negative values and + simplified. + (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Always + prepend a “-” to the time. + +2009-11-02 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + WebKit part of making the appearance of the full-screen video HUD match + QuickTime Player X’s HUD. + + * WebView/WebVideoFullscreenHUDWindowController.h: Removed unnecessary + #import statements, cleaned up style, and changed _timeline, + _volumeSlider and _playButton to have more specific types. + * WebView/WebVideoFullscreenHUDWindowController.mm: Updated #import + statements. + (webkit_CGFloor): Added this helper function. + (-[WebVideoFullscreenHUDWindowController init]): Cleaned up style. + (createTimeTextField): Changed to use the bold system font. + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the + subviews’ metrics and the text fields’ text alignment. + (-[WebVideoFullscreenHUDWindowController updateTime]): Avoid conversion + from double to float. + (stringToTimeTextAttributed): Removed this useless function that + returned an NSAttributedString masquerading as an NSString. + (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Removed + call to stringToTimeTextAttributed(). + (-[WebVideoFullscreenHUDWindowController elapsedTimeText]): Ditto. + +2009-11-02 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin. + + Support ARIA "tab" roles + https://bugs.webkit.org/show_bug.cgi?id=30842 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-11-01 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + Made the space bar toggle playing state in full-screen video when + modifier keys are down. Made it do so without highlighting the + Play/Pause button. + + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController keyDown:]): + +2009-11-01 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + Made the full-screen video HUD respond to the up and down arrow keys by + increasing and decreasing the volume by 1/10 of the range or, when + combined with the Option key, all the way up or down. + + Made the volume buttons in the full-screen video HUD match the behavior + of their equivalents in the QuickTime Player HUD by turning the volume + all the way up or down. + + Made the volume slider update immediately when the keyboard or volume + buttons are used to change the volume, rather than at the nearest 1/4 + second interval. + + Made the elapsed and remaining time displays update immediately when the + play head is dragged across the timeline, rather than at 1/4 second + intervals. + + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and + down arrow keys. + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the + actions of the volume up and volume down buttons. + (-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call + -updateTime. + (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this + action for the volume down button. + (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added + this action for the volume up button. + (-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer + and action method. + (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto. + (-[WebVideoFullscreenHUDWindowController setVolume:]): Call + -updateVolume. + +2009-10-30 Evan Stade <estade@chromium.org> + + Reviewed by David Levin. + + Notify the chrome when the focused node has changed. + https://bugs.webkit.org/show_bug.cgi?id=30832 + + Added stub implementation for new ChromeClient function. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::focusedNodeChanged): + +2009-10-30 Roland Steiner <rolandsteiner@chromium.org> + + Reviewed by Eric Seidel. + + Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak. + + Bug 28420 - Implement HTML5 <ruby> rendering + (https://bugs.webkit.org/show_bug.cgi?id=28420) + + No new tests (no functional change). + + * Configurations/FeatureDefines.xcconfig: + +2009-10-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Validate the stopSpeaking: selector so that is not always enabled when a WebView is first responder. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + +2009-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=30932 + <rdar://problem/7350269> + + REGRESSION: Crash when turning on Private Browsing on site with flash. + + Null check setValue. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView privateBrowsingModeDidChange]): + +2009-10-29 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Kevin Decker. + + Refactor some duplicate plug-in clean up code into shared functions. + + * Plugins/WebPluginController.mm: + (-[WebPluginController stopOnePlugin:]): New, stop a plug-in. + (-[WebPluginController destroyOnePlugin:]): New, destroy plug-in. + (-[WebPluginController stopAllPlugins]): Call stopOnePlugin. + (-[WebPluginController destroyPlugin:]): Call stopOnePlugin and destroyOnePlugin. + (-[WebPluginController destroyAllPlugins]): Call destroyOnePlugin. + +2009-10-28 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7303145> + Can't exit full screen mode or restart movie after pressing command -R. + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController _requestExit]): + New, call media element's exitFullscreen method. + (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]): + Call mediaElement->exitFullscreen() after a delay as it turns around and calls + WebVideoFullscreenController:exitFullscreen. + + * WebView/WebVideoFullscreenHUDWindowController.h: + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindow resignFirstResponder]): + New, don't give up responder status. + (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]): + New, block all command key events. + (-[WebVideoFullscreenHUDWindowController exitFullscreen:]): + Remember when we are in the process of exiting fullscreen, don't allow recursion. + + * WebView/WebView.mm: + (-[WebView _exitFullscreen]): + Early return if fullscreen controller is nil. + + * WebView/WebWindowAnimation.h: + Correct comment about _window retain status. + * WebView/WebWindowAnimation.m: + (-[WebWindowScaleAnimation dealloc]): + Don't release _window, we never reatained it. + +2009-10-27 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Darin Adler. + + Provide a way to get counter values with layoutTestContoller + https://bugs.webkit.org/show_bug.cgi?id=30555 + + Add counterValueForElement in WebFrame to call WebCore::counterValueForElement. + + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (-[WebFrame counterValueForElement:]): + +2009-10-27 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Updated for refactoring in the date code. + + * WebView/WebView.mm: + (aeDescFromJSValue): Since we just want a number of milliseconds, do that + instead of something more complicated. + +2009-10-26 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Move some WebView event handling code into its own file, WebViewEventHandling.mm + + * WebView/WebView.mm: + (-[WebView _close]): + (-[WebView _selectedOrMainFrame]): + * WebView/WebViewEventHandling.mm: Added. + (-[WebView _closingEventHandling]): + (-[WebView _setMouseDownEvent:]): + (-[WebView mouseDown:]): + (-[WebView mouseUp:]): + (+[WebView _updateMouseoverWithEvent:]): + (-[WebView _updateMouseoverWithFakeEvent]): + (_updateMouseoverWithEvent:fakeEvent::if): + (-[WebView _stopAutoscrollTimer]): + (-[WebView _setToolTip:]): + * WebView/WebViewInternal.h: + +2009-10-26 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6988966> Hardware layers do not show up in page snapshots + + * WebView/WebHTMLViewPrivate.h: + * WebView/WebHTMLView.mm: + (-[WebHTMLView _compositingLayersHostingView]): + Add a private method that returns the NSView used to host compositing layers. + +2009-10-23 Mark Rowe <mrowe@apple.com> + + Fix engineering builds in the mysterious future. + + * Configurations/DebugRelease.xcconfig: + +2009-10-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=30729 + Provide private API to request the global context for a specific world. + Used to initialize parameters on the global object. + + * WebView/WebFramePrivate.h: + * WebView/WebFrame.mm: + (-[WebFrame contextForWorldID:]): + +2009-10-22 Eric Carlson <eric.carlson@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/7322847> + Pressing space bar key in full screen mode should pause movie but doesn't + + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController keyDown:]): New, toggle playback on space key. + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Play button action is now called togglePlaying. + (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Rename from playingChanged. + +2009-10-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + Build fix following bug #30696. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::removeProperty): + (WebKit::NetscapePluginInstanceProxy::hasProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::enumerate): + +2009-10-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig & Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=30696 + Update to incorporate support for IsolatedWorlds in JSC bindings. + + * WebView/WebFrame.mm: + (-[WebFrame _attachScriptDebugger]): + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + (-[WebFrame globalContext]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2009-10-22 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Dan Bernstein & Simon Fraser. + + <rdar://problem/7297717> + https://bugs.webkit.org/show_bug.cgi?id=30323 + Play/pause button in full-screen video controller does not reflect current state + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController setMediaElement:WebCore::]): Register for QTMovieRateDidChangeNotification + (-[WebVideoFullscreenController rateChanged:]): Call HUD controller when rate changes. + + * WebView/WebVideoFullscreenHUDWindowController.h: + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Call updateRate so play button + reflects playback state. + (-[WebVideoFullscreenHUDWindowController updateRate]): New, set play button state according to + movie state. + (-[WebVideoFullscreenHUDWindowController playingChanged:]): Only call [self playing] once. + +2009-10-21 John Sullivan <sullivan@apple.com> + + Rubber-stamped by Dan Bernstein. + + * WebView/WebDynamicScrollBarsView.h: + Corrected a couple of long-obsolete comments regarding Safari's use of this class. + +2009-10-20 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + <rdar://problem/7319749> REGRESSION(r49806): Contextual Menu items missing + https://bugs.webkit.org/show_bug.cgi?id=30568 + + Revert accidental change from r49806. + + * WebCoreSupport/WebContextMenuClient.mm: + (WebContextMenuClient::getCustomMenuFromDefaultItems): + +2009-10-20 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by David Levin. + + Removed WebSocket runtime settings. + https://bugs.webkit.org/show_bug.cgi?id=29896 + + WebSocket runtime configuration is supported by chromium/v8 only. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-10-19 Nate Chapin <japhet@chromium.org> + + Reviewed by Alexey Proskuryakov. + + Update call to loadFrameRequest to match new parameters. + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Update call to loadFrameRequest. + +2009-10-19 David Kilzer <ddkilzer@apple.com> + + Documentation fix for -[NSObject(WebResourceLoadDelegate) webView:resource:willSendRequest:redirectResponse:fromDataSource:] + + Reviewed by Dan Bernstein. + + * WebView/WebResourceLoadDelegate.h: Prepended "webView:" to the + @method declaration of + -webView:resource:willSendRequest:redirectResponse:fromDataSource: + which was absent before r3953 and was missed during the great + documentation clean up of r4269. + +2009-10-19 Anders Carlsson <andersca@apple.com> + + Fix build. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): + +2009-10-19 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Split assertions of conjunctions into separate statements or remove + redundant assertions. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]): + (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView halt]): + (-[WebBaseNetscapePluginView resumeFromHalt]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): + * WebCoreSupport/WebContextMenuClient.mm: + (WebContextMenuClient::getCustomMenuFromDefaultItems): + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::checkGrammarOfString): + (WebEditorClient::checkTextOfParagraph): + * WebView/WebTextCompletionController.mm: + (-[WebTextCompletionController _reflectSelection]): + +2009-10-18 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/7309062> Crashes in WebCore::DocumentLoader::isStopping below WebKit::NetscapePluginInstanceProxy::loadRequest. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::loadRequest): Null-check the DocumentLoader before deferencing it. + +2009-10-16 Kevin Decker <kdecker@apple.com> + + Reviewed by Jon Honeycutt. + + <rdar://problem/7304575> + + * Plugins/WebBaseNetscapePluginView.h: Added new boolean ivar and -hasBeenHalted instance method. + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView halt]):Update _hasBeenHalted. + (-[WebBaseNetscapePluginView hasBeenHalted]): Added. + * WebView/WebView.mm: + (+[WebView _hasPluginForNodeBeenHalted:]): Checks to see if a plug-in node's been halted. + * WebView/WebViewPrivate.h: Added -_hasPluginForNodeBeenHalted method. + +2009-10-16 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlson. + + Small code cleanup + + * Plugins/WebBaseNetscapePluginView.mm: + (WebHaltablePlugin::halt): Just call -[WebBaseNetscapePluginView halt]. + (WebHaltablePlugin::restart): Just call -[WebBaseNetscapePluginView resumeFromHalt] + (-[WebBaseNetscapePluginView halt]): + (-[WebBaseNetscapePluginView resumeFromHalt]): + * WebView/WebView.mm: + (_pluginViewForNode): Added a check if a render is a widget. This prevents a later assertion. + +2009-10-16 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlson. + + Last part of: + <rdar://problem/7273354> + + * WebView/WebView.mm: + (_pluginViewForNode): Added with code extracted from _isNodeHaltedPlugin + (+[WebView _isNodeHaltedPlugin:]): Made this a class method. + (+[WebView _restartHaltedPluginForNode:]): Added. Restarts a plug-in + * WebView/WebViewPrivate.h: Added +_restartHaltedPluginForNode to header. + +2009-10-16 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders. + + <rdar://problem/7273354> + + * Plugins/WebBaseNetscapePluginView.h: Added _isHalted ivar and three new methods: -halt, -resumeFromHalt, and -isHalted + * Plugins/WebBaseNetscapePluginView.mm: + (WebHaltablePlugin::halt): Call -halt instead of -stop. + (WebHaltablePlugin::restart):Call -resumeFromHalt instead of -start. + (-[WebBaseNetscapePluginView halt]): Added. Stop the plug-in, update _isHalted. + (-[WebBaseNetscapePluginView resumeFromHalt]): Added. Start the plug-in, update _isHalted. + (-[WebBaseNetscapePluginView isHalted]): Added. + * WebView/WebView.mm: + (-[WebView _isNodeHaltedPlugin:]): Added. Queries a DOMNode to determine if it's a halted plug-in. + * WebView/WebViewPrivate.h: Added _isNodeHaltedPlugin. + +2009-10-15 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/7306052> Fullscreen max/min volume buttons non-functional + + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Set volume buttons target and action. + (-[WebVideoFullscreenHUDWindowController decrementVolume:]): New, decrement the volume by 10%. + (-[WebVideoFullscreenHUDWindowController incrementVolume:]): New, increment the volume by 10%. + +2009-10-15 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode + + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController setVolume:]): Unmute movie before changing volume. + +2009-10-14 Kevin Decker <kdecker@apple.com> + + Unbreak the world. + + * Plugins/WebBaseNetscapePluginView.mm: + (WebHaltablePlugin::restart): + +2009-10-14 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson and Jon Honeycutt + + <rdar://problem/7304295> snapshots of halted plug-ins are missing + + * Plugins/WebBaseNetscapePluginView.mm: Move bodies of WebHaltablePlugin virtual functions from WebHaltablePlugin class definition. + (WebHaltablePlugin::halt): Provide a substitute image to the RenderWidget for the plug-in view. + (WebHaltablePlugin::restart): Clear the substitute image. + +2009-10-13 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Change the order of arguments on some methods. Split removal for user stylesheets and script into + separate functions based off the type of object being removed. + + * WebView/WebView.mm: + (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]): + (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]): + (+[WebView _removeUserScriptFromGroup:worldID:url:]): + (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]): + (+[WebView _removeUserScriptsFromGroup:worldID:]): + (+[WebView _removeUserStyleSheetsFromGroup:worldID:]): + * WebView/WebViewPrivate.h: + +2009-10-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6660507> Add "privacy mode" to Netscape Plug-in API + + Listen for WebPreferences notifications and update the _isPrivateBrowsingEnabled ivar + when the value changes. Also call -[WebBaseNetscapePluginView privateBrowsingModeDidChange] when the + value changes. In process this just calls NPP_SetValue, and OOP it sends a MIG message to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::privateBrowsingModeDidChange): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + (-[WebHostedNetscapePluginView privateBrowsingModeDidChange]): + * Plugins/Hosted/WebKitPluginHost.defs: + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView privateBrowsingModeDidChange]): + (-[WebBaseNetscapePluginView viewDidMoveToWindow]): + (-[WebBaseNetscapePluginView preferencesHaveChanged:]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView privateBrowsingModeDidChange]): + (-[WebNetscapePluginView getVariable:value:]): + +2009-10-12 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler. + + Video keeps playing after going fullscreen, then closing window + https://bugs.webkit.org/show_bug.cgi?id=30164 + + Clear the QTMovie on the QTMovieView when coming out of fullscreen, + to fix issue where the underlying movie keeps playing. + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenController windowDidExitFullscreen]): + +2009-10-11 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7294267> REGRESSION (r48492): Gmail voice and video chat + doesn’t work + https://bugs.webkit.org/show_bug.cgi?id=30295 + + Test: plugins/setProperty.html + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::setFieldValue): Fixed a typo. The function + should return early if m_instanceProxy is null. + +2009-10-09 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + Factor HistoryController out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=30246 + + Update API call. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::restoreViewState): + * WebView/WebView.mm: + (-[WebView _loadBackForwardListFromOtherView:]): + +2009-10-09 Mark Rowe <mrowe@apple.com> + + Reviewed by Brady Eidson. + + <rdar://problem/7290671> Crash after navigating away from a page with subframe containing plug-in + + At the time that -stop is called on a WebBaseNetscapePluginView that is contained within a subframe + the WebFrame's data source has been zeroed out. This was causing -[WebBaseNetscapePluginView webFrame] + to return nil during -stop, preventing the plug-in view from unregistering itself from the PluginHalter. + We fix this by having -webFrame retrieve the frame directly rather than retrieving it from the data source. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView dataSource]): Get the data source from the WebFrame. + (-[WebBaseNetscapePluginView webFrame]): Get the Frame directly from the element's document rather + than taking a windy route through the WebDataSource. + +2009-10-09 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + Add SPI to specifically enable visited link tracking. + + * History/WebHistory.mm: + (+[WebHistory _setVisitedLinkTrackingEnabled:]): + * History/WebHistoryPrivate.h: + +2009-10-08 Jon Honeycutt <jhoneycutt@apple.com> + + Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking + for the existence of a PluginHalterDelegate. + + Reviewed by Dan Bernstein. + + * WebCoreSupport/WebPluginHalterClient.h: + Add declaration for new function. + + * WebCoreSupport/WebPluginHalterClient.mm: + (WebPluginHalterClient::enabled): + Check whether the UIDelegate responds to shouldHaltPlugin. + + * WebView/WebPreferenceKeysPrivate.h: + Remove the "enabled" preference key. + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + Remove the initialization of the pref. + + * WebView/WebPreferencesPrivate.h: + Remove the getter/setter for this pref. + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + Remove propagation of the pref. + +2009-10-08 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Move executeScript from FrameLoader to ScriptController + https://bugs.webkit.org/show_bug.cgi?id=30200 + + Update API call. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2009-10-08 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + Ask the History Delegate to populate the visited links hash. + <rdar://problem/7285293> and https://webkit.org/b/29904 + + * History/WebHistory.mm: + (+[WebHistory _removeAllVisitedLinks]): + * History/WebHistoryPrivate.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::populateVisitedLinks): + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebDelegateImplementationCaching.mm: + (CallHistoryDelegate): + * WebView/WebHistoryDelegate.h: + * WebView/WebView.mm: + (-[WebView _cacheHistoryDelegateImplementations]): + (-[WebView addVisitedLinks:]): + * WebView/WebViewPrivate.h: + +2009-10-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove the shouldLoadMediaElementURL implementation. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebView/WebPolicyDelegatePrivate.h: + +2009-10-07 Simon Fraser <simon.fraser@apple.com> + + Re-land 49269-49271 since reverting them did not fix the tests. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + +2009-10-07 Simon Fraser <simon.fraser@apple.com> + + Revert 49269-49271 to see if it fixes test failures on SnowLeopard that do not + reproduce locally. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + +2009-10-07 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + Factor PolicyChecker out of FrameLoader + https://bugs.webkit.org/show_bug.cgi?id=30155 + + Move the policy callback to the policy object. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchWillSubmitForm): + (WebFrameLoaderClient::receivedPolicyDecison): + +2009-10-07 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + Send title changes to the global history delegate. + <rdar://problem/7285293> and https://webkit.org/b/29904 + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::setTitle): + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebHistoryDelegate.h: + * WebView/WebView.mm: + (-[WebView _cacheHistoryDelegateImplementations]): + +2009-10-07 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + Make the setMetadataURL function foolproof by having it remove user info + https://bugs.webkit.org/show_bug.cgi?id=30178 + rdar://problem/6544670 + + * Misc/WebNSFileManagerExtras.m: + (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): + Call _web_URLByRemovingUserInfo on the passed in URL string after converting + it to a URL, and then convert it back to a string. + + * Misc/WebNSURLExtras.h: Added _web_URLByRemovingUserInfo. + * Misc/WebNSURLExtras.mm: Removed unused WebKitURLComponents struct. + (-[NSURL _web_URLByTruncatingOneCharacterBeforeComponent:]): Renamed to be + clearer on what this does. + (-[NSURL _webkit_URLByRemovingFragment]): Changed to call new name. + (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Ditto. + (-[NSURL _web_URLByRemovingComponentAndSubsequentCharacter:]): Added. + (-[NSURL _web_URLByRemovingUserInfo]): Added. + +2009-10-07 Simon Fraser <simon.fraser@apple.com> + + Make Dan Bernstein happy. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + +2009-10-07 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Avoid Obj-C message dispatch when possible by storing accessed objects + in local variables. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + +2009-10-07 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Animation stalls for a few seconds partway through + https://bugs.webkit.org/show_bug.cgi?id=30182 + + Make sure that we only call -disableScreenUpdatesUntilFlush when a window + update is actually going to happen, otherwise screen updates are disabled + for too long. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + +2009-10-06 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: default to an attached inspector window on Windows (as on Mac). + + https://bugs.webkit.org/show_bug.cgi?id=30134 + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): + +2009-10-06 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Move FrameLoader::canLoad to SecurityOrigin + https://bugs.webkit.org/show_bug.cgi?id=30111 + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::loadRequest): + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + * Plugins/WebPluginContainerCheck.mm: + (-[WebPluginContainerCheck _isForbiddenFileLoad]): + * WebView/WebFrame.mm: + (-[WebFrame _allowsFollowingLink:]): + +2009-10-06 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Move setLocalLoadPolicy and friends to SecurityOrigin + https://bugs.webkit.org/show_bug.cgi?id=30110 + + Call the new API. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2009-10-06 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + accessibility/media-element.html crashes (and has incorrect result) + https://bugs.webkit.org/show_bug.cgi?id=30108 + + Fix up the accessibilty label for the newly added fullscreen button, + and update the test result accordingly. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory localizedMediaControlElementString:]): + Handle "ControlsPanel" which is just an empty container, to avoid + asserting in debug builds. + +2009-10-06 Daniel Bates <dbates@webkit.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=30107 + + Fixes an issue where the Mac build does return the correct drop effect + with respect to the HTML 5 specification when effectAllowed == "none". + + Currently, when effectAllowed == "none" and dropEffect == "copy" or + dropEffect == "move" the resulting drop effect is "copy" and "move", + respectively. However, the HTML 5 specification states that regardless + of the specified dropEffect, when effectAllowed == "none" the resulting + drop effect should be "none". + + * WebView/WebHTMLView.mm: + (-[WebHTMLView draggingSourceOperationMaskForLocal:]): + +2009-10-06 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: close inspector client view on + InspectorController::close API call. + + In order to run batch web inspector layout tests (and not affect + subsequent tests) we should close inspector client's view upon + InspectorController::close API call. + + https://bugs.webkit.org/show_bug.cgi?id=30009 + + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::createPage): + +2009-10-05 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + Moved a WebPluginHalterClient out of the WebCore namesapce. + + * WebCoreSupport/WebPluginHalterClient.h: + +2009-10-05 Kevin Decker <kdecker@apple.com> + + Reviewed by Dan Bernstein. + + Added new PluginHalter client, delegate and few more WebPreferences keys. + + * WebView/WebPreferenceKeysPrivate.h: Added two new keys. + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Initialize newly added key. + (-[WebPreferences pluginAllowedRunTime]): Added. + (-[WebPreferences setPluginAllowedRunTime:]): Added. + * WebView/WebPreferencesPrivate.h: Added above two methods. + * WebView/WebUIDelegatePrivate.h: Added shouldHaltPlugin delegate. + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + Setup a new WebPluginHalterClient. + (-[WebView _preferencesChangedNotification:]): Update WebCore settings accordingly. + * WebCoreSupport/WebPluginHalterClient.h: Added. + * WebCoreSupport/WebPluginHalterClient.mm: Added. + (WebPluginHalterClient::WebPluginHalterClient): + (WebPluginHalterClient::shouldHaltPlugin): Added, invoke the delegate. + +2009-10-05 Simon Fraser <simon.fraser@apple.com> + + More build fixes for Tiger. + + * WebView/WebVideoFullscreenController.mm: + +2009-10-05 Simon Fraser <simon.fraser@apple.com> + + More build fixes for Tiger. + + * WebView/WebVideoFullscreenController.mm: + (-[WebVideoFullscreenWindow animationDidEnd:]): + * WebView/WebWindowAnimation.m: + +2009-10-05 Simon Fraser <simon.fraser@apple.com> + + More build fixes for Tiger. + + * WebView/WebVideoFullscreenController.mm: + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]): + (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): + (-[WebVideoFullscreenHUDWindowController fadeWindowIn]): + (-[WebVideoFullscreenHUDWindowController fadeWindowOut]): + (-[WebVideoFullscreenHUDWindowController closeWindow]): + +2009-10-05 Simon Fraser <simon.fraser@apple.com> + + Build fixes for Tiger. + + * WebView/WebVideoFullscreenHUDWindowController.h: + * WebView/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]): + (-[WebVideoFullscreenHUDWindowController dealloc]): + (-[WebVideoFullscreenHUDWindowController closeWindow]): + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): + +2009-10-05 Simon Fraser <simon.fraser@apple.com> + + Build fix. If you call Node::hasTagName(), you also have to include Element.h. + + * WebCoreSupport/WebChromeClient.mm: + +2009-10-05 Pierre d'Herbemont <pdherbemont@webkit.org> + + Reviewed by Simon Fraser + + Support fullscreen in MediaPlayer (Mac) + https://bugs.webkit.org/show_bug.cgi?id=26742 + + Add a fullscreen button to the <video> controller if the media engine, + and the theme have support for fullscreen, and can show appropriate controls. + Clicking the button calls through the ChromeClient to the WebVideoFullscreenController + in WebKit to do a nice animation to fullscreen, with a custom controller. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::supportsFullscreenForNode): + (WebChromeClient::enterFullscreenForNode): + (WebChromeClient::exitFullscreenForNode): + New methods to ask whether fullscreen is possible for a given node, and + notifications on enterying and exiting fullscreen. + + * WebView/WebVideoFullscreenController.h: Added. + * WebView/WebVideoFullscreenController.mm: Added. + WebVideoFullscreenController is responsible for creating the fullscreen window, + and coordinating the various animations when going fullscreen. + + * WebView/WebVideoFullscreenHUDWindowController.h: Added. + * WebView/WebVideoFullscreenHUDWindowController.mm: Added. + This class manages the heads-up display (HUD) control bar. + + * WebView/WebView.mm: + (-[WebView _close]): + Make sure we come out of fullscreen if the WebView is torn down (e.g. if + you close a background window). + + (-[WebView _enterFullscreenForNode:WebCore::]): + Make a WebVideoFullscreenController and tell is to start to go fullscreen. + + (-[WebView _exitFullscreen]): + Tell the WebVideoFullscreenController to come out of fullscreen, and clean up. + + * WebView/WebViewData.h: + * WebView/WebViewData.mm: + (-[WebViewPrivate dealloc]): + (-[WebViewPrivate finalize]): + * WebView/WebViewInternal.h: + Keep a pointer to the WebVideoFullscreenController. + + * WebView/WebWindowAnimation.h: Added. + * WebView/WebWindowAnimation.m: Added. + (WebWindowAnimationDurationFromDuration): + (scaledRect): + (squaredDistance): + Handle the animations used during the transitition to fullscreen. + +2009-10-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + WebKit side of <rdar://problem/7179166> + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + Add an m_pluginIsWaitingForDraw member variable. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Initialize m_pluginIsWaitingForDraw. + + (WebKit::NetscapePluginInstanceProxy::invalidateRect): + Set m_pluginIsWaitingForDraw to true. + + (WebKit::NetscapePluginInstanceProxy::didDraw): + If m_pluginIsWaitingForDraw is true, call _WKPHPluginInstanceDidDraw. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView drawRect:]): + Call didDraw. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add PHPluginInstanceDidDraw. + +2009-10-02 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adele Peterson. + + Add functionality to pause/throttle CSS transitions/animations in a WebView + https://bugs.webkit.org/show_bug.cgi?id=29942 + + Added both a setter and getter function + + * WebView/WebView.mm: + (-[WebView cssAnimationsSuspended]): + (-[WebView setCSSAnimationsSuspended:]): + * WebView/WebViewData.h: + * WebView/WebViewData.mm: + (-[WebViewPrivate init]): + * WebView/WebViewPrivate.h: + +2009-10-04 Kevin Decker <kdecker@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7273363> Plug-ins should use PluginHalter + + * Plugins/WebBaseNetscapePluginView.h: Add WebHaltablePlugin forward declare and _haltable ivar. + * Plugins/WebBaseNetscapePluginView.mm: + (WebHaltablePlugin::WebHaltablePlugin): Added. + (WebHaltablePlugin::halt): New method that stops a plug-in. + (WebHaltablePlugin::restart): New method that starts a plug-in. + (WebHaltablePlugin::node): Added. Provides the DOMNode corresponding to the plug-in in WebBaseNetscapePluginView. + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): + Initialize new _haltable ivar. + (-[WebBaseNetscapePluginView start]): Call the page's didStartPlugin() upon starting a plug-in. + (-[WebBaseNetscapePluginView stop]): Call the page's didStopPlugin() upon stopping a plug-in. + +2009-10-05 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Web Inspector: add testing harness for Web Inspector. + + https://bugs.webkit.org/show_bug.cgi?id=30010 + + * WebInspector/WebInspector.mm: + (-[WebInspector evaluateInFrontend:callId:script:]): + * WebInspector/WebInspectorPrivate.h: Added. + +2009-10-04 Kevin Decker <kdecker@apple.com> + + Reviewed by Cameron Zwarich. + + * WebView/WebPreferenceKeysPrivate.h: Added new key. + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Leave plug-in halting disabled by default. + (-[WebPreferences pluginHalterEnabled]): Added. + (-[WebPreferences setPluginHalterEnabled:]): Ditto. + * WebView/WebPreferencesPrivate.h: Added above new methods. + +2009-10-02 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns. + + * WebView/WebView.mm: + (toStringVector): + (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]): + (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]): + * WebView/WebViewPrivate.h: + +2009-10-01 Mark Rowe <mrowe@apple.com> + + Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger. + + * Configurations/FeatureDefines.xcconfig: + +2009-10-01 Chris Marrin <cmarrin@apple.com> + + Reviewed by Oliver Hunt. + + Turn on ENABLE_3D_CANVAS in TOT + https://bugs.webkit.org/show_bug.cgi?id=29906 + + * Configurations/FeatureDefines.xcconfig: + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences webGLEnabled]): + (-[WebPreferences setWebGLEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-09-30 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for <rdar://problem/7259706> + Need WebKit API or SPI on Mac and Windows to test whether it's safe to load a page in a new tab/window + + * WebView/WebFrame.mm: + (-[WebFrame _allowsFollowingLink:]): + * WebView/WebFramePrivate.h: + +2009-09-30 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Add the ability to remove user stylesheets and scripts by URL. + + * WebView/WebView.mm: + (+[WebView _removeUserContentFromGroup:url:worldID:]): + * WebView/WebViewPrivate.h: + +2009-09-29 Brady Eidson <beidson@apple.com> + + Rubberstamped by Dan Bernstein. + + Fix license and some sorting in new files. + + * WebView/WebHistoryDelegate.h: + * WebView/WebNavigationData.h: + * WebView/WebNavigationData.mm: + +2009-09-29 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan. + + WebKit Mac API should provide a delegate interface for global history. + <rdar://problem/7042773> and https://webkit.org/b/29904 + + * WebView/WebHistoryDelegate.h: Added. New interface for WebKit clients to implement to manage + their own global history store. + + Object to store all of the bits of data relevant to a page visit: + * WebView/WebNavigationData.h: Added. + * WebView/WebNavigationData.mm: Added. + (-[WebNavigationDataPrivate dealloc]): + (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]): + (-[WebNavigationData url]): + (-[WebNavigationData title]): + (-[WebNavigationData originalRequest]): + (-[WebNavigationData response]): + (-[WebNavigationData hasSubstituteData]): + (-[WebNavigationData clientRedirectSource]): + (-[WebNavigationData dealloc]): + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): If the delegate exists, don't use the built-in WebHistory. + If the implementation for this method exists, call it. + (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Ditto + + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebDelegateImplementationCaching.mm: + (WebViewGetHistoryDelegateImplementations): + (CallHistoryDelegate): + + * WebView/WebView.mm: + (-[WebView _cacheHistoryDelegateImplementations]): + (-[WebView setHistoryDelegate:]): + (-[WebView historyDelegate]): + * WebView/WebViewData.h: + * WebView/WebViewPrivate.h: + +2009-09-29 Kenneth Russell <kbr@google.com> + + Reviewed by Dimitri Glazkov. + + Add support for run-time flag for 3D canvas + https://bugs.webkit.org/show_bug.cgi?id=29826 + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Enable experimental + WebGL flag when 3D_CANVAS is enabled in the build. + +2009-09-28 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Eric Seidel. + + Add experimentalWebSocketsEnabled in WebPreferences. + https://bugs.webkit.org/show_bug.cgi?id=28941 + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences experimentalWebSocketsEnabled]): + (-[WebPreferences setExperimentalWebSocketsEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-09-28 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading + a PDF + + CGPDFObjectRef is not a CFTypeRef, and cannot be retained or released. + Its lifetime is managed by its container. Just use a Vector to store + CGPDFObjectRefs, relying on the CGPDFDocument to keep them alive. + + * WebView/WebPDFDocumentExtras.mm: + (appendValuesInPDFNameSubtreeToVector): + (getAllValuesInPDFNameTree): + (web_PDFDocumentAllScripts): + +2009-09-24 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Alice Liu. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + Pass 0 for new Page constructor argument. + +2009-09-14 John Gregg <johnnyg@google.com> + + Reviewed by Eric Seidel. + + isEnabled switch for notifications (experimental) in Page Settings + https://bugs.webkit.org/show_bug.cgi?id=28930 + + Adds support for the experimentalNotificationsEnabled flag in Settings + through WebPreferencesPrivate. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences experimentalNotificationsEnabled]): + (-[WebPreferences setExperimentalNotificationsEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-09-23 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Updated for a WebCore rename. + + * WebView/WebFrame.mm: + (-[WebFrame _cacheabilityDictionary]): + +2009-09-23 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + Speed up access to history items by caching date computation. + + * History/WebHistory.mm: + (getDayBoundaries): Refactored from timeIntervalForBeginningOfDay. + Returns the beginning of the day that the passed time is within and + the beginning of the next day. + (beginningOfDay): Added. Uses getDayBoundaries so it can be fast for + multiple dates within the same day, which is the common case. + (dateKey): Added. Calls beginningOfDay and converts to an integer. + (-[WebHistoryPrivate findKey:forDay:]): Changed to call dateKey + insetad of timeIntervalForBeginningOfDay. + +2009-09-23 David Kilzer <ddkilzer@apple.com> + + Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h + + Reviewed by Mark Rowe. + + * WebKitPrefix.h: Removed definition of + WTF_USE_PLUGIN_HOST_PROCESS. + +2009-09-22 Timothy Hatcher <timothy@apple.com> + + Prevent scrolling multiple frames during latched wheel events. + + Reviewed by Anders Carlsson. + + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView scrollWheel:]): + +2009-09-22 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading + a PDF + + * WebView/WebPDFDocumentExtras.mm: + (addWebPDFDocumentExtras): Made methodList static, because + class_addMethods() doesn't copy it. + +2009-09-21 Dan Bernstein <mitz@apple.com> + + Attempt to fix the Tiger build + + * WebView/WebPDFDocumentExtras.mm: + (addWebPDFDocumentExtras): + +2009-09-21 Dan Bernstein <mitz@apple.com> + + Attempt to fix the Tiger build + + * WebView/WebPDFDocumentExtras.mm: + (web_PDFDocumentAllScripts): + (addWebPDFDocumentExtras): + +2009-09-21 Dan Bernstein <mitz@apple.com> + + Attempt to fix the Tiger build + + * WebView/WebPDFDocumentExtras.mm: + * WebView/WebPDFRepresentation.mm: + +2009-09-21 Dan Bernstein <mitz@apple.com> + + Attempt to fix the Leopard and Tiger builds + + * WebView/WebPDFDocumentExtras.mm: + +2009-09-21 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/4137135> iFrame with PDF not being handled correctly on + usps.com + https://bugs.webkit.org/show_bug.cgi?id=4151 + + * WebView/WebJSPDFDoc.h: Added. + * WebView/WebJSPDFDoc.mm: Added. + (jsPDFDocInitialize): Retains the WebDataSource. + (jsPDFDocFinalize): Releases the WebDataSource. + (jsPDFDocPrint): Call the WebUIDelegate method -webView:printFrameView: + with the PDF document's view. + (makeJSPDFDoc): Makes and returns a JavaScript Doc instance that wraps + the WebDataSource. + * WebView/WebPDFDocumentExtras.h: Added. + * WebView/WebPDFDocumentExtras.mm: Added. + (appendValuesInPDFNameSubtreeToArray): Traverses a subtree of a PDF name + tree and adds all values in the subtree to an array. + (allValuesInPDFNameTree): Returns an array with all of the values in a + PDF name tree. + (web_PDFDocumentAllScripts): This is the implementation of -[PDFDocument + _web_allScripts]. It gets all values in the document-level "JavaScript" + name tree, which are action dictionaries, and returns an array of the + actions' scripts. + (addWebPDFDocumentExtras): Adds the -_web_allScripts method to + PDFDocument. + * WebView/WebPDFRepresentation.h: + * WebView/WebPDFRepresentation.m: Removed. + * WebView/WebPDFRepresentation.mm: Copied from WebKit/mac/WebView/WebPDFRepresentation.m. + (+[WebPDFRepresentation initialize]): Added. Calls + addWebPDFDocumentExtras(). + (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Get the + scripts from the PDF document, create a JavaScript Doc object for the + document, and a JavaScript execution context, then execute every script + in the context, with the Doc object as "this". + +2009-09-17 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dave Hyatt. + + Compositing layers are incorrectly positioned after scrolling with position:fixed + https://bugs.webkit.org/show_bug.cgi?id=29262 + + When scrolling a page with compositing layers inside a position:fixed element, + we need to update the compositing layer positions when the scroll position changes. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): + Call the new FrameView::scrollPositionChanged() method rather than sending the + scroll event directly. + +2009-09-17 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + Make PlatformWindow return something else than PlatformWidget + https://bugs.webkit.org/show_bug.cgi?id=29085 + + Reflect the rename of platformWindow and it's return type. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::platformPageClient): + +2009-09-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/7007541> + CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator... + + Add null checks for m_instanceProxy (It will be null when a plug-in has crashed). + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): + (WebKit::ProxyInstance::supportsInvokeDefaultMethod): + (WebKit::ProxyInstance::supportsConstruct): + (WebKit::ProxyInstance::getPropertyNames): + (WebKit::ProxyInstance::methodsNamed): + (WebKit::ProxyInstance::fieldNamed): + (WebKit::ProxyInstance::fieldValue): + (WebKit::ProxyInstance::setFieldValue): + (WebKit::ProxyInstance::invalidate): + +2009-09-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and + become misplaced when the WebHTMLView is resized or scrolled sometimes. + <rdar://problem/7071636> + + The previous fix didn't fix the case where the layers jiggle when resizing the docked + inspector when the view size is over 2048px tall, on Leopard. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateLayerHostingViewPosition]): + +2009-09-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Oliver Hunt. + + Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and + become misplaced when the WebHTMLView is resized or scrolled sometimes. + <rdar://problem/7071636> + + We call an internal AppKit method to make sure the layer geometry is updated correctly. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateLayerHostingViewPosition]): + +2009-09-15 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Fixed position elements flash when CSS transforms are applied on page > 2048px tall + https://bugs.webkit.org/show_bug.cgi?id=27272 + + Update the previous workaround for misplaced compositing layers, which used a 4096px + threshold, to 2048px since that's the GPU max texture size on some older hardware. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateLayerHostingViewPosition]): + +2009-09-15 Alex Milowski <alex@milowski.com> + + Reviewed by Tor Arne Vestbø. + + Added the ENABLE_MATHML to the feaure defines + + * Configurations/FeatureDefines.xcconfig: + +2009-09-15 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused + + In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and + -start would do an early-return rather than calling -restartTimers and -addWindowObservers itself. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them + with a check that the view is still in the window. + +2009-09-14 Brady Eidson <beidson@apple.com> + + Reviewed by Alexey Proskuryakov. + + Safari 4 cannot be used to update firmware on Linksys routers. + <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160 + + Adopt the new WebCore::CredentialStorage in WebKit/Mac. + + * Misc/WebDownload.mm: + (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): + * Plugins/WebBaseNetscapePluginView.mm: + (WebKit::getAuthenticationInfo): + +2009-09-12 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Fix <rdar://problem/7090444> Crashes in-[WebBaseNetscapePluginView stop] handling NSWindowWillCloseNotification. + + It's not valid to call -addWindowObservers when the view is not in a window, but this can happen when -start + initializes a plug-in and the plug-in removes itself from the document during initialization. -viewDidMoveToWindow + calls -start and then calls -addWindowObservers without ensuring that the view is still in a window. + + If -[WebBaseNetscapePluginView addWindowObservers] is incorrectly called when the view is not in a window, it will + observe NSWindowWillCloseNotification on all windows. This unexpected observer registration is not balanced by an + unregistration so the notification can be delivered after the view is deallocated, causing the crash seen in + <rdar://problem/7090444>. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): Only call -updateAndSetWindow if we still have a current window. + (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Remove unnecessary calls to -restartTimers and -addWindowObservers + from -[WebBaseNetscapePluginView viewDidMoveToWindow]. They are already called from within -start with the extra benefit + of ensuring that the view is still in a window when they are called. + +2009-09-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Jon Honeycutt. + + Fix <rdar://problem/7145242> Crashes inside WTF::HashTable below NetscapePluginInstanceProxy::disconnectStream + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::cancelLoad): Canceling the load can result in calling through to disconnectStream. + If the plug-in instance holds the last reference to the plug-in stream this will result in the stream being deallocated. + This leads to HostedNetscapePluginStream::cancelLoad's call to disconnectStream being passed a deallocated stream object. + Since the stream was already disconnected by the call to cancel there's no need to call disconnectStream a second time. + +2009-09-11 Eric Seidel <eric@webkit.org> + + No review, rolling out r48229. + http://trac.webkit.org/changeset/48229 + + * WebView/WebFrame.mm: + (-[WebFrame _dragSourceMovedTo:]): + +2009-09-10 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be. + + * Configurations/FeatureDefines.xcconfig: + +2009-09-09 Jens Alfke <snej@chromium.org> + + Reviewed by Eric Seidel. + + Initialize DataTransfer's effectAllowed and dropEffect properties correctly + according to HTML5 spec (sec. 7.9.2-7.9.3). + https://bugs.webkit.org/show_bug.cgi?id=26700 + + * WebView/WebFrame.mm: + (-[WebFrame _dragSourceMovedTo:]): + Pass current drag operation (if known) to EventHandler::dragSourceMovedTo(). + +2009-09-09 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar + to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately + to all Frames in the PageGroup. + + Added userscripts/simple-stylesheet.html test case. + + * WebView/WebView.mm: + (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]): + * WebView/WebViewPrivate.h: + +2009-09-07 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + + Adds a mock Geolocation service. This will be used to provide predictable behavior of the + Geolocation API for use in LayoutTests. Later changes will integrate the the mock + Geolocation service with DumpRenderTree. + https://bugs.webkit.org/show_bug.cgi?id=28264 + + * WebCoreSupport/WebGeolocationMockPrivate.h: Added. + * WebCoreSupport/WebGeolocationMock.mm: Added. + (+[WebGeolocationMock setError:code:]): Added. Used by DumpRender tree to configure the mock Geolocation service. + (+[WebGeolocationMock setPosition:latitude:longitude:accuracy:]): Added. Used by DumpRender tree to configure the mock Geolocation service. + * WebKit.exp: Modified. Exports WebGeolocationMock. + +2009-09-07 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Enable SHARED_WORKERS by default. + https://bugs.webkit.org/show_bug.cgi?id=28959 + + * Configurations/FeatureDefines.xcconfig: + +2009-09-06 Cameron McCormack <cam@mcc.id.au> + + Reviewed by Eric Seidel. + + Drop <definition-src> support + https://bugs.webkit.org/show_bug.cgi?id=28991 + + * MigrateHeaders.make: Remove reference to ObjC definition-src + binding class. + +2009-09-04 Mark Mentovai <mark@chromium.org> + + Reviewed by Dave Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=28614 + + Account for scrollbar state changes that occur during layout. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView updateScrollers]): + + Perform a layout prior to checking whether the scrollbar modes are + off, on, or automatic. The modes may change during layout. + + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): + + Eliminate duplicated (and incorrect) scrollbar mode tracking between + FrameView and ScrollView. + +2009-09-03 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work. + + This patch adds new API for adding and removing user scripts from page groups. User scripts + are bundled together in isolated worlds (you can have multiple scripts together in the same + world). + + Added userscripts/ directory for holding new tests (along with a simple test of script injection). + + * WebView/WebView.mm: + (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]): + (+[WebView _removeUserContentFromGroup:worldID:]): + (+[WebView _removeAllUserContentFromGroup:]): + * WebView/WebViewPrivate.h: + +2009-09-04 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=24696 + + Plumb mixed content notifications to WebFrameLoadDelegatePrivate. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::didDisplayInsecureContent): + (WebFrameLoaderClient::didRunInsecureContent): + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebFrameLoadDelegatePrivate.h: Added. + +2009-09-03 Adam Barth <abarth@webkit.org> + + Unreviewed build fix. + + Change notImplemented() to a FIXME. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::didDisplayInsecureContent): + (WebFrameLoaderClient::didRunInsecureContent): + +2009-09-03 Adam Barth <abarth@webkit.org> + + Reviewed by eric@webkit.org. + + https://bugs.webkit.org/show_bug.cgi?id=24696 + + Plumb mixed content notifications to WebFrameLoadDelegatePrivate. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::didDisplayInsecureContent): + (WebFrameLoaderClient::didRunInsecureContent): + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebFrameLoadDelegatePrivate.h: Added. + +2009-09-03 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=24696 + + Stub implementations of mixed content methods of FrameLoaderClient. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::didDisplayInsecureContent): + (WebFrameLoaderClient::didRunInsecureContent): + +2009-09-02 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + More partial work towards "Page Cache should support pages with Frames" + https://bugs.webkit.org/show_bug.cgi?id=13631 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _topHTMLView]): Rework the ASSERT in this method to reflect the + reality of calling this method for pages currently in the PageCache. + +2009-08-31 Dimitri Glazkov <dglazkov@chromium.org> + + Reverting http://trac.webkit.org/changeset/47904, because it caused + layout test failure. + +2009-08-31 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=28852 + Rename KURL single argument constructor to avoid confusion + + * WebView/WebScriptDebugger.mm: (toNSURL): Adapt to the change. + +2009-08-31 Mark Mentovai <mark@chromium.org> + + Reviewed by Dave Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=28614 + + Perform a layout prior to checking whether the scrollbar modes are + off, on, or automatic. The modes may change during layout. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView updateScrollers]): + +2009-08-28 Chris Fleizach <cfleizach@apple.com> + + Reviewed by John Sullivan. + + update-webkit-localizable-strings script can no longer complete + https://bugs.webkit.org/show_bug.cgi?id=28792 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-08-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Holger Freyther. + + https://bugs.webkit.org/show_bug.cgi?id=25889 + [GTK] scrollbar policy for main frame is not implementable + + Add empty implementation for new ChromeClient method. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::scrollbarsModeDidChange): + +2009-08-25 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Oliver Hunt. + + <video> and <audio> controller should be accessible + https://bugs.webkit.org/show_bug.cgi?id=28081 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory localizedMediaControlElementString:]): + (-[WebViewFactory localizedMediaControlElementHelpText:]): + (-[WebViewFactory localizedMediaTimeDescription:]): + New. + +2009-08-24 Simon Fraser <simon.fraser@apple.com> + + Reviewed by NOBODY (build fix) + + Turn off ENABLE_3D_CANVAS in the xconfig files. + + * Configurations/FeatureDefines.xcconfig: + +2009-08-22 Adam Barth <abarth@webkit.org> + + Revert 47684. We're going to do this later once clients have had a + chance to opt into the setting they like. + + * Misc/WebKitVersionChecks.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + +2009-08-22 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Don't let local files access web URLs + https://bugs.webkit.org/show_bug.cgi?id=28480 + + * Misc/WebKitVersionChecks.m: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + +2009-08-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7162480> + Sometimes WebKit does not layout correctly when a WebView is embedded in an HICocoaView + + Add a null check for the current context when reflectScrolledClipView: is called from outside a + draw operation. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + +2009-08-20 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + Enable various "grouping" ARIA roles + https://bugs.webkit.org/show_bug.cgi?id=28486 + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXARIAContentGroupText:]): + +2009-08-19 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Fix <http://webkit.org/b/28484> Plug-in-related leaks seen on the build bot + + When the plug-in data is being loaded manually there is a reference cycle between the + NetscapePluginInstanceProxy and the HostedNetscapePluginStream. We need to explicitly + break the reference cycle in NetscapePluginInstanceProxy::cleanup so that both objects + will be destroyed. + + Take the opportunity to add RefCountedLeakCounter support to HostedNetscapePluginStream + and NetscapePluginInstanceProxy to simplify tracking down leaks of these objects in the future. + + * Plugins/Hosted/HostedNetscapePluginStream.h: + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream): + (WebKit::HostedNetscapePluginStream::~HostedNetscapePluginStream): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::cleanup): Clear m_manualStream to break the reference + cycle. + +2009-08-19 Aaron Boodman <aa@chromium.org> + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to + specify a more granular policy for cross-origin XHR access. + + * WebView/WebView.mm: Add SPI to manipulate origin access whitelists. + (+[WebView _whiteListAccessFromOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): Ditto. + (+[WebView _resetOriginAccessWhiteLists]): Ditto. + * WebView/WebViewPrivate.h: Ditto. + +2009-08-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Adele Peterson. + + Mac specific part of + + <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + Implement shouldLoadMediaElementURL by asking the policy delegate. + + * WebView/WebPolicyDelegatePrivate.h: + Add new delegate method, remove some unused cruft. + +2009-08-18 Drew Wilson <atwilson@google.com> + + Reviewed by Eric Seidel. + + Need to extend DumpRenderTree to expose number of worker threads. + https://bugs.webkit.org/show_bug.cgi?id=28292 + + * WebKit.exp: + Exported WebWorkersPrivate so DumpRenderTree can access it. + * Workers/WebWorkersPrivate.h: Added. + * Workers/WebWorkersPrivate.mm: Added. + (+[WebWorkersPrivate workerThreadCount]): + Added WebWorkersPrivate::workerThreadCount() API for DumpRenderTree. + +2009-08-17 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Use a HashMap instead of a list of if statements for the command + name exception map. + + * WebView/WebHTMLView.mm: + (createSelectorExceptionMap): Added. + (commandNameForSelector): Use createSelectorExceptionMap. + +2009-08-16 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/28366> WebHTMLViewInternal.h: add @class CALayer declaration + + Reviewed by Simon Fraser. + + Without WebKitPrefix.h, the missing @class CALayer declaration + causes a compile-time error. + + * WebView/WebHTMLViewInternal.h: Added @class CALayer + declaration with USE(ACCELERATED_COMPOSITING). + +2009-08-16 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates + + Reviewed by Dan Bernstein. + + * Plugins/WebBaseNetscapePluginStream.mm: Added using std::min + statement. + (WebNetscapePluginStream::deliverData): Changed MIN() to min(). + Changed C-style cast to a static_cast. + * Plugins/WebNetscapePluginView.mm: Added using std::min + statement. + (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]): + Changed MIN() to min(). Changed C-style cast to a static_cast. + * WebView/WebHTMLView.mm: Added using std::max statement. + (-[WebHTMLView _dragImageForURL:withLabel:]): Changed MAX() to + max(). + (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto. + * WebView/WebTextCompletionController.mm: Added using std::max + and using std::min statements. + (-[WebTextCompletionController _placePopupWindow:]): Changed + type of maxWidth variable from float to CGFloat to prevent a + type mismatch on x86_64. Changed MAX() to max() and MIN() to + min(). Added static_cast for a constant value since CGFloat is + defined as a float on i386 and as a double on x86_64. + +2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com> + + Reviewed by Sam Weinig. + + Added ENABLE_EVENTSOURCE flag. + https://bugs.webkit.org/show_bug.cgi?id=14997 + + * Configurations/FeatureDefines.xcconfig: + +2009-08-14 Mark Rowe <mrowe@apple.com> + + Build fix. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::enumerate): Add the necessary .get() calls. + +2009-08-14 Brady Eidson <beidson@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/7091546> - Assertion failure in plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html + on 64-bit SnowLeopard + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::cancelLoad): Since this might be called while the FrameLoader is switching DocumentLoaders + during the brief moment where there is no activeDocumentLoader(), accept and handle a validly null DocumentLoader. + +2009-08-14 Mark Rowe <mrowe@apple.com> + + Reviewed by Brady Eidson. + + Fix leaks of NSNumber and NSMutableArray objects seen during layout tests. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::enumerate): Don't leak an NSMutableArray that we allocate. + +2009-08-14 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Fix leaks of HostedNetscapePluginStream and NetscapePlugInStreamLoader objects seen during layout tests. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::didFail): Disconnect the stream from the plug-in instance proxy + when the load fails. + +2009-08-13 Darin Adler <darin@apple.com> + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes. + * WebView/WebScriptDebugger.mm: Ditto. + +2009-08-12 Mark Rowe <mrowe@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu]. + + * WebView/WebView.mm: + (-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard. + +2009-08-12 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Eric Seidel. + + Add delegate methods about focus and blur and state change + https://bugs.webkit.org/show_bug.cgi?id=27153 + + Have ObjC delegate methods match C++ method names in the ChromeClient. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::formDidFocus): + (WebChromeClient::formDidBlur): + * WebView/WebUIDelegatePrivate.h: + +2009-08-11 John Gregg <johnnyg@google.com> + + Reviewed by Maciej Stachowiak. + + Desktop Notifications API + https://bugs.webkit.org/show_bug.cgi?id=25643 + + Adds ENABLE_NOTIFICATION flag. + + * Configurations/FeatureDefines.xcconfig: + +2009-08-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove dead declarations. + + * WebView/WebViewInternal.h: + +2009-08-11 Dmitry Titov <dimich@chromium.org> + + Reviewed by Adam Roben. + + Originally implemented by Glenn Wilson <gwilson@chromium.org>. + + Added new methods for overriding default WebPreference values + and for resetting preferences to their defaults. + See https://bugs.webkit.org/show_bug.cgi?id=20534 + + * WebView/WebPreferences.mm: + (-[WebPreferences _setPreferenceForTestWithValue:withKey:]): added. + * WebView/WebPreferencesPrivate.h: same. + +2009-08-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + [WML] Deck access control is completly broken + https://bugs.webkit.org/show_bug.cgi?id=27721 + + Synchronize WebFrameLoadType with FrameLoadType enum. Append 'WebFrameLoadTypeBackWMLDeckNotAccessible'. + + * WebView/WebFramePrivate.h: + +2009-08-07 Simon Fraser <simon.fraser@apple.com> + + Fix the build on 10.6. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView attachRootLayer:]): + +2009-08-07 Simon Fraser <simon.fraser@apple.com> + + Fix a stylistic nit related to the location of the *, which, for some + ridiculous reason, WebKit style dictates to be different between Objective-C and C++. + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + +2009-08-07 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Work around an issue on Leopard where composited layers are misplaced and squished when the page + gets over 4096px tall. + https://bugs.webkit.org/show_bug.cgi?id=27272 + <rdar://problem/7067892> [Leopard] Composisted layers are misplaced and squished on on long pages + <rdar://problem/7068252> [Leopard] When switching to a tab with HW layers, they fade in + + * WebView/WebDynamicScrollBarsView.mm: + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + Call -_updateLayerHostingViewPosition after scrolling. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): + Call -_updateLayerHostingViewPosition after the view changes size. + + (-[WebHTMLView attachRootLayer:]): + Turn off default animations, to avoid animations of sublayer transform, and fading-in + when tab switching. + + * WebView/WebHTMLViewInternal.h: + (-[WebHTMLView _updateLayerHostingViewPosition]): + New method that constrains the height of the layer-hosting view to a max height + of 4096px, and compensates for the height restriction by placing the layer-hosting + view at the top of the visible part of the WebHTMLView, and adjusting the position + of the hosted layers via sublayer transform. + +2009-08-07 Anders Carlsson <andersca@apple.com> + + Fix Tiger build. + + * WebView/WebRenderNode.mm: + (-[WebRenderNode _initWithCoreFrame:]): + +2009-08-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Timothy Hatcher and Sam Weinig. + + Change WebRenderNode to take a WebFrame instead of a WebFrameView. + + * WebView/WebRenderNode.h: + * WebView/WebRenderNode.mm: + (-[WebRenderNode _initWithName:position:rect:coreFrame:children:]): + (copyRenderNode): + (-[WebRenderNode _initWithCoreFrame:]): + (-[WebRenderNode initWithWebFrame:]): + +2009-08-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler and Dan Bernstein. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::hasHTMLView): + Always return true when we're in viewless mode. + +2009-08-06 Anders Carlsson <andersca@apple.com> + + Remove WebGraphicsExtras.h include. + + * Plugins/WebNetscapePluginView.mm: + +2009-08-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove WebGraphicsExtras, it is no longer used. + + * Misc/WebGraphicsExtras.c: Removed. + * Misc/WebGraphicsExtras.h: Removed. + +2009-08-06 Chris Marrin <cmarrin@apple.com> + + Reviewed by David Hyatt. + + Added ENABLE_3D_CANVAS flag to build, default to off + + * Configurations/FeatureDefines.xcconfig: + +2009-08-04 Michael Nordman <michaeln@google.com> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=27821 + + Mods to keep up with ApplicationCacheHost refactoring. + + * WebView/WebDataSource.mm: + (-[WebDataSource _transferApplicationCache:]): + +2009-07-30 Darin Adler <darin@apple.com> + + Reviewed by David Levin. + + Use checked casts for render tree + https://bugs.webkit.org/show_bug.cgi?id=23522 + + * Misc/WebNSAttributedStringExtras.mm: + (fileWrapperForElement): + * Misc/WebNSPasteboardExtras.mm: + (imageFromElement): + (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]): + * WebView/WebFrame.mm: + (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): + (-[WebFrame _accessibilityTree]): + * WebView/WebRenderNode.mm: + (copyRenderNode): + Use checked casts. + +2009-07-31 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Anders Carlsson. + + Accelerated animations stutter on pages with lots of animations and 3d transforms + https://bugs.webkit.org/show_bug.cgi?id=27884 + + This patch changes the strategy for synchronizing painting view the view, + and compositing layer updates. Previously the strategy was to disable screen + updates between the time we updated the layer tree, and painted the view. That + left screen updates disabled for too long (hundreds of milliseconds) in some + cases, causing animation stutter. + + The new strategy is to batch up changes to the CA layer tree, and commit them + all at once just before painting happens (referred to as a "sync" in the code). + GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates + the values stored in GraphicsLayer into the CA layer tree at commit time. + + Compositing layers are then synced in FrameView::paintContents(). However, not + all style/layout changes will result in painting; to deal with style changes that + touch only compositing properties, we set up a runloop observer that takes care + of comitting layer changes when no painting happens. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::scheduleCompositingLayerSync): + scheduleViewUpdate() renamed to syncCompositingStateRecursive() + + * WebView/WebView.mm: + (-[WebView _close]): + (-[WebView _clearLayerSyncLoopObserver]): + "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver". + + (-[WebView _syncCompositingChanges]): + Helper method that calls syncCompositingStateRecursive() on the FrameView. + + (layerSyncRunLoopObserverCallBack): + (-[WebView _scheduleCompositingLayerSync]): + This is all about layer sycning now. Also, the run loop observer is repeating, + because it has to keep firing until syncCompositingStateRecursive() says that it + has completed. + + * WebView/WebViewData.h: + "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver". + + * WebView/WebViewInternal.h: + _scheduleViewUpdate is now _scheduleCompositingLayerSync + +2009-07-30 Michael Nordman <michaeln@google.com> + + Reviewed by Darin Fisher. + + https://bugs.webkit.org/show_bug.cgi?id=27821 + + Mods to keep up with ApplicationCacheHost refactoring. + + * WebView/WebDataSource.mm: + (-[WebDataSource _transferApplicationCache:]): + +2009-07-29 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header + + Reviewed by Mark Rowe. + + * Plugins/WebPluginController.h: Changed #import of + WebPluginContainerCheck.h to use a framework-style include in + case other platforms wish to export WebPluginController.h as a + private header. + +2009-07-29 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Darin Adler. + + Added foundation work to allow a testing infrastructure for the Web + Inspector. + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::inspectorWindowObjectCleared): Send the delegate + callback. + * WebView/WebDelegateImplementationCaching.h: + * WebView/WebView.mm: + (-[WebView _cacheFrameLoadDelegateImplementations]): + * WebView/WebViewPrivate.h: The delegate SPI. + +2009-07-27 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread + + In some situations Microsoft Messenger can attempt to manipulate the DOM from a secondary thread while + updating its file transfer progress bar. This results in corruption of WebCore data structures that is + quickly followed by a crash. We can work around this by having -[WebFrame DOMDocument] return nil when + called from a secondary thread by Microsoft Messenger, which has the effect of turning its attempts at + DOM manipulation in to no-ops. + + * WebView/WebFrame.mm: + (needsMicrosoftMessengerDOMDocumentWorkaround): + (-[WebFrame DOMDocument]): + +2009-07-27 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27735 + Give a helpful name to JSLock constructor argument + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics shouldPrintExceptions]): + (+[WebCoreStatistics setShouldPrintExceptions:]): + (+[WebCoreStatistics memoryStatistics]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::removeProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::enumerate): + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::wantsAllStreams): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + (-[WebNetscapePluginView setWindowIfNecessary]): + (-[WebNetscapePluginView createPluginScriptableObject]): + (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebNetscapePluginView loadPluginRequest:]): + (-[WebNetscapePluginView _printedPluginBitmap]): + * Plugins/WebPluginController.mm: + (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): + (-[WebPluginController startAllPlugins]): + (-[WebPluginController stopAllPlugins]): + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2009-07-24 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + REGRESSION (r46298): Exception after clicking on Bookmarks button in the Bookmarks Bar + https://bugs.webkit.org/show_bug.cgi?id=27667 + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Moved the code to set the + title here. This is late enough that both the view and representation exist. + + * WebView/WebDataSource.mm: + (-[WebDataSource _makeRepresentation]): Removed the code to set the title from here. + It's a bit too early. + +2009-07-24 Andrei Popescu <andreip@google.com> + + Reviewed by Anders Carlsson. + + ApplicationCache should have size limit + https://bugs.webkit.org/show_bug.cgi?id=22700 + + Adds the WebApplicationCache class that is + used by the DumpRenderTree test application to + configure the Application Cache maximum size. + + * WebCoreSupport/WebApplicationCache.h: Added. + * WebCoreSupport/WebApplicationCache.mm: Added. + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::reachedMaxAppCacheSize): + Adds empty implementation of the reachedMaxAppCacheSize callback. + * WebKit.exp: + +2009-07-23 Darin Adler <darin@apple.com> + + * WebView/WebDataSource.mm: + (-[WebDataSource _makeRepresentation]): Landed a comment I forgot last time. + +2009-07-23 Darin Adler <darin@apple.com> + + Reviewed by Brady Eidson. + + URL appears in back/forward button menu instead of title for items with custom representation + https://bugs.webkit.org/show_bug.cgi?id=27586 + rdar://problem/5060337 + + The problem is that DocumentLoader expects to store a title, but for custom representations + it is never passed to the document loader. + + * WebView/WebDataSource.mm: + (-[WebDataSource _makeRepresentation]): Added a call to DocumentLoader::setTitle. + Works as long as the title does not change during the document's lifetime, which + is good enough for the simple cases in Safari. + +2009-07-20 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + REGRESSION (r39185): Safari adds ".jpeg" extension to images that already have ".JPG" extension + https://bugs.webkit.org/show_bug.cgi?id=27472 + + * WebView/WebHTMLView.mm: + (matchesExtensionOrEquivalent): Changed category method into a C function. + Made it require the leading dot when checking for the extension and do it + in a non-case-sensitive way. + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Changed to call + the function. + +2009-07-21 Roland Steiner <rolandsteiner@google.com> + + Reviewed by David Levin. + + Add ENABLE_RUBY to list of build options + https://bugs.webkit.org/show_bug.cgi?id=27324 + + * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY. + +2009-07-17 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272) + https://bugs.webkit.org/show_bug.cgi?id=14272 + + Removed size calculation code from [WebInspectorWindowController setInitialAttachedHeight] into + InspectorController.cpp to make it cross platform, and use InspectorController to store the + user's preferred size for an attached window, instead of NSUserDefaults. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): + (-[WebInspectorWindowController setAttachedWindowHeight:]): + +2009-07-16 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by David Levin. + + Add --web-sockets flag and ENABLE_WEB_SOCKETS define. + https://bugs.webkit.org/show_bug.cgi?id=27206 + + Add ENABLE_WEB_SOCKETS + + * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS + +2009-07-16 Xiaomei Ji <xji@chromium.org> + + Reviewed by Darin Adler. + + Fix tooltip does not get its directionality from its element's directionality. + https://bugs.webkit.org/show_bug.cgi?id=24187 + + Per mitz's suggestion in comment #6, while getting the plain-text + title, we also get the directionality of the title. How to handle + the directionality is up to clients. Clients could ignore it, + or use attribute or unicode control characters to display the title + as what they want. + + * Misc/WebElementDictionary.mm: + (-[WebElementDictionary _spellingToolTip]): Change spellingToolTip caller due to signature change. + (-[WebElementDictionary _title]): Change title caller due to signature change. + * WebCoreSupport/WebChromeClient.h: Add directionality as 2nd parameter to setToolTip(). + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet). + +2009-07-15 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Renamed parseURL to deprecatedParseURL. + + * DOM/WebDOMOperations.mm: + (-[DOMDocument URLWithAttributeString:]): Renamed. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): Renamed. + +2009-07-15 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=27304 + WebKit should provide usage and eligibility information about the page cache. + + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics numberCachedPages]): + (+[WebCoreStatistics numberCachedFrames]): + (+[WebCoreStatistics numberAutoreleasedPages]): + * WebKit.exp: + + * WebView/WebFrame.mm: + (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about + why the frame is not cacheable. If the frame *is* cacheable, the dictionary is + empty. + * WebView/WebFramePrivate.h: + +2009-07-13 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein, Adam Roben. + + "Unrecognized selector" console log when the Safari 4 Welcome page navigates to Top Sites. + <rdar://problem/6994893 + + attachRootGraphicsLayer() should not assume that the frameView's documentView + is a WebHTMLView. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::attachRootGraphicsLayer): + +2009-07-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler and Kevin Decker. + + <rdar://problem/7053687> Core Animation plug-ins continue to grow larger and larger when opening new tabs (32 bit-only) + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView setLayer:]): + Add a FIXME. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView setLayer:]): + Make sure to set the size of the layer before changing the autoresizing mask so it won't grow everytime it's inserted + into the layer tree. + +2009-07-13 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Simon Fraser. + + Correct these delegate methods' declarations by adding parameter names. + + * WebView/WebUIDelegatePrivate.h: + +2009-07-13 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs + https://bugs.webkit.org/show_bug.cgi?id=26932 + + Added ENABLE(SHARED_WORKERS) flag (disabled by default). + + * Configurations/FeatureDefines.xcconfig: + +2009-07-12 Keishi Hattori <casey.hattori@gmail.com> + + Reviewed by Timothy Hatcher. + + Refactor ConsoleMessage to add MessageType attribute. + https://bugs.webkit.org/show_bug.cgi?id=20625 + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::addMessageToConsole): + +2009-07-11 Simon Fraser <simon.fraser@apple.com> + + Enable support for accelerated compositing and 3d transforms on Leopard. + <https://bugs.webkit.org/show_bug.cgi?id=20166> + <rdar://problem/6120614> + + Reviewed by Oliver Hunt. + + * Configurations/FeatureDefines.xcconfig: + +2009-07-10 David Kilzer <ddkilzer@apple.com> + + Bug 27007: Build fixes when ICONDATABASE is disabled + + <https://bugs.webkit.org/show_bug.cgi?id=27007> + + Reviewed by Sam Weinig. + + * Misc/WebIconDatabase.mm: + (defaultClient): Return 0 if ICONDATABASE is disabled. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidReceiveIcon): Commented out + the body of the method if ICONDATABASE is disabled. + (WebFrameLoaderClient::registerForIconNotification): Ditto. + * WebCoreSupport/WebIconDatabaseClient.mm: Added #if + ENABLE(ICONDATABASE)/#endif guard to source. + * WebView/WebView.mm: + (-[WebView setFrameLoadDelegate:]): Wrapped code that starts the + icon database machinery in #if ENABLE(ICONDATABASE)/#endif. + (-[WebView _registerForIconNotification:]): Wrapped method in + #if ENABLE(ICONDATABASE)/#endif guard. + (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Ditto. + * WebView/WebViewInternal.h: Wrapped methods in #if + ENABLE(ICONDATABASE)/#endif guard. + (-[WebView _registerForIconNotification:]): + (-[WebView _dispatchDidReceiveIconFromWebFrame:]): + +2009-07-10 Simon Fraser <simon.fraser@apple.com> + + Reviewed by John Sullivan. + + Flashing as hardware layers are created and destroyed in some content + <rdar://problem/7032246> + + There's a window of time between the end of one runloop cycle, after CA layers changes + have been committed, and the window display at the start of the next cycle when + CA may push updates to the screen before AppKit has drawn the view contents. If + we know that we need to do drawing synchronization (which we do when content moves + between a layer and the view), then we need to call -disableScreenUpdatesUntilFlush + from the existing runloop observer that is set up when layers need repainting to + ensure that layer updates don't reach the screen before view-based painting does. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawRect:]): + Tweak the comments + + * WebView/WebView.mm: + (viewUpdateRunLoopObserverCallBack): + (-[WebView _scheduleViewUpdate]): + Add a big comment to explain the timing of things. + Call -disableScreenUpdatesUntilFlush when the view _needsOneShotDrawingSynchronization. + + 2009-07-09 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Tim Hatcher. +2009-07-10 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig with the power of Grayskull. + + Enable XSSAuditor by default. + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + +2009-07-10 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Antti Koivisto. + + Add delegate methods about focus and blur and state change + https://bugs.webkit.org/show_bug.cgi?id=27153 + + Call the appropriate private delegate methods from the ChromeClient. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::formStateDidChange): + (WebChromeClient::formDidFocus): + (WebChromeClient::formDidBlur): + * WebView/WebUIDelegatePrivate.h: + +2009-07-09 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Tim Hatcher. + + https://bugs.webkit.org/show_bug.cgi?id=27141 + + Updated WebInspectorClient to use Web Inspector Preferences to remember whether or not it should be + docked or a free window instead of NSUserDefaults it used to have. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController init]): + (-[WebInspectorWindowController showWindow:]): + (-[WebInspectorWindowController attach]): + (-[WebInspectorWindowController detach]): + +2009-07-09 Drew Wilson <atwilson@google.com> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=26903 + + Turned on CHANNEL_MESSAGING by default because the MessageChannel API + can now be implemented for Web Workers and is reasonably stable. + + * Configurations/FeatureDefines.xcconfig: + +2009-07-09 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson and Dan Bernstein. + + <rdar://problem/7024972> Cannot set font to Helvetica Neue Light in Mail compose window + + No regression test because this only affects the font panel. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _addToStyle:fontA:fontB:]): Fix code that detects whether the font would + survive a round trip by using the weight corresponding to "bold" or "normal" rather than + the actual weight number. + +2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> + + Reviewed by Dave Hyatt. + + Make Widget RefCounted to fix: + + <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs + at WebCore::Widget::afterMouseDown() after clicking To Do's close + box + <rdar://problem/6978804> WER #16: Repro Access Violation in + WebCore::PluginView::bindingInstance (1310178023) + -and- + <rdar://problem/6991251> WER #13: Crash in WebKit! + WebCore::PluginView::performRequest+203 (1311461169) + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): + +2009-07-09 Sam Weinig <sam@webkit.org> + + Reviewed by Steve Falkenburg. + + Roll out r43848. The quirk is no longer necessary. + + * WebView/WebView.mm: + (-[WebView WebCore::_userAgentForURL:WebCore::]): + +2009-07-09 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + <rdar://problem/6921671> Visit count shouldn't be incremented by redirects. + + * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory): + Do not increase visit count if there is a redirect source. As a result, only pages that were + explicitly visited by the user (by typing a URL, choosing one from bookmarks, or clicking + a link) will be counted. + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]): + (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): + * History/WebHistoryInternal.h: + * History/WebHistoryItem.mm: + (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]): + * History/WebHistoryItemInternal.h: + Marshal this new argument all the way down to WebCore. + +2009-07-08 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Darin Adler. + + Add -[WebView _isProcessingUserGesture] + https://bugs.webkit.org/show_bug.cgi?id=27084 + + Add -_isProcessingUserGesture that calls into WebCore::FrameLoader::isProcessingUserGesture() + so that WebView code can determine if a user gesture is in progress. + + * WebView/WebView.mm: + (-[WebView _isProcessingUserGesture]): + * WebView/WebViewPrivate.h: + +2009-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + - Fix <rdar://problem/6544693>. + + For Flash, don't cache which methods or fields in an object are missing, since they can + be added at any time. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::hostForPackage): + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::shouldCacheMissingPropertiesAndMethods): + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::methodsNamed): + (WebKit::ProxyInstance::fieldNamed): + +2009-07-06 David Kilzer <ddkilzer@apple.com> + + Bug 27006: Build fix when MAC_JAVA_BRIDGE is disabled + + <https://bugs.webkit.org/show_bug.cgi?id=27006> + + Reviewed by Darin Adler. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createJavaAppletWidget): Wrap contents of + the method in #if ENABLE(MAC_JAVA_BRIDGE)/#endif and return 0 + when this feature is disabled. + +2009-07-06 David Kilzer <ddkilzer@apple.com> + + Bug 27005: Build fixes when NETSCAPE_PLUGIN_API is disabled + + <https://bugs.webkit.org/show_bug.cgi?id=27005> + + Reviewed by Geoff Garen. + + * Plugins/WebPluginController.mm: + (-[WebPluginController destroyPlugin:]): Wrap call to + ScriptController::cleanupScriptObjectsForPlugin() in + #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro. + (-[WebPluginController destroyAllPlugins]): Ditto. + * Plugins/WebPluginDatabase.mm: + (-[WebPluginDatabase removePluginInstanceViewsFor:]): Wrap + WebBaseNetscapePluginView class checks in + #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro. + (-[WebPluginDatabase destroyAllPluginInstanceViews]): Ditto. + +2009-07-06 David Kilzer <ddkilzer@apple.com> + + BUILD FIX: Use ENABLE(NETSCAPE_PLUGIN_API) instead of USE(PLUGIN_HOST_PROCESS) + + In r45579, #if/#endif macros for USE(PLUGIN_HOST_PROCESS) were + used, but ENABLE(NETSCAPE_PLUGIN_API) should have been used + instead. + + * Plugins/WebNetscapeContainerCheckContextInfo.h: + * Plugins/WebNetscapeContainerCheckContextInfo.mm: + * Plugins/WebNetscapeContainerCheckPrivate.mm: + +2009-07-06 David Kilzer <ddkilzer@apple.com> + + Bug 27004: Build fix for ENABLE(PLUGIN_PROXY_FOR_VIDEO) after r42618 + + <https://bugs.webkit.org/show_bug.cgi?id=27004> + + Reviewed by Geoff Garen. + + * Plugins/WebPluginController.mm: + (mediaProxyClient): Use core() method to convert from + DOMElement to WebCore::Element. + +2009-07-06 David Kilzer <ddkilzer@apple.com> + + Bug 27003: Build fix when USE(PLUGIN_HOST_PROCESS) is disabled + + <https://bugs.webkit.org/show_bug.cgi?id=27003> + + Reviewed by Geoff Garen. + + * Plugins/WebNetscapeContainerCheckContextInfo.h: Added #if + USE(PLUGIN_HOST_PROCESS)/#endif guards. + * Plugins/WebNetscapeContainerCheckContextInfo.mm: Ditto. + * Plugins/WebNetscapeContainerCheckPrivate.mm: Ditto. + +2009-07-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Adele Peterson. + + Initialize wkIsLatchingWheelEvent. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2009-07-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + - fix <rdar://problem/6964278> REGRESSION (r42118): Scrolling redraw + problem in FileMaker Pro + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + Perform layout if needed, even on Mac OS X versions that have + -viewWillDraw. This prevents attempts to draw without layout in case + -viewWillDraw was not called due to NSView issues or the client + did something during the display operation that re-invalidated the + layout. + +2009-07-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6978783> + Software-rendered plug-in does not update correctly when inside a hardware layer + + Replace calls to setNeedsDisplay: and setNeedsDisplayInRect: with a call to the new method + invalidatePluginContentRect:. This new method will ask WebCore to do the repainting, taking + transforms into account. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invalidateRect): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView pluginHostDied]): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView windowBecameKey:]): + (-[WebBaseNetscapePluginView windowResignedKey:]): + (-[WebBaseNetscapePluginView preferencesHaveChanged:]): + (-[WebBaseNetscapePluginView invalidatePluginContentRect:]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView invalidateRect:]): + (-[WebNetscapePluginView invalidateRegion:]): + (-[WebNetscapePluginView forceRedraw]): + +2009-07-02 Adam Roben <aroben@apple.com> + + Fix warnings from update-webkit-localizable-strings + + Rubber-stamped by Eric Carlson. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory mediaElementLoadingStateText]): + (-[WebViewFactory mediaElementLiveBroadcastStateText]): + Changed the localization comments to match the comments in the Windows + version of this file, to avoid warnings about different comments for + the same localized string. + +2009-07-02 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein. + + Compositing-related preference methods are not public API; should move to WebPreferencesPrivate.h + <rdar://problem/7027363> + + Move accelerated-compositing pref to WebPreferencesPrivate.h + + * WebView/WebPreferences.h: + * WebView/WebPreferences.mm: + (-[WebPreferences acceleratedCompositingEnabled]): + (-[WebPreferences setAcceleratedCompositingEnabled:]): + * WebView/WebPreferencesPrivate.h: + +2009-07-02 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/6518119> + + Add localized strings for media controller status messages. + + * WebCoreSupport/WebViewFactory.mm: Add new localized text. + (-[WebViewFactory mediaElementLoadingStateText]): + (-[WebViewFactory mediaElementLiveBroadcastStateText]): + +2009-07-01 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Add a preference/setting to toggle whether content sniffing is enabled for file URLs. + + * WebView/WebPreferenceKeysPrivate.h: + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences localFileContentSniffingEnabled]): + (-[WebPreferences setLocalFileContentSniffingEnabled:]): + * WebView/WebPreferencesPrivate.h: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-07-01 David Hyatt <hyatt@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused, + even though the field is not actually focused for keyboard input + + Add the concept of whether or not the Page is focused by adding a boolean to the focusController. This allows the + focused frame and focused node to both be cached and changed programmatically without causing errors when the Page doesn't + have focus. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView becomeFirstResponder]): + (-[WebHTMLView resignFirstResponder]): + +2009-06-30 Adele Peterson <adele@apple.com> + + Reviewed by Dan Bernstein. + + Fix for <rdar://problem/7014389> REGRESSION(4-TOT): Hyperlinks have no tooltips in Mail unless you first click in the message body + + Updated these new methods (added as part of the viewless WebKit effort) that call through to WebHTMLView to use _selectedOrMainFrame, + instead of just selectedFrame. When the selection changes, I don't think there is a situation where there's no selected frame, but + it seems better to keep these two uses the same, since if there is a case, this will be more like the old behavior, before there was + a version of _selectionChanged in WebView. + + * WebView/WebView.mm: + (-[WebView _setToolTip:]): + (-[WebView _selectionChanged]): + +2009-06-30 Mark Rowe <mrowe@apple.com> + + Reviewed by Timothy Hatcher. + + <rdar://problem/7006959> 'Save as…’ does not work in Mail + + * WebView/WebFrameView.mm: + (-[WebFrameView initWithFrame:]): Call _needMailThreadWorkaroundIfCalledOffMainThread rather than + needMailThreadWorkaround, as the latter is intended to be used at the point which a workaround would + be applied and thus contains a main thread check. Since -initWithFrame: is called on the main thread, + this was causing us to not switch from exception-throwing to logging for the thread violation behavior. + +2009-06-30 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap + to Grid" window is clipping + + * Misc/WebKitVersionChecks.h: Added + WEBKIT_FIRST_VERSION_WITHOUT_SHADE10_QUIRK + * WebView/WebView.mm: + (-[WebView _needsLinkElementTextCSSQuirk]): Added. Returns YES if the + client app is a version of Shade 10 earlier than 10.6 and it was + linked against a version of WebKit earlier than 531.2. + (-[WebView _preferencesChangedNotification:]): Added a call to + Settings::setTreatsAnyTextCSSLinkAsStylesheet(). + +2009-06-29 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Simon Fraser. + + <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + Add QTMovieGetType. + +2009-06-29 David Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Put datagrid behind an #ifdef. + + * Configurations/FeatureDefines.xcconfig: + +2009-06-26 John Sullivan <sullivan@apple.com> + + Added support for disabling Stop Speaking when there is no speaking to stop. + Also fixed Stop Speaking so that it works (formerly it would throw an exception, and + selecting it from the menu would perform a web search instead (!)). + + Reviewed by Tim Hatcher. + + * WebCoreSupport/WebContextMenuClient.h: + declare isSpeaking() + + * WebCoreSupport/WebContextMenuClient.mm: + (WebContextMenuClient::isSpeaking): + implement by calling through to NSApplication + (WebContextMenuClient::stopSpeaking): + fixed implementation by correcting the signature of the NSApplication method + +2009-06-26 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser <simon.fraser@apple.com>. + + Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651 + + The flag should always default to true to avoid it getting set + to false in a build with accelerated compositing turned off + and then disabling accelerated compositing when subsequently + running a build with it turned on. + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + +2009-06-26 Brady Eidson <beidson@apple.com> + + Fix SnowLeopard build. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::didReceiveResponse): + +2009-06-26 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails + + Replace all usage of the now obsolete [NSURLResponse _webcore_MIMEType]. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::didReceiveResponse): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView pluginView:receivedData:]): + * Plugins/WebPluginController.mm: + (-[WebPluginController pluginView:receivedResponse:]): + * WebView/WebDataSource.mm: + (-[WebDataSource _responseMIMEType]): + * WebView/WebResource.mm: + (-[WebResource _initWithData:URL:response:]): + +2009-06-26 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Sam Weinig. + + <rdar://problem/6651201> Update lookalike character list. + + * Misc/WebNSURLExtras.mm: (isLookalikeCharacter): Added more characters to the list. + +2009-06-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/6989017> + REGRESSION (SnowLeopard): RealPlayer content replays when opening a new tab or switching back to the RealPlayer tab + + If a plug-in fails in NPP_New, we would try to recreate it whenever the preferences for a web view would change. + + Fix this by setting a flag when we fail to instantiate the plug-in, so we only try once. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): + +2009-06-25 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser <simon.fraser@apple.com>. + + https://bugs.webkit.org/show_bug.cgi?id=26651 + + Preference is named "WebKitAcceleratedCompositingEnabled" + and is a boolean value. When false, prevents compositing layers from + being created, which prevents hardware animation from running. + Also forces video to do software rendering. Added a cache for + the flag in RenderLayerCompositing and made it all work + on-the-fly when the flag is changed while a page is loaded. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences acceleratedCompositingEnabled]): + (-[WebPreferences setAcceleratedCompositingEnabled:]): + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-06-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Fix the most recently seen kind of crash in <rdar://problem/5983224> + + * WebView/WebHTMLView.mm: + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Null-check the + Frame. + +2009-06-24 Jeff Johnson <opendarwin@lapcatsoftware.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=26638 WebKitErrors.m: _initWithPluginErrorCode: does not set localizedDescription + + Add localized descriptions for plugin errors. + The localized strings already existed but were unused; now NSLocalizedDescriptionKey is added to the NSError userInfo. + + * Misc/WebKitErrors.m: + (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): + +2009-06-23 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6950660> REGRESSION: iSale 5.5.3 crashes after I click a template to load + + Due to some subtle WebKit changes - presumably some delegate callback behavior - a latent bug in + iSale was uncovered where they aren't properly retaining their FrameLoadDelegate, and we ended up + calling back to a dealloc'ed object. + + * WebView/WebView.mm: + (-[WebView _needsAdobeFrameReloadingQuirk]): Use more intelligent C++-style initialization. + (-[WebView _needsKeyboardEventDisambiguationQuirks]): Ditto. + (-[WebView _needsFrameLoadDelegateRetainQuirk]): YES for iSale versions under 5.6 + (-[WebView dealloc]): Release the delegate if the quirk is in effect. + (-[WebView setFrameLoadDelegate:]): Retain the new delegate if the quirk is in effect. + +2009-06-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + - Fix <rdar://problem/6965672> + + Defer calls to WKPCInvalidateRect, so we don't try to invalidate while waiting for a reply, since + that is too early. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::isProcessingRequests): + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::processRequests): + (WKPCInvalidateRect): + +2009-06-22 Timothy Hatcher <timothy@apple.com> + + Add Mail on Tiger and Leopard to the list of applications that need the WebView init thread workaround. + + <rdar://problem/6929524> Console shows WebKit Threading Violations from Mail + + Reviewed by Anders Carlsson. + + * WebView/WebView.mm: + (clientNeedsWebViewInitThreadWorkaround): Return true for com.apple.Mail. + +2009-06-22 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + - speculative fix for <rdar://problem/6889082> + Crash at -[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:] + + The crash seems to happen because lastHitView points to a deleted + object. Since -close calls -_clearLastHitViewIfSelf, I speculate that + lastHitView has been set to an already-closed view. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView hitTest:]): Return nil if the view is closed. + +2009-06-22 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by John Sullivan. + + <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input, + Japanese can't be input. + + * WebView/WebHTMLView.mm: (-[WebHTMLView _updateSelectionForInputManager]): Removed an + unnecessary check - the function has an early return for null frame. + +2009-06-22 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - fix <rdar://problem/6990938> REGRESSION (r42787): After showing and + hiding the Find banner, the WebHTMLView's height is not restored + + * WebView/WebFrameView.mm: + (-[WebFrameView setFrameSize:]): Mark the FrameView for layout when the + WebFrameView's size changes. + * WebView/WebView.mm: + (-[WebView setFrameSize:]): Left the resize logic here, but only for + the single view model. + +2009-06-20 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6964221> Need more processing of pluginspage. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily. + +2009-06-18 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=26199 + + Added preference to enable the XSSAuditor. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences isXSSAuditorEnabled]): + (-[WebPreferences setXSSAuditorEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-06-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6926859> + NPN_ConvertPoint doesn't give the right value when converting to/from NPCoordinateSpaceFlippedScreen + + When inverting Y, use the height of the first screen instead of the screen the window is on. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::windowFrameChanged): + (WebKit::NetscapePluginInstanceProxy::mouseEvent): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]): + +2009-06-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein + + <rdar://problem/6976766> Control-click on pages with accelerated compositing + content does not work. + + Part deux. #ifdef the use of _private->layerHostingView with + USE(ACCELERATED_COMPOSITING) + + * WebView/WebHTMLView.mm: + (-[WebHTMLView hitTest:]): + +2009-06-16 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein + + <rdar://problem/6976766> Control-click on pages with accelerated compositing + content does not work. + + Remove the WebLayerHostingView subclass of NSView, with its attempts to + forward events to the WebHTMLView, and just fix -[WebHTMLView hitTest:] + to ignore the layerHostingView. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView hitTest:]): + (-[WebHTMLView attachRootLayer:]): + +2009-06-15 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/6974857> + + Define ENABLE_3D_RENDERING when building on 10.6, and move ENABLE_3D_RENDERING + switch from config.h to wtf/Platform.h. + + * Configurations/FeatureDefines.xcconfig: + * WebKitPrefix.h: + +2009-06-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6967569> + CrashTracer: 15 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostManager::didCreateWindow + 85 + + Make sure to remove the entry from the plug-in host map so we won't end up with an entry that has a null value. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::hostForPackage): + +2009-06-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Tim Hatcher. + + - make the source code font in the Web Inspector match Mac defaults + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController init]): Set the default monospace font + to 11px Menlo, except on Leopard and Tiger where it is 10px Monaco. + +2009-06-09 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Eric Seidel. Landed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=26281 + + REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable + region loses images + + Prefer RTFD (RTF with inline images) over RTF. In + http://trac.webkit.org/changeset/19745 I accidently reversed their + order. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): + +2009-06-13 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Fisher. + + https://bugs.webkit.org/show_bug.cgi?id=24492 + + Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin + + * WebView/WebView.mm: + (+[WebView registerURLSchemeAsLocal:]): + +2009-06-12 Peter Kasting <pkasting@google.com> + + Reviewed by Eric Seidel. + + * ChangeLog-2007-10-14: Change pseudonym "Don Gibson" to me (was used while Google Chrome was not public); update my email address. + +2009-06-08 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + - gave Objective-C++ files the .mm extension + + * Carbon/HIWebView.m: Removed. + * Carbon/HIWebView.mm: Copied from WebKit/mac/Carbon/HIWebView.m. + * Misc/WebKitNSStringExtras.m: Removed. + * Misc/WebKitNSStringExtras.mm: Copied from WebKit/mac/Misc/WebKitNSStringExtras.m. + * Misc/WebStringTruncator.m: Removed. + * Misc/WebStringTruncator.mm: Copied from WebKit/mac/Misc/WebStringTruncator.m. + * WebInspector/WebNodeHighlight.m: Removed. + * WebInspector/WebNodeHighlight.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlight.m. + * WebInspector/WebNodeHighlightView.m: Removed. + * WebInspector/WebNodeHighlightView.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlightView.m. + * WebView/WebDynamicScrollBarsView.m: Removed. + * WebView/WebDynamicScrollBarsView.mm: Copied from WebKit/mac/WebView/WebDynamicScrollBarsView.m. + +2009-06-05 David Hyatt <hyatt@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=26220 + + Update a WebView's active state when it moves to a different window. + + * WebView/WebView.mm: + (-[WebView viewDidMoveToWindow]): + +2009-06-04 Sam Weinig <sam@webkit.org> + + Reviewed by Alice Liu. + + Move WebView internal data into WebViewData.h/mm. + + * WebView/WebDelegateImplementationCaching.mm: + * WebView/WebView.mm: + * WebView/WebViewData.h: Copied from mac/WebView/WebViewInternal.h. + * WebView/WebViewData.mm: Copied from mac/WebView/WebViewInternal.mm. + * WebView/WebViewInternal.h: + * WebView/WebViewInternal.mm: Removed. + +2009-06-04 David Hyatt <hyatt@apple.com> + + Reviewed by Sam Weinig. + + Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made + setFocusedFrame get called explicitly from become/ResignFirstResponder. setFocusedFrame does + the work of focusing the selection already. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + * WebView/WebHTMLView.mm: + (-[WebHTMLView becomeFirstResponder]): + (-[WebHTMLView resignFirstResponder]): + * WebView/WebView.mm: + * WebView/WebViewInternal.h: + +2009-06-04 Dan Bernstein <mitz@apple.com> + + - build fix + + * WebView/WebViewInternal.mm: + +2009-06-03 David Hyatt <hyatt@apple.com> + + Reviewed by Sam Weinig. + + Reworking of focus and active state updating for WebHTMLViews so that it actually works instead of reporting wrong answers. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + WebHTMLViews become first responders before they are able to reach their Frames/Pages. This happens because the NSClipView + becomes first responder when the WebHTMLView gets destroyed, and then we transfer the responder state back to the new WebHTMLView + when it is first connected. Once we have transitioned to a new page and have the Frame/Page available, go ahead and explicitly + focus the frame in WebCore and update our focused state. This change allows us to remove the updateFocusedActive timer and the + code from viewDidMoveToWindow. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView close]): + (-[WebHTMLView addWindowObservers]): + (-[WebHTMLView viewWillMoveToWindow:]): + (-[WebHTMLView viewDidMoveToWindow]): + (-[WebHTMLView _removeWindowObservers]): + Remove all the updateFocusedActiveState timer code, since it no longer exists. + + (-[WebHTMLView windowDidBecomeKey:]): + (-[WebHTMLView windowDidResignKey:]): + Active state updating is no longer done by WebHTMLViews. It is handled by the WebView instead. + + (-[WebHTMLView becomeFirstResponder]): + (-[WebHTMLView resignFirstResponder]): + Reworking of WebHTMLView's code for gaining/losing responder status. No longer update active state here, since the active state + can never change just because of responder changes. Make sure that the focused frame gets updated properly (and most importantly + actually cleared when a WebHTMLView resigns responder status). + + * WebView/WebHTMLViewInternal.h: + * WebView/WebHTMLViewPrivate.h: + State updating for focused and active states has been made independent. + + * WebView/WebView.mm: + (-[WebView _updateActiveState]): + WebView now handles updating of active state in _updateActiveState. It is now purely based off whether the window is key and nothing + else. + + (-[WebView addWindowObserversForWindow:]): + (-[WebView removeWindowObservers]): + Start listening for the window becoming/losing key even in the usesDocumentViews case. + + (-[WebView _updateFocusedStateForFrame:]): + Focused state updating is split into its own method now and called when WebHTMLViews gain and lose responder status. + + (-[WebView _windowDidBecomeKey:]): + (-[WebView _windowDidResignKey:]): + Make sure to call _updateActiveState as the window gains/loses key. + + (-[WebView _windowWillOrderOnScreen:]): + Run this code now that WebHTMLView no longer does it. + + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + Updating for the split of focused and active state updating into separate methods. + +2009-06-04 Mark Rowe <mrowe@apple.com> + + Speculative Tiger build fix. + + * WebView/WebDelegateImplementationCaching.h: + +2009-06-03 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Move delegate implementation caching logic into its own files. + + * WebView/WebDelegateImplementationCaching.h: Copied from mac/WebView/WebViewInternal.h. + * WebView/WebDelegateImplementationCaching.mm: Copied from mac/WebView/WebView.mm. + (WebViewGetResourceLoadDelegateImplementations): + (WebViewGetFrameLoadDelegateImplementations): + (WebViewGetScriptDebugDelegateImplementations): + * WebView/WebView.mm: + * WebView/WebViewInternal.h: + +2009-06-03 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Move WebViewPrivate structure to WebViewInternal.h/mm. + + * WebView/WebView.mm: + * WebView/WebViewInternal.h: + * WebView/WebViewInternal.mm: Added. + (+[WebViewPrivate initialize]): + (-[WebViewPrivate init]): + (-[WebViewPrivate dealloc]): + (-[WebViewPrivate finalize]): + +2009-06-03 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Small cleanup in WebView. + - Move global data initialization to WebView's initialization method. + - Move _clearViewUpdateRunLoopObserver from WebViewPrivate to WebView (FileInternal) + + * WebView/WebView.mm: + (-[WebViewPrivate init]): Remove global initializers. + (-[WebViewPrivate dealloc]): Cleanup whitespace. + (-[WebViewPrivate finalize]): Ditto. + (-[WebView _close]): Call [self _clearViewUpdateRunLoopObserver] instead of + [_private _clearViewUpdateRunLoopObserver] + (+[WebView initialize]): Move global initializers here. + (-[WebView _clearViewUpdateRunLoopObserver]): Moved from WebViewPrivate. + (viewUpdateRunLoopObserverCallBack): Call [self _clearViewUpdateRunLoopObserver] + instead of [_private _clearViewUpdateRunLoopObserver] + +2009-06-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + - WebKit part of eliminating WebCoreTextRenderer + + * Misc/WebKitNSStringExtras.m: + (webkit_CGCeiling): Added. + (-[NSString _web_drawAtPoint:font:textColor:]): Replaced the malloc()ed + string buffer with a Vector. Moved code from + WebCoreDrawTextAtPoint() to here. + (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]): + (-[NSString _web_widthWithFont:]): Replaced the malloc()ed string buffer + with a Vector. Moved code from WebCoreTextFloatWidth() to here. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _addToStyle:fontA:fontB:]): Replaced call to + WebCoreFindFont() with use of + +[WebFontCache fontWithFamily:traits:weight:size:]. + * WebView/WebView.mm: + (+[WebView _setAlwaysUsesComplexTextCodePath:]): Changed to call + Font::setCodePath() directly. + (+[WebView _setShouldUseFontSmoothing:]): Changed to call + Font::setShouldUseSmoothing(). + (+[WebView _shouldUseFontSmoothing]): Changed to call + Font::shouldUseSmoothing(). + +2009-06-03 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + - remove a private method that was used only by Safari 3.0. + + * WebView/WebView.mm: Removed +_minimumRequiredSafariBuildNumber. + * WebView/WebViewPrivate.h: Ditto. + +2009-06-03 Dan Bernstein <mitz@apple.com> + + - build fix + + * WebView/WebHTMLView.mm: + +2009-06-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + - build fix + + * WebView/WebHTMLView.mm: + * WebView/WebView.mm: + +2009-06-02 Darin Adler <darin@apple.com> + + Reviewed by David Hyatt. + + Bug 26112: viewless WebKit -- make events work + https://bugs.webkit.org/show_bug.cgi?id=26112 + + One change here is to make the -[WebFrame frameView] function assert if ever called + in viewless mode, and fix many callers that would trip that assertion. + + A major change is to put some methods and data in WebView that are currently in + WebHTMLView, used only in viewless mode. A next step will be to use the WebView + methods whenever possible, even when not in the viewless mode. + + Also fix FrameView to do normal reference counting instead of a strange model with + an explicit deref near creation time. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::scrollRectIntoView): Add code to start in the appropriate place + when dealing with viewless mode. This gets triggered when visiting the Google home page. + (WebChromeClient::setToolTip): Changed to call WebView instead of WebHTMLView. + (WebChromeClient::print): Changed to use a new selector that doesn't require a + WebFrameView if present. Also don't even try to use the old selector in viewless mode. + + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::respondToChangedSelection): Changed to call WebView instead of WebHTMLView. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Added more code paths for + viewless mode to skip things we can't do in that mode, with appropriate FIXME. + Use Frame::create and RefPtr and eliminate the strange reference counting of FrameView. + + * WebView/WebDataSource.mm: + (-[WebDataSource _receivedData:]): Added a _usesDocumentViews guard around code that's + specific to document views. + + * WebView/WebFrame.mm: + (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Added a _usesDocumentViews + guard around code that's specific to document views. + (-[WebFrame _hasSelection]): Added an implementation for viewless mode. + (-[WebFrame _clearSelection]): Assert we're not in viewless mode; it doesn't really + make sense to clear the selection in only one frame in viewless mode. Later we can + decide what to do. + (-[WebFrame _dragSourceMovedTo:]): Assert we're not in viewless mode; the dragging + code for viewless mode shouldn't have to involve the WebFrame object at all. + (-[WebFrame _dragSourceEndedAt:operation:]): Ditto. + (-[WebFrame frameView]): Assert we're not in viewless mode. This assertion fires + often, but it's a great pointer to code that needs to be changed. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView hitTest:]): Tweaked a comment. + (-[WebHTMLView _updateMouseoverWithEvent:]): Fixed a bug where the fake event for + moving the mouse out of the old view ended up overwriting the event for moving + the mouse within the new view. + (-[WebHTMLView mouseDown:]): Got rid of explicit conversion of event to + PlatformMouseEvent in call to sendContextMenuEvent; that's no longer possible + without passing another argument, and it's now handled in EventHandler. + + * WebView/WebTextCompletionController.h: Copied from WebKit/mac/WebView/WebHTMLView.mm. + Removed everything except for the WebTextCompletionController class. + * WebView/WebTextCompletionController.mm: Copied from WebKit/mac/WebView/WebHTMLView.mm. + Ditto. + + * WebView/WebUIDelegatePrivate.h: Added webView:printFrame: method. + + * WebView/WebView.mm: Moved includes and fields in from WebHTMLView. + (-[WebView _usesDocumentViews]): Updated for name change from useDocumentViews + to usesDocumentViews. + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Ditto. + (-[WebView drawSingleRect:]): Ditto. + (-[WebView isFlipped]): Ditto. + (-[WebView setFrameSize:]): Ditto. Also changed to use _mainCoreFrame method. + (-[WebView _viewWillDrawInternal]): Ditto. + (-[WebView viewWillDraw]): Ditto. + (-[WebView drawRect:]): Ditto. + (-[WebView _close]): Added code to nil out the lastMouseoverView global. + (-[WebView _dashboardRegions]): Use _mainCoreFrame. + (-[WebView setProhibitsMainFrameScrolling:]): Ditto. + (-[WebView _setInViewSourceMode:]): Ditto. + (-[WebView _inViewSourceMode]): Ditto. + (-[WebView _attachScriptDebuggerToAllFrames]): Ditto. + (-[WebView _detachScriptDebuggerFromAllFrames]): Ditto. + (-[WebView textIteratorForRect:]): Ditto. + (-[WebView _executeCoreCommandByName:value:]): Ditto. + (-[WebView addWindowObserversForWindow:]): Ditto. + (-[WebView removeWindowObservers]): Ditto. + (-[WebView _updateFocusedAndActiveState]): Ditto. + (-[WebView _updateFocusedAndActiveStateForFrame:]): Turned into a class method. + Added code to handle the viewless case without calling frameView. + (-[WebView _windowDidBecomeKey:]): Updated for name change from useDocumentViews + to usesDocumentViews. + (-[WebView _windowDidResignKey:]): Ditto. + (-[WebView _windowWillOrderOnScreen:]): Ditto. + (-[WebView mainFrame]): Tweaked. + (-[WebView selectedFrame]): Added a conditional to avoid trying to get at the + frame view in viewless case. + (-[WebView _setZoomMultiplier:isTextOnly:]): Use _mainCoreFrame. + (-[WebView setCustomTextEncodingName:]): Ditto. + (-[WebView windowScriptObject]): Ditto. + (-[WebView setHostWindow:]): Ditto. Also put some code that's needed only for + document views inside _private->usesDocumentViews. + (-[WebView _hitTest:dragTypes:]): Tweaked. + (-[WebView acceptsFirstResponder]): Added case for viewless mode along with a + FIXME, since it's not complete. + (-[WebView becomeFirstResponder]): Ditto. + (-[WebView _webcore_effectiveFirstResponder]): Put the body of this inside + a usesDocumentView check, because we don't need the first responder forwarding + in viewless mode. + (-[WebView setNextKeyView:]): Ditto. + (-[WebView mouseDown:]): Added. Copied from WebHTMLView. FIXME in here suggests + that we make WebHTMLView share this one soon, which I think is practical. + (-[WebView mouseUp:]): Ditto. + (-[WebView setHoverFeedbackSuspended:]): Added a code path for viewless mode. + (-[WebView shouldClose]): Use _mainCoreFrame. + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto. + (-[WebView setEditable:]): Ditto. + (-[WebView _frameViewAtWindowPoint:]): Added an assertion that we're not in + viewless mode since this method makes no sense in that mode. + (-[WebView _setMouseDownEvent:]): Added. Copied from WebHTMLView. I plan to + eliminate the one in WebHTMLView soon. + (-[WebView _cancelUpdateMouseoverTimer]): Ditto. + (-[WebView _stopAutoscrollTimer]): Ditto. + (+[WebView _updateMouseoverWithEvent:]): Ditto. + (-[WebView _updateMouseoverWithFakeEvent]): Ditto. + (-[WebView _setToolTip:]): Added. Calls through to the WebHTMLView version. + (-[WebView _selectionChanged]): Ditto. + (-[WebView _mainCoreFrame]): Added. + (-[WebView _needsOneShotDrawingSynchronization]): Moved into the WebInternal + category. + (-[WebView _setNeedsOneShotDrawingSynchronization:]): Ditto. + (-[WebView _startedAcceleratedCompositingForFrame:]): Ditto. + (-[WebView _stoppedAcceleratedCompositingForFrame:]): Ditto. + (viewUpdateRunLoopObserverCallBack): Ditto. + (-[WebView _scheduleViewUpdate]): Ditto. + + * WebView/WebViewInternal.h: Made most of the file not compile at all when + included from non-C++ source files, elminating some excess declarations and + typedefs. Moved more methods into the real internal category. Added new + methods _setMouseDownEvent, _cancelUpdateMouseoverTimer, _stopAutoscrollTimer, + _updateMouseoverWithFakeEvent, _selectionChanged, and _setToolTip:. + +2009-06-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds. + + * Configurations/Base.xcconfig: + +2009-06-01 Darin Adler <darin@apple.com> + + * WebView/WebTextCompletionController.mm: Fix Tiger build by adding import + of WebTypesInternal.h. + +2009-06-01 Darin Adler <darin@apple.com> + + Reviewed by Maciej Stachowiak. + + Bug 26113: break WebTextCompletionController out into its own source file + https://bugs.webkit.org/show_bug.cgi?id=26113 + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate dealloc]): Updated for new name. + (-[WebHTMLViewPrivate clear]): Ditto. + (-[WebHTMLView _frameOrBoundsChanged]): Ditto. + (-[WebHTMLView menuForEvent:]): Ditto. + (-[WebHTMLView windowDidResignKey:]): Ditto. + (-[WebHTMLView windowWillClose:]): Ditto. + (-[WebHTMLView mouseDown:]): Ditto. + (-[WebHTMLView resignFirstResponder]): Ditto. + (-[WebHTMLView keyDown:]): Ditto. + (-[WebHTMLView complete:]): Ditto. Also pass WebView to init method. + (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Ditto. + + * WebView/WebTextCompletionController.h: Copied from mac/WebView/WebHTMLView.mm. + * WebView/WebTextCompletionController.mm: Copied from mac/WebView/WebHTMLView.mm. + Changed initializer to pass in a spearate WebView and WebHTMLView, to smooth the + way for handling viewless mode properly in the future. + +2009-05-30 David Kilzer <ddkilzer@apple.com> + + Add JSLock to -[WebScriptCallFrame scopeChain] + + Reviewed by Darin Adler. + + In Debug builds of WebKit, Dashcode launching MobileSafari could + cause the ASSERT(JSLock::lockCount() > 0) assertion to fire in + JSC::Heap::heapAllocate() because the JSLock wasn't taken. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): Take JSLock before calling + into JavaScriptCore. + +2009-05-28 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dan Bernstein. + + Build fix. Move off a deprecated NSFileManager method. + + * Misc/WebNSFileManagerExtras.h: + * Misc/WebNSFileManagerExtras.m: + (-[NSFileManager destinationOfSymbolicLinkAtPath:error:]): Implement a new-in-Leopard method for Tiger to use. + (-[NSFileManager attributesOfItemAtPath:error:]): Ditto. + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _initWithPath:]): Use the new non-deprecated methods. + +2009-05-28 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Added new build flag --filters. More details in WebCore/ChangeLog. + + * Configurations/FeatureDefines.xcconfig: + +2009-05-27 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=26009 + <rdar://problem/6925656> REGRESSION (r43973): Problems While Working With OpenVanilla + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateSelectionForInputManager]): Don't call updateWindows if the selection + is None. This routinely happens during editing, and it doesn't mean that we left an editable + area (in which case the selection changes to a non-editable one). + +2009-05-26 Sam Weinig <sam@webkit.org> + + Reviewed by Brady Eidson. + + Fix for <rdar://problem/6916371> + iWeb 'Announce' button does nothing after publishing to MobileMe + + Add linked-on-or-after check to allow older WebKit apps to use the + old behavior of sniffing everything (including file: urls) + + * Misc/WebKitVersionChecks.h: + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2009-05-26 Stephanie Lewis <slewis@apple.com> + + Reviewed by Ada Chan and Oliver Hunt. + + Remove WebView observers in during fast teardown. + <rdar://problem/6922619> REGRESSION (Tiger-only?): After restoring windows from the previous session, a crash occurs while attempting to quit Safari + + * WebView/WebView.mm: + (-[WebView _closeWithFastTeardown]): + +2009-05-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6901751> + REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com + + Remove WKCGContextIsSafeToClip. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2009-05-26 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first + character with an umlaut, circumflex, or accent in Mail or in a wiki + + * WebView/WebHTMLView.mm: + (isTextInput): Moved here. + (isInPasswordField): Moved here. + (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext + flag and let NSApplication update the input manager with the new input + context if necessary. + (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the + NSApp global instead of +[NSApplication sharedApplication]. + +2009-05-26 Mark Rowe <mrowe@apple.com> + + Fix the Tiger build. + + * Misc/WebNSObjectExtras.mm: + (-[NSInvocation _webkit_invokeAndHandleException:]): Rename the local variable so that + it doesn't conflict with a member variable on Tiger. + +2009-05-26 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/6921835> REGRESSION (r44115): Crash in Leopard Mail viewing message + + Fix case where we autorelease an object on the main thread that we are returning + to another thread when using our _webkit_invokeOnMainThread method. + + * Misc/WebNSObjectExtras.mm: + (returnTypeIsObject): Added. + (-[WebMainThreadInvoker forwardInvocation:]): Autorelease the object on the calling + thread, balancing a retain done on the main thread. + (-[NSInvocation _webkit_invokeAndHandleException:]): Retain the object on the main + thread. + +2009-05-26 David Hyatt <hyatt@apple.com> + + Back out the workaround for Mail crashing. Darin is working on the real fix. + + * Misc/WebNSObjectExtras.mm: + (-[WebMainThreadInvoker forwardInvocation:]): + +2009-05-26 David Hyatt <hyatt@apple.com> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=25969. + + Stop using notifications for boundsChanged, since the notifications are being sent too late. + Since subviews get resized before parents do, the notification comes in telling the WebHTMLView + that its size has changed *before* we've done setNeedsLayout in the WebView size change callback. + + Become more like the Windows platform and just do the bounds changed immediately as our size is + being altered by subclassing setFrameSize in WebView. + + Also patch WebDynamicScrollbarsView to detect the case where neither axis is really spilling out + past the viewport, so that in shrinking situations we figure out that we don't need scrollbars + any more. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): + * WebView/WebView.mm: + (-[WebView _boundsChangedToNewSize:]): + (-[WebView setFrameSize:]): + (-[WebView viewWillMoveToWindow:]): + (-[WebView viewDidMoveToWindow]): + +2009-05-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + - WebKit side of <rdar://problem/6914001>. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::didCreateWindow): + Iterate over all plug-in hosts. If one is in full-screen mode, make sure to activate the + WebKit app instead. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::isMenuBarVisible): + Add getter. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + Add allowPopups flag. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::allowPopups): + (WebKit::NetscapePluginInstanceProxy::loadURL): + (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): + (WebKit::NetscapePluginInstanceProxy::loadRequest): + (WebKit::NetscapePluginInstanceProxy::evaluate): + Use "allowPopups" instead of "userGesture". + + * Plugins/Hosted/WebKitPluginClient.defs: + Add allowPopups argument to Evaluate. + + * Plugins/Hosted/WebKitPluginHostTypes.h: + Use "allowPopups" instead of "userGesture". + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::createWindow): + Call didCreateWindow here. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchCreatePage): + Ditto. + +2009-05-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + - Fix <rdar://problem/6915849>. + + Release the placeholder window after -[NSApplication runModalForWindow] returns. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::beginModal): + (WebKit::NetscapePluginHostProxy::endModal): + +2009-05-24 Dan Bernstein <mitz@apple.com> + + - revert an accidental change from r43964. + + * WebView/WebView.mm: + (+[WebView _setShouldUseFontSmoothing:]): + +2009-05-24 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein and Tim Hatcher. + + <rdar://problem/6913045> New console message spewed by automator CLI after installing JetstreamLeo40B21a + + * Misc/WebNSObjectExtras.mm: + (-[WebMainThreadInvoker initWithTarget:]): Tweaked argument name. + (-[WebMainThreadInvoker forwardInvocation:]): Removed call to retainArguments. + This was unneeded and in the case of a newly created but not yet fully initialized + NSView object it caused the abovementioned bug. + (-[WebMainThreadInvoker handleException:]): Tweaked argument name. Added assertion. + (-[NSInvocation _webkit_invokeAndHandleException:]): Tweaked name of local variable + that holds the exception. + +2009-05-23 David Kilzer <ddkilzer@apple.com> + + Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr + + <https://bugs.webkit.org/show_bug.cgi?id=25495> + + Reviewed by Oliver Hunt. + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Return + 0 instead of an empty auto_ptr<>. + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): Use + OwnPtr<> instead of auto_ptr<> for stack variable. + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<> + instead of a raw HTMLParserQuirks pointer. + +2009-05-23 David Kilzer <ddkilzer@apple.com> + + Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr + + <https://bugs.webkit.org/show_bug.cgi?id=25495> + + Reviewed by Oliver Hunt. + + * ForwardingHeaders/wtf/OwnPtrCommon.h: Added. + * ForwardingHeaders/wtf/PassOwnPtr.h: Added. + +2009-05-22 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - Fix <rdar://problem/6913765> REGRESSION (r42331-r42334): Extra scroll + bars appearing on Welcome panels of iLife '09 apps + + * WebView/WebView.mm: + (needsUnwantedScrollBarWorkaround): Added. Checks if this is a panel + where scroll bars are unwanted. For safety, limited to only Apple applications. + (-[WebView viewDidMoveToWindow]): If the workaround is needed, disallow + scrolling the main frame. This prevents scroll bars from appearing. + +2009-05-22 Adam Barth <abarth@webkit.org> + + Reviewed by Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=25955 + + Remove the policyBaseURL parameter from setCookie. This parameter is + redudant with the document parameter. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::setCookies): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView setVariable:forURL:value:length:]): + +2009-05-21 Darin Fisher <darin@chromium.org> + + Fix-up coding style. + + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord): + +2009-05-20 Siddhartha Chattopadhyaya <sidchat@google.com> + + Reviewed by Justin Garcia. + + Add automatic spell correction support in WebKit + + https://bugs.webkit.org/show_bug.cgi?id=24953 + + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord): + +2009-05-21 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/6907542> REGRESSION (r43143): Hang in RenderLineBoxList::dirtyLinesFromChangedChild + when clicking link to load Flash animation (http://www.roambi.com) + + * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection): + Don't call -[NSApplication updateWindows] here, WebHTMLView can take care of this. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView inputContext]): Use a precomputed boolean stored in WebHTMLViewPrivate, as + calling isTextInput() is not always safe. + (-[WebHTMLView textStorage]): Ditto. + (-[WebHTMLView _updateSelectionForInputManager]): Update _private->exposeInputContext when + selection changes, and let AppKit update its cache if necessary. + +2009-05-21 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/5579292> REGRESSION (2-3): "Default default" encoding for Korean changed + from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites + + * WebView/WebPreferences.mm: + (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Update the existing fix + for the changed result of CFStringConvertEncodingToIANACharSetName(). + +2009-05-21 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/6883758> REGRESSION (r43143): First character typed with input method does + not go into inline hole (seen with Chinese & Kotoeri on top Chinese website www.baidu.com) + + * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection): + Call -[NSApplication updateWindows] to make AppKit re-fetch the input context when selection + changes. Since we use SelectionController to check whether the view is editable, it is + important not to re-fetch the context too early, e.g. from a focus changed notification. + +2009-05-21 Eric Seidel <eric@webkit.org> + + Reviewed by Alexey Proskuryakov. + + Rename DragController::dragOperation() to sourceDragOperation() for clarity + + * WebView/WebHTMLView.mm: + (-[WebHTMLView draggingSourceOperationMaskForLocal:]): + +2009-05-21 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + - WebKit part of <rdar://problem/6901751> REGRESSION (r35515): Tiger + crash painting the selection on registration page of car2go.com + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Added CGContextIsSafeToClip. + +2009-05-20 Stephanie Lewis <slewis@apple.com> + + Update the order files. <rdar://problem/6881750> Generate new order files. + + * WebKit.order: + +2009-05-20 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk + + * History/WebHistory.mm: + (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil. + +2009-05-20 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler and Kevin Decker. + + WebKit side of <rdar://problem/6895072> + + Pass the localization as a launch property. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): + +2009-05-20 Dan Bernstein <mitz@apple.com> + + - fix the build after r43918 + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::setCursor): + +2009-05-20 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/4023899> Shift-Tab skips key views in toolbar in Safari, although Tab + iterates through them properly + + * WebView/WebView.mm: + (-[WebView previousValidKeyView]): Work around a bug in -[NSView previousValidKeyView]. + +2009-05-19 Timothy Hatcher <timothy@apple.com> + + Add a new private API method that will dispatch pending loads that have been scheduled + because of recent DOM additions or style changes. + + <rdar://problem/6889218> REGRESSION: Some iChat transcript resources are not + loaded because willSendRequest doesn't happen immediately + + Reviewed by Antti Koivisto. + + * WebView/WebView.mm: + (-[WebView _dispatchPendingLoadRequests]): Call Loader::servePendingRequests(). + * WebView/WebViewPrivate.h: Added _dispatchPendingLoadRequests. + +2009-05-18 Sam Weinig <sam@webkit.org> + + <rdar://problem/6899044> Can't see Apple ad on nytimes.com unless I spoof the user agent + + Add user agent hack for pointroll.com. + + Reviewed by Steve Falkenburg. + + * WebView/WebView.mm: + (-[WebView WebCore::_userAgentForURL:WebCore::]): + +2009-05-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig and Dan Bernstein. + + Fix <rdar://problem/6889644> + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): + +2009-05-16 Dan Bernstein <mitz@apple.com> + + - revert an accidental change from r43802. + + * WebInspector/WebInspector.mm: + +2009-05-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6895347> Mouse wheeling in the QuickTime plug-in (incorrectly) scrolls the page + + Fix logic. The plug-in returns true if it handled the event. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + +2009-05-16 Dan Bernstein <mitz@apple.com> + + Reviewed by Alexey Proskuryakov. + + - fix <rdar://problem/6873305> Two distinct characters are not displayed + correctly with 2 of the font selections from the stickies widget + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _plainTextFromPasteboard:]): Return precomposed text. + This is consistent with + -_documentFragmentFromPasteboard:forType:inContext:subresources:. + +2009-05-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Fix <rdar://problem/6875398>. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its + NPP_New callback are destroyed. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + Make cleanup() public. + +2009-05-15 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/6889823> hash table iterator used after hash table modified in + ProxyInstance::fieldNamed() when viewing movie trailer + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call. + Anders says that by the time we return someone else might have done the same add + for us. + (WebKit::ProxyInstance::fieldNamed): Ditto. + +2009-05-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6892055> + Replace WKN_GetLocation with WKN_ResolveURL (WKN_GetLocation was confusing and did not take the base URL into account) + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCResolveURL): + New MIG callback. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::resolveURL): + Use FrameLoader::complete URL here. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add new MIG definition. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]): + * Plugins/WebNetscapeContainerCheckPrivate.h: + * Plugins/WebNetscapeContainerCheckPrivate.mm: + (browserContainerCheckFuncs): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView resolveURL:forTarget:]): + * Plugins/npapi.mm: + (WKN_ResolveURL): + +2009-05-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix <rdar://problem/6892052> WebTextIterator should not “emit + characters between all visible positions” + + * WebView/WebTextIterator.mm: + (-[WebTextIterator initWithRange:]): Changed to construct a TextIterator + with emitCharactersBetweenAllVisiblePositions set to false. + +2009-05-15 Mark Rowe <mrowe@apple.com> + + Reviewed by Dave Kilzer. + + Look for libWebKitSystemInterface.a in a more reasonable location. + + * Configurations/DebugRelease.xcconfig: + +2009-05-14 David Hyatt <hyatt@apple.com> + + Reviewed by Tim Hatcher. + + Fix for <rdar://problem/6886217> REGRESSION (S4 beta-ToT): Adium chat window contents no longer resize. + + Technically this is a bug in Adium. It appears that Adium has subclassed the WebView and implemented + viewDidMoveToWindow in its subclass improperly. It doesn't call up to the base class WebView like it + should and so our boundsChanged notification never gets added. + + Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into + viewWillMoveToWindow instead. + + * WebView/WebView.mm: + (-[WebView addSizeObserversForWindow:]): + (-[WebView removeWindowObservers]): + (-[WebView addWindowObserversForWindow:]): + (-[WebView viewWillMoveToWindow:]): + (-[WebView viewDidMoveToWindow]): + (-[WebView viewDidMoveToSuperview]): + +2009-05-14 David Levin <levin@chromium.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=24704 + + Allow the local cache directory to be set using a defaults key. + + * Misc/WebKitNSStringExtras.h: + * Misc/WebKitNSStringExtras.m: + (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]): + * WebKit.exp: + +2009-05-14 Darin Adler <darin@apple.com> + + Reviewed by Adam Roben. + + <rdar://problem/6879999> Automator actions that use WebKit on a background thread fail when run outside of Automator + + * WebView/WebView.mm: + (clientNeedsWebViewInitThreadWorkaround): Added. Contains new broader rule. + (needsWebViewInitThreadWorkaround): Changed to call clientNeedsWebViewInitThreadWorkaround. + +2009-05-14 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + Bug 24049: Second right-click crashes safari when alert invoked + https://bugs.webkit.org/show_bug.cgi?id=24049 + rdar://problem/6878977 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView rightMouseUp:]): Added a retain/autorelease of the event. + (-[WebHTMLView menuForEvent:]): Ditto. Also cleaned up the logic here and + eliminated some use of pointers that might be invalid after calling through + to WebCore. + (-[WebHTMLView scrollWheel:]): Ditto. + (-[WebHTMLView acceptsFirstMouse:]): Ditto. + (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Ditto. + (-[WebHTMLView mouseDown:]): Ditto. + (-[WebHTMLView mouseDragged:]): Ditto. + (-[WebHTMLView mouseUp:]): Ditto. + (-[WebHTMLView keyDown:]): Ditto. + (-[WebHTMLView keyUp:]): Ditto. + (-[WebHTMLView flagsChanged:]): Ditto. + (-[WebHTMLView performKeyEquivalent:]): Ditto. + +2009-05-14 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Darin Adler. + + <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2 + + The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode. + Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR + if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not. + + * Configurations/Base.xcconfig: + +2009-05-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebKit side of <rdar://problem/6884476>. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetLocation): + Forward this to the plug-in instance proxy. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getLocation): + Ask the plug-in view for the location. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add MIG definition. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView locationStringForTarget:]): + Return the URL for a given frame. + + * Plugins/WebNetscapeContainerCheckPrivate.h: + Bump version. Add new declaration to the vtable. + + * Plugins/WebNetscapeContainerCheckPrivate.mm: + (browserContainerCheckFuncs): + Add new declaration to the vtable. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView locationForTarget:]): + Call the base class method. + + * Plugins/npapi.mm: + (WKN_GetLocation): + Forward this to the plug-in view. + +2009-05-13 Douglas R. Davidson <ddavidso@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6871587> Smart Copy/Paste setting should persist as continuous + spell checking setting does + + * WebView/WebPreferenceKeysPrivate.h: Added WebSmartInsertDeleteEnabled. + + * WebView/WebView.mm: + (-[WebViewPrivate init]): Initialize based on WebSmartInsertDeleteEnabled + default. + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + Removed code that initialized here. + (-[WebView setSmartInsertDeleteEnabled:]): Set default here was with + continuous spell checking setting. + +2009-05-13 Darin Adler <darin@apple.com> + + Revert the parser arena change. It was a slowdown, not a speedup. + Better luck next time (I'll break it up into pieces). + +2009-05-13 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + Bug 25674: syntax tree nodes should use arena allocation + https://bugs.webkit.org/show_bug.cgi?id=25674 + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes. + New ones needed due to reducing includes of JSDOMBinding.h. + * WebView/WebScriptDebugger.mm: Ditto. + +2009-05-13 Douglas R. Davidson <ddavidso@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6879145> + Generate a contextual menu item allowing autocorrections to + easily be changed back. Refrain from re-correcting items + that have already been autocorrected once. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory contextMenuItemTagChangeBack:]): + * WebView/WebUIDelegatePrivate.h: + +2009-05-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Fix <rdar://problem/6878105>. + + When instantiating the QT plug-in under Dashboard, force "kiosk mode". + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): + +2009-05-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - declare a forgotten method + + * DOM/WebDOMOperationsPrivate.h: Declare -[DOMNode markupString] in the + WebDOMNodeOperationsPendingPublic category. + +2009-05-10 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Dan Bernstein. + + <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page + + * Misc/WebDownload.m: Removed. + * Misc/WebDownload.mm: Copied from WebKit/mac/Misc/WebDownload.m. + (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Try to use + credentials from WebCore storage. + +2009-05-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Not reviewed. Fix clean builds, forgot to land name() -> formControlName() rename patch in WebKit. Only landed the WebCore side. + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation elementWithName:inForm:]): + +2009-05-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + - Fix <rdar://problem/6866712>. + + Instead of just caching whether a plug-in object _has_ a field or method, also add an entry to the cache + if it _doesn't_ have a certain field or method. This way we have to make fewer calls to the plug-in host. + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::methodsNamed): + (WebKit::ProxyInstance::fieldNamed): + +2009-05-08 Douglas R. Davidson <ddavidso@apple.com> + + Reviewed by Darin Adler. + + Fixes for <rdar://problem/6852771>. + Disable text checking menu items if view is not editable. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView smartInsertDeleteEnabled]): + (-[WebHTMLView setSmartInsertDeleteEnabled:]): + (-[WebHTMLView toggleSmartInsertDelete:]): + * WebView/WebHTMLViewInternal.h: + +2009-05-08 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Maciej Stachowiak. + + <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials + + * Plugins/WebBaseNetscapePluginView.mm: (WebKit::getAuthenticationInfo): Ask WebCore for + credentials first (but also ask NSURLCredentialStorage, because WebCore won't know about + permanent credentials). + +2009-05-05 Ben Murdoch <benm@google.com> + + Reviewed by Eric Seidel. + + Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds. + https://bugs.webkit.org/show_bug.cgi?id=24776 + + * Storage/WebDatabaseManager.mm: + * Storage/WebDatabaseManagerInternal.h: + * Storage/WebDatabaseManagerPrivate.h: + * Storage/WebDatabaseTrackerClient.h: + * Storage/WebDatabaseTrackerClient.mm: + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin usage]): + (-[WebSecurityOrigin quota]): + (-[WebSecurityOrigin setQuota:]): + * Storage/WebSecurityOriginPrivate.h: + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + +2009-05-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Fix <rdar://problem/6797644>. + + Make sure to send a reply even when an instance proxy can't be found. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCInvoke): + (WKPCInvokeDefault): + (WKPCGetProperty): + (WKPCHasProperty): + (WKPCHasMethod): + (WKPCEnumerate): + +2009-05-04 Darin Adler <darin@apple.com> + + Reviewed by Eric Seidel. + + Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h, + and NamedMappedAttrMap.h include of MappedAttribute.h + https://bugs.webkit.org/show_bug.cgi?id=24924 + + * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h + and ScriptValue.h. + +2009-05-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Simplified null-ish JSValues. + + Replaced calls to noValue() with calls to JSValue() (which is what + noValue() returned). Removed noValue(). + + Removed "JSValue()" initialiazers, since default construction happens... + by default. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + +2009-05-02 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Dan Bernstein. + + <rdar://problem/6741615> REGRESSION (r38629): Shortcut "Flag/Junk" in MobileMe does not work + when Kotoeri is used. + + * WebView/WebHTMLView.mm: (-[WebHTMLView inputContext]): Return a nil input context when + focus is not in editable content. + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Rubber Stamped by Sam Weinig. + + Renamed JSValuePtr => JSValue. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + (WebKit::NetscapePluginInstanceProxy::marshalValue): + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + (WebKit::NetscapePluginInstanceProxy::demarshalValue): + (WebKit::NetscapePluginInstanceProxy::demarshalValues): + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyField::valueFromInstance): + (WebKit::ProxyField::setValueToInstance): + (WebKit::ProxyInstance::invoke): + (WebKit::ProxyInstance::invokeMethod): + (WebKit::ProxyInstance::invokeDefaultMethod): + (WebKit::ProxyInstance::invokeConstruct): + (WebKit::ProxyInstance::defaultValue): + (WebKit::ProxyInstance::stringValue): + (WebKit::ProxyInstance::numberValue): + (WebKit::ProxyInstance::booleanValue): + (WebKit::ProxyInstance::valueOf): + (WebKit::ProxyInstance::fieldValue): + (WebKit::ProxyInstance::setFieldValue): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _convertValueToObjcValue:]): + (-[WebScriptCallFrame exception]): + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (aeDescFromJSValue): + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2009-05-01 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Timothy Hatcher. + + Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest. + + https://bugs.webkit.org/show_bug.cgi?id=25347 + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest): + +2009-04-30 David Kilzer <ddkilzer@apple.com> + + Provide a mechanism to create a quirks delegate for HTMLParser + + Reviewed by David Hyatt. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::createHTMLParserQuirks): Added. The default + implementation of this factory method returns 0. + +2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Timothy Hatcher. + + https://bugs.webkit.org/show_bug.cgi?id=25470 + Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. + + * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define. + +2009-04-30 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlson. + + <rdar://problem/6823049> + + Fix an issue where some plug-ins would cause the application icon to constantly bounce + up and down in the Dock. + + * Plugins/Hosted/NetscapePluginHostProxy.h: Change m_placeholderWindow ivar to be + a subclass of NSWindow, WebPlaceholderModalWindow. + * Plugins/Hosted/NetscapePluginHostProxy.mm: Added WebPlaceholderModalWindow NSWindow subclass. + (-[WebPlaceholderModalWindow _wantsUserAttention]): Prevent NSApp from calling requestUserAttention: + when the window is shown modally, even if the app is inactive. + (WebKit::NetscapePluginHostProxy::beginModal): NSWindow -> WebPlaceholderModalWindow. + +2009-04-30 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Dimitri Glazkov. + + https://bugs.webkit.org/show_bug.cgi?id=25342 + Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::addMessageToConsole): + +2009-04-29 Mark Rowe <mrowe@apple.com> + + More build fixing after r43037. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::demarshalValues): + +2009-04-29 Dan Bernstein <mitz@apple.com> + + Reviewed by Simon Fraser. + + - WebKit part of <rdar://problem/6609509> Select All and then Delete + should put Mail editing back into the same state as a new message + + * WebView/WebView.mm: + (-[WebView _selectionIsCaret]): Added. + (-[WebView _selectionIsAll]): Added. Returns whether the selection + encompasses the entire document. + * WebView/WebViewPrivate.h: + +2009-04-29 Douglas Davidson <ddavidso@apple.com> + + Reviewed by Justin Garcia. + + <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView orderFrontSubstitutionsPanel:]): + * WebView/WebView.mm: + (-[WebView validateUserInterfaceItemWithoutDelegate:]): + +2009-04-29 David Hyatt <hyatt@apple.com> + + Reviewed by Dan Bernstein. + + Fix a bug in the bounds checking for setNeedsLayout dirtying when a WebView's size changes. The superview + of the WebView was being incorrectly checked instead of the WebView itself. + + * WebView/WebView.mm: + (-[WebView _boundsChanged]): + +2009-04-29 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlson. + + Allow WKN_CheckIfAllowedToLoadURL() to take an optional void* context parameter. + + * Plugins/WebNetscapeContainerCheckContextInfo.h: + * Plugins/WebNetscapeContainerCheckContextInfo.mm: + (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]): + (-[WebNetscapeContainerCheckContextInfo callback]): + (-[WebNetscapeContainerCheckContextInfo context]): + * Plugins/WebNetscapeContainerCheckPrivate.h: + * Plugins/WebNetscapeContainerCheckPrivate.mm: + (browserContainerCheckFuncs): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]): + (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): + * Plugins/npapi.mm: + (WKN_CheckIfAllowedToLoadURL): + +2009-04-29 David Hyatt <hyatt@apple.com> + + Reviewed by John Sullivan. + + Fix for <rdar://problem/6835573>, Find Banner turns invisible when WebView is resized. Make sure + not to resize the interior views of a WebView in response to its bounds changing when not using + viewless WebKit. Auto-resizing rules were already in place to handle size adjustments for us. + Just mark as needing layout and do nothing else. + + This does mean viewless WebKit is broken with the Find Banner, and that will likely require a + Safari change (using a new API that will enable clients to define the edges of the content area as offsets + from the sides of the WebView). + + * WebView/WebView.mm: + (-[WebView _boundsChanged]): + +2009-04-28 Geoffrey Garen <ggaren@apple.com> + + Rubber stamped by Beth Dakin. + + Removed scaffolding supporting dynamically converting between 32bit and + 64bit value representations. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::marshalValues): + +2009-04-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker and Darin Adler. + + Fix <rdar://problem/6836132>. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCCheckIfAllowedToLoadURL): + Call the instance proxy. + + (WKPCCancelCheckIfAllowedToLoadURL): + Ditto. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Initialize the check ID counter. + + (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURL): + Create a WebPluginContainerCheck, add it to the map, and start it. + + (WebKit::NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL): + Remove the check from the map. + + (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult): + Call the WKPH MIG callback. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): + Call the instance proxy. + + (-[WebHostedNetscapePluginView _containerCheckResult:contextInfo:]): + Ditto. + + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + Add MIG declarations. + +2009-04-28 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - fix <rdar://problem/6786360> Make PDF an insertable pasteboard type + + * WebCoreSupport/WebPasteboardHelper.mm: + (WebPasteboardHelper::insertablePasteboardTypes): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): + (+[WebHTMLView _insertablePasteboardTypes]): + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): + +2009-04-27 Douglas R. Davidson <ddavidso@apple.com> + + Add the various switches and context menu items needed for + <rdar://problem/6724106> WebViews need to implement text checking + and adopt updatePanels in place of old SPI _updateGrammar. + + Reviewed by Justin Garcia. + + * WebCoreSupport/WebContextMenuClient.mm: + (fixMenusReceivedFromOldClients): + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::uppercaseWord): + (WebEditorClient::lowercaseWord): + (WebEditorClient::capitalizeWord): + (WebEditorClient::showSubstitutionsPanel): + (WebEditorClient::substitutionsPanelIsShowing): + (WebEditorClient::toggleSmartInsertDelete): + (WebEditorClient::isAutomaticQuoteSubstitutionEnabled): + (WebEditorClient::toggleAutomaticQuoteSubstitution): + (WebEditorClient::isAutomaticLinkDetectionEnabled): + (WebEditorClient::toggleAutomaticLinkDetection): + (WebEditorClient::isAutomaticDashSubstitutionEnabled): + (WebEditorClient::toggleAutomaticDashSubstitution): + (WebEditorClient::isAutomaticTextReplacementEnabled): + (WebEditorClient::toggleAutomaticTextReplacement): + (WebEditorClient::isAutomaticSpellingCorrectionEnabled): + (WebEditorClient::toggleAutomaticSpellingCorrection): + (WebEditorClient::checkTextOfParagraph): + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory contextMenuItemTagShowColors]): + (-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]): + (-[WebViewFactory contextMenuItemTagSubstitutionsMenu]): + (-[WebViewFactory contextMenuItemTagShowSubstitutions:]): + (-[WebViewFactory contextMenuItemTagSmartCopyPaste]): + (-[WebViewFactory contextMenuItemTagSmartQuotes]): + (-[WebViewFactory contextMenuItemTagSmartDashes]): + (-[WebViewFactory contextMenuItemTagSmartLinks]): + (-[WebViewFactory contextMenuItemTagTextReplacement]): + (-[WebViewFactory contextMenuItemTagTransformationsMenu]): + (-[WebViewFactory contextMenuItemTagMakeUpperCase]): + (-[WebViewFactory contextMenuItemTagMakeLowerCase]): + (-[WebViewFactory contextMenuItemTagCapitalize]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView isAutomaticQuoteSubstitutionEnabled]): + (-[WebHTMLView setAutomaticQuoteSubstitutionEnabled:]): + (-[WebHTMLView toggleAutomaticQuoteSubstitution:]): + (-[WebHTMLView isAutomaticLinkDetectionEnabled]): + (-[WebHTMLView setAutomaticLinkDetectionEnabled:]): + (-[WebHTMLView toggleAutomaticLinkDetection:]): + (-[WebHTMLView isAutomaticDashSubstitutionEnabled]): + (-[WebHTMLView setAutomaticDashSubstitutionEnabled:]): + (-[WebHTMLView toggleAutomaticDashSubstitution:]): + (-[WebHTMLView isAutomaticTextReplacementEnabled]): + (-[WebHTMLView setAutomaticTextReplacementEnabled:]): + (-[WebHTMLView toggleAutomaticTextReplacement:]): + (-[WebHTMLView isAutomaticSpellingCorrectionEnabled]): + (-[WebHTMLView setAutomaticSpellingCorrectionEnabled:]): + (-[WebHTMLView toggleAutomaticSpellingCorrection:]): + * WebView/WebHTMLViewInternal.h: + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebUIDelegatePrivate.h: + * WebView/WebView.mm: + (-[WebViewPrivate init]): + (-[WebView validateUserInterfaceItemWithoutDelegate:]): + (-[WebView setGrammarCheckingEnabled:]): + (-[WebView isAutomaticQuoteSubstitutionEnabled]): + (-[WebView isAutomaticLinkDetectionEnabled]): + (-[WebView isAutomaticDashSubstitutionEnabled]): + (-[WebView isAutomaticTextReplacementEnabled]): + (-[WebView isAutomaticSpellingCorrectionEnabled]): + (-[WebView setAutomaticQuoteSubstitutionEnabled:]): + (-[WebView toggleAutomaticQuoteSubstitution:]): + (-[WebView setAutomaticLinkDetectionEnabled:]): + (-[WebView toggleAutomaticLinkDetection:]): + (-[WebView setAutomaticDashSubstitutionEnabled:]): + (-[WebView toggleAutomaticDashSubstitution:]): + (-[WebView setAutomaticTextReplacementEnabled:]): + (-[WebView toggleAutomaticTextReplacement:]): + (-[WebView setAutomaticSpellingCorrectionEnabled:]): + (-[WebView toggleAutomaticSpellingCorrection:]): + * WebView/WebViewPrivate.h: + +2009-04-27 David Kilzer <ddkilzer@apple.com> + + Consolidate runtime application checks for Apple Mail and Safari + + Reviewed by Mark Rowe and Darin Adler. + + * WebCoreSupport/WebContextMenuClient.mm: + (isAppleMail): Removed. + (fixMenusToSendToOldClients): Switched to use + applicationIsAppleMail(). + * WebView/WebFrame.mm: + (-[WebFrame reload]): Switched to use applicationIsSafari(). + * WebView/WebPDFView.mm: + (-[WebPDFView menuForEvent:]): Ditto. + * WebView/WebResource.mm: + (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): + Switched to use applicationIsAppleMail(). + * WebView/WebView.mm: + (runningLeopardMail): Ditto. + (runningTigerMail): Ditto. + (-[WebView _needsKeyboardEventDisambiguationQuirks]): Switched + to use applicationIsSafari(). + +2009-04-27 Kevin Decker <kdecker@apple.com> + + Fix the Tiger build. + + * Plugins/WebNetscapePluginView.mm: The base class of WebNetscapePluginView.mm, WebBaseNetscapePluginView, already implemented + the two methods below. But the Tiger compiler didn't know that. + (-[WebNetscapePluginView webView]): + (-[WebNetscapePluginView webFrame]): + +2009-04-27 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/6352982> + + * Plugins/WebBaseNetscapePluginView.mm: Removed checkIfAllowedToLoadURL:frame:callbackFunc, cancelCheckIfAllowedToLoadURL, and + _webPluginContainerCancelCheckIfAllowedToLoadRequest from the base class. These methods now exist in the subclass WebNetscapePluginView. + + Added WebNetscapeContainerCheckContextInfo, which is used as a "contextInfo" object in + -[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:] + * Plugins/WebNetscapeContainerCheckContextInfo.h: Added. + * Plugins/WebNetscapeContainerCheckContextInfo.mm: Added. + (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:]): Added desiginated initializer. + (-[WebNetscapeContainerCheckContextInfo checkRequestID]): Added. Returns the checkRequestID. + (-[WebNetscapeContainerCheckContextInfo callback]): Added. Returns the callback. + + * Plugins/WebNetscapePluginView.h: Added two new ivars: _containerChecksInProgress and _currentContainerCheckRequestID. + * Plugins/WebNetscapePluginView.mm: #import both WebPluginContainerCheck.h and WebNetscapeContainerCheckContextInfo.h + + (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added. This is the implementation of WKN_CheckIfAllowedToLoadURL. + Here, we increment the request ID and start the container check. + + (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): Added. This is a callback method for WebPluginContainerCheck. + It's where we actually call into the plug-in and provide the allow-or-deny result. + + (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Added. This is the implementation of WKN_CancelCheckIfAllowedToLoadURL. + Here we lookup the check, cancel it, and remove it from _containerChecksInProgress. + + (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added. WebPluginContainerCheck automatically calls + this method after invoking our _containerCheckResult: selector. It works this way because calling -[WebPluginContainerCheck cancel] allows + it to do it's teardown process. + + (-[WebNetscapePluginView fini]): Release _containerChecksInProgress ivar. + + * Plugins/WebPluginContainerCheck.h: Removed initWithRequest: method from header; no client was using this method directly. + * Plugins/WebPluginContainerCheck.mm: + (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]): Added optional contextInfo parameter. + (-[WebPluginContainerCheck _continueWithPolicy:]): If there's a contextInfo object, pass it as a parameter to resultSelector. + (-[WebPluginContainerCheck cancel]): Release _contextInfo ivar. + (-[WebPluginContainerCheck contextInfo]): Added new method. Returns the contextInfo object, if one so exists. + * Plugins/WebPluginController.mm: + (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Pass nil for contextInfo. WebKit-style + plug-ins do not need additional context information. + +2009-04-25 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Some *obvious* style cleanup in my last patch. + + * History/WebBackForwardList.mm: + (bumperCarBackForwardHackNeeded): + +2009-04-25 Brady Eidson <beidson@apple.com> + + Reviewed by Oliver Hunt + + <rdar://problem/6817607> BumperCar 2.2 crashes going back (invalid WebHistoryItem) + + BumperCar was holding a pointer to a WebHistoryItem they never retain, then later + tried to go to it. In some cases it would be dealloc'ed first. + When WebHistoryItems were pure Objective-C they probably got away with this more often. + With the WebCore/Obj-C mixed WebHistoryItems it's more likely to crash. + + * History/WebBackForwardList.mm: + (bumperCarBackForwardHackNeeded): + (-[WebBackForwardList backListWithLimit:]): If this is BumperCar, hang on to the + NSArray of WebHistoryItems until the next time this method is called. + (-[WebBackForwardList forwardListWithLimit:]): Ditto. + + * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK. + +2009-04-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix <rdar://problem/6761635>. + + Make sure to keep an extra reference to the instance proxy in case the plug-in host crashes while + we're waiting for a reply. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::destroy): + +2009-04-24 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein + + Currently working on a bug where a WebHistoryItem was being used after being dealloc'ed. + I added this assertion to help catch the case as soon as it happens instead of random + issues downstream. Figured it's worth checking in by itself. + + * History/WebHistoryItem.mm: + (core): ASSERT that the WebCore::HistoryItem inside this WebHistoryItem is supposed to have + this WebHistoryItem as a wrapper. + +2009-04-23 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/6333461> REGRESSION (r36864-r36869): + Dragging stocks widget scrollbar drags the whole widget + + Look for our new WebCore scrollbars in the WebHTMLView and add + proper Dashboard regions for them. + + * WebView/WebView.mm: + (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]): + (-[WebView _addScrollerDashboardRegions:from:]): + +2009-04-23 John Sullivan <sullivan@apple.com> + + fixed <rdar://problem/6822479> Assertion failure after Reset Safari in new history-writing code + + Reviewed by Oliver Hunt + + * History/WebHistory.mm: + (-[WebHistoryPrivate data]): + Return nil immediately if there are no entries; this matches a recent Windows-platform fix. + +2009-04-23 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=25313 + Missing scroll bars in GMail. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): Added check for the ScrollbarAlwaysOn + scroll mode. + +2009-04-23 Kevin Decker <kdecker@apple.com> + + * Plugins/WebPluginContainerCheck.h: Fix the Tiger build. + +2009-04-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoffrey Garen. + + Fix <rdar://problem/6821992> + + Add a new m_inDestroy member variable. Set it to true when in destroy, and have all NPRuntime functions return false + when m_inDestroy is true. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::destroy): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::removeProperty): + (WebKit::NetscapePluginInstanceProxy::hasProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::enumerate): + +2009-04-23 David Hyatt <hyatt@apple.com> + + Reviewed by Maciej. + + Fix for <rdar://problem/6789879> REGRESSION (42464): Hitting assertion when loading message in Mail + TOT WebKit + + Make the Mac platform the same as all the other platforms. Instead of (incorrectly) marking a FrameView for layout + when its underlying document view changes, just mark the outermost frame view for layout when the WebView's size changes. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): + (-[WebHTMLView addSuperviewObservers]): + * WebView/WebView.mm: + (-[WebView _boundsChanged]): + (-[WebView removeSizeObservers]): + (-[WebView addSizeObservers]): + +2009-04-23 Kevin Decker <kdecker@apple.com> + + Reviewed by Tim Hatcher. + + Second part of the fix for <rdar://problem/6352982> + + * Plugins/WebBaseNetscapePluginView.h: Make this class conform to WebPluginContainerCheckController + * Plugins/WebBaseNetscapePluginView.mm: Likewise. + (-[WebBaseNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added skeleton method. + * Plugins/WebPluginContainerCheck.h: Added protocol for <WebPluginContainerCheckController> + * Plugins/WebPluginContainerCheck.mm: + (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]): + * Plugins/WebPluginController.h: Make this class conform to WebPluginContainerCheckController + +2009-04-23 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + First part of <rdar://problem/6352982> + + * Plugins/WebBaseNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; Added two new method: + checkIfAllowedToLoadURL:url:frame:callbackFunc: and cancelCheckIfAllowedToLoadURL: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added skeleton method, does nothing interesting + yet. + (-[WebBaseNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Likewise. + * Plugins/WebNetscapeContainerCheckPrivate.h: Added. + * Plugins/WebNetscapeContainerCheckPrivate.mm: Added. + (browserContainerCheckFuncs): Added. + * Plugins/WebNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; + * Plugins/WebNetscapePluginView.mm: Imported #WebNetscapeContainerCheckPrivate.h; added WKN_CheckIfAllowedToLoadURL + and WKN_CancelCheckIfAllowedToLoadURL functions. + (-[WebNetscapePluginView getVariable:value:]): Return vtable for container check functions. + * Plugins/npapi.mm: + (WKN_CheckIfAllowedToLoadURL): Added new private function. + (WKN_CancelCheckIfAllowedToLoadURL): Ditto. + +2009-04-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves + + Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView mouseUp:]): + +2009-04-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves + + Make mouseDragged forward to the root view as we do for mouseMoves. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView mouseDragged:]): + +2009-04-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + Fix <rdar://problem/6792694> + + When we're trying to instantiate a plug-in and the plug-in host has died, we need to invalidate the + instance so that it doesn't stick around and do bad things. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + +2009-04-22 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Darin Adler. + + Fix for <rdar://problem/6816957> + Turn off Geolocation by default + + * Configurations/FeatureDefines.xcconfig: + +2009-04-21 Dan Bernstein <mitz@apple.com> + + Reviewed by Jon Honeycutt. + + - Mac part of fixing for <rdar://problem/6755137> Action dictionary for + policy decision is missing keys when full-page zoom is used + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::actionDictionary): Use absoluteLocation() instead + of pageX() and pageY(), which are adjusted for zoom. + +2009-04-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler and Kevin Decker. + + WebKit side of <rdar://problem/6781642>. + + When we call resize with an actual changed size, block until the plug-in host is done. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::resize): + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView updateAndSetWindow]): + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-04-17 Timothy Hatcher <timothy@apple.com> + + Change how sudden termination works with WebView teardown. + + <rdar://problem/6383352&6383379&6383940> + + Reviewed by Darin Adler. + + * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination. + * WebCoreSupport/WebChromeClient.mm: Ditto. + * WebView/WebFrame.mm: + (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow. + * WebView/WebView.mm: + (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents. + (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and + call close on all the WebViews. + (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch. + (-[WebView _close]): Correct a comment. + (+[WebView _applicationWillTerminate]): Call closeAllWebViews. + * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews. + +2009-04-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + Tiger crash fix: Put VM tags in their own header file, and fixed up the + #ifdefs so they're not used on Tiger. + + * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h. + +2009-04-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6722845> + In the Cocoa event model, NPWindow's window field should be null + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCConvertPoint): + Get the instance proxy and call it's convertPoint function. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::convertPoint): + Call convertPoint on the plug-in view. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add PCConvertPoint. + + * Plugins/WebBaseNetscapePluginView.h: + Add a declaration for convertFromX:andY:space:toX:andY:space:. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]): + Convert a point from one coordinate system to another. + + * Plugins/WebNetscapePluginEventHandler.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::drawRect): + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + Add CGContextRef to drawRect. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::drawRect): + Set the passed in context. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _tryLoad]): + Add NPN_ConvertPoint to the browserFuncs vtable. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): + Only set the window for the Carbon event model. + + (-[WebNetscapePluginView restorePortState:]): + It's OK for the window context to be null. + + (-[WebNetscapePluginView sendDrawRectEvent:]): + Pass the CGContextRef to drawRect. + + * Plugins/npapi.mm: + (NPN_ConvertPoint): + Call the plug-in view method. + +2009-04-20 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Tim Hatcher. + + Add licenses for xcconfig files. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/Version.xcconfig: + * Configurations/WebKit.xcconfig: + +2009-04-20 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + WebKit side of <rdar://problem/6781302> + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::keyEvent): + Pass the event keyChar. + + (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier): + Ditto. + + (WebKit::NetscapePluginInstanceProxy::flagsChanged): + Pass a 0 keyChar. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView flagsChanged:]): + Call NetscapePluginInstanceProxy::flagsChanged. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add a keyChar argument. + +2009-04-19 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/6804809> REGRESSION: In Mail, Home and End do not scroll message + + If no scrolling occurs, call tryToPerform on the next responder. Then our WebResponderChainSink + will correctly detect if no responders handle the selector. + + * WebView/WebFrameView.mm: + (-[WebFrameView _scrollToBeginningOfDocument]): + (-[WebFrameView _scrollToEndOfDocument]): + (-[WebFrameView scrollToBeginningOfDocument:]): + (-[WebFrameView scrollToEndOfDocument:]): + (-[WebFrameView scrollLineUp:]): + (-[WebFrameView scrollLineDown:]): + +2009-04-19 David Kilzer <ddkilzer@apple.com> + + Make FEATURE_DEFINES completely dynamic + + Reviewed by Darin Adler. + + Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME + variables for each feature, making it possible to remove all + knowledge of FEATURE_DEFINES from build-webkit. + + * Configurations/FeatureDefines.xcconfig: Extract a variable + from FEATURE_DEFINES for each feature setting. + +2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/6781295> video.buffered and video.seekable are not + the same. video.buffered should return only what is buffered and + not what is seekable + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable. + +2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/6747241> work around QTKit no longer reaching + QTMovieLoadStateComplete + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Init the new WKSI exported symbol. + +2009-04-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6714488> + REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier): + Send a keyDown event to the plug-in host. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]): + Call the plug-in instance proxy. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]): + Add this. Subclasses are required to override it. + + (-[WebBaseNetscapePluginView cut:]): + (-[WebBaseNetscapePluginView copy:]): + (-[WebBaseNetscapePluginView paste:]): + (-[WebBaseNetscapePluginView selectAll:]): + Call sendModifierEventWithKeyCode. + + * Plugins/WebNetscapePluginEventHandler.h: + Add syntheticKeyDownWithCommandModifier. + + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier): + Send the synthetic event. + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier): + Send the synthetic event. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]): + Call the event handler. + +2009-04-17 David Kilzer <ddkilzer@apple.com> + + Simplify FEATURE_DEFINES definition + + Reviewed by Darin Adler. + + This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME + variables to their own FeatureDefines.xcconfig file. It also + extracts a new ENABLE_GEOLOCATION variable so that + FEATURE_DEFINES only needs to be defined once. + + * Configurations/FeatureDefines.xcconfig: Added. + * Configurations/WebKit.xcconfig: Removed definition of + ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include + of FeatureDefines.xcconfig. + +2009-04-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix crashes seen in regression tests with hosted plug-ins. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0, + not the stream ID. + +2009-04-17 Darin Adler <darin@apple.com> + + Reviewed by Antti Koivisto. + + Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC + https://bugs.webkit.org/show_bug.cgi?id=25210 + + * DOM/WebDOMOperations.mm: + (-[DOMNode markupString]): Use the core function instead of an Objective-C method. + (-[DOMNode _subresourceURLs]): Ditto. + (-[DOMDocument _focusableNodes]): Ditto. + (-[DOMRange webArchive]): Ditto. + (-[DOMRange markupString]): Ditto. + + * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit + functions now come from the internal headers from DOM bindings. + * Misc/WebNSPasteboardExtras.mm: Ditto. + * Plugins/WebNullPluginView.mm: Ditto. + * Plugins/WebPluginController.mm: Ditto. + * WebCoreSupport/WebChromeClient.mm: Ditto. + * WebCoreSupport/WebInspectorClient.mm: Ditto. + * WebCoreSupport/WebPasteboardHelper.mm: Ditto. + * WebView/WebHTMLView.mm: Ditto. + + * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage + since it's only used in this file. Someone had instead added a declaration to + suppress the warning you would otherwise get. Removed the core function. + (WebEditorClient::textFieldDidBeginEditing): Added correct type checking. + Previously the function would check only that something was an HTMLElement, + but then cast it to HTMLInputElement. Also call kit instead of old wrap method. + (WebEditorClient::textFieldDidEndEditing): Ditto. + (WebEditorClient::textDidChangeInTextField): Ditto. + (WebEditorClient::doTextFieldCommandFromEvent): Ditto. + (WebEditorClient::textWillBeDeletedInTextField): Ditto. + (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement. + + * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer + needed since they're automatically generated now. + (-[WebFrame _nodesFromList:]): Use kit. + (-[WebFrame _markupStringFromRange:nodes:]): Use core. + (-[WebFrame _stringForRange:]): More of the same. + (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto. + (-[WebFrame _firstRectForDOMRange:]): Ditto. + (-[WebFrame _scrollDOMRangeToVisible:]): Ditto. + (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]): + Ditto. + (-[WebFrame _convertNSRangeToDOMRange:]): Ditto. + (-[WebFrame _convertDOMRangeToNSRange:]): Ditto. + (-[WebFrame _markDOMRange]): Ditto. + (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto. + (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto. + (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto. + (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto. + (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto. + (-[WebFrame _characterRangeAtPoint:]): Ditto. + (-[WebFrame _typingStyle]): Ditto. + (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto. + (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto. + (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto. + (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto. + + * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer + needed since they're automatically generated now. + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core. + (formElementFromDOMElement): Ditto. + (inputElementFromDOMElement): Ditto. + * WebView/WebTextIterator.mm: + (-[WebTextIterator initWithRange:]): Ditto. + (-[WebTextIterator currentRange]): Ditto. + (-[WebTextIterator currentNode]): Ditto. + * WebView/WebView.mm: + (-[WebView textIteratorForRect:]): Ditto. + (-[WebView setSelectedDOMRange:affinity:]): Ditto. + +2009-04-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebKit side of <rdar://problem/6449642>. + + * Plugins/Hosted/HostedNetscapePluginStream.h: + (WebKit::HostedNetscapePluginStream::create): + New function that creates a stream from a frame loader. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream): + Add the constructor that takes a frame loader. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + Pass "fullFrame" to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCCancelLoadURL): + Call NetscapePluginInstanceProxy::cancelStreamLoad. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::create): + Pass "fullFrame" to the constructor. + + (WebKit::NetscapePluginInstanceProxy::manualStream): + New getter for the manual stream. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Take the implicit request into account if we have a full frame plug-in. + + (WebKit::NetscapePluginInstanceProxy::setManualStream): + Setter for the manual stream. + + (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): + Cancel the manual stream if necessary. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + Pass "fullFrame" to instantiatePlugin. + + (-[WebHostedNetscapePluginView pluginView:receivedResponse:]): + (-[WebHostedNetscapePluginView pluginView:receivedData:]): + (-[WebHostedNetscapePluginView pluginView:receivedError:]): + (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]): + Call the equivalent manual stream functions. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): + Use a macro for getting the plug-in view type. + +2009-04-14 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein + + https://bugs.webkit.org/show_bug.cgi?id=25157 + + Move the run loop observer cleanup from -close + to -_close. + + * WebView/WebView.mm: + (-[WebView _close]): + (-[WebView close]): + +2009-04-14 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + - Speculative fix for <rdar://problem/6781422> + + Protect the plug-in instance proxy in case it's deleted while waiting for a reply. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::wheelEvent): + +2009-04-14 Adele Peterson <adele@apple.com> + + Reviewed by Darin. + + Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up. This was causing Mail to crash on launch. + + * Misc/WebCache.mm: (+[WebCache initialize]): + * WebView/WebView.mm: (+[WebView initialize]): + +2009-04-13 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin. + + <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks + + Simplify the _trackFirstResponder method by just caching the value instead of retaining + a Cocoa object. + + * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with + a firstResponderIsPDFDocumentView boolean. + * WebView/WebPDFView.mm: + (-[WebPDFView dealloc]): Removed no longer necessary ASSERT. + (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder, + which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO. + (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead + of retaining an object. + +2009-04-13 David Hyatt <hyatt@apple.com> + + Reviewed by Sam Weinig. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=25125. Rework scrolling so that a layout happens first when + it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes. + + This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with + WebCore's notion of needing layout. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): + (-[WebHTMLView initWithFrame:]): + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): + (-[WebHTMLView setNeedsLayout:]): + (-[WebHTMLView _layoutIfNeeded]): + (-[WebHTMLView _needsLayout]): + * WebView/WebHTMLViewInternal.h: + +2009-04-13 Darin Adler <darin@apple.com> + + * WebView/WebViewPrivate.h: Updated comments. + +2009-04-13 Antti Koivisto <antti@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6740294> Increase the connection count per host + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2009-04-13 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher + + Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more + useful to developers/users. + + * WebView/WebFrame.mm: + (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only + perform the "call on main thead" workaround, as the log/exception raising is now up at the API level. + (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging + is more meaningful. + (-[WebFrame loadHTMLString:baseURL:]): Ditto. + (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto. + +2009-04-13 Brady Eidson <beidson@apple.com> + + Reviewed by Kevin Decker + + <rdar://problem/6712063> Garmin WebUpdater crashes + + * WebView/WebFrame.mm: + (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not called on the main thread, + add a ThreadViolationCheckRoundTwo() call to either log or raise an exception. In the case where it's + only a log, reschedule the _loadData call to occur on the main thread. + +2009-04-10 Dan Bernstein <mitz@apple.com> + + Reviewed by Jon Honeycutt. + + - fix <rdar://problem/6752340> Light blue-green background in content + area in Mail + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + Use device white, rather than calibrated white, as the default + background color. + +2009-04-10 Darin Adler <darin@apple.com> + + Reviewed by Brady Eidson. + + <rdar://problem/6773515> crash in push_heap inside WebCore when printing + + The crash was due to manipulating a timer on a different thread than the one it was created on. + + * History/WebHistoryItem.mm: + (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread. + * WebView/WebHTMLView.mm: + (-[WebHTMLView windowDidBecomeKey:]): Ditto. + (-[WebHTMLView windowDidResignKey:]): Ditto. + (-[WebHTMLView windowWillClose:]): Ditto. + (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of + our override of _windowChangedKeyState. + (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if + called on non-main thread. + * WebView/WebPreferences.mm: + (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called + on non-main thread + +2009-04-10 Timothy Hatcher <timothy@apple.com> + + Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed. + + Rubber-stamped by Mark Rowe. + + * Misc/DOMDocumentPrivate.h: Removed. + +2009-04-10 Pierre d'Herbemont <pdherbemont@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/6646998> Avoid starting QTKitServer if possible + Add the requires symbol in the WebSystemInterface. It is used by + WebCore. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes. + +2009-04-09 Kevin Decker <kdecker@apple.com> + + Reviewed by Hyatt. + + <rdar://problem/4680397> tearing seen because deferred updates are disabled + + * WebView/WebFrameView.mm: + (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if + NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined. + +2009-04-09 John Sullivan <sullivan@apple.com> + + <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for + downloads is broken and should be removed + + Reviewed by Darin Adler + + * Misc/WebDownload.m: + (-[WebDownloadInternal downloadDidBegin:]): + remove disableSuddenTermination call + (-[WebDownloadInternal downloadDidFinish:]): + remove enableSuddenTermination call + (-[WebDownloadInternal download:didFailWithError:]): + remove enableSuddenTermination call + +2009-04-09 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson and Sam Weinig. + + Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing + + Longer term solution is to change the design so Safari doesn't read and write all of history. + This patch is step one: Do the serializing, which is done on the main thread, much faster. + + * History/WebHistory.mm: + (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history. + For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter. + (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data + (-[WebHistory _data]): Added. + (WebHistoryWriter::WebHistoryWriter): Added. + (WebHistoryWriter::writeHistoryItems): Added. + + * History/WebHistoryPrivate.h: Added a new _data method. + +2009-04-09 Mike Thole <mthole@apple.com> + + Rubber-stamped by Mark Rowe. + + Fix 64-bit build + + * Panels/WebAuthenticationPanel.h: + Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'. + This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer) + +2009-04-09 Mike Thole <mthole@apple.com> + + Reviewed by Ada Chan. + + <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability + + * Panels/WebAuthenticationPanel.h: + Added IBOutlet for separateRealmLabel + * Panels/WebAuthenticationPanel.m: + (-[WebAuthenticationPanel setUpForChallenge:]): + In the realm case, decide if it is a simple or complex realm name. A realm name + is considered complex if it has any whitespace or newline characters. Present + alternative text and layout for the complex case, where the realm name isn't inline + with the rest of the sheet's text. + + * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: + * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: + Updated the nib with a new 'separateRealmLabel' outlet. + Updated the File's Owner to correctly be WebAuthenticationPanel. + Fixed springs on the sheet's icon to keep it from moving during a resize. + +2009-04-09 David Kilzer <ddkilzer@apple.com> + + Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings + + Rolled r42345 back in. The build failure was caused by an + internal script which had not been updated the same way that + build-webkit was updated. + + * Configurations/WebKit.xcconfig: + * DOM/WebDOMOperations.mm: + * MigrateHeaders.make: + +2009-04-09 Alexey Proskuryakov <ap@webkit.org> + + Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings. + It broke Mac build, and I don't know how to fix it. + + * Configurations/WebKit.xcconfig: + * DOM/WebDOMOperations.mm: + * MigrateHeaders.make: + +2009-04-08 David Kilzer <ddkilzer@apple.com> + + <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings + + Reviewed by Darin Adler and Maciej Stachowiak. + + Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so + that SVG DOM Objective-C bindings may be optionally disabled. + + * Configurations/WebKit.xcconfig: Added + ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in + FEATURE_DEFINES. + * DOM/WebDOMOperations.mm: Removed unused header. + * MigrateHeaders.make: Switched from using ENABLE_SVG to using + ENABLE_SVG_DOM_OBJC_BINDINGS. + +2009-04-08 David Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben and Darin Adler + + Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in + inconsistent positions. Rewrite updateScrollers to improve the correctness. + + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): + +2009-04-07 Anders Carlsson <andersca@apple.com> + + Fix Tiger build for real this time. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView getVariable:forURL:value:length:]): + (-[WebNetscapePluginView setVariable:forURL:value:length:]): + (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]): + * Plugins/npapi.mm: + (NPN_GetValueForURL): + (NPN_SetValueForURL): + +2009-04-07 David Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben + + Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results. Change + updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): + +2009-04-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Anders Carlsson. + + Trying to fix Tiger build. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]): + +2009-04-07 Anders Carlsson <andersca@apple.com> + + Try to fix the Leopard build once more. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView getVariable:forURL:value:length:]): + +2009-04-07 Anders Carlsson <andersca@apple.com> + + ...and try to fix the Leopard build. + + * Plugins/npapi.mm: + (NPN_GetAuthenticationInfo): + +2009-04-07 Anders Carlsson <andersca@apple.com> + + Try to fix the Tiger build. + + * Plugins/WebBaseNetscapePluginView.mm: + +2009-04-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6667001> + NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo() + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetCookies): + (WKPCGetProxy): + (WKPCSetCookies): + (WKPCGetAuthenticationInfo): + New MIG functions to be used by the plug-in host. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getCookies): + (WebKit::NetscapePluginInstanceProxy::setCookies): + (WebKit::NetscapePluginInstanceProxy::getProxy): + (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo): + Implement these. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add callbacks. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView URLWithCString:]): + Factor this out of URLWithCString. + + (-[WebBaseNetscapePluginView requestWithURLCString:]): + Call URLWithCString. + + (WebKit::proxiesForURL): + Return a string representation of proxies for a given URL. + + (WebKit::getAuthenticationInfo): + Get the authentication info for a given host/protocol/scheme/realm/port combination. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _tryLoad]): + Initialize the new vtable functions. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView getVariable:forURL:value:length:]): + (-[WebNetscapePluginView setVariable:forURL:value:length:]): + (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]): + Implement these. + + * Plugins/npapi.mm: + (NPN_GetValueForURL): + (NPN_SetValueForURL): + (NPN_GetAuthenticationInfo): + Call the plug-in view functions. + +2009-04-03 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/6756512> + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property. + +2009-04-03 John Sullivan <sullivan@apple.com> + + Reviewed by Ada Chan + + <rdar://problem/6755838> Removing all icons can delete other items from disk. + + * Misc/WebIconDatabase.mm: + (importToWebCoreFormat): + When snooping around in various directories looking for a directory full of Safari-2-style + icon database information to convert and delete, bail out without doing the delete part if + we didn't actually find any Safari-2-style icon database information. + +2009-04-03 John Sullivan <sullivan@apple.com> + + fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory + + Reviewed by Adam Roben + + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): + use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef + +2009-04-03 Chris Marrin <cmarrin@apple.com> + + Reviewed by David Hyatt. + + Fixed https://bugs.webkit.org/show_bug.cgi?id=24941 + + This fix essentially does a -viewWillDraw call for layout. It adds + a CFRunLoopObserver which performs layout just before drawing on the + Mac platform. This makes sure layout is complete before rendering and + avoids a flash. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::attachRootGraphicsLayer): + (WebChromeClient::setNeedsOneShotDrawingSynchronization): + (WebChromeClient::scheduleViewUpdate): + * WebView/WebView.mm: + (-[WebViewPrivate _clearViewUpdateRunLoopObserver]): + (-[WebView _viewWillDrawInternal]): + (-[WebView viewWillDraw]): + (-[WebView close]): + (viewUpdateRunLoopObserverCallBack): + (-[WebView _scheduleViewUpdate]): + * WebView/WebViewInternal.h: + +2009-04-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + WebKit side of <rdar://problem/6752953>. + + Pass the clip rect to the plug-in host. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::resize): + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-04-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein and Timothy Hatcher. + + <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file + + The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to + our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those + methods. + + * WebView/WebView.mm: + (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it. + (-[WebView addSizeObservers]): Ditto. + +2009-04-02 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + Add a way to get a list of focusable nodes. + + * DOM/WebDOMOperations.mm: + (-[DOMDocument _focusableNodes]): + * DOM/WebDOMOperationsInternal.h: Added. + * DOM/WebDOMOperationsPrivate.h: Make this a private header. + Move old methods to WebDOMOperationsInternal.h + * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h + +2009-04-01 Darin Adler <darin@apple.com> + + Reviewed by Geoff Garen. + + Bug 22378: Crash submitting a form when parsing an XHTML document + https://bugs.webkit.org/show_bug.cgi?id=22378 + rdar://problem/6388377 + + * History/WebHistoryItem.mm: + (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling + isTargetItem, hasChildren, and recurseToFindTargetItem. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new + textFieldValues function in FormState. + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and + argument change of loadFrameRequest. + +2009-04-01 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=24990 + Put SECTORDER_FLAGS into xcconfig files. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + +2009-03-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + WebKit side of <rdar://problem/6500266>. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::wheelEvent): + Send the event. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView scrollWheel:]): + Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't + call super. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add definition. + +2009-03-31 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail + + * WebView/WebHTMLView.mm: + (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had + handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:] + calls tryToPerform on the next responder. + +2009-03-30 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=24938 + + Build fixes when building --no-svg + + DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG. + + * MigrateHeaders.make: + +2009-03-29 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + * Plugins/WebNullPluginView.mm: Added now-needed includes. + * WebView/WebHTMLRepresentation.mm: Ditto. + * WebView/WebHTMLView.mm: Ditto. + +2009-03-27 Timothy Hatcher <timothy@apple.com> + + * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it + is not generated anymore. + +2009-03-27 Adam Roben <aroben@apple.com> + + Don't include substitute data URLs in global history redirect chains + + <rdar://6690169> + + Reviewed by Darin Adler. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Don't call + updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now. + (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): + Added an assertion to help catch cases where we might be adding a + substitute data URL into a redirect chain. + +2009-03-27 Darin Adler <darin@apple.com> + + Reviewed by Adam Roben. + + <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame. + +2009-03-27 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan and Anders Carlsson. + + <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services) + + Added SPI to tell which pasteboard is currently being inserted. + I chose to put it on WebView to be forward-looking since we're migrating things + from WebHTMLView to WebView in the future. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard. + (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto. + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): Assert the pasteboard is nil. + (-[WebViewPrivate finalize]): Ditto. + (-[WebView _insertionPasteboard]): Return the pastebaord. + (-[WebView _setInsertionPasteboard:]): Set the pasteboard. + * WebView/WebViewInternal.h: Added _setInsertionPasteboard. + * WebView/WebViewPrivate.h: Added _insertionPasteboard. + +2009-03-25 Timothy Hatcher <timothy@apple.com> + + Expose new DOM methods as public Objective-C API. + + <rdar://problem/5837350> Expose new DOM classes and methods + as public API (match the additions to the JavaScript DOM) + + Reviewed by Mark Rowe and Darin Adler. + + * MigrateHeaders.make: + * Misc/DOMDocumentPrivate.h: Added. Forwarding header for + <rdar://problem/6730996>. + +2009-03-26 Jungshik Shin <jshin@chromium.org> + + Reviewed by Alexey Proskuryakov. + + Add WebPreferences for encoding autodetection on Mac. + + http://bugs.webkit.org/show_bug.cgi?id=16482 + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences usesEncodingDetector]): + (-[WebPreferences setUsesEncodingDetector:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-03-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + - Fix <rdar://problem/6687055> and <rdar://problem/6713639>. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvalidateRect): + Call NetscapePluginInstanceProxy::invalidateRect. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::cleanup): + Stop the request timer, set m_pluginView to nil. + + (WebKit::NetscapePluginInstanceProxy::pluginHostDied): + No need to set m_pluginView to nil here anymore, it's now done in cleanup(). + + (WebKit::NetscapePluginInstanceProxy::performRequest): + (WebKit::NetscapePluginInstanceProxy::requestTimerFired): + Assert that the plug-in view is not nil. + + (WebKit::NetscapePluginInstanceProxy::invalidateRect): + Call setNeedsDisplayInRect here. + +2009-03-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6714964> + CrashTracer: [REGRESSION] 51 crashes in Safari at com.apple.WebKit • WebNetscapePluginStream::deliverData + 775 + + Don't release m_deliveryData since it's a RetainPtr. Also, use adoptNS instead of releasing newDeliveryData manually. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::deliverData): + +2009-03-25 Mike Thole <mthole@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6453738> call SetWindow when user creates a new tab + + CoreGraphics plug-ins now receive an NPP_SetWindow call when moving to a background tab. + Flash is excluded from this change in behavior, as it has historical WebKit-specific code + that isn't compatible with this change. + + * Plugins/WebNetscapePluginView.h: + Added an _isFlash ivar. + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView _createPlugin]): + Set the new _isFlash ivar based on the bundle identifier. + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): + When using the CG drawing model and in a non-drawable state, set the portState + to NULL and return early. + (-[WebNetscapePluginView updateAndSetWindow]): + When using the CG drawing model, call -setWindowIfNecessary even if the portState is NULL. + Flash is an exception to this, due to its historical behavior. + (-[WebNetscapePluginView setWindowIfNecessary]): + Removed an assertion that was no longer true. The [NSView focus] view + is no longer guaranteed to be 'self' at this point. + Also modified the debug logging for CG plug-ins to include the size of the + window's clipRect, which was useful in verifying the correct behavior of this patch. + +2009-03-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Oliver Hunt. + + - speculative fix for <rdar://problem/6630134> Crash at + Editor::compositionRange() + + * WebView/WebHTMLView.mm: + (-[WebHTMLView markedRange]): Null-check the Frame like most other + methods in this class. + +2009-03-23 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for <rdar://problem/6140966> + Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache + + * Misc/WebCache.mm: + (+[WebCache empty]): + +2009-03-23 Adele Peterson <adele@apple.com> + + Reviewed by Mark Rowe & Dave Hyatt. + + Merge some of the individual Mail quirks into two settings that we can check for future quirks. + + * WebView/WebView.mm: + (runningLeopardMail): + (runningTigerMail): + (-[WebView _preferencesChangedNotification:]): + +2009-03-23 Darin Adler <darin@apple.com> + + * WebView/WebTextIterator.h: Fixed a spelling error in a comment. + +2009-03-22 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - fix <rdar://problem/6640741> Messages not displaying after the + Safari 4 beta was installed + + Mail assumes that if -[WebArchive subresources] is not nil, then it + contains at least one object. + + * WebView/WebArchive.mm: + (-[WebArchive subresources]): Preserve the behavior of returning nil + if there are no subresources. + +2009-03-20 Adele Peterson <adele@apple.com> + + Build fix. + + Reviewed by Darin Adler. + + * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): + +2009-03-20 Timothy Hatcher <timothy@apple.com> + + Change how threading exceptions are checked so they are reported + by what round they were added. That way WebKit can decided the + behavior per-round based on linked-on-or-after checks. + + <rdar://problem/6626741&6648478&6635474&6674079> + + Reviewed by Darin Adler. + + * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro. + * History/WebHistoryItem.mm: Ditto. + * Misc/WebIconDatabase.mm: Ditto. + + * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro. + * WebView/WebResource.mm: Ditto. + (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version + to truly decide if it is an old Mail client. + * WebView/WebView.mm: Ditto. + + * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define. + * WebView/WebFrameView.mm: + (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round + based on difference version checks and the Mail workaround check. + +2009-03-20 Darin Adler <darin@apple.com> + + Reviewed by Timothy Hatcher. + + * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls + of this SPI. + +2009-03-20 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson. + + Use a better technique to handle finding out if something responds to a selector + in WebHTMLView's doCommandBySelector method. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame; + this is already handled by coreCommandBySelector: so doesn't need to be checked + twice. Got rid of initial value for eventWasHandled boolean to make it more clear. + Use WebResponderChainSink to find out if a command is handled rather than walking + the responder chain explicitly. + (-[WebResponderChainSink initWithResponderChain:]): Added. + (-[WebResponderChainSink detach]): Added. + (-[WebResponderChainSink receivedUnhandledCommand]): Added. + (-[WebResponderChainSink noResponderFor:]): Added. + (-[WebResponderChainSink doCommandBySelector:]): Added. + +2009-03-19 Timothy Hatcher <timothy@apple.com> + + Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes + for Page, so the new RunLoopTimer in WebCore always gets a default mode. + Fixes the layout test failures on the Tiger build bots. + + Reviewed by Mark Rowe. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + (-[WebView scheduleInRunLoop:forMode:]): + (-[WebView unscheduleFromRunLoop:forMode:]): + +2009-03-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + WebKit side of <rdar://problem/6688244>. + + Try reinitializing the vendor port if it's invalid. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): + +2009-03-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6504776> + CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ... + + If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off + causing the plug-in never to be stopped. Simplify the code by using a RAII object. + + * Plugins/WebBaseNetscapePluginStream.mm: + (PluginStopDeferrer::PluginStopDeferrer): + (PluginStopDeferrer::~PluginStopDeferrer): + (WebNetscapePluginStream::startStream): + (WebNetscapePluginStream::wantsAllStreams): + (WebNetscapePluginStream::destroyStream): + +2009-03-17 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson. + + <rdar://problem/6687005> Need support for new move-left/right selectors. + + * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list. + * WebView/WebView.mm: Ditto. + +2009-03-17 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson. + + Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages + https://bugs.webkit.org/show_bug.cgi?id=24477 + rdar://problem/6674184 + + * WebView/WebHTMLView.mm: + (responderChainRespondsToSelector): Added. + (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we + can find a responder that responds to this selector rather than always assuming + the selector will not be handled. + +2009-03-17 Mark Rowe <mrowe@apple.com> + + Fix the build. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + +2009-03-17 David Kilzer <ddkilzer@apple.com> + + Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently + + Reviewed by Darin Adler. + + WebKit r30323 added -_webcore_MIMEType to fix issues with + incorrect MIME types in NS[HTTP]URLResponse objects. However, + uses of -[NSURLResponse MIMEType] still persist in WebKit that + should be switched to use -_webcore_MIMEType. Note that + -[WebDataSource _responseMIMEType] calls back into WebCore to + get the MIME type from the ResourceResponse object, which has + already retrieved it via -_webcore_MIMEType. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use + -_webcore_MIMEType. + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::didReceiveResponse): Ditto. + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView pluginView:receivedData:]): Ditto. + * Plugins/WebPluginController.mm: + (-[WebPluginController pluginView:receivedResponse:]): Ditto. + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use + -[WebDataSource _responseMIMEType] instead. + * WebView/WebPDFRepresentation.m: + (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto. + * WebView/WebPDFView.mm: + (-[WebPDFView menuForEvent:]): Ditto. + +2009-03-17 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Darin Adler + + https://bugs.webkit.org/show_bug.cgi?id=24396 + + Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now. + + * WebKitPrefix.h: + +2009-03-17 Kevin Ollivier <kevino@theolliviers.com> + + Reviewed by Mark Rowe. + + Get BUILDING_ON_* defines from Platform.h. + + https://bugs.webkit.org/show_bug.cgi?id=24630 + + * WebKitPrefix.h: + +2009-03-16 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction” + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only + post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard. + (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here. + +2009-03-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + Don't mig_deallocate random data in case an instance proxy method returns false. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCInvoke): + (WKPCInvokeDefault): + (WKPCGetProperty): + (WKPCEnumerate): + +2009-03-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/6633944> + REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin + + Defer loading while calling webPlugInInitialize since it can end up spinning the run loop. + + * Plugins/WebPluginController.mm: + (-[WebPluginController addPlugin:]): + +2009-03-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix <rdar://problem/6622601> + + Make sure to update both the window frame and the plug-in frame. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView addWindowObservers]): + +2009-03-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Adele Peterson. + + - fix <rdar://problem/6607773> WebKit should support the "Default" + paragraph writing direction -- or at least validate the menu item + appropriately + + Made WebHTMLView validate user interface items with the selector + -makeBaseWritingDirectionNatural: by returning NO and, if the item is + a menu item, setting its state to "off". + + Strictly speaking, since -makeBaseWritingDirectionNatural: is never + valid for WebViews, WebHTMLView should not need to respond to it and + validate it, however because other responders respond to all three + -makeBaseWritingDirection*: messages and set the menu item state, having + WebHTMLView do the same makes application developers' lives easier. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView makeBaseWritingDirectionNatural:]): + +2009-03-13 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dan Bernstein. + + Take advantage of the ability of recent versions of Xcode to easily switch the active + architecture. + + * Configurations/DebugRelease.xcconfig: + +2009-03-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker and Geoffrey Garen. + + <rdar://problem/6590384> + REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting + + When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call, + and thus calling -[WebView hostWindow] will crash since _private is nil. + + * WebView/WebView.mm: + (-[WebView hostWindow]): + +2009-03-13 Anders Carlsson <andersca@apple.com> + + And yet another attempt... + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): + (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + +2009-03-13 Anders Carlsson <andersca@apple.com> + + Another attempt at fixing the build. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa): + +2009-03-13 Anders Carlsson <andersca@apple.com> + + Try to fix the SL build. + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::keyDown): + +2009-03-13 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Simon Fraser. + + Update Geolocation perimission dialogs to be asynchronous. + https://bugs.webkit.org/show_bug.cgi?id=24505 + + WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the + coding style set by WebSecurityOrigin. + + WebChromeClient now calls the private UI delegate method + -webView:frame:requestGeolocationPermission:securityOrigin: + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestGeolocationPermissionForFrame): + * WebCoreSupport/WebGeolocation.mm: Added. + (WebCore::if): + (-[WebGeolocation shouldClearCache]): + (-[WebGeolocation setIsAllowed:]): + (-[WebGeolocation dealloc]): + * WebCoreSupport/WebGeolocationInternal.h: Added. + * WebCoreSupport/WebGeolocationPrivate.h: Added. + * WebView/WebUIDelegatePrivate.h: + +2009-03-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6610666> Revise the Cocoa event model text API + + Replace the text input API with a simpler API that uses a separate text input window. + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa): + Initialize m_keyEventHandler to 0. + + (WebNetscapePluginEventHandlerCocoa::keyDown): + If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery. + + (WebNetscapePluginEventHandlerCocoa::focusChanged): + Install/remove the key event handler as needed. + + (WebNetscapePluginEventHandlerCocoa::handleTSMEvent): + Get the text and send a TextInput event. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + Remove the old text input API. + + (-[WebNetscapePluginView inputContext]): + Always return nil here. + + * Plugins/npapi.mm: + * Plugins/nptextinput.h: Removed. + +2009-03-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Mike Thole and Mark Rowe. + + Fix <rdar://problem/6624105>. + + Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + +2009-03-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoffrey Garen. + + WebKit side of <rdar://problem/6607801> + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::destroy): + Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add requestID parameter. + +2009-03-12 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block. + +2009-03-12 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit + + This fix addresses crashes in both Silverlight and ChemDraw. This type of crash would occur because AppKit still + had a reference to open windows that the plugin created (which no longer exist). + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown. + +2009-03-11 David Kilzer <ddkilzer@apple.com> + + Remove duplicate header include + + Rubber-stamped by Mark Rowe. + + * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>. + Also realphabetized lowercase #include statements. + +2009-03-11 David Kilzer <ddkilzer@apple.com> + + Clarify comments regarding order of FEATURE_DEFINES + + Rubber-stamped by Mark Rowe. + + * Configurations/WebKit.xcconfig: Added warning about the + consequences when FEATURE_DEFINES are not kept in sync. + +2009-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebKit side of <rdar://problem/6656147>. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + Pass the requestID to _WKPHInstantiatePlugin. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + Pass the requestID to setCurrentReply. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::setCurrentReply): + Store the reply in a map with the requestID as the key. + + (WebKit::NetscapePluginInstanceProxy::waitForReply): + Wait for a reply that matches the given requestID. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Initialize member variables. + + (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): + Delete all requests. + + (WebKit::NetscapePluginInstanceProxy::print): + Pass the requestID to _WKPHPluginInstancePrint. + + (WebKit::NetscapePluginInstanceProxy::loadRequest): + Rename m_currentRequestID to m_currentURLRequestID. + + (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): + Process requests until we find a reply with the right requestID. + + (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): + Pass a requestID to the _WKPH function. + + (WebKit::NetscapePluginInstanceProxy::nextRequestID): + Ditto. + + * Plugins/Hosted/ProxyInstance.mm: + Pass a requestID to the _WKPH functions. + + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + Add requestID parameters. + +2009-03-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix <rdar://problem/6620064>. + + * Plugins/WebPluginContainerPrivate.h: + +2009-03-10 Xan Lopez <xlopez@igalia.com> + + Build fix, no review. + + * WebView/WebFrame.mm: + (-[WebFrame _smartDeleteRangeForProposedRange:]): + +2009-03-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + WebKit side of <rdar://problem/6530007> + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEnumerate): + Call NetscapePluginInstanceProxy::enumerate. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::enumerate): + Enumerate the JS object and serialize its values. + + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::getPropertyNames): + Ask the plug-in host to get the property names and deserialize them. + + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-03-09 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Oliver Hunt and Cameron Zwarich + + https://bugs.webkit.org/show_bug.cgi?id=24440 + + The sublayer added to WebHTMLView to host accelerated compositing layers needs to + be a subclass of NSView which allows context menu clicks through. + + * WebView/WebHTMLView.mm: + (-[WebLayerHostingView rightMouseDown:]): + (-[WebHTMLView attachRootLayer:]): + +2009-03-08 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that + Frame.h no longer needs to include it. This cuts the size of the symbols + for a debug build by around 3%. + + * Plugins/WebNetscapePluginView.mm: + * WebView/WebFrame.mm: + (-[WebFrame _scrollDOMRangeToVisible:]): + (-[WebFrame _insertParagraphSeparatorInQuotedContent]): + (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView jumpToSelection:]): + (-[WebHTMLView centerSelectionInVisibleArea:]): + +2009-03-07 Dan Bernstein <mitz@apple.com> + + Reviewed by Alexey Proskuryakov. + + - fix a bug where debug builds were clearing the HTML5 application cache + on application termination + + * WebView/WebView.mm: + (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of + -[WebCache empty]. + +2009-03-06 Douglas R. Davidson <ddavidso@apple.com> + + Reviewed by Justin Garcia. + + https://bugs.webkit.org/show_bug.cgi?id=24108 + + Update spelling and grammar checking to use the new combined text + checking (with automatic language identification) on Snow Leopard. + + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::checkSpellingAndGrammarOfParagraph): + +2009-03-05 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=24079 + <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape + <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field + + * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]): + If WebKit does not support the command, we need to pass the selector to super. In this case, + we'll consider the event not to be handled. This is not perfect because in theory, [super doCommandBySelector:] + can do some action that would cause WebKit to need to consider the event handled. But in practice, I've found no + example of that happening and causing broken behavior. + +2009-03-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _lookUpInDictionaryFromMenu:]): + +2009-03-04 Adam Barth <abath@webkit.org> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=24356 + + Fix WebKit style for allowUniversalAccessFromFileURLs. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences allowUniversalAccessFromFileURLs]): + (-[WebPreferences setAllowUniversalAccessFromFileURLs:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-03-03 David Kilzer <ddkilzer@apple.com> + + <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase + + Reviewed by Mark Rowe. + + The fix is to add INSTALLHDRS_COPY_PHASE = YES and + INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to + make sure various build phase scripts work with the installhdrs + build phase. + + * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME + based on PLATFORM_NAME to work around the missing definition on + Tiger. + * Configurations/WebKit.xcconfig: Added + WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of + UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the + Xcode project file. Added INSTALLHDRS_COPY_PHASE = YES and + INSTALLHDRS_SCRIPT_PHASE = YES. + +2009-03-03 David Kilzer <ddkilzer@apple.com> + + Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit + + Reviewed by Adam Roben. + + Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465 + since NPAPI headers had migrated from JavaScriptCore to WebCore + before that. + + * Configurations/WebKit.xcconfig: Removed definition of + JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds. + +2009-03-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix <rdar://problem/6633834>. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + Create a new plug-in instance if the plug-in host has crashed. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invalidate): + Add a null check for the plug-in host proxy. + +2009-03-02 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Enable Geolocation (except on Tiger and Leopard). + + * Configurations/WebKit.xcconfig: + +2009-03-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + WebKit part of <rdar://problem/6638658>. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::createPropertyListFile): + Spawn the plug-in host and wait for it to create the property list. + + * Plugins/WebBasePluginPackage.mm: + (-[WebBasePluginPackage createPropertyListFile]): + Factor code out into a new method. + + (-[WebBasePluginPackage pListForPath:createFile:]): + Call the newly added createPropertyListFile method. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage createPropertyListFile]): + Tell the plug-in host manager to create a property list file for us. + +2009-03-02 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + Fix for <rdar://problem/6507404> Add Geolocation support. + + This is not yet turned on for any Mac platform. + + Add SPI to ask the embedding application whether to allow + Geolocation for an origin. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::shouldAllowGeolocationForFrame): + * WebView/WebUIDelegatePrivate.h: + +2009-03-02 Anders Carlsson <andersca@apple.com> + + Fix PowerPC build. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _tryLoad]): + +2009-03-02 Anders Carlsson <andersca@apple.com> + + Reviewed by John Sullivan, Ada Chan. + + Factor loading code out into its own method and get rid of a bunch of gotos. + + * Plugins/WebNetscapePluginPackage.mm: + (-[WebNetscapePluginPackage _tryLoad]): + (-[WebNetscapePluginPackage load]): + +2009-03-02 Anders Carlsson <andersca@apple.com> + + Build fix. + + * Plugins/WebNetscapeDeprecatedFunctions.h: + +2009-03-02 Anders Carlsson <andersca@apple.com> + + Reviewed by John Sullivan. + + Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm + + * Plugins/WebNetscapePluginPackage.m: Removed. + * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m. + +2009-03-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebKit side of <rdar://problem/6449689> + + Pass the visible name to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::spawnPluginHost): + +2009-02-27 Alice Liu <alice.liu@apple.com> + + Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg" + extension to images that already have .jpg extension + + Reviewed by Oliver Hunt. + + * WebView/WebHTMLView.mm: + (-[NSString matchesExtensionEquivalent:]): + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): + Relax the check for the proper extension to allow for known + equivalents, special-cased in matchesExtensionEquivalent function. + +2009-02-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoffrey Garen. + + <rdar://problem/6631436> + CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55 + + Port the NPN_Evaluate code over from WebCore instead of using the frame loader. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + +2009-02-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoffrey Garen. + + WebKit side of <rdar://problem/6626814>. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvokeDefault): + Make InvokeDefault async. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + Handle passing NPObjects back to the plug-in host. + + * Plugins/Hosted/ProxyInstance.h: + (WebKit::ProxyInstance::objectID): + Add objectID getter. + + * Plugins/Hosted/WebKitPluginClient.defs: + Make InvokeDefault a simpleroutine. + +2009-02-27 Timothy Hatcher <timothy@apple.com> + + Fixes an exception by null checking the WebResource before adding it to + the subresources array. + + <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception + + Reviewed by Geoff Garen and Anders Carlsson. + + * WebView/WebDataSource.mm: + (-[WebDataSource subresources]): Null check the WebResource before adding it. + +2009-02-27 Timothy Hatcher <timothy@apple.com> + + Adds a workaround for Automator creating a WebView from a secondary thread. + + <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on + secondary thread beneath -[WebView initWithFrame:frameName:groupName:] + + Reviewed by Geoff Garen. + + * WebView/WebView.mm: + (needsWebViewInitThreadWorkaround): Check for com.apple.Automator. + +2009-02-27 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add a preference to reduce the power of file:// URLs. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences allowUniversalAccessFromFileUrls]): + (-[WebPreferences setAllowUniversalAccessFromFileUrls:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-02-27 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Anders Carlsson + + https://bugs.webkit.org/show_bug.cgi?id=24242 + + setCursor(), and resetCursorRects() on Tiger, were using global, not local + coordinates for elementAtPoint: + + * WebView/WebHTMLView.mm: + (resetCursorRects): + (setCursor): + +2009-02-27 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add a preference to reduce the power of file:// URLs. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences allowUniversalAccessFromFileUrls]): + (-[WebPreferences setAllowUniversalAccessFromFileUrls:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-02-26 Adele Peterson <adele@apple.com> + + Reviewed by Geoff Garen. + + Fix for <rdar://problem/6618166> + https://bugs.webkit.org/show_bug.cgi?id=24216 + (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message + + During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status, + we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing. + This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive. + + In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were + fixed in r36919 and r38570 are still fixed. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder. + (-[WebHTMLView _isResigningFirstResponder]): Added. + * WebView/WebHTMLViewInternal.h: + * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active + if the document view is currently resigning first responder. + +2009-02-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Fix <rdar://problem/6623697>. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::print): + Ask the plug-in host to print, create a CGImage of the returned bytes and draw + the image into the passed in context. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView drawRect:]): + When printing, call NetscapePluginInstanceProxy::print. + + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-02-19 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=24024 + REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when + archiving a submission to about:blank + + I don't know how to make an automated test for this bug. + + * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): + Account for the fact that HTTP method may be non-empty for non-HTTP requests. + +2009-02-25 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin. + + Naming change from + Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail + https://bugs.webkit.org/show_bug.cgi?id=24143 + + * WebView/WebFrame.mm: + (-[WebFrame _accessibilityTree]): + +2009-02-25 Simon Fraser <simon.fraser@apple.com> + + Build fix with ACCELERATED_COMPOSITING turned on. + + I missed a spot in my last commit in renaming to + _stoppedAcceleratedCompositingForFrame: + + * WebView/WebHTMLView.mm: + (-[WebHTMLView close]): + +2009-02-25 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein + + https://bugs.webkit.org/show_bug.cgi?id=23854 + + Make an observable property, _isUsingAcceleratedCompositing, on + WebView that DumpRenderTree can use to specialize behavior. + + This is implemented via a count of Frames that are using + accelerated compositing. + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate clear]): + (-[WebHTMLView close]): + (-[WebHTMLView attachRootLayer:]): + (-[WebHTMLView detachRootLayer]): + * WebView/WebView.mm: + (+[WebView automaticallyNotifiesObserversForKey:]): + (-[WebView _startedAcceleratedCompositingForFrame:]): + (-[WebView _stoppedAcceleratedCompositingForFrame:]): + (-[WebView _isUsingAcceleratedCompositing]): + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2009-02-24 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + Related to <rdar://problem/6590295> + Allow disabling javascript: urls. + + * WebView/WebView.mm: + (-[WebView _setJavaScriptURLsAreAllowed:]): + * WebView/WebViewPrivate.h: + +2009-02-24 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros + + * Carbon/CarbonUtils.h: + * Carbon/HIWebView.h: + * Plugins/WebPlugin.h: + * Plugins/WebPluginViewFactory.h: + * WebView/WebUIDelegate.h: + +2009-02-24 Peter Ammon <pammon@apple.com> + + Reviewed by Mark Rowe. + + Fix <rdar://problem/6251410> Services can modify non-editable content in Safari + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle + both the send and return type. We should also handle a nil send or return type by ignoring + the argument and returning whether we can handle the other type passed in. + +2009-02-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoffrey Garen and Darin Adler. + + WebKit side of <rdar://problem/6613151>. + + Make sure to vm_deallocate all memory we get from MIG callbacks. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (DataDeallocator::DataDeallocator): + (DataDeallocator::~DataDeallocator): + Add a simple deallocator class. + + (WKPCStatusText): + (WKPCLoadURL): + (WKPCBooleanAndDataReply): + (WKPCEvaluate): + (WKPCGetStringIdentifier): + (WKPCInvoke): + (WKPCInvokeDefault): + (WKPCConstruct): + (WKPCSetProperty): + Use the new deallocator class. + +2009-02-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix <rdar://problem/6450656>. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::insertText): + Add insert text which just calls the new WKPH function. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView inputContext]): + Get the input context from the shared input panel. + + (-[WebHostedNetscapePluginView keyDown:]): + Let the shared input panel have a go at the event first. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add new InsertText function. + +2009-02-23 Mark Rowe <mrowe@apple.com> + + Fix the build after r41126. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + +2009-02-22 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen + + * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error + in r30741, and assign the height value, rather than the width, to the + "height" parameter. + +2009-02-21 Anders Carlsson <andersca@apple.com> + + Fix build. + + * Plugins/Hosted/WebTextInputWindowController.m: + +2009-02-20 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add a shared floating text input window implementation, to be used by the hosted plug-in view. + + * Plugins/Hosted/WebTextInputWindowController.h: Added. + * Plugins/Hosted/WebTextInputWindowController.m: Added. + +2009-02-20 Kevin Decker <kdecker@apple.com> + + Reviewed by andersca. + + <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file + + Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data + we are trying to set. Depending on what other I/O is going on, it can take some time. + + * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h + (setMetaData): Added. Calls WKSetMetadataURL(). + (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread + +2009-02-19 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027 + Do not send loader callbacks during CSS styling + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Reverted the + iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>. + +2009-02-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Brady Eidson. + + - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Activate the WebCore + workaround for this crash in iChat. + +2009-02-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix for <rdar://problem/6542390> + + There's no need to call setDefersLoading here - we already defer anything a plug-in can do that + would cause a load to begin. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + +2009-02-18 Adam Roben <aroben@apple.com> + + Add SPI to get WebKit's custom pointing-hand cursor + + Reviewed by John Sullivan. + + * WebView/WebView.mm: + (+[WebView _pointingHandCursor]): Added. Returns the custom + pointing-hand cursor that WebKit uses. + * WebView/WebViewPrivate.h: Added +_pointingHandCursor. + +2009-02-17 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Antti Koivisto. + + https://bugs.webkit.org/show_bug.cgi?id=23917 + Allow a WebKit plug-in to act as a proxy for the <audio> and <video> + element. + + * Plugins/WebPluginContainerPrivate.h: + * Plugins/WebPluginController.mm: + (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element + (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement + (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by + file extension, only want a match for the new MIME type proxy plug-ins should have. + +2009-02-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6584834> ESPN radio live stream link hangs Safari + + When a plug-in invokes JavaScript code that will destroy the plug-in, we need to + defer destruction until we're done executing the script. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer): + (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer): + Add a simple RAII object for deferring destruction of the plug-in instance. + + (WKPCEvaluate): + (WKPCInvoke): + (WKPCInvokeDefault): + (WKPCConstruct): + (WKPCGetProperty): + (WKPCSetProperty): + (WKPCRemoveProperty): + (WKPCHasProperty): + (WKPCHasMethod): + Use the PluginDestroyDeferrer. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::pluginID): + Assert that the plug-in ID is not 0 here. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Initialize the call depth. + + (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): + Set the plug-in ID to 0 to aid debugging. + + (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction): + Increment the call depth. + + (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction): + Decrement the call depth, if it's 0 and we should stop the plug-in, do so. + + (WebKit::NetscapePluginInstanceProxy::shouldStop): + If we're called this with a non-zero call depth, set shouldStopSoon to true. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView shouldStop]): + Call the proxy. + +2009-02-12 Brady Eidson <beidson@apple.com> + + Reviewed by Kevin Decker + + <rdar://problem/6582180> - Wrong HTTP method applied to history item. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any + redirected request. + +2009-02-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6579412> + REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView userAgent]): + Apply workaround for Silverlight workaround. + + (-[WebNetscapePluginView _createPlugin]): + Check if the plug-in that we're creating is the silverlight plug-in. + +2009-02-12 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + Fix potential ref-count or null-deref problems with C++ objects as Obj-C members. + + * History/WebBackForwardList.mm: + (-[WebBackForwardList dealloc]): Null check before deref()'ing. + (-[WebBackForwardList finalize]): Ditto. + + * Misc/WebIconFetcher.mm: + (-[WebIconFetcher dealloc]): Null check before deref()'ing. + (-[WebIconFetcher finalize]): Ditto. + + * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref(). + (-[WebEditCommand initWithEditCommand:]): + (-[WebEditCommand dealloc]): + (-[WebEditCommand finalize]): + (-[WebEditCommand command]): + + * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref(). + (-[WebArchivePrivate init]): + (-[WebArchivePrivate initWithCoreArchive:]): + (-[WebArchivePrivate coreArchive]): + (-[WebArchivePrivate setCoreArchive:]): + (-[WebArchivePrivate dealloc]): + (-[WebArchivePrivate finalize]): + + * WebView/WebDataSource.mm: + (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing. + (-[WebDataSourcePrivate finalize]): Ditto. + +2009-02-12 Brady Eidson <beidson@apple.com> + + Reviewed by Kevin Decker + + <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit + + NSHTMLReader tries to create a WebArchive from a random chunk of data. Previously, WebArchive creation would + fail and return nil and NSHTMLReader would try something else. When we changed the behavior to return an invalid + WebArchive object, things started getting weird. + + * WebView/WebArchive.mm: + (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref() + (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref(). + (-[WebArchivePrivate finalize]): Ditto + (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object. + +2009-02-11 Mark Rowe <mrowe@apple.com> + + Fix the build. + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense. + +2009-02-11 Brady Eidson <beidson@apple.com> + + Reviewed by Mark Rowe + + <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative + + Remove the item from the date caches before registering the visit. Otherwise it might not be successfully removed + and when we add it back later it will exist in the list twice. This will cause the entry to be written out twice, + which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged. + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls. + (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded + if an entry for the URL already exists. Use that mode when reading the History.plist so only the most + recent entry for a given URL will be used. + (-[WebHistoryPrivate addItems:]): + (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): + +2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com> + + Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645). + This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown. + + Reviewed by Timothy Hatcher. + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::hiddenPanels): + +2009-02-11 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/6562920> Pasted text should be normalized to NFC + + * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through + -[NSString precomposedStringWithCanonicalMapping]. + + * WebCoreSupport/WebPasteboardHelper.mm: + (WebPasteboardHelper::plainTextFromPasteboard): Ditto. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): + Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be + precomposed already, and the conversion is performed outside WebKit for those anyway. + +2009-02-10 John Sullivan <sullivan@apple.com> + + Reviewed by Dan Bernstein + + <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300> + Negative visit counts stored in History.plist aren't corrected. + + It's not clear how a huge negative visit count ended up in History.plist, but we can't + trust data read from disk so we can at least reset this to something sane. WebCore has + no guard against a visit count overflowing an int, but that seems very unlikely to have + caused this. + + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): + If a negative visit count is in the dictionary, replace it with 1. If a negative daily or + weekly visit count is in the dictionary, replace it with 0. + +2009-02-10 John Sullivan <sullivan@apple.com> + + Reviewed by Dan Bernstein + + <https://bugs.webkit.org/show_bug.cgi?id=23891> + [WebHistoryItem _setVisitCount:] is unused and should be removed + + * History/WebHistoryItem.mm: + (-[WebHistoryItem _setVisitCount:]): + removed this unused method, which is a synonym for setVisitCount: that was introduced + recently and abandoned even more recently + + * History/WebHistoryItemInternal.h: + removed declaration of _setVisitCount: + +2009-02-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/6573916> + CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + If we failed to instantiate the plug-in, invalidate the instance proxy. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invalidate): + Remove the instance from the plug-in host's set. + + (WebKit::NetscapePluginInstanceProxy::destroy): + Call invalidate(). + +2009-02-09 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>. + Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not + yet been initialized if this WebHTMLView was loaded from a nib. + (-[WebHTMLView _removeSuperviewObservers]): Ditto. + +2009-02-09 Eric Seidel <eric@webkit.org> + + Reviewed by Dave Hyatt. + + Rename Selection to VisibleSelection to allow us to separate + the selections the user works with from the ones used by + the JS editing APIs. + https://bugs.webkit.org/show_bug.cgi?id=23852 + + * WebView/WebFrame.mm: + (-[WebFrame _selectNSRange:]): + * WebView/WebView.mm: + (-[WebView textIteratorForRect:]): + +2009-02-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Fix crash when plug-in host dies. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::didFail): + +2009-02-05 Eric Seidel <eric@webkit.org> + + Reviewed by Justin Garcia. + + DOMSelection.getRangeAt() returns a different range than the selection + https://bugs.webkit.org/show_bug.cgi?id=23601 + + Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range + + * WebView/WebFrame.mm: + (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]): + (-[WebFrame _markDOMRange]): + (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): + (-[WebFrame _selectedNSRange]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _selectedRange]): + (-[WebTextCompleteController doCompletion]): + (-[WebHTMLView selectedAttributedString]): + * WebView/WebView.mm: + (-[WebView textIteratorForRect:]): + (-[WebView selectedDOMRange]): + +2009-02-06 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Part III of <rdar://problem/6552272>. + + Refactored to use the redirect data WebCore makes available, instead of + tracking loading state in WebKit. + + * History/WebHistory.mm: + (-[WebHistoryPrivate dealloc]): + (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): + (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): + * History/WebHistoryInternal.h: + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): + (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): + +2009-02-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6562220> + CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port + + Make the handling of crashes in the plug-in host more robust. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + Add m_portSet. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + Initialize m_portSet. + + (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): + Free m_portSet. + + (WebKit::NetscapePluginHostProxy::processRequests): + Listen for messages on the port set. If we get a message to the port death notification port, + then call pluginHostDied. Otherwise, process the message. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::cleanup): + Factor code that should be shared between destroy() and pluginHostDied() into cleanup. + + (WebKit::NetscapePluginInstanceProxy::destroy): + Call cleanup(). + + (WebKit::NetscapePluginInstanceProxy::pluginHostDied): + Call cleanup(). + + (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): + Call NetscapePluginHostProxy::processRequests. + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invalidate): + Add a null check for the host proxy. + +2009-02-06 Dan Bernstein <mitz@apple.com> + + - try to fix the Tiger build + + * Misc/WebNSArrayExtras.h: + +2009-02-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6563650> + Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually) + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView loadStream]): + (-[WebNetscapePluginView pluginView:receivedData:]): + (-[WebNetscapePluginView _shouldCancelSrcStream]): + +2009-02-05 Maciej Stachowiak <mjs@apple.com> and Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein and Geoff Garen. + + - WebKit code to track per-day and per-week visit counts in history + + For now this data is only exposed via SPI for performance reasons. + + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support + for new data. + (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit. + (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data. + (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor. + (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor. + * History/WebHistoryItemInternal.h: Declare new methods. + * History/WebHistoryItemPrivate.h: Ditto. + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use + the new _recordInitialVisit method instead of setting visit count to 1. + + * Misc/WebNSArrayExtras.h: + * Misc/WebNSArrayExtras.m: + (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray + (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray + +2009-02-05 Aaron Boodman <aa@chromium.org> + + Reviewed by Dave Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=23708 + Adds documentElementAvailable() callback to FrameLoaderClient. + + * WebCoreSupport/WebFrameLoaderClient.h: + Stub out documentElementAvailable(). + * WebCoreSupport/WebFrameLoaderClient.mm: + Ditto. + +2009-02-05 Dan Bernstein <mitz@apple.com> + + - build fix + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::initGlobalCallFrame): + +2009-02-05 Beth Dakin <bdakin@apple.com> + + Reviewed by John Sullivan and Brady Eidson. + + Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a + mail note message doesn't display it in Mail's preview pane + + This was failing because revision 36962 removed a version of + setVerticalScrollingMode that mail calls. This patch simply adds + that method back. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): + +2009-02-04 Anders Carlsson <andersca@apple.com> + + Build fix fix. + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::initGlobalCallFrame): + +2009-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines. + + Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCInvoke): + (WKPCGetProperty): + (WKPCHasProperty): + (WKPCHasMethod): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Fix 64-bit build. + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::initGlobalCallFrame): + +2009-02-04 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + Part I of <rdar://problem/6552272>. + + Clear the redirectURLs entry when first visiting a site, so sites that + only redirect you the first time you visit them can later learn that + they don't redirect. + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]): + +2009-02-04 Timothy Hatcher <timothy@apple.com> + + Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed. + + <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int + + Reviewed by Oliver Hunt. + + * WebView/WebScriptDebugDelegate.h: + +2009-02-04 Timothy Hatcher <timothy@apple.com> + + Switched over from using the WebSafeForwarder for the Script Debug + delegate and added high performance CallScriptDebugDelegate functions. + + <rdar://problem/6508457> Launching widget in Dashcode debugger is + super-slow due forwardInvocation: calling debug delegate + + Reviewed by Oliver Hunt. + + * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed. + * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed. + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate. + (WebScriptDebugger::sourceParsed): Ditto. + (WebScriptDebugger::callEvent): Ditto. + (WebScriptDebugger::atStatement): Ditto. + (WebScriptDebugger::returnEvent): Ditto. + (WebScriptDebugger::exception): Ditto. + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder. + (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the + method implementations for the script debug delegate. Also caches what + didParseSource method to use. + (WebViewGetScriptDebugDelegateImplementations): Added. Returns the + WebScriptDebugDelegateImplementations structure. + (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations. + (CallDelegate): Added more overloaded versions that take different arguments. + (CallScriptDebugDelegate): Added overloaded versions that take different arguments. + * WebView/WebViewInternal.h: + +2009-02-03 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dave Hyatt + + https://bugs.webkit.org/show_bug.cgi?id=23365 + + Hook up accelerated compositing layers the native + view system on Mac. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::attachRootGraphicsLayer): + (WebChromeClient::setNeedsOneShotDrawingSynchronization): + New methods to hook up the root GraphicsLayer to the native + view system, and to synchronize layer changes with view-based + drawing when layers come and go. + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate clear]): + Clear the pointer to layerHostingView. + + (-[WebHTMLView _setAsideSubviews]): + (-[WebHTMLView willRemoveSubview:]): + Keep the special layer-hosting view in the subviews even + when the rest of the subviews are ripped out for + painting. + + (-[WebHTMLView _isUsingAcceleratedCompositing]): + New utility method for DumpRenderTree to know if we're + hosting layers. + + (-[WebHTMLView drawRect:]): + Call -disableScreenUpdatesUntilFlush if we have to + synchronize layer changes with painting. + + (-[WebHTMLView attachRootLayer:]): + (-[WebHTMLView detachRootLayer]): + Attach and detach the root GraphicsLayer. + + * WebView/WebViewInternal.h: + * WebView/WebHTMLViewInternal.h: + * WebView/WebHTMLViewPrivate.h: + New method declarations. + + * WebView/WebView.mm: + (-[WebView _needsOneShotDrawingSynchronization]): + (-[WebView _setNeedsOneShotDrawingSynchronization:]): + Set the flag to say if we need to synchronize layer + changes and painting on the next -drawRect: call. + + (-[WebView viewWillMoveToWindow:]): + (-[WebView viewDidMoveToWindow]): + Call new notifications that the view was added to or removed from + the window, which are required by the layer hosting mechanism. + +2009-02-02 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * Plugins/WebPluginController.mm: + (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): + +2009-02-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Track redirects in global history. + + * History/WebHistory.mm: + (-[WebHistoryPrivate dealloc]): + (-[WebHistoryPrivate lastVisitedEntry]): + (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history + entry in case we're asked to add redirect information to it later. + + (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]): + (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect + information in global history. + + * History/WebHistoryInternal.h: + * WebCoreSupport/WebFrameLoaderClient.h: See above and below. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): + (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect + information in global history. + + * WebView/WebFrame.mm: + (-[WebFrame loadRequest:]): + (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): + * WebView/WebFramePrivate.h: Updated for rename and extra parameter. + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Work around a limitation in MIG where two functions can't have the same name even if they're + not in the same subsystem. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement WKPCGetPluginElementObject. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetPluginElementNPObject): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView WebCore::]): + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Build fix. + + * WebView/WebHTMLView.mm: + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): + (-[WebBaseNetscapePluginView _windowClipRect]): + (-[WebBaseNetscapePluginView visibleRect]): + (-[WebBaseNetscapePluginView dataSource]): + * Plugins/WebKitPluginContainerView.h: Removed. + * Plugins/WebKitPluginContainerView.mm: Removed. + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): + (-[WebNetscapePluginView getVariable:value:]): + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Update for changes to WebCore. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + When a new Web View was not created, report back to the plug-in host. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::performRequest): + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView drawRect:]): + +2009-02-02 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Darin Adler. + + Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView + + https://bugs.webkit.org/show_bug.cgi?id=23428 + + FrameView::forceLayout could be killed but the comment might + contain a value over the the plain FrameView::layout... + + Adjust the WebCore/WebKit consumers of these methods. + + * WebView/WebFrame.mm: + (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): + +2009-01-31 John Sullivan <sullivan@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=23665 + + Cleaned up code to add/remove NSNotification observers, to avoid performance hit + of calling removeObserver with unspecified notifications, or calling removeObserver + multiple times for the same notification. + + Reviewed by Darin Adler + + * WebView/WebHTMLView.mm: + added observingMouseMovedNotifications, observingSuperviewNotifications, and + observingWindowNotifications as BOOL ivars of _private object + (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): + moved to file-internal section of file, added leading underscore, now bails out + if we aren't observing the relevant notifications, now records that we are no longer + observing the relevant notifications + (-[WebHTMLView _removeSuperviewObservers]): + ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch + (-[WebHTMLView _removeWindowObservers]): + ditto + (-[WebHTMLView close]): + replace general removeObserver: call with three specific calls for all the notifications + that this class actually observes + (-[WebHTMLView addMouseMovedObserver]): + bail out if already observing relevant notifications, now records that we are observing + the relevant notifications + (-[WebHTMLView removeMouseMovedObserver]): + updated for name change + (-[WebHTMLView addSuperviewObservers]): + bail out if already observing relevant notifications, now records that we are observing + the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var + to avoid objc dispatch + (-[WebHTMLView addWindowObservers]): + ditto + (-[WebHTMLView viewWillMoveToSuperview:]): + updated for name change + (-[WebHTMLView viewWillMoveToWindow:]): + updated for name changes + +2009-01-31 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + Fix code that assumes all command selectors end in colons. + rdar://problem/6545874 + + * WebView/WebHTMLView.mm: + (commandNameForSelector): Don't assert, just return a null string, when + the selector doesn't end in a colon. + +2009-01-30 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig. + + Add a pref to disable web security. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferencesPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + (-[WebPreferences isWebSecurityEnabled]): + (-[WebPreferences setWebSecurityEnabled:]): + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Darin Adler. + + Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler + + Carry out the move and catch up in two call sites. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): + +2009-01-30 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Darin Adler. + + isFrameSet was moved from Frame to Document. Update the + WebKit usage. + + * WebView/WebFrame.mm: + (-[WebFrame _isFrameSet]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView knowsPageRange:]): + +2009-01-30 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * WebView/WebFramePrivate.h: + +2009-01-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Split "lockHistory" into "lockHistory" and "lockBackForwardList" in + preparation for setting them differently during a redirect. + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): + +2009-01-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix <rdar://problem/6544048> + + Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated. + + When the plug-in instance is destroyed, invalidate all proxy instances. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::destroy): + (WebKit::NetscapePluginInstanceProxy::addInstance): + (WebKit::NetscapePluginInstanceProxy::removeInstance): + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::ProxyInstance): + (WebKit::ProxyInstance::~ProxyInstance): + (WebKit::ProxyInstance::invalidate): + +2009-01-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix <rdar://problem/6490778>. + + Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always + validate IdentifierReps before dereferencing them. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCGetStringIdentifier): + (WKPCGetIntIdentifier): + (identifierFromIdentifierRep): + (WKPCInvoke): + (WKPCGetProperty): + (WKPCSetProperty): + (WKPCRemoveProperty): + (WKPCHasProperty): + (WKPCHasMethod): + (WKPCIdentifierInfo): + +2009-01-30 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Remove FrameLoaderClient code that is now handled by FrameLoader itself + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::frameLoadCompleted): + +2009-01-29 Stephanie Lewis <slewis@apple.com> + + RS by Oliver Hunt. + + Update the order files. + + * WebKit.order: + +2009-01-29 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Second step in tracking the urls a HistoryItem was redirected through + Add SPI to access the array of redirect urls associated with a HistoryItem. + + * History/WebHistoryItem.mm: + (-[WebHistoryItem dictionaryRepresentation]): + (-[WebHistoryItem _redirectURLs]): + * History/WebHistoryItemPrivate.h: + +2009-01-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Always activate the plug-in host process if we're in "modal mode" and are being told to activate. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::pluginHostDied): + Call endModal here. + + (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive): + If we're modal, we should always bring the plug-in host process to the front. + + (WebKit::NetscapePluginHostProxy::beginModal): + Add an observer for the NSApplicationWillBecomeActiveNotification callback. + + (WebKit::NetscapePluginHostProxy::endModal): + Remove the observer. + +2009-01-29 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + First step in tracking the urls a HistoryItem was redirected through. + + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): + (-[WebHistoryItem dictionaryRepresentation]): + * Misc/WebNSDictionaryExtras.h: + * Misc/WebNSDictionaryExtras.m: + (-[NSDictionary _webkit_arrayForKey:]): Add helper. + +2009-01-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Pass the PSN of the client to the host, and get the PSN of the host back when checking in. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::hostForPackage): + Get the current PSN and pass it to spawnPluginHost. + + (WebKit::NetscapePluginHostManager::spawnPluginHost): + Pass the PSN to the "check in" function. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + + (WebKit::NetscapePluginHostProxy::pluginHostDied): + Fix a bug noticed by Julien Chaffraix. Call endModal if necessary. + + (WebKit::NetscapePluginHostProxy::beginModal): + (WebKit::NetscapePluginHostProxy::endModal): + (WebKit::NetscapePluginHostProxy::setModal): + Split out the code that does all of the work into beginModal and endModal methods. + + * Plugins/Hosted/WebKitPluginHost.defs: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView loadStream]): + +2009-01-29 David Kilzer <ddkilzer@apple.com> + + Remove semi-colons from the end of ObjC method implementations + + Rubber-stamped by Adam Roben. + + $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \; + + * DefaultDelegates/WebDefaultUIDelegate.m: + (-[WebDefaultUIDelegate webView:setResizable:]): + (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]): + (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]): + (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]): + * History/WebBackForwardList.mm: + (-[WebBackForwardList addItem:]): + (-[WebBackForwardList backListWithLimit:]): + (-[WebBackForwardList forwardListWithLimit:]): + * History/WebHistoryItem.mm: + (-[WebHistoryItem alternateTitle]): + (-[WebHistoryItem setViewState:]): + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]): + * Misc/WebKitNSStringExtras.m: + (-[NSString _web_drawAtPoint:font:textColor:]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView setAttributeKeys:andValues:]): + * WebCoreSupport/WebEditorClient.mm: + (-[WebEditCommand command]): + * WebView/WebFrame.mm: + (-[WebFrame _getVisibleRect:]): + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView elementAtPoint:allowShadowContent:]): + * WebView/WebPreferences.mm: + (-[WebPreferences setAllowsAnimatedImages:]): + (-[WebPreferences setAutosaves:]): + (-[WebPreferences PDFDisplayMode]): + * WebView/WebView.mm: + (+[WebView _viewClass:andRepresentationClass:forMIMEType:]): + (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): + (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]): + (+[WebView _registerViewClass:representationClass:forURLScheme:]): + (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]): + (-[WebView _insertNewlineInQuotedContent]): + +2009-01-28 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Updated for WebCore rename. + + * WebView/WebView.mm: + (-[WebView setCustomTextEncodingName:]): + +2009-01-28 David Kilzer <ddkilzer@apple.com> + + Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL] + + Reviewed by Dan Bernstein. + + * Misc/WebNSURLExtras.h: + (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing + declaration after the implementation was added in r9258. + +2009-01-28 Sam Weinig <sam@webkit.org> + + Reviewed by Geoff Garen. + + Fix for <rdar://problem/6129678> + REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations. + +2009-01-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + Fix two bugs with Core Animation based plug-ins. + + 1. The plug-in view was marked as opaque even though it's not. + (This would leave garbage in the plug-in view). + 2. The plug-in layer needs to have autoresizing turned on. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView setLayer:]): + +2009-01-27 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein + + Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage + + * History/WebHistoryItem.mm: + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::savePlatformDataToCachedFrame): + (WebFrameLoaderClient::transitionToCommittedFromCachedFrame): + * WebKit.order: + +2009-01-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add the ability for plug-ins to make WebKit operate in "modal mode" + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::pluginHostDied): + If the plug-in crashes while we're modal, make sure to leave the modal mode. + + (WebKit::NetscapePluginHostProxy::setModal): + (WKPCSetModal): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-26 John Sullivan <sullivan@apple.com> + + fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets + stuck in the Name field rather than cycling around + + Reviewed by Dan Bernstein + + * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: + * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: + The two static text fields and the last button all had their "next key view" outlets set to the + name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each + selectable view have exactly one "next key view" set to it. + +2009-01-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add the ability for a plug-in to show or hide the menu bar. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::pluginHostDied): + (WebKit::NetscapePluginHostProxy::setMenuBarVisible): + (WKPCSetMenuBarVisible): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-26 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Gavin Barraclough. + + Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames + <https://bugs.webkit.org/show_bug.cgi?id=23552> + <rdar://problem/6398839> + + Dashcode will crash when using the evaluator because it saves a global call + frame, even after global code has finished executing, and then uses this as + a launching pad to execute new JS in the evaluator. The fix is to detect + when Dashcode is attempting to do this and execute code from a global call + frame instead. + + * ForwardingHeaders/runtime/Protect.h: Added. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]): + Added debugger, a WebScriptDebugger* argument. + (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using + a stale WebScriptCallFrame to execute new JS and evaluate it starting from + the global object's global call frame instead. + * WebView/WebScriptDebugger.h: + (WebScriptDebugger::globalObject): Added. + (WebScriptDebugger::globalCallFrame): Added. + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject. + (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent + so that the global call frame can be saved immediately after being created. + (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of + WebScriptCallFrame's _initWithGlobalObject method. + +2009-01-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver Hunt. + + Make WKPCInvoke a simpleroutine. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvoke): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCBooleanAndDataReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::Reply::): + (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply): + Rename NPObjectInvokeReply to BooleanAndDataReply. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + Fix a cut and paste error. + + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + Handle NPObjects. + + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyField::valueFromInstance): + (WebKit::ProxyField::setValueToInstance): + Call the ProxyInstance method. + + (WebKit::ProxyInstance::~ProxyInstance): + Release the NPObject. + + (WebKit::ProxyInstance::supportsConstruct): + Ask the plug-in host if an instance supports construct. + + (WebKit::ProxyInstance::fieldValue): + (WebKit::ProxyInstance::setFieldValue): + Call the plug-in host methods. + + * Plugins/Hosted/WebKitPluginHostTypes.h: + Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType. + +2009-01-26 Mark Rowe <mrowe@apple.com> + + Fix the build. + + Remove -Wformat=2 from the warning flags as newer versions of GCC emit + warnings about non-literal format strings for uses of our UI_STRING macro. + + * Configurations/Base.xcconfig: + +2009-01-26 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Clean up after r40240. + + * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors. + * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs + is back in the build. + +2009-01-25 Darin Adler <darin@apple.com> + + * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C". + +2009-01-25 Darin Adler <darin@apple.com> + + Discussed with Mark Rowe; not sure he reviewed it. + + * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for + -Wcast-qual and -Wunused-parameter, which both need to be off at least for now. + +2009-01-25 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dan Bernstein. + + Improve the consistency of settings in our .xcconfig files. + + * Configurations/Base.xcconfig: Only dead code strip the normal variant. + Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS. + +2009-01-25 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Bug 23522: use checked casts for render tree + https://bugs.webkit.org/show_bug.cgi?id=23522 + + Step one: RenderText. + + * WebView/WebRenderNode.mm: + (copyRenderNode): Use toRenderText. + +2009-01-23 Brady Eidson <beidson@apple.com> + + Rubberstamped by Darin Adler + + Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role. + + * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h. + (WebCachedFramePlatformData::WebCachedFramePlatformData): + * WebCoreSupport/WebCachedPagePlatformData.h: Removed. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::savePlatformDataToCachedPage): + (WebFrameLoaderClient::transitionToCommittedFromCachedPage): + + * WebKit.order: + +2009-01-23 Adele Peterson <adele@apple.com> + + Build fix. + + Use new linesBoundingBox method instead of + boundingBoxWidth and boundingBoxHeight for RenderText objects. + + * WebView/WebRenderNode.mm: (copyRenderNode): + +2009-01-23 Anders Carlsson <andersca@apple.com> + + Fix 64-bit build. + + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::proxyClass): + +2009-01-23 Anders Carlsson <andersca@apple.com> + + Fix GCC 4.0 build. + + * Configurations/Base.xcconfig: + +2009-01-23 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Turn on -Wmissing-prototypes and fix the resulting warnings. + + * Configurations/Base.xcconfig: + * History/WebHistory.mm: + (timeIntervalForBeginningOfDay): + * History/WebHistoryItem.mm: + (historyItemWrappers): + * Misc/WebNSPasteboardExtras.mm: + (imageFromElement): + * WebView/WebFrame.mm: + * WebView/WebScriptDebugger.mm: + (toNSString): + +2009-01-22 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Anders Carlsson. + + Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily. + + Current versions of Xcode only respect it for C and Objective-C files, + and our code doesn't currently compile if it is applied to C++ and + Objective-C++ files. + + * Configurations/Base.xcconfig: + +2009-01-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add support for Invoke and InvokeDefault. Clean up code. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCBooleanReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::Reply::): + (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyInstance::invoke): + (WebKit::ProxyInstance::invokeMethod): + (WebKit::ProxyInstance::supportsInvokeDefaultMethod): + (WebKit::ProxyInstance::invokeDefaultMethod): + (WebKit::ProxyInstance::methodsNamed): + (WebKit::ProxyInstance::fieldNamed): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2009-01-22 Eric Roman <eroman@chromium.og> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=20806 + Deprecate RSSFeedReferrer() and setRSSFeedReferrer(). + + * History/WebHistoryItem.mm: + (-[WebHistoryItem RSSFeedReferrer]): + (-[WebHistoryItem setRSSFeedReferrer:]): + +2009-01-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Don't crash or hang when we fail to instantiate a plug-in. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + Return 0 on failure. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]): + Null check for the proxy member. + +2009-01-21 David Hyatt <hyatt@apple.com> + + Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox. + + Reviewed by Eric Seidel and Darin Adler + + * WebView/WebRenderNode.mm: + (copyRenderNode): + +2009-01-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + More browser->plug-in scripting support. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCNPObjectHasPropertyReply): + (WKPCNPObjectHasMethodReply): + (WKPCNPObjectInvokeReply): + MIG reply functions. + + (WKPCIdentifierInfo): + Return information about an identifier given its 64-bit value. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + Add new reply structs. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::addValueToArray): + Split out code that adds values to the arrays from marshalValue. + + (WebKit::NetscapePluginInstanceProxy::marshalValue): + Call addValueToArray. + + (WebKit::NetscapePluginInstanceProxy::marshalValues): + Marshal a list of values. + + (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): + Actually create a proxy instance. + + * Plugins/Hosted/ProxyInstance.h: + * Plugins/Hosted/ProxyInstance.mm: + (WebKit::ProxyClass::methodsNamed): + (WebKit::ProxyClass::fieldNamed): + Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class. + + (WebKit::proxyClass): + Shared proxyClass getter. + + (WebKit::ProxyField::ProxyField): + (WebKit::ProxyField::valueFromInstance): + (WebKit::ProxyField::setValueToInstance): + Add a proxy ProxyField class that just forwards everything to the ProxyInstance class. + + (WebKit::ProxyMethod::ProxyMethod): + (WebKit::ProxyMethod::serverIdentifier): + (WebKit::ProxyMethod::numParameters): + Add a dummy ProxyMethod class. + + (WebKit::ProxyInstance::invokeMethod): + Call _WKPHNPObjectInvoke. + + (WebKit::ProxyInstance::defaultValue): + (WebKit::ProxyInstance::stringValue): + (WebKit::ProxyInstance::numberValue): + (WebKit::ProxyInstance::booleanValue): + (WebKit::ProxyInstance::valueOf): + Add dummy implementations (taken from CInstance). + + (WebKit::ProxyInstance::methodsNamed): + Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists. + + (WebKit::ProxyInstance::fieldNamed): + Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists. + + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + Add new MIG definitions. + +2009-01-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Clean up how we force invocations of API that happened on background threads over to the main thread. + + This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments + and return values back from the function. The new approach is to use a proxy object that forwards an + NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner + call site. + + * Misc/WebNSObjectExtras.h: + * Misc/WebNSObjectExtras.mm: + (-[WebMainThreadInvoker initWithTarget:]): + (-[WebMainThreadInvoker forwardInvocation:]): + (-[WebMainThreadInvoker methodSignatureForSelector:]): + (-[WebMainThreadInvoker handleException:]): + (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was + raised back to the WebMainThreadInvoker. + (-[NSObject _webkit_invokeOnMainThread]): + + The following methods are updated to use the proxy object to forward methods to the main thread: + + * WebView/WebArchive.mm: + (-[WebArchive initWithMainResource:subresources:subframeArchives:]): + (-[WebArchive mainResource]): + (-[WebArchive subresources]): + (-[WebArchive subframeArchives]): + * WebView/WebResource.mm: + (-[WebResource data]): + (-[WebResource URL]): + (-[WebResource MIMEType]): + (-[WebResource textEncodingName]): + (-[WebResource frameName]): + (-[WebResource _ignoreWhenUnarchiving]): + (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): + (-[WebResource _initWithData:URL:response:]): + (-[WebResource _suggestedFilename]): + (-[WebResource _response]): + (-[WebResource _stringValue]): + * WebView/WebView.mm: + (-[WebView initWithFrame:frameName:groupName:]): + (-[WebView initWithCoder:]): + +2009-01-20 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> + + Reviewed by George Staikos. + + Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support) + + Protect text field related WebEditorClient.mm methods against non-HTMLElement callers. + WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements. + + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::textFieldDidBeginEditing): + (WebEditorClient::textFieldDidEndEditing): + (WebEditorClient::textDidChangeInTextField): + (WebEditorClient::doTextFieldCommandFromEvent): + (WebEditorClient::textWillBeDeletedInTextField): + (WebEditorClient::textDidChangeInTextArea): + +2009-01-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add and implement GetScriptableNPObject. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetScriptableNPObjectReply): + Create a new reply struct and set it as the current reply. + + (WKPCEvaluate): + Get rid of an unused variable. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::Reply::): + (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): + Call _WKPHGetScriptableNPObject and wait for a reply. + + * Plugins/Hosted/ProxyInstance.h: Added. + * Plugins/Hosted/ProxyInstance.mm: Added. + Add empty files. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]): + Call NetscapePluginInstanceProxy::createBindingsInstance. + + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + Add new declarations. + +2009-01-19 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Gavin Barraclough. + + Remove temporary operator-> from JSValuePtr. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + (WebKit::NetscapePluginInstanceProxy::marshalValue): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebView.mm: + (aeDescFromJSValue): + +2009-01-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make Evaluate an asynchronous method that has a reply method. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2009-01-19 Brady Eidson <beidson@apple.com> + + Rubberstamped by Tim Hatcher + + Fix long standing typo. + + * History/WebBackForwardList.h: + +2009-01-19 Mark Rowe <mrowe@apple.com> + + Fix the build! + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::demarshalValue): + (WebKit::NetscapePluginInstanceProxy::demarshalValues): + +2009-01-18 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>. + Bug 23414: Reproducible crash accessing View menu with plugins disabled + + * WebView/WebFrame.mm: + (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it. + +2009-01-17 David Hyatt <hyatt@apple.com> + + Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations + are done in WebCore instead. + + Reviewed by Oliver Hunt + + * WebView/WebFrame.mm: + (-[WebFrame _selectedString]): + (-[WebFrame _stringForRange:]): + +2009-01-17 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Adele Peterson + + Complete <rdar://problem/6293969> + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Remove UseSharedMediaUI + +2009-01-15 Brady Eidson <beidson@apple.com> + + Reviewed by Dan Bernstein + + Fix problem where a URL visited as non-GET once is flagged as non-GET forever. + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet + flag for all loads with an HTTP Method + +2009-01-14 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement InvokeDefault, Construct, GetProperty and SetProperty. + + Fully implement marshalValue. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvokeDefault): + (WKPCConstruct): + (WKPCGetProperty): + (WKPCSetProperty): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::invokeDefault): + (WebKit::NetscapePluginInstanceProxy::construct): + (WebKit::NetscapePluginInstanceProxy::getProperty): + (WebKit::NetscapePluginInstanceProxy::setProperty): + (WebKit::NetscapePluginInstanceProxy::marshalValue): + (WebKit::NetscapePluginInstanceProxy::demarshalValue): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-14 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Demarshal arguments and pass them to the JS call. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvoke): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): + (WebKit::NetscapePluginInstanceProxy::demarshalValues): + +2009-01-14 Mark Rowe <mrowe@apple.com> + + Reviewed by Timothy Hatcher. + + <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message + + Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread + that WebView uses. + + * WebView/WebArchive.mm: + (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:. + (-[WebArchive _initWithArguments:]): + * WebView/WebResource.mm: + (-[WebResource _initWithArguments:]): Unbox the BOOL argument. + +2009-01-14 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Fix crash I ran into while printing. I was unable to reproduce it, but also, + it's clear there's no guarantee that the frame will be non-zero in this case, + so it seems fine to check it. + + * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero + and don't do anything with it if it's zero. + +2009-01-14 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - update copyright + + * Info.plist: + +2009-01-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Add a bunch of methods to WebKitPluginClient.defs, and implement them. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::fromUTF8WithLatin1Fallback): + If the length isn't specified, get it by calling strlen. + + (WKPCEvaluate): + Evaluate doesn't take any arguments. + + (WKPCGetIntIdentifier): + Call _NPN_GetIntIdentifier. + + (identifierFromServerIdentifier): + New helper function that returns a JSC Identifier from an NPIdentifier. + + (WKPCInvoke): + Call identifierFromServerIdentifier. + + (WKPCRemoveProperty): + (WKPCHasProperty): + (WKPCHasMethod): + Call NetscapePluginInstanceProxy. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::removeProperty): + (WebKit::NetscapePluginInstanceProxy::hasProperty): + (WebKit::NetscapePluginInstanceProxy::hasMethod): + + * Plugins/Hosted/WebKitPluginClient.defs: + Add new definitions. + +2009-01-13 Anders Carlsson <andersca@apple.com> + + Fix build. + + * WebView/WebView.mm: + (-[WebView _initWithArguments:]): + +2009-01-13 Timothy Hatcher <timothy@apple.com> + + Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread. + + <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation) + + Reviewed by Darin Adler. + + * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND. + * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:. + * Misc/WebNSObjectExtras.mm: + (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments. + Passes the optional object to the selector. + (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:. + Put the optional object into the arguments dictionary. + (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object. + * WebView/WebResource.mm: + (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again. + (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new + _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread. + * WebView/WebView.mm: + (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method. + (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle. + (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread + to call _initWithArguments: passing the frame, frameName and groupName. + (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:. + +2009-01-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Deprecate JSValuePtr::getNumber() - two ways to get a number should be enough. + + * WebView/WebView.mm: + (aeDescFromJSValue): + +2009-01-12 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + <rdar://problem/6468274> - Track Non-get requests in global history + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): + * History/WebHistoryInternal.h: + + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): + (-[WebHistoryItem dictionaryRepresentation]): + (-[WebHistoryItem _lastVisitWasHTTPNonGet]): + * History/WebHistoryItemPrivate.h: + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load + +2009-01-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Move marshalling into NetscapePluginInstanceProxy. + + Add support for marshallin strings. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCInvoke): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::evaluate): + (WebKit::NetscapePluginInstanceProxy::invoke): + (WebKit::NetscapePluginInstanceProxy::marshalValue): + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2009-01-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement WKPCInvoke. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + (WKPCInvoke): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::idForObject): + (WebKit::NetscapePluginInstanceProxy::invoke): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCEvaluate): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::marshalValue): + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2009-01-12 Julien Chaffraix <jchaffraix@pleyo.com> + + Reviewed by Darin Adler. + + Bug 22861: Turn the FontCache into a singleton + https://bugs.webkit.org/show_bug.cgi?id=22861 + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics cachedFontDataCount]): + (+[WebCoreStatistics cachedFontDataInactiveCount]): + (+[WebCoreStatistics purgeInactiveFontData]): + Redirected all the static calls to the global FontCache + instance. + +2009-01-11 Dmitry Titov <dimich@chromium.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=23207 + Moved currentTime() to from WebCore to WTF. + + * WebView/WebFrame.mm: a different header file included. + +2009-01-10 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images + because of change to -[HTMLObjectElement data] + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread + violation check because I saw this being done off the main thread while testing Mail, and it + caused problems. Put all the one time initialization under a single guard to make things just + a little faster other times, and to make it clearer which things are one-time. Added a call to + the new patchMailRemoveAttributesMethod function. + (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too, + because I assumed it would be slightly better to have a public method name in the violation + message. This calls commonInitialization later, so it will hit that one eventually. + (objectElementDataAttribute): Added. Just returns the value of the "data" attribute. + (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches + a WebKit method and removes the patch again on the way out. + (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then + applies the patch that fixes this bug. + +2009-01-09 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fixed <rdar://problem/6234347> Add/change conditional key + bindings for changing paragraph- and character-level writing + direction (to match NSTextView) + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added + code to validate makeBaseWritingDirectionLeftToRight: and + makeBaseWritingDirectionRightToLeft:. + (writingDirectionKeyBindingsEnabled): Changed this function to + always return YES, except on Tiger and Leopard. + (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed + changeBaseWritingDirectionToLTR: to this. + (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed + changeBaseWritingDirectionToRTL: to this. + (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls + makeBaseWritingDirectionLeftToRight:. + (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls + makeBaseWritingDirectionRightToLeft:. + * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight + and makeBaseWritingDirectionRightToLeft to + FOR_EACH_RESPONDER_SELECTOR. + +2009-01-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add and implement WKPCGetStringIdentifier. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetStringIdentifier): + * Plugins/Hosted/WebKitPluginClient.defs: + +2009-01-08 Stephanie Lewis <slewis@gmail.com> + + Fix Tiger build. + + * WebView/WebTextIterator.mm: + +2009-01-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add basic support for evaluating scripts. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::fromUTF8WithLatin1Fallback): + (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): + (WKPCReleaseObject): + (marshalValue): + (WKPCEvaluate): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::releaseObject): + (WebKit::NetscapePluginInstanceProxy::evaluate): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2009-01-08 David Hyatt <hyatt@apple.com> + + Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll + + Add a new ChromeClient method for handling exposure of scrolled rects. + + Reviewed by Oliver Hunt + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::scrollRectIntoView): + +2009-01-08 Darin Adler <darin@apple.com> + + Reviewed by Tim Hatcher. + + Bug 23185: add a currentRange method to the WebTextIterator SPI + https://bugs.webkit.org/show_bug.cgi?id=23185 + rdar://problem/6455834 + + I also noticed a garbage-collection-related threading issue that I fixed, and + that the SPI for getting text was unnecessarily inefficient, so I fixed that too. + + * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated" + category. Added currentTextPointer and currentTextLength. + + * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also + used _textIterator to be consistent with ObjC rather than C++ naming. + (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread, + since the finalize method here works with main-thread only WebCore objects. + (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now. + (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion, + since I don't think it provides much value. + (-[WebTextIterator atEnd]): Ditto. + (-[WebTextIterator currentRange]): Added. + (-[WebTextIterator currentTextPointer]): Added. + (-[WebTextIterator currentTextLength]): Added. + (-[WebTextIterator currentNode]): Did same as above, but also put into new category. + (-[WebTextIterator currentText]): Ditto. + +2009-01-08 Eric Carlson <eric.carlson@apple.com> + + Reviewed by Adele Peterson. + + Simplify Mac interfaces for drawing media controller elements + + <rdar://problem/6293969> + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Update for changes to media controller functions + +2009-01-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Fix build. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::idForObject): + +2009-01-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add a way for a plug-in to get a reference to the Window JS object. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCGetWindowNPObject): + Call the appropriate instance. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + Add object ID counter. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::destroy): + Clear the object ID map. + + (WebKit::NetscapePluginInstanceProxy::idForObject): + New method that returns a unique ID for a given JS object. + + (WebKit::NetscapePluginInstanceProxy::getWindowNPObject): + Return the object ID for the window JS object. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add GetWindowNPObject. + +2009-01-07 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed + https://bugs.webkit.org/show_bug.cgi?id=23160 + + * WebView/WebView.mm: + (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added. + (-[WebView areMemoryCacheDelegateCallsEnabled]): Added + * WebView/WebViewPrivate.h: Ditto. + +2009-01-05 Gavin Barraclough <baraclough@apple.com> + + Rubber Stamped by Oliver Hunt. + + Replace all uses of JSValue* with new wrapper class, JSValuePtr. + See JavaScriptCore/ChangeLog for more detailed description. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _convertValueToObjcValue:]): + (-[WebScriptCallFrame exception]): + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (aeDescFromJSValue): + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2009-01-06 Pierre-Olivier Latour <pol@apple.com> + + Reviewed by Darin Adler. + + Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT. + + https://bugs.webkit.org/show_bug.cgi?id=23126 + + * WebView/WebFrame.mm: + (-[WebFrame _numberOfActiveAnimations]): + * WebView/WebFramePrivate.h: + +2009-01-05 David Kilzer <ddkilzer@apple.com> + + Add SPI to enable, disable and check state of WebIconDatabase + + Reviewed by Darin Adler & Timothy Hatcher. + + Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:] + SPI to make it possible to enable, disable and check the state of + the icon database. + + * Misc/WebIconDatabase.mm: + (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase. + (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use + -isEnabled instead of -_isEnabled. + (-[WebIconDatabase iconURLForURL:]): Ditto. + (-[WebIconDatabase retainIconForURL:]): Ditto. + (-[WebIconDatabase releaseIconForURL:]): Ditto. + (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in + WebInternal category. + (-[WebIconDatabase setEnabled:]): Added. Takes care of changing + the enabled/disabled state of the icon database. + (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled + instead of -_isEnabled. + (-[WebIconDatabase _startUpIconDatabase]): Added. Extrated from + -init. + (-[WebIconDatabase _shutDownIconDatabase]): Added. Remove + observers when the icon database is disabled. + * Misc/WebIconDatabaseInternal.h: Added declarations for + -_startUpIconDatabase and -_shutDownIconDatabase. + * Misc/WebIconDatabasePrivate.h: Added declarations for + -isEnabled and -setEnabled:. + +2009-01-05 Brady Eidson <beidson@apple.com> + + Reviewed by Jon Honeycutt + + Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319> + + * History/WebHistoryItem.mm: + (-[WebHistoryItem _setLastVisitWasFailure:]): + * History/WebHistoryItemPrivate.h: + +2009-01-05 Adam Treat <adam.treat@torchmobile.com> + + Another blind mac build fix + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::contentsSizeChanged): + +2009-01-05 Adam Treat <adam.treat@torchmobile.com> + + Blind mac build fix + + * WebCoreSupport/WebChromeClient.mm: + +2009-01-05 Adam Treat <adam.treat@torchmobile.com> + + Fix mac build + + * WebCoreSupport/WebChromeClient.h: + +2009-01-05 Adam Treat <adam.treat@torchmobile.com> + + Reviewed by George Staikos. + + Build fix for contentsSizeChanged + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::contentsSizeChanged): + +2009-01-02 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears + inside its web view when resizing its window + https://bugs.webkit.org/show_bug.cgi?id=23072 + rdar://problem/6368028 + + The first attempt at fixing this did not work. + This time I was able to reproduce the bug and test the fix. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and + function names around a bit to make even less code at the call site. + (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the + Dictionary application in here. + (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to + applyAppleDictionaryApplicationQuirk here. This was a case I had missed before, + when the script is cached. This fixes one of the two problems with the initial + patch; the other fix is in WebCore. + (WebFrameLoaderClient::dispatchWillSendRequest): Changed the + applyAppleDictionaryApplicationQuirk call here to work the new simpler way. + + * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes. + +2009-01-02 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Darin Adler. + + Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down + <https://bugs.webkit.org/show_bug.cgi?id=23060> + <rdar://problem/6467830> + + After r38629, all keyboard events get sent by Editor to the EditorClient, even + if the selection is not editable. If the event's command is unsupported by + WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it + was not. When using the page up / page down keys, the events generated are of + the form scrollPageUp rather than movePageUp, so they are unsupported by + WebHTMLView and cause this bug to occur. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView doCommandBySelector:]): + +2009-01-02 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window + https://bugs.webkit.org/show_bug.cgi?id=23072 + rdar://problem/6368028 + + * WebCoreSupport/WebFrameLoaderClient.mm: + (isAppleDictionaryApplication): Added. + (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets + a flag to ask HTMLFrameElementBase to ignore the scrolling attribute. + (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to + apply the quirk when the relevant script is loaded. + +2008-12-26 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in + global history after a successful visit + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always + update the wasFailure flag on the HistoryItem. + +2008-12-23 Darin Adler <darin@apple.com> + + Reviewed by Alexey Proskuryakov (a slightly earlier version). + + - fix https://bugs.webkit.org/show_bug.cgi?id=22976 + crash due to Mail's use of WebArchive and WebResource on non-main thread + + * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of + WebKitRunningOnMainThread function, which was just a cover for pthread_main_np. + * Misc/WebKitLogging.m: Ditto. + + * Misc/WebKitVersionChecks.h: Added a version after which we won't do the + main thread workaround. + + * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:, + which performs a selector on the main thread, waits for it to complete, and then + returns the value on the caller thread. + * Misc/WebNSObjectExtras.mm: Added. + + * WebView/WebArchive.mm: + (-[WebArchive init]): Added WebCoreThreadViolationCheck. + (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform + initialization on main thread if needMailThreadWorkaround is true. + Also added WebCoreThreadViolationCheck. + (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck. + (-[WebArchive mainResource]): Get property on main thread if + needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. + (-[WebArchive subresources]): Ditto. + (-[WebArchive subframeArchives]): Ditto. + (-[WebArchive data]): Ditto. + (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck. + (-[WebArchive _coreLegacyWebArchive]): Ditto. + (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread + version of initWithMainResource above. + + * WebView/WebResource.mm: + (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck. + (-[WebResource data]): Get property on main thread if + needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. + (-[WebResource URL]): Ditto. + (-[WebResource MIMEType]): Ditto. + (-[WebResource textEncodingName]): Ditto. + (-[WebResource frameName]): Ditto. + (-[WebResource _ignoreWhenUnarchiving]): Ditto. + (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): + Perform initialization on main thread if needMailThreadWorkaround is true. + Also added WebCoreThreadViolationCheck. + (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation. + (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of + getting at coreResource directly. + (-[WebResource _response]): Get property on main thread if + needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck. + (-[WebResource _stringValue]): Ditto. + (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added. + (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread + version of _initWithData above. + + * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal + clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND + and the needMainThreadWorkaround helper function. + + * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h + file. This probably fixes clean builds. + * WebCoreSupport/WebIconDatabaseClient.mm: Ditto. + + * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h, + since it's not actually used. + * WebView/WebDataSource.mm: Ditto. + * WebView/WebHTMLRepresentation.mm: Ditto. + +2008-12-23 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - fix https://bugs.webkit.org/show_bug.cgi?id=22979 + crash seen in -[WebView drawsBackground] when quitting + <rdar://problem/6464601> + + * WebView/WebView.mm: + (-[WebView drawsBackground]): Added comment and a null check for _private. + +2008-12-22 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers. + +2008-12-19 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler, Adele Peterson, Brady Eidson. + + Added SPI for getting an unsorted vector of all items in history. + + * History/WebHistory.h: + * History/WebHistory.mm: + (-[WebHistory allItems]): + +2008-12-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - implement FrameLoaderClient::shouldUseCredentialStorage() by calling + a new resource load delegae method. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the + delegate method. If the method is unimplemented, returns true for + backwards compatibility. + * WebView/WebView.mm: + (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the + shouldUseCredentialStorageFunc member. + (CallResourceLoadDelegateReturningBoolean): Added. + * WebView/WebViewInternal.h: + * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method + -webView:resource:shouldUseCredentialStorageForDataSource:. + +2008-12-18 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Jonathan Honeycutt. + + Fix an apparent typo in r39385 that is causing lots of crashes. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout): + +2008-12-18 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan + + Initial visit to a website creates history items that start with a visit count of + zero instead of one + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items + + * History/WebHistoryItem.mm: + (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item + * History/WebHistoryItemInternal.h: + +2008-12-18 Sam Weinig <sam@webkit.org> + + Reviewed by John Sullivan. + + Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling + a new private frame load delegate method. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout): + * WebView/WebView.mm: + (-[WebView _cacheFrameLoadDelegateImplementations]): + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2008-12-16 Antti Koivisto <antti@apple.com> + + Reviewed by John Sullivan. + + Add version check for shift-reload behavior. + + * Misc/WebKitVersionChecks.h: + * WebView/WebFrame.mm: + (-[WebFrame reload]): + +2008-12-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Start sending keyboard events to the plug-in host. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::keyEvent): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView keyDown:]): + (-[WebHostedNetscapePluginView keyUp:]): + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6450538> + + Fix flag enumeration. + + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2008-12-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCLoadURL): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::loadURL): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2008-12-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Add trailing null to headers to avoid a crash in the plug-in host. + + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::didReceiveResponse): + +2008-12-15 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Cameron Zwarich. + + <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + +2008-12-15 Stephanie Lewis <slewis@apple.com> + + Fix build. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + +2008-12-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call + back into us while it's being instantiated. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * Plugins/Hosted/NetscapePluginHostProxy.h: + (WebKit::NetscapePluginHostProxy::clientPort): + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInstantiatePluginReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::Reply::): + (WebKit::NetscapePluginInstanceProxy::Reply::Reply): + (WebKit::NetscapePluginInstanceProxy::Reply::~Reply): + (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply): + (WebKit::NetscapePluginInstanceProxy::setCurrentReply): + (WebKit::NetscapePluginInstanceProxy::waitForReply): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Let WebKit generate a plug-in ID instead of having the plug-in host do it. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + Create the plug-in proxy before instantiating the plug-in. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::create): + (WebKit::NetscapePluginInstanceProxy::setRenderContextID): + (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + LoadURL doesn't need to be asynchronous. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCLoadURL): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-15 Antti Koivisto <antti@apple.com> + + Reviewed by Darin Adler. + + - Add [WebFrame reloadFromOrigin] for performing end-to-end reload. + - Add corresponding IBAction to WebView. + - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called. + + * WebView/WebFrame.h: + * WebView/WebFrame.mm: + (-[WebFrame reload]): + (-[WebFrame reloadFromOrigin]): + * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore. + * WebView/WebView.h: + * WebView/WebView.mm: + (-[WebView reloadFromOrigin:]): + +2008-12-14 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification + should add items to userInfo + + * History/WebHistory.mm: + (-[WebHistoryPrivate allItems]): Added this helper method, which returns + all values in the _entriesByURL dictionary. + (-[WebHistory removeAllItems]): Changed to send the array of all items + in the notification. + +2008-12-13 Darin Adler <darin@apple.com> + + - <rdar://problem/6441035> WebTextIterator class not exported in WebKit + + * WebKit.exp: Added the class. We forgot to export it when we added + the WebTextIterator SPI. + +2008-12-12 Darin Adler <darin@apple.com> + + Rubber stamped by Adam Roben. + + - fix <rdar://problem/5648301> Can't tab around to text fields in Safari + login sheet after clicking static text, due to AppKit key loop change + + * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed. + * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added. + * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed. + * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: + Set nextKeyView of the selectable static texts to the editable text. + Updated nib format. + +2008-12-12 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + Shrink Cache Sizes. + + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): + +2008-12-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Tim Hatcher. + + Don't try to free the dummy "1" port state. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + (-[WebNetscapePluginView updateAndSetWindow]): + +2008-12-11 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Mark Rowe. + + Roll out r39212 due to assertion failures during layout tests, multiple + layout test failures, memory leaks, and obvious incorrectness. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (-[WebPreferences fullDocumentTeardownEnabled]): + * WebView/WebPreferencesPrivate.h: + +2008-12-11 Stephanie Lewis <slewis@apple.com> + + Fix build. + + * WebView/WebView.mm: + +2008-12-11 Stephanie Lewis <slewis@apple.com> + + Reviewed by Oliver Hunt. + + Empty Web cache before quitting a debug build in order + to report accurate CachedResource leaks. + + * WebView/WebView.mm: + (-[WebView _close]): + +2008-12-11 Anders Carlsson <andersca@apple.com> + + Fix Tiger build. + + * Misc/WebNSDataExtras.h: + +2008-12-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Cameron Zwarich. + + https://bugs.webkit.org/show_bug.cgi?id=22797 + REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html + + Make sure to protect the stream because destroyStream can otherwise cause it to be deleted. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::destroyStreamWithReason): + +2008-12-10 Glenn Wilson <gwilson@google.com> + + Reviewed by Adam Roben. + + Added new methods for overriding default WebPreference values + and for resetting preferences to their defaults. + https://bugs.webkit.org/show_bug.cgi?id=20534 + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (-[WebPreferences resetToDefaults]): new method + (-[WebPreferences overridePreference:flag:]): new method + * WebView/WebPreferencesPrivate.h: new method signatures + +2008-12-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + Add stopAllStreams. + + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::stopAllStreams): + Factored out this from ::destroy. + + (WebKit::NetscapePluginInstanceProxy::destroy): + Call stopAllStreams(). + + (WebKit::NetscapePluginInstanceProxy::pluginHostDied): + Ditto. + + (WebKit::NetscapePluginInstanceProxy::loadURL): + Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now). + +2008-12-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Move two NSData category methods to WebNSDataExtras.m. + + * Misc/WebNSDataExtras.h: + * Misc/WebNSDataExtras.m: + (-[NSData _web_startsWithBlankLine]): + (-[NSData _web_locationAfterFirstBlankLine]): + * Plugins/WebNetscapePluginView.mm: + +2008-12-10 Alice Liu <alice.liu@apple.com> + + fixed https://bugs.webkit.org/show_bug.cgi?id=20685 + + Reviewed by Darin Adler. + + * Misc/WebNSPasteboardExtras.mm: + Ask image for its file extension instead of falling back on MIME type and file path. + Also moved this code to before setting the pasteboard data so as not to set any if + no extension can be determined. + (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]): + + * WebView/WebHTMLView.mm: + Fixed a separate but related long-standing bug of how the filename for the promised + drag data is determined by asking the image for a proper file extension. + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): + +2008-12-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix typecast. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): + +2008-12-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Implement software rendering of hosted plug-ins. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCInvalidateRect): + New MiG function. This is called by the plug-in host when it has drawn something. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + Create a software renderer. + + (-[WebHostedNetscapePluginView destroyPlugin]): + Destroy the software renderer. + + (-[WebHostedNetscapePluginView drawRect:]): + Draw using the software renderer. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add InvalidateRect. + +2008-12-09 Brett Wilson <brettw@chromium.org> + + Reviewed by Dave Hyatt. + + https://bugs.webkit.org/show_bug.cgi?id=22177 + + Add a callback on ChromeClient that the state of form elements on + the page has changed. This is to allow clients implementing session + saving to know when the current state is dirty. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::formStateDidChange): + +2008-12-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Make sure to pause null events for hosted plug-ins as well. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): + +2008-12-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): + Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>. + +2008-12-09 Timothy Hatcher <timothy@apple.com> + + Implement a few methods needed to keep Dictionary.app working on Leopard. + + <rdar://problem/6002160> Internal changes to WebKit in Safari 4 + Developer Preview might break Dictionary + + Reviewed by Dan Bernstein. + + * WebView/WebFrame.mm: + (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange. + (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods + that Dictionary.app is using. + +2008-12-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + More work towards getting NPN_GetURL working. + + * Plugins/Hosted/HostedNetscapePluginStream.h: + Inherit from NetscapePlugInStreamLoaderClient. + + (WebKit::HostedNetscapePluginStream::streamID): + * Plugins/Hosted/HostedNetscapePluginStream.mm: + (WebKit::HostedNetscapePluginStream::startStream): + Keep track of the resposne URL and the MIME type. Pass the response URL to the + plug-in host. + + (WebKit::HostedNetscapePluginStream::didFinishLoading): + Disconnect the stream. + + (WebKit::HostedNetscapePluginStream::start): + Create a plug-in stream loader and start loading. + + (WebKit::HostedNetscapePluginStream::stop): + Cancel the load. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCLoadURL): + Fix the parameter order. + + (WKPCCancelLoadURL): + New function that cancels a load of a stream with a given reason. + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::destroy): + Stop the streams. + + (WebKit::NetscapePluginInstanceProxy::pluginStream): + Return a plug-in stream given a stream ID. + + (WebKit::NetscapePluginInstanceProxy::disconnectStream): + Remove the stream from the streams map. + + (WebKit::NetscapePluginInstanceProxy::loadRequest): + Create a stream and load it. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add CancelLoadURL. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add responseURL to StartStream. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginPackage]): + Move this down to the base class from WebNetscapePluginView. + + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + +2008-12-08 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - WebKit/mac part of tracking the global history item for a WebView + + * WebView/WebView.mm: + (-[WebView _globalHistoryItem]): Added. Returns the page's global + history item. + * WebView/WebViewPrivate.h: + +2008-12-06 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dave Hyatt + + https://bugs.webkit.org/show_bug.cgi?id=15671 + + VisiblePosition::caretRect() was renaemd to absoluteCaretBounds(). + + * WebView/WebFrame.mm: + (-[WebFrame _caretRectAtNode:offset:affinity:]): + +2008-12-06 David Kilzer <ddkilzer@apple.com> + + Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives + + <https://bugs.webkit.org/show_bug.cgi?id=22666> + + Reviewed by Darin Adler. + + * DOM/WebDOMOperations.mm: + (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to + ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs(). + +2008-12-05 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page" + in Safari before opening a mail message in Mail + + * Carbon/CarbonWindowAdapter.m: Removed. + * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m. + (+[CarbonWindowAdapter initialize]): + * History/WebBackForwardList.mm: + (+[WebBackForwardList initialize]): + * History/WebHistoryItem.mm: + (+[WebHistoryItem initialize]): + * Misc/WebElementDictionary.mm: + (+[WebElementDictionary initialize]): + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (+[WebHostedNetscapePluginView initialize]): + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebBasePluginPackage.m: Removed. + * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m. + (+[WebBasePluginPackage initialize]): + * Plugins/WebNetscapePluginView.mm: + (+[WebNetscapePluginView initialize]): + * WebCoreSupport/WebEditorClient.mm: + (+[WebEditCommand initialize]): + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebView/WebArchive.mm: + (+[WebArchivePrivate initialize]): + * WebView/WebDataSource.mm: + (+[WebDataSourcePrivate initialize]): + * WebView/WebHTMLView.mm: + (+[WebHTMLViewPrivate initialize]): + (+[WebHTMLView initialize]): + * WebView/WebResource.mm: + (+[WebResourcePrivate initialize]): + * WebView/WebView.mm: + (+[WebViewPrivate initialize]): + Call JSC::initializeThreading(); + +2008-12-04 Stephanie Lewis <slewis@apple.com> + + Fix build. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCLoadURL): + +2008-12-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + More work on streams. + + * Plugins/Hosted/HostedNetscapePluginStream.h: Added. + (WebKit::HostedNetscapePluginStream::create): + * Plugins/Hosted/HostedNetscapePluginStream.mm: Added. + (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream): + (WebKit::HostedNetscapePluginStream::startStreamWithResponse): + (WebKit::HostedNetscapePluginStream::startStream): + (WebKit::HostedNetscapePluginStream::didReceiveData): + (WebKit::HostedNetscapePluginStream::didFinishLoading): + (WebKit::HostedNetscapePluginStream::didReceiveResponse): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::pluginView): + (WebKit::NetscapePluginInstanceProxy::hostProxy): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::request): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName): + (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture): + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::performRequest): + (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): + (WebKit::NetscapePluginInstanceProxy::requestTimerFired): + (WebKit::NetscapePluginInstanceProxy::loadRequest): + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView + but once we have a more complete implementation of NPStreams we can start refactoring things so that the + implementations can share more code. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WKPCLoadURL): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::loadURL): + (WebKit::NetscapePluginInstanceProxy::performRequest): + (WebKit::NetscapePluginInstanceProxy::requestTimerFired): + (WebKit::NetscapePluginInstanceProxy::loadRequest): + * Plugins/Hosted/WebKitPluginClient.defs: + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Move requestWithURLCString to WebBaseNetscapePluginView. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView requestWithURLCString:]): + * Plugins/WebNetscapePluginView.mm: + +2008-12-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Move WebPluginRequest to its own file. + + * Plugins/WebNetscapePluginView.mm: + * Plugins/WebPluginRequest.h: Added. + * Plugins/WebPluginRequest.m: Added. + (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]): + (-[WebPluginRequest dealloc]): + (-[WebPluginRequest request]): + (-[WebPluginRequest frameName]): + (-[WebPluginRequest isCurrentEventUserGesture]): + (-[WebPluginRequest sendNotification]): + (-[WebPluginRequest notifyData]): + +2008-12-03 Anders Carlsson <andersca@apple.com> + + Handle the CA model. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView setWindowIfNecessary]): + +2008-12-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6412293> + Call NPP_SetWindow for CA plug-ins. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebNetscapePluginView restorePortState:]): + (-[WebNetscapePluginView isNewWindowEqualToOldWindow]): + (-[WebNetscapePluginView updateAndSetWindow]): + (-[WebNetscapePluginView setWindowIfNecessary]): + +2008-12-03 Anders Carlsson <andersca@apple.com> + + Fix the release build. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback): + +2008-12-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6412234> + Don't crash if we can't launch the plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + +2008-12-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Start processing messages sent to the client port. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + Add a map from ports to plug-in proxies. Turn the set of instances into a map from + pluginID to instance proxy. + + (WKPCStatusText): + Look up the right instance proxy and call status(). + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::pluginID): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::status): + Implement this. + + * Plugins/Hosted/WebKitPluginClient.defs: + Add the plug-in ID to StatusText. + +2008-12-02 Gregory Hughes <ghughes@apple.com> + + Reviewed by Beth Dakin. + + Bug 22513: ZOOM: text selection does not send correct zoom bounds + + When zoomed, text selection must send the zoom bounds in flipped + screen coordinates. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory accessibilityConvertScreenRect:]): + +2008-12-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Create a client mach port and pass it to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::hostForPackage): + (WebKit::NetscapePluginHostManager::spawnPluginHost): + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + * Plugins/Hosted/WebKitPluginHost.defs: + +2008-12-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Let the plug-in views know if the plug-in host crashes. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::pluginHostDied): + (WebKit::NetscapePluginHostProxy::addPluginInstance): + (WebKit::NetscapePluginHostProxy::removePluginInstance): + + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::create): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + Keep a pointer to the host proxy. + + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + Add the instance to the host set. + + (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): + Remove the instance form the host set. + + (WebKit::NetscapePluginInstanceProxy::pluginHostDied): + Tell the plug-in view that the plug-in died. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + Pass the plug-in view to the instantiatePlugin. + + (-[WebHostedNetscapePluginView pluginHostDied]): + Handle the plug-in host crashing. + + (-[WebHostedNetscapePluginView drawRect:]): + Fill the plug-in view with a nice red shade if the plug-in crashes. + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::pluginHostDied): + Remove the plug-in host from the map. + + (WebKit::NetscapePluginHostManager::instantiatePlugin): + NetscapePluginHostProxy is no longer refcounted. + + * Plugins/Hosted/NetscapePluginHostProxy.h: + This is no longer refcounted. Add a set of plug-in instances (unused for now). + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + Create a death notification port. + + (WebKit::NetscapePluginHostProxy::pluginHostDied): + Tell the manager that we're gone and delete ourselves. + + (WebKit::NetscapePluginHostProxy::deathPortCallback): + New CFMachPort callback. + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Move instantiatePlugin to NetscapePluginHostManager. + + * Plugins/Hosted/NetscapePluginHostManager.h: + * Plugins/Hosted/NetscapePluginHostManager.mm: + (WebKit::NetscapePluginHostManager::instantiatePlugin): + * Plugins/Hosted/NetscapePluginHostProxy.h: + * Plugins/Hosted/NetscapePluginHostProxy.mm: + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Pass the plug-in host port directly to the instance proxy. + + * Plugins/Hosted/NetscapePluginHostProxy.mm: + (WebKit::NetscapePluginHostProxy::instantiatePlugin): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: + (WebKit::NetscapePluginInstanceProxy::create): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::resize): + (WebKit::NetscapePluginInstanceProxy::destroy): + (WebKit::NetscapePluginInstanceProxy::focusChanged): + (WebKit::NetscapePluginInstanceProxy::windowFocusChanged): + (WebKit::NetscapePluginInstanceProxy::windowFrameChanged): + (WebKit::NetscapePluginInstanceProxy::startTimers): + (WebKit::NetscapePluginInstanceProxy::mouseEvent): + (WebKit::NetscapePluginInstanceProxy::stopTimers): + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Try to fix the Tiger build. + + * Plugins/WebNetscapePluginView.mm: + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Rename _layer to _pluginLayer where I forgot to do so. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView destroyPlugin]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): + (-[WebNetscapePluginView setLayer:]): + (-[WebNetscapePluginView destroyPlugin]): + +2008-12-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Make sure to re-insert layers as needed so they won't be lost when the layer backed + view is removed from the view hierarchy. + + * Plugins/Hosted/WebHostedNetscapePluginView.h: + Add _pluginLayer ivar. + + * Plugins/Hosted/WebHostedNetscapePluginView.mm: + (-[WebHostedNetscapePluginView createPlugin]): + Don't add the layer here. + + (-[WebHostedNetscapePluginView setLayer:]): + Instead, add it here. + + (-[WebHostedNetscapePluginView destroyPlugin]): + Set _pluginLayer to 0. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): + Don't add the layer here. + + (-[WebNetscapePluginView setLayer:]): + Do it here. + +2008-11-30 Antti Koivisto <antti@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=22557 + + Report free size in central and thread caches too. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics memoryStatistics]): + +2008-11-29 Antti Koivisto <antti@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=22557 + Add statistics for JavaScript GC heap. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics memoryStatistics]): + +2008-11-29 Antti Koivisto <antti@apple.com> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=22557 + + - Add purgeable memory statistics to cache statistics. + - Add method for getting fastMalloc statistics. + - Add method to force returning free memory back to system. + + * Misc/WebCache.mm: + (+[WebCache statistics]): + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]): + (+[WebCoreStatistics memoryStatistics]): + (+[WebCoreStatistics returnFreeMemoryToSystem]): + +2008-11-26 Mark Rowe <mrowe@apple.com> + + Fix the Tiger build. + + mig.h does not always define __MigTypeCheck on Tiger, which leads to problems when the generated + code is built with -Wundef. + + * Plugins/Hosted/WebKitPluginHostTypes.h: + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Fix build. + + * Configurations/Base.xcconfig: + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Move WebHostedNetscapePluginView.{h|mm} to Plugins/Hosted. + + (-[WebHostedNetscapePluginView handleMouseMoved:]): + (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]): + Fix a leak. + + (-[WebHostedNetscapePluginView createPlugin]): + Instantiate the plug-in, store the plug-in proxy in the _proxy ivar. + + (-[WebHostedNetscapePluginView loadStream]): + (-[WebHostedNetscapePluginView shouldStop]): + Add stubs for these. + + (-[WebHostedNetscapePluginView updateAndSetWindow]): + (-[WebHostedNetscapePluginView windowFocusChanged:]): + (-[WebHostedNetscapePluginView destroyPlugin]): + (-[WebHostedNetscapePluginView startTimers]): + (-[WebHostedNetscapePluginView stopTimers]): + (-[WebHostedNetscapePluginView focusChanged]): + (-[WebHostedNetscapePluginView windowFrameDidChange:]): + (-[WebHostedNetscapePluginView mouseDown:]): + (-[WebHostedNetscapePluginView mouseUp:]): + (-[WebHostedNetscapePluginView mouseDragged:]): + (-[WebHostedNetscapePluginView mouseEntered:]): + (-[WebHostedNetscapePluginView mouseExited:]): + Call the proxy. + + (-[WebHostedNetscapePluginView addWindowObservers]): + (-[WebHostedNetscapePluginView removeWindowObservers]): + Add/remove observers for when the window frame changes. + + * Plugins/WebHostedNetscapePluginView.h: Removed. + * Plugins/WebHostedNetscapePluginView.mm: Removed. + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Add the plug-in host proxy and plug-in instance proxy objects. + + These are just simple objects that forward their calls to the plug-in host. + + * Plugins/Hosted/NetscapePluginHostProxy.h: Added. + (WebKit::NetscapePluginHostProxy::create): + (WebKit::NetscapePluginHostProxy::port): + * Plugins/Hosted/NetscapePluginHostProxy.mm: Added. + (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): + (WebKit::NetscapePluginHostProxy::instantiatePlugin): + * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added. + (WebKit::NetscapePluginInstanceProxy::create): + (WebKit::NetscapePluginInstanceProxy::renderContextID): + (WebKit::NetscapePluginInstanceProxy::useSoftwareRenderer): + * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Added. + (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy): + (WebKit::NetscapePluginInstanceProxy::resize): + (WebKit::NetscapePluginInstanceProxy::destroy): + (WebKit::NetscapePluginInstanceProxy::focusChanged): + (WebKit::NetscapePluginInstanceProxy::windowFocusChanged): + (WebKit::NetscapePluginInstanceProxy::windowFrameChanged): + (WebKit::NetscapePluginInstanceProxy::startTimers): + (WebKit::NetscapePluginInstanceProxy::mouseEvent): + (WebKit::NetscapePluginInstanceProxy::stopTimers): + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein, Mark Rowe and Kevin Decker. + + Add the plug-in host manager singleton. + + * Plugins/Hosted/NetscapePluginHostManager.h: Added. + * Plugins/Hosted/NetscapePluginHostManager.mm: Added. + + (WebKit::NetscapePluginHostManager::hostForPackage): + If there's an existing host proxy available, just return it. Otherwise spawn a new plug-in host and + create a new plug-in host proxy from the new plug-in host port. + + (WebKit::NetscapePluginHostManager::spawnPluginHost): + Pass the plug-in host path and the preferred CPU type to the plug-in agent. When the plug-in host has + finished launching, pass it the path to the plug-in bundle. + + (WebKit::NetscapePluginHostManager::initializeVendorPort): + Check in with the plug-in agent and get the new plug-in vendor port back. + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + * Plugins/Hosted/WebKitPluginHostTypes.h: + Add copyright headers and fix the spacing around the *'s. + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + * Plugins/Hosted/WebKitPluginHost.defs: + Add copyright headers. + + * Plugins/Hosted/WebKitPluginHostTypes.h: Added. + Forgot to add this. + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add plug-in host .defs. + + * Plugins/Hosted/WebKitPluginAgent.defs: Added. + * Plugins/Hosted/WebKitPluginAgentReply.defs: Added. + * Plugins/Hosted/WebKitPluginClient.defs: Added. + * Plugins/Hosted/WebKitPluginHost.defs: Added. + * Plugins/Hosted/WebKitPluginHostTypes.defs: Added. + +2008-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe and Kevin Decker. + + Minor plug-in changes. + + * Plugins/WebBaseNetscapePluginView.h: + Add add/remove observer method declarations. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView isFlipped]): + Move this down from WebNetscapePluginView. + + * Plugins/WebNetscapePluginPackage.h: + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage pluginHostArchitecture]): + Getter for the plug-in host architecture. + + * Plugins/WebNetscapePluginView.mm: + +2008-11-25 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + - include the text direction submenu in context menus when appropriate + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Changed the default + textDirectionSubmenuInclusionBehavior to "automatically", which includes + the menu when the selection is confined to a single paragraph the either + has right-to-left base writing direction or contains right-to-left or + embedded text. Left the default for Tiger and Leopard to be "never". + +2008-11-24 Darin Fisher <darin@chromium.org> + + Fix bustage. + + * History/WebHistory.mm: + +2008-11-24 Glenn Wilson <gwilson@chromium.org> + + Reviewed by Alexey Proskuryakov. + + http://bugs.webkit.org/show_bug.cgi?id=15643 + + Added API support for the "trailing whitespace" work-around. This includes an APIs + to get and set the state of this configuration variable. + + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::selectTrailingWhitespaceEnabled): + * WebView/WebView.mm: + (-[WebView setSelectTrailingWhitespaceEnabled:]): + (-[WebView isSelectTrailingWhitespaceEnabled]): + (-[WebView setSmartInsertDeleteEnabled:]): + * WebView/WebViewPrivate.h: + +2008-11-24 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - https://bugs.webkit.org/show_bug.cgi?id=22470 + remove unneeded URL argument from FrameLoaderClient::updateGlobalHistory + + * WebCoreSupport/WebFrameLoaderClient.h: Remove argument. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Get the URL from the + DocumentLoader, just as we do the title and the failure flag. + +2008-11-24 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - finish https://bugs.webkit.org/show_bug.cgi?id=22295 + track which history items are from page load failures + + Last time around I did this only for the back/forward list and missed the + global history list. + + * History/WebHistory.mm: + (-[WebHistory _visitedURL:withTitle:wasFailure:]): Added wasFailure argument. + Set the flag on the newly created history item. Also eliminated the use of + autorelease on the added-items array. + * History/WebHistoryInternal.h: Ditto. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Added code to check for failure + and pass the argument in to WebHistory. Given that this function gets other + data from the DocumentLoader, I think we should get rid of the KURL argument, + but that's a separate issue so I don't do it in this patch. + +2008-11-24 Simon Fraser <simon.fraser@apple.com> + + Fix call to Frame::selectionBounds in Tiger build. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _lookUpInDictionaryFromMenu:]): + +2008-11-24 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dan Bernstein + + Via: https://bugs.webkit.org/show_bug.cgi?id=22433 + + Rename RenderView::selectionRect() to selectionBounds(), to remove + longstanding ambiguity with the base class selectionRect() method. + Do the same on Frame for consistency with RenderView. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _lookUpInDictionaryFromMenu:]): + (-[WebHTMLView selectionRect]): + (-[WebHTMLView selectionImageRect]): + +2008-11-20 Pierre-Olivier Latour <pol@apple.com> + + Reviewed by Dan Bernstein. + + WebKit should be using Device RGB colorspace everywhere for + consistency. + + https://bugs.webkit.org/show_bug.cgi?id=22300 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _dragImageForURL:withLabel:]): + (-[WebHTMLView _colorAsString:]): + +2008-11-20 Darin Adler <darin@apple.com> + + Earlier version reviewed by Justin Garcia. + + - part of fix for <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode + Also resolves <rdar://problem/5000134>. + + * WebView/WebHTMLView.mm: Removed some unused code, and made the Tiger workaround for bug 3789278 + be Tiger-only. + (-[WebHTMLView resignFirstResponder]): Removed code setting unused resigningFirstResponder flag. + (-[WebHTMLView _wantsKeyDownForEvent:]): Added. Returns YES. + (-[WebHTMLView insertText:]): Don't try to insert text if the selection is not editable. We used + to prevent even processing the input, but that's not practical since some commands need to work + even in non-editable regions. + +2008-11-20 Anders Carlsson <andersca@apple.com> + + Reviewed by Jon Honeycutt. + + Move some frame/page checking code down to the base class. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView _createPlugin]): + +2008-11-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Test: plugins/netscape-plugin-setwindow-size-2.html + + Fix bug where NPP_SetWindow wasn't getting called for some plug-ins. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView updateAndSetWindow]): + Don't bail if the drawing model is not the CA drawing model. Remove some code + that was doing the wrong thing. + +2008-11-19 Darin Fisher <darin@chromium.org> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=22345 + Define ScriptValue as a thin container for a JSC::Value*. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2008-11-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6383762> WebKit r38340 crash on key press in plugin + + Set the value to 0 before calling NPP_GetValue, in case the plug-in returns NPERR_NO_ERROR but does not + update the value. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): + +2008-11-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make sure to copy the MIME type. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + +2008-11-19 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + First step toward fixing <rdar://problem/6263293> WebScriptDebugDelegate + should use intptr_t for sourceId, not int + + Added a conditional typedef (currently disabled) to switch sourceId to + intptr_t in non-Tiger, non-Leopard builds. + + * DefaultDelegates/WebDefaultScriptDebugDelegate.m: + (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]): + (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]): + (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]): + (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]): + (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]): + (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]): + * WebView/WebScriptDebugDelegate.h: + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::sourceParsed): + (WebScriptDebugger::callEvent): + (WebScriptDebugger::atStatement): + (WebScriptDebugger::returnEvent): + (WebScriptDebugger::exception): + +2008-11-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + - fix https://bugs.webkit.org/show_bug.cgi?id=22331 + <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item + + * WebView/WebUIDelegatePrivate.h: Reorder new enum values after existing + ones. + +2008-11-17 Beth Dakin <bdakin@apple.com> + + Reviewed by Adele Peterson. + + Fix for <rdar://problem/6373102> REGRESSION (r36919): In a new mail + message, the caret appears in message body by default + + This fixes a regression caused by http://trac.webkit.org/changeset/36919. + That change was too sweeping; we do not want to + unconditionally set the page to be active, but we can be looser + than the original constraints. This patch set the window active if + the first responder is or is a descendant of the main frame's frame + view. + + * WebView/WebView.mm: + (-[WebView _updateFocusedAndActiveStateForFrame:]): + +2008-11-18 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=22337 + Enable workers by default + + * Configurations/WebKit.xcconfig: Define ENABLE_WORKERS (change from ENABLE_WORKER_THREADS, + which was accidentally committed before). + +2008-11-17 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Try to fix Mac build. + + * WebView/WebScriptDebugDelegate.mm: + +2008-11-17 Pierre-Olivier Latour <pol@apple.com> + + Reviewed by Sam Weinig. + + Added SPI to allow pausing a running CSS transition or animation + at a given time for testing purposes. + + https://bugs.webkit.org/show_bug.cgi?id=21261 + + * WebView/WebFrame.mm: + (-[WebFrame _pauseAnimation:onNode:atTime:]): + (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): + * WebView/WebFramePrivate.h: + +2008-11-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Updated for JavaScriptCore renames. + + * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/runtime/Interpreter.h. + * ForwardingHeaders/runtime/Interpreter.h: Removed. + * WebView/WebScriptDebugDelegate.mm: + +2008-11-16 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=21810 + Remove use of static C++ objects that are destroyed at exit time (destructors) + + Use DEFINE_STATIC_LOCAL for static RetainPtr<T> + + * Misc/WebNSPasteboardExtras.mm: Use DEFINE_STATIC_LOCAL + (+[NSPasteboard _web_writableTypesForURL]): + (_createWritableTypesForImageWithoutArchive): Created so accessor has one line initialization + (_writableTypesForImageWithoutArchive): Use create function for one line initialization + (_createWritableTypesForImageWithArchive): Created so accessor has one line initialization + (_writableTypesForImageWithArchive): Use create function for one line initialization + * WebCoreSupport/WebPasteboardHelper.mm: Use DEFINE_STATIC_LOCAL + (WebPasteboardHelper::insertablePasteboardTypes): + * WebView/WebHTMLRepresentation.mm: Use DEFINE_STATIC_LOCAL + (+[WebHTMLRepresentation supportedMIMETypes]): + (+[WebHTMLRepresentation supportedNonImageMIMETypes]): + (+[WebHTMLRepresentation supportedImageMIMETypes]): + +2008-11-16 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - https://bugs.webkit.org/show_bug.cgi?id=22295 + track which history items are from page load failures + + * History/WebHistoryItem.mm: Added lastVisitWasFailureKey. + (-[WebHistoryItem initFromDictionaryRepresentation:]): Set the lastVisitWasFailure + flag in the history item if the dictionary had lastVisitWasFailureKey true. + (-[WebHistoryItem dictionaryRepresentation]): Set the lastVisitWasFailureKey boolean + in the dictionary if the history item had the lastVisitWasFailure flag. + (-[WebHistoryItem lastVisitWasFailure]): Added. + + * History/WebHistoryItemInternal.h: Moved include of WebBackForwardList here from + WebHistoryItemPrivate.h; removed other unneeded includes. + + * History/WebHistoryItemPrivate.h: Added lastVisitWasFailure method. + Removed unneeded includes. + + * Misc/WebNSDictionaryExtras.h: Added _webkit_boolForKey. + * Misc/WebNSDictionaryExtras.m: + (-[NSDictionary _webkit_boolForKey:]): Added. + +2008-11-14 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=21810 + Remove use of static C++ objects that are destroyed at exit time (destructors) + + Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid + exit-time destructor. Update code that was changed to fix this issue that ran + into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference + in gcc build 5465). Also typdefs for template types needed to be added in some + cases so the type could make it through the macro successfully. + + Basically code of the form: + static T m; + becomes: + DEFINE_STATIC_LOCAL(T, m, ()); + + Also any code of the form: + static T& m = *new T; + also becomes: + DEFINE_STATIC_LOCAL(T, m, ()); + + * ForwardingHeaders/wtf/StdLibExtras.h: Added. + * History/WebBackForwardList.mm: + (backForwardLists): + * History/WebHistoryItem.mm: + (historyItemWrappers): + * Misc/WebStringTruncator.m: + (fontFromNSFont): + * Plugins/WebBaseNetscapePluginStream.mm: + (streams): + * WebView/WebView.mm: + (aeDescFromJSValue): + +2008-11-14 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - <rdar://problem/6234333> Implement action methods for setting and clearing character-level directionality + - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory contextMenuItemTagTextDirectionMenu]): Added. + * WebView/WebFrame.mm: + (core): Added a convertor from WebTextDirectionSubmenuInclusionBehavior + to WebCore::TextDirectionSubmenuInclusionBehavior. + * WebView/WebFrameInternal.h: + * WebView/WebHTMLView.mm: + Added makeTextWritingDirectionLeftToRight:, + makeTextWritingDirectionNatural: and + makeTextWritingDirectionRightToLeft: using the WEBCORE_COMMAND macro. + * WebView/WebPreferenceKeysPrivate.h: + Added WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey. + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Set the default Text Direction + submenu inclusion behavior to never include. + (-[WebPreferences textDirectionSubmenuInclusionBehavior]): Added this + accessor. + (-[WebPreferences setTextDirectionSubmenuInclusionBehavior:]): Ditto. + * WebView/WebPreferencesPrivate.h: Defined the + WebTextDirectionSubmenuInclusionBehavior enum and declared + accessors. + * WebView/WebUIDelegatePrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Added code to transfer + the Text Direction submenu inclusion behavior preference to WebCore + settings. + +2008-11-14 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + - fix https://bugs.webkit.org/show_bug.cgi?id=22222 + selectKeyViewPrecedingView: with document view that can't be first responder + makes WebFrameView be first responder + + * WebView/WebFrameView.mm: (-[WebFrameView becomeFirstResponder]): + Moved the acceptsFirstResponder special case inside the if statement so it won't + run in the "selecting previous" case. Also removed the "just before shipping Tiger" + code that doesn't need to be here any more. + +2008-11-13 Mark Rowe <mrowe@apple.com> + + Fix the build. + + Don't use NSPICTPboardType on systems where it is deprecated. The system will take care of converting + from this format to a format that we can understand. + + * WebCoreSupport/WebPasteboardHelper.mm: + (WebPasteboardHelper::insertablePasteboardTypes): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): + (+[WebHTMLView _insertablePasteboardTypes]): + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): + +2008-11-13 John Sullivan <sullivan@apple.com> + + fixed <rdar://problem/6361578> Web Kit UI strings: a few edits + + Reviewed by Tim Hatcher + + * Misc/WebKitErrors.m: + "Cannot show content with specified mime type" -> "Content with specified MIME type can't be shown" + "Cannot show URL" -> "The URL can't be shown" + "Cannot find plug-in" -> "The plug-in can't be found" + "Cannot load plug-in" -> "The plug-in can't be loaded" + + * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: + * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: + * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: Added. + * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Removed. + Changed placeholder fine print in the nib to match one of the two strings it might be replaced by. + This automagically updated the nib to a newer format, hence the objects -> keyedobjects change. + I could have changed the placeholder fine print to be empty but this lets localizers understand + the dialog layout better. + + * Panels/WebAuthenticationPanel.m: + (-[WebAuthenticationPanel setUpForChallenge:]): + "you need to log in" -> "you must log in" + "Your log-in information" -> "Your login information" + "The name or password entered" -> "The user name or password you entered" + "Please try again." -> "Make sure you're entering them correctly, and then try again." + +2008-11-12 Stephanie Lewis <slewis@apple.com> + + Fix Mac build. + + * Panels/WebAuthenticationPanel.m: + +2008-11-12 John Sullivan <sullivan@apple.com> + + fixed <rdar://problem/3839110> Authentication dialogs talk about passwords being sent "in the clear" + + Reviewed by Tim Hatcher + + * Panels/WebAuthenticationPanel.m: + (-[WebAuthenticationPanel setUpForChallenge:]): + use "unencrypted" instead of "in the clear". Also, use the "Your log-in information + will be sent securely" version when the receiving server is https, regardless of + whether it uses basic or digest authentication. + +2008-11-12 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + - fix https://bugs.webkit.org/show_bug.cgi?id=22223 + <rdar://problem/6366864> REGRESSION(r38245): "View Source" crashes the browser + + * WebView/WebFrameView.mm: (-[WebFrameView viewDidMoveToWindow]): + Add missing null check. + +2008-11-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Fix stupid bug. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): + +2008-11-10 Tor Arne Vestbø <tavestbo@trolltech.com> + + Reviewed by Simon Hausmann. + + Move _web_encodingForResource from WebKit into WebCore and change return type + + This change is needed to implement NSAPI in WebCore for Mac, see: + + https://bugs.webkit.org/show_bug.cgi?id=21427 + + + * Misc/WebKitNSStringExtras.m: + (+[NSString _web_encodingForResource:]): + +2008-11-10 Tor Arne Vestbø <tavestbo@trolltech.com> + + Reviewed by Simon Hausmann. + + Moved the implementation of _webkit_isCaseInsensitiveEqualToString to + WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString. + + This change is needed to implement NSAPI in WebCore for Mac, see: + + https://bugs.webkit.org/show_bug.cgi?id=21427 + + * Misc/WebKitNSStringExtras.m: + (-[NSString _webkit_isCaseInsensitiveEqualToString:]): + +2008-11-11 Dan Bernstein <mitz@apple.com> + + Reviewed by Adam Roben. + + WebKit/mac part of adding a master volume control for media elements in a WebView + + * WebView/WebView.mm: + (-[WebView setMediaVolume:]): Added. + (-[WebView mediaVolume]): Added. + * WebView/WebViewPrivate.h: + +2008-11-11 Aaron Golden <agolden@apple.com> + + Bug 22134: -[WebHistoryItem dictionaryRepresentation] accesses past the end of a vector + + <https://bugs.webkit.org/show_bug.cgi?id=22134> + + Reviewed by Geoff Garen. + + * History/WebHistoryItem.mm: + (-[WebHistoryItem initFromDictionaryRepresentation:]): + (-[WebHistoryItem dictionaryRepresentation]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Move renewGState to the base class. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView renewGState]): + * Plugins/WebNetscapePluginView.mm: + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Move start, stop and all the related methods down to WebBaseNetscapePluginView. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView updateAndSetWindow]): + (-[WebBaseNetscapePluginView addWindowObservers]): + (-[WebBaseNetscapePluginView removeWindowObservers]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView stop]): + (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): + (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]): + (-[WebBaseNetscapePluginView viewDidMoveToWindow]): + (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]): + (-[WebBaseNetscapePluginView viewDidMoveToHostWindow]): + (-[WebBaseNetscapePluginView windowWillClose:]): + (-[WebBaseNetscapePluginView windowBecameKey:]): + (-[WebBaseNetscapePluginView windowResignedKey:]): + (-[WebBaseNetscapePluginView windowDidMiniaturize:]): + (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): + (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]): + (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]): + (-[WebBaseNetscapePluginView preferencesHaveChanged:]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Move rightMouseDown, rightMouseUp and sendActivateEvent to the base plugin view. + Add stubs for createPlugin, loadStream, shouldStop and destroyPlugin. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView windowFocusChanged:]): + (-[WebBaseNetscapePluginView createPlugin]): + (-[WebBaseNetscapePluginView loadStream]): + (-[WebBaseNetscapePluginView destroyPlugin]): + (-[WebBaseNetscapePluginView sendActivateEvent:]): + (-[WebBaseNetscapePluginView rightMouseDown:]): + (-[WebBaseNetscapePluginView rightMouseUp:]): + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView windowFocusChanged:]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Factor plug-in type specific code out to three new methods, createPlugin, destroyPlugin and loadStream. + + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView createPlugin]): + (-[WebNetscapePluginView loadStream]): + (-[WebNetscapePluginView start]): + (-[WebNetscapePluginView shouldStop]): + (-[WebNetscapePluginView destroyPlugin]): + (-[WebNetscapePluginView stop]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Fix Tiger build. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Move even more code down to WebBaseNetscapePluginView, get rid of some unnecessary methods. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView focusChanged]): + (-[WebBaseNetscapePluginView visibleRect]): + (-[WebBaseNetscapePluginView acceptsFirstResponder]): + (-[WebBaseNetscapePluginView setHasFocus:]): + (-[WebBaseNetscapePluginView becomeFirstResponder]): + (-[WebBaseNetscapePluginView resignFirstResponder]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView focusChanged]): + (-[WebNetscapePluginView tellQuickTimeToChill]): + (-[WebNetscapePluginView updateAndSetWindow]): + (-[WebNetscapePluginView start]): + (-[WebNetscapePluginView stop]): + (-[WebNetscapePluginView viewWillMoveToWindow:]): + (-[WebNetscapePluginView createPluginScriptableObject]): + (-[WebNetscapePluginView pluginView:receivedData:]): + (-[WebNetscapePluginView pluginView:receivedError:]): + (-[WebNetscapePluginView pluginViewFinishedLoading:]): + (-[WebNetscapePluginView inputContext]): + (-[WebNetscapePluginView hasMarkedText]): + (-[WebNetscapePluginView insertText:]): + (-[WebNetscapePluginView markedRange]): + (-[WebNetscapePluginView selectedRange]): + (-[WebNetscapePluginView setMarkedText:selectedRange:]): + (-[WebNetscapePluginView unmarkText]): + (-[WebNetscapePluginView validAttributesForMarkedText]): + (-[WebNetscapePluginView attributedSubstringFromRange:]): + (-[WebNetscapePluginView characterIndexForPoint:]): + (-[WebNetscapePluginView doCommandBySelector:]): + (-[WebNetscapePluginView firstRectForCharacterRange:]): + (-[WebNetscapePluginView _viewHasMoved]): + (-[WebNetscapePluginView _redeliverStream]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Move timer handling code down to WebBaseNetscapePluginView. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView startTimers]): + (-[WebBaseNetscapePluginView restartTimers]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView stopTimers]): + (-[WebNetscapePluginView startTimers]): + (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Move a bunch of methods and ivars up to WebBaseNetscapePluginView. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView dealloc]): + (-[WebBaseNetscapePluginView finalize]): + (-[WebBaseNetscapePluginView removeTrackingRect]): + (-[WebBaseNetscapePluginView resetTrackingRect]): + (-[WebBaseNetscapePluginView dataSource]): + (-[WebBaseNetscapePluginView webFrame]): + (-[WebBaseNetscapePluginView webView]): + (-[WebBaseNetscapePluginView currentWindow]): + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::windowFocusChanged): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + (-[WebNetscapePluginView sendActivateEvent:]): + (-[WebNetscapePluginView restartTimers]): + (-[WebNetscapePluginView setHasFocus:]): + (-[WebNetscapePluginView mouseDown:]): + (-[WebNetscapePluginView mouseUp:]): + (-[WebNetscapePluginView mouseEntered:]): + (-[WebNetscapePluginView mouseExited:]): + (-[WebNetscapePluginView handleMouseMoved:]): + (-[WebNetscapePluginView mouseDragged:]): + (-[WebNetscapePluginView scrollWheel:]): + (-[WebNetscapePluginView keyUp:]): + (-[WebNetscapePluginView keyDown:]): + (-[WebNetscapePluginView flagsChanged:]): + (-[WebNetscapePluginView updateAndSetWindow]): + (-[WebNetscapePluginView setWindowIfNecessary]): + (-[WebNetscapePluginView start]): + (-[WebNetscapePluginView stop]): + (-[WebNetscapePluginView isStarted]): + (-[WebNetscapePluginView dealloc]): + (-[WebNetscapePluginView finalize]): + (-[WebNetscapePluginView drawRect:]): + (-[WebNetscapePluginView windowBecameKey:]): + (-[WebNetscapePluginView preferencesHaveChanged:]): + (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): + (-[WebNetscapePluginView _viewHasMoved]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker and Mark Rowe. + + Add a WebHostedNetscapePluginView class. + + * Plugins/WebHostedNetscapePluginView.h: Added. + * Plugins/WebHostedNetscapePluginView.mm: Added. + + * Plugins/WebNetscapePluginPackage.h: + Use the right define. + + * Plugins/WebPluginDatabase.mm: + (-[WebPluginDatabase removePluginInstanceViewsFor:]): + Check for WebBaseNetscapePluginView. + + (-[WebPluginDatabase destroyAllPluginInstanceViews]): + Check for WebBaseNetscapePluginView. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (NetscapePluginWidget::NetscapePluginWidget): + (NetscapePluginWidget::handleEvent): + Use WebBaseNetscapePluginView. + + (netscapePluginViewClass): + New function that returns the right netscape plugin view type to use. + + (WebFrameLoaderClient::createPlugin): + Get the right class. + + * WebKitPrefix.h: + Prefix the #define with WTF_. + + * WebView/WebHTMLView.mm: + (-[NSArray _web_makePluginViewsPerformSelector:withObject:]): + Check for WebBaseNetscapePluginView. + + * WebView/WebView.mm: + Remove an unnecessary include. + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Don't use individual ivars for each plug-in vtable function. Instead, get them from the plugin package. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + * Plugins/WebNetscapePluginPackage.h: + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + (-[WebNetscapePluginPackage _unloadWithShutdown:]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView sendEvent:isDrawRect:]): + (-[WebNetscapePluginView setWindowIfNecessary]): + (-[WebNetscapePluginView start]): + (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + (-[WebNetscapePluginView createPluginScriptableObject]): + (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebNetscapePluginView loadPluginRequest:]): + (-[WebNetscapePluginView _createPlugin]): + (-[WebNetscapePluginView _destroyPlugin]): + (-[WebNetscapePluginView _printedPluginBitmap]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Add a new WebBaseNetscapePluginView class. + + * Plugins/WebBaseNetscapePluginView.h: Added. + * Plugins/WebBaseNetscapePluginView.mm: Added. + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]): + (-[WebBaseNetscapePluginView handleMouseMoved:]): + * Plugins/WebNetscapePluginView.h: + * Plugins/WebNetscapePluginView.mm: + (-[WebNetscapePluginView cut:]): + (-[WebNetscapePluginView copy:]): + (-[WebNetscapePluginView paste:]): + (-[WebNetscapePluginView selectAll:]): + (-[WebNetscapePluginView start]): + (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + +2008-11-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Rename WebBaseNetscapePluginView to WebNetscapePluginView. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + (WebNetscapePluginStream::setPlugin): + * Plugins/WebBaseNetscapePluginView.h: Removed. + * Plugins/WebBaseNetscapePluginView.mm: Removed. + * Plugins/WebNetscapePluginEventHandler.h: + (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler): + * Plugins/WebNetscapePluginEventHandler.mm: + (WebNetscapePluginEventHandler::create): + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon): + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa): + * Plugins/WebNetscapePluginView.h: Copied from mac/Plugins/WebBaseNetscapePluginView.h. + * Plugins/WebNetscapePluginView.mm: Copied from mac/Plugins/WebBaseNetscapePluginView.mm. + (+[WebNetscapePluginView setCurrentPluginView:]): + (+[WebNetscapePluginView currentPluginView]): + (-[WebNetscapePluginView loadPluginRequest:]): + * Plugins/WebPluginDatabase.mm: + (-[WebPluginDatabase removePluginInstanceViewsFor:]): + (-[WebPluginDatabase destroyAllPluginInstanceViews]): + * Plugins/npapi.mm: + (pluginViewForInstance): + (NPN_MarkedTextAbandoned): + (NPN_MarkedTextSelectionChanged): + * WebCoreSupport/WebFrameLoaderClient.mm: + (NetscapePluginWidget::NetscapePluginWidget): + (NetscapePluginWidget::handleEvent): + (WebFrameLoaderClient::createPlugin): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): + (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): + (-[NSArray _web_makePluginViewsPerformSelector:withObject:]): + * WebView/WebView.mm: + +2008-11-09 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + - fix https://bugs.webkit.org/show_bug.cgi?id=15063 + <rdar://problem/5452227> REGRESSION (r25151): Switching to a tab waiting + for first data does not clear the window + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::frameLoadCompleted): Added comments, and got rid of + a local variable to make this code match the code in the function below + more closely. + (WebFrameLoaderClient::provisionalLoadStarted): Added comments. + + * WebView/WebFrame.mm: + (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Improved comment. + + * WebView/WebFrameView.mm: + (-[WebFrameView _scrollView]): Tweaked formatting. + (-[WebFrameView initWithFrame:]): Ditto. + (-[WebFrameView setFrameSize:]): Added a comment and tweaked formatting. + (-[WebFrameView viewDidMoveToWindow]): Added. This is the change that fixes + the bug. Calls setDrawsBackground:YES as appropriate since moving the view + out of the window to switch to another view disrupts the special technique + for showing the old page during the start of loading. This is the identical + reason for the setFrameSize: method above, and the code is almost the same. + +2008-11-08 David Kilzer <ddkilzer@apple.com> + + Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled + + <https://bugs.webkit.org/show_bug.cgi?id=22137> + + Reviewed by Darin Adler. + + * WebView/WebFrame.mm: + (-[WebFrame _accessibilityTree]): Return nil if HAVE(ACCESSIBILITY) + is false. + +2008-11-08 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - WebKit/mac part of adding WebPreferences for controlling databases and local storage + + * WebView/WebPreferenceKeysPrivate.h: Added + WebKitDatabasesEnabledPreferenceKey and + WebKitLocalStorageEnabledPreferenceKey. + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Made databases and local storage enabled + by default. + (-[WebPreferences databasesEnabled]): Added. + (-[WebPreferences setDatabasesEnabled:]): Added. + (-[WebPreferences localStorageEnabled]): Added. + (-[WebPreferences setLocalStorageEnabled:]): Added. + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Transfer the databases + and local storage preferences to WebCore settings. + +2008-11-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=22115 + NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL + + Initialize the browser funcs correctly. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + +2008-11-06 David Kilzer <ddkilzer@apple.com> + + BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0. + + Apparently older versions of gcc have issues with this patch. + Backing out a second time until the issues are resolved. + +2008-11-06 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Geoff Garen. + + Move the remaining files in the kjs subdirectory of JavaScriptCore to + a new parser subdirectory, and remove the kjs subdirectory entirely. + + The header SavedBuiltins.h was removed in r32587, so it no longer needs + a forwarding header. + + * ForwardingHeaders/kjs: Removed. + * ForwardingHeaders/kjs/SavedBuiltins.h: Removed. + +2008-11-06 David Kilzer <ddkilzer@apple.com> + + BUILD WAS NOT BROKEN: Rolling r38189 back in. + + Please perform a clean build if you see crashes. + +2008-11-06 David Kilzer <ddkilzer@apple.com> + + BUILD FIX: Backed out r38189 since it apparently broke the world. + +2008-11-06 John Sullivan <sullivan@apple.com> + + Fixed problem with switching between text-only zoom and full-content zoom + + There were two booleans tracking whether zoom was text-only, one in WebCore settings + and one in WebViewPrivate. Fixed by eliminating the one in WebViewPrivate. + + Reviewed by Adam Roben + + * WebView/WebView.mm: + remove declaration of zoomMultiplierIsTextOnly instance variable in WebViewPrivate + (-[WebViewPrivate init]): + removed initialization of zoomMultiplierIsTextOnly + (-[WebView textSizeMultiplier]): + call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable + (-[WebView _setZoomMultiplier:isTextOnly:]): + update WebCore settings rather than WebViewPrivate instance variable + (-[WebView _zoomMultiplier:]): + call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable + (-[WebView _realZoomMultiplierIsTextOnly]): + return value from WebCore settings instead of accessing WebViewPrivate instance variable + (-[WebView pageSizeMultiplier]): + call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable + +2008-11-06 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Darin Adler. + + Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors) + https://bugs.webkit.org/show_bug.cgi?id=21810 + + * History/WebBackForwardList.mm: + (backForwardLists): Changed to leak an object to avoid an exit-time destructor. + * History/WebHistoryItem.mm: + (historyItemWrappers): Ditto + * Misc/WebStringTruncator.m: + (fontFromNSFont): Ditto + * Plugins/WebBaseNetscapePluginStream.mm: + (streams): Ditto + * WebView/WebView.mm: + (aeDescFromJSValue): Ditto + +2008-11-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Keep track of which plug-in host architecture would be needed for a given plug-in package. + + * Plugins/WebNetscapePluginPackage.h: + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage _initWithPath:]): + * WebKitPrefix.h: + +2008-11-05 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Sam Weinig. + + Correct forwarding headers for files moved to the runtime subdirectory + of JavaScriptCore and remove unused forwarding headers. + + * ForwardingHeaders/kjs/collector.h: Removed. + * ForwardingHeaders/kjs/identifier.h: Removed. + * ForwardingHeaders/kjs/interpreter.h: Removed. + * ForwardingHeaders/kjs/lookup.h: Removed. + * ForwardingHeaders/kjs/operations.h: Removed. + * ForwardingHeaders/kjs/protect.h: Removed. + * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h. + * WebView/WebScriptDebugDelegate.mm: + +2008-11-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Remove WebPlugInStreamLoaderDelegate.h + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebPlugInStreamLoaderDelegate.h: Removed. + +2008-11-05 Dan Bernstein <mitz@apple.com> + + - Tiger build fix + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView stop]): + +2008-11-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Don't leak the CALayer. + + * Plugins/WebBaseNetscapePluginView.h: + Make the layer a RetainPtr. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): + + (-[WebBaseNetscapePluginView stop]): + Make sure to clear out the layer here. + +2008-11-04 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Sam Weinig. + + Remove the unused kjs/dtoa.h forwarding header. + + * ForwardingHeaders/kjs/dtoa.h: Removed. + +2008-11-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + More cleanup. Make a bunch of instance variables RetainPtrs. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView visibleRect]): + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebBaseNetscapePluginView sendActivateEvent:]): + (-[WebBaseNetscapePluginView sendDrawRectEvent:]): + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView restartTimers]): + (-[WebBaseNetscapePluginView setHasFocus:]): + (-[WebBaseNetscapePluginView mouseDown:]): + (-[WebBaseNetscapePluginView mouseUp:]): + (-[WebBaseNetscapePluginView mouseEntered:]): + (-[WebBaseNetscapePluginView mouseExited:]): + (-[WebBaseNetscapePluginView handleMouseMoved:]): + (-[WebBaseNetscapePluginView mouseDragged:]): + (-[WebBaseNetscapePluginView scrollWheel:]): + (-[WebBaseNetscapePluginView keyUp:]): + (-[WebBaseNetscapePluginView keyDown:]): + (-[WebBaseNetscapePluginView flagsChanged:]): + (-[WebBaseNetscapePluginView cut:]): + (-[WebBaseNetscapePluginView copy:]): + (-[WebBaseNetscapePluginView paste:]): + (-[WebBaseNetscapePluginView selectAll:]): + (-[WebBaseNetscapePluginView didStart]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView stop]): + (-[WebBaseNetscapePluginView dataSource]): + (-[WebBaseNetscapePluginView pluginPackage]): + (-[WebBaseNetscapePluginView setPluginPackage:]): + (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]): + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + (-[WebBaseNetscapePluginView fini]): + (-[WebBaseNetscapePluginView dealloc]): + (-[WebBaseNetscapePluginView pluginView:receivedError:]): + (-[WebBaseNetscapePluginView requestWithURLCString:]): + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebBaseNetscapePluginView loadPluginRequest:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + (-[WebBaseNetscapePluginView userAgent]): + (-[WebBaseNetscapePluginView getVariable:value:]): + (-[WebBaseNetscapePluginView setVariable:value:]): + (-[WebBaseNetscapePluginView _createPlugin]): + (-[WebBaseNetscapePluginView _redeliverStream]): + +2008-11-04 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan + + Cleanup global history a tad. + + Used to _addItemForURL always create a new item and merge it with a previous item if one existed. + + It is more efficient and less complicated to update the previous item if one exists. + + * History/WebHistory.mm: + (-[WebHistoryPrivate visitedURL:withTitle:]): + (-[WebHistory _visitedURL:withTitle:]): Instead of calling the general purpose [WebHistoryPrivate addItem:] + with a new history item, call the new special purposed visitedURL:withTitle: + * History/WebHistoryInternal.h: + + * History/WebHistoryItem.mm: + (-[WebHistoryItem _visitedWithTitle:]): Call "visited()" on the WebCore history item with the pertinent info. + * History/WebHistoryItemInternal.h: + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): + +2008-11-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=22065 + + Only create the plug-in stream loader when the stream is started. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + (WebNetscapePluginStream::start): + +2008-11-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + https://bugs.webkit.org/show_bug.cgi?id=22065 + + Remove some old, unused plug-in code. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView setVariable:value:]): + +2008-11-04 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Dave Hyatt + + https://bugs.webkit.org/show_bug.cgi?id=21941 + + Rename absolutePosition() to localToAbsolute(), and add the ability + to optionally take transforms into account (which will eventually be the + default behavior). + + * WebView/WebRenderNode.mm: + (copyRenderNode): + +2008-11-01 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=22030 + Make EventNames usable from multiple threads + + * WebView/WebHTMLView.mm: + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): + Access event names via eventNames() function. + +2008-11-04 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Mark Rowe. + + Delete a forwarding header for a file that no longer exists. + + * ForwardingHeaders/kjs/string_object.h: Removed. + +2008-11-03 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Maciej Stachowiak. + + Move more files into the runtime subdirectory of JavaScriptCore. + + * ForwardingHeaders/kjs/JSLock.h: Removed. + * ForwardingHeaders/kjs/SymbolTable.h: Removed. + * ForwardingHeaders/runtime/JSLock.h: Copied from ForwardingHeaders/kjs/JSLock.h. + * ForwardingHeaders/runtime/SymbolTable.h: Copied from ForwardingHeaders/kjs/SymbolTable.h. + * Misc/WebCoreStatistics.mm: + * Plugins/WebBaseNetscapePluginStream.mm: + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebPluginController.mm: + * WebView/WebFrame.mm: + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebView.mm: + +2008-11-03 Mark Rowe <mrowe@apple.com> + + Fix the 64-bit build. + + Pull the frequently-made check for drawingModel == NPDrawingModelQuickDraw out into a + helper function to avoid #ifdef'ing all of the new places that this check is made. + + A few other #ifdef's are moved inside functions to allow their call sites to remain #ifdef-free, + and we rely on the compiler to optimise out the check (which will always be false in 64-bit) instead. + + * Plugins/WebBaseNetscapePluginView.mm: + (isDrawingModelQuickDraw): + (-[WebBaseNetscapePluginView fixWindowPort]): + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView updateAndSetWindow]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView tellQuickTimeToChill]): + (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): + (-[WebBaseNetscapePluginView _viewHasMoved]): + +2008-11-03 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Kevin Decker. + + - fix release build (and unitialized variable for CG drawing model!) + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): initialize portState in all code paths + +2008-11-03 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=22053 + + This patch adds initial support for the NPDrawingModelCoreAnimation drawing model. + + * Plugins/WebBaseNetscapePluginView.h: Added _layer ivar. + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation. + (-[WebBaseNetscapePluginView restorePortState:]): Ditto. + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Slightly refactored a small block of code which with the PortState. + Plug-ins using the NPDrawingModelCoreAnimation drawing model have no PortState. + (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation + (-[WebBaseNetscapePluginView updateAndSetWindow]): Ditto. + (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto. + (-[WebBaseNetscapePluginView start]): If the plug-in is a plug-in using the Core Animation model, request a layer from it. + (-[WebBaseNetscapePluginView drawRect:]): Return early for NPDrawingModelCoreAnimation plug-ins. + (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins running on post-Tiger systems WebKit supports + NPDrawingModelCoreAnimation. + (-[WebBaseNetscapePluginView setVariable:value:]): Added the new NPDrawingModelCoreAnimation case, which initializes drawingMode. + (-[WebBaseNetscapePluginView _viewHasMoved]): Reworded the conditional call to updateAndSetWindow to be specific to + CoreGraphics and QuickDraw plug-ins. + +2008-10-31 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Darin Adler. + + Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console + <https://bugs.webkit.org/show_bug.cgi?id=22019> + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics shouldPrintExceptions]): + (+[WebCoreStatistics setShouldPrintExceptions:]): + +2008-10-31 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - WebKit/mac part of <rdar://problem/6334641> Add WebView SPI for disabling document.cookie + + * WebView/WebView.mm: + (-[WebView _cookieEnabled]): + (-[WebView _setCookieEnabled:]): + * WebView/WebViewPrivate.h: + +2008-10-31 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + [WebHistory setLastVisitedTimeInterval:forItem] was internal to WebHistory.mm and + completely unused. Nuke it! + + * History/WebHistory.mm: + +2008-10-31 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/4361197> Screen Reader's Item Chooser shows scroll area for WebKit Application window + + If a WebFrameView does not allow scrolling, its scrollbars should not appear in the accessibility hierarchy. + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView accessibilityIsIgnored]): + +2008-10-30 Mark Rowe <mrowe@apple.com> + + Reviewed by Jon Homeycutt. + + Explicitly default to building for only the native architecture in debug and release builds. + + * Configurations/DebugRelease.xcconfig: + +2008-10-30 Cameron Zwarich <zwarich@apple.com> + + Rubber-stamped by Sam Weinig. + + Create a debugger directory in JavaScriptCore and move the relevant + files to it. + + * ForwardingHeaders/debugger: Added. + * ForwardingHeaders/debugger/DebuggerCallFrame.h: Copied from ForwardingHeaders/kjs/DebuggerCallFrame.h. + * ForwardingHeaders/kjs/DebuggerCallFrame.h: Removed. + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebScriptDebugger.h: + * WebView/WebScriptDebugger.mm: + +2008-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + (WebNetscapePluginStream::~WebNetscapePluginStream): + (WebNetscapePluginStream::start): + +2008-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove an unused forward class declaration. + + * Plugins/WebBaseNetscapePluginView.h: + +2008-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove WebBaseNetscapePluginViewInternal.h and WebBaseNetscapePluginViewPrivate.h. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginViewInternal.h: Removed. + * Plugins/WebBaseNetscapePluginViewPrivate.h: Removed. + * Plugins/WebNetscapePluginEventHandler.mm: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + * Plugins/npapi.mm: + * WebView/WebHTMLView.mm: + +2008-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove WebNetscapePluginEmbeddedView, it adds nothing extra now. + + Remove WebNetscapePlugInStreamLoaderClient since WebNetscapePluginStream is the client now. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebKitPluginContainerView.h: + * Plugins/WebNetscapePluginEmbeddedView.h: Removed. + * Plugins/WebNetscapePluginEmbeddedView.mm: Removed. + * Plugins/WebNetscapePluginEventHandler.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (NetscapePluginWidget::NetscapePluginWidget): + (NetscapePluginWidget::handleEvent): + (WebFrameLoaderClient::createPlugin): + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Removed. + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Removed. + * WebView/WebHTMLView.mm: + (-[NSArray _web_makePluginViewsPerformSelector:withObject:]): + +2008-10-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Remove the WebBaseNetscapePluginStream Objective-C object. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::create): + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginView:receivedResponse:]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + +2008-10-29 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + https://bugs.webkit.org/show_bug.cgi?id=21952 + + Address an outstanding FIXME by removing unused SPI + + * History/WebHistory.mm: + (-[WebHistory _addItemForURL:title:]): Fold addItem: into this method + + * History/WebHistoryPrivate.h: Removed unused/unneccessary SPI + +2008-10-28 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5188560> REGRESSION: Spell checker doesn't clear spelling/grammar marker after error is marked as Ignored + + * WebView/WebHTMLView.mm: IgnoreSpelling is now a WebCore command. That command handles + calling back into WebKit to perform the cross platform work that was removed in this change. + +2008-10-28 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Mark Rowe. + + Move ForwardingHeaders to their correct location after the creation of + the runtime directory in JavaScriptCore. + + * ForwardingHeaders/kjs/JSFunction.h: Removed. + * ForwardingHeaders/kjs/JSObject.h: Removed. + * ForwardingHeaders/kjs/JSString.h: Removed. + * ForwardingHeaders/kjs/JSValue.h: Removed. + * ForwardingHeaders/runtime: Added. + * ForwardingHeaders/runtime/JSFunction.h: Copied from ForwardingHeaders/kjs/JSFunction.h. + * ForwardingHeaders/runtime/JSObject.h: Copied from ForwardingHeaders/kjs/JSObject.h. + * ForwardingHeaders/runtime/JSString.h: Copied from ForwardingHeaders/kjs/JSString.h. + * ForwardingHeaders/runtime/JSValue.h: Copied from ForwardingHeaders/kjs/JSValue.h. + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebScriptDebugger.mm: + * WebView/WebView.mm: + +2008-10-28 Adele Peterson <adele@apple.com> + + Reviewed by John Sullivan. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=21880 + "files" string for multifile uploads needs to be localized + + * WebCoreSupport/WebViewFactory.mm: (-[WebViewFactory multipleFileUploadTextForNumberOfFiles:]): + Added. + +2008-10-28 Timothy Hatcher <timothy@apple.com> + + Add WebInspector methods to enable the profiler. + + https://bugs.webkit.org/show_bug.cgi?id=21927 + + <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does + not slow down JavaScript all the time + + Reviewed by Darin Adler and Kevin McCullough. + + * WebInspector/WebInspector.h: + * WebInspector/WebInspector.mm: + (-[WebInspector isJavaScriptProfilingEnabled]): Added. Calls InspectorController::profilerEnabled. + (-[WebInspector setJavaScriptProfilingEnabled:]): Added. Call InspectorController's disableProfiler + or enableProfiler methods. + +2008-10-27 Timothy Hatcher <timothy@apple.com> + + Rename a few methods related to attaching and detaching the debugger. + + * Rename attachDebugger to enableDebugger. + * Rename detachDebugger to disableDebugger. + * Rename the debuggerAttached getter to debuggerEnabled. + + Reviewed by Darin Adler. + + * WebInspector/WebInspector.mm: + (-[WebInspector isDebuggingJavaScript]): + (-[WebInspector startDebuggingJavaScript:]): + (-[WebInspector stopDebuggingJavaScript:]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + Use the C++ stream object for JS requests as well. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView destroyStream:reason:]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Use the C++ stream object in WebBaseNetscapePluginView. Use a HashSet of RefPtrs to keep track of the streams. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::~WebNetscapePluginStream): + (WebNetscapePluginStream::setPlugin): + (WebNetscapePluginStream::startStream): + (WebNetscapePluginStream::destroyStream): + (WebNetscapePluginStream::destroyStreamWithReason): + (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError): + (WebNetscapePluginStream::deliverData): + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView stop]): + (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): + (-[WebBaseNetscapePluginView disconnectStream:]): + (-[WebBaseNetscapePluginView dealloc]): + (-[WebBaseNetscapePluginView pluginView:receivedResponse:]): + (-[WebBaseNetscapePluginView pluginView:receivedData:]): + (-[WebBaseNetscapePluginView pluginView:receivedError:]): + (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Move code from dealloc and finalize to the WebNetscapePluginStream destructor. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::~WebNetscapePluginStream): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Get rid of WebNetscapePlugInStreamLoaderClient, the plug-in stream is its own client. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::WebNetscapePluginStream): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginView:receivedError:]): + (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView destroyStream:reason:]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Change the Obj-C init methods to simply call WebNetscapePluginStream::create. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::create): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithFrameLoader:]): + (WebNetscapePluginStream::WebNetscapePluginStream): + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + +2008-10-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Convert more code over to C++. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::plugin): + (WebNetscapePluginStream::setRequestURL): + Convert to C++. + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::start): + (WebNetscapePluginStream::stop): + Ditto. + + (WebNetscapePluginStream::startStreamWithResponse): + Ditto. + + (-[WebBaseNetscapePluginStream startStreamWithResponse:]): + Call the C++ version. + + (-[WebBaseNetscapePluginStream impl]): + New accessor for the C++ class. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginView:receivedData:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + (-[WebBaseNetscapePluginView destroyStream:reason:]): + Call the C++ methods. + +2008-10-24 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix https://bugs.webkit.org/show_bug.cgi?id=21759 + Layering violation: FileChooser should not depend on Document/Frame/Page + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::runOpenPanel): + +2008-10-24 Anders Carlsson <andersca@apple.com> + + Fix Tiger build. + + * WebView/WebUIDelegate.h: + +2008-10-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/5440917> Support NPN_Construct + + Set construct. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + +2008-10-24 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Tim Hatcher. + + <rdar://problem/6119711> Remove the dependency on Foundation's private __COCOA_FORMAL_PROTOCOLS__ define. + + * Misc/EmptyProtocolDefinitions.h: + +2008-10-24 Adele Peterson <adele@apple.com> + + Reviewed by Sam Weinig. + + WebKit part of fix for <rdar://problem/5839256> FILE CONTROL: multi-file upload. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::runOpenPanel): + (-[WebOpenPanelResultListener chooseFilenames:]): + * WebView/WebUIDelegate.h: + +2008-10-24 Timothy Hatcher <timothy@apple.com> + + Implement new InspectorClient methods to work with Settings. + + https://bugs.webkit.org/show_bug.cgi?id=21856 + + Reviewed by Darin Adler. + + * WebCoreSupport/WebInspectorClient.h: Add the new methods and + guard the ObjC parts of the header. + +2008-10-24 Darin Adler <darin@apple.com> + + - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732 + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _convertValueToObjcValue:]): + (-[WebScriptCallFrame exception]): + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (aeDescFromJSValue): + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + Use JSValue* instead of JSValuePtr. + +2008-10-23 Mark Rowe <mrowe@apple.com> + + Build fix. + + * Misc/WebKitErrors.m: + (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): + +2008-10-20 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Remove FrameLoaderClient::detachedFromParent4. It is no longer used by any port. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + +2008-10-20 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Oliver Hunt. + + <rdar://problem/6277777> REGRESSION (r36954): XMLHttpRequest not working when + certain WebView delegate actions are taken + + * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): Don't accidentally create + a window shell if there is none yet. + +2008-10-19 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 + improve performance by eliminating JSValue as a base class for JSCell + + Remove most uses of JSValue, which will be removed in a future patch. + + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + Use JSValuePtr instead of JSValue. + * WebView/WebScriptDebugger.h: Removed declaration of JSValue. + +2008-10-18 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + - next step of https://bugs.webkit.org/show_bug.cgi?id=21732 + improve performance by eliminating JSValue as a base class for JSCell + + Tweak a little more to get closer to where we can make JSValuePtr a class. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _convertValueToObjcValue:]): Use JSValuePtr. + (-[WebScriptCallFrame exception]): Ditto. + (-[WebScriptCallFrame evaluateWebScript:]): Ditto. And noValue. + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): Use new DebuggerCallFrame + constructor that doesn't require explicitly passing an exception. + * WebView/WebView.mm: + (aeDescFromJSValue): Use JSValuePtr. + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto. + +2008-10-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - WebKit/mac part of https://bugs.webkit.org/show_bug.cgi?id=21736 + Long-dead decoded image data make up for most of the object cache's memory use over time + + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): In the primary web browser model, set the + cache's dead decoded data deletion interval to 60 seconds. + +2008-10-15 Mark Rowe <mrowe@apple.com> + + Reviewed by Jon Honeycutt. + + Fix a leak of a CFStringRef reported by the build bot. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): Use a autoreleased + NSString rather than manually releasing a CFStringRef when we're done with it. + +2008-10-15 Kenneth Russell <kenneth.russell@sun.com> + + Reviewed and landed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=21572 + + Initialize pluginFunc.size to the correct size before calling NP_GetEntryPoints. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + +2008-10-15 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + <rdar://problem/6272508> Crash occurs after loading flash content at http://www.macrumors.com/ + + Restore some code related to the CoreGraphics drawing model that was misplaced in r37131. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView invalidateRegion:]): + (-[WebBaseNetscapePluginView setVariable:value:]): + +2008-10-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed https://bugs.webkit.org/show_bug.cgi?id=21345 + Start the debugger without reloading the inspected page + + * WebInspector/WebInspector.mm: + (-[WebInspector startDebuggingJavaScript:]): Updated for rename. + +2008-10-14 Maxime Britto <britto@apple.com> + + Reviewed by Darin Adler. + + Added SPI to use WebCore's TextIterator with WebKit. + + * WebView/WebTextIterator.h: Added. + * WebView/WebTextIterator.mm: Added. + (-[WebTextIteratorPrivate dealloc]): + (-[WebTextIterator dealloc]): + (-[WebTextIterator initWithRange:]): Creates a TextIterator + instance + (-[WebTextIterator advance]): Asks the iterator to advance() . + (-[WebTextIterator currentNode]): Returns the current DOMNode from + the iterator + (-[WebTextIterator currentText]): Returns the current text from the + iterator + (-[WebTextIterator atEnd]): Indicated whether the iterator has + reached the end of the range. + * WebView/WebView.h: + * WebView/WebView.mm: + (-[WebView textIteratorForRect:]): Returns a WebTextIterator with + the DOMRange contained in the rectangle given as a parameter. + +2008-10-15 Timothy Hatcher <timothy@apple.com> + + Clean up user agent generation to simplify the _standardUserAgentWithApplicationName: + class method to not require a WebKit version. + + Reviewed by Darin Adler. + + * WebView/WebView.mm: + (+[WebView _standardUserAgentWithApplicationName:]): Create the WebKit version. + (-[WebView WebCore::_userAgentForURL:]): Use the simplified _standardUserAgentWithApplicationName:. + Remove code that created the WebKit version. + * WebView/WebViewPrivate.h: Change the method name of _standardUserAgentWithApplicationName:. + +2008-10-14 Timothy Hatcher <timothy@apple.com> + + Make the user agent generation method a class method and cache the WebKit + version in a static to prevent generating it every time. This is needed + clean up to fix <rdar://problem/6292331>. Moved all code to WebPrivate so + the class method can be in the WebViewPrivate.h header. + + Reviewed by John Sullivan. + + * WebView/WebView.mm: + (callGestalt): Moved. Same code. + (createMacOSXVersionString): Moved. Same code. + (createUserVisibleWebKitVersionString): Moved from _userVisibleBundleVersionFromFullVersion: + and returns a copied string. + (+[WebView _standardUserAgentWithApplicationName:andWebKitVersion:]): Made into a class method. + (-[WebView WebCore::_userAgentForURL:]): Changed to cache the WebKit version. + * WebView/WebViewPrivate.h: Added +_standardUserAgentWithApplicationName:andWebKitVersion:. + +2008-10-13 Maciej Stachowiak <mjs@apple.com> + + Rubber stamped by Mark Rowe. + + - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default + + * Configurations/DebugRelease.xcconfig: + +2008-10-11 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - rename _setAlwaysUseATSU to _setAlwaysUsesComplexTextCodePath and + update it for the renamed WebCoreTextRenderer method; keep the old + method around for clients that use it + + * WebView/WebView.mm: + (+[WebView _setAlwaysUseATSU:]): + (+[WebView _setAlwaysUsesComplexTextCodePath:]): + * WebView/WebViewPrivate.h: + +2008-10-09 Timothy Hatcher <timothy@apple.com> + + Don't convert JavaScriptCore header include paths to WebKit paths. This was needed + back when NPAPI and WebScriptObject migrated from JavaScriptCore. Also remove + JavaScriptCore from the VPATH. + + Reviewed by Sam Weinig. + + * MigrateHeaders.make: + +2008-10-08 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + - https://bugs.webkit.org/show_bug.cgi?id=21403 + Bug 21403: use new CallFrame class rather than Register* for call frame manipulation + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now. + +2008-10-08 Timothy Hatcher <timothy@apple.com> + + Roll out r37427 because it causes an infinite recursion loading about:blank. + + https://bugs.webkit.org/show_bug.cgi?id=21476 + +2008-10-08 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + - https://bugs.webkit.org/show_bug.cgi?id=21403 + Bug 21403: use new CallFrame class rather than Register* for call frame manipulation + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now. + +2008-10-07 David Hyatt <hyatt@apple.com> + + Move viewless WebKit methods that Safari needs from WebViewInternal to WebViewPrivate. + + Reviewed by Tim Hatcher + + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + (-[WebView _registerDraggedTypes]): + (-[WebView _usesDocumentViews]): + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]): + (-[WebView isFlipped]): + (-[WebView viewWillDraw]): + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2008-10-07 David Hyatt <hyatt@apple.com> + + Fix crash in isFlipped. Null check _private since isFlipped can get called from within AppKit + machinery during teardown of the WebView. + + Reviewed by Adam Roben + + * WebView/WebView.mm: + (-[WebView isFlipped]): + +2008-10-07 David Hyatt <hyatt@apple.com> + + Make viewless WebKit update focused and active state when the window becomes and loses key. + The focus controller has been patched to understand that in viewless mode it can recur down and + update all of the frames, which is why this code works now when placed just on the WebView. + + Reviewed by Adam Roben + + * WebView/WebView.mm: + (-[WebView addWindowObservers]): + (-[WebView removeWindowObservers]): + (-[WebView viewWillMoveToWindow:]): + (-[WebView viewDidMoveToWindow]): + (-[WebView _updateFocusedAndActiveState]): + (-[WebView _windowDidBecomeKey:]): + (-[WebView _windowDidResignKey:]): + (-[WebView _windowWillOrderOnScreen:]): + +2008-10-07 David Hyatt <hyatt@apple.com> + + Make sure the parent visibility state is set up properly on the outermost ScrollView widget. + This fixes the repainting issues with viewless WebKit on Mac. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + +2008-10-07 David Hyatt <hyatt@apple.com> + + Make sure viewless Mac WebKit does a layout if needed before drawing. + + Reviewed by Sam Weinig + + * WebView/WebView.mm: + (-[WebView viewWillDraw]): + +2008-10-07 David Hyatt <hyatt@apple.com> + + Make sure observers get hooked up to watch for size changes in viewless WebKit mode. + + Reviewed by Sam Weinig + + * ChangeLog: + * WebView/WebFrame.mm: + (-[WebFrame _drawRect:contentsOnly:]): + * WebView/WebView.mm: + (-[WebView viewWillDraw]): + (-[WebView _boundsChanged]): + (-[WebView addSizeObservers]): + (-[WebView viewDidMoveToWindow]): + (-[WebView viewDidMoveToSuperview]): + +2008-10-07 David Hyatt <hyatt@apple.com> + + Make sure WebView listens for size changes and resizes the frame view in viewless mode. + + Reviewed by Sam Weinig + + * WebView/WebView.mm: + (-[WebView addSizeObservers]): + (-[WebView viewDidMoveToWindow]): + (-[WebView viewDidMoveToSuperview]): + +2008-10-06 David Hyatt <hyatt@apple.com> + + Enable viewless Mac WebKit to paint some basic pages. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::windowResizerRect): + (WebChromeClient::repaint): + (WebChromeClient::screenToWindow): + (WebChromeClient::windowToScreen): + (WebChromeClient::platformWindow): + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::forceLayoutForNonHTML): + (WebFrameLoaderClient::dispatchDidCommitLoad): + (WebFrameLoaderClient::transitionToCommittedForNewPage): + (WebFrameLoaderClient::createFrame): + * WebView/WebFrame.mm: + (-[WebFrame _drawRect:contentsOnly:]): + * WebView/WebFrameInternal.h: + * WebView/WebFrameView.mm: + * WebView/WebFrameViewInternal.h: + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawSingleRect:]): + (-[WebHTMLView drawRect:]): + * WebView/WebView.mm: + (-[WebView isFlipped]): + (-[WebView _boundsChanged]): + (-[WebView _mustDrawUnionedRect:singleRects:count:]): + (-[WebView drawSingleRect:]): + (-[WebView drawRect:]): + (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): + (-[WebView initWithFrame:frameName:groupName:]): + (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]): + (-[WebView initWithCoder:]): + (-[WebView removeSizeObservers]): + (-[WebView viewWillMoveToWindow:]): + (-[WebView viewWillMoveToSuperview:]): + (-[WebView _usesDocumentViews]): + * WebView/WebViewInternal.h: + +2008-10-06 Kevin Decker <kdecker@apple.com> + + Rubber-stamped by Anders Carlsson. + + Rename _webkit_applicationCacheDirectoryWithBundleIdentifier to _webkit_localCacheDirectoryWithBundleIdentifier. + + * Misc/WebKitNSStringExtras.h: + * Misc/WebKitNSStringExtras.m: + (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]): + * WebView/WebDataSource.mm: + (-[WebDataSource _transferApplicationCache:]): + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make WebNetscapePluginStream a WebCore::NetscapePlugInStreamLoaderClient. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::~WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::didReceiveResponse): + (-[WebBaseNetscapePluginStream startStreamWithResponse:]): + (WebNetscapePluginStream::wantsAllStreams): + (-[WebBaseNetscapePluginStream wantsAllStreams]): + (WebNetscapePluginStream::didFail): + (-[WebBaseNetscapePluginStream destroyStreamWithError:]): + (WebNetscapePluginStream::didFinishLoading): + (-[WebBaseNetscapePluginStream finishedLoading]): + (WebNetscapePluginStream::didReceiveData): + (-[WebBaseNetscapePluginStream receivedData:]): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Bring back the stop method. It was called through performSelector, which + is why I couldn't find any references to it. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream stop]): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + More conversion and cleanup. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::startStream): + (-[WebBaseNetscapePluginStream startStreamWithResponse:]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fold initWithRequestURL into initWithRequest. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Change the init methods not to return nil on failures. (These failures never occur anyway) + + Use initWithRequest as the initializer, initWithRequestURL is going to be merged with it. + + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Convert more methods over to C++. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::ownerForStream): + (WebNetscapePluginStream::pluginCancelledConnectionError): + (WebNetscapePluginStream::errorForReason): + (-[WebBaseNetscapePluginStream errorForReason:]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError): + (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]): + (WebNetscapePluginStream::deliverData): + (WebNetscapePluginStream::deliverDataTimerFired): + (WebNetscapePluginStream::deliverDataToFile): + (-[WebBaseNetscapePluginStream finishedLoading]): + (-[WebBaseNetscapePluginStream receivedData:]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView destroyStream:reason:]): + +2008-10-06 David Hyatt <hyatt@apple.com> + + Add SPI for a new viewless WebKit mode. The idea is that when this flag is set there will be no + views created except for the outermost WebView. + + Reviewed by Tim Hatcher + + * WebView/WebView.mm: + * WebView/WebViewInternal.h: + +2008-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Convert more methods over to C++. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::reasonForError): + (WebNetscapePluginStream::destroyStreamWithReason): + (WebNetscapePluginStream::cancelLoadWithError): + (-[WebBaseNetscapePluginStream cancelLoadWithError:]): + (WebNetscapePluginStream::destroyStreamWithError): + (-[WebBaseNetscapePluginStream destroyStreamWithError:]): + (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]): + (-[WebBaseNetscapePluginStream _deliverDataToFile:]): + (-[WebBaseNetscapePluginStream finishedLoading]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]): + +2008-10-04 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + - https://bugs.webkit.org/show_bug.cgi?id=21295 + Bug 21295: Replace ExecState with a call frame Register pointer + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): Remove 0 passed for ExecState. + +2008-10-03 John Sullivan <sullivan@apple.com> + + Fixed Release build + + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::destroyStream): + added !LOG_DISABLED guard around declaration of npErr used only in LOG + +2008-10-03 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Convert destroyStream over to C++. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (WebNetscapePluginStream::destroyStream): + (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): + (-[WebBaseNetscapePluginStream _deliverData]): + +2008-10-03 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + Use a Timer instead of -[NSObject performSelector:withObject:afterDelay]; + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream _destroyStream]): + (-[WebBaseNetscapePluginStream _deliverData]): + (WebNetscapePluginStream::deliverDataTimerFired): + +2008-10-03 Anders Carlsson <andersca@apple.com> + + Reviewed by David Hyatt. + + More plug-in stream cleanup. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::create): + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithFrameLoader:]): + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + (-[WebBaseNetscapePluginStream setPlugin:]): + (WebNetscapePluginStream::setPlugin): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream _destroyStream]): + +2008-10-03 David Hyatt <hyatt@apple.com> + + Remove addToDirtyRegion. + + Reviewed by Oliver Hunt + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + +2008-10-02 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21328 + + Make widget invalidation more cross-platform. + + (1) Make invalidateRect a pure virtual function on Widget. All leaf widgets must now implement this function. + + (2) Scrollbars now send invalidations through the ScrollbarClient. windowClipRect on ScrollbarClient has been removed and replaced with this invalidation call. + This allows all scrollbar invalidations to go through the render tree so that transforms and reflections will be respected. + + (3) Plugins now have the native window invalidation code for windowed plugins. Windowless plugins do a repaintRectangle on the plugin's renderer. + + (4) FrameViews now do a repaintRectangle on their owner element's renderer. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebFrameLoaderClient.mm: + (PluginWidget::PluginWidget): + (PluginWidget::invalidateRect): + (NetscapePluginWidget::NetscapePluginWidget): + (WebFrameLoaderClient::createPlugin): + +2008-10-02 Darin Adler <darin@apple.com> + + Reviewed by Geoff Garen. + + - https://bugs.webkit.org/show_bug.cgi?id=21321 + Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): Use heap. instead of heap-> to + work with the heap. + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): Ditto. + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): Ditto. + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): Ditto. + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Ditto. + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): Ditto. + +2008-10-02 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21314 + + Make scrollBackingStore cross-platform. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::repaint): + (WebChromeClient::scroll): + +2008-10-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler and Cameron Zwarich. + + Updated for JavaScriptCore API changes: use a SourceCode instead of + broken out parameters; treat sourceId as intptr_t. + + We still treat sourceId as int in some cases because of DashCode. See + <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for + sourceId, not int. + + * WebView/WebScriptDebugger.h: + * WebView/WebScriptDebugger.mm: + (toNSString): + (WebScriptDebugger::sourceParsed): + (WebScriptDebugger::callEvent): + (WebScriptDebugger::atStatement): + (WebScriptDebugger::returnEvent): + (WebScriptDebugger::exception): + (WebScriptDebugger::willExecuteProgram): + (WebScriptDebugger::didExecuteProgram): + (WebScriptDebugger::didReachBreakpoint): + +2008-10-01 David Hyatt <hyatt@apple.com> + + Move prohibitsScrolling from the Frame to the ScrollView. + + Reviewed by Sam Weinig + + * WebView/WebView.mm: + (-[WebView setProhibitsMainFrameScrolling:]): + +2008-10-01 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21282 + + Make contentsToScreen/screenToContents cross-platform. Only implemented by Mac/Win right now. + + Reviewed by Adam Roben + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::repaint): + (WebChromeClient::screenToWindow): + (WebChromeClient::windowToScreen): + +2008-09-30 Dave Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21269 + + This patch makes the ScrollView::paint method cross-platform. The paint method calls the base class + Widget paint on platforms with native widgets (Mac and wx). Otherwise it calls a virtual function, + paintContents, to paint the ScrollView's contents, and then it paints each of the two scrollbars and + the scrollbar corner. + + The scrollbar themes are now responsible for painting scrollbar corners. At the moment ScrollbarThemeWin still + paints white (which is incorrect), so a future patch will actually implement proper native scroll corner painting + for Windows. + + paintContents is implemented by FrameView, and replaces Frame::paint. All of the FramePrivate member + variables used by Frame::paint have moved to FrameViewPrivate instead. All callers of Frame::paint have + been patched to use FrameView::paintContents instead. + + Reviewed by Darin Adler + + * WebView/WebFrame.mm: + (-[WebFrame _drawRect:]): + +2008-09-30 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders Carlsson. + + Remove the NPDrawingModelOpenGL entirely. To my knowledge no shipping plug-in ever used it, and no other browser engine + ever supported it. + + * Plugins/WebBaseNetscapePluginView.h: Removed AGL.h import and OpenGL related ivars. + * Plugins/WebBaseNetscapePluginView.mm: Removed soft linking for OpenGL and AGL frameworks. + Also removed many methods AGL/CGL support methods that are no longer necessary. + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed NPDrawingModelOpenGL related code. + (-[WebBaseNetscapePluginView restorePortState:]): Ditto. + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Ditto. + (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): Ditto. + (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto. + (-[WebBaseNetscapePluginView stop]): Ditto. + (-[WebBaseNetscapePluginView dealloc]): Ditto. + (-[WebBaseNetscapePluginView drawRect:]): + (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): Ditto. + (-[WebBaseNetscapePluginView invalidateRegion:]): Ditto. + (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins WebKit does not support NPDrawingModelOpenGL. + (-[WebBaseNetscapePluginView setVariable:value:]): Removed NPDrawingModelOpenGL related code. + (-[WebBaseNetscapePluginView _viewHasMoved]): Ditto. + +2008-09-30 Dave Hyatt <hyatt@apple.com> + + http://bugs.webkit.org/show_bug.cgi?id=21250 + + Rename updateContents to repaintContentRectangle and make it cross-platform by always sending + repaints up through the ChromeClient. + + Reviewed by Darin Adler + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::repaint): + +2008-09-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe and Adam Roben. + + No need to use pointers to store C++ objects as pointers in WebViewPrivate, we can just + store them directly. + + * Configurations/Base.xcconfig: + Set GCC_OBJC_CALL_CXX_CDTORS to YES. + + * WebView/WebView.mm: + (-[WebViewPrivate init]): + (-[WebViewPrivate dealloc]): + (-[WebViewPrivate finalize]): + (-[WebView _preferencesChangedNotification:]): + (-[WebView setApplicationNameForUserAgent:]): + (-[WebView setCustomUserAgent:]): + (-[WebView customUserAgent]): + (-[WebView WebCore::_userAgentForURL:WebCore::]): + (-[WebView _addObject:forIdentifier:]): + (-[WebView _objectForIdentifier:]): + (-[WebView _removeObjectForIdentifier:]): + +2008-09-29 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Simon. + + Changed copyright from Trolltech ASA to Nokia. + + Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008. + + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + +2008-09-28 Timothy Hatcher <timothy@apple.com> + + Improves the Web Inspector node highlight so it does not scroll + to reveal the node in the page. This makes the highlight less + invasive and causes less things to change on screen. Also makes + the highlight redraw when the WebView draws, so it stays current + if the node changes on the page for any reason. + + <rdar://problem/6115804> Don't scroll when highlighting (21000) + https://bugs.webkit.org/show_bug.cgi?id=21000 + + Reviewed by Dan Bernstein. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController highlightNode:]): Call setNeedsDisplay:YES + if there is an existing highlight. + (-[WebInspectorWindowController didAttachWebNodeHighlight:]): Set the current + highlight node on the inspected WebView. + (-[WebInspectorWindowController willDetachWebNodeHighlight:]): Set the current + highlight node on the inspected WebView to nil. + * WebInspector/WebNodeHighlight.m: + (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Disable screen updates + until flush for the inspected window. Invalidate the whole highlight view since + we don't know the rect that needs updated since the highlight can be larger than + the highlighted element due to the margins and other factors. + * WebInspector/WebNodeHighlightView.m: + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawSingleRect:]): Call setNeedsUpdateInTargetViewRect: on the + current highlight node. + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): Release the current highlight node. + (-[WebView setCurrentNodeHighlight:]): Set the current highlight node. + (-[WebView currentNodeHighlight]): Return the current highlight node. + * WebView/WebViewInternal.h: + +2008-09-28 David Kilzer <ddkilzer@apple.com> + + Fix build warning in WebDefaultUIDelegate.m + + Reviewed by Dan Bernstein. + + This fixes a warning noticed by the clang static analyzer: + .../WebDefaultUIDelegate.m: In function ‘-[WebDefaultUIDelegate webViewFirstResponder:]’: + .../WebDefaultUIDelegate.m:92: warning: initialization from distinct Objective-C type + + Note that this doesn't actually cause any change in behavior since + the gcc compiler ignores the semi-colon anyway. + + * DefaultDelegates/WebDefaultUIDelegate.m: + (-[WebDefaultUIDelegate webViewFirstResponder:]): Removed semi-colon + from method signature. + +2008-09-27 David Hyatt <hyatt@apple.com> + + Fix for https://bugs.webkit.org/show_bug.cgi?id=21182 + + Make sure Mac null checks the view like the other platforms do now that Mac goes through WebCore + to call setAllowsScrolling. + + Reviewed by Mark Rowe + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createFrame): + +2008-09-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=21178 + <rdar://problem/6248651> + + Check if the plug-in is allowed to load the resource. This matches Firefox. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + +2008-09-26 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Tim Hatcher. + + Update FEATURE_DEFINES after ENABLE_CROSS_DOCUMENT_MESSAGING was removed. + + * Configurations/WebKit.xcconfig: + +2008-09-26 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21164 + + Rework concept of allowsScrolling/setAllowsScrolling to be cross-platform. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createFrame): + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.m: + * WebView/WebDynamicScrollBarsViewInternal.h: + * WebView/WebFrameView.mm: + (-[WebFrameView setAllowsScrolling:]): + (-[WebFrameView allowsScrolling]): + +2008-09-26 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21149 + + More refactoring to make scrollbar modes cross-platform. Reduce the protocol that + WebDynamicScrollBarsView has to implement for communicating with WebCore to just three methods. + + Reviewed by Sam Weinig + + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView scrollingModes:WebCore::vertical:WebCore::]): + (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): + (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): + (-[WebDynamicScrollBarsView setScrollingModes:vertical:andLock:]): + * WebView/WebDynamicScrollBarsViewInternal.h: + * WebView/WebFrameView.mm: + (-[WebFrameView setAllowsScrolling:]): + * WebView/WebView.mm: + (-[WebView setAlwaysShowVerticalScroller:]): + (-[WebView setAlwaysShowHorizontalScroller:]): + +2008-09-26 David Kilzer <ddkilzer@apple.com> + + Fix Mac build with XSLT disabled + + Reviewed by Alexey. + + * Misc/WebCache.mm: + (+[WebCache statistics]): Populate xslStyleSheet statistics with + zeros if XSLT is disabled. + +2008-09-25 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21101 + + Fix the updating of the active state to not be dumb, so that viewless scrollbars repaint properly. + + Reviewed by Tim Hatcher + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateFocusedAndActiveState]): + +2008-09-24 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - https://bugs.webkit.org/show_bug.cgi?id=21079 + <rdar://problem/6203938> Disallow embedding Safari-generated pages + (e.g bookmarks collection) in subframes + + * DefaultDelegates/WebDefaultPolicyDelegate.m: + (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): + Use the new +[WebView _canHandleRequest:forMainFrame:] so we can give + a different answer for the main frame and subframes. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::canHandleRequest): Ditto. + + * WebView/WebView.mm: + (+[WebView _canHandleRequest:forMainFrame:]): Added forMainFrame. Only look + for scheme-specific representations for the main frame, not subframes. + (+[WebView _canHandleRequest:]): Give answer for main frame -- calls the + method above with YES for main frame. + + * WebView/WebViewInternal.h: Added _canHandleRequest:forMainFrame:. + +2008-09-23 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=21039 + + Teach the viewless Mac scrollbar how to avoid the NSWindow resizer. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::windowResizerRect): + +2008-09-23 Dan Bernstein <mitz@apple.com> + + Reviewed by Beth Dakin. + + - fix <rdar://problem/6233388> Crash beneath -[WebFrameView keyDown:] + + Test: fast/events/keydown-remove-frame.html + + * WebView/WebFrameView.mm: + (-[WebFrameView keyDown:]): Added a null check. + +2008-09-21 Dirk Schulze <vbs85@gmx.de> + + Reviewed and landed by Eric Seidel. + + Moved CGFloat definition to WebKitPrefix so CGFloat can be used more + freely throughout WebCore without worrying about breaking Tiger. + + * Misc/WebTypesInternal.h: Removed it from here. + * WebKitPrefix.h: Added it here. + +2008-09-20 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Tim Hatcher. + + Revert r35688. We use a textured window on Leopard, which does not have the + square corners of the standard Aqua window on Tiger. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController window]): Add back the call to WKNSWindowMakeBottomCornersSquare. + +2008-09-19 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + - speculative fix for https://bugs.webkit.org/show_bug.cgi?id=20943 + Assertion failure in RefCountedLeakCounter::cancelMessageSuppression() when closing a window + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Moved call to + RefCountedLeakCounter::suppressMessages in here. + (-[WebView initWithFrame:frameName:groupName:]): Moved it out of here. + +2008-09-18 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Add SPI to WebView to allow DRT to clear the main frame's name between tests. + + * WebView/WebView.mm: + (-[WebView _clearMainFrameName]): + * WebView/WebViewPrivate.h: + +2008-09-18 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + - fix https://bugs.webkit.org/show_bug.cgi?id=20925 + LEAK messages appear every time I quit + + * WebView/WebPreferences.mm: + (-[WebPreferences setFullDocumentTeardownEnabled:]): Removed unneeded call + to setLogLeakMessages. + * WebView/WebView.mm: + (-[WebView _closeWithFastTeardown]): Call RefCountedLeakCounter::suppressMessages, + telling it that we can't track leaks because at least one WebView was closed with + fast teardown. + (-[WebView _close]): Removed unneeded call to setLogLeakMessages. Added a call to + cancelMessageSuppression since the WebView is no longer open. + Added an explicit garbage collect to help with the case where we're closing during + the quit process -- the garbageCollectSoon() calls done inside WebCore won't help + us in that case. + (-[WebView initWithFrame:frameName:groupName:]): Call + RefCountedLeakCounter::suppressMessages telling it that we can't track leaks + because at least one WebView is currently open. + +2008-09-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Move the remainder of the stream ivars to the C++ object. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]): + (-[WebBaseNetscapePluginStream initWithFrameLoader:]): + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + (-[WebBaseNetscapePluginStream setPlugin:]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream start]): + (-[WebBaseNetscapePluginStream stop]): + (-[WebBaseNetscapePluginStream wantsAllStreams]): + (-[WebBaseNetscapePluginStream _destroyStream]): + (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): + (-[WebBaseNetscapePluginStream cancelLoadWithError:]): + (-[WebBaseNetscapePluginStream _deliverData]): + +2008-09-17 David Hyatt <hyatt@apple.com> + + Make the notion of Widget having an underlying native widget cross-platform. + + Reviewed by Sam Weinig + + * WebCoreSupport/WebFrameLoaderClient.mm: + (NetscapePluginWidget::handleEvent): + * WebView/WebFrame.mm: + (-[WebFrame _dragSourceMovedTo:]): + (-[WebFrame _dragSourceEndedAt:operation:]): + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): + * WebView/WebRenderNode.mm: + (copyRenderNode): + +2008-09-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Cameron Zwarich. + + Move more instance variables down to the C++ class. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + (-[WebBaseNetscapePluginStream transferMode]): + (-[WebBaseNetscapePluginStream plugin]): + (-[WebBaseNetscapePluginStream setPlugin:]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream wantsAllStreams]): + (-[WebBaseNetscapePluginStream _destroyStream]): + (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): + (-[WebBaseNetscapePluginStream _deliverData]): + (-[WebBaseNetscapePluginStream _deliverDataToFile:]): + (-[WebBaseNetscapePluginStream finishedLoading]): + (-[WebBaseNetscapePluginStream receivedData:]): + +2008-09-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dave Hyatt. + + Move a bunch of instance variables into the C++ class. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]): + (-[WebBaseNetscapePluginStream errorForReason:]): + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream setRequestURL:]): + (-[WebBaseNetscapePluginStream setResponseURL:]): + (-[WebBaseNetscapePluginStream setMIMEType:]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream _destroyStream]): + (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]): + (-[WebBaseNetscapePluginStream _deliverData]): + (-[WebBaseNetscapePluginStream receivedData:]): + +2008-09-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dave Hyatt. + + Add a new WebNetscapePluginStream C++ class. The idea is that it is supposed to replace the Obj-C + WebBaseNetscapePluginStream class. The plan is to gradually move/rewrite code from the Obj-C class to the C++ class + until the C++ class can replace the Obj-C class. + + * Plugins/WebBaseNetscapePluginStream.h: + (WebNetscapePluginStream::create): + (WebNetscapePluginStream::WebNetscapePluginStream): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithFrameLoader:]): + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + +2008-09-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dave Hyatt. + + Instead of storing a pointer to NPP method individually, just store a pointer to the NPNetscapeFuncs vtable. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream setPlugin:]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream wantsAllStreams]): + (-[WebBaseNetscapePluginStream _destroyStream]): + (-[WebBaseNetscapePluginStream _deliverData]): + * Plugins/WebNetscapePluginPackage.h: + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage pluginFuncs]): + +2008-09-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Dave Hyatt. + + Remove references to WebNetscapePluginStream. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebNetscapePluginEmbeddedView.h: + +2008-09-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - fix https://bugs.webkit.org/show_bug.cgi?id=20860 + REGRESSION: Crash in RenderLayer::hasVisibleContent() loading wavy.com + + * WebView/WebFrame.mm: + (-[WebFrame _getVisibleRect:]): Changed to check if the RenderPart has + layout before accessing it, instead of checking if the frame inside it + has layout. + +2008-09-15 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler, Beth Dakin + + Support strings for AXLists + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXDefinitionListTermText]): + (-[WebViewFactory AXDefinitionListDefinitionText]): + +2008-09-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + Merge WebNetscapePluginStream into WebBaseNetscapePluginStream. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithFrameLoader:]): + (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + (-[WebBaseNetscapePluginStream start]): + (-[WebBaseNetscapePluginStream stop]): + (-[WebBaseNetscapePluginStream cancelLoadWithError:]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginView:receivedResponse:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + * Plugins/WebNetscapePluginEmbeddedView.mm: + * Plugins/WebNetscapePluginStream.h: Removed. + * Plugins/WebNetscapePluginStream.mm: Removed. + +2008-09-12 John Sullivan <sullivan@apple.com> + + Fixed <rdar://problem/6110941> Clicking the print button in PDF content does nothing + + Reviewed by Darin Adler + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewPerformPrint:]): + Implemented PDFKit delegate method that's called after a Print action in the PDF content + +2008-09-12 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - fix a crash in -visibleRect when it is called during WebFrameView deallocation + + * WebView/WebFrameView.mm: + (-[WebFrameView visibleRect]): Added an early return if _private is 0. + +2008-09-11 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - eliminate excessive repainting when a clipped iframe is moved (noticed in <rdar://problem/6204032>) + + * WebView/WebFrame.mm: + (-[WebFrame _getVisibleRect:]): Added. If the frame is in a RenderPart + and has layout, gets the visible rect of the RenderPart and returns + YES. Returns NO otherwise. + * WebView/WebFrameInternal.h: + * WebView/WebFrameView.mm: + (-[WebFrameView visibleRect]): Added. Overrides this NSView method to + take clipping in the render tree into account. + +2008-09-09 Dan Bernstein <mitz@apple.com> + + - Tiger build fix + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2008-09-09 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - WebKit part of <rdar://problem/6206244> Use alternate character-to-glyph interface on Leopard + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Maciej Stachowiak. + + Bug 20704: Replace the KJS namespace + <https://bugs.webkit.org/show_bug.cgi?id=20704> + + Rename the KJS namespace to JSC. + + * Misc/WebCoreStatistics.mm: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream wantsAllStreams]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView setWindowIfNecessary]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView createPluginScriptableObject]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebBaseNetscapePluginView loadPluginRequest:]): + (-[WebBaseNetscapePluginView _printedPluginBitmap]): + * Plugins/WebPluginController.mm: + (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): + (-[WebPluginController startAllPlugins]): + (-[WebPluginController stopAllPlugins]): + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebView/WebFrame.mm: + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebScriptDebugger.h: + * WebView/WebScriptDebugger.mm: + * WebView/WebView.mm: + (-[WebViewPrivate init]): + +2008-09-05 Timothy Hatcher <timothy@apple.com> + + Correct a typo in the setApplicationChromeModeEnabledEnabled: + method name, remove the extra "Enabled". + + * WebView/WebPreferences.mm: + * WebView/WebPreferencesPrivate.h: + +2008-09-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Eric Seidel. + + Fix https://bugs.webkit.org/show_bug.cgi?id=20639. + Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE + + * Configurations/WebKit.xcconfig: Remove ENABLE_DASHBOARD_SUPPORT from FEATURE_DEFINES. + +2008-09-03 Eric Seidel <eric@webkit.org> + + Reviewed by Sam. + + Clean up Platform.h and add PLATFORM(CHROMIUM), PLATFORM(SKIA) and USE(V8_BINDINGS) + + * Configurations/WebKit.xcconfig: + * WebKitPrefix.h: add rules for V8_BINDINGS + +2008-09-01 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=19760 + + Add a linked-on-or-after check to prevent substitute data from loading + local resources on newer users of WebKit. + + * Misc/WebKitVersionChecks.h: + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): + +2008-08-29 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + Fix regression I introducted in 35946 + Already covered by media/video-click-dlbclick-standalone.html + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation receivedData:withDataSource:]): Cancel the load here after + calling [WebFrame _receivedData:] which more closely follows the path taken by PluginDocuments + +2008-08-28 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Geoff. + + <rdar://problem/6095949> REGRESSION (5525.8-6527.1?): "this" is null + when you first hit a breakpoint in Dashcode + - We wanted to reset the callframe whenever eval() was called but + dashcode uses eval() when broken to evaluate the state of the current + call frame. + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::willExecuteProgram): + (WebScriptDebugger::didExecuteProgram): + +2008-08-27 Robert Kroeger <rjkroege@liqui.org> + + Tweaked by Sam Weinig. + + Reviewed by Eric Seidel. + + Fix https://bugs.webkit.org/show_bug.cgi?id=6595 + <rdar://problem/4432150> + Right-click does not fire mouseup event + + Adds a rightMouseUp handler to the WebHTMLView. + + The added method generates mouseup events for button 2. The result + is that webkit will deliver mousedown and mouseup events for button + 2 in a fashion identical to FireFox and will retain event ordering + identical to Internet Explorer. + + Test: fast/events/mouseup-from-button2.html + + * WebView/WebHTMLView.mm: + (-[WebHTMLView rightMouseUp:]): + +2008-08-27 Timothy Hatcher <timothy@apple.com> + + Add support for support for -webkit-appearance: default-button on the Mac platform. + + <rdar://problem/6173530> + + Reviewed by Dave Hyatt. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Init AdvanceDefaultButtonPulseAnimation. + * WebView/WebPreferenceKeysPrivate.h: Added WebKitApplicationChromeModeEnabledPreferenceKey. + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): Set WebKitApplicationChromeModeEnabledPreferenceKey to NO. + (-[WebPreferences applicationChromeModeEnabled]): Added. + (-[WebPreferences setApplicationChromeModeEnabledEnabled:]): Added. + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Call Settings::setApplicationChromeMode + with the value of -[WebPreferences applicationChromeModeEnabled]. + +2008-08-27 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + <rdar://problem/6134133> - Crash when loading large movie as a standalone document + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::pluginWillHandleLoadError): + +2008-08-20 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by John Sullivan. + + - rename shouldUpdateWhileHidden to shouldUpdateWhileOffscreen, + rename related methods and variables accordingly, and make + -setShouldUpdateWhileOffscreen: and -shouldUpdateWhileOffscreen + WebView API. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + * WebView/WebFrame.mm: + (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): + * WebView/WebFrameInternal.h: + * WebView/WebHTMLView.mm: + (-[WebHTMLView windowWillOrderOnScreen:]): + * WebView/WebView.h: + * WebView/WebView.mm: + (-[WebViewPrivate init]): + (-[WebView setBackgroundColor:]): + (-[WebView setDrawsBackground:]): + (-[WebView setShouldUpdateWhileOffscreen:]): + (-[WebView shouldUpdateWhileOffscreen]): + * WebView/WebViewPrivate.h: + +2008-08-18 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Switch to non-deprecated NSFileManager API. + + In order to minimize #if's the new NSFileManager APIs have been implemented for + Tiger and call sites updated to use the new methods. + + * Misc/WebIconDatabase.mm: + (importToWebCoreFormat): + * Misc/WebKitNSStringExtras.m: + (-[NSString _webkit_fixedCarbonPOSIXPath]): + * Misc/WebKitSystemBits.m: + * Misc/WebNSFileManagerExtras.h: + * Misc/WebNSFileManagerExtras.m: Remove implementations of methods that are not used. + (-[NSFileManager _webkit_backgroundRemoveFileAtPath:]): + (-[NSFileManager attributesOfFileSystemForPath:error:]): Implement new API for Tiger in terms of Tiger API. + (-[NSFileManager contentsOfDirectoryAtPath:error:]): Ditto. + (-[NSFileManager moveItemAtPath:toPath:error:]): Ditto. + (-[NSFileManager removeItemAtPath:error:]): Ditto. + * Plugins/WebPluginDatabase.mm: + (-[WebPluginDatabase _scanForNewPlugins]): + +2008-08-20 Josh Aas <joshmoz@gmail.com> + + Reviewed and landed by Anders. + + <rdar://problem/6163636> + rename NPCocoaEvent's "event" struct to "data" (20446) + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::drawRect): + (WebNetscapePluginEventHandlerCocoa::sendMouseEvent): + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + (WebNetscapePluginEventHandlerCocoa::windowFocusChanged): + (WebNetscapePluginEventHandlerCocoa::focusChanged): + +2008-08-20 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/6145626> + Allows a WebKit client to mark a frame as not-text-searchable + through SPI. + + * WebView/WebFrame.mm: + (-[WebFrame _setExcludeFromTextSearch:]): + * WebView/WebFramePrivate.h: + +2008-08-19 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + Bring back shared JSGlobalData and implicit locking, because too many clients rely on it. + + * ForwardingHeaders/runtime/JSLock.h: Added. + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics shouldPrintExceptions]): + (+[WebCoreStatistics setShouldPrintExceptions:]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream wantsAllStreams]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView setWindowIfNecessary]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView createPluginScriptableObject]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebBaseNetscapePluginView loadPluginRequest:]): + (-[WebBaseNetscapePluginView _printedPluginBitmap]): + * Plugins/WebPluginController.mm: + (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): + (-[WebPluginController startAllPlugins]): + (-[WebPluginController stopAllPlugins]): + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2008-08-19 Timothy Hatcher <timothy@apple.com> + + Fixes the Web Inspector flashing white while resizing after + highlighting a page element. Calling disableScreenUpdatesUntilFlush + when attaching and detaching the Inspector page highlight is bad, + since the browser window might not flush again for a while. So screen + updates could be disabled for long periods of time, causing backing store + flashing while resizing. There is no need to call disableScreenUpdatesUntilFlush + when attaching or detaching the child window. + + Reviewed by John Sullivan and Kevin McCullough. + + * WebInspector/WebNodeHighlight.m: + (-[WebNodeHighlight attach]): Remove the call to disableScreenUpdatesUntilFlush. + (-[WebNodeHighlight detach]): Ditto. + +2008-08-19 Timothy Hatcher <timothy@apple.com> + + Correctly remembers the attached state of the Web Inspector so + it opens in that state for the next window, or next launch. + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController attach]): Set WebKitInspectorAttachedKey + to YES in the user defaults. + (-[WebInspectorWindowController detach]): Set WebKitInspectorAttachedKey + to NO in the user defaults. + +2008-08-18 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=19347 + <rdar://problem/5977562> Input methods do not work after switching to a password field + and back. + + Fix <rdar://problem/5522011> (The content of the password field of Safari is displayed by + reconversion) in a different way which doesn't conflict with context caching performed + by AppKit. + + This original bug does not really occur in ToT or shipping Safari under Mac OS X 10.5.4, + because input methods are disabled in password fields. Attempting to reconvert text typed + with Romaji only yields a string of bullets. Still, it is probably better to match Cocoa + password field behavior and disable reconversion completely. + + * WebView/WebHTMLView.mm: + (isInPasswordField): Factored out code to determine that the current selection is in + a password field. + (inputContext): Removed a hack that was breaking TSMGetActiveDocument(). + (-[WebHTMLView attributedSubstringFromRange:]): Check for password fields. + (-[WebHTMLView textStorage]): Ditto. + +2008-08-12 Darin Adler <darin@apple.com> + + Reviewed by Geoff. + + - eliminate JSValue::type() + + * WebView/WebView.mm: + (aeDescFromJSValue): Rewrite to use the JSValue::is functions instead + of a switch on JSValue::type(). + +2008-08-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Made room for a free word in JSCell. + + (Updated for JavaScriptCore changes.) + +2008-08-15 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Geoff Garen. + + <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework + + * Configurations/Base.xcconfig: Factor out the debug-only settings so that they can shared + between the Debug configuration and debug Production variant. + +2008-08-14 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen and Timothy Hatcher. + + Add WebView SPI to set HTMLTokenizer yielding parameters. + + * WebView/WebView.mm: + (-[WebView _setCustomHTMLTokenizerTimeDelay:]): + (-[WebView _setCustomHTMLTokenizerChunkSize:]): + * WebView/WebViewPrivate.h: + +2008-08-13 Timothy Hatcher <timothy@apple.com> + + Fixes a bug where Safari's find banner would be permanently hidden + when attaching or closing the Web Inspector while attached. + + https://bugs.webkit.org/show_bug.cgi?id=20376 + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController close]): + Carefully manipulate the WebFrameView's frame when closing to + not assume the WebFrameView's frame fills the inspected WebView. + (-[WebInspectorWindowController setAttachedWindowHeight:]): + Carefully manipulate the WebFrameView's frame when docking to + not assume the WebFrameView plus the Web Inspector WebViews fills + the full inspected WebView. + +2008-08-13 Stephanie Lewis <slewis@apple.com> + + fix 64bit build + + * WebCoreSupport/WebInspectorClient.mm: + +2008-08-13 Timothy Hatcher <timothy@apple.com> + + Remember the docked state of the Web Inspector, so it can be + reopened docked if it was last docked. + + https://bugs.webkit.org/show_bug.cgi?id=14271 + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController init]): Initialize _shouldAttach + to the value stored in the user defaults. If there has never + been a value stored, default to being attached. + (-[WebInspectorWindowController showWindow:]): Pass the attached + state to InspectorController::setWindowVisible. + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Remove the Inspector's WebView for the view hierarchy when closed + while attached. This prevents it from showing in the background + while the page changes. + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController close:]): Call removeFromSuperview + on the Inspector's WebView if it isn't attached, so it will not + be visible when navigating pages while closed. + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Make the docked Web Inspector resizable. + + https://bugs.webkit.org/show_bug.cgi?id=14282 + + Reviewed by Kevin McCullough. + + * WebCoreSupport/WebInspectorClient.h: + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::setAttachedWindowHeight): Call setAttachedWindowHeight: + on the WebInspectorWindowController. + (-[WebInspectorWindowController showWindow:]): Call setAttachedWindowHeight:. + (-[WebInspectorWindowController setAttachedWindowHeight:]): Moved code + from showWindow: and generalized to allow being called multiple times. + Remembers the last height passed, which is used by showWindow: the next + time the Inspector attaches. + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Remove unneeded header imports from some Web Inspector files. + + Reviewed by Adam Roben. + + * WebCoreSupport/WebInspectorClient.mm: + * WebInspector/WebInspector.mm: + * WebInspector/WebNodeHighlightView.m: + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Remove the call to WKNSWindowMakeBottomCornersSquare on the + Web Inspector's window. This isn't needed anymore since the + window style masks used always have square bottom corners. + + Reviewed by Adam Roben. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController window]): Remove the call + to WKNSWindowMakeBottomCornersSquare. + +2008-08-12 Timothy Hatcher <timothy@apple.com> + + Make attaching and detaching the Web Inspector instantaneous. + This also preserves the current view, other state, and keeps + the script debugger attached. + + https://bugs.webkit.org/show_bug.cgi?id=19301 + + Reviewed by Adam Roben. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController close]): Only call setWindowVisible(false) + when not moving windows. + +2008-08-12 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - replace -[WebPreferences updatesWhenOffscreen] with -[WebView shouldUpdateWhileHidden] + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + * WebView/WebFrame.mm: + (-[WebFrame _updateBackgroundAndUpdatesWhileHidden]): + * WebView/WebFrameInternal.h: + * WebView/WebHTMLView.mm: + (-[WebHTMLView windowWillOrderOnScreen:]): + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebViewPrivate init]): + (-[WebView _preferencesChangedNotification:]): + (-[WebView setBackgroundColor:]): + (-[WebView setDrawsBackground:]): + (-[WebView shouldUpdateWhileHidden]): + (-[WebView setShouldUpdateWhileHidden:]): + * WebView/WebViewPrivate.h: + +2008-08-08 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - fix <rdar://problem/6130216> Exception "windowRegionBeingDrawn != nil" in NSView when caching image of a subframe + + This change reintroduces <https://bugs.webkit.org/show_bug.cgi?id=5195> on Leopard. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]): Removed an + unsuccessful workaround for <rdar://problem/5668489>, because invoking + layout may change the view hierarchy during the drawing operation, + which is not supported on Leopard. + +2008-08-08 Maxime Britto <britto@apple.com> + + Reviewed by Adele. + + * WebView/WebFrame.mm: + (-[WebFrame _scrollDOMRangeToVisible:]): + +2008-08-08 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Fix for <rdar://problem/5865504> + + This bug was actually *largely* fixed by http://trac.webkit.org/changeset/35538. + But with that same patch, it became possible for a WebResource to fail to initialize. + Therefore we were trying to add nil to an NSCFArray for certain situations, which is bad. + Lets fix that, shall we? + + * WebView/WebArchive.mm: + (-[WebArchive subresources]): + +2008-08-06 Eric Seidel <eric@webkit.org> + + Reviewed by Cameron Zwarich. + + Move more methods from Frame into ScriptController + https://bugs.webkit.org/show_bug.cgi?id=20294 + + The WebKit side of this move. Calls to frame() are now frame()->script() + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView getVariable:value:]): + (-[WebBaseNetscapePluginView _destroyPlugin]): + * Plugins/WebPluginController.mm: + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebView/WebFrame.mm: + (-[WebFrame windowObject]): + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::callEvent): + * WebView/WebView.mm: + (-[WebView windowScriptObject]): + +2008-08-06 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe. + + - fix an assertion failure in Cache::setCapacities() + + * Misc/WebKitSystemBits.h: Changed the return type of WebMemorySize() + to uint64_t. + * Misc/WebKitSystemBits.m: + (WebMemorySize): + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): + +2008-08-05 Anders Carlsson <andersca@apple.com> + + Pass in the correct class here. + + * WebView/WebResource.mm: + (-[WebResourcePrivate dealloc]): + +2008-08-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/6037398> + ER: Deallocate WebKit objects on the main thread, even if released on secondary thread + + Add calls to WebCoreObjCScheduleDeallocateOnMainThread in dealloc methods of objects we expose. + + * Carbon/CarbonWindowAdapter.m: + (-[CarbonWindowAdapter dealloc]): + * History/WebBackForwardList.mm: + (-[WebBackForwardList dealloc]): + * History/WebHistoryItem.mm: + (-[WebHistoryItem dealloc]): + * Misc/WebElementDictionary.mm: + (+[WebElementDictionary initialize]): + (-[WebElementDictionary dealloc]): + * WebCoreSupport/WebEditorClient.mm: + (-[WebEditCommand dealloc]): + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebView/WebArchive.mm: + (-[WebArchivePrivate dealloc]): + * WebView/WebDataSource.mm: + (-[WebDataSourcePrivate dealloc]): + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate dealloc]): + (-[WebHTMLView dealloc]): + * WebView/WebResource.mm: + (-[WebResourcePrivate dealloc]): + +2008-08-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Remove MainThreadObjectDeallocator.{h|mm}. + + * WebView/MainThreadObjectDeallocator.h: Removed. + * WebView/MainThreadObjectDeallocator.mm: Removed. + + * WebView/WebView.mm: + (-[WebView dealloc]): + Call WebCoreObjCScheduleDeallocateOnMainThread instead. + +2008-08-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Make the main thread object deallocator work with subclasses. + + * WebView/MainThreadObjectDeallocator.h: + * WebView/MainThreadObjectDeallocator.mm: + (deallocCallback): + Call the correct dealloc method. + + (scheduleDeallocateOnMainThread): + Store both the class and the instance, so we know which dealloc method to call. + + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): + Schedule deallocation on the main thread. + +2008-08-05 Dan Bernstein <mitz@apple.com> + + Reviewed by Mark Rowe and Anders Carlsson. + + - fix WebMemorySize() reporting a value capped at 2GB + + * misc/WebKitSystemBits.m: + (WebMemorySize): Changed to return the max_mem field, which, unlike + memory_size, is not capped at 2GB. + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): Made the cache sizes for over 2GB RAM the + same as for 2GB, so that behavior on machines that have more than 2GB + RAM is not affected by the fix to WebMemorySize(). + +2008-08-04 Mark Rowe <mrowe@apple.com> + + Build fix. + + * WebView/WebHTMLView.mm: + +2008-08-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Kevin Decker. + + Adopt the formal protocols where necessary. + Final part of fix for <rdar://problem/5853147>. + + * WebCoreSupport/WebInspectorClient.mm: + * WebView/WebHTMLView.mm: + * WebView/WebView.mm: + (-[WebView _openFrameInNewWindowFromMenu:]): + +2008-08-04 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Declare empty protocols when using versions of AppKit that do not use formal protocols for delegates and data sources. + Part one of fix for <rdar://problem/5853147>. + + * Misc/EmptyProtocolDefinitions.h: + * WebKitPrefix.h: + +2008-08-04 Brady Eidson <beidson@apple.com> + + Reviewed by Mitz Pettel + + Fix <rdar://problem/5820157> - Saving WebArchives of Mail attachments broken. + + This broke in r31355 when we stopped returning nil WebResources when there was nil + resource data. + + * WebView/WebResource.mm: + (-[WebResource _initWithCoreResource:]): Restore previous behavior of returning nil + when the resource data is null. + +2008-08-02 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Tim Hatcher. + + Update the window gradient offset to match the inspector toolbar's new height. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController window]): + +2008-08-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Jon. + + <rdar://problem/6120206> + Crash when plug-in queries for NPPVpluginWantsAllNetworkStreams. + + Pass in a pointer to a void* to make sure that plug-ins don't overwrite the stack. + + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream wantsAllStreams]): + +2008-07-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5949410> + Add the ability to transfer a given application cache to a new database. + + * Misc/WebKitNSStringExtras.h: + * Misc/WebKitNSStringExtras.m: + (+[NSString _webkit_applicationCacheDirectoryWithBundleIdentifier:]): + New method which returns the appopriate cache directory for a given bundle identifier. + + * WebView/WebDataSource.mm: + (-[WebDataSource _transferApplicationCache:]): + Transfer the application cache. + + * WebView/WebDataSourcePrivate.h: + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + Change this to use _webkit_applicationCacheDirectoryWithBundleIdentifier. + +2008-07-31 John Sullivan <sullivan@apple.com> + + WebKit part of <rdar://problem/6116650> Text-only zoom setting should be stored in WebKit prefs + + Reviewed by Hyatt + + * WebView/WebPreferenceKeysPrivate.h: + added WebKitZoomsTextOnlyPreferenceKey + + * WebView/WebPreferences.mm: + (+[WebPreferences initialize]): + default value of YES for WebKitZoomsTextOnlyPreferenceKey + (-[WebPreferences zoomsTextOnly]): + getter for WebKitZoomsTextOnlyPreferenceKey + (-[WebPreferences setZoomsTextOnly:]): + setter for WebKitZoomsTextOnlyPreferenceKey + + * WebView/WebPreferencesPrivate.h: + declare zoomsTextOnly/setZoomsTextOnly: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + update WebCore::Settings value for zoomsTextOnly + +2008-07-31 David D. Kilzer <ddkilzer@webkit.org> + + Fix layout test results for webarchive/test-xml-stylesheet.xml + + Reviewed by Darin Adler. + + Needed to expose -[WebHTMLRepresentation supportedNonImageMIMETypes] + for DumpRenderTree. + + * WebView/WebHTMLRepresentationInternal.h: Added. + +2008-07-31 Alexey Proskuryakov <ap@webkit.org> + + Release build fix. + + * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView setWindowIfNecessary]): + Don't define to npErr in release builds, as it is only used for logging. + +2008-07-31 John Sullivan <sullivan@apple.com> + + Fixed <https://bugs.webkit.org/show_bug.cgi?id=5195> + drawing with cacheDisplayInRect:toBitmapImageRep: doesn't trigger layout on Leopard + + Reviewed by Dan + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]): + include Leopard in the #ifdef that forces a layout if needed + +2008-07-30 Brady Eidson <beidson@apple.com> + + Reviewed by Adam and Hyatt + + Fix for <rdar://problem/6099748> + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Set the "don't enforce CSS mime type in strict mode" + quirk when running under iWeb 2 + +2008-07-31 Alexey Proskuryakov <ap@webkit.org> + + Rubber-stamped by Maciej. + + Eliminate JSLock (it was already disabled, removing the stub implementaion and all + call sites now). + + * ForwardingHeaders/runtime/JSLock.h: Removed. + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics shouldPrintExceptions]): + (+[WebCoreStatistics setShouldPrintExceptions:]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream wantsAllStreams]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView setWindowIfNecessary]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView createPluginScriptableObject]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebBaseNetscapePluginView loadPluginRequest:]): + (-[WebBaseNetscapePluginView _printedPluginBitmap]): + * Plugins/WebPluginController.mm: + (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): + (-[WebPluginController startAllPlugins]): + (-[WebPluginController stopAllPlugins]): + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + +2008-07-30 Beth Dakin <bdakin@apple.com> + + Reviewed by Anders Carlsson. + + Fixes <rdar://problem/6041390> + + Adds the ability to have a frame that is "disconnected" from the + main frame from the perspective of top and parent in + Javascript. + + * WebView/WebFrame.mm: + (-[WebFrame _setIsDisconnectedFrame]): + * WebView/WebFramePrivate.h: + +2008-07-29 Mark Rowe <mrowe@apple.com> + + Tweak to the build fix to keep Dan happy. + + * Plugins/WebBaseNetscapePluginView.mm: + * WebView/WebHTMLView.mm: + +2008-07-29 Mark Rowe <mrowe@apple.com> + + Build fix. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView inputContext]): + * WebView/WebHTMLView.mm: + +2008-07-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Kevin Decker. + + Based on a patch by Dimcho Balev. + + https://bugs.webkit.org/show_bug.cgi?id=18676 + <rdar://problem/6106578> + Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs + + * Plugins/WebBaseNetscapePluginStream.h: + Add NPP_GetValue pointer. + + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream setPlugin:]): + Initialize NPP_GetValue. + + (-[WebBaseNetscapePluginStream wantsAllStreams]): + Call NPP_GetValue. + + * Plugins/WebPlugInStreamLoaderDelegate.h: + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: + (WebNetscapePlugInStreamLoaderClient::wantsAllStreams): + Implement this and call down to the stream. + +2008-07-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + <rdar://problem/6105529> + https://bugs.webkit.org/show_bug.cgi?id=19659 + Turning off plugins causes crash + + When an active page has plug-ins, and plug-ins are disabled, they will be stopped and will + end up in a state where they don't have an event handler. Because of this, we need to + check that the plug-in has been started before calling the event handler. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendActivateEvent:]): + (-[WebBaseNetscapePluginView sendDrawRectEvent:]): + (-[WebBaseNetscapePluginView setHasFocus:]): + (-[WebBaseNetscapePluginView mouseDown:]): + (-[WebBaseNetscapePluginView mouseUp:]): + (-[WebBaseNetscapePluginView mouseEntered:]): + (-[WebBaseNetscapePluginView mouseExited:]): + (-[WebBaseNetscapePluginView handleMouseMoved:]): + (-[WebBaseNetscapePluginView mouseDragged:]): + (-[WebBaseNetscapePluginView scrollWheel:]): + (-[WebBaseNetscapePluginView keyUp:]): + (-[WebBaseNetscapePluginView keyDown:]): + (-[WebBaseNetscapePluginView flagsChanged:]): + (-[WebBaseNetscapePluginView cut:]): + (-[WebBaseNetscapePluginView copy:]): + (-[WebBaseNetscapePluginView paste:]): + (-[WebBaseNetscapePluginView selectAll:]): + (-[WebBaseNetscapePluginView drawRect:]): + (-[WebBaseNetscapePluginView inputContext]): + +2008-07-26 Daniel Jalkut <jalkut@red-sweater.com> + + Reviewed by Geoff Garen. + + Changes to accommodate newly named/signatured loading methods in WebCore. + + * Plugins/WebNetscapePluginStream.mm: + (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + * Plugins/WebPluginContainerCheck.mm: + (-[WebPluginContainerCheck _isForbiddenFileLoad]): + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): + +2008-07-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number. + + * Configurations/Version.xcconfig: + * Info.plist: + +2008-07-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoff. + + <rdar://problem/5820667> + CrashTracer: [USER] 3759 crashes in Safari at FrameLoader::activeDocumentLoader const + 6 while canceling plug-in load + + Don't allow URLs to be loaded in response to an NPP_DestroyStream that happens when tearing down the plug-in. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + +2008-07-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Adam Roben. + + <rdar://problem/5624143> WebView printing doesn't work correctly in x86_64 + + Fix the return type of an NSView method that we override so that the correct data type is used in 64-bit. + This prevents a garbage value being used for the scale factor that the NSView print machinery applies. + + * WebView/WebHTMLView.mm: + +2008-07-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Adam Roben. + + Fix CallDelegateReturningFloat for x86_64. The x86_64 Objective-C runtime + only uses objc_msgSend_fpret for long double return values. For float return + values the standard objc_msgSend is used, as on ppc and ppc64. + + * WebView/WebView.mm: Use objc_msgSend_float_return as the name of our version of + objc_msgSend with the correct return type. We can no longer call it objc_msgSend_fpret + as that method is defined by the Objective-C runtime for x86_64. + (CallDelegateReturningFloat): + +2008-07-14 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - WebKit part of fixing <rdar://problem/6071850> Subviews not drawn correctly when using -cacheDisplayInRect:toBitmapImageRep: + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Changed + to account for the case of being drawn into a bitmap context that is not + a window's backing store. In that case, there are no valid "rects being + drawn" to clip to. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]): + Added an override of this NSView method which is used in for + -cacheDisplayInRect:toBitmapImageRep:. Like two existing NSView drawing + machinery overrides, it sets subviews aside before invoking the + superclass implementation. On Tiger, it also updates the layout. + +2008-07-14 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + Eliminate per-thread JavaScript global data instance support and make arbitrary + global data/global object combinations possible. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + Ask WebCore for its instance of JSGlobalData, now that it is not in per-thread storage. + +2008-07-11 Stephanie Lewis <slewis@apple.com> + + Reviewed by Darin Adler. + + Disable WTF leak messages when using fast teardown. Use full document teardown while running in debug. + + * WebView/WebPreferences.m: Removed. + * WebView/WebPreferences.mm: Copied from http:/svn.webkit.org/repository/webkit/trunk/WebKit/mac/WebView/WebPreferences.m. + (+[WebPreferences initialize]): if running in Default enable full document teardown + (-[WebPreferences editableLinkBehavior]): + (-[WebPreferences setFullDocumentTeardownEnabled:]): + * WebView/WebView.mm: + (-[WebView _close]): disable leak messages if using fast teardown + +2008-07-10 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Define WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST when building WebKit to ensure that no symbols end up with the weak_import attribute. + + * Configurations/WebKit.xcconfig: + +2008-07-10 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Fix the Tiger build by omitting annotations from methods declared in categories when using old versions of GCC. + + * Plugins/WebPlugin.h: Wrap annotations on methods declared in categories in the WEBKIT_CATEGORY_METHOD_ANNOTATION macro. + * WebView/WebFrameLoadDelegate.h: Ditto. + * WebView/WebUIDelegate.h: Ditto. + +2008-07-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark. + + Add availability macros for the new WebPlugin methods. + + * Plugins/WebPlugin.h: + * Plugins/WebPluginViewFactory.h: + +2008-07-09 Mark Rowe <mrowe@apple.com> + + Reviewed by Geoff Garen. + + Don't warn about deprecated functions in production builds. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + +2008-07-09 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + <rdar://problem/5823684> - Crash manipulating frame tree of a new frame before the new frame + has been installed in a frame tree. + + The root of this problem was that calling init() on a new frame could end up calling arbitrary + javascript that might end up removing the frame from the tree. This opened up a small can of worms + such as the frame not having yet been installed in its frame tree, and other assumed behavior while + destroying the frame. + + Note that each platforms WebKit API layer needs to make this new guarantee: + "The new Frame must be installed in its FrameTree before newCoreFrame->init() is called" + I am fixing Mac, and Windows and GTK already have this property. Wx currently has subframes disabled + but will need to add this guarantee when re-enabling, and Qt is currently vulnerable to this same bug. + + Alternately, the way frames are created right now is roundabout and asinine, and this is a key + architectural improvement we can make in the future so the individual platform clients are no longer + vulnerable to this problem, which should really have been a WebCore issue. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createFrame): Don't bother null checking the newCoreFrame - can't be NULL. + Don't appendChild() the new frame here. + Null-check the new frame's page before loading the URL into it, as it might already have been + removed from the page. + + * WebView/WebFrame.mm: + (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): If there is an ownerElement, + go ahead and install the new frame in the frame tree *before* calling init() on it. + +2008-07-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Make some WebPlugin and WebPluginFactory SPI public. + + * Plugins/WebPlugin.h: + * Plugins/WebPluginPrivate.h: + * Plugins/WebPluginViewFactory.h: + * Plugins/WebPluginViewFactoryPrivate.h: + +2008-07-08 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by Anders. + + Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was + unsuccessful. + + * Plugins/WebBaseNetscapePluginStream.h: Added new member, + newStreamSuccessful. + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member. + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set + newStreamSuccessful to YES. + (-[WebBaseNetscapePluginStream _destroyStream]): Only call + NPP_DestroyStream if newStreamSuccessful is true. + +2008-07-08 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + - WebKit part of <rdar://problem/6008409> Need a way to disable updates in offscreen views + + * WebView/WebHTMLView.mm: + (-[WebHTMLView addWindowObservers]): Added code to observe when the + window goes onscreen. + (-[WebHTMLView removeWindowObservers]): Added. + (-[WebHTMLView windowWillOrderOnScreen:]): Added. If the view is set to + not update when offscreen, calls -setNeedsDisplay: just before it comes + onscreen. + * WebView/WebPreferenceKeysPrivate.h: Added preference key. + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): Made updates when offscreen on by + default. + (-[WebPreferences updatesWhenOffscreen]): Added. + (-[WebPreferences setUpdatesWhenOffscreen:]): Added. + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Added code to update the + updatesWhenOffscreen setting in WebCore. + +2008-07-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Speculative fix for + <rdar://problem/5839800> + CrashTracer: [USER] 5802 crashes in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389 + + Set _private->closed to YES before calling -[WebPluginController destroyAllPlugins]. + + My theory is that the plug-in destruction callbacks could end up rescheduling timers or re-adding notifications. + This is usually protected by _private->closed, but in this case it might still be false. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView close]): + +2008-07-05 Mark Rowe <mrowe@apple.com> + + Reviewed by John Sullivan. + + Remove WebSearchableTextView as it has been unused for some time now. + + * Misc/WebSearchableTextView.h: Removed. + * Misc/WebSearchableTextView.m: Removed. + +2008-07-05 Mark Rowe <mrowe@apple.com> + + Reviewed by John Sullivan. + + Don't leak the result of WKCopyCFLocalizationPreferredName when running under GC. + + * Misc/WebNSUserDefaultsExtras.m: + (-[NSString _webkit_HTTPStyleLanguageCode]): + +2008-07-02 Alexey Proskuryakov <ap@webkit.org> + + Inspired and reviewed by Mark Rowe. + + Change non-API includes from JavaScriptCore/ to kjs/ and wtf/ to match prevalent style. + + * Carbon/HIViewAdapter.m: + * DOM/WebDOMOperations.mm: + * DefaultDelegates/WebDefaultContextMenuDelegate.mm: + * DefaultDelegates/WebDefaultPolicyDelegate.m: + * History/WebBackForwardList.mm: + * History/WebHistory.mm: + * History/WebHistoryItem.mm: + * History/WebHistoryItemInternal.h: + * Misc/WebCoreStatistics.mm: + * Misc/WebDownload.m: + * Misc/WebGraphicsExtras.c: + * Misc/WebKitLogging.h: + * Misc/WebKitSystemBits.m: + * Misc/WebLocalizableStrings.m: + * Misc/WebNSArrayExtras.m: + * Misc/WebNSDataExtras.m: + * Misc/WebNSDictionaryExtras.m: + * Misc/WebNSFileManagerExtras.m: + * Misc/WebNSPasteboardExtras.mm: + * Misc/WebNSURLExtras.mm: + * Misc/WebNSUserDefaultsExtras.m: + * Panels/WebAuthenticationPanel.m: + * Panels/WebPanelAuthenticationHandler.m: + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebBasePluginPackage.m: + * Plugins/WebNetscapePluginEmbeddedView.mm: + * Plugins/WebPluginContainerCheck.mm: + * Plugins/WebPluginController.mm: + * Plugins/WebPluginDatabase.mm: + * WebCoreSupport/WebJavaScriptTextInputPanel.m: + * WebCoreSupport/WebKeyGenerator.m: + * WebCoreSupport/WebViewFactory.mm: + * WebKitPrefix.h: + * WebView/WebHTMLRepresentation.mm: + * WebView/WebPDFRepresentation.m: + * WebView/WebPDFView.mm: + * WebView/WebScriptDebugger.mm: + +2008-07-01 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Disable JSLock for per-thread contexts. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics shouldPrintExceptions]): + (+[WebCoreStatistics setShouldPrintExceptions:]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView setWindowIfNecessary]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView createPluginScriptableObject]): + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): + (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): + (-[WebBaseNetscapePluginView loadPluginRequest:]): + (-[WebBaseNetscapePluginView _printedPluginBitmap]): + * Plugins/WebPluginController.mm: + (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): + (-[WebPluginController startAllPlugins]): + (-[WebPluginController stopAllPlugins]): + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + * WebView/WebFrame.mm: + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + Pass a parameter (always false) to JSLock and JSLock::DropAllLocks to indicate that WebKit + doesn't need locking. In the future, it may be possible to remove some of these if we + establish that this won't make JSC assertions fail (and that we don't want to add such + assertions either). + Added includes that are now needed. + +2008-07-01 Kevin McCullough <kmccullough@apple.com> + + Build fix. + + * WebView/WebView.mm: + +2008-07-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Use the PluginMainThreadScheduler, and implement NPN_PluginThreadAsyncCall. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView _createPlugin]): + Register the plug-in instance. + + (-[WebBaseNetscapePluginView _destroyPlugin]): + Unegister the plug-in instance. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + Set NPN_PluginThreadAsyncCall. + + * Plugins/npapi.mm: + (NPN_PluginThreadAsyncCall): + Implement this. + +2008-07-01 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - WebKit part of moving the method to set the base writing direction from Frame to Editor + + * WebView/WebHTMLView.mm: + (-[WebHTMLView toggleBaseWritingDirection:]): Changed back to call the + Editor method. + (-[WebHTMLView changeBaseWritingDirection:]): Ditto. + (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto. + +2008-07-01 Geoffrey Garen <ggaren@apple.com> + + Build fix: forgot to check in this file. + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): + +2008-06-30 Dan Bernstein <mitz@apple.com> + + Reviewed by Adele Peterson. + + - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari + + * WebView/WebHTMLView.mm: + (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call + WebCore::Frame::setSelectionBaseWritingDirection() instead of + WebCore::Editor::setBaseWritingDirection(). + (-[WebHTMLView changeBaseWritingDirection:]): Ditto. + (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto. + +2008-06-28 Darin Adler <darin@apple.com> + + - fix build + + * WebView/WebView.mm: + (aeDescFromJSValue): Use get instead of getItem, which no longer exists. + +2008-06-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Add a new MainThreadObjectDeallocator which can schedule dealloc calls on the main thread + if necessary. Use this for the WebView class. + + * WebView/MainThreadObjectDeallocator.h: Added. + * WebView/MainThreadObjectDeallocator.mm: Added. + (deallocCallback): + (scheduleDeallocateOnMainThread): + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): + (+[WebView initialize]): + +2008-06-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark. + + <rdar://problem/5984270> + REGRESSION (Tiger only) : Mail crashes because message load is being processed on a secondary thread + + * WebView/WebView.mm: + (tigerMailReleaseIMP): + New method that makes sure that the final release happens on the main thread. + + (-[WebView release]): + New method that just calls [super release]; + + (+[WebView initialize]): + When running under Tiger mail, replace the release method with tigerMailReleaseIMP. + +2008-06-19 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff. + + Make Machine per-JSGlobalData. + + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::WebScriptDebugger): + +2008-06-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Prepare JavaScript heap for being per-thread. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + Use JSGlobalData::threadInstance()->heap instead of static Collector calls. + +2008-06-17 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Use create instead of new + to create a CSSMutableStyleDeclaration. + +2008-06-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5951874> WebHTMLHighlighter mistakenly gained two new methods, causing compile warnings + + _pauseNullEventsForAllNetscapePlugins and _resumeNullEventsForAllNetscapePlugins ended up being declared both in + WebHTMLViewInternal.h and as members of the WebHTMLHighlighter protocol in WebHTMLViewPrivate.h. They don't belong + in the protocol, but they do need to be available outside of WebKit so they're being moved to the correct location + in WebHTMLViewPrivate.h and removed from WebHTMLViewInternal.h. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): + (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): + * WebView/WebHTMLViewInternal.h: + * WebView/WebHTMLViewPrivate.h: + +2008-06-15 Darin Adler <darin@apple.com> + + - give Frame object functions shorter names: scriptProxy() -> script(), + selectionController() -> selection(), animationController() -> animation() + + * Plugins/WebPluginController.mm: + (-[WebPluginController webPlugInContainerSelectionColor]): + * WebView/WebFrame.mm: + (-[WebFrame _attachScriptDebugger]): + (-[WebFrame _hasSelection]): + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): + (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]): + (-[WebFrame _convertToNSRange:]): + (-[WebFrame _convertToDOMRange:]): + (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): + (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): + (-[WebFrame _insertParagraphSeparatorInQuotedContent]): + (-[WebFrame _selectedNSRange]): + (-[WebFrame _selectNSRange:]): + (-[WebFrame globalContext]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView _selectedRange]): + (-[WebHTMLView _hasSelection]): + (-[WebHTMLView _hasSelectionOrInsertionPoint]): + (-[WebHTMLView _hasInsertionPoint]): + (-[WebHTMLView _isEditable]): + (-[WebHTMLView _updateFocusedAndActiveState]): + (-[WebHTMLView readSelectionFromPasteboard:]): + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView maintainsInactiveSelection]): + (-[WebHTMLView paste:]): + (isTextInput): + (-[WebHTMLView inputContext]): + (-[WebTextCompleteController doCompletion]): + (-[WebHTMLView selectAll]): + (-[WebHTMLView deselectAll]): + (-[WebHTMLView selectedAttributedString]): + * WebView/WebView.mm: + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): + (-[WebView setSelectedDOMRange:affinity:]): + (-[WebView selectedDOMRange]): + (-[WebView selectionAffinity]): + +2008-06-15 Darin Adler <darin@apple.com> + + - rename KJS::List to KJS::ArgList + + * WebView/WebScriptDebugger.h: + +2008-06-15 Darin Adler <darin@apple.com> + + - new names for more JavaScriptCore files + + * WebView/WebView.mm: + +2008-06-15 Darin Adler <darin@apple.com> + + - new names for a few key JavaScriptCore files + + * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h. + * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h. + * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h. + * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h. + * ForwardingHeaders/kjs/function.h: Removed. + * ForwardingHeaders/kjs/internal.h: Removed. + * ForwardingHeaders/kjs/object.h: Removed. + * ForwardingHeaders/kjs/value.h: Removed. + * WebView/WebScriptDebugDelegate.mm: + +2008-06-15 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - use JS prefix and simpler names for basic JavaScriptCore types, + to complement JSValue and JSObject + + * WebView/WebView.mm: + (aeDescFromJSValue): + +2008-06-14 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - new names for kjs_binding.h and kjs_proxy.h + + * WebView/WebFrame.mm: + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebView.mm: + +2008-06-14 Darin Adler <darin@apple.com> + + Rubber stamped by Sam. + + - renamed HTMLGenericFormElement to HTMLFormControlElement + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation elementWithName:inForm:]): + (-[WebHTMLRepresentation controlsInForm:]): + +2008-06-14 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - more of https://bugs.webkit.org/show_bug.cgi?id=17257 + start ref counts at 1 instead of 0 for speed + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createDocumentLoader): Use create instead of new. + (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by + a ref call inside the Frame constructor. The lifetime rules for Frame are now the + conventional ones without a special case. + + * WebView/WebDataSource.mm: + (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since + this function takes ownership of the DocumentLoader. + (-[WebDataSource initWithRequest:]): Use create instead of new. + * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a + PassRefPtr and also cleaned up the header a bit. + + * WebView/WebDocumentLoaderMac.h: + (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual + functions private. + + * WebView/WebFrame.mm: + (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead + of new. + +2008-06-14 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - more work on https://bugs.webkit.org/show_bug.cgi?id=17257 + start ref counts at 1 instead of 0 for speed + + * WebView/WebFrame.mm: + (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): + +2008-06-13 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + - updated for addition of FormState argument to action policy functions + - added WebActionFormKey + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): + (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): + (WebFrameLoaderClient::actionDictionary): + * WebKit.exp: + * WebView/WebPolicyDelegate.mm: + * WebView/WebPolicyDelegatePrivate.h: + +2008-06-12 John Sullivan <sullivan@apple.com> + + Reviewed by Dan and Darin + + Clear up the confusion about _close (older private method) vs -close (newer public method). + + * WebView/WebView.mm: + (-[WebView _isClosed]): + simplified style + (-[WebView _close]): + added a comment about how clients and subclasses should use -close instead + (-[WebView dealloc]): + call -close instead of _close, so subclasses that override the public method will have the intended behavior + (-[WebView close]): + added a comment + (-[WebView _windowWillClose:]): + call -close instead of _close, so subclasses that override the public method will have the intended behavior + + * WebView/WebViewPrivate.h: + added a comment about how clients and subclasses should use -close instead + +2008-06-07 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - work on https://bugs.webkit.org/show_bug.cgi?id=17257 + start ref counts at 1 instead of 0 for speed + + * History/WebHistoryItem.mm: + (-[WebHistoryItem init]): + (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]): + (-[WebHistoryItem initWithURL:target:parent:title:]): + (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]): + * WebView/WebView.mm: + (+[WebView _decodeData:]): + +2008-06-03 Oliver Hunt <oliver@apple.com> + + Reviewed by Tim. + + Bug 12983: Web Inspector break on the debugger keyword + <https://bugs.webkit.org/show_bug.cgi?id=12983> + + Add stubs to allow old webkit debugger interface to build. + + * WebView/WebScriptDebugger.h: + * WebView/WebScriptDebugger.mm: + +2008-06-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5980961> + + In 64-bit Web Kit, converting between float and double, can cause rounding errors which in turn causes + newBottom to be larger than oldBottom which is illegal. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): + +2008-06-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + Speculative fix for <rdar://problem/5661112> + CrashTracer: [USER] 49 crashes in DashboardClient at com.apple.WebCore: WebCore::RenderPart::setWidget + 62 + + Defer loads while calling NPP_New. Some plug-ins start a run-loop inside NPP_New and finished loads could cause + layouts to be triggered. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView _createPlugin]): + +2008-05-29 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail + + AppKit started putting PNG instead of PICT onto the pasteboard for screen + captures. Added support for PNG with kUTTypePNG. Tiger doesn't support + setting and retrieving pasteboard types with UTIs, but we don't know of any + applications on Tiger that put only PNG on the pasteboard. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): + +2008-05-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Brady. + + <rdar://problem/5970312> + icon file specified for stand alone web app causes crash if the icon can't be found + + Handle the case where iconData is null. + + * Misc/WebIconFetcher.mm: + (WebIconFetcherClient::finishedFetchingIcon): + +2008-05-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + <rdar://problem/5971845> + https://bugs.webkit.org/show_bug.cgi?id=19313 + Add version member to NPCocoaEvent + + Initialize the version member to 0 for all events. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (initializeEvent): + (WebNetscapePluginEventHandlerCocoa::drawRect): + (WebNetscapePluginEventHandlerCocoa::sendMouseEvent): + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + (WebNetscapePluginEventHandlerCocoa::windowFocusChanged): + (WebNetscapePluginEventHandlerCocoa::focusChanged): + +2008-05-29 Dan Bernstein <mitz@apple.com> + + Reviewed by Jessica Kahn. + + - fix <rdar://problem/5965013> Page 2 does not print correctly + + When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and + _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without + -viewWillDraw being sent first, which could lead to painting without + valid layout. The fix is to ensure up-to-date layout in those methods + when printing. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]): + +2008-05-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Jon. + + Remove workaround, this is no longer a problem. + + * WebView/WebView.mm: + (-[WebView _removeObjectForIdentifier:]): + +2008-05-27 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Tim Hatcher. + + Fixed https://bugs.webkit.org/show_bug.cgi?id=19183 + REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when + clicking button in returnEvent-crash.html + + Added implementations for willExecuteProgram and didExecuteProgram, which + take care of making sure we're not hanging on to stale data. + +2008-05-27 Timothy Hatcher <timothy@apple.com> + + Fixes a bug where unplugging the monitor from a video card and + moving it to another video card would no longer show OpenGL plugins + until you relaunched Safari. + + <rdar://problem/5790983> Add AllowOfflineDisplays pixel format + attribute to OpenGL contexts + + Reviewed by Kevin Decker. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView _createWindowedAGLContext]): Added + AGL_ALLOW_OFFLINE_RENDERERS for non-Tiger builds. + (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): Ditto. + +2008-05-25 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5840884> _recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined + + Follow-up for r33052. _recursive_resumeNullEventsForAllNetscapePlugins and _recursive_pauseNullEventsForAllNetscapePlugins + need to be declared in WebFramePrivate.h rather than WebFrameInternal.h so they can be used from outside of WebKit. + + * WebView/WebFrame.mm: + (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): + (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): + * WebView/WebFrameInternal.h: + * WebView/WebFramePrivate.h: + +2008-05-23 Timothy Hatcher <timothy@apple.com> + + Fix attaching and detaching the Web Inspector. This change removes + the clunky animation that never looked right and was causing issues + where the inspected WebView would get into a no useable state. + + <rdar://problem/5958812> Attaching and Detaching the Web Inspector + can cause the inspected WebVIew to be unusable + + Reviewed by Adam Roben. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController close]): Removes animation code. + Sets the frame directly and does a displayIfNeeded to prevent + showing the Inspector in the page and in the Inspector window. + (-[WebInspectorWindowController showWindow:]): Removes animation code. + Sets the frame directly. + (-[WebInspectorWindowController attach]): Simplified. + (-[WebInspectorWindowController detach]): Ditto. + +2008-05-22 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix broken documentation of + webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame: + + * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for + -webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame: + +2008-05-22 Timothy Hatcher <timothy@apple.com> + + <rdar://problem/5956403> Update the Develop menu to match the new Inspector items + + Reviewed by Adam Roben. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWebInspector:]): + (-[WebInspectorWindowController showErrorConsole:]): + (-[WebInspectorWindowController toggleDebuggingJavaScript:]): + (-[WebInspectorWindowController toggleProfilingJavaScript:]): + (-[WebInspectorWindowController validateUserInterfaceItem:]): + * WebInspector/WebInspector.h: + * WebInspector/WebInspector.mm: + (-[WebInspector showConsole:]): + (-[WebInspector showTimeline:]): + (-[WebInspector isDebuggingJavaScript]): + (-[WebInspector toggleDebuggingJavaScript:]): + (-[WebInspector startDebuggingJavaScript:]): + (-[WebInspector stopDebuggingJavaScript:]): + (-[WebInspector isProfilingJavaScript]): + (-[WebInspector toggleProfilingJavaScript:]): + (-[WebInspector startProfilingJavaScript:]): + (-[WebInspector stopProfilingJavaScript:]): + +2008-05-22 Josh Aas <joshmoz@gmail.com> + + Reviewed by Anders. + + <rdar://problem/5956429> + https://bugs.webkit.org/show_bug.cgi?id=19192 + remove NPNVpluginEventModel, fix example plugin + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView getVariable:value:]): + +2008-05-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej. + + Add WebIconFetcher. + + * Misc/WebIconFetcher.h: Added. + * Misc/WebIconFetcher.mm: Added. + (WebIconFetcherClient::WebIconFetcherClient): + (WebIconFetcherClient::finishedFetchingIcon): + (WebIconFetcherClient::setFetcher): + (-[WebIconFetcher init]): + (-[WebIconFetcher dealloc]): + (-[WebIconFetcher finalize]): + (-[WebIconFetcher cancel]): + (-[WebIconFetcher _initWithIconFetcher:client:]): + (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]): + * Misc/WebIconFetcherInternal.h: Added. + * WebView/WebFrame.mm: + (-[WebFrame fetchApplicationIcon:selector:]): + * WebView/WebFramePrivate.h: + +=== End merge of squirrelfish === + +2008-05-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Tim Hatcher. + + Updated for API changes from merging with trunk WebCore's new debugger. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an + exception return, since the DebuggerCallFrame no longer automatically + substitutes the exception for the return value. + + * WebView/WebScriptDebugger.mm: Use the dynamic global object, not the + lexical global object, since the debugger attaches based on dynamic + global object. + +2008-05-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Re-enabled previously disabled debugging functionality. + + There are two major changes from how the WebKit debugger used to work: + + (1) All the interesting bits are implemented down in JavaScriptCore. The + debugger just calls through to KJS::DebuggerCallFrame for everything. + + (2) Instead of copyihng a pointer to an ExecState once, the debugger + copies the DebuggerCallFrame passed to it in each callback. This is + because the VM no longer maintains a fully transparent execution state + to which you can hold a pointer, and the DebuggerCallFrames it vends + are temporaries. + + Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return + from its function. This is safer than the old method, which was to + hold a stale ExecState* and hope for the best. + +2008-05-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Updated for API changes in KJS::Debugger. + + * WebView/WebFrame.mm: + (-[WebFrame _attachScriptDebugger]): Changed the order of operations to + fix an ASSERT that can happen when re-entering _attachScriptDebugger. + +2008-05-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Updated WebScriptDebugger API to accept a SourceProvider instead + of a WebCore::String, to avoid copying. + + (WebScriptDebugger::sourceParsed): Updated this function not to return + a value. + +2008-04-30 Geoffrey Garen <ggaren@apple.com> + + Build fix: #ifdef'd out some code that doesn't work anymore. + +2008-04-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + #ifdef'd out some debugger code that doesn't work anymore. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): + +2008-04-21 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * ChangeLog: + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): + +2008-03-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Build fix. + +=== Start merge of squirrelfish === + +2008-05-21 Darin Adler <darin@apple.com> + + - fix build + + * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later + if we want, but if we do, we should probably make some refinements like checking _private->closed + and applicationIsTerminating. + +2008-05-21 Darin Adler <darin@apple.com> + + Reviewed by Anders and Kevin Decker. + + - fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session + + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used. + (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close. + (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal. + Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix). + (-[WebView _close]): Changed for new method name and to use _closePluginDatabases. + +2008-05-19 Stephanie Lewis <slewis@apple.com> + + Reviewed by Darin Adler. + + more fast teardown performance work + + * Misc/WebDownload.m: + (-[WebDownloadInternal downloadDidBegin:]): + (-[WebDownloadInternal downloadDidFinish:]): + (-[WebDownloadInternal download:didFailWithError:]): + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::disableSuddenTermination): + (WebChromeClient::enableSuddenTermination): + +2008-05-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + - fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel + + * Panels/WebAuthenticationPanel.m: + (-[WebAuthenticationPanel setUpForChallenge:]): + +2008-05-16 Timothy Hatcher <timothy@apple.com> + + Removes WebScriptDebugServer files and related calls. This removes + the hooks that Drosera uses for debugging. Now that the Web Inspector + has a better debugger, we don't need these anymore. + + Reviewed by Sam Weinig. + + * DefaultDelegates/WebScriptDebugServer.h: Removed. + * DefaultDelegates/WebScriptDebugServer.m: Removed. + * DefaultDelegates/WebScriptDebugServerPrivate.h: Removed. + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebKit.exp: + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebScriptDebugger.mm: + (WebScriptDebugger::sourceParsed): + (WebScriptDebugger::callEvent): + (WebScriptDebugger::atStatement): + (WebScriptDebugger::returnEvent): + (WebScriptDebugger::exception): + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): + * WebView/WebViewPrivate.h: + +2008-05-16 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + <rdar://problem/5942616> - Need to standardize LocalStorage persistence path + + Took the opportunity to touch up another pref that needs the same standardization. + That pref is currently not in use on Mac. + + * WebView/WebPreferences.m: + (-[WebPreferences _setFTPDirectoryTemplatePath:]): + (-[WebPreferences _localStorageDatabasePath]): + (-[WebPreferences _setLocalStorageDatabasePath:]): + (-[WebPreferences _ftpDirectoryTemplatePath]): + +2008-05-16 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Alice Liu + + <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310) + + * WebView/WebFrame.mm: + (-[WebFrame _accessibilityTree]): + +2008-05-15 Stephanie Lewis <slewis@apple.com> + + fix mac build + + * WebView/WebView.mm: + (-[WebView closeWithFastTeardown]): + +2008-05-15 Stephanie Lewis <slewis@apple.com> + + Reviewed by Anders. + + Turn on fast teardown. I added a preference for using full teardown because + the LEAKS output will be useless without a full teardown. + + preference for fullteardown + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.m: + (-[WebPreferences setFullDocumentTeardownEnabled:]): + (-[WebPreferences fullDocumentTeardownEnabled]): + * WebView/WebPreferencesPrivate.h: + + on application quit dispatch unload events and destroy plugins then exit + * WebView/WebView.mm: + (-[WebView closeWithFastTeardown]): + (-[WebView _close]): + * WebView/WebViewPrivate.h: + +2008-05-15 Stephanie Lewis <slewis@apple.com> + + Reviewed by Anders. + + get the pending frame unload count from WebCore + + * WebView/WebFrame.mm: + (-[WebFrame _pendingFrameUnloadEventCount]): + * WebView/WebFramePrivate.h: + +2008-05-15 John Sullivan <sullivan@apple.com> + + Reviewed by Kevin Decker + + - fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of + screen when new tab appears + + The highlight should go away entirely, but this simple patch just makes it not jump away. + The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306> + + * WebInspector/WebNodeHighlight.m: + (-[WebNodeHighlight _repositionHighlightWindow]): + Bail out if target view isn't in a window + +2008-05-15 Stephanie Lewis <slewis@apple.com> + + Reviewed by Anders. + + Track views that contain plugin instances so that they can be destroyed at application + quit without walking the entire document tree. + + Add/Remove Netscape plugin views from instance list. Start/stop are when netscape + plugins are created and destroyed + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView stop]): + + Add/remove WebKit plugin views from instance list + * Plugins/WebPluginController.mm: + (-[WebPluginController addPlugin:]): + (-[WebPluginController destroyPlugin:]): + (-[WebPluginController destroyAllPlugins]): + + Add a set of views with plugin instances to the WebPluginDatabase + * Plugins/WebPluginDatabase.h: + * Plugins/WebPluginDatabase.mm: + (-[WebPluginDatabase init]): + (-[WebPluginDatabase dealloc]): + (-[WebPluginDatabase addPluginInstanceView:]): + (-[WebPluginDatabase removePluginInstanceView:]): + (-[WebPluginDatabase removePluginInstanceViewsFor:]): + (-[WebPluginDatabase destroyAllPluginInstanceViews]): + + Handle cases where plugin views are detached before the plugin is destroyed. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::detachedFromParent2): + (WebFrameLoaderClient::transitionToCommittedFromCachedPage): + (WebFrameLoaderClient::transitionToCommittedForNewPage): + + Add plugin instances to the set in the WebPluginDatabase by way of the WebView + * WebView/WebHTMLView.mm: + (-[WebHTMLView _destroyAllWebPlugins]): + * WebView/WebHTMLViewInternal.h: + * WebView/WebView.mm: + (-[WebView addPluginInstanceView:]): + (-[WebView removePluginInstanceView:]): + (-[WebView removePluginInstanceViewsFor:]): + * WebView/WebViewInternal.h: + +2008-05-15 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher + + Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path + before setting the page group of the new page. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path + immediately after creating the page so it is in place for initializing the LocalStorageThread + +2008-05-15 Timothy Hatcher <timothy@apple.com> + + Fixes the bug where the Web Inspector would flash white while resizing. + This was cause by deferring the window creation. + + <rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979) + + Reviewed by Darin Adler. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController window]): Don't defer the window creation. + +2008-05-15 Alexey Proskuryakov <ap@webkit.org> + + Tiger build fix. + + * Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger. + +2008-05-15 Adele Peterson <adele@apple.com> + + Reviewed and landed by Alexey. + + Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:]. + + * Misc/WebNSAttributedStringExtras.mm: + (+[NSAttributedString _web_attributedStringFromRange:]): + +2008-05-14 Eric Seidel <eric@webkit.org> + + Reviewed by Oliver. + + Add missing NULL check to match rest of file, this was found by the editing fuzzer. + + * WebView/WebResource.mm: + (-[WebResource data]): + +2008-05-14 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Dan Bernstein. + + NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray. + + * Plugins/nptextinput.h: + +2008-05-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Don't empty the application cache in _setCacheModel, since it will be called during initialization. + Instead, do it in [WebCache empty]. + + * Misc/WebCache.mm: + (+[WebCache empty]): + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): + +2008-05-13 chris fleizach <cfleizach@apple.com> + + Reviewed by Beth Dakin + + <rdar://problem/4780592> WebKit application has its window announced as HTML content + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXWebAreaText]): + +2008-05-13 Timothy Hatcher <timothy@apple.com> + + Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean + was referencing a nil WebView under validateUserInterfaceItem. + The validateUserInterfaceItem methods was being called at a time + when the WebHTMLView is being torndown. + + <rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean() + while mousing down on menu bar after Xcode News window is opened + + Reviewed by Ada Chan. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and + return NO when it is nil. Adds a comment. + * WebView/WebPDFView.mm: + (-[WebPDFView validateUserInterfaceItem:]): Ditto. + +2008-05-13 Mark Rowe <mrowe@apple.com> + + Reviewed by John Sullivan. + + <rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework + + * Carbon/HIWebView.h: Remove HIWebViewCreateWithClass. + * Carbon/HIWebView.m: Ditto. + (HIWebViewCreate): + (HIWebViewConstructor): + +2008-05-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Ada Chan. + + - WebKit/mac changes for https://bugs.webkit.org/show_bug.cgi?id=17097 + <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound + + Added font cache statistics and a function to purge inactive font data. + + * Misc/WebCoreStatistics.h: + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics cachedFontDataCount]): + (+[WebCoreStatistics cachedFontDataInactiveCount]): + (+[WebCoreStatistics purgeInactiveFontData]): + (+[WebCoreStatistics glyphPageCount]): + +2008-05-12 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Decorate some deprecated delegate methods with the availability macros. + + The compiler doesn't appear to warn if a delegate implements these methods, but using the availability + macros is good for consistency and documentation. + + * WebView/WebFrameLoadDelegate.h: + * WebView/WebUIDelegate.h: + +2008-05-12 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/5835604> Deprecate HIWebView + + Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView. + + * Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately. + * Carbon/HIWebView.h: Ditto. + +2008-05-12 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders. + + Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined + + Re-added these SPI methods because they are needed by some clients. They were accidentally removed + in changeset <http://trac.webkit.org/changeset/31028> + + * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header. + * WebView/WebFrame.mm: + (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd. + (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto. + * WebView/WebFrameInternal.h: Ditto. + * WebView/WebHTMLView.mm: Ditto. + (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto. + (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto. + * WebView/WebHTMLViewInternal.h: Ditto. + * WebView/WebHTMLViewPrivate.h: Ditto. + +2008-05-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Alexey. + + Empty the application cache when changing the cache model. + + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): + +2008-05-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Oliver. + + <rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView start]): + Get the plug-in text input vtable pointer. + + (-[WebBaseNetscapePluginView stop]): + Set the plug-in text input vtable pointer to 0. + + (-[WebBaseNetscapePluginView inputContext]): + Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them. + + (-[WebBaseNetscapePluginView hasMarkedText]): + (-[WebBaseNetscapePluginView insertText:]): + (-[WebBaseNetscapePluginView markedRange]): + (-[WebBaseNetscapePluginView selectedRange]): + (-[WebBaseNetscapePluginView setMarkedText:selectedRange:]): + (-[WebBaseNetscapePluginView unmarkText]): + (-[WebBaseNetscapePluginView validAttributesForMarkedText]): + (-[WebBaseNetscapePluginView attributedSubstringFromRange:]): + (-[WebBaseNetscapePluginView characterIndexForPoint:]): + (-[WebBaseNetscapePluginView doCommandBySelector:]): + (-[WebBaseNetscapePluginView firstRectForCharacterRange:]): + (-[WebBaseNetscapePluginView conversationIdentifier]): + Implement NSTextInput and call into the plug-in text input vtable. + + (browserTextInputFuncs): + New method which returns the browser input vtable. + + (-[WebBaseNetscapePluginView getVariable:value:]): + Support getting the browser input vtable pointer. + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::keyDown): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent, + it means that the event should be passed on to the input manager. + + * Plugins/npapi.mm: + (NPN_MarkedTextAbandoned): + (NPN_MarkedTextSelectionChanged): + Add implementations of browser input method methods. + + * Plugins/nptextinput.h: Added. + Add file with new text input API. + +2008-05-12 Alexey Proskuryakov <ap@webkit.org> + + Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify + SquirrelFish merging. + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + +2008-05-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + REGRESSION (3.1.1-TOT): Arrow keys are sticky in Google Maps street view + https://bugs.webkit.org/show_bug.cgi?id=18880 + <rdar://problem/5909513> + + Stop suspending key up events before calling handleEvent. + + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::sendEvent): + +2008-05-06 Stephanie Lewis <slewis@apple.com> + + Reviewed by Andersca. + + prepare for plugin fast teardown work - make WebPluginDatabase a objective C++ file. + + * Plugins/WebPluginDatabase.m: Removed. + * Plugins/WebPluginDatabase.mm: Copied from WebKit/mac/Plugins/WebPluginDatabase.m. + * Plugins/npapi.m: Removed. + * Plugins/npapi.mm: Copied from WebKit/mac/Plugins/npapi.m. + +2008-05-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Initialize numArchs to 0. + + * Plugins/WebBasePluginPackage.m: + (-[WebBasePluginPackage isNativeLibraryData:]): + +2008-05-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Add implementation of NPN_PopUpContextMenu. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView popUpContextMenu:]): + * Plugins/WebBaseNetscapePluginViewPrivate.h: + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + * Plugins/npapi.m: + (NPN_PopUpContextMenu): + +2008-05-06 Anders Carlsson <andersca@apple.com> + + Fix typo (don't read random memory). + + * Plugins/WebBasePluginPackage.m: + (-[WebBasePluginPackage isNativeLibraryData:]): + +2008-05-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Change the isNativeLibraryData: method to handle universal binaries. + + * Plugins/WebBasePluginPackage.m: + (swapIntsInHeader): + (-[WebBasePluginPackage isNativeLibraryData:]): + +2008-05-06 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + Preparation for upcoming work making LocalStorage persistent. + + When the application terminates, all LocalStorage areas must be sync'ed out to disk first. + + * WebView/WebView.mm: + (+[WebView _applicationWillTerminate]): Close all LocalStorage areas before quitting. + +2008-05-05 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/5884383> + Escape look-a-like characters from the the entire url. + + * Misc/WebNSURLExtras.mm: + (escapeUnsafeCharacters): + (-[NSURL _web_userVisibleString]): + +2008-05-05 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end + + * WebView/WebView.mm: + (-[WebView _updateSettingsFromPreferences:]): Disable Range mutation on changes to + the document for Tiger and Leopard Mail. There is code in Mail that does it, and + the two interfere. + +2008-05-05 Sam Weinig <sam@webkit.org> + + Reviewed by Tim Hatcher. + + Make the Inspector's localizable strings file match the format used by Dashboard widgets. + + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::localizedStringsURL): + +2008-05-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Jess. + + Apparently preflighting can cause hangs for some reason. Revert this for now. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage _initWithPath:]): + * Plugins/WebPluginPackage.m: + (-[WebPluginPackage initWithPath:]): + +2008-05-05 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - https://bugs.webkit.org/show_bug.cgi?id=18789 + fix some shouldCloseWithWindow edge cases + + * WebView/WebView.mm: + (-[WebView viewWillMoveToWindow:]): Fix bug where we would stop observing the + NSWindowWillCloseNotification if the view was moved out of the window but still + had that window set as the host window. Also make sure this function doesn't do + anything if the WebView is already closed. + (-[WebView setHostWindow:]): Ditto. + +2008-05-04 David Kilzer <ddkilzer@apple.com> + + Make parameters match for WebChromeClient::addMessageToConsole() + + Reviewed by John. + + * WebCoreSupport/WebChromeClient.h: + (WebChromeClient::addMessageToConsole): Renamed sourceID parameter + to sourceURL to match implementation in WebChromeClient.mm. + +2008-05-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark. + + Various Cocoa event model and 64-bit plug-in fixes. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::sendMouseEvent): + Set click count. + + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + Don't try to get the mouse location for keyboard events. + + * Plugins/WebPluginPackage.m: + (-[WebPluginPackage initWithPath:]): + Preflight the bundle so we won't show 32-bit WebKit plug-ins when running as 64-bit. + +2008-05-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + The event union is now named. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::drawRect): + (WebNetscapePluginEventHandlerCocoa::sendMouseEvent): + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + (WebNetscapePluginEventHandlerCocoa::windowFocusChanged): + (WebNetscapePluginEventHandlerCocoa::focusChanged): + +2008-05-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark. + + Make sure that 32-bit only plug-ins aren't shown when running as 64-bit. + + Call preflightAndReturnError on the bundle, which will check if any of the architectures + in the bundle match the current architecture. + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage _initWithPath:]): + +2008-05-02 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=18826 + Make JavaScript heap per-thread + + * Misc/WebCoreStatistics.mm: + (+[WebCoreStatistics javaScriptObjectsCount]): + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): + (+[WebCoreStatistics javaScriptReferencedObjectsCount]): + Replaced static Collector calls with calls to a current thread's instance. + + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame evaluateWebScript:]): + Pass ExecState to jsString(). + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark. + + 64-bit NPAPI plugin build fixes. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebBaseNetscapePluginView updateAndSetWindow]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView windowBecameKey:]): + * Plugins/WebNetscapeDeprecatedFunctions.c: + * Plugins/WebNetscapeDeprecatedFunctions.h: + * Plugins/WebNetscapePluginEventHandler.mm: + (WebNetscapePluginEventHandler::create): + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + * Plugins/WebPluginDatabase.m: + (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Tim. + + Remove duplicate npfunctions.h header from WebKit. + + * MigrateHeaders.make: + Migrate npfunctions.h + + * Plugins/npfunctions.h: Removed. + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Reviewed by John. + + Add null checks for the event handler. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Fix 64-bit build. + + * Plugins/WebNetscapePluginEventHandlerCocoa.h: + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + * WebCoreSupport/WebFrameLoaderClient.mm: + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Fix build. + + * Plugins/npfunctions.h: + +2008-05-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Forward mouse move events to the Netscape plug-in view. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView handleMouseMoved:]): + New method that just calls the current event handler. + + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + NSFlagsChanged is not a regular keyboard event and some of the NSEvent accessors + don't work on it so don't call them. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (NetscapePluginWidget::NetscapePluginWidget): + New Widget subclass to be used for Netscape plug-ins. + + (NetscapePluginWidget::handleEvent): + Forward NSMouseMoved events to the plug-in. + + (WebFrameLoaderClient::createPlugin): + Wrap the plug-in view in a NetscapePluginWidget. + +2008-05-01 Alp Toker <alp@nuanti.com> + + Rubber-stamped by Anders. + + GTK+ build fix for changes in r32752. Use int32, not int32_t types in + npapi.h. + + Additional fix to use same signedness in npapi.h and Mac for the + interval parameter. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (PluginTimer::PluginTimer): + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView restartTimers]): + (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): + (-[WebBaseNetscapePluginView unscheduleTimer:]): + * Plugins/WebBaseNetscapePluginViewPrivate.h: + * Plugins/npapi.m: + (NPN_ScheduleTimer): + (NPN_UnscheduleTimer): + * Plugins/npfunctions.h: + +2008-04-30 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Add new Cocoa event model and the NPN_ScheduleTimer/NPN_UnscheduleTimer methods. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (PluginTimer::PluginTimer): + (PluginTimer::start): + (PluginTimer::fired): + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView restartTimers]): + (-[WebBaseNetscapePluginView scrollWheel:]): + (-[WebBaseNetscapePluginView flagsChanged:]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView eventModel]): + (-[WebBaseNetscapePluginView fini]): + (-[WebBaseNetscapePluginView getVariable:value:]): + (-[WebBaseNetscapePluginView setVariable:value:]): + (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): + (-[WebBaseNetscapePluginView unscheduleTimer:]): + * Plugins/WebBaseNetscapePluginViewInternal.h: + * Plugins/WebBaseNetscapePluginViewPrivate.h: + * Plugins/WebNetscapePluginEventHandler.h: + * Plugins/WebNetscapePluginEventHandler.mm: + (WebNetscapePluginEventHandler::create): + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::scrollWheel): + (WebNetscapePluginEventHandlerCarbon::flagsChanged): + (WebNetscapePluginEventHandlerCarbon::platformWindow): + * Plugins/WebNetscapePluginEventHandlerCocoa.h: Added. + (WebNetscapePluginEventHandlerCocoa::startTimers): + (WebNetscapePluginEventHandlerCocoa::stopTimers): + * Plugins/WebNetscapePluginEventHandlerCocoa.mm: Added. + (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa): + (WebNetscapePluginEventHandlerCocoa::drawRect): + (WebNetscapePluginEventHandlerCocoa::mouseDown): + (WebNetscapePluginEventHandlerCocoa::mouseDragged): + (WebNetscapePluginEventHandlerCocoa::mouseEntered): + (WebNetscapePluginEventHandlerCocoa::mouseExited): + (WebNetscapePluginEventHandlerCocoa::mouseMoved): + (WebNetscapePluginEventHandlerCocoa::mouseUp): + (WebNetscapePluginEventHandlerCocoa::scrollWheel): + (WebNetscapePluginEventHandlerCocoa::sendMouseEvent): + (WebNetscapePluginEventHandlerCocoa::keyDown): + (WebNetscapePluginEventHandlerCocoa::keyUp): + (WebNetscapePluginEventHandlerCocoa::flagsChanged): + (WebNetscapePluginEventHandlerCocoa::sendKeyEvent): + (WebNetscapePluginEventHandlerCocoa::windowFocusChanged): + (WebNetscapePluginEventHandlerCocoa::focusChanged): + (WebNetscapePluginEventHandlerCocoa::platformWindow): + (WebNetscapePluginEventHandlerCocoa::sendEvent): + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + * Plugins/npapi.m: + (NPN_ScheduleTimer): + (NPN_UnscheduleTimer): + * Plugins/npfunctions.h: + +2008-04-30 Brady Eidson <beidson@apple.com> + + Fix my WebPreferences revert check-in + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2008-04-30 Brady Eidson <beidson@apple.com> + + Rubberstamped by John Sullivan + + Revert the remainder of my original preferences changes from last week. + They caused a massive PLT regression (too many notifications being sent out + or listened to that weren't previously) and it's not in my schedule to refine + the preferences code instead of working on my feature! + + * WebView/WebView.mm: + (-[WebView _updateSettingsFromPreferences:]): + (-[WebView _commonInitializationWithFrameName:groupName:]): + +2008-04-30 Anders Carlsson <andersca@apple.com> + + Fix the 64-bit build. + + * Plugins/WebNetscapePluginEventHandler.h: + * Plugins/WebNetscapePluginEventHandler.mm: + * Plugins/WebNetscapePluginEventHandlerCarbon.h: + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + +2008-04-29 David D. Kilzer <ddkilzer@apple.com> + + BUILD FIX for Release build. + + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: + (WebNetscapePluginEventHandlerCarbon::drawRect): Declare acceptedEvent + separately so the compiler doesn't complain about an unused variable. + (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): Ditto. + +2008-04-29 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Refactor the Carbon event handling code out into a separate class in preparation for adding + the Cocoa event handling code. + + * Plugins/WebBaseNetscapePluginView.h: + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): + (-[WebBaseNetscapePluginView sendActivateEvent:]): + (-[WebBaseNetscapePluginView sendDrawRectEvent:]): + (-[WebBaseNetscapePluginView stopTimers]): + (-[WebBaseNetscapePluginView restartTimers]): + (-[WebBaseNetscapePluginView setHasFocus:]): + (-[WebBaseNetscapePluginView mouseDown:]): + (-[WebBaseNetscapePluginView mouseUp:]): + (-[WebBaseNetscapePluginView mouseEntered:]): + (-[WebBaseNetscapePluginView mouseExited:]): + (-[WebBaseNetscapePluginView mouseDragged:]): + (-[WebBaseNetscapePluginView keyUp:]): + (-[WebBaseNetscapePluginView keyDown:]): + (-[WebBaseNetscapePluginView cut:]): + (-[WebBaseNetscapePluginView copy:]): + (-[WebBaseNetscapePluginView paste:]): + (-[WebBaseNetscapePluginView selectAll:]): + (-[WebBaseNetscapePluginView start]): + (-[WebBaseNetscapePluginView stop]): + (-[WebBaseNetscapePluginView fini]): + (-[WebBaseNetscapePluginView drawRect:]): + (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): + (-[WebBaseNetscapePluginView viewDidMoveToWindow]): + (-[WebBaseNetscapePluginView windowBecameKey:]): + (-[WebBaseNetscapePluginView windowResignedKey:]): + (-[WebBaseNetscapePluginView windowDidMiniaturize:]): + (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): + (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]): + (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]): + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + (-[WebBaseNetscapePluginView _viewHasMoved]): + * Plugins/WebBaseNetscapePluginViewInternal.h: + * Plugins/WebNetscapePluginEmbeddedView.h: + * Plugins/WebNetscapePluginEventHandler.h: Added. + (WebNetscapePluginEventHandler::~WebNetscapePluginEventHandler): + (WebNetscapePluginEventHandler::currentEventIsUserGesture): + (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler): + * Plugins/WebNetscapePluginEventHandler.mm: Added. + (WebNetscapePluginEventHandler::create): + * Plugins/WebNetscapePluginEventHandlerCarbon.h: Added. + * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Added. + (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon): + (getCarbonEvent): + (modifiersForEvent): + (WebNetscapePluginEventHandlerCarbon::sendNullEvent): + (WebNetscapePluginEventHandlerCarbon::drawRect): + (WebNetscapePluginEventHandlerCarbon::mouseDown): + (WebNetscapePluginEventHandlerCarbon::mouseUp): + (WebNetscapePluginEventHandlerCarbon::mouseEntered): + (WebNetscapePluginEventHandlerCarbon::mouseExited): + (WebNetscapePluginEventHandlerCarbon::mouseDragged): + (WebNetscapePluginEventHandlerCarbon::mouseMoved): + (WebNetscapePluginEventHandlerCarbon::keyDown): + (keyMessageForEvent): + (WebNetscapePluginEventHandlerCarbon::keyUp): + (WebNetscapePluginEventHandlerCarbon::focusChanged): + (WebNetscapePluginEventHandlerCarbon::windowFocusChanged): + (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): + (WebNetscapePluginEventHandlerCarbon::installKeyEventHandler): + (WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler): + (WebNetscapePluginEventHandlerCarbon::nullEventTimerFired): + (WebNetscapePluginEventHandlerCarbon::startTimers): + (WebNetscapePluginEventHandlerCarbon::stopTimers): + (WebNetscapePluginEventHandlerCarbon::sendEvent): + +2008-04-29 Mark Rowe <mrowe@apple.com> + + Reviewed by David Harrison. + + Ensure that WebDynamicScrollBarsView defines WebCoreScrollbarAlwaysOn to keep Mail building. + + * WebKit.exp: + * WebView/WebDynamicScrollBarsView.h: + * WebView/WebDynamicScrollBarsView.m: + +2008-04-29 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Darin Adler. + + Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT) + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + * WebView/WebClipView.m: + (-[WebClipView scrollWheel:]): + * WebView/WebHTMLView.mm: + (-[WebHTMLView addMouseMovedObserver]): + (-[WebHTMLView removeMouseMovedObserver]): + (-[WebHTMLView acceptsFirstMouse:]): + * WebView/WebUIDelegatePrivate.h: + * WebView/WebView.mm: + (-[WebViewPrivate init]): + * WebView/WebViewPrivate.h: + +2008-04-28 Rob Buis <buis@kde.org> + + Reviewed by Maciej. + + Build fix for Tiger. + + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + +2008-04-28 Adele Peterson <adele@apple.com> + + Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler. + + WebKit part of fix for <rdar://problem/3709505> + Safari should have a way to upload bundles from the file upload control (as zip) + + Added UIDelegate methods to let the application handle generating replacement files for uploads. + In this case, Safari will create archived files for bundles so they can be uploaded properly. + + * DefaultDelegates/WebDefaultUIDelegate.m: + (-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]): + (-[WebDefaultUIDelegate webView:generateReplacementFile:]): + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::shouldReplaceWithGeneratedFileForUpload): + (WebChromeClient::generateReplacementFile): + * WebView/WebUIDelegatePrivate.h: + +2008-04-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam, Mark, Adele and Darin. + + Initialize the application cache path. + + * WebView/WebView.mm: + (WebKitInitializeApplicationCachePathIfNecessary): + (-[WebView _commonInitializationWithFrameName:groupName:]): + +2008-04-28 Alice Liu <alice.liu@apple.com> + + Reviewed by Darin Adler. + + Fix <rdar://problem/4911289> Add tabindex property to all children + of HTMLElement (7138) + http://bugs.webkit.org/show_bug.cgi?id=7138 + + * MigrateHeaders.make: + Removing DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h + because now that focus() has been moved to DOMHTMLElement.h, these + files are no longer needed. + +2008-04-25 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Fix run-webkit-tests --threading + and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661> + Proxy server issue in Sunday's Nightly + + * WebView/WebView.mm: (-[WebViewPrivate init]): Initialize threading. Previously, this was + only done from icon database code, which is not robust enough. + +2008-04-20 Adam Barth <hk9565@gmail.com> + + Reviewed by Adam Roben and Sam Weinig. + + Updated WebSecurityOrigin to match new SecurityOrigin API. + + Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch. + + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin host]): + (-[WebSecurityOrigin domain]): + * Storage/WebSecurityOriginPrivate.h: + +2008-04-25 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Add some content to an empty ICU header file to prevent verification errors. + + * icu/unicode/utf_old.h: + +2008-04-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Add offlineWebApplicationCacheEnabled preference. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): + (-[WebPreferences offlineWebApplicationCacheEnabled]): + (-[WebPreferences setOfflineWebApplicationCacheEnabled:]): + * WebView/WebPreferencesPrivate.h: + * WebView/WebView.mm: + (-[WebView _updateSettingsFromPreferences:]): + +2008-04-24 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Remove code for calculating the glyph cache size. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Remove unused symbol. + +2008-04-24 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER. + + * WebKitPrefix.h: + +2008-04-24 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Fix layout test regressions from my earlier preferences/settings tweak. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Even if we're not posting + the notification to update the settings, each WebView still needs to register for the + notification - restore that behavior. + +2008-04-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729 + <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text + + * WebView/WebFrame.mm: + (-[WebFrame _caretRectAtNode:offset:affinity:]): Changed to use + VisiblePosition::caretRect() instead of the RenderObject method which + was removed. + +2008-04-24 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Rework the Settings population again. + + * WebView/WebView.mm: + (-[WebView _updateSettingsFromPreferences:]): This method is called both from _preferencesChangedNotification + and directly from WebView's common init function. + (-[WebView _preferencesChangedNotification:]): + (-[WebView _commonInitializationWithFrameName:groupName:]): Call _updateSettingsFromPreferences immediately + after creating the new Page + +2008-04-24 Darin Adler <darin@apple.com> + + Reviewed by Geoff. + + - fix crash in regression test where we'd ask a frame for a user agent string + after the WebView was already closed + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::userAgent): Assert that the WebView is not nil. Also + added some code to prevent the crash in release builds if this problem happens + again. + +2008-04-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Change some String arguments to be const references instead. + + * WebCoreSupport/WebEditorClient.h: + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::shouldInsertText): + +2008-04-24 John Sullivan <sullivan@apple.com> + + Mac build fix + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory AXButtonActionVerb]): + implement this method using the text in WebCoreLocalizedStrings.cpp + (-[WebViewFactory AXRadioButtonActionVerb]): + ditto + (-[WebViewFactory AXTextFieldActionVerb]): + ditto + (-[WebViewFactory AXCheckedCheckBoxActionVerb]): + ditto + (-[WebViewFactory AXUncheckedCheckBoxActionVerb]): + ditto + (-[WebViewFactory AXLinkActionVerb]): + ditto + +2008-04-23 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings + object before the Settings object is initialized. It seems quite prudent to post the preferences changed notification, + thereby populating the Settings object, immediately after the Page is created. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Post the notification right after the Page is created + +2008-04-24 John Sullivan <sullivan@apple.com> + + Reviewed by Jess + + - fixed <rdar://problem/5886655> JavaScript input panel automatic resizing doesn't work right with HiDPI + + * Misc/WebNSControlExtras.m: + (-[NSControl sizeToFitAndAdjustWindowHeight]): + deploy userSpaceScaleFactor when using view distances on the window + +2008-04-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Add NPN_Construct and NPN_PluginThreadAsyncCall declarations. + + * Plugins/npfunctions.h: + +2008-04-20 Matt Lilek <webkit@mattlilek.com> + + Mysteriously reviewed by mitz|away. + + Bug 18111: Closing a tab while dragging crashes Safari + https://bugs.webkit.org/show_bug.cgi?id=18111 + + Null check the page before handling drag events. + + * WebView/WebView.mm: + (-[WebView draggingUpdated:]): + (-[WebView draggingExited:]): + +2008-04-19 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher + + Add a WebPreference for the path of the local storage persistent store. + + * WebView/WebPreferenceKeysPrivate.h: + + * WebView/WebPreferences.m: + (-[WebPreferences _localStorageDatabasePath]): + (-[WebPreferences _setLocalStorageDatabasePath:]): + * WebView/WebPreferencesPrivate.h: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2008-04-18 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this. + No reason to do the work twice... + + * WebView/WebView.mm: + (-[WebView _close]): + +2008-04-17 Eric Seidel <eric@webkit.org> + + Reviewed by beth. + + Rename Frame::renderer() to contentRenderer() and fix uses. + + * Misc/WebCoreStatistics.mm: + * WebView/WebRenderNode.mm: + (-[WebRenderNode initWithWebFrameView:]): + +2008-04-17 Jon Honeycutt <jhoneycutt@apple.com> + + Reviewed by mrowe. + + * WebView/WebFrame.mm: Remove temporary build fix. + +2008-04-17 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Fix <rdar://problem/5863552> REGRESSION (r30741): Attachments don't appear in the iChat message window after sending + + The order of arguments to -[NSDictionary initWithObjects:andKeys:] had been transposed accidentally during refactoring. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): Pass the arguments in the correct order. + +2008-04-17 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dan Bernstein. + + Fix the Mac build. + + * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building + for now. This comes from config.h in WebCore but we don't have an equivalent in WebKit so we'll need to work out the correct place + for this to live going forward. + +2008-04-15 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders. + + <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403 + + In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a + preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading + a bundle out from underneath itself. + + * Plugins/WebBasePluginPackage.h: Added unload method. + * Plugins/WebBasePluginPackage.m: + (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload. + (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload. + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage unload]): Added. + +2008-04-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES. + + * Configurations/WebKit.xcconfig: + +2008-04-15 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan + + Do a more complete job adding the "WebArchiveDebugMode" pref + + * WebView/WebPreferences.m: Add both getter *and* setter + (-[WebPreferences webArchiveDebugModeEnabled]): + (-[WebPreferences setWebArchiveDebugModeEnabled:]): + * WebView/WebPreferencesPrivate.h: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Call the renamed getter + +2008-04-14 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + Add a hidden pref to debug WebArchive loading. With this pref on, when loading a WebArchive, + if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the + network and will instead fail the load as "cancelled." + + * WebView/WebPreferenceKeysPrivate.h: + + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): + (-[WebPreferences _webArchiveDebugModeEnabled]): + * WebView/WebPreferencesPrivate.h: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): + +2008-04-11 David Hyatt <hyatt@apple.com> + + Rename CachedResource ref/deref methods to addClient/removeClient. + + Reviewed by olliej + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate dealloc]): + (-[WebHTMLViewPrivate finalize]): + (-[WebHTMLViewPrivate clear]): + (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]): + +2008-04-07 Brady Eidson <beidson@apple.com> + + Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project + + * Configurations/WebKit.xcconfig: + +2008-04-04 Adam Roben <aroben@apple.com> + + Use WebCore's ICU headers instead of our own copy + + Rubberstamped by Tim Hatcher. + + * Configurations/WebKit.xcconfig: Pick up ICU headers from WebCore's + PrivateHeaders. + +2008-04-04 Adam Roben <aroben@apple.com> + + Fix <rdar://problem/5804776> Would like to use WebCore's + ForwardingHeaders in WebKit without manually creating copies + + Patch by Tim Hatcher, typed by me. + + * Configurations/WebKit.xcconfig: Use the copy of ForwardingHeaders in + WebCore's PrivateHeaders instead of our own copy. + +2008-04-04 Ada Chan <adachan@apple.com> + + Now we pass width and height directly as integers to format + the window title for a standalone image. + + Reviewed by Dan. + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory imageTitleForFilename:width:height:]): + +2008-04-03 Nicholas Shanks <webkit@nickshanks.com> + + Updated by Dan Bernstein. Reviewed by Dave Hyatt. + + - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484 + font-weight does not properly support graded weights + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _styleFromFontAttributes:]): + (-[WebHTMLView _originalFontB]): + (-[WebHTMLView _addToStyle:fontA:fontB:]): + +2008-04-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Ensure that debug symbols are generated for x86_64 and ppc64 builds. + + * Configurations/Base.xcconfig: + +2008-03-31 Alice Liu <alice.liu@apple.com> + + Reviewed by Darin Adler. + + * WebView/WebFrame.mm: + (-[WebFrame _accessibilityTree]): + The syntax for fetching an object from the AXObjectCache changed slightly + +2008-03-31 Brady Eidson <beidson@apple.com> + + Reviewed by Jon Honeycutt + + Move a WebArchive loading check into WebCore + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation receivedData:withDataSource:]): Don't check "isDisplayingWebArchive" as WebCore is now + responsible for checking that state + +2008-03-31 Brady Eidson <beidson@apple.com> + + Reviewed by Darin and Mitz's rubber stamp + + Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore + + * WebCoreSupport/WebEditorClient.mm: + * WebCoreSupport/WebEditorClient.h: + +2008-03-28 Brady Eidson <beidson@apple.com> + + Rubberstamped by Darin Adler + + Remove WebArchiver.h/mm + + * WebView/WebArchiver.h: Removed. + * WebView/WebArchiver.mm: Removed. + + * DOM/WebDOMOperations.mm: + * WebCoreSupport/WebDragClient.mm: + * WebCoreSupport/WebEditorClient.mm: + * WebView/WebDataSource.mm: + * WebView/WebHTMLView.mm: + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + Now that WebCore can create archives from a frame selection directly, we don't need it in WebArchiver anymore + + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::dataForArchivedSelection): + + * WebView/WebArchiver.h: Nuke archiveSelectionInFrame, as there are no remaining users + * WebView/WebArchiver.mm: Ditto + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]): + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler + + More Kit->Core WebArchive changes. + + Create an archive from the current selection in a frame + + * WebView/WebArchiver.mm: Remove one more *undeclared* method, the last method will drop off + easily in a followup + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + WebArchive saga continues - Can now make archives from ranges in WebCore + + * DOM/WebDOMOperations.mm: + (-[DOMRange webArchive]): + (-[DOMRange markupString]): + + * WebView/WebArchiver.h: Remove newly obsolete [WebArchiver archiveRange:] + * WebView/WebArchiver.mm: + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + More Kit->Core webarchive code movement + + * DOM/WebDOMOperations.mm: + (-[DOMNode markupString]): Call createFullMarkup() instead + + * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode + * WebView/WebFrameInternal.h: Ditto + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Fold [WebArchiver archiveFrame:] into WebDataSource - the last remaining caller + + * WebView/WebArchiver.h: + * WebView/WebArchiver.mm: + * WebView/WebDataSource.mm: + (-[WebDataSource webArchive]): + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Remove unused [WebArchiver archiveNode:], made obsolete in r31400 + + * WebView/WebArchiver.h: + * WebView/WebArchiver.mm: + +2008-03-28 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + "Yet another transitional step" to empty out WebKit-based code for archiving. + + With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place + entirely within WebCore, and opens the door to saving WebArchives on Windows. + + * DOM/WebDOMOperations.mm: + * WebView/WebArchiver.mm: + (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]): + +2008-03-27 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben + + Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore + as the push to core-ify WebArchives continues. + + This patch also introduces a behavior change. WebCore allows ArchiveResources with null or empty data. + WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null. + Since WebResource is API, I decided to leave it be to avoid a behavior change. But internally created resources + (as in "while archiving a page") are accepting of null or empty data. + + This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. + + * WebView/WebDataSource.mm: + (-[WebDataSource mainResource]): Call DocumentLoader implementation + (-[WebDataSource subresources]): Ditto + * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete + * WebView/WebFrameInternal.h: + +2008-03-27 Brady Eidson <beidson@apple.com> + + Reviewed by Adam + + Change the "init from WebCore resource" version of WebResource to take PassRefPtr + (more efficient) + + * WebView/WebResource.mm: + (-[WebResource _initWithCoreResource:]): + * WebView/WebResourceInternal.h: + +2008-03-26 Brady Eidson <beidson@apple.com> + + Build fix - accidentally checked in this change which was work in progress + + * DOM/WebDOMOperations.mm: + +2008-03-26 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + When we create a WebArchive, we walk every node from some starting point, asking each node + along the way "What are your subresource URLs?" + + That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into + WebCore::Node + + * DOM/WebDOMOperations.mm: + (-[DOMNode _subresourceURLs]): One generic DOMNode method can now handle all DOMNodes by + calling into individual WebCore::Node implementations + * DOM/WebDOMOperationsPrivate.h: + +2008-03-26 Brady Eidson <beidson@apple.com> + + Reviewed by Mark Rowe + + Part of the continued push to move WebArchive-related code down to WebCore, this + moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource() + + * WebView/WebDataSource.mm: + (-[WebDataSource subresourceForURL:]): Call through to the DocumentLoader + + * WebView/WebFrame.mm: Remove [WebFrame _getData:andResponse:forURL:], as its only use + has now been ported down to WebCore + * WebView/WebFrameInternal.h: + +2008-03-26 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Brady Eidson. + + Update FEATURE_DEFINES to be consistent with the other locations in which it is defined. + + * Configurations/WebKit.xcconfig: + +2008-03-26 Mark Rowe <mrowe@apple.com> + + Reviewed by David Hyatt. + + Make the Ahem font antialias correctly on Acid3 on Tiger. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2008-03-26 Mark Rowe <mrowe@apple.com> + + Fix the Mac build. + + * MigrateHeaders.make: Copy the newly generated header into the right place. + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Beth Dakin + + Remove entirely unused internal method + + * WebView/WebArchiver.h: + * WebView/WebArchiver.mm: + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Adam Roben + + <rdar://problem/5819308> - View Source is empty when view webarchives + + * WebCore.base.exp: + * loader/DocumentLoader.cpp: + (WebCore::DocumentLoader::setParsedArchiveData): + (WebCore::DocumentLoader::parsedArchiveData): + * loader/DocumentLoader.h: + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData + in the DocumentLoader + +2008-03-25 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix http://bugs.webkit.org/show_bug.cgi?id=17933 + Reopen All Windows From Last Session causes crash + + * WebView/WebHTMLView.mm: + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Added null + check. + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Jon Honeycutt's rubberstamp + + Fix a leak with the new WebArchive setup + + * WebView/WebArchive.mm: + (-[WebArchivePrivate setCoreArchive:]): Deref() the old WebArchive + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Removed the concept of "pending archive resources" and the "archive resources delivery timer" + from WebFrameLoaderClient, as those concepts have been pushed into WebCore + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::WebFrameLoaderClient): + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + Remove newly obsolete FrameLoaderClient methods + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + +2008-03-25 Brady Eidson <beidson@apple.com> + + Release build fix + + * WebView/WebArchive.mm: + (-[WebArchive subresources]): + (-[WebArchive subframeArchives]): + +2008-03-25 Brady Eidson <beidson@apple.com> + + Reviewed by Darin + + <rdar://problem/4516169> - Support WebArchives on Windows + And paves the way for many future WebArchive bug fixes and enhancements + + This change moves most of the real workhorse code about WebArchives into WebCore. It maintains + 1-to-1 relationships between a few objects in WebCore and WebKit. Such as: + * WebArchive <-> LegacyWebArchive + * WebResource <-> ArchiveResource + * WebUnarchivingState <-> ArchiveResourceCollection + + The other biggest changes involve many FrameLoaderClient methods that existed soley for WebArchives + and now exist in WebCore + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::clearUnarchivingState): Emptied - to be removed in a followup patch + (WebFrameLoaderClient::finalSetupForReplace): + (WebFrameLoaderClient::setDefersLoading): + (WebFrameLoaderClient::willUseArchive): + (WebFrameLoaderClient::isArchiveLoadPending): + (WebFrameLoaderClient::cancelPendingArchiveLoad): + (WebFrameLoaderClient::clearArchivedResources): + (WebFrameLoaderClient::createFrame): + + * WebView/WebArchive.mm: + (+[WebArchivePrivate initialize]): + (-[WebArchivePrivate init]): + (-[WebArchivePrivate initWithCoreArchive:]): + (-[WebArchivePrivate coreArchive]): + (-[WebArchivePrivate setCoreArchive:]): + (-[WebArchivePrivate dealloc]): + (-[WebArchivePrivate finalize]): + (-[WebArchive init]): + (-[WebArchive initWithMainResource:subresources:subframeArchives:]): + (-[WebArchive initWithData:]): + (-[WebArchive initWithCoder:]): + (-[WebArchive encodeWithCoder:]): + (-[WebArchive mainResource]): + (-[WebArchive subresources]): + (-[WebArchive subframeArchives]): + (-[WebArchive data]): + (-[WebArchive _initWithCoreLegacyWebArchive:WebCore::]): + (-[WebArchive WebCore::]): + * WebView/WebArchiveInternal.h: Added. + + * WebView/WebDataSource.mm: + (-[WebDataSourcePrivate dealloc]): + (-[WebDataSource _addSubframeArchives:]): + (-[WebDataSource _documentFragmentWithArchive:]): + (-[WebDataSource subresourceForURL:]): + (-[WebDataSource addSubresource:]): + * WebView/WebDataSourceInternal.h: + + * WebView/WebFrame.mm: + (-[WebFrame loadArchive:]): + * WebView/WebFrameInternal.h: + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): + + * WebView/WebResource.mm: + (+[WebResourcePrivate initialize]): + (-[WebResourcePrivate init]): + (-[WebResourcePrivate initWithCoreResource:]): + (-[WebResourcePrivate dealloc]): + (-[WebResourcePrivate finalize]): + (-[WebResource initWithCoder:]): + (-[WebResource encodeWithCoder:]): + (-[WebResource data]): + (-[WebResource URL]): + (-[WebResource MIMEType]): + (-[WebResource textEncodingName]): + (-[WebResource frameName]): + (-[WebResource _initWithCoreResource:WebCore::]): + (-[WebResource WebCore::]): + (-[WebResource _ignoreWhenUnarchiving]): + (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): + (-[WebResource _fileWrapperRepresentation]): + (-[WebResource _response]): + (-[WebResource _stringValue]): + * WebView/WebResourceInternal.h: Added. + * WebView/WebResourcePrivate.h: + + * WebView/WebUnarchivingState.h: Removed. + * WebView/WebUnarchivingState.m: Removed. + +2008-03-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Mark Rowe. + + Bug 18030: REGRESSION(r31236): Space bar fails to scroll down page + <http://bugs.webkit.org/show_bug.cgi?id=18030> + + Rollout keyDown changes from r31236 -- fix for keyDown behaviour is + tracked by Bug 18057: keyDown incorrectly propagates up the frame tree + <http://bugs.webkit.org/show_bug.cgi?id=18057> + + * WebView/WebHTMLView.mm: + (-[WebHTMLView keyDown:]): + +2008-03-24 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Maciej, landed by Brady + + Bug 3580: iFrames Appear to be Cached + <http://bugs.webkit.org/show_bug.cgi?id=3580> + + Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs + <http://bugs.webkit.org/show_bug.cgi?id=15486> + + Bug 15554: Reload causes <object> to use old data + <http://bugs.webkit.org/show_bug.cgi?id=15554> + + If a page is reloaded, a child frame's URL can not be taken from a history item. + + * WebView/WebFrame.mm: + (-[WebFrame _loadURL:referrer:intoChild:]): + +2008-03-24 Darin Adler <darin@apple.com> + + Reviewed by Beth. + + - fix <rdar://problem/5817067> -[WebDataSource unreachableURL] invokes KURL's copy constructor + + * History/WebHistoryItem.mm: + (-[WebHistoryItem URL]): Use a reference to avoid making a copy. + * WebView/WebDataSource.mm: + (-[WebDataSource _URL]): Ditto. + (-[WebDataSource unreachableURL]): Ditto. + * WebView/WebHTMLView.mm: + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto. + + * DefaultDelegates/WebDefaultContextMenuDelegate.mm: + * History/WebHistory.mm: + * Misc/WebElementDictionary.mm: + * Misc/WebNSAttributedStringExtras.mm: + Remove unneeded imports of KURL.h. + +2008-03-24 Brady Eidson <beidson@apple.com> + + Reviewed by Darin's rubberstamp + + Rename this file for upcoming work. + + * WebView/WebArchive.m: Removed. + * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m. + +2008-03-24 Alexey Proskuryakov <ap@webkit.org> + + Build fix. + + * MigrateHeaders.make: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h. + +2008-03-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej. + + Bug 17670: Key events may improperly propagate from iframe to parent frame + <http://bugs.webkit.org/show_bug.cgi?id=17670> + Bug 16381: REGRESSION: Shift, command, option, ctrl keys in Gmail Rich Text changes focus + <http://bugs.webkit.org/show_bug.cgi?id=16381> + + Prevent the Cocoa event system from propagating key events to the parent WebHTMLView, + as that results in us dispatching the key events for each frame going up the frame + tree. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView keyDown:]): + (-[WebHTMLView keyUp:]): + (-[WebHTMLView flagsChanged:]): + +2008-03-21 Timothy Hatcher <timothy@apple.com> + + Bug 17980: Regression: Inspector highlighting of webpage not cleared when going to new URL + http://bugs.webkit.org/show_bug.cgi?id=17980 + + Reviewed by Adam. + + The new highlight drawing was not honoring the fade value, so it was + always drawing at full opacity. The animation code didn't match Windows + and the new highlight anyway, so it has been removed. The highlight + how just detaches when it is hidden. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController windowShouldClose:]): Call hideHighlight. + (-[WebInspectorWindowController close]): Ditto. + (-[WebInspectorWindowController highlightNode:]): Call attach. + (-[WebInspectorWindowController hideHighlight]): Call detach and release _currentHighlight. + * WebInspector/WebNodeHighlight.h: + * WebInspector/WebNodeHighlight.m: + (-[WebNodeHighlight initWithTargetView:inspectorController:]): + (-[WebNodeHighlight dealloc]): Assert we have no _highlightView. + (-[WebNodeHighlight attach]): Renamed from attachHighlight. + (-[WebNodeHighlight detach]): Renamed from detachHighlight. + (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Renamed from setHolesNeedUpdateInTargetViewRect:. + * WebInspector/WebNodeHighlightView.h: + * WebInspector/WebNodeHighlightView.m: + (-[WebNodeHighlightView setNeedsDisplayInRect:]): Renamed from setHolesNeedUpdateInRect:. + +2008-03-20 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit. + This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the + command-line. + + * Configurations/WebKit.xcconfig: + +2008-03-20 Adam Roben <aroben@apple.com> + + Make WebNodeHighlightView use InspectorController to do its painting + + Reviewed by Tim Hatcher. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController highlightNode:]): Pass the + InspectorController to the WebNodeHighlight, and don't call + setHighlightedNode: (which has been removed). + (-[WebInspectorWindowController hideHighlight]): Removed call to + setHighlightedNode:. + * WebInspector/WebNodeHighlight.h: + - Replaced _highlightNode with _inspectorController + - Removed _highlightedNode accessors + - Added -inspectorController method + * WebInspector/WebNodeHighlight.m: + (-[WebNodeHighlight initWithTargetView:inspectorController:]): Now + takes an InspectorController* and stores it in _inspectorController. + (-[WebNodeHighlight dealloc]): Removed code dealing with + _highlightedNode. + (-[WebNodeHighlight inspectorController]): Added. + * WebInspector/WebNodeHighlightView.m: Removed FileInternal category. + (-[WebNodeHighlightView isFlipped]): Added. WebCore expects all + GraphicsContexts to be based on a flipped CGContext, so we have to + specify that this view is flipped. + (-[WebNodeHighlightView drawRect:]): Changed to create a + GraphicsContext and pass it to InspectorController::drawNodeHighlight. + +2008-03-18 David Hyatt <hyatt@apple.com> + + Add support for a preference in WebKit that can be used in nightly builds to test full page + zoom. + + Reviewed by Antti + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebView.mm: + (-[WebView setTextSizeMultiplier:]): + (-[WebView canMakeTextSmaller]): + (-[WebView makeTextSmaller:]): + (-[WebView canMakeTextLarger]): + (-[WebView makeTextLarger:]): + (-[WebView canMakeTextStandardSize]): + (-[WebView makeTextStandardSize:]): + +2008-03-17 Eric Seidel <eric@webkit.org> + + Reviewed by darin. + + Export _NPN_IntFromIdentifier as part of our NPAPI interface + + * Plugins/WebNetscapePluginPackage.m: + (-[WebNetscapePluginPackage load]): + +2008-03-14 Brady Eidson <beidson@apple.com> + + Reviewed by Brian Dash's rubberstamp + + Remove a class declaration for a class that has never existed + + * WebView/WebResource.h: + +2008-03-14 David D. Kilzer <ddkilzer@apple.com> + + Unify concept of enabling the Mac Java bridge. + + Reviewed by Darin and Anders. + + * Plugins/WebPluginJava.h: Removed unused file. + * WebCoreSupport/WebFrameLoaderClient.h: + (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard. + * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method. + (WebFrameLoaderClient::javaApplet): Ditto. + +2008-03-13 Antti Koivisto <antti@apple.com> + + Reviewed by Darin Adler. + + * ForwardingHeaders/wtf/Deque.h: Added. + +2008-03-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam. + + Call originalRequest, not initialRequest. + + * WebView/WebDataSource.mm: + (-[WebDataSource initialRequest]): + +2008-03-12 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + - cleanup after removing the bridge + + * DOM/WebDOMOperations.mm: + (-[DOMDocument URLWithAttributeString:]): Call computeURL directly. + + * Misc/WebCoreStatistics.mm: + (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of + _frameLoader method. + (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): + Ditto. + * Plugins/WebPluginController.mm: + (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame + method. Without this we could leave a stale frame pointer around. + (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single + caller of the _isMainFrame method. + (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of + _frameLoader method. + (WebFrameLoaderClient::createFrame): Moved code here from _addChild. + + * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others + turned out to be unused. + (core): Added overload for DocumentFragment. + (kit): Ditto. + (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and + to FrameLoader with _private->coreFrame->loader(). + (-[WebFrame _attachScriptDebugger]): Ditto. + (-[WebFrame _clearCoreFrame]): Added. + (-[WebFrame _updateBackground]): More of the same. + (-[WebFrame _unmarkAllBadGrammar]): Ditto. + (-[WebFrame _unmarkAllMisspellings]): Ditto. + (-[WebFrame _hasSelection]): Ditto. + (-[WebFrame _atMostOneFrameHasSelection]): Ditto. + (-[WebFrame _findFrameWithSelection]): Ditto. + (-[WebFrame _dataSource]): Ditto. + (-[WebFrame _addData:]): Streamlined code a bit. + (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto. + (-[WebFrame _receivedData:textEncodingName:]): Ditto. + (-[WebFrame _isDescendantOfFrame:]): Ditto. + (-[WebFrame _bodyBackgroundColor]): Ditto. + (-[WebFrame _isFrameSet]): Ditto. + (-[WebFrame _firstLayoutDone]): Ditto. + (-[WebFrame _loadType]): Ditto. + (-[WebFrame _isDisplayingStandaloneImage]): Ditto. + (-[WebFrame name]): Ditto. + (-[WebFrame DOMDocument]): Ditto. + (-[WebFrame frameElement]): Ditto. + (-[WebFrame provisionalDataSource]): Ditto. + (-[WebFrame dataSource]): Ditto. + (-[WebFrame loadRequest:]): Ditto. + (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto. + (-[WebFrame loadArchive:]): Ditto. + (-[WebFrame stopLoading]): Ditto. + (-[WebFrame reload]): Ditto. + (-[WebFrame findFrameNamed:]): Ditto. + (-[WebFrame parentFrame]): Ditto. + (-[WebFrame childFrames]): Ditto. + (-[WebFrame windowObject]): Ditto. + (-[WebFrame globalContext]): Ditto. + + * WebView/WebFrameInternal.h: Added overloads of core and kit. + Removed method declarations. + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame. + (formElementFromDOMElement): Ditto. + (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto. + (inputElementFromDOMElement): Ditto. + (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto. + (-[WebHTMLRepresentation elementIsPassword:]): Ditto. + (-[WebHTMLRepresentation formForElement:]): Ditto. + (-[WebHTMLRepresentation currentForm]): Ditto. + (-[WebHTMLRepresentation controlsInForm:]): Ditto. + (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto. + (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame. + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): + Call createFragmentFromText directly instead of via WebFrame. + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): + Moved layout calls here from WebFrame. + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto. + (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection. + (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity. + (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange. + (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit. + (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): + Moved code here from WebFrame. + (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto. + (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto. + (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto. + (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto. + (-[WebHTMLView unmarkAllTextMatches]): Ditto. + (-[WebHTMLView rectsForTextMatches]): Ditto. + + * WebView/WebHTMLViewInternal.h: Removed unused method declarations. + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of + _frameLoader method. + + * WebView/WebRenderNode.mm: + (copyRenderNode): Moved code here from WebFrame. + (-[WebRenderNode initWithWebFrameView:]): Ditto. + + * WebView/WebResource.mm: + (-[WebResource _stringValue]): Moved code here from WebFrame. + + * WebView/WebView.mm: + (-[WebView _close]): Use core function intsead of _frameLoader method. + (-[WebView setCustomTextEncodingName:]): Ditto. + (-[WebView setHostWindow:]): Moved code here from WebFrame. + (aeDescFromJSValue): Moved this here from WebFrame. + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame. + +2008-03-12 Darin Adler <darin@apple.com> + + Reviewed by Anders. + + - http://bugs.webkit.org/show_bug.cgi?id=17640 + eliminate WebCoreFrameBridge + + Moved all the code from the bridge into WebFrame. This need not be the final + home of these methods -- they can be moved closer to their callers and improved + further -- but it eliminates the bridge without requiring a rewrite of the code. + It's a fairly mechanical process (just adding underscores to method names really). + + There's even a chance that some of the methods are unused. Those we can remove + after checking if that's so. + + * DOM/WebDOMOperations.mm: + (-[DOMNode markupString]): Use WebFrame rather than bridge. + (-[DOMDocument webFrame]): Changed to use the core and kit functions + instead of using the bridge. + (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge. + (-[DOMRange markupString]): Ditto. + * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods. + + * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import. + * History/WebHistoryItem.mm: Ditto. + + * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h. + * Misc/WebCoreStatistics.mm: + (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge. + + * Misc/WebElementDictionary.mm: Removed unneeded import. + + * Misc/WebKitStatistics.m: + (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0. + * Misc/WebKitStatisticsPrivate.h: Ditto. + + * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import. + * Misc/WebNSPasteboardExtras.mm: Ditto. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame + rather than bridge. + + * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import. + * Plugins/WebNetscapePluginStream.mm: Ditto. + + * Plugins/WebPluginContainerCheck.mm: + (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than + bridge to get to the WebCore::Frame. + + * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method. + * Plugins/WebPluginController.mm: + (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame + rather than bridge. + + * WebCoreSupport/WebEditorClient.mm: + (selectorForKeyEvent): Tweaked comment. + + * WebCoreSupport/WebFrameBridge.h: Removed. + * WebCoreSupport/WebFrameBridge.mm: Removed. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion. + (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code. + I could remove this function entirely, but it looks like the Qt port is using it. + + * WebCoreSupport/WebViewFactory.mm: Removed unneeded import. + + * WebView/WebArchiver.mm: + (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge. + (+[WebArchiver archiveNode:]): Ditto. + (+[WebArchiver archiveSelectionInFrame:]): Ditto. + + * WebView/WebDataSource.mm: + (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto. + (-[WebDataSource _documentFragmentWithArchive:]): Ditto. + (-[WebDataSource subresources]): Ditto. + (-[WebDataSource subresourceForURL:]): Ditto. + + * WebView/WebDataSourceInternal.h: Removed _bridge method. + + * WebView/WebFrame.mm: + (-[WebFramePrivate dealloc]): Removed code to release the bridge. + (core): Go directly to the core frame, not via the bridge. + (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): + Remove the code to deal with the bridge. + (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the + shouldCreateRenderers flag, formerly on the bridge. + (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge. + (aeDescFromJSValue): Moved here from bridge. + (-[WebFrame _domain]): Ditto. + (-[WebFrame _addData:]): Ditto. + (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto. + (-[WebFrame _nodesFromList:]): Ditto. + (-[WebFrame _markupStringFromNode:nodes:]): Ditto. + (-[WebFrame _markupStringFromRange:nodes:]): Ditto. + (-[WebFrame _selectedString]): Ditto. + (-[WebFrame _stringForRange:]): Ditto. + (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto. + (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto. + (-[WebFrame _sendScrollEvent]): Ditto. + (-[WebFrame _drawRect:]): Ditto. + (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto. + (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto. + (-[WebFrame _copyRenderNode:copier:]): Ditto. + (-[WebFrame _copyRenderTree:]): Ditto. + (inputElementFromDOMElement): Ditto. + (formElementFromDOMElement): Ditto. + (-[WebFrame _elementWithName:inForm:]): Ditto. + (-[WebFrame _elementDoesAutoComplete:]): Ditto. + (-[WebFrame _elementIsPassword:]): Ditto. + (-[WebFrame _formForElement:]): Ditto. + (-[WebFrame _currentForm]): Ditto. + (-[WebFrame _controlsInForm:]): Ditto. + (-[WebFrame _searchForLabels:beforeElement:]): Ditto. + (-[WebFrame _matchLabels:againstElement:]): Ditto. + (-[WebFrame _URLWithAttributeString:]): Ditto. + (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto. + (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto. + (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto. + (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto. + (-[WebFrame _unmarkAllTextMatches]): Ditto. + (-[WebFrame _rectsForTextMatches]): Ditto. + (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto. + (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto. + (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto. + (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto. + (-[WebFrame _firstRectForDOMRange:]): Ditto. + (-[WebFrame _scrollDOMRangeToVisible:]): Ditto. + (-[WebFrame _baseURL]): Ditto. + (-[WebFrame _stringWithData:]): Ditto. + (+[WebFrame _stringWithData:textEncodingName:]): Ditto. + (-[WebFrame _needsLayout]): Ditto. + (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto. + (-[WebFrame _accessibilityTree]): Ditto. + (-[WebFrame _setBaseBackgroundColor:]): Ditto. + (-[WebFrame _setDrawsBackground:]): Ditto. + (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]): + Ditto. + (-[WebFrame _selectionGranularity]): Ditto. + (-[WebFrame _convertToNSRange:]): Ditto. + (-[WebFrame _convertToDOMRange:]): Ditto. + (-[WebFrame _convertNSRangeToDOMRange:]): Ditto. + (-[WebFrame _convertDOMRangeToNSRange:]): Ditto. + (-[WebFrame _markDOMRange]): Ditto. + (-[WebFrame _markedTextNSRange]): Ditto. + (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto. + (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto. + (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto. + (-[WebFrame _documentFragmentWithText:inContext:]): Ditto. + (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto. + (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto. + (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto. + (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto. + (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto. + (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto. + (-[WebFrame _visiblePositionForPoint:]): Ditto. + (-[WebFrame _characterRangeAtPoint:]): Ditto. + (-[WebFrame _typingStyle]): Ditto. + (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto. + (-[WebFrame _fontForSelection:]): Ditto. + (-[WebFrame _dragSourceMovedTo:]): Ditto. + (-[WebFrame _dragSourceEndedAt:operation:]): Ditto. + (-[WebFrame _getData:andResponse:forURL:]): Ditto. + (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto. + (-[WebFrame _canProvideDocumentSource]): Ditto. + (-[WebFrame _canSaveAsWebArchive]): Ditto. + (-[WebFrame _receivedData:textEncodingName:]): Ditto. + (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting + function. Couldn't just keep the bridge method because this was already here with the same name. + (-[WebFrame _selectedNSRange]): Ditto. + (-[WebFrame _selectNSRange:]): Ditto. + (-[WebFrame dealloc]): Remove bridge-related code. + (-[WebFrame finalize]): Ditto. + + * WebView/WebFrameInternal.h: Added all the method declarations from the bridge. + Removed the bridge parameter from the init method. Removed the #if blocks that + tried to make this header work in non-C++ ObjC files -- they were broken and unused. + Removed the _bridge method. + + * WebView/WebFrameView.mm: Removed the _bridge method. + + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge + field. + (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge. + (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto. + (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto. + (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto. + (-[WebHTMLRepresentation documentSource]): Ditto. + (-[WebHTMLRepresentation DOMDocument]): Ditto. + (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto. + (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto. + (-[WebHTMLRepresentation elementIsPassword:]): Ditto. + (-[WebHTMLRepresentation formForElement:]): Ditto. + (-[WebHTMLRepresentation currentForm]): Ditto. + (-[WebHTMLRepresentation controlsInForm:]): Ditto. + (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto. + (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto. + + * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge. + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto. + (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto. + (-[WebHTMLView _updateTextSizeMultiplier]): Ditto. + (-[WebHTMLView _frameOrBoundsChanged]): Ditto. + (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto. + (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto. + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto. + (-[WebHTMLView drawSingleRect:]): Ditto. + (-[WebHTMLView draggedImage:movedTo:]): Ditto. + (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto. + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto. + (-[WebHTMLView knowsPageRange:]): Ditto. + (-[WebHTMLView accessibilityAttributeValue:]): Ditto. + (-[WebHTMLView accessibilityFocusedUIElement]): Ditto. + (-[WebHTMLView accessibilityHitTest:]): Ditto. + (-[WebHTMLView _accessibilityParentForSubview:]): Ditto. + (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto. + (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto. + (-[WebHTMLView _changeSpellingToWord:]): Ditto. + (-[WebHTMLView startSpeaking:]): Ditto. + (-[WebHTMLView _updateFontPanel]): Ditto. + (-[WebHTMLView _canSmartCopyOrDelete]): Ditto. + (-[WebHTMLView _layoutIfNeeded]): Ditto. + (-[WebHTMLView characterIndexForPoint:]): Ditto. + (-[WebHTMLView firstRectForCharacterRange:]): Ditto. + (-[WebHTMLView selectedRange]): Ditto. + (-[WebHTMLView markedRange]): Ditto. + (-[WebHTMLView attributedSubstringFromRange:]): Ditto. + (-[WebHTMLView setMarkedText:selectedRange:]): Ditto. + (-[WebHTMLView insertText:]): Ditto. + (-[WebTextCompleteController _insertMatch:]): Ditto. + (-[WebTextCompleteController doCompletion]): Ditto. + (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto. + (-[WebHTMLView string]): Ditto. + (-[WebHTMLView selectedString]): Ditto. + (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto. + (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto. + (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto. + (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto. + (-[WebHTMLView unmarkAllTextMatches]): Ditto. + (-[WebHTMLView rectsForTextMatches]): Ditto. + * WebView/WebRenderNode.mm: + (-[WebRenderNode initWithWebFrameView:]): Ditto. + * WebView/WebResource.mm: + (-[WebResource _stringValue]): Ditto. + + * WebView/WebScriptDebugDelegate.mm: Removed unneeded include. + + * WebView/WebView.mm: + (-[WebView _dashboardRegions]): Use WebFrame instead of bridge. + (-[WebView setProhibitsMainFrameScrolling:]): Ditto. + (-[WebView _setInViewSourceMode:]): Ditto. + (-[WebView _inViewSourceMode]): Ditto. + (-[WebView _executeCoreCommandByName:value:]): Ditto. + (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto. + (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto. + (-[WebView scrollDOMRangeToVisible:]): Ditto. + (-[WebView setSelectedDOMRange:affinity:]): Ditto. + (-[WebView setEditable:]): Ditto. + (-[WebView setTypingStyle:]): Ditto. + (-[WebView typingStyle]): Ditto. + (-[WebView replaceSelectionWithNode:]): Ditto. + (-[WebView replaceSelectionWithText:]): Ditto. + (-[WebView replaceSelectionWithMarkupString:]): Ditto. + (-[WebView replaceSelectionWithArchive:]): Ditto. + (-[WebView _insertNewlineInQuotedContent]): Ditto. + (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto. + +2008-03-12 David Hyatt <hyatt@apple.com> + + Make the zoom factor a float and not a percent. + + Reviewed by antti + + * WebView/WebView.mm: + (-[WebView _setZoomMultiplier:isTextOnly:]): + +2008-03-11 David Hyatt <hyatt@apple.com> + + This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom). + New API is added that is parallel to the text zoom public API. You can get/set a pageSizeMultiplier and you + can zoom the page in, out or reset it to the standard size. + + In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode + and set the common zoom factor. In other words you can't combine text zoom and page zoom. One will always + win. + + Reviewed by Tim H. + + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]): + * WebView/WebDocumentInternal.h: + * WebView/WebHTMLView.mm: + (-[WebHTMLView viewDidMoveToSuperview]): + * WebView/WebPDFView.h: + * WebView/WebPDFView.mm: + (-[WebPDFView _zoomOut:]): + (-[WebPDFView _zoomIn:]): + (-[WebPDFView _resetZoom:]): + (-[WebPDFView _canZoomOut]): + (-[WebPDFView _canZoomIn]): + (-[WebPDFView _canResetZoom]): + * WebView/WebView.mm: + (-[WebViewPrivate init]): + (-[WebView setTextSizeMultiplier:]): + (-[WebView textSizeMultiplier]): + (-[WebView _setZoomMultiplier:isTextOnly:]): + (-[WebView _zoomMultiplier:]): + (-[WebView _realZoomMultiplier]): + (-[WebView _realZoomMultiplierIsTextOnly]): + (-[WebView _canZoomOut:]): + (-[WebView _canZoomIn:]): + (-[WebView _zoomOut:isTextOnly:]): + (-[WebView _zoomIn:isTextOnly:]): + (-[WebView _canResetZoom:]): + (-[WebView _resetZoom:isTextOnly:]): + (-[WebView canMakeTextSmaller]): + (-[WebView makeTextSmaller:]): + (-[WebView canMakeTextLarger]): + (-[WebView makeTextLarger:]): + (-[WebView canMakeTextStandardSize]): + (-[WebView makeTextStandardSize:]): + (-[WebView setPageSizeMultiplier:]): + (-[WebView pageSizeMultiplier]): + (-[WebView canZoomPageIn]): + (-[WebView zoomPageIn:]): + (-[WebView canZoomPageOut]): + (-[WebView zoomPageOut:]): + (-[WebView canResetPageZoom]): + (-[WebView resetPageZoom:]): + (-[WebView _searchWithSpotlightFromMenu:]): + * WebView/WebViewInternal.h: + * WebView/WebViewPrivate.h: + +2008-03-12 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler and Sam Weinig. + + - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and + WKGetNSFontATSUFontId Tiger-only. + +2008-03-12 Darin Adler <darin@apple.com> + + - fix http://bugs.webkit.org/show_bug.cgi?id=17794 + REGRESSION (r30980): 23 tests hanging on the Mac buildbot + + * WebView/WebFrame.mm: + (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set + up pointer from the bridge to the frame. (My next check-in removes the bridge + entirely, but we need this until then.) + +2008-03-11 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - remove all bridge-related things from WebCore except the bridge itself + + * DOM/WebDOMOperations.mm: + (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method. + + * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include. + + * Plugins/WebPluginController.mm: Ditto. + + * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the + init and close methods. Added a setWebFrame: method. + + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge setWebFrame:]): Added. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion. + (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the + bridge here. Soon we will be able to remove this entirely! + (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved + into WebFrame from the bridge. + + * WebView/WebFrame.mm: + (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's + now owned by the frame. + (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script + debugger under GC without this! + (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to + use WebFrameLoaderClient instead of the bridge. + (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added. + This is code that used to live in the bridge's init function. + (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto. + (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto. + (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since + the WebView is now the bridge's owner. + (-[WebFrame _updateBackground]): Changed this one call site that was calling the + WebCore::Frame::bridge function directly to use the kit function instead. + (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge. + This code won't last long -- we're eliminating the bridge soon. + (-[WebFrame finalize]): Ditto. + + * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods + for creating frames. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use + the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom + where we have to allocate a WebFrameBridge and then immediately release it. + +2008-03-11 Darin Adler <darin@apple.com> + + Reviewed by Anders. + + - remove code depending on the bridge to get from an NSView to a WebCore::Frame + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call + to setView. A couple lines later, there is a call to _install, which sets the + view to the scroll view. + + * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method. + + * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of + this file, since it's used by Safari. + * WebView/WebDynamicScrollBarsViewInternal.h: Added. + * WebView/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): Ditto. + (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto. + (-[WebDynamicScrollBarsView allowsScrolling]): Ditto. + (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto. + (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto. + (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto. + (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto. + (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto. + (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto. + (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto. + (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto. + (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto. + (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto. + (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto. + (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto. + + * WebView/WebFrameView.mm: + (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method. + + * WebView/WebView.mm: + (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h. + (-[WebView alwaysShowVerticalScroller]): Ditto. + (-[WebView setAlwaysShowHorizontalScroller:]): Ditto. + (-[WebView alwaysShowHorizontalScroller]): Ditto. + +2008-03-11 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore + + * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace + bridge methods. + * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS + to recently-created functions. + (WebChromeClient::firstResponder): Moved code here from the bridge. + (WebChromeClient::makeFirstResponder): Ditto. + (WebChromeClient::runOpenPanel): Ditto. + (WebChromeClient::willPopUpMenu): Ditto. + + * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left + is related to creating the bridge and connecting it to WebCore, which will + go next when I eliminate use of the bridge to get to/from the Frame*. + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge close]): Moved the code to track the bridge count here + instead of the dealloc and finalize methods. + +2008-03-11 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - update code affected by Range changes + + * Misc/WebNSAttributedStringExtras.mm: + (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes. + * WebView/WebHTMLRepresentation.mm: + (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): + Use Range::create. + * WebView/WebHTMLView.mm: + (-[WebHTMLView attributedString]): Ditto. + +2008-03-10 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - eliminate keyboard UI mode method from WebCoreFrameBridge + + * WebCoreSupport/WebChromeClient.h: Added keyboardUIMode function. + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::keyboardUIMode): Ditto. Calls WebView. + * WebCoreSupport/WebFrameBridge.h: Removed unused things, including the + fields for keyboard UI mode. + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge dealloc]): Removed unneeded code; eliminated the fini + method. + (-[WebFrameBridge finalize]): Ditto. + * WebView/WebView.mm: Moved the keyboard mode code in here. + (-[WebView _close]): Remove observer from the distributed notification + center as well as the normal one. + (-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved + here from the bridge. + (-[WebView _keyboardUIMode]): Ditto. + * WebView/WebViewInternal.h: Added _keyboardUIMode method. + +2008-03-10 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - eliminate Java applet methods from WebCoreFrameBridge + + * WebCoreSupport/WebChromeClient.mm: Removed unneeded headers and declarations. + * WebCoreSupport/WebFrameBridge.mm: Ditto. Also removed unneeded methods, including + the ones that load Java applets. + * WebCoreSupport/WebFrameLoaderClient.h: Added javaApplet function. + * WebCoreSupport/WebFrameLoaderClient.mm: Ditto. + +2008-03-07 Simon Hausmann <hausmann@webkit.org> + + Reviewed by Darin Adler. + + Done with Lars. + + Simplified WebViewFactory's refreshPlugins method to only refresh the + plugins and not reload the frames anymore since that's now done in a + platform independent manner by WebCore::Page. + + Also removed the now unused pluginNameForMIMEType and + pluginSupportsMIMEType methods. + + * WebCoreSupport/WebViewFactory.mm: + * WebView/WebFrame.mm: + * WebView/WebFrameInternal.h: + * WebView/WebView.mm: + +2008-03-08 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Fix 64-bit build with GCC 4.2. + + * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required. + * DefaultDelegates/WebDefaultUIDelegate.m: Ditto. + * History/WebHistoryItem.mm: Ditto. + * Misc/WebElementDictionary.mm: Ditto. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the + variable being unused in 64-bit. + * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required. + * WebView/WebHTMLView.mm: + (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required. + (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required. + +2008-03-08 Darin Adler <darin@apple.com> + + Reviewed by Adele. + + - eliminate custom highlight methods from WebCoreFrameBridge + + * WebCoreSupport/WebChromeClient.h: Added custom highlight functions. + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::customHighlightRect): Moved code here from bridge. + (WebChromeClient::paintCustomHighlight): Ditto. + * WebCoreSupport/WebFrameBridge.mm: Removed code here. + +2008-03-07 David D. Kilzer <ddkilzer@apple.com> + + Unify concept of enabling Netscape Plug-in API (NPAPI). + + Reviewed by Darin Adler. + + * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView. + + * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use + ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h. + + * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with + #if ENABLE(NETSCAPE_PLUGIN_API). + * Plugins/WebBaseNetscapePluginStream.mm: Ditto. + * Plugins/WebBaseNetscapePluginView.h: Ditto. + * Plugins/WebBaseNetscapePluginView.mm: Ditto. + * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto. + * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto. + * Plugins/WebBasePluginPackage.h: Ditto. + * Plugins/WebBasePluginPackage.m: Ditto. + (+[WebBasePluginPackage pluginWithPath:]): + * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto. + * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto. + * Plugins/WebNetscapePluginEmbeddedView.h: Ditto. + * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto. + * Plugins/WebNetscapePluginPackage.h: Ditto. + * Plugins/WebNetscapePluginPackage.m: Ditto. + * Plugins/WebNetscapePluginStream.h: Ditto. + * Plugins/WebNetscapePluginStream.mm: Ditto. + * Plugins/WebPluginDatabase.m: Ditto. + (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): + * Plugins/npapi.m: Ditto. + * WebCoreSupport/WebFrameLoaderClient.mm: Ditto. + (WebFrameLoaderClient::objectContentType): + (WebFrameLoaderClient::createPlugin): + * WebView/WebHTMLView.mm: Ditto. + (-[NSArray _web_makePluginViewsPerformSelector:withObject:]): + * WebView/WebHTMLViewInternal.h: Ditto. + + * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with + #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate) + category to (WebInternal) category so we don't expose the ENABLE() macro + from the private header. + (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): + (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): + * WebView/WebFrameInternal.h: Ditto. + * WebView/WebFramePrivate.h: Ditto. + +2008-03-07 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/5579292> REGRESSION: (safari 2-3): "Default default" encoding for Korean + changed from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites + + * WebView/WebPreferences.m: + (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Make encoding name match + the one used in Safari. + +2008-03-07 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Fix WebKit build with GCC 4.2. + + * Plugins/WebBaseNetscapePluginView.mm: Use the correct return type in method signature. + +2008-03-07 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - eliminated WebCoreFrameBridge runOpenPanel + + * WebCoreSupport/WebChromeClient.h: Added runOpenPanel. + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::runOpenPanel): Added. + (-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the + FileChooser so it can get a result from the UI delegate. + (-[WebOpenPanelResultListener dealloc]): Added. + (-[WebOpenPanelResultListener finalize]): Added. + (-[WebOpenPanelResultListener cancel]): Added. + (-[WebOpenPanelResultListener chooseFilename:]): Added. + +2008-03-06 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix regression test failures from the visited-link change + + * History/WebHistory.mm: + (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks + to turn off visited links if there is no history object. Also call + removeAllVisitedLinks so we can start over from scratch with the new history. + +2008-03-06 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix a regression from r30741: a crash under + WebFrameLoaderClient::createPlugin() when showing a Mail message with + an attachment + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::createPlugin): + +2008-03-06 Darin Adler <darin@apple.com> + + - fix Tiger build + + * History/WebHistory.mm: Added include of WebTypesInternal.h. + +2008-03-06 Darin Adler <darin@apple.com> + + - fix Release build + + * History/WebHistory.mm: + (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]): Removed underscore. + (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): Added #if. + (-[WebHistoryPrivate saveToURL:error:]): Ditto. + +2008-03-06 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix http://bugs.webkit.org/show_bug.cgi?id=17526 + REGRESSION: iframes are added to Safari's History menu + by separating the visited link machinery from global history + + * History/WebHistory.mm: Moved WebHistoryPrivate inside this file. + (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this + method name, since it's on a private object. + (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the + PageGroup::removeAllVisitedLinks function if the last URL was removed. + (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this + method name, since it's on a private object. + (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks. + (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this + method name, since it's on a private object. + (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): + Ditto. + (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this + to correctly return the error by using the newer version of writeToURL: and + removed the FIXME about that. + (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink + for every link in the history. + (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now. + (-[WebHistory addItem:]): Moved into the WebPrivate category. + (-[WebHistory addItemForURL:]): Ditto. + (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we + create an item and already know its title. + (-[WebHistory ageLimitDate]): Moved into the WebPrivate category. + (-[WebHistory containsItemForURLString:]): Ditto. + (-[WebHistory removeItem:]): Ditto. + (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto. + (-[WebHistory _itemForURLString:]): Ditto. + (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit. + + * History/WebHistoryInternal.h: Added. + * History/WebHistoryItemInternal.h: Tweaked formatting and includes. + * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header. + Also reorganized what was left behind. + + * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks. + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::populateVisitedLinks): Added a call to the new + -[WebHistory _addVisitedLinksToPageGroup:] method. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new + -[WebHistory _addItemForURL:title:] method. + +2008-03-05 Adam Roben <aroben@apple.com> + + Rename WebCoreScriptDebuggerImp.{h,mm} to WebScriptDebugger.{h,mm} + + Reviewed by Kevin M. + + * WebView/WebFrame.mm: + * WebView/WebScriptDebugDelegate.mm: + * WebView/WebScriptDebugger.h: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.h. + * WebView/WebScriptDebugger.mm: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.mm. + +2008-03-05 Adam Roben <aroben@apple.com> + + Rename WebCoreScriptDebuggerImp to WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.h: + * WebView/WebCoreScriptDebuggerImp.mm: + * WebView/WebFrame.mm: + (-[WebFrame _attachScriptDebugger]): + * WebView/WebFrameInternal.h: + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove WebScriptDebugger + + Uses of WebScriptDebugger have been replaced with + WebCoreScriptDebuggerImp. + + Reviewed by Kevin M. + + * WebView/WebFrame.mm: + (-[WebFramePrivate dealloc]): Use delete instead of release since + WebCoreScriptDebuggerImp is a C++ class. + (-[WebFrame _attachScriptDebugger]): Updated to use early returns and + WebCoreScriptDebuggerImp. + (-[WebFrame _detachScriptDebugger]): Ditto. + * WebView/WebFrameInternal.h: + * WebView/WebScriptDebugDelegate.mm: Removed WebScriptDebugger + * WebView/WebScriptDebugDelegatePrivate.h: Removed. + * WebView/WebView.mm: + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove -webFrame and -globalObject from WebScriptDebugger + + WebCoreScriptDebuggerImp is now unaware of WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.h: Removed WebScriptDebugger* + parameter to the constructor. + * WebView/WebCoreScriptDebuggerImp.mm: + (toWebFrame): Added. + (WebCoreScriptDebuggerImp::sourceParsed): Call toWebFrame. + (WebCoreScriptDebuggerImp::callEvent): Ditto, and get the Frame's + WindowScriptObject ourselves instead of asking WebScriptDebugger for + it. + (WebCoreScriptDebuggerImp::atStatement): Call toWebFrame. + (WebCoreScriptDebuggerImp::returnEvent): Ditto. + (WebCoreScriptDebuggerImp::exception): Ditto. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptDebugger initWithWebFrame:]): Updated for change to + WebScriptDebuggerImp's constructor. + * WebView/WebScriptDebugDelegatePrivate.h: Removed + -webFrame/-globalObject. + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove -enterFrame: and -leaveFrame from WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.h: Changed to store m_topCallFrame + in a RetainPtr, now that WebCoreScriptDebuggerImp is in charge of its + lifetime. + * WebView/WebCoreScriptDebuggerImp.mm: + - Added declaration of -[WebScriptCallFrame + _initWithGlobalObject:caller:state:]. + - Changed most uses of m_topCallFrame to m_topCallFrame.get() + (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed + now-unnecessary initialization of m_topCallFrame. + (WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame: + with its implementation. The one difference between this + implementation and the old enterFrame: method is that we don't hand + our reference to m_topCallFrame to _initWithGlobalObject: -- that + method must now retain the passed-in WebScriptCallFrame manually. + (WebCoreScriptDebuggerImp::atStatement): + (WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame + with its implementation. + (WebCoreScriptDebuggerImp::exception): + * WebView/WebScriptDebugDelegate.mm: Removed declaration of + -[WebScriptCallFrame _initWithGlobalObject:caller:state:]. + (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Changed + to retain the passed-in caller. + * WebView/WebScriptDebugDelegatePrivate.h: + - Removed _current ivar + - Removed enterFrame:/leaveFrame declarations. + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove -parsedSource: from WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.mm: + (WebCoreScriptDebuggerImp::sourceParsed): Moved code here from + -[WebScriptDebugger parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:] + * WebView/WebScriptDebugDelegate.mm: Removed -parsedSource:. + * WebView/WebScriptDebugDelegatePrivate.h: Ditto. + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove -enteredFrame:, -leavingFrame:, and -exceptionRaised: from WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.mm: + (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Changed to call + trhough to callEvent instead of duplicating its code here. + (WebCoreScriptDebuggerImp::callEvent): Moved code from + -[WebScriptDebugger enteredFrame:sourceId:line:] here. + (WebCoreScriptDebuggerImp::returnEvent): Moved code from + -[WebScriptDebugger leavingFrame:sourceId:line:] here. + (WebCoreScriptDebuggerImp::exception): Moved code from + -[WebScriptDebugger exceptionRaised:sourceId:line:] here. + * WebView/WebScriptDebugDelegate.mm: Removed -enteredFrame:, + -leavingFrame:, and -exceptionRaised:. + * WebView/WebScriptDebugDelegatePrivate.h: Ditto. + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove -[WebScriptDebugger hitStatement:sourceId:line:] + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebuggerImp.mm: + (WebCoreScriptDebuggerImp::atStatement): Moved code here from + -[WebScriptDebugger hitStatement:sourceId:line:]. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptDebugger webFrame]): Added. + * WebView/WebScriptDebugDelegatePrivate.h: + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove WebCoreScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebugger.h: Removed. + * WebView/WebCoreScriptDebugger.mm: Removed. + * WebView/WebCoreScriptDebuggerImp.h: Replaced WebCoreScriptDebugger + with WebScriptDebugger. + * WebView/WebCoreScriptDebuggerImp.mm: Ditto, and replaced [m_debugger + delegate] with just m_debugger. + (toNSString): Moved here from WebCoreScriptDebugger.mm. + (toNSURL): Ditto. + (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): + (WebCoreScriptDebuggerImp::sourceParsed): + (WebCoreScriptDebuggerImp::callEvent): + (WebCoreScriptDebuggerImp::atStatement): + (WebCoreScriptDebuggerImp::returnEvent): + (WebCoreScriptDebuggerImp::exception): + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptDebugger initWithWebFrame:]): _debugger now holds a + WebCoreScriptDebuggerImp, so initialize it properly. + * WebView/WebScriptDebugDelegatePrivate.h: Changed _debugger to hold a + WebCoreScriptDebuggerImp. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move WebCoreScriptDebuggerImp to its own source files + + Also changed WebCoreScriptDebuggerImp coding style to match our style + guidelines. + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebugger.h: Added declaration of toNSURL + function. + * WebView/WebCoreScriptDebugger.mm: Removed WebCoreScriptDebuggerImp + implementation. + (toNSURL): Made no longer static. + * WebView/WebCoreScriptDebuggerImp.h: Added. + * WebView/WebCoreScriptDebuggerImp.mm: Added. Code was moved here from + WebCoreScriptDebugger.mm and cleaned up. + (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): + (WebCoreScriptDebuggerImp::sourceParsed): + (WebCoreScriptDebuggerImp::callEvent): + (WebCoreScriptDebuggerImp::atStatement): + (WebCoreScriptDebuggerImp::returnEvent): + (WebCoreScriptDebuggerImp::exception): + +2008-03-05 Adam Roben <aroben@apple.com> + + Move -_enterFrame and -_leaveFrame from WebCoreScriptDebugger to WebScriptDebugger + + Reviewed by Kevin M. + + * WebView/WebCoreScriptDebugger.h: + - Removed newFrameWithGlobalObject:caller:state: from + WebScriptDebugger protocol + - Added enterFrame: and leaveFrame: to WebScriptDebugger protocol + - Removed _current ivar from WebCoreScriptDebugger + * WebView/WebCoreScriptDebugger.mm: + (WebCoreScriptDebuggerImp::callEvent): Changed to call enterFrame on + the delegate. + (WebCoreScriptDebuggerImp::returnEvent): Ditto for leaveFrame. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptDebugger dealloc]): Added code to release _current. + (-[WebScriptDebugger enterFrame:]): Added. Code came from + WebCoreScriptDebugger. + (-[WebScriptDebugger leaveFrame]): Ditto. + * WebView/WebScriptDebugDelegatePrivate.h: Added _current ivar. + +2008-03-05 Adam Roben <aroben@apple.com> + + Remove WebCoreScriptCallFrame + + Reviewed by Tim. + + * WebView/WebCoreScriptDebugger.h: + - Replaced WebCoreScriptCallFrame with WebScriptCallFrame + - Replaced -newWrapperForFrame: with + -newFrameWithGlobalObject:caller:state: + - Removed WebCoreScriptCallFrame interface. + * WebView/WebCoreScriptDebugger.mm: Replaced WebCoreScriptCallFrame + with WebScriptCallFrame. + (-[WebCoreScriptDebugger _enterFrame:]): Changed to call + -newFrameWithGlobalObject:caller:state. + (-[WebCoreScriptDebugger _leaveFrame]): + * WebView/WebScriptDebugDelegate.h: Changed WebScriptCallFrame's + _private ivar to be of type WebScriptCallFramePrivate*. + * WebView/WebScriptDebugDelegate.mm: + - Replaced WebCoreScriptCallFrame with WebScriptCallFrame + - Added WebScriptCallFramePrivate + (-[WebScriptDebugger enteredFrame:sourceId:line:]): + (-[WebScriptDebugger hitStatement:sourceId:line:]): + (-[WebScriptDebugger leavingFrame:sourceId:line:]): + (-[WebScriptDebugger exceptionRaised:sourceId:line:]): + (-[WebScriptCallFramePrivate dealloc]): Added. + (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Added. + Code came from WebCoreScriptCallFrame. + (-[WebScriptCallFrame dealloc]): Added a call to release the _private + ivar. + (-[WebScriptCallFrame _convertValueToObjcValue:]): Replaced calls to + _private with direct access of _private's ivars. + (-[WebScriptCallFrame caller]): Ditto. + (-[WebScriptCallFrame scopeChain]): Ditto. + (-[WebScriptCallFrame evaluateWebScript:]): Ditto. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move -_convertValueToObjcValue to WebScriptCallFrame + + Reviewed by Darin Adler. + + * WebView/WebCoreScriptDebugger.h: Removed declaration of + -_convertValueToObjcValue. + * WebView/WebCoreScriptDebugger.mm: Removed -_convertValueToObjcValue. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame _convertValueToObjcValue:]): Added. Code came + from -[WebCoreScriptCallFrame _convertValueToObjcValue]. + (-[WebScriptCallFrame scopeChain]): Changed to call + -_convertValueToObjcValue on self instead of _private. + (-[WebScriptCallFrame exception]): Ditto. + (-[WebScriptCallFrame evaluateWebScript:]): Ditto. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move -exception and -evaluateWebScript: to WebScriptCallFrame + + Reviewed by Darin Adler. + + * WebView/WebCoreScriptDebugger.h: Removed declarations of -exception + and -evaluateWebScript:. + * WebView/WebCoreScriptDebugger.mm: Removed -exception and + -evaluateWebScript:. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame exception]): Added. Code came from + -[WebCoreScriptCallFrame exception]. + (-[WebScriptCallFrame evaluateWebScript:]): Added. Code came from + -[WebCoreScriptCallFrame evaluateWebScript:]. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move -scopeChain to WebScriptCallFrame + + Reviewed by Darin Adler. + + * WebView/WebCoreScriptDebugger.h: + - Added declarations of -globalObject and -_convertValueToObjcValue: + to WebCoreScriptCallFrame + - Removed declaration of -scopeChain. + * WebView/WebCoreScriptDebugger.mm: Moved -_convertValueToObjcValue + within the main WebCoreScriptCallFrame implementation. + (-[WebCoreScriptCallFrame globalObject]): Added. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame scopeChain]): Added. Code came from + -[WebCoreScriptCallFrame scopeChain]. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move -functionName from WebCoreScriptCallFrame to WebScriptCallFrame + + Reviewed by Darin Adler. + + * WebView/WebCoreScriptDebugger.h: + - Removed #else case of #ifdef __cplusplus since this file is only + ever used by C++ Objective-C files + - Removed 'using KJS::ExecState' statement since we prefer not to + have using statements in header files + - Consequently prefixed uses of ExecState with KJS:: + - Added declaration of toNSString method that takes a const + UString& + - Added declaration of -[WebCoreScriptCallFrame state] + - Removed declaration of -[WebCoreScriptCallFrame functionName] + * WebView/WebCoreScriptDebugger.mm: + (toNSString): Made this no longer static. + (-[WebCoreScriptCallFrame state]): Added. + * WebView/WebScriptDebugDelegate.mm: + (-[WebScriptCallFrame functionName]): Added. Code came from + -[WebCoreScriptCallFrame functionName], though I changed some nested + ifs into early returns. + +2008-03-05 Adam Roben <aroben@apple.com> + + Move WebCoreScriptDebugger to WebKit + + Reviewed by Darin Adler. + + * WebView/WebCoreScriptDebugger.h: Renamed from WebCore/page/mac/WebCoreScriptDebugger.h. + * WebView/WebCoreScriptDebugger.mm: Renamed from WebCore/page/mac/WebCoreScriptDebugger.mm. + (toNSString): + (toNSURL): + (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): + (WebCoreScriptDebuggerImp::sourceParsed): + (WebCoreScriptDebuggerImp::callEvent): + (WebCoreScriptDebuggerImp::atStatement): + (WebCoreScriptDebuggerImp::returnEvent): + (WebCoreScriptDebuggerImp::exception): + (+[WebCoreScriptDebugger initialize]): + (-[WebCoreScriptDebugger initWithDelegate:]): + (-[WebCoreScriptDebugger dealloc]): + (-[WebCoreScriptDebugger finalize]): + (-[WebCoreScriptDebugger delegate]): + (-[WebCoreScriptDebugger _enterFrame:]): + (-[WebCoreScriptDebugger _leaveFrame]): + (-[WebCoreScriptCallFrame _initWithGlobalObject:caller:state:]): + (-[WebCoreScriptCallFrame _setWrapper:]): + (-[WebCoreScriptCallFrame _convertValueToObjcValue:]): + (-[WebCoreScriptCallFrame dealloc]): + (-[WebCoreScriptCallFrame wrapper]): + (-[WebCoreScriptCallFrame caller]): + (-[WebCoreScriptCallFrame scopeChain]): + (-[WebCoreScriptCallFrame functionName]): + (-[WebCoreScriptCallFrame exception]): + (-[WebCoreScriptCallFrame evaluateWebScript:]): + * WebView/WebScriptDebugDelegate.mm: Updated header path. + * WebView/WebScriptDebugDelegatePrivate.h: Ditto. + +2008-03-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Geoff. + + Include file changes. + + * Plugins/WebBaseNetscapePluginView.mm: + * Plugins/WebNetscapePluginPackage.m: + +2008-03-04 Timothy Hatcher <timothy@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5720160> Browser windows "do nothing" while modal + dialog or menu is up due to run loop modes (or while scrolling) + + Add new API that lets a WebView be scheduled with multiple runloops and modes. + This lets loading continue when in a nested runloop or in a different mode. + + * Misc/WebKitVersionChecks.h: Add a new version define: + WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES. + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Schedule in the main runloop and with + the default runloop mode if we are linked on an earlier WebKit version, use common modes otherwise. + (-[WebView scheduleInRunLoop:forMode:]): New API, that calls through to Page. + (-[WebView unscheduleFromRunLoop:forMode:]): Ditto. + * WebView/WebViewPrivate.h: Add the new pending API methods. + +2008-03-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix crash that happens when trying to load a page with a Java applet. + + * WebCoreSupport/WebFrameLoaderClient.mm: + Don't release the names and values array - the kit method returns an autoreleased array. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - fix 200+ failing regression tests + - fix http://bugs.webkit.org/show_bug.cgi?id=17668 + Vertical scrollbar at slashdot.org is randomly not shown + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Changed the refcounting + code here to exactly match the way it was before it was moved from WebCore. I had + introduced a storage leak and that was causing problems with scroll bars! + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - remove WebCoreFrameBridge reapplyStyles method + + * WebView/WebHTMLView.mm: + (-[WebHTMLView reapplyStyles]): Moved code to reapply styles here from the bridge. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - eliminate WebCoreFrameBridge createFrameViewWithNSView + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): + Moved code here from createFrameViewWithNSView. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - removed WebCoreFrameBridge scrollOverflowInDirection + + * WebView/WebFrameView.mm: + (-[WebFrameView _scrollOverflowInDirection:granularity:]): Changed to call + EventHandler directly instead of using the bridge. + (-[WebFrameView scrollToBeginningOfDocument:]): Updated to use WebCore enums instead + of the ones from the bridge. + (-[WebFrameView scrollToEndOfDocument:]): Ditto. + (-[WebFrameView _pageVertically:]): Ditto. + (-[WebFrameView _pageHorizontally:]): Ditto. + (-[WebFrameView _scrollLineVertically:]): Ditto. + (-[WebFrameView _scrollLineHorizontally:]): Ditto. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - remove WebCoreFrameBridge installInFrame: method + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::transitionToCommittedForNewPage): Call + -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:]. + * WebView/WebFrameView.mm: + (-[WebFrameView _install]): Added. Has code from -[WebCoreFrameBridge installInFrame:]. + (-[WebFrameView _setCustomScrollViewClass:]): Used early return idiom so the entire + method isn't nested inside an if statement. Call + -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:]. + * WebView/WebFrameViewInternal.h: Added declaration of _install method so it can be + used in WebFrameLoaderClient.mm. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - remove WebCoreFrameBridge window method + + * WebCoreSupport/WebFrameBridge.mm: Removed window method. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - move code from WebFrameBridge into WebFrameLoaderClient + + * WebCoreSupport/WebFrameBridge.h: Removed unused fields, changed frame name parameters + to use WebCore::String instead of NSString, add initSubframeWithOwnerElement declaration, + removed viewForPluginWithFrame, viewForJavaAppletWithFrame, createChildFrameNamed, + redirectDataToPlugin, determineObjectFromMIMEType, and windowObjectCleared methods. + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]): + Changed to use WebCore::String. + (-[WebFrameBridge initMainFrameWithPage:frameName:WebCore::frameView:]): Ditto. + (-[WebFrameBridge initSubframeWithOwnerElement:frameName:WebCore::frameView:]): Ditto. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::setOriginalURLForDownload): Removed some dead code I found here + and added a FIXME. + (WebFrameLoaderClient::createFrame): Moved the code from WebFrameBridge here. + (WebFrameLoaderClient::objectContentType): Ditto. + (parameterValue): Added. Helper function, based on code originally in WebFrameBridge. + (pluginView): Ditto. + (WebFrameLoaderClient::createPlugin): Moved the code from WebFrameBridge here. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - remove -[WebCoreFrameBridge dashboardRegionsChanged:] + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::dashboardRegionsChanged): Moved code here from the bridge. + The WebCore side now calls this only when there's an actual change. + * WebCoreSupport/WebFrameBridge.h: Removed lastDashboardRegions. + * WebCoreSupport/WebFrameBridge.mm: + (-[WebFrameBridge dealloc]): Removed code to release lastDashboardRegions. + Removed _compareDashboardRegions: and dashboardRegionsChanged: methods. + +2008-03-04 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - remove WebCoreFrameBridge issuePasteComand method + + * WebCoreSupport/WebFrameBridge.mm: Removed issuePasteCommand method. + * WebView/WebHTMLViewInternal.h: Removed declaration of paste: method. + +2008-03-03 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + - some "cleanup" on the path to removing WebCoreFrameBridge + + * Storage/WebDatabaseManager.mm: Tweak includes. + * Storage/WebDatabaseTrackerClient.mm: Ditto. + * Storage/WebSecurityOrigin.mm: Ditto. + * Storage/WebSecurityOriginInternal.h: Ditto. + + * WebView/WebFrame.mm: + (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly + match WebCore::EditableLinkBehavior. + * WebView/WebFrameInternal.h: Removed unused kit function. + + * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here. + * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here. + * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations. + + * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment. + +2008-03-01 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Update Xcode configuration to support building debug and release from the mysterious future. + + * Configurations/DebugRelease.xcconfig: + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Replace use of WKPathFromFont with implementation in terms of public API. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Remove unused symbol. + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Fix spelling of "request" in name of WKNSURLProtocolClassForRequest. + + * Misc/WebNSURLExtras.mm: + (-[NSURL _webkit_canonicalize]): + * WebKit.order: + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Remove obsolete code that had been left intact to support users running WebKit with older versions of Safari. + + * Misc/WebNSViewExtras.m: Remove _web_superviewOfClass:stoppingAtClass:. + * Misc/WebNSWindowExtras.m: Remove _webkit_displayThrottledWindows. + * Misc/WebSearchableTextView.m: Remove selectionImageForcingWhiteText:. + * WebCoreSupport/WebImageRendererFactory.m: Update comment to mention the last version of Safari that + requires this class. + * WebInspector/WebInspector.mm: Remove sharedWebInspector and update comments to mention the last version + of Safari that calls other obsolete methods. + * WebView/WebDocumentPrivate.h: Remove selectionImageForcingWhiteText:. + * WebView/WebHTMLView.mm: Ditto. + * WebView/WebPDFView.mm: Ditto. + * WebView/WebView.mm: Update comment to mentoin the last version of Safari that requires the obsolete method. + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Eric Seidel. + + Remove unneeded includes of WebKitSystemInterface.h. + + * History/WebHistoryItem.mm: + * Misc/WebNSViewExtras.m: + * WebCoreSupport/WebFrameLoaderClient.mm: + * WebView/WebDataSource.mm: + * WebView/WebPDFView.mm: + +2008-02-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt and Oliver Hunt. + + <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Remove unused symbol. + * WebKit.order: Ditto. + +2008-02-28 Mark Rowe <mrowe@apple.com> + + Reviewed by Dave Hyatt. + + Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Only initialize wkGetFontMetrics on Tiger. + +2008-02-27 Brady Eidson <beidson@apple.com> + + Reviewed by Mark Rowe (code) and Darin (concept) + + Much better fix for <rdar://problem/4930688> (see r19549) + Original fix for <rdar://problem/3947312> (and 14 dupes) + + Let me tell you a story: + A long time ago, in a cvs repository far, far away, loader code was almost all up in WebKit. + WebArchive code was intertwined with that code in bizarre and complex ways. + During the months long loader re-factoring where we pushed much loader code down into WebCore, + many portions of the WebKit loader were thinned out until they ceased to exist. Others remained + with a sole purpose. + + One such section of code whose lineage traces back from WebFrameLoaderClient to WebFrameLoader + to WebLoader was originally rooted in the method [WebLoader loadRequest:]. This method was the + single entry point for almost all loading (network or web archives) + + This method would check various headers and other fields on the NSURLRequest and NSURLResponse + to make decisions about the load. If the cache control fields were expired or other conditions + in the headers were met, the load would be forced to go out to the network. + + As the loader was moved and tweaked repeatedly, most of this code was pruned or re-factored. + At some point, all that remained was the special cases for loading WebArchives. + + Somewhere in the r16,000s, this remaining responsibility was noticed and related methods we renamed + to be WebArchive specific, further cementing the assumed design. + + Problem is, the design was bad. A WebArchive is meant to be a static snapshot of a WebPage at a + specific point in time. Referring to the request to see if the resource should be reloaded seems + nonsensical, as does referring to the response headers to see if the resource is "expired". In the + context of loading a WebArchive, available data should *always* be loaded from the WebArchive, at least + during the initial load! + + After discovering the secret to reproducing all of these bugs is both emptying our your Foundation + cache and disconnecting your network, it was easy to reproduce the 16 individually reported cases + that were all symptoms of this bug, and easy to verify that they are fixed with this patch. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::willUseArchive): Do not call either form of "canUseArchivedResource()" that + inspect the request or response objects - We are loading from a WebArchive, and we should never + make the decision to go out to the network when we actually have the resource available. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): Remove two methods that are no longer used anywhere in WebKit + +2008-02-27 Matt Lilek <webkit@mattlilek.com> + + Reviewed by Adam Roben. + + Bug 14348: Messing up the inspector by dragging an URL into it + http://bugs.webkit.org/show_bug.cgi?id=14348 + <rdar://problem/5283620> and <rdar://problem/5712808> + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController init]): Remove duplicate preference setting. + (-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]): + +2008-02-25 Darin Adler <darin@apple.com> + + Reviewed by Adam. + + * WebView/WebArchiver.mm: + (+[WebArchiver archiveSelectionInFrame:]): Use blankURL. + * WebView/WebFrame.mm: + (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Avoid the + variable name URL to avoid clashing with the renamed KURL in the future. Also use + blankURL. + (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Ditto. + (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]): Ditto. + (-[WebFrame loadHTMLString:baseURL:]): Ditto. + (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto. + +2008-02-24 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + - remove separate client calls for "standard" and "reload' history + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::updateGlobalHistory): + +2008-02-23 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Move basic threading support from WebCore to WTF. + + * ForwardingHeaders/wtf/Threading.h: Added. + * ForwardingHeaders/wtf/Locker.h: Added. + +2008-02-23 David Kilzer <ddkilzer@apple.com> + + Please clarify licensing for some files + <http://bugs.webkit.org/show_bug.cgi?id=14970> + + Reviewed by Darin Adler. + + * Plugins/WebNetscapeDeprecatedFunctions.c: Updated copyright statement + and added Apple BSD-style license. + * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto. + +2008-02-22 John Sullivan <sullivan@apple.com> + + Reviewed by Adam Roben + + Reverted the changed from yesterday to add pasteAndMatchStyle:, as the existing + pasteAsPlainText: has the same behavior. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): + (-[WebHTMLView readSelectionFromPasteboard:]): + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView pasteAsRichText:]): + (-[WebHTMLView paste:]): + * WebView/WebView.mm: + * WebView/WebViewPrivate.h: + +2008-02-21 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam. + + Use BackForwardList::create instead. + + * History/WebBackForwardList.mm: + (-[WebBackForwardList init]): + +2008-02-21 John Sullivan <sullivan@apple.com> + + Reviewed by Jessica Kahn + + support for pasteAndMatchStyle: command (see <rdar://problem/5723952>) + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:matchStyle:]): + added matchStyle parameter, passed along to bridge (formerly always passed NO to bridge) + (-[WebHTMLView readSelectionFromPasteboard:]): + pass NO for new matchStyle parameter to match old behavior + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + validate pasteAndMatchStyle the same way as pasteAsRichText + (-[WebHTMLView pasteAndMatchStyle:]): + just like pasteAsRichText but passes YES for matchStyle + (-[WebHTMLView pasteAsRichText:]): + pass NO for new matchStyle parameter to match old behavior + (-[WebHTMLView paste:]): + ditto + + * WebView/WebView.mm: + added macro(pasteAndMatchStyle) + + * WebView/WebViewPrivate.h: + added pasteAndMatchStyle: to WebViewEditingActionsPendingPublic category + +2008-02-20 Sam Weinig <sam@webkit.org> + + Reviewed by Darin and Geoff. + + - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Added a call to Settings::setNeedsSiteSpecificQuirks. + There are currently no site-specific quirks on Mac, but we will propagate the state + to WebCore to avoid possible mistakes later. + +2008-02-19 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Move back WebKit methods that were unused in WebCore. + + * Misc/WebNSURLExtras.mm: + (+[NSURL _web_URLWithData:]): + (+[NSURL _web_URLWithData:relativeToURL:]): + (-[NSURL _web_originalData]): + (-[NSURL _web_originalDataAsString]): + (-[NSURL _web_isEmpty]): + (-[NSURL _webkit_canonicalize]): + (-[NSURL _webkit_URLByRemovingComponent:]): + (-[NSURL _webkit_URLByRemovingFragment]): + (-[NSURL _webkit_URLByRemovingResourceSpecifier]): + (-[NSURL _webkit_isFileURL]): + (-[NSString _webkit_isFileURL]): + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::setTitle): + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2008-02-18 Darin Adler <darin@apple.com> + + Reviewed by Sam. + + * Misc/WebNSAttributedStringExtras.mm: + (+[NSAttributedString _web_attributedStringFromRange:]): Eliminate use of + DeprecatedString. + +2008-02-17 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for http://bugs.webkit.org/show_bug.cgi?id=17365 + document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR + + * MigrateHeaders.make: Migrate DOMProgressEvent.h and DOMTextPrivate.h which were + mistakenly not migrated. + +2008-02-15 Dan Bernstein <mitz@apple.com> + + Reviewed by Alexey Proskuryakov. + + - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360 + <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html + + * WebView/WebDataSource.mm: + (+[WebDataSource _representationClassForMIMEType:]): + (-[WebDataSource _responseMIMEType]): + (-[WebDataSource subresources]): + (-[WebDataSource subresourceForURL:]): + * WebView/WebResource.mm: + (-[WebResource _initWithData:URL:response:]): + * WebView/WebResourcePrivate.h: + +2008-02-15 Adam Roben <aroben@apple.com> + + Make WebKit's FEATURE_DEFINES match WebCore's + + Reviewed by Mark. + + * Configurations/WebKit.xcconfig: + +2008-02-14 Darin Adler <darin@apple.com> + + Reviewed by Eric Seidel. + + - updated for WebCore KURL changes + + * History/WebHistoryItem.mm: + (-[WebHistoryItem URL]): Removed getNSURL call. + * Misc/WebElementDictionary.mm: + (-[WebElementDictionary _absoluteImageURL]): Ditto. + (-[WebElementDictionary _absoluteLinkURL]): Ditto. + * Misc/WebNSAttributedStringExtras.mm: + (fileWrapperForElement): Ditto. + (+[NSAttributedString _web_attributedStringFromRange:]): Ditto. + * Misc/WebNSURLExtras.mm: + (-[NSString _webkit_stringByReplacingValidPercentEscapes]): Updated + for function name change. + * WebCoreSupport/WebContextMenuClient.mm: + (WebContextMenuClient::downloadURL): Removed getNSURL call. + * WebCoreSupport/WebDragClient.mm: + (WebDragClient::createDragImageForLink): Ditto. + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Ditto. + (WebFrameLoaderClient::startDownload): Ditto. + (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad): Ditto. + (WebFrameLoaderClient::updateGlobalHistoryForReload): Ditto. + (WebFrameLoaderClient::cancelledError): Ditto. + (WebFrameLoaderClient::blockedError): Ditto. + (WebFrameLoaderClient::cannotShowURLError): Ditto. + (WebFrameLoaderClient::interruptForPolicyChangeError): Ditto. + (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto. + (WebFrameLoaderClient::fileDoesNotExistError): Ditto. + (WebFrameLoaderClient::willUseArchive): Ditto. + (WebFrameLoaderClient::setTitle): Ditto. + (WebFrameLoaderClient::actionDictionary): Ditto. + (WebFrameLoaderClient::createFrame): Ditto. + (WebFrameLoaderClient::objectContentType): Ditto. + (WebFrameLoaderClient::createPlugin): Ditto. + (WebFrameLoaderClient::createJavaAppletWidget): Ditto. + * WebView/WebDataSource.mm: + (-[WebDataSource _URL]): Ditto. + (-[WebDataSource _initWithDocumentLoader:]): Ditto. + (-[WebDataSource unreachableURL]): Ditto. + * WebView/WebHTMLView.mm: + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto. + +2008-02-14 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff. + + Update order files. + + * WebKit.order: + +2008-02-14 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Adam Roben. + + http://bugs.webkit.org/show_bug.cgi?id=17207 + Database example doesn't work (requires not-yet-released Safari) + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage + if it's too old. + +2008-02-11 Darin Adler <darin@apple.com> + + - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders + incorrectly due to visibility fix + + Removed the Xcode-specific quirk at the request of some folks on the Xcode team. + + * Misc/WebKitVersionChecks.h: Removed the constant. + + * WebView/WebView.mm: + (-[WebView _needsXcodeVisibilityQuirk]): Removed. + (-[WebView _preferencesChangedNotification:]): Removed call to + setNeedsXcodeVisibilityQuirk. + +2008-02-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Mitz. + + * WebCoreSupport/WebFrameBridge.mm: + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory imageTitleForFilename:size:]): + Move implementation from WebFrameBridge to WebViewFactory. + +2008-02-11 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders + incorrectly due to visibility fix + + Added an Xcode-specific quirk. + + * Misc/WebKitVersionChecks.h: Added a constant for the "linked on or after" + part of the check. + + * WebView/WebView.mm: + (-[WebView _needsXcodeVisibilityQuirk]): Added. + (-[WebView _preferencesChangedNotification:]): Added a call to + setNeedsXcodeVisibilityQuirk based on _needsXcodeVisibilityQuirk. + +2008-02-10 Darin Adler <darin@apple.com> + + - fix http://bugs.webkit.org/show_bug.cgi?id=17274 + REGRESSION: User Agent string broken in r30119 + + * WebView/WebView.mm: + (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): + Fix wrong variable name. Doh! + +2008-02-09 Darin Adler <darin@apple.com> + + Reviewed by Tim Hatcher. + + - fix <rdar://problem/5725996> crash every time you open the Xcode documentation window + + * WebView/WebView.mm: + (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the + garbage collector's Objective C++ support by not initializing a static to an object + that needs to be marked when running under GC. + +2008-02-05 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - WebKit part of <rdar://problem/5724303> Should implement writing direction shortcuts + + The key bindings are Command-Control-left arrow and + Command-Control-right arrow. To match AppKit, the bindings are enabled + only when certain user defaults are set. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call + Frame::baseWritingDirectionForSelectionStart() and + Editor::setBaseWritingDirection() directly. + (-[WebHTMLView changeBaseWritingDirection:]): Ditto. + (writingDirectionKeyBindingsEnabled): Added. + (-[WebHTMLView _changeBaseWritingDirectionTo:]): Added this helper + method. + (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Added. + (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Added. + * WebView/WebView.mm: + +2008-02-05 Mark Rowe <mrowe@apple.com> + + Unreviewed build fix. + + * WebView/WebView.mm: Add missing #import. + +2008-02-05 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Update versioning to support the mysterious future. + + * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060. + +2008-01-30 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Brought + this back, it's used by Mail. + (-[WebHTMLView _canSmartReplaceWithPasteboard:]): This WebInternal method is + also used by Mail. Moved to WebPrivate. + * WebView/WebHTMLViewPrivate.h: Expose two methods that Mail uses here, so that we don't + accidently remove them in the future. + +2008-01-30 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Move off deprecated NSTableView methods. + + * WebView/WebHTMLView.mm: + (-[WebTextCompleteController _buildUI]): Switch from -setDrawsGrid: to -setGridStyleMask:. + (-[WebTextCompleteController _placePopupWindow:]): Switch from -selectRow:byExtendingSelection: to -selectRowIndexes:byExtendingSelection:. + (-[WebTextCompleteController filterKeyDown:]): Ditto. + +2008-01-26 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Fix leaks seen after loading <http://www.funnyordie.com/videos/d70b5a11cb>. + + * Misc/WebNSDataExtras.m: + (-[NSString _web_capitalizeRFC822HeaderFieldName]): Transfer ownerhip of the allocated buffers + to the new CFString so that they will be freed when no longer needed. + +2008-01-26 Greg Bolsinga <bolsinga@apple.com> + + <rdar://problem/5708388> WebDashboardRegion.h duplicated between WebCore / WebKit + + Reviewed by Darin Adler. + + * WebCoreSupport/WebDashboardRegion.h: Removed. + * WebView/WebView.mm: Updated #import to use copy of WebDashboardRegion.h from WebCore. + +2008-01-21 Darin Adler <darin@apple.com> + + Reviewed by John Sullivan. + + - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases + - add a missing export of WebDatabaseExpectedSizeKey + - implement deleteOrigin: and remove deleteDatabasesWithOrigin: + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Updated to check for a null + name instead of calling isValid(). + (-[WebDatabaseManager deleteOrigin:]): Implemented. + (WebKitInitializeDatabasesIfNecessary): Updated for name change. + + * Storage/WebDatabaseManagerPrivate.h: Removed deleteDatabasesWithOrigin:. + + * WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient. + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::exceededDatabaseQuota): Replaced the two different client functions + we had before with a single one. + + * WebKit.exp: Added missing export for WebDatabaseExpectedSizeKey. + + * WebView/WebPreferenceKeysPrivate.h: Removed WebKitDefaultDatabaseQuotaKey. + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): Removed the default for WebKitDefaultDatabaseQuotaKey. + * WebView/WebPreferencesPrivate.h: Removed defaultDatabaseQuota and + setDefaultDatabaseQuota:. + + * WebView/WebUIDelegatePrivate.h: Replaced the two different database quota delegate + methods we had before with a single one. + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Removed the code to set the + default database origin quota in WebCore::Settings based on WebPreferences. + + * WebView/WebViewInternal.h: Removed delegate method dispatch functions for unusual + types of parameters that the database UI delegate methods had before. + +2008-01-20 Mark Rowe <mrowe@apple.com> + + Reviewed by Dan Bernstein. + + Remove code bracketed by REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM as we are no longer + interested in supporting Safari 2 with TOT WebKit. + + * WebView/WebView.mm: + (+[WebView initialize]): + +2008-01-17 Timothy Hatcher <timothy@apple.com> + + Reviewed by Adam Roben. + + <rdar://problem/5693558> REGRESSION (r29581): no form field focus rings + and inactive text selection after loading a page + Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance + + The problem was other frames were changing the FocusController's active + status to false after the first responder frame set it to true. The last + frame to call _updateActiveState would win. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateActiveState]): Only call page->focusController()->setActive() + if the first responder is the current WebHTMLView or the WebFrameView. + (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Removed, inlined code in _updateActiveState. + +2008-01-18 Adam Roben <aroben@apple.com> + + Rename _updateActiveState to _updateFocusedAndActiveState + + Also renamed any related methods/members similarly. + + Reviewed by Adele. + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate dealloc]): + (-[WebHTMLView _cancelUpdateFocusedAndActiveStateTimer]): + (-[WebHTMLView close]): + (_updateFocusedAndActiveStateTimerCallback): + (-[WebHTMLView viewWillMoveToWindow:]): + (-[WebHTMLView viewDidMoveToWindow]): + (-[WebHTMLView windowDidBecomeKey:]): + (-[WebHTMLView windowDidResignKey:]): + (-[WebHTMLView becomeFirstResponder]): + (-[WebHTMLView resignFirstResponder]): + * WebView/WebHTMLViewInternal.h: + * WebView/WebHTMLViewPrivate.h: + +2008-01-17 John Sullivan <sullivan@apple.com> + + Reviewed by Darin + + - fixed <rdar://problem/5692068> -1 WebFrameView world leaks reported after closing view source window + + * WebView/WebFrameView.mm: + (-[WebFrameView initWithCoder:]): + override to bump the global WebFrameView count + +2008-01-16 Adam Roben <aroben@apple.com> + + Updated for renames/removal of WebCore methods. + + Reviewed by Darin Adler. + + * Plugins/WebPluginController.mm: + (-[WebPluginController webPlugInContainerSelectionColor]): Changed to + ask isFocusedAndActive directly, instead of going through the frame + bridge. + * WebView/WebHTMLView.mm: + (-[WebHTMLView _updateActiveState]): Updated for method renames. + +2008-01-16 John Sullivan <sullivan@apple.com> + + Reviewed by Adam and Dan + + - cleaned up some existing logging + + * WebView/WebHTMLView.mm: + (-[WebHTMLView setNeedsDisplay:]): + add method name to log, use "YES" and "NO" instead of (int)flag + (-[WebHTMLView setNeedsLayout:]): + ditto + (-[WebHTMLView setNeedsToApplyStyles:]): + ditto + +2008-01-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Andre Boule. + + Fixed <rdar://problem/5667627> [WebCache empty] implementation should + not disable/enable the cache + + Toggle the cache model instead -- toggling disable/enable just causes + the cache to forget about resources, not reclaim their memory. + + * Misc/WebCache.mm: + (+[WebCache empty]): + * WebView/WebView.mm: + * WebView/WebViewInternal.h: + +2008-01-15 Adele Peterson <adele@apple.com> + + Reviewed by Adam and Antti. + + WebKit part of fix for <rdar://problem/5619062> Add load progress indicator to video controls + + * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): + Removed initialization for GetMediaControlBackgroundImageData. Added initialization for DrawMediaSliderTrack. + +2008-01-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by John Sullivan. + + Fixed some world leak reports: + * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript + Interpreter after running cvs-base suite + + * <rdar://problem/5669423> PLT complains about world leak if browser + window is open when PLT starts + + These were both bugs in the reporting mechanism, so I took the + opportunity to do some house cleaning there. + + * Misc/WebCoreStatistics.h: Did a little renaming, to match + JavaScriptCore better. I kept the methods with the old names around, + though, because old versions of Safari need them. + + * Misc/WebCoreStatistics.mm: Removed dependence on + WebCore::JavaScriptStatistics, which is gone now. + + These two methods are now distinct, for the sake of world leak reporting: + (+[WebCoreStatistics javaScriptGlobalObjectsCount]): + (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): + +2008-01-10 Maciej Stachowiak <mjs@apple.com> + + Not reviewed. Build fix. + + - Attempt to fix mac build. + + * Storage/WebDatabaseManager.mm: + +2008-01-10 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Sam. + + - remove SecurityOriginData and fold its functionality into SecurityOrigin + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager origins]): + (-[WebDatabaseManager databasesWithOrigin:]): + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): + (-[WebDatabaseManager deleteDatabasesWithOrigin:]): + (-[WebDatabaseManager deleteDatabase:withOrigin:]): + * Storage/WebDatabaseTrackerClient.h: + * Storage/WebDatabaseTrackerClient.mm: + (WebDatabaseTrackerClient::dispatchDidModifyOrigin): + (WebDatabaseTrackerClient::dispatchDidModifyDatabase): + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin initWithProtocol:domain:port:]): + (-[WebSecurityOrigin protocol]): + (-[WebSecurityOrigin domain]): + (-[WebSecurityOrigin port]): + (-[WebSecurityOrigin usage]): + (-[WebSecurityOrigin quota]): + (-[WebSecurityOrigin setQuota:]): + (-[WebSecurityOrigin isEqual:]): + (-[WebSecurityOrigin dealloc]): + (-[WebSecurityOrigin finalize]): + (-[WebSecurityOrigin _initWithWebCoreSecurityOrigin:]): + (-[WebSecurityOrigin _core]): + * Storage/WebSecurityOriginInternal.h: + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestQuotaIncreaseForNewDatabase): + (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): + +2008-01-10 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522 + <rdar://problem/5657355> + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadPluginRequest:]): call findFrameForNavigation + to ensure the shouldAllowNavigation check is made. + +2008-01-07 Nikolas Zimmermann <zimmermann@kde.org> + + Reviewed by Mark. + + Enable SVG_FONTS by default. + + * Configurations/WebKit.xcconfig: + +2008-01-07 Adele Peterson <adele@apple.com> + + Reviewed by Antti, Adam, and Mitz. + + WebKit part of fix for + <rdar://problem/5619073> Updated look for <video> controls + <rdar://problem/5619057> Add volume control to video controls + + * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): + +2008-01-07 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - <rdar://problem/5665216> Support the unicode-range property in @font-face rules + + * Misc/WebNSAttributedStringExtras.mm: + +2008-01-03 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController + + * WebView/WebView.mm: + (-[WebView _executeCoreCommandByName:value:]): + * WebView/WebViewPrivate.h: + Added an SPI to implement layoutTestController.execCommand. + +2008-01-03 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin Adler. + + Fixed: <rdar://problem/4106190> Include "Where from" metadata in drag-and-dropped images + + * Misc/WebNSFileManagerExtras.h: + * Misc/WebNSFileManagerExtras.m: + (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Added new method. Uses WebKitSystemInterface to set + "Where from:" metadata information. + * WebView/WebHTMLView.mm: + (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Added "Where from:" metadata for drag and dropped images. + +2008-01-03 Alice Liu <alice.liu@apple.com> + + Reviewed by Darin Adler. + + This fixes pageup/down in iframes. test for this is fast/frames/iframe-scroll-page-up-down.html + + * WebView/WebHTMLView.mm: + (-[WebHTMLView doCommandBySelector:]): + Have the editor handle all the commands it supports instead of just text commands. + If not handled by the editor, the webview will handle the command. + +2008-01-02 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin Adler. + + Fixed: <rdar://problem/5660603> QuickDraw plug-ins can cause a 100% reproducible assertion failure in AppKit (breaks Safari UI) + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView updateAndSetWindow]): Simplified an early return for non-QuickDraw plug-ins and switched + to using the more NSView friendly version of lockFocus, lockFocusIfCanDraw. + +2008-01-01 David D. Kilzer <ddkilzer@webkit.org> + + Reviewed by Dan. + + - fix http://bugs.webkit.org/show_bug.cgi?id=16700 + Fix -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:] + + * DefaultDelegates/WebDefaultPolicyDelegate.m: Check return value of + -[NSFileManager fileExistsAtPath:isDirectory:] before using the value + of isDirectory. + +2007-12-29 Nikolas Zimmermann <zimmermann@kde.org> + + Reviewed by Eric. + + Add DOMSVGFontElement/DOMSVGGlyphElement/DOMSVGMissingGlyphElement to MigrateHeaders.make + + * MigrateHeaders.make: + +2007-12-25 Dan Bernstein <mitz@apple.com> + + Reviewed by Oliver Hunt. + + - fix an assertion failure when pressing the num lock key + + * WebView/WebHTMLView.mm: + (-[WebHTMLView flagsChanged:]): Avoid passing key code 10 down to + WebCore. + +2007-12-20 Darin Adler <darin@apple.com> + + Reviewed by Oliver. + + - fix <rdar://problem/5658787> Selector -[WebView insertLineBreak:] is not implemented + + * WebView/WebView.mm: Added all selectors implemented by WebHTMLView to the list of + selectors to forward here. The new ones are: changeBaseWritingDirection:, changeSpelling:, + deleteToMark:, insertLineBreak:, moveParagraphBackwardAndModifySelection:, + moveParagraphForwardAndModifySelection:, pageDownAndModifySelection:, pageUpAndModifySelection:, + selectToMark:, setMark:, swapWithMark:, takeFindStringFromSelection:, toggleBaseWritingDirection:, + and transpose:. + +2007-12-20 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders. + + Fixed: <rdar://problem/5638288> REGRESSION: Flash movies show up in other tabs above the page (16373) + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView updateAndSetWindow]): QuickDraw plug-ins must manually be told when to stop + writing to the window backing store. The problem was that change-set 28400 introduced an early return + which prevented this necessary operation. The fix is to limit the scope of the early return to CG and GL + plug-ins and to tweak the needsFocus check to prevent an exception from occurring in QuickDraw-based plug-ins. + +2007-12-19 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Build fix. + + * ForwardingHeaders/kjs/SymbolTable.h: Added. + * ForwardingHeaders/wtf/VectorTraits.h: Added. + +2007-12-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Maciej Stachowiak. + + Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebNetscapePluginStream.h: + * Plugins/WebNetscapePluginStream.mm: + (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]): + (-[WebNetscapePluginStream dealloc]): + (-[WebNetscapePluginStream finalize]): + * Plugins/WebPlugInStreamLoaderDelegate.h: Moved from WebCore. + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Added. + (WebNetscapePlugInStreamLoaderClient::WebNetscapePlugInStreamLoaderClient): + * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Added. + (WebNetscapePlugInStreamLoaderClient::didReceiveResponse): Call through to the equivalent WebPlugInStreamLoaderDelegate method. + (WebNetscapePlugInStreamLoaderClient::didReceiveData): Ditto. + (WebNetscapePlugInStreamLoaderClient::didFail): Ditto. + (WebNetscapePlugInStreamLoaderClient::didFinishLoading): Ditto. + +2007-12-16 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=14140 + <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Made command replaying work + when handling keypress, too. + (-[WebHTMLView doCommandBySelector:]): Adapted for the new way to store commands in events. + (-[WebHTMLView insertText:]): Append a command, not replace the whole existing vector. Also, + restore the state for additional commands to be saved correctly. + +2007-12-14 David D. Kilzer <ddkilzer@apple.com> + + <rdar://problem/5647272> Remove user agent string hack for flickr.com + + Reviewed by Darin Adler. + + * WebView/WebView.mm: + (-[WebView _userAgentForURL:]): Removed hack. + +2007-12-14 David D. Kilzer <ddkilzer@apple.com> + + <rdar://problem/5647261> Remove user agent string hack for yahoo.com + + Reviewed by Darin Adler. + + * WebView/WebView.mm: + (-[WebView _userAgentForURL:]): Removed hack. + +2007-12-14 Darin Adler <darin@apple.com> + + Reviewed by Brady. + + - fix http://bugs.webkit.org/show_bug.cgi?id=16296 + <rdar://problem/5635641> -[WebFrameLoadDelegate didReceiveIcon:forFrame:] never called + + * WebView/WebView.mm: + (-[WebView setFrameLoadDelegate:]): Call [WebIconDatabase sharedIconDatabase] if the + a didReceiveIcon method is present. + +2007-12-14 Darin Adler <darin@apple.com> + + Reviewed by Alexey. + + - Changed a few more editing operations to use WebCore instead of WebKit. + - Removed some obsolete unused code. + + * WebCoreSupport/WebFrameBridge.h: Moved declarations of methods that are both + defined and used on the WebKit side to here. These no longer belong on the bridge + and should be moved to the WebFrame class (or elsewhere). + * WebCoreSupport/WebFrameBridge.mm: Removed some unused methods. + + * WebView/WebFrameView.mm: + (+[WebFrameView _viewTypesAllowImageTypeOmission:]): Fix typo in comment. + + * WebView/WebHTMLView.mm: + (-[WebHTMLViewPrivate dealloc]): Removed unused firstResponderTextViewAtMouseDownTime. + (-[WebHTMLViewPrivate clear]): Ditto. + (-[WebHTMLView _setMouseDownEvent:]): Ditto. + (commandNameForSelector): Added special cases for pageDown:, pageDownAndModifySelection:, + pageUp:, and pageUpAndModifySelection:, since those names probably aren't specific enough + to be used in WebCore (what AppKit calls scrollPageDown: vs. pageDown: needs to be + disambiguated with the word "Move"). Added deleteBackward:, + deleteBackwardByDecomposingPreviousCharacter:, deleteForward:, deleteToBeginningOfLine:, + deleteToBeginningOfParagraph:, deleteToEndOfLine:, deleteToEndOfParagraph:, pageDown:, + pageDownAndModifySelection:, pageUp:, pageUpAndModifySelection:, selectLine:, + selectParagraph:, selectSentence:, and selectWord: to the list of commands that are + forwarded to WebCore. + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Eliminated the long list of + operations that we forward to WebCore. Instead, look up any command that WebCore can + handle, after any that we handle specially in WebHTMLView. Also fixed a bug where + an item that's not a menu item with changeBaseWritingDirection:NSWritingDirectionNatural + would end up enabled instead of disabled and streamlined the logic for toggleGrammarChecking:. + (-[WebHTMLView mouseDown:]): Removed unused firstResponderTextViewAtMouseDownTime. + (-[WebHTMLView becomeFirstResponder]): Removed unused willBecomeFirstResponderForNodeFocus. + (-[WebHTMLView resignFirstResponder]): Ditto. + (-[WebHTMLView checkSpelling:]): Took unneeded extra initialization of NSSpellChecker. + + * WebView/WebHTMLViewInternal.h: Removed unused willBecomeFirstResponderForNodeFocus, + firstResponderTextViewAtMouseDownTime, _textViewWasFirstResponderAtMouseDownTime: and + _willMakeFirstResponderForNodeFocus. + +2007-12-13 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + Turn on keyboard event processing quirks for feed views and old applications on Mac OS X. + + * Misc/WebKitVersionChecks.h: + * WebView/WebView.mm: + (-[WebView _needsKeyboardEventHandlingQuirks]): + (-[WebView _preferencesChangedNotification:]): + +2007-12-12 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig + + Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows) + + * WebCoreSupport/WebCachedPagePlatformData.h: Added. + (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes a WebDocumentView for later restoration + (WebCachedPagePlatformData::clear): + (WebCachedPagePlatformData::webDocumentView): + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::savePlatformDataToCachedPage): + (WebFrameLoaderClient::transitionToCommittedFromCachedPage): Don't set the DocumentLoader to the Frame here, + because that is now done in WebCore. + (WebFrameLoaderClient::transitionToCommittedForNewPage): + +2007-12-12 Mark Rowe <mrowe@apple.com> + + Reviewed by Dave Kilzer. + + Remove abuse of projectDirPath from WebKit.xcodeproj to fix Production builds. + + * Configurations/WebKit.xcconfig: + +2007-12-11 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Scrub URL out of the tree in preparation for renaming KURL to URL. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::actionDictionary): + * WebView/WebDataSource.mm: + (-[WebDataSource _URL]): + * WebView/WebView.mm: + (-[WebView _dispatchDidReceiveIconFromWebFrame:]): + +2007-12-11 Darin Adler <darin@apple.com> + + Reviewed by Geoff. + + - change more editing commands to use WebCore::Editor + - change to use the new WebCore::Editor::command() function + + * WebView/WebHTMLView.mm: Changed alignCenter, alignJustified, alignLeft, + alignRight, cut, copy, deleteToMark, indent, insertNewlineIgnoringFieldEditor, + insertTabIgnoringFieldEditor, outdent, selectAll, selectToMark, setMark, + subscript, superscript, swapWithMark, underline, unscript, yank, and yankAndSelect + to use the "forward to WebCore" macro instead of having hand-written implementations. + (kit): Added function to change a TriState to an AppKit-style tri-state value. + (-[WebHTMLView coreCommandBySelector:]): Added. No longer converts case of the + first character or copies the selector name, since the Editor commands are not case + sensitive any more. Returns a command object. + (-[WebHTMLView coreCommandByName:]): Added. + (-[WebHTMLView executeCoreCommandBySelector:]): Renamed from callWebCoreCommand:, + and changed to use the new coreCommandBySelector: method. + (-[WebHTMLView executeCoreCommandByName:]): Added. + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Changed all the + methods that call through to WebCore to also use the state() and isEnabled() + functions on the commands for the menu item state and user interface item enabling. + (-[WebHTMLView _handleStyleKeyEquivalent:]): Use ToggleBold and ToggleItalic by + name rather than having local methods for them; no need for methods with a single + call site. + (-[WebHTMLView insertParagraphSeparator:]): Use executeCoreCommandByName: rather + than the deprecated execCommand(). + (-[WebHTMLView doCommandBySelector:]): Changed to use command().execute() rather + than the deprecated execCommand(). + * WebView/WebHTMLViewInternal.h: Removed some unneeded method declarations. + +2007-12-07 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + <rdar://problem/5535636> + Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard. + + http://bugs.webkit.org/show_bug.cgi?id=13916 + JavaScript detects Tab as a character input on a textfield validation + + * WebCoreSupport/WebEditorClient.h: + Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses. + Renamed handleInputMethodKeypress() to handleInputMethodKeydown(). + * WebCoreSupport/WebEditorClient.mm: + (WebEditorClient::handleKeyboardEvent): This change makes sense only remotely, but it helped + to get tests working. I guess Mac keyboard event handling needs further refactoring. + + * WebView/WebHTMLView.mm: + (selectorToCommandName): Convert AppKit editing selector name to Editor command name - extracted + from callWebCoreCommand:. + (_interceptEditingKeyEvent:shouldSaveCommand:): Insert text from keypress. + + * WebView/WebPDFView.mm: + (-[WebPDFView PDFViewWillClickOnLink:withURL:]): + Convert incoming platform KeyDown into RawKeyDown, as this is what the view is interested in. + +2007-12-10 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan + + Fix for <rdar://problem/5640080> - Database UI delegate calls need to specify WebFrame + + This is because a common UI case is to want to know the originating URL of a Database + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestQuotaIncreaseForNewDatabase): + (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): + + * WebView/WebUIDelegatePrivate.h: + + * WebView/WebView.mm: + (CallDelegateReturningUnsignedLongLong): + (CallUIDelegateReturningUnsignedLongLong): + * WebView/WebViewInternal.h: + +2007-12-10 Timothy Hatcher <timothy@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x + + * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR, + so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX. + +2007-12-10 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin Adler. + + Fixed: <rdar://problem/4290098> Right-mouse click on element doesn't call onmousedown handler + + * WebView/WebHTMLView.mm: + (-[WebHTMLView menuForEvent:]): Match behavior of other browsers by sending an onmousedown event for right clicks. + +2007-12-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam W. + + Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags. + + Fixes <rdar://problem/5620249> Must disable SVG animation + <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior + + Minor updates to the feature flags used. + + * Configurations/WebKit.xcconfig: + * DOM/WebDOMOperations.mm: + +2007-12-07 Darin Adler <darin@apple.com> + + Reviewed by Kevin Decker and Tim Hatcher. + + - speculative fix for <rdar://problem/5400159> CrashTracer: [USER] 726 crashes + in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389 + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _frameOrBoundsChanged]): Only schedule the mouseover timer if we are in a window + and not closed. That's because viewDidMoveToWindow and close are the entry points for cancelling. + (-[WebHTMLView close]): Add code to cancel both timers. Needed for the case where the entire + window goes away, and the view is never removed from the window. + (-[WebHTMLView viewDidMoveToWindow]): Don't do work if the view is closed. + +2007-12-07 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - http://bugs.webkit.org/show_bug.cgi?id=15981 + speed up visited-link code a bit + + * History/WebHistory.mm: Removed unused Latin-1 code path. + (-[_WebCoreHistoryProvider containsURL:length:]): Updated for method name change. + +2007-12-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Added a forwarding header, since we now #include nodes.h through some + JavaScriptCore headers. + + * ForwardingHeaders/wtf/ListRefPtr.h: Added. + +2007-12-06 Brady Eidson <beidson@apple.com> + + Reviewed by Oliver's rubber stamp + + Let's go ahead and call the correct UI Delegate method, shall we? + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Call the correct UI delegate + +2007-12-06 Adam Roben <aroben@apple.com> + + Remove some assertions we know can fire and replace them with a FIXME + + Reviewed by Anders. + + * WebCoreSupport/WebFrameLoaderClient.mm: + +2007-12-06 Timothy Hatcher <timothy@apple.com> + + Change the ASSERT added for the previous fix. The ASSERT was firing for 10.5.0. + Only assert if the major version is zero, since zero is handled in the other cases. + + * WebView/WebView.mm: + (callGestalt): Remove the ASSERT. + (createMacOSXVersionString): ASSERT that major is not zero. + +2007-12-06 Darin Adler <darin@apple.com> + + Reviewed by Tim Hatcher. + + - fix <rdar://problem/5513394> No way to detect Tiger vs Leopard from Safari's user agent string + + * WebView/WebView.mm: + (callGestalt): Added. + (createMacOSXVersionString): Added. + (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Added Mac OS X version string, + right after the string "Mac OS X", but with underscores instead of dots to avoid the dreaded + "4." problem (old libraries that think a "4." anywhere in the user agent means Netscape 4). + (-[WebView _userAgentForURL:]): Fixed incorrect bug numbers. + +2007-12-04 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Third step in refactoring JSGlobalObject: Moved data members and data + member access from Interpreter to JSGlobalObject. + + * WebView/WebFrame.mm: + (-[WebFrame _attachScriptDebugger]): + +2007-12-04 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Darin Adler. + + - <rdar://5621435> + - Security Fix. Instead of having it off by default, WebKit now must + explicitly turn off local-resource restriction when needed for backwards + coimpatibility reasons. + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): + +2007-12-05 Brady Eidson <beidson@apple.com> + + Reviewed by Kevin Deckers rubberstamp + + Disclose and export the Databases Directory defaults key + + * Storage/WebDatabaseManager.mm: + * Storage/WebDatabaseManagerPrivate.h: + * WebKit.exp: + +2007-12-04 Kevin Decker <kdecker@apple.com> + + Reviewed by Anders. + + <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type + + * WebCoreSupport/WebViewFactory.mm: + (-[WebViewFactory pluginNameForMIMEType:]): Added. + +2007-12-04 Brady Eidson <beidson@apple.com> + + Reviewed by Mark Rowe + + Tweaked the way we typedef and cast these objc_msgSend calls + + * WebView/WebView.mm: + (CallDelegateReturningUnsignedLongLong): + +2007-12-04 John Sullivan <sullivan@apple.com> + + Reviewed by Brady Eidson (with help from Mark Rowe) + + Fixed return values for unsigned-long-long delegate methods + + * WebView/WebView.mm: + (CallDelegateReturningUnsignedLongLong): + redid the change that Brady did at home over the weekend but forgot to check in + +2007-11-27 Adam Roben <aroben@apple.com> + + Remove -[WebFrameBridge setNeedsReapplyStyles] + + This functionality is now WebCore's responsibility. + + Reviewed by Hyatt. + + * WebCoreSupport/WebFrameBridge.mm: + * WebKit.order: + +2007-12-04 John Sullivan <sullivan@apple.com> + + Reviewed by Darin + + Added deleteOrigin: SPI, which isn't fully implemented + + * Storage/WebDatabaseManagerPrivate.h: + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager deleteOrigin:]): + just calls deleteDatabasesWithOrigin: for now, but needs to delete origin itself too + +2007-12-04 Timothy Hatcher <timothy@apple.com> + + Reviewed by Mark Rowe. + + Remove a check for early versions of Leopard CFNetwork now that + Leopard has shipped. + + * Misc/WebKitVersionChecks.h: Remove WEBKIT_FIRST_CFNETWORK_VERSION_WITH_LARGE_DISK_CACHE_FIX. + * WebView/WebView.mm: + (+[WebView _setCacheModel:]): Remove the early Leopard CFNetwork check. + +2007-12-04 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin Adler. + + Revised fix for: <rdar://problem/5586978> REGRESSION (Safari 2-3): WebKit sometimes doesn't invoke Flash's NPP_SetWindow function and causes a hang + + This fix is exactly the same as chageset 28359 with the exception of an added early return in + updateAndSetWindow to cover the additional case of when a plug-in isn't drawable. + + The CG-based Flash player would sometimes hang because (for CoreGraphics-based plug-ins) our code would + only call into the NPP_SetWindow() function when we tell the plug-in to draw. This created havoc with + Flash because Flash expects the browser to call NPP_SetWindow() and provide a valid graphics context + regardless of whether or not it actually needs to draw. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed an incorrect comment and toned + down an ASSERT that was too strict. + (-[WebBaseNetscapePluginView updateAndSetWindow]): Removed an early return for CoreGraphics-based plug-ins + which would sometimes altogether prevent updating the PortState and calling into a plug-ins NPP_SetWindow() + function. Also tweaked a comment and added an early return if the plug-in can't draw. + +2007-12-04 Darin Adler <darin@apple.com> + + Reviewed by Kevin Decker. + + * WebCoreSupport/WebFrameLoaderClient.h: Removed obsolete privateBrowsingEnabled. + * WebCoreSupport/WebFrameLoaderClient.mm: Ditto. + * WebKit.order: Ditto. + +2007-12-03 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame + + * WebView/WebHTMLView.mm: + (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Removed the code + that checked if the view had resized and sent the resize event, since + FrameView sends resize events now. + * WebView/WebHTMLViewInternal.h: + +2007-12-03 Timothy Hatcher <timothy@apple.com> + + Reviewed by Darin Adler. + + Change WebViewGetResourceLoadDelegateImplementations and WebViewGetFrameLoadDelegateImplementations + to return a pointer to the implementation struct instead of a copy of the struct. This changes + all of the callers to dereference the pointer to access the struct fields. + + * Plugins/WebNullPluginView.mm: + (-[WebNullPluginView reportFailure]): + * WebCoreSupport/WebFrameBridge.mm: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): + (WebFrameLoaderClient::assignIdentifierToInitialRequest): + (WebFrameLoaderClient::dispatchWillSendRequest): + (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): + (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge): + (WebFrameLoaderClient::dispatchDidReceiveResponse): + (WebFrameLoaderClient::willCacheResponse): + (WebFrameLoaderClient::dispatchDidReceiveContentLength): + (WebFrameLoaderClient::dispatchDidFinishLoading): + (WebFrameLoaderClient::dispatchDidFailLoading): + (WebFrameLoaderClient::dispatchDidHandleOnloadEvents): + (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): + (WebFrameLoaderClient::dispatchDidCancelClientRedirect): + (WebFrameLoaderClient::dispatchWillPerformClientRedirect): + (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): + (WebFrameLoaderClient::dispatchWillClose): + (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): + (WebFrameLoaderClient::dispatchDidReceiveTitle): + (WebFrameLoaderClient::dispatchDidCommitLoad): + (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): + (WebFrameLoaderClient::dispatchDidFailLoad): + (WebFrameLoaderClient::dispatchDidFinishDocumentLoad): + (WebFrameLoaderClient::dispatchDidFinishLoad): + (WebFrameLoaderClient::dispatchDidFirstLayout): + * WebView/WebView.mm: + (WebViewGetResourceLoadDelegateImplementations): + (WebViewGetFrameLoadDelegateImplementations): + (-[WebView _dispatchDidReceiveIconFromWebFrame:]): + * WebView/WebViewInternal.h: + +2007-12-03 Timothy Hatcher <timothy@apple.com> + + Reviewed by Brady Eidson. + + <rdar://problem/5539913> 188 crashes in WebViewGetFrameLoadDelegateImplementations + <rdar://problem/5586095> CrashTracer: [USER] 5000+ crashes in Safari and Dashboard in dispatchDidFailLoading + <rdar://problem/5607081> CrashTracer: [USER] 2150 crashes in Safari at com.apple.WebKit: + WebViewGetResourceLoadDelegateImplementations + 28 + + * WebView/WebView.mm: + (-[WebView _cacheResourceLoadDelegateImplementations]): If the delegate is nil, bzero the + implementation cache. This just prevents us from calling getMethod() multiple times just to zero. + (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto. + (WebViewGetResourceLoadDelegateImplementations): Return a zeroed implementations struct + if the WebView is nil. This fixes the crashes. + (WebViewGetFrameLoadDelegateImplementations): Ditto. + +2007-12-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Eric Seidel. + + Updated to match the JavaScriptCore change to move virtual methods from + Interpreter to JSGlobalObject. + + * WebView/WebFrame.mm: + (-[WebFrame globalContext]): Use the toRef function instead of manually + casting. + +2007-12-01 Brady Eidson <beidson@apple.com> + + Reviewed by Tim + + Added a default database quota of 5mb to the default WebPreferences + + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): + +2007-11-30 John Sullivan <sullivan@apple.com> + + Reviewed by Geoff Garen + + Added another symbol for WebDatabaseManager clients + + * WebKit.exp: + added .objc_class_name_WebSecurityOrigin + +2007-11-30 Brady Eidson <beidson@apple.com> + + Reviewed by Geoff + + Add isEqual operator to WebSecurityOrigin + + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin isEqual:]): + +2007-11-30 John Sullivan <sullivan@apple.com> + + Reviewed by Darin + + Tweaks to newly-declared NSString * constants to make them usable from clients + + * Storage/WebDatabaseManagerPrivate.h: + * Storage/WebDatabaseManager.mm: + removed "const" from new NSNotification names and userInfo keys; these generate compiler warnings when used + + * WebKit.exp: + export new NSNotification names and userInfo keys so clients can use them + +2007-11-29 Anders Carlsson <andersca@apple.com> + + Reviewed by John. + + Rename WebKitShrinksStandaloneImagesToFitKey to WebKitShrinksStandaloneImagesToFit. + + This is safe to do because the preference is off by default and Safari 3, which is the only client that turns it on, + is using the setter and not messing around with NSUserDefaults. + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): + (-[WebPreferences shrinksStandaloneImagesToFit]): + (-[WebPreferences setShrinksStandaloneImagesToFit:]): + +2007-11-29 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + Support for <rdar://problem/5556381> and <rdar://problem/5556379> + + Hook up UI Delegate calls for the database engine feature and other small tweaks + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity + (-[WebDatabaseManager deleteDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity + * Storage/WebDatabaseManagerPrivate.h: + + * Storage/WebDatabaseTrackerClient.h: + * Storage/WebDatabaseTrackerClient.mm: + (WebDatabaseTrackerClient::dispatchDidModifyDatabase): Renamed databaseName parameter to databaseIdentifier for clarity + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::requestQuotaIncreaseForNewDatabase): Call through to the UI Delegate + (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Ditto + + * WebView/WebUIDelegatePrivate.h: Added the two UI Delegate methods + + * WebView/WebView.mm: + (CallDelegateReturningUnsignedLongLong): + (CallUIDelegateReturningUnsignedLongLong): + * WebView/WebViewInternal.h: + +2007-11-28 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Sam. + + - Added recursive runloop guards. + + * DefaultDelegates/WebScriptDebugServer.m: + (-[WebScriptDebugServer suspendProcessIfPaused]): + +2007-11-29 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Fix an assertion failure seen on the layout tests, and when closing the window after + visiting <http://www.coudal.com/losalamos/>. + + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream _destroyStream]): Unlink the file and close the file + descriptor even when the stream is being destroyed without the load completing. This + avoids leaking the path and file descriptor, and leaving the temporary file on disk. + +2007-11-28 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/5524216> CrashTracer: [USER] 496 crashes in Safari at com.apple.WebCore: WebCore::Frame::eventHandler const + 6 + + The CrashTracer shows a variety of crashes in different methods (including keyDown and keyUp). This change adds nil checks for the frame in + WebHTMLView to prevent future problems in other methods as well. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): + (-[WebHTMLView keyDown:]): + (-[WebHTMLView keyUp:]): + (-[WebHTMLView flagsChanged:]): + (-[WebHTMLView _selectionStartFontAttributesAsRTF]): + (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]): + (-[WebHTMLView checkSpelling:]): + (-[WebHTMLView showGuessPanel:]): + (-[WebHTMLView indent:]): + (-[WebHTMLView outdent:]): + (-[WebHTMLView paste:]): + (-[WebHTMLView _lookUpInDictionaryFromMenu:]): + (-[WebHTMLView insertText:]): + (-[WebHTMLView selectionTextRects]): + +2007-11-28 Dan Bernstein <mitz@apple.com> + + Reviewed by Maciej Stachowiak. + + - fix <rdar://problem/5596160> fast/events/objc-event-api.html fails when run alone (or first) + + * WebView/WebHTMLView.mm: + (-[WebHTMLView setDataSource:]): This method calls addMouseMovedObserver + because addMouseMovedObserver returns early if the dataSource + is not nil. But if the dataSource is already set (which happens when + a WebHTMLView is being reused) then addMouseMovedObserver must not + be called again. + +2007-11-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Brady. + + * Storage/WebDatabaseManager.mm: + * Storage/WebDatabaseManagerPrivate.h: + * Storage/WebDatabaseTrackerClient.mm: + (WebDatabaseTrackerClient::dispatchDidModifyOrigin): + (WebDatabaseTrackerClient::dispatchDidModifyDatabase): + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]): + * Storage/WebSecurityOriginInternal.h: + +2007-11-27 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin, landed by Anders. + + Fixed: <rdar://problem/4610818> CrashTracer: 1533 crashes in Safari at com.macromedia.Flash Player.plugin: native_ShockwaveFlash_TCallLabel + 271131 + + The problem was that some Leopard users were still inadvertently using the old Flash 8 plug-in, even though Leopard + shipped with Flash 9. To avoid loading an older version of a plug-in when a newer version is installed, the plug-in + database will compare bundle versions and always load the latest version. + + * Plugins/WebBasePluginPackage.h: + * Plugins/WebBasePluginPackage.m: + (-[WebBasePluginPackage versionNumber]): New method. CFBundleGetVersionNumber doesn't work with all possible versioning schemes, + but we think for now it's good enough for us. + * Plugins/WebPluginDatabase.m: + (considerCandidate): Added a C utility function which compares the current plug-in against a candidate plug-in's version number. + If both plug-ins have the same bundle ID and the candiate is newer, the current plug-in becomes the candidate. + (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): Calls the new considerCandidate() function. + +2007-11-26 Timothy Hatcher <timothy@apple.com> + + Reviewed by Dave Hyatt. + + <rdar://problem/5569233> Add the ability to disable author and user CSS styles + + * WebView/WebPreferenceKeysPrivate.h: Define WebKitRespectStandardStyleKeyEquivalentsPreferenceKey. + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): Default WebKitRespectStandardStyleKeyEquivalentsPreferenceKey to YES. + (-[WebPreferences authorAndUserStylesEnabled]): Return the setting's BOOL value. + (-[WebPreferences setAuthorAndUserStylesEnabled:]): Set the setting's BOOL value. + * WebView/WebPreferencesPrivate.h: Add authorAndUserStylesEnabled and setAuthorAndUserStylesEnabled:. + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings::authorAndUserStylesEnabled. + +2007-11-26 Brady Eidson <beidson@apple.com> + + Reviewed by Mark Rowe + + Provide API for setting the default storage quota per database origin + + * Misc/WebNSDictionaryExtras.h: + * Misc/WebNSDictionaryExtras.m: + (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Helper for UINT64 preferences + + * WebView/WebPreferenceKeysPrivate.h: + * WebView/WebPreferences.m: + (-[WebPreferences _unsignedLongLongValueForKey:]): Helper for UINT64 prefs + (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto + (-[WebPreferences defaultDatabaseQuota]): + (-[WebPreferences setDefaultDatabaseQuota:]): + * WebView/WebPreferencesPrivate.h: + + * WebView/WebView.mm: + (-[WebView _preferencesChangedNotification:]): Set the WebCore Settings version of the default storage pref + +2007-11-26 Darin Adler <darin@apple.com> + + Reviewed by Adele. + + - some middle-mouse-button-related fixes + + These don't affect Safari since it maps the middle mouse button to the command key, + but that might not always be the case for future versions. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView otherMouseDown:]): Pass through middle mouse down events to WebCore. + (-[WebHTMLView otherMouseDragged:]): Ditto, for drag events. + (-[WebHTMLView otherMouseUp:]): Ditto, for up events. + + * WebView/WebPolicyDelegate.h: Fixed inaccurate documentation of WebActionButtonKey. + +2007-11-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Brady. + + Get rid of the WebSecurityOriginPrivate object and store + the WebCore::SecurityOriginData pointer in the _private field of + the WebSecurityOrigin object instead. + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager databasesWithOrigin:]): + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): + (-[WebDatabaseManager deleteDatabasesWithOrigin:]): + (-[WebDatabaseManager deleteDatabase:withOrigin:]): + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin initWithProtocol:domain:port:]): + (-[WebSecurityOrigin protocol]): + (-[WebSecurityOrigin domain]): + (-[WebSecurityOrigin port]): + (-[WebSecurityOrigin usage]): + (-[WebSecurityOrigin quota]): + (-[WebSecurityOrigin setQuota:]): + (-[WebSecurityOrigin dealloc]): + (-[WebSecurityOrigin finalize]): + (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]): + (-[WebSecurityOrigin _core]): + * Storage/WebSecurityOriginInternal.h: + +2007-11-26 Timothy Hatcher <timothy@apple.com> + + Reviewed by Adam Roben. + + Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title + http://bugs.webkit.org/show_bug.cgi?id=16137 + + Create the Web Inspector window with the textured style. Set the content border + thickness for the top of the window or the height of the toolbar. Also make the + window's bottom corners square, since a normal textured window normally has + rounded bottom corners. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController window]): + +2007-11-24 Mark Rowe <mrowe@apple.com> + + Tiger build fix. + + * Plugins/WebBaseNetscapePluginStream.mm: + (CarbonPathFromPOSIXPath): Use WebCFAutorelease as this also works on Tiger. + +2007-11-24 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Fix <rdar://problem/5432686> 333MB RPRVT seems to leak @ www.43folders.com (1hr plug-in stream). + http://bugs.webkit.org/show_bug.cgi?id=13705 + + Have NP_ASFILE and NP_ASFILEONLY streams write the data to disk as they receive it rather than + dumping the data to disk in a single go when the stream has completed loading. On a test case + involving a 150MB Flash movie being streamed from a local web server this reduces memory consumption + on page load from around 400MB to 22MB. + + The only plugin I have found that uses NP_ASFILE or NP_ASFILEONLY on the Mac is our NetscapeMoviePlugin + example code so the NP_ASFILE portion of this change has not had any testing with a real-world plugin. + + * Plugins/WebBaseNetscapePluginStream.h: + * Plugins/WebBaseNetscapePluginStream.mm: + (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): + (-[WebBaseNetscapePluginStream dealloc]): + (-[WebBaseNetscapePluginStream finalize]): + (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): + (-[WebBaseNetscapePluginStream _destroyStream]): Update to work with paths as NSStrings. + (-[WebBaseNetscapePluginStream _deliverDataToFile:]): Open the file if it is not already open, and write any data + to disk. + (-[WebBaseNetscapePluginStream finishedLoading]): If the stream is NP_ASFILE or NP_ASFILEONLY we need to ensure + that the file exists before _destroyStream passes it to the plugin. Simulating the arrival of an empty data block + ensure that the file will be created if it has not already. + (-[WebBaseNetscapePluginStream receivedData:]): + (CarbonPathFromPOSIXPath): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]): Data is dealt with incrementally so there's no need to pass + it to finishedLoading. + (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Ditto. + +2007-11-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Mark Rowe. + + Fixed <rdar://problem/3759190> allow input methods the option of processing mouse events themselves + + * WebView/WebHTMLView.mm: + (-[WebHTMLView mouseDown:]): + +2007-11-22 Dan Bernstein <mitz@apple.com> + + Reviewed by Antti Koivisto. + + - http://bugs.webkit.org/show_bug.cgi?id=15811 + WebKit plug-ins can re-enter WebKit under attach() + <rdar://problem/5577978> + + * Plugins/WebNullPluginView.mm: + (-[WebNullPluginView viewDidMoveToWindow]): Removed workaround for the + above bug that added as part of fixing + <http://bugs.webkit.org/show_bug.cgi?id=15804>. + +2007-11-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Eric. + + Fix WebKit to build without warnings under GCC 4.2. + + * Configurations/Base.xcconfig: + +2007-11-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Changes due to <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings + + Update format strings to use format specifiers that match the argument types. + + * Misc/WebGraphicsExtras.c: + (WebConvertBGRAToARGB): + +2007-11-19 Brady Eidson <beidson@apple.com> + + Reviewed by Maciej + + Finished hooking up the WebKit API for database management. + Most of the API is actually implemented in WebCore and some of those methods might + only be stubs for now. + + * Storage/WebDatabaseManager.mm: + (-[WebDatabaseManager origins]): Call through to the WebCore tracker and construct an API result + (-[WebDatabaseManager databasesWithOrigin:]): Ditto + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Ditto + + * Storage/WebSecurityOrigin.mm: + (-[WebSecurityOrigin usage]): Call through to WebCore + (-[WebSecurityOrigin quota]): Ditto + (-[WebSecurityOrigin setQuota:]): Ditto + (-[WebSecurityOrigin _core]): Get WebCore version of this object + * Storage/WebSecurityOriginInternal.h: + +2007-11-17 Timothy Hatcher <timothy@apple.com> + + Reviewed by Mark Rowe. + + Bug 13470: i18n: The Web Inspector is not localizable + http://bugs.webkit.org/show_bug.cgi?id=13470 + + Implement the localizedStringsURL() client method to return the + localized URL of InspectorLocalizedStrings.js in WebCore. + + * WebCoreSupport/WebInspectorClient.h: Added localizedStringsURL. + * WebCoreSupport/WebInspectorClient.mm: + (WebInspectorClient::localizedStringsURL): Added. + (WebInspectorClient::updateWindowTitle): Localized the window title. + (-[WebInspectorWindowController init]): Remove a FIXME that dosen't make sense anymore. + (-[WebInspectorWindowController initWithInspectedWebView:]): Code style cleanup. + +2007-11-17 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=15969 + Eliminate Editor::deleteRange() + + * WebView/WebHTMLView.mm: + (+[WebHTMLView initialize]): + (-[WebHTMLView yank:]): + (-[WebHTMLView yankAndSelect:]): + (-[WebHTMLView setMark:]): + (-[WebHTMLView deleteToMark:]): + (-[WebHTMLView selectToMark:]): + (-[WebHTMLView swapWithMark:]): + Pushed all kill ring methods to WebCore. They were guilty of using Editor::deleteRange()! + +2007-11-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + Build WebCore as a sub-framework of WebKit in all configurations. + + * Configurations/WebKit.xcconfig: + +2007-11-16 John Sullivan <sullivan@apple.com> + + Reviewed by Brady + + * WebKit.exp: + Exported some new database-related symbols + +2007-11-16 Brady Eidson <beidson@apple.com> + + Reviewed by John + + Database management API tweaks + + Fleshed out "WebSecurityOrigin" to be the API object representing an origin. This relieves some + burden off WebDatabaseManager and allows usage/quota operations on the SecurityOrigin object itself + + Also added a new subdirectory for Storage related API - Why are we afraid to add new directories to + the WebKit tree? + + * Misc/WebSecurityOrigin.mm: Removed. + * Misc/WebSecurityOriginInternal.h: Removed. + * Misc/WebSecurityOriginPrivate.h: Removed. + + * Storage/WebDatabaseManager.mm: Work in terms of WebSecurityOrigin + * Storage/WebDatabaseManagerPrivate.h: + + * Storage/WebSecurityOrigin.mm: Added. + (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]): + (-[WebSecurityOriginPrivate initWithWebCoreSecurityOrigin:]): + (-[WebSecurityOriginPrivate finalize]): + (-[WebSecurityOriginPrivate dealloc]): + (-[WebSecurityOrigin initWithProtocol:domain:]): + (-[WebSecurityOrigin initWithProtocol:domain:port:]): + (-[WebSecurityOrigin protocol]): + (-[WebSecurityOrigin domain]): + (-[WebSecurityOrigin port]): + (-[WebSecurityOrigin usage]): + (-[WebSecurityOrigin quota]): + (-[WebSecurityOrigin setQuota:]): Clients will set quotas on the WebSecurityOrigin object itself + (-[WebSecurityOrigin dealloc]): + (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]): + * Storage/WebSecurityOriginInternal.h: Added. + * Storage/WebSecurityOriginPrivate.h: Added. + +2007-11-15 Brady Eidson <beidson@apple.com> + + Reviewed by John + + Stubbing out everything required for a WebKit API for databases + + These interfaces seem to provide everything we need for UI and management at the browser level + + * Misc/WebDatabaseManager.h: Removed. + * Misc/WebDatabaseManager.mm: Removed. + * Misc/WebDatabaseManagerPrivate.h: Removed. + + * Misc/WebSecurityOrigin.mm: Added. Object that acts as a container for the "SecurityOrigin tuple" + (protocol, domain, and port) + (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]): + (-[WebSecurityOriginPrivate dealloc]): + (-[WebSecurityOrigin initWithProtocol:domain:]): + (-[WebSecurityOrigin initWithProtocol:domain:port:]): + (-[WebSecurityOrigin protocol]): + (-[WebSecurityOrigin domain]): + (-[WebSecurityOrigin port]): + (-[WebSecurityOrigin dealloc]): + (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:WebCore::]): + * Misc/WebSecurityOriginInternal.h: Added. + * Misc/WebSecurityOriginPrivate.h: Added. + + * Storage/WebDatabaseManager.mm: Added. + (+[WebDatabaseManager sharedWebDatabaseManager]): + (-[WebDatabaseManager origins]): Get a list of all origins currently tracked + (-[WebDatabaseManager detailsForOrigin:]): Get the current usage and current quota for the given origin + (-[WebDatabaseManager databasesWithOrigin:]): Get all databases for a certain origin + (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Get all details about a specific database + (-[WebDatabaseManager setQuota:forOrigin:]): Change origin-wide quota + (-[WebDatabaseManager deleteAllDatabases]): + (-[WebDatabaseManager deleteAllDatabasesWithOrigin:]): + (-[WebDatabaseManager deleteDatabase:withOrigin:]): + * Storage/WebDatabaseManagerPrivate.h: Added. + * Storage/WebDatabaseManagerInternal.h: Added. + (WebKitInitializeDatabasesIfNecessary): One-time initialization of database-related things + + * Storage/WebDatabaseTrackerClient.h: Added. Stubbed out client for notifications + * Storage/WebDatabaseTrackerClient.mm: Added. + (WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient): + (WebDatabaseTrackerClient::WebDatabaseTrackerClient): + (WebDatabaseTrackerClient::~WebDatabaseTrackerClient): + (WebDatabaseTrackerClient::dispatchDidModifyOrigin): + (WebDatabaseTrackerClient::dispatchDidModifyDatabase): + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Do one-time initialization of + Database-related things here + +2007-11-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Anders Carlsson. + + Renamed Shared to RefCounted. + + * ForwardingHeaders/wtf/RefCounted.h: Copied from WebKit/mac/ForwardingHeaders/wtf/Shared.h. + * ForwardingHeaders/wtf/Shared.h: Removed. + * WebCoreSupport/WebContextMenuClient.h: + +2007-11-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Moved Shared.h into wtf so it could be used in more places. + + * ChangeLog: + * WebCoreSupport/WebContextMenuClient.h: + +2007-11-13 John Sullivan <sullivan@apple.com> + + Reviewed by Darin Adler. + + removed recently-added PreferredType concept; we found a better way to do what + ths was accomplishing + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::createWindow): + removed use of PreferredType + +2007-11-13 John Sullivan <sullivan@apple.com> + + Reviewed by Dan Bernstein. + + - fixed <rdar://problem/5567954> REGRESSION (Safari 2-3): Autofill no longer automatically fills in + form fields other than the one you're typing into + + * WebCoreSupport/WebEditorClient.mm: + (selectorForKeyEvent): + correct the key identifier strings for Tab and Esc; these were updated in WebCore as part of r21445 + but didn't get updated here. + +2007-11-12 Josh Aas <joshmoz@gmail.com> + + Reviewed by Darin Adler. + + - http://bugs.webkit.org/show_bug.cgi?id=15946 + add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat) + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView setVariable:value:]): + +2007-11-12 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=15954 + Move DOM Selection operations out of SelectionController + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _expandSelectionToGranularity:]): + (-[WebHTMLView selectToMark:]): + (-[WebHTMLView swapWithMark:]): + * WebView/WebView.mm: + (-[WebView setSelectedDOMRange:affinity:]): + Adapted for SelectionController::setSelectedRange() now returning a bool. + +2007-11-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin and Geoff. + + <rdar://problem/5522011> The content of the password field of + Safari is displayed by reconversion. + + Some input methods (notably Kotoeri) can incorrectly provide + access to the raw text of a password field. To work around + this we forcefully override the inputContext whenever a password + field is active. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView inputContext]): + +2007-11-12 John Sullivan <sullivan@apple.com> + + Reviewed by Tim Hatcher + + - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit: + -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56 + + The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained + by this class, but should be. (It is retained by WebHTMLView, e.g.). + + * WebView/WebPDFView.mm: + (-[WebPDFView dealloc]): + release dataSource ivar + (-[WebPDFView setDataSource:]): + retain dataSource ivar + +2007-11-09 Tristan O'Tierney <tristan@apple.com> + + Reviewed by Timothy Hatcher. + + This patch is for the WebKit side of <rdar://problem/5591115>. + We need a way to tell context menu navigations, such as "Open in New Window" + to override any sort of browser preference for tab based navigation. + + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::createWindow): + Pass up the new preferredType parameter as a string. + +2007-11-09 Timothy Hatcher <timothy@apple.com> + + Reviewed by John. + + <rdar://problem/5103720> REGRESSION: [WebView stringByEvaluatingJavaScriptFromString:] fails if "return" is used + + Extend the linked on or after check to every application when a script passed to + stringByEvaluatingJavaScriptFromString: has a return statement. Before the check + was limited to VitalSource Bookshelf, but other developers are running into this. + + * Misc/WebKitVersionChecks.h: Add the WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK define. + * WebView/WebDocumentLoaderMac.mm: + (needsDataLoadWorkaround): Use WEBKIT_FIRST_VERSION_WITHOUT_ADOBE_INSTALLER_QUIRK sicne the + WebKitLinkedOnOrAfter check here was about the Adobe installer, not VitalSource. + * WebView/WebView.mm: + (-[WebView stringByEvaluatingJavaScriptFromString:]): Remove the bundle ID check and use + WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK for the WebKitLinkedOnOrAfter call. + +2007-11-08 Kevin McCullough <kmccullough@apple.com> + + Build Fix. + + * WebCoreSupport/WebFrameLoaderClient.h: + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::windowObjectCleared): + +2007-11-07 Darin Adler <darin@apple.com> + + Reviewed by Steve. + + - removed some unused WebCore bridge methods + + * WebCoreSupport/WebFrameBridge.mm: Removed issueTransposeCommand and overrideMediaType. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::overrideMediaType): Changed to call WebView directly instead of + using the bridge object. + +2007-11-06 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Dave Kilzer. + + Move Mac files from WebKit into WebKit/mac. + + * Carbon: Copied from WebKit/Carbon. + * ChangeLog: Copied from WebKit/ChangeLog. + * ChangeLog-2002-12-03: Copied from WebKit/ChangeLog-2002-12-03. + * ChangeLog-2006-02-09: Copied from WebKit/ChangeLog-2006-02-09. + * ChangeLog-2007-10-14: Copied from WebKit/ChangeLog-2007-10-14. + * Configurations: Copied from WebKit/Configurations. + * DOM: Copied from WebKit/DOM. + * DefaultDelegates: Copied from WebKit/DefaultDelegates. + * ForwardingHeaders: Copied from WebKit/ForwardingHeaders. + * History: Copied from WebKit/History. + * Info.plist: Copied from WebKit/Info.plist. + * MigrateHeaders.make: Copied from WebKit/MigrateHeaders.make. + * Misc: Copied from WebKit/Misc. + * Panels: Copied from WebKit/Panels. + * Plugins: Copied from WebKit/Plugins. + * PublicHeaderChangesFromTiger.txt: Copied from WebKit/PublicHeaderChangesFromTiger.txt. + * Resources: Copied from WebKit/Resources. + * WebCoreSupport: Copied from WebKit/WebCoreSupport. + * WebInspector: Copied from WebKit/WebInspector. + * WebKit.exp: Copied from WebKit/WebKit.exp. + * WebKit.order: Copied from WebKit/WebKit.order. + * WebKitPrefix.h: Copied from WebKit/WebKitPrefix.h. + * WebView: Copied from WebKit/WebView. + * icu: Copied from WebKit/icu. + +2007-11-06 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=15847 + Some editing cleanup + + No change in functionality. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView deleteToEndOfLine:]): + (-[WebHTMLView deleteToEndOfParagraph:]): + WebCore had a duplicate of the same logic already. We are passing a boundary value to + a function that expects granularity, this may need to be straightened out in the future. + +2007-11-05 John Sullivan <sullivan@apple.com> + + * WebView/WebView.mm: + (-[WebView _searchWithSpotlightFromMenu:]): + + Teeny style tweak to test svn access on other machine + +2007-11-05 John Sullivan <sullivan@apple.com> + + * WebView/WebView.mm: + (-[WebView computedStyleForElement:pseudoElement:]): + + Teeny style tweak to test svn access + +2007-11-02 Tristan O'Tierney <tristan@apple.com> + + Reviewed by Darin Adler. + + * DefaultDelegates/WebDefaultUIDelegate.m: + (-[WebDefaultUIDelegate webView:createWebViewWithRequest:windowFeatures:]): + Forward the UI delegate to call webView:createWebViewWithRequest: if + this method doesn't exist. + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchCreatePage): + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView loadPluginRequest:]): + * WebView/WebView.mm: + (-[WebView _openNewWindowWithRequest:]): + Revised to use new webView:createWebViewWithRequest:windowFeatures: callback. + + * WebCoreSupport/WebChromeClient.h: + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::createWindow): + Added a new createWindow that accepts 3 parameters, so we can pass up windowFeatures to the chrome. + Removed createModalDialog to use new createWindow function. + + * WebView/WebUIDelegatePrivate.h: + Added new webView:createWebViewWithRequest:windowFeatures: method. + +2007-11-05 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=15835 + + Small adaptations to new KJS::List class. + + * ForwardingHeaders/kjs/value.h: Added. + +2007-11-03 David D. Kilzer <ddkilzer@webkit.org> + + Sort files(...); sections of Xcode project files. + + Rubber-stamped by Darin Adler. + + * WebKit.xcodeproj/project.pbxproj: + +2007-11-02 Antti Koivisto <antti@apple.com> + + Reviewed by Darin Adler. + + Add method to enable video composition. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2007-11-02 Darin Adler <darin@apple.com> + + Reviewed by Mitz. + + - fix problem I ran into while doing some testing on Mac for + <rdar://problem/5530185> WebKit does not show <object> + fallback content when both URL and MIME type is omitted + + I don't know how to reproduce this failure in DumpRenderTree, so there is no + regression test. + + * Plugins/WebNullPluginView.h: Removed some unneeded declarations, including + the didSendError local variable. Instead we just set the error to nil once + we've sent it. + * Plugins/WebNullPluginView.mm: + (-[WebNullPluginView initWithFrame:error:DOMElement:]): Refactored so that + the null plug-in image code is separate from the rest of the function and + so that the whole thing is not inside an if statement. Also don't hold a + reference to the DOM element if there is no error to report. + (-[WebNullPluginView reportFailure]): Added. Does the actual delegate + callback. Happens back at the top level of the run loop so it doesn't + fire deep inside layout. Also wrote this so that it is guaranteed not to + reenter and so that it can handle the case where the delegate destroys + the world (including this object). NOTE: This is not a real, general + solution to the problem of plug-ins that do work inside layout. We will need + a more general fix that works for other plug-ins, and we'll track that with + a separate bug report. + (-[WebNullPluginView viewDidMoveToWindow]): Removed most of the code; + changed so it just does a performSelector:afterDelay:0. + +2007-11-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Fix http://bugs.webkit.org/show_bug.cgi?id=15780 + Bug 15780: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::actionDictionary): Retrieve the mouse event coordinates + in the page coordinate system rather than the client area coordinate system. + +2007-11-01 Dan Bernstein <mitz@apple.com> + + Reviewed by Oliver Hunt. + + - fix an assertion failure when Command-Tabbing out of Safari + + * WebView/WebHTMLView.mm: + (-[WebHTMLView flagsChanged:]): Avoid passing key code 0 down to + WebCore. + +2007-11-01 Justin Garcia <justin.garcia@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/5195056> Huge plain text pastes are slow, time spent in ApplyStyleCommand::doApply + + No need to match style when pasting plain text, since the fragment we build for plain text + won't have any style information on it. + + * WebView/WebHTMLView.mm: + (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): There's no + longer a need to know whether this function chosePlaintext. + (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): + (-[WebHTMLView _documentFragmentFromPasteboard:]): + +2007-10-31 Timothy Hatcher <timothy@apple.com> + + Reviewed by John Sullivan. + + Move the developer extras preference to WebPreferences. + + * WebView/WebPreferenceKeysPrivate.h: Add WebKitDeveloperExtrasEnabledPreferenceKey + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): Initialize WebKitDeveloperExtrasEnabledPreferenceKey to NO. + (-[WebPreferences developerExtrasEnabled]): Check DisableWebKitDeveloperExtras, WebKitDeveloperExtras + and IncludeDebugMenu in addition to WebKitDeveloperExtrasEnabledPreferenceKey. + (-[WebPreferences setDeveloperExtrasEnabled:]): Set WebKitDeveloperExtrasEnabledPreferenceKey. + * WebView/WebPreferencesPrivate.h: Add developerExtrasEnabled and setDeveloperExtrasEnabled:. + * WebView/WebView.mm: + (+[WebView _developerExtrasEnabled]): Removed. + (-[WebView _preferencesChangedNotification:]): Check the WebPreferences object for developerExtrasEnabled. + * WebView/WebViewPrivate.h: Removed _developerExtrasEnabled. + +2007-10-30 David D. Kilzer <ddkilzer@webkit.org> + + Generated files missing from WebCore's Xcode project file + <http://bugs.webkit.org/show_bug.cgi?id=15406> + + Reviewed by Darin Adler. + + Added the following private header files to MigrateHeaders.make: + + - DOMCSSStyleSheetPrivate.h + - DOMEventPrivate.h + - DOMHTMLCollectionPrivate.h + - DOMHTMLEmbedElementPrivate.h + - DOMHTMLIFrameElementPrivate.h + - DOMHTMLObjectElementPrivate.h + - DOMHTMLSelectElementPrivate.h + + * MigrateHeaders.make: + +2007-10-29 Antti Koivisto <antti@apple.com> + + Reviewed by Maciej. + + Some SPIs for media support. + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + +2007-10-29 Timothy Hatcher <timothy@apple.com> + + Reviewed by John Sullivan. + + Various semi-related changes: + - A WebView can now be asked for it's WebInspector. There is one + WebInspector per WebView. + - Refactor the WebInspector class and move obsolete methods to + a special category. + - Add new WebInspector methods to show, hide and show the + console/timeline panels. + - Add an isDisabled method to WebCache. + - Allow WebLocalizableStrings.h to be used in C files. + + * Misc/WebCache.h: Add isDisabled. + * Misc/WebCache.mm: + (+[WebCache isDisabled]): New method. + + * Misc/WebLocalizableStrings.h: Changes to allow use in plain C files. + + * WebCoreSupport/WebInspectorClient.mm: + (-[WebInspectorWindowController showWindow:]): Call super if already visible + so the window will be ordered front. + (-[WebInspectorWindowController showWebInspector:]): Method used by menu items, + so they are enabled and work when the Inspector window is key. + (-[WebInspectorWindowController showErrorConsole:]): Ditto. + (-[WebInspectorWindowController showNetworkTimeline:]): Ditto. + + * WebInspector/WebInspector.h: Add and remove methods. + * WebInspector/WebInspector.mm: + (-[WebInspector webViewClosed]): Called when the WebView is closed/dealloced. + Clears the _webView pointer. + (-[WebInspector show:]): Calls thru to the Page's InspectorController. + (-[WebInspector showConsole:]): Ditto. + (-[WebInspector showTimeline:]): Ditto. + (-[WebInspector close:]): Ditto. + (-[WebInspector attach:]): Ditto. + (-[WebInspector detach:]): Ditto. + (+[WebInspector sharedWebInspector]): Moved to the obsolete category. + (+[WebInspector webInspector]): Ditto. + (-[WebInspector setWebFrame:]): Ditto. + (-[WebInspector window]): Ditto. + (-[WebInspector showWindow:]): Ditto. + + * WebView/WebView.mm: + (-[WebViewPrivate dealloc]): Release the WebInspector. + (-[WebView _close]): Call webViewClosed on the WebInspector. + (-[WebView inspector]): Create a WebInspector if needed and return it. + * WebView/WebViewPrivate.h: Add the inspector method. + +2007-10-30 Adele Peterson <adele@apple.com> + + Reviewed by Darin Adler. + + WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577 + <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields + + * WebView/WebHTMLView.mm: + (-[WebHTMLView flagsChanged:]): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field. + (+[WebHTMLView _postFlagsChangedEvent:]): Added a comment with a Radar number for why this isn't just in flagsChanged. + (-[WebHTMLView scrollWheel:]): Instead of calling the next responder explicitly, we can just call super, which will take care of this. + +2007-10-27 Mark Ambachtsheer <mark.a@apple.com> + + Reviewed by Darin Adler. + + Fix for bug 15710, When QD plugins draw to an offscreen bitmap and the plugin is not at + (0, 0) the clipping rectangle is not correct. + Added the origin to the window clip rectangle coordinates to account for plugins that + don't originate at (0,0); affects code for offscreen GWorlds only. + + * Plugins/WebBaseNetscapePluginView.mm: + (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): + +2007-10-26 Adele Peterson <adele@apple.com> + + Reviewed by Oliver. + + Adding WebKitSystemInterface support for the caps lock indicator + + * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): + +2007-10-25 David Hyatt <hyatt@apple.com> + + Fix for bug 15672, backgrounds don't tile properly inside transforms. This patch fixes tiling + of backgrounds inside CSS transforms and also of HTML content with background images inside SVG + transforms. + + Reviewed by aroben and mmitz + + * WebCoreSupport/WebSystemInterface.m: + (InitWebCoreSystemInterface): + * WebKit.xcodeproj/project.pbxproj: + +2007-10-25 John Sullivan <sullivan@apple.com> + + Reviewed by Tim Hatcher + + Removed the support for toggling whether WebKit uses the 10.5 PDFKit improvements. Now it + always does, when available. + + * WebView/WebPreferencesPrivate.h: + removed _usePDFPreviewView and _setUsePDFPreviewView:. Note that these were guarded with + a comment that says that they can be removed when no longer needed. That time is now. + + * WebView/WebPreferences.m: + (+[WebPreferences initialize]): + removed WebKitUsePDFPreviewViewPreferenceKey + (-[WebPreferences _usePDFPreviewView]): + removed + (-[WebPreferences _setUsePDFPreviewView:]): + removed + + * WebView/WebPDFView.mm: + (-[WebPDFView initWithFrame:]): + don't check _usePDFPreviewView + + * WebView/WebPreferenceKeysPrivate.h: + removed WebKitUsePDFPreviewViewPreferenceKey + +2007-10-24 Timothy Hatcher <timothy@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/5069711> OpenSource version of libWebKitSystemInterface.a is Tiger only, causes issues if used on Leopard + + Use the WebKitSystemInterface that matches the system version. + + * Configurations/DebugRelease.xcconfig: + * WebKit.xcodeproj/project.pbxproj: + +2007-10-24 Brady Eidson <beidson@apple.com> + + Reviewed by Anders + + <rdar://problem/5554130> DatabaseTracker.o has a global initializer + + * Misc/WebDatabaseManager.mm: + (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one + +2007-10-23 Mark Rowe <mrowe@apple.com> + + Build fix for Eric's build fix in r26916. + + * MigrateHeaders.make: + +2007-10-22 Eric Seidel <eric@webkit.org> + + Reviewed by Maciej. + + * MigrateHeaders.make: copy over font-face related DOM headers + +2007-10-22 Andrew Wellington <proton@wiretapped.net> + + Reviewed by Mark Rowe. + + Fix for local database support after r26879 + Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set + + * Configurations/WebKit.xcconfig: + +2007-10-19 Brady Eidson <beidson@apple.com> + + Reviewed by Tim Hatcher + + Added support for Chrome prompts required by the Storage API + Added support API for future managing of databases from the WebKit client + Added preference and initialization for the databases path + + * Misc/WebDatabaseManager.h: Added. WebDatabaseManager is how a WebKit application can list and + remove the current available databases + * Misc/WebDatabaseManager.mm: Added. + (+[WebDatabaseManager origins]): + (+[WebDatabaseManager databasesWithOrigin:]): + (+[WebDatabaseManager deleteAllDatabases]): + (+[WebDatabaseManager deleteAllDatabasesWithOrigin:]): + (+[WebDatabaseManager deleteDatabaseWithOrigin:named:]): + (WebKitSetWebDatabasesPathIfNecessary): Setup the database path + * Misc/WebDatabaseManagerPrivate.h: Added. + + * WebCoreSupport/WebChromeClient.h: Support for calling the delegate to run the prompt for + an origin exceeding its size limit + * WebCoreSupport/WebChromeClient.mm: + (WebChromeClient::runDatabaseSizeLimitPrompt): + * WebKit.xcodeproj/project.pbxproj: + * WebView/WebUIDelegate.h: + + * WebView/WebView.mm: + (-[WebView _commonInitializationWithFrameName:groupName:]): Setup the database path + * WebView/WebViewInternal.h: + +2007-10-19 John Sullivan <sullivan@apple.com> + + Reviewed by Tim Hatcher + + - fixed <rdar://problem/5540325> REGRESSION (2.0.4-3): History menu looks odd after clearing history + + * History/WebHistory.mm: + (-[WebHistoryPrivate removeAllItems]): + This was fallout from r25275. We need to clear the orderedLastVisitedDays cache here, in addition + to the other places where it's cleared. + +2007-10-18 Dan Bernstein <mitz@apple.com> + + Tiger build fix. + + * WebView/WebDataSource.mm: + (-[WebDataSource _MIMETypeOfResponse:]): + +2007-10-18 Dan Bernstein <mitz@apple.com> + + Reviewed by Adam Roben. + + - fix <rdar://problem/5313523> + REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::makeDocumentView): Changed to use _responseMIMEType. + * WebView/WebDataSource.mm: + (-[WebDataSource _MIMETypeOfResponse:]): Added. Works around + <rdar://problem/5321972> by testing for the case of an NSHTTPURLResponse + with a MIMEType of application/octet-stream and a Content-Type header + starting with text/plain and returning text/plain as the MIME type in + that case. + (-[WebDataSource _responseMIMEType]): Added. Used to get the correct + response MIME type. + (-[WebDataSource _isDocumentHTML]): Changed to use _responseMIMEType. + (-[WebDataSource _makeRepresentation]): Ditto. + (-[WebDataSource mainResource]): Ditto. + (-[WebDataSource subresources]): Changed to use _MIMETypeOfResponse and + pass the MIME type explicitly. + (-[WebDataSource subresourceForURL:]): Ditto. + * WebView/WebDataSourcePrivate.h: + * WebView/WebFrameView.mm: + (-[WebFrameView _makeDocumentViewForDataSource:]): Changed to use + _responseMIMEType. + * WebView/WebResource.mm: + (-[WebResource _initWithData:URL:response:MIMEType:]): Changed this + method to take a MIME type instead of extracting it from the response, + so that WebDataSource could pass the correct MIME type. + * WebView/WebResourcePrivate.h: + +2007-10-17 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + - fix <rdar://problem/5183775> Uninitialized memory in -[WebDynamicScrollBarsView updateScrollers] + + * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView updateScrollers]): + Change code path so it doesn't dispatch a method that returns an NSSize passing a nil object. + It's safe to do that for functions that return integers or pointers, but not structures. + +2007-10-16 David Kilzer <ddkilzer@apple.com> + + Reviewed by Timothy. + + <rdar://problem/5544354> Wrong delegate method called in + WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() + + * WebCoreSupport/WebFrameLoaderClient.mm: + (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Fixed selector name. + +2007-10-16 Darin Adler <darin@apple.com> + + Reviewed by Adele. + + - moved transpose command implementation into WebCore + + * WebView/WebHTMLView.mm: Removed transpose: and replaced it with standard WebCore forwarding. + +2007-10-16 Darin Adler <darin@apple.com> + + Reviewed by Maciej and Geoff (and looked over by Eric). + + - http://bugs.webkit.org/show_bug.cgi?id=15519 + eliminate use of <ctype.h> for processing ASCII + + * ForwardingHeaders/wtf/ASCIICType.h: Added. + * ForwardingHeaders/wtf/DisallowCType.h: Added. + + * WebKitPrefix.h: Include DisallowCType.h. + + * Misc/WebNSURLExtras.mm: (-[NSURL _web_URLWithLowercasedScheme]): Use toASCIILower. + * WebView/WebHTMLView.mm: + (-[WebHTMLView callWebCoreCommand:]): Use toASCIIUpper. + (-[WebTextCompleteController filterKeyDown:]): Add a list of specific character codes, + instead of using ispunct. + +2007-10-16 John Sullivan <sullivan@apple.com> + + Reviewed by Adam Roben + + Cleaned up localizable strings + + * English.lproj/Localizable.strings: + updated + * StringsNotToBeLocalized.txt: + updated + * WebKit.xcodeproj/project.pbxproj: + StringsNotToBeLocalized.txt recently moved but project file wasn't updated to match; now it is + +2007-10-15 Kevin Decker <kdecker@apple.com> + + Reviewed by Darin Adler. + + Fixed: <rdar://problem/5520541> REGRESSION: Broken image when forwarding certain email on Tiger + + * WebCoreSupport/WebFrameBridge.mm: The problem was that we were loading Mail's WebKit plug-in + too soon, which borked some necessary housekeeping on behalf of Mail. The fix is to add a quirk + that treats Tiger Mail's WebKit plug-in like a Netscape plug-in, thus ensuring the plug-in will + load during first layout and not attach time. For this plug-in, loading at first layout is + expected and is consistent with Safari 2 behavior. + +2007-10-15 John Sullivan <sullivan@apple.com> + + Reviewed by Geoff Garen + + Replaced NS_DURING/NS_HANDLER with @try/@catch throughout WebKit + + I made the following changes: + - replaced NS_DURING with @try, and added opening brace if there wasn't one + - replaced NS_HANDLER with @catch (NSException *localException), and added braces if there weren't any + - removed NS_ENDHANDLER, and added a closing brace if there wasn't one + - in a couple of places, fixed indentation therein + + * Misc/WebIconDatabase.mm: + (objectFromPathForKey): + * WebView/WebHTMLView.mm: + (-[WebHTMLView drawSingleRect:]): + (-[WebHTMLView beginDocument]): + (-[WebHTMLView deleteToMark:]): + * WebView/WebView.mm: + (-[WebView initWithCoder:]): + +== Rolled over to ChangeLog-2007-10-14 == diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig index cd462d6..24589c7 100644 --- a/WebKit/mac/Configurations/FeatureDefines.xcconfig +++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig @@ -26,6 +26,9 @@ // WebCore and WebKit. Also the default values of the ENABLE_FEATURE_NAME macros in build-webkit // should match the values below, but they do not need to be in the same order. +// Keep this list of features (not enabled/disabled state) in sync with FeatureDefines.vsprops +// and FeatureDefinesCairo.vsprops in WebKitLibraries/win/tools/vsprops. + // Set any ENABLE_FEATURE_NAME macro to an empty string to disable that feature. ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(MAC_OS_X_VERSION_MAJOR)); @@ -39,14 +42,16 @@ ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING; ENABLE_3D_RENDERING_1070 = ENABLE_3D_RENDERING; ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; +ENABLE_CLIENT_BASED_GEOLOCATION = ENABLE_CLIENT_BASED_GEOLOCATION; ENABLE_DATABASE = ENABLE_DATABASE; -ENABLE_DATAGRID = ENABLE_DATAGRID; +ENABLE_DATAGRID = ; ENABLE_DATALIST = ENABLE_DATALIST; ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE; ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE; ENABLE_FILTERS = ENABLE_FILTERS; -ENABLE_GEOLOCATION = ; +ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; ENABLE_ICONDATABASE = ENABLE_ICONDATABASE; +ENABLE_INDEXED_DATABASE = ; ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER; ENABLE_MATHML = ; ENABLE_NOTIFICATIONS = ; @@ -63,7 +68,8 @@ ENABLE_VIDEO = ENABLE_VIDEO; ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS; ENABLE_WML = ; ENABLE_WORKERS = ENABLE_WORKERS; +ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig index b3bf41d..75f9bd4 100644 --- a/WebKit/mac/Configurations/Version.xcconfig +++ b/WebKit/mac/Configurations/Version.xcconfig @@ -22,7 +22,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MAJOR_VERSION = 532; -MINOR_VERSION = 6; +MINOR_VERSION = 9; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/WebKit/mac/Info.plist b/WebKit/mac/Info.plist index 849742c..7232293 100644 --- a/WebKit/mac/Info.plist +++ b/WebKit/mac/Info.plist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -7,7 +7,7 @@ <key>CFBundleExecutable</key> <string>${PRODUCT_NAME}</string> <key>CFBundleGetInfoString</key> - <string>${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.</string> + <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.</string> <key>CFBundleIdentifier</key> <string>com.apple.${PRODUCT_NAME}</string> <key>CFBundleInfoDictionaryVersion</key> diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make index 072da65..7d01c99 100644 --- a/WebKit/mac/MigrateHeaders.make +++ b/WebKit/mac/MigrateHeaders.make @@ -36,6 +36,8 @@ all : \ $(PUBLIC_HEADERS_DIR)/DOM.h \ $(PUBLIC_HEADERS_DIR)/DOMAbstractView.h \ $(PUBLIC_HEADERS_DIR)/DOMAttr.h \ + $(PRIVATE_HEADERS_DIR)/DOMBlob.h \ + $(INTERNAL_HEADERS_DIR)/DOMBlobInternal.h \ $(PUBLIC_HEADERS_DIR)/DOMCDATASection.h \ $(PUBLIC_HEADERS_DIR)/DOMCSS.h \ $(PUBLIC_HEADERS_DIR)/DOMCSSCharsetRule.h \ diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm index 6013a5f..b29f720 100644 --- a/WebKit/mac/Misc/WebCache.mm +++ b/WebKit/mac/Misc/WebCache.mm @@ -115,8 +115,10 @@ [WebView _setCacheModel:WebCacheModelDocumentViewer]; [WebView _setCacheModel:cacheModel]; +#if ENABLE(OFFLINE_WEB_APPLICATIONS) // Empty the application cache. WebCore::cacheStorage().empty(); +#endif // Empty the Cross-Origin Preflight cache WebCore::CrossOriginPreflightResultCache::shared().empty(); diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm index aa703e0..7779392 100644 --- a/WebKit/mac/Misc/WebElementDictionary.mm +++ b/WebKit/mac/Misc/WebElementDictionary.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -91,6 +91,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self) addLookupKey(WebElementLinkLabelKey, @selector(_textContent)); addLookupKey(WebElementLinkIsLiveKey, @selector(_isLiveLink)); addLookupKey(WebElementIsContentEditableKey, @selector(_isContentEditable)); + addLookupKey(WebElementIsInScrollBarKey, @selector(_isInScrollBar)); } - (id)initWithHitTestResult:(const HitTestResult&)result @@ -254,4 +255,9 @@ static NSString* NSStringOrNil(String coreString) return [NSNumber numberWithBool:_result->isContentEditable()]; } +- (NSNumber *)_isInScrollBar +{ + return [NSNumber numberWithBool:_result->scrollbar() != 0]; +} + @end diff --git a/WebKit/mac/Misc/WebKitErrors.m b/WebKit/mac/Misc/WebKitErrors.m index ec42dc9..09aa907 100644 --- a/WebKit/mac/Misc/WebKitErrors.m +++ b/WebKit/mac/Misc/WebKitErrors.m @@ -53,6 +53,10 @@ NSString * const WebKitErrorPlugInPageURLStringKey = @"WebKitErrorPlugInPageU #define WebKitErrorDescriptionPlugInCancelledConnection UI_STRING("Plug-in cancelled", "WebKitErrorPlugInCancelledConnection description") #define WebKitErrorDescriptionPlugInWillHandleLoad UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description") +// Geolocations errors + +#define WebKitErrorDescriptionGeolocationLocationUnknown UI_STRING("The current location cannot be found.", "WebKitErrorGeolocationLocationUnknown description") + static pthread_once_t registerErrorsControl = PTHREAD_ONCE_INIT; static void registerErrors(void); @@ -161,6 +165,9 @@ static void registerErrors() WebKitErrorDescriptionJavaUnavailable, [NSNumber numberWithInt: WebKitErrorJavaUnavailable], WebKitErrorDescriptionPlugInCancelledConnection, [NSNumber numberWithInt: WebKitErrorPlugInCancelledConnection], WebKitErrorDescriptionPlugInWillHandleLoad, [NSNumber numberWithInt: WebKitErrorPlugInWillHandleLoad], + + // Geolocation errors + WebKitErrorDescriptionGeolocationLocationUnknown, [NSNumber numberWithInt: WebKitErrorGeolocationLocationUnknown], nil]; [NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain]; diff --git a/WebKit/mac/Misc/WebKitErrorsPrivate.h b/WebKit/mac/Misc/WebKitErrorsPrivate.h index 6a98c4e..eee50a0 100644 --- a/WebKit/mac/Misc/WebKitErrorsPrivate.h +++ b/WebKit/mac/Misc/WebKitErrorsPrivate.h @@ -41,6 +41,15 @@ enum { WebKitErrorCannotUseRestrictedPort = 103, }; +/*! + @enum + @abstract Geolocation errors + @constant WebKitErrorGeolocationLocationUnknown +*/ +enum { + WebKitErrorGeolocationLocationUnknown = 300, +}; + @interface NSError (WebKitExtras) + (NSError *)_webKitErrorWithCode:(int)code failingURL:(NSString *)URL; + (NSError *)_webKitErrorWithDomain:(NSString *)domain code:(int)code URL:(NSURL *)URL; diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h index 946c8ac..34cea32 100644 --- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h +++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.h @@ -70,6 +70,8 @@ public: void cancelLoad(NPReason reason); + static NPReason reasonForError(NSError* error); + private: NSError *errorForReason(NPReason) const; void cancelLoad(NSError *); diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm index 5c25ef7..98b5a7e 100644 --- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm +++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm @@ -183,7 +183,7 @@ void HostedNetscapePluginStream::didReceiveResponse(NetscapePlugInStreamLoader*, startStream([r URL], expectedContentLength, WKGetNSURLResponseLastModifiedDate(r), [r MIMEType], theHeaders); } -static NPReason reasonForError(NSError *error) +NPReason HostedNetscapePluginStream::reasonForError(NSError *error) { if (!error) return NPRES_DONE; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h index 9e29062..e62d87a 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h @@ -43,7 +43,7 @@ class NetscapePluginHostManager { public: static NetscapePluginHostManager& shared(); - PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled); + PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(WebNetscapePluginPackage *, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled); void pluginHostDied(NetscapePluginHostProxy*); @@ -52,12 +52,12 @@ public: void didCreateWindow(); private: - NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *); + NetscapePluginHostProxy* hostForPackage(WebNetscapePluginPackage *, bool useProxiedOpenPanel); NetscapePluginHostManager(); ~NetscapePluginHostManager(); - bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN); + bool spawnPluginHost(WebNetscapePluginPackage *, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel); bool initializeVendorPort(); diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm index 6b36a6d..281d41f 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm @@ -31,7 +31,10 @@ #import "NetscapePluginInstanceProxy.h" #import "WebLocalizableStrings.h" #import "WebKitSystemInterface.h" +#import "WebHostedNetscapePluginView.h" #import "WebNetscapePluginPackage.h" +#import "WebPreferencesPrivate.h" +#import "WebView.h" #import <mach/mach_port.h> #import <servers/bootstrap.h> #import <spawn.h> @@ -66,7 +69,7 @@ NetscapePluginHostManager::~NetscapePluginHostManager() { } -NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package) +NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePluginPackage *package, bool useProxiedOpenPanel) { pair<PluginHostMap::iterator, bool> result = m_pluginHosts.add(package, 0); @@ -82,7 +85,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl mach_port_t pluginHostPort; ProcessSerialNumber pluginHostPSN; - if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN)) { + if (!spawnPluginHost(package, clientPort, pluginHostPort, pluginHostPSN, useProxiedOpenPanel)) { mach_port_destroy(mach_task_self(), clientPort); m_pluginHosts.remove(result.first); return 0; @@ -100,7 +103,7 @@ NetscapePluginHostProxy* NetscapePluginHostManager::hostForPackage(WebNetscapePl return hostProxy; } -bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN) +bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *package, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN, bool useProxiedOpenPanel) { if (m_pluginVendorPort == MACH_PORT_NULL) { if (!initializeVendorPort()) @@ -120,6 +123,7 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag pluginHostAppExecutablePath, @"pluginHostPath", [NSNumber numberWithInt:[package pluginHostArchitecture]], @"cpuType", localization.get(), @"localization", + [NSNumber numberWithBool:useProxiedOpenPanel], @"useProxiedOpenPanel", nil]; NSData *data = [NSPropertyListSerialization dataFromPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:0]; @@ -211,9 +215,10 @@ void NetscapePluginHostManager::pluginHostDied(NetscapePluginHostProxy* pluginHo } } -PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled) +PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(WebNetscapePluginPackage *pluginPackage, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled) { - NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage); + WebPreferences *preferences = [[pluginView webView] preferences]; + NetscapePluginHostProxy* hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]); if (!hostProxy) return 0; @@ -236,7 +241,8 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl [properties.get() setObject:[NSNumber numberWithBool:fullFrame] forKey:@"fullFrame"]; [properties.get() setObject:[NSNumber numberWithBool:isPrivateBrowsingEnabled] forKey:@"privateBrowsingEnabled"]; - + [properties.get() setObject:[NSNumber numberWithBool:isAcceleratedCompositingEnabled] forKey:@"acceleratedCompositingEnabled"]; + NSData *data = [NSPropertyListSerialization dataFromPropertyList:properties.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil]; ASSERT(data); @@ -251,7 +257,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl pluginHostDied(hostProxy); // Try to spawn it again. - hostProxy = hostForPackage(pluginPackage); + hostProxy = hostForPackage(pluginPackage, [preferences usesProxiedOpenPanel]); // Create a new instance. instance = NetscapePluginInstanceProxy::create(hostProxy, pluginView, fullFrame); diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h index c3b58de..cd3729f 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.h @@ -50,10 +50,13 @@ public: void removePluginInstance(NetscapePluginInstanceProxy*); NetscapePluginInstanceProxy* pluginInstance(uint32_t pluginID); - + bool isMenuBarVisible() const { return m_menuBarIsVisible; } void setMenuBarVisible(bool); - + + bool isFullScreenWindowShowing() const { return m_fullScreenWindowIsShowing; } + void setFullScreenWindowIsShowing(bool); + void setModal(bool); void applicationDidBecomeActive(); @@ -69,8 +72,11 @@ private: void beginModal(); void endModal(); - - static void deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info); + + void didEnterFullScreen() const; + void didExitFullScreen() const; + + static void deadNameNotificationCallback(CFMachPortRef, void *msg, CFIndex size, void *info); typedef HashMap<uint32_t, RefPtr<NetscapePluginInstanceProxy> > PluginInstanceMap; PluginInstanceMap m_instances; @@ -90,10 +96,11 @@ private: RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow; unsigned m_isModal; bool m_menuBarIsVisible; + bool m_fullScreenWindowIsShowing; const ProcessSerialNumber m_pluginHostPSN; - + unsigned m_processingRequests; - + bool m_shouldCacheMissingPropertiesAndMethods; }; diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm index 970f5f5..0e6c9a3 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm @@ -94,6 +94,7 @@ NetscapePluginHostProxy::NetscapePluginHostProxy(mach_port_t clientPort, mach_po , m_pluginHostPort(pluginHostPort) , m_isModal(false) , m_menuBarIsVisible(true) + , m_fullScreenWindowIsShowing(false) , m_pluginHostPSN(pluginHostPSN) , m_processingRequests(0) , m_shouldCacheMissingPropertiesAndMethods(shouldCacheMissingPropertiesAndMethods) @@ -196,14 +197,42 @@ void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, v void NetscapePluginHostProxy::setMenuBarVisible(bool visible) { m_menuBarIsVisible = visible; - + [NSMenu setMenuBarVisible:visible]; - if (visible) { - // Make ourselves the front app - ProcessSerialNumber psn; - GetCurrentProcess(&psn); - SetFrontProcess(&psn); - } +} + +void NetscapePluginHostProxy::didEnterFullScreen() const +{ + SetFrontProcess(&m_pluginHostPSN); +} + +void NetscapePluginHostProxy::didExitFullScreen() const +{ + // If the plug-in host is the current application then we should bring ourselves to the front when it exits full-screen mode. + + ProcessSerialNumber frontProcess; + GetFrontProcess(&frontProcess); + Boolean isSameProcess = 0; + SameProcess(&frontProcess, &m_pluginHostPSN, &isSameProcess); + if (!isSameProcess) + return; + + ProcessSerialNumber currentProcess; + GetCurrentProcess(¤tProcess); + SetFrontProcess(¤tProcess); +} + +void NetscapePluginHostProxy::setFullScreenWindowIsShowing(bool isShowing) +{ + if (m_fullScreenWindowIsShowing == isShowing) + return; + + m_fullScreenWindowIsShowing = isShowing; + if (m_fullScreenWindowIsShowing) + didEnterFullScreen(); + else + didExitFullScreen(); + } void NetscapePluginHostProxy::applicationDidBecomeActive() @@ -875,7 +904,18 @@ kern_return_t WKPCSetMenuBarVisible(mach_port_t clientPort, boolean_t menuBarVis return KERN_FAILURE; hostProxy->setMenuBarVisible(menuBarVisible); - + + return KERN_SUCCESS; +} + +kern_return_t WKPCSetFullScreenWindowIsShowing(mach_port_t clientPort, boolean_t fullScreenWindowIsShowing) +{ + NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); + if (!hostProxy) + return KERN_FAILURE; + + hostProxy->setFullScreenWindowIsShowing(fullScreenWindowIsShowing); + return KERN_SUCCESS; } @@ -1058,4 +1098,55 @@ kern_return_t WKPCResolveURL(mach_port_t clientPort, uint32_t pluginID, data_t u return KERN_SUCCESS; } +#if !defined(BUILDING_ON_SNOW_LEOPARD) +kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength) +{ + DataDeallocator panelDataDeallocator(panelData, panelDataLength); + + NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort); + if (!hostProxy) + return KERN_FAILURE; + + NSOpenPanel *sheet = [NSOpenPanel openPanel]; + NSDictionary *panelState = [NSPropertyListSerialization propertyListFromData:[NSData dataWithBytes:panelData length:panelDataLength] + mutabilityOption:NSPropertyListImmutable + format:NULL + errorDescription:nil]; + + [sheet setCanChooseFiles:[[panelState objectForKey:@"canChooseFiles"] boolValue]]; + [sheet setCanChooseDirectories:[[panelState objectForKey:@"canChooseDirectories"] boolValue]]; + [sheet setResolvesAliases:[[panelState objectForKey:@"resolvesAliases"] boolValue]]; + [sheet setAllowsMultipleSelection:[[panelState objectForKey:@"allowsMultipleSelection"] boolValue]]; + [sheet setCanCreateDirectories:[[panelState objectForKey:@"canCreateDirectories"] boolValue]]; + [sheet setShowsHiddenFiles:[[panelState objectForKey:@"showsHiddenFiles"] boolValue]]; + [sheet setExtensionHidden:[[panelState objectForKey:@"isExtensionHidden"] boolValue]]; + [sheet setCanSelectHiddenExtension:[[panelState objectForKey:@"canSelectHiddenExtension"] boolValue]]; + [sheet setAllowsOtherFileTypes:[[panelState objectForKey:@"allowsOtherFileTypes"] boolValue]]; + [sheet setTreatsFilePackagesAsDirectories:[[panelState objectForKey:@"treatsFilePackagesAsDirectories"] boolValue]]; + [sheet setPrompt:[panelState objectForKey:@"prompt"]]; + [sheet setNameFieldLabel:[panelState objectForKey:@"nameFieldLabel"]]; + [sheet setMessage:[panelState objectForKey:@"message"]]; + [sheet setAllowedFileTypes:[panelState objectForKey:@"allowedFileTypes"]]; + [sheet setRequiredFileType:[panelState objectForKey:@"requiredFileType"]]; + [sheet setTitle:[panelState objectForKey:@"title"]]; + [sheet runModal]; + + NSDictionary *ret = [NSDictionary dictionaryWithObjectsAndKeys: + [sheet filenames], @"filenames", + WKNoteOpenPanelFiles([sheet filenames]), @"extensions", + nil]; + + RetainPtr<NSData*> data = [NSPropertyListSerialization dataFromPropertyList:ret format:NSPropertyListBinaryFormat_v1_0 errorDescription:0]; + ASSERT(data); + + _WKPHSyncOpenPanelReply(hostProxy->port(), const_cast<char *>(static_cast<const char*>([data.get() bytes])), [data.get() length]); + return KERN_SUCCESS; +} +#else +kern_return_t WKPCRunSyncOpenPanel(mach_port_t clientPort, data_t panelData, mach_msg_type_number_t panelDataLength) +{ + return KERN_FAILURE; +} +#endif // !defined(BUILDING_ON_SNOW_LEOPARD) + #endif // USE(PLUGIN_HOST_PROCESS) diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h index c950ab7..2ef6b02 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -49,11 +49,13 @@ namespace JSC { } } @class WebHostedNetscapePluginView; +@class WebFrame; namespace WebKit { class HostedNetscapePluginStream; class NetscapePluginHostProxy; +class PluginRequest; class ProxyInstance; class NetscapePluginInstanceProxy : public RefCounted<NetscapePluginInstanceProxy> { @@ -247,6 +249,8 @@ public: template <typename T> std::auto_ptr<T> waitForReply(uint32_t requestID) { + willCallPluginFunction(); + m_waitingForReply = true; Reply* reply = processRequestsAndWaitForReply(requestID); @@ -254,13 +258,18 @@ public: ASSERT(reply->m_type == T::ReplyType); m_waitingForReply = false; + + didCallPluginFunction(); + return std::auto_ptr<T>(static_cast<T*>(reply)); } + void webFrameDidFinishLoadWithReason(WebFrame*, NPReason); + private: - NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView *, bool fullFramePlugin); + NetscapePluginInstanceProxy(NetscapePluginHostProxy*, WebHostedNetscapePluginView*, bool fullFramePlugin); - NPError loadRequest(NSURLRequest *, const char* cTarget, bool currentEventIsUserGesture, uint32_t& streamID); + NPError loadRequest(NSURLRequest*, const char* cTarget, bool currentEventIsUserGesture, uint32_t& streamID); class PluginRequest; void performRequest(PluginRequest*); @@ -274,7 +283,7 @@ private: void requestTimerFired(WebCore::Timer<NetscapePluginInstanceProxy>*); WebCore::Timer<NetscapePluginInstanceProxy> m_requestTimer; - Deque<PluginRequest*> m_pluginRequests; + Deque<RefPtr<PluginRequest> > m_pluginRequests; HashMap<uint32_t, RefPtr<HostedNetscapePluginStream> > m_streams; @@ -313,6 +322,9 @@ private: bool m_pluginIsWaitingForDraw; RefPtr<HostedNetscapePluginStream> m_manualStream; + + typedef HashMap<WebFrame*, RefPtr<PluginRequest> > FrameLoadMap; + FrameLoadMap m_pendingFrameLoads; }; } // namespace WebKit diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm index 4ae0220..187b0ea 100644 --- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm +++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -72,9 +72,20 @@ using namespace WebCore; namespace WebKit { -class NetscapePluginInstanceProxy::PluginRequest { +class NetscapePluginInstanceProxy::PluginRequest : public RefCounted<NetscapePluginInstanceProxy::PluginRequest> { public: - PluginRequest(uint32_t requestID, NSURLRequest *request, NSString *frameName, bool allowPopups) + static PassRefPtr<PluginRequest> create(uint32_t requestID, NSURLRequest* request, NSString* frameName, bool allowPopups) + { + return adoptRef(new PluginRequest(requestID, request, frameName, allowPopups)); + } + + uint32_t requestID() const { return m_requestID; } + NSURLRequest* request() const { return m_request.get(); } + NSString* frameName() const { return m_frameName.get(); } + bool allowPopups() const { return m_allowPopups; } + +private: + PluginRequest(uint32_t requestID, NSURLRequest* request, NSString* frameName, bool allowPopups) : m_requestID(requestID) , m_request(request) , m_frameName(frameName) @@ -82,15 +93,9 @@ public: { } - uint32_t requestID() const { return m_requestID; } - NSURLRequest *request() const { return m_request.get(); } - NSString *frameName() const { return m_frameName.get(); } - bool allowPopups() const { return m_allowPopups; } - -private: uint32_t m_requestID; - RetainPtr<NSURLRequest *> m_request; - RetainPtr<NSString *> m_frameName; + RetainPtr<NSURLRequest*> m_request; + RetainPtr<NSString*> m_frameName; bool m_allowPopups; }; @@ -212,6 +217,10 @@ void NetscapePluginInstanceProxy::destroy() m_inDestroy = true; + FrameLoadMap::iterator end = m_pendingFrameLoads.end(); + for (FrameLoadMap::iterator it = m_pendingFrameLoads.begin(); it != end; ++it) + [(it->first) _setInternalLoadDelegate:nil]; + _WKPHDestroyPluginInstance(m_pluginHostProxy->port(), m_pluginID, requestID); // If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy @@ -517,8 +526,33 @@ void NetscapePluginInstanceProxy::performRequest(PluginRequest* pluginRequest) if (JSString) { ASSERT(!frame || [m_pluginView webFrame] == frame); evaluateJavaScript(pluginRequest); - } else + } else { [frame loadRequest:request]; + + // Check if another plug-in view or even this view is waiting for the frame to load. + // If it is, tell it that the load was cancelled because it will be anyway. + WebHostedNetscapePluginView *view = [frame _internalLoadDelegate]; + if (view != nil) { + ASSERT([view isKindOfClass:[WebHostedNetscapePluginView class]]); + [view webFrame:frame didFinishLoadWithReason:NPRES_USER_BREAK]; + } + m_pendingFrameLoads.set(frame, pluginRequest); + [frame _setInternalLoadDelegate:m_pluginView]; + } + +} + +void NetscapePluginInstanceProxy::webFrameDidFinishLoadWithReason(WebFrame* webFrame, NPReason reason) +{ + FrameLoadMap::iterator it = m_pendingFrameLoads.find(webFrame); + ASSERT(it != m_pendingFrameLoads.end()); + + PluginRequest* pluginRequest = it->second.get(); + _WKPHLoadURLNotify(m_pluginHostProxy->port(), m_pluginID, pluginRequest->requestID(), reason); + + m_pendingFrameLoads.remove(it); + + [webFrame _setInternalLoadDelegate:nil]; } void NetscapePluginInstanceProxy::evaluateJavaScript(PluginRequest* pluginRequest) @@ -557,14 +591,13 @@ void NetscapePluginInstanceProxy::requestTimerFired(Timer<NetscapePluginInstance ASSERT(!m_pluginRequests.isEmpty()); ASSERT(m_pluginView); - PluginRequest* request = m_pluginRequests.first(); + RefPtr<PluginRequest> request = m_pluginRequests.first(); m_pluginRequests.removeFirst(); if (!m_pluginRequests.isEmpty()) m_requestTimer.startOneShot(0); - performRequest(request); - delete request; + performRequest(request.get()); } NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const char* cTarget, bool allowPopups, uint32_t& requestID) @@ -616,8 +649,8 @@ NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch return NPERR_INVALID_PARAM; } - PluginRequest* pluginRequest = new PluginRequest(requestID, request, target, allowPopups); - m_pluginRequests.append(pluginRequest); + RefPtr<PluginRequest> pluginRequest = PluginRequest::create(requestID, request, target, allowPopups); + m_pluginRequests.append(pluginRequest.release()); m_requestTimer.startOneShot(0); } else { RefPtr<HostedNetscapePluginStream> stream = HostedNetscapePluginStream::create(this, requestID, request); @@ -663,7 +696,7 @@ bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID) if (!frame) return false; - if (!frame->script()->isEnabled()) + if (!frame->script()->canExecuteScripts()) objectID = 0; else objectID = idForObject(frame->script()->windowShell(pluginWorld())->window()); @@ -1168,7 +1201,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr if (!frame) return false; - if (!frame->script()->isEnabled()) + if (!frame->script()->canExecuteScripts()) return false; RefPtr<RootObject> rootObject = frame->script()->createRootObject(m_pluginView); @@ -1220,6 +1253,10 @@ PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef if (_WKPHGetScriptableNPObject(m_pluginHostProxy->port(), m_pluginID, requestID) != KERN_SUCCESS) return 0; + + // If the plug-in host crashes while we're waiting for a reply, the last reference to the instance proxy + // will go away. Prevent this by protecting it here. + RefPtr<NetscapePluginInstanceProxy> protect(this); auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID); if (!reply.get()) diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.h b/WebKit/mac/Plugins/Hosted/ProxyInstance.h index f84c685..138a316 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.h +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All Rights Reserved. + * Copyright (C) 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,15 +28,22 @@ #ifndef ProxyInstance_h #define ProxyInstance_h +<<<<<<< HEAD #include <WebCore/Bridge.h> #include <WebCore/runtime_root.h> #include <wtf/OwnPtr.h> #include "WebKitPluginHostTypes.h" +======= +#import "NetscapePluginInstanceProxy.h" +#import "WebKitPluginHostTypes.h" +#import <WebCore/Bridge.h> +#import <WebCore/runtime_root.h> +#import <wtf/OwnPtr.h> +>>>>>>> webkit.org at r54127 namespace WebKit { class ProxyClass; -class NetscapePluginInstanceProxy; class ProxyInstance : public JSC::Bindings::Instance { public: @@ -80,6 +87,17 @@ private: JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList& args); + template <typename T> + std::auto_ptr<T> waitForReply(uint32_t requestID) const { + std::auto_ptr<T> reply = m_instanceProxy->waitForReply<T>(requestID); + + // If the instance proxy was invalidated, just return a null reply. + if (!m_instanceProxy) + return std::auto_ptr<T>(); + + return reply; + } + NetscapePluginInstanceProxy* m_instanceProxy; uint32_t m_objectID; JSC::Bindings::FieldMap m_fields; diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm index 6be3953..1af2ef8 100644 --- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm +++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,11 +28,10 @@ #import "ProxyInstance.h" #import "NetscapePluginHostProxy.h" -#import "NetscapePluginInstanceProxy.h" -#import <runtime/PropertyNameArray.h> #import <WebCore/IdentifierRep.h> #import <WebCore/JSDOMWindow.h> #import <WebCore/npruntime_impl.h> +#import <runtime/PropertyNameArray.h> extern "C" { #import "WebKitPluginHost.h" @@ -147,7 +146,7 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id type, identifier, (char*)[arguments.get() bytes], [arguments.get() length]) != KERN_SUCCESS) return jsUndefined(); - auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -175,7 +174,7 @@ bool ProxyInstance::supportsInvokeDefaultMethod() const m_objectID) != KERN_SUCCESS) return false; - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); if (reply.get() && reply->m_result) return true; @@ -199,7 +198,7 @@ bool ProxyInstance::supportsConstruct() const m_objectID) != KERN_SUCCESS) return false; - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); if (reply.get() && reply->m_result) return true; @@ -223,7 +222,7 @@ JSValue ProxyInstance::defaultValue(ExecState* exec, PreferredPrimitiveType hint JSValue ProxyInstance::stringValue(ExecState* exec) const { // FIXME: Implement something sensible. - return jsString(exec, ""); + return jsEmptyString(exec); } JSValue ProxyInstance::numberValue(ExecState* exec) const @@ -253,7 +252,7 @@ void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr if (_WKPHNPObjectEnumerate(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID) != KERN_SUCCESS) return; - auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); if (!reply.get() || !reply->m_returnValue) return; @@ -298,7 +297,7 @@ MethodList ProxyInstance::methodsNamed(const Identifier& identifier) m_objectID, methodName) != KERN_SUCCESS) return MethodList(); - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); if (!reply.get()) return MethodList(); @@ -334,7 +333,7 @@ Field* ProxyInstance::fieldNamed(const Identifier& identifier) m_objectID, propertyName) != KERN_SUCCESS) return 0; - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); if (!reply.get()) return 0; @@ -361,7 +360,7 @@ JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) cons m_objectID, serverIdentifier) != KERN_SUCCESS) return jsUndefined(); - auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); if (!reply.get() || !reply->m_returnValue) return jsUndefined(); @@ -387,7 +386,7 @@ void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v if (kr != KERN_SUCCESS) return; - auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = m_instanceProxy->waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); } void ProxyInstance::invalidate() diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h index 4ff5aba..5313ff2 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h @@ -59,6 +59,9 @@ namespace WebKit { element:(PassRefPtr<WebCore::HTMLPlugInElement>)element; - (void)pluginHostDied; +- (CALayer *)pluginLayer; +- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason; + @end #endif // USE(PLUGIN_HOST_PROCESS) diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm index 8de2aa6..9baa328 100644 --- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm +++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm @@ -37,10 +37,10 @@ #import "WebUIDelegate.h" #import <CoreFoundation/CoreFoundation.h> +#import <WebCore/Bridge.h> #import <WebCore/Frame.h> #import <WebCore/FrameLoaderTypes.h> #import <WebCore/HTMLPlugInElement.h> -#import <WebCore/runtime.h> #import <WebCore/runtime_root.h> #import <WebCore/WebCoreObjCExtras.h> #import <runtime/InitializeThreading.h> @@ -102,9 +102,13 @@ extern "C" { ASSERT(!_proxy); NSString *userAgent = [[self webView] userAgentForURL:_baseURL.get()]; - + BOOL accleratedCompositingEnabled = false; +#if USE(ACCELERATED_COMPOSITING) + accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled]; +#endif + _proxy = NetscapePluginHostManager::shared().instantiatePlugin(_pluginPackage.get(), self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(), - _mode == NP_FULL, _isPrivateBrowsingEnabled); + _mode == NP_FULL, _isPrivateBrowsingEnabled, accleratedCompositingEnabled); if (!_proxy) return NO; @@ -112,7 +116,11 @@ extern "C" { _softwareRenderer = WKSoftwareCARendererCreate(_proxy->renderContextID()); else { _pluginLayer = WKMakeRenderLayer(_proxy->renderContextID()); - self.wantsLayer = YES; + + if (accleratedCompositingEnabled) + [self element]->setNeedsStyleRecalc(SyntheticStyleChange); + else + self.wantsLayer = YES; } // Update the window frame. @@ -121,6 +129,12 @@ extern "C" { return YES; } +// FIXME: This method is an ideal candidate to move up to the base class +- (CALayer *)pluginLayer +{ + return _pluginLayer.get(); +} + - (void)setLayer:(CALayer *)newLayer { // FIXME: This should use the same implementation as WebNetscapePluginView (and move to the base class). @@ -441,6 +455,20 @@ extern "C" { _proxy->checkIfAllowedToLoadURLResult(checkID, (policy == PolicyUse)); } +- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason +{ + if (_isStarted && _proxy) + _proxy->webFrameDidFinishLoadWithReason(webFrame, reason); +} + +- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithError:(NSError *)error +{ + NPReason reason = NPRES_DONE; + if (error) + reason = HostedNetscapePluginStream::reasonForError(error); + [self webFrame:webFrame didFinishLoadWithReason:reason]; +} + @end #endif diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs index 9877d9e..0cf4005 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs @@ -206,7 +206,7 @@ routine PCResolveURL(clientPort :mach_port_t; url :data_t; target :data_t; out resolvedURL :data_t, dealloc); - + // Replies simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t; pluginID :uint32_t; @@ -224,9 +224,15 @@ simpleroutine PCBooleanReply(clientPort :mach_port_t; pluginID :uint32_t; requestID :uint32_t; result :boolean_t); - + simpleroutine PCBooleanAndDataReply(clientPort :mach_port_t; pluginID :uint32_t; requestID :uint32_t; returnValue :boolean_t; result :data_t); + +simpleroutine PCRunSyncOpenPanel(clientPort :mach_port_t; + panelData :data_t); + +simpleroutine PCSetFullScreenWindowIsShowing(clientPort :mach_port_t; + isShowing :boolean_t); diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs index 9882bb5..c7cec89 100644 --- a/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs +++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs @@ -240,4 +240,5 @@ simpleroutine PHPluginInstancePrivateBrowsingModeDidChange(pluginHostPort :mach_ pluginID :uint32_t; privateBrowsingEnabled :boolean_t); - +simpleroutine PHSyncOpenPanelReply(pluginHostPort :mach_port_t; + filenames :data_t); diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h index b2583da..2ee566e 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.h +++ b/WebKit/mac/Plugins/WebNetscapePluginView.h @@ -151,7 +151,9 @@ typedef union PluginPort { @interface WebNetscapePluginView (WebInternal) - (BOOL)sendEvent:(void*)event isDrawRect:(BOOL)eventIsDrawRect; - (NPEventModel)eventModel; - +#ifndef BUILDING_ON_TIGER +- (CALayer *)pluginLayer; +#endif - (NPError)loadRequest:(NSURLRequest *)request inTarget:(NSString *)target withNotifyData:(void *)notifyData sendNotification:(BOOL)sendNotification; - (NPError)getURLNotify:(const char *)URL target:(const char *)target notifyData:(void *)notifyData; - (NPError)getURL:(const char *)URL target:(const char *)target; diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm index 3ce5e39..4a4a435 100644 --- a/WebKit/mac/Plugins/WebNetscapePluginView.mm +++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm @@ -81,6 +81,8 @@ #define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification" #define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification" +#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656 /* TRUE if the browser supports hardware compositing of Core Animation plug-ins */ +static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying bug in <rdar://problem/7288546> */ using namespace WebCore; using namespace WebKit; @@ -1088,10 +1090,18 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) if (drawingModel == NPDrawingModelCoreAnimation) { void *value = 0; if ([_pluginPackage.get() pluginFuncs]->getvalue(plugin, NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) { - + // The plug-in gives us a retained layer. _pluginLayer.adoptNS((CALayer *)value); - [self setWantsLayer:YES]; + + BOOL accleratedCompositingEnabled = false; +#if USE(ACCELERATED_COMPOSITING) + accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled]; +#endif + if (accleratedCompositingEnabled) + [self element]->setNeedsStyleRecalc(SyntheticStyleChange); + else + [self setWantsLayer:YES]; LOG(Plugins, "%@ is using Core Animation drawing model with layer %@", _pluginPackage.get(), _pluginLayer.get()); } @@ -1106,6 +1116,12 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) } #ifndef BUILDING_ON_TIGER +// FIXME: This method is an ideal candidate to move up to the base class +- (CALayer *)pluginLayer +{ + return _pluginLayer.get(); +} + - (void)setLayer:(CALayer *)newLayer { [super setLayer:newLayer]; @@ -2057,6 +2073,13 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) *(WKNBrowserContainerCheckFuncs **)value = browserContainerCheckFuncs(); return NPERR_NO_ERROR; } +#if USE(ACCELERATED_COMPOSITING) + case WKNVSupportsCompositingCoreAnimationPluginsBool: + { + *(NPBool *)value = [[[self webView] preferences] acceleratedCompositingEnabled]; + return NPERR_NO_ERROR; + } +#endif default: break; } @@ -2297,6 +2320,39 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) return NO; } +// Work around Silverlight full screen performance issue by maintaining an accelerated GL pixel format. +// We can safely remove it at some point in the future when both: +// 1) Microsoft releases a genuine fix for 7288546. +// 2) Enough Silverlight users update to the new Silverlight. +// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness. +- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin +{ +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) + ASSERT(_isSilverlight); + NPBool isFullScreenPerformanceIssueFixed = 0; + NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs]; + if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed) + return; + + static CGLPixelFormatObj pixelFormatObject = 0; + static unsigned refCount = 0; + + if (initializedPlugin) { + refCount++; + if (refCount == 1) { + const CGLPixelFormatAttribute attributes[] = { kCGLPFAAccelerated, static_cast<CGLPixelFormatAttribute>(0) }; + GLint npix; + CGLChoosePixelFormat(attributes, &pixelFormatObject, &npix); + } + } else { + ASSERT(pixelFormatObject); + refCount--; + if (!refCount) + CGLReleasePixelFormat(pixelFormatObject); + } +#endif +} + - (NPError)_createPlugin { plugin = (NPP)calloc(1, sizeof(NPP_t)); @@ -2315,6 +2371,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) [[self class] setCurrentPluginView:self]; NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL); [[self class] setCurrentPluginView:nil]; + if (_isSilverlight) + [self _workaroundSilverlightFullScreenBug:YES]; LOG(Plugins, "NPP_New: %d", npErr); return npErr; } @@ -2323,6 +2381,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr) { PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin); + if (_isSilverlight) + [self _workaroundSilverlightFullScreenBug:NO]; + NPError npErr; npErr = ![_pluginPackage.get() pluginFuncs]->destroy(plugin, NULL); LOG(Plugins, "NPP_Destroy: %d", npErr); diff --git a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm index 8eb623d..4ca749c 100644 --- a/WebKit/mac/WebCoreSupport/WebApplicationCache.mm +++ b/WebKit/mac/WebCoreSupport/WebApplicationCache.mm @@ -23,6 +23,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if ENABLE(OFFLINE_WEB_APPLICATIONS) + #import "WebApplicationCache.h" #import <WebCore/ApplicationCacheStorage.h> @@ -38,3 +40,5 @@ using namespace WebCore; } @end + +#endif diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index ca2863e..66381a4 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -152,9 +152,11 @@ public: virtual void scheduleCompositingLayerSync(); #endif +#if ENABLE(VIDEO) virtual bool supportsFullscreenForNode(const WebCore::Node*); virtual void enterFullscreenForNode(WebCore::Node*); virtual void exitFullscreenForNode(WebCore::Node*); +#endif virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index 58323bb..c4e9671 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -490,22 +490,14 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scr { // FIXME: This scrolling behavior should be under the control of the embedding client (rather than something // we just do ourselves). - - IntRect scrollRect = r; - NSView *startView = m_webView; - if ([m_webView _usesDocumentViews]) { - // We have to convert back to document view coordinates. - // It doesn't make sense for the scrollRectIntoView API to take document view coordinates. - scrollRect.move(scrollView->scrollOffset()); - startView = [[[m_webView mainFrame] frameView] documentView]; - } - NSRect rect = scrollRect; - for (NSView *view = startView; view; view = [view superview]) { - if ([view isKindOfClass:[NSClipView class]]) { - NSClipView *clipView = (NSClipView *)view; - NSView *documentView = [clipView documentView]; - [documentView scrollRectToVisible:[documentView convertRect:rect fromView:startView]]; - } + + NSRect rect = r; + for (NSView *view = m_webView; view; view = [view superview]) { + if ([view isKindOfClass:[NSClipView class]]) { + NSClipView *clipView = (NSClipView *)view; + NSView *documentView = [clipView documentView]; + [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]]; + } } } diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 9816e01..5934d7c 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -104,6 +104,7 @@ #import <WebCore/MouseEvent.h> #import <WebCore/Page.h> #import <WebCore/PlatformString.h> +#import <WebCore/PluginWidget.h> #import <WebCore/ResourceError.h> #import <WebCore/ResourceHandle.h> #import <WebCore/ResourceLoader.h> @@ -1474,19 +1475,6 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage, return view; } -class PluginWidget : public Widget { -public: - PluginWidget(NSView *view = 0) - : Widget(view) - { - } - - virtual void invalidateRect(const IntRect& rect) - { - [platformWidget() setNeedsDisplayInRect:rect]; - } -}; - #if ENABLE(NETSCAPE_PLUGIN_API) class NetscapePluginWidget : public PluginWidget { diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h new file mode 100644 index 0000000..3965210 --- /dev/null +++ b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <WebCore/GeolocationControllerClient.h> + +namespace WebCore { + class GeolocationPosition; +} + +@class WebView; + +class WebGeolocationControllerClient : public WebCore::GeolocationControllerClient { +public: + WebGeolocationControllerClient(WebView *); + WebView *webView() { return m_webView; } + + void geolocationDestroyed(); + void startUpdating(); + void stopUpdating(); + + WebCore::GeolocationPosition* lastPosition(); + +private: + WebView *m_webView; +}; diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm new file mode 100644 index 0000000..98ffc72 --- /dev/null +++ b/WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "WebGeolocationControllerClient.h" + +#import "WebGeolocationPositionInternal.h" +#import "WebViewInternal.h" + +using namespace WebCore; + +WebGeolocationControllerClient::WebGeolocationControllerClient(WebView *webView) + : m_webView(webView) +{ +} + +void WebGeolocationControllerClient::geolocationDestroyed() +{ + delete this; +} + +void WebGeolocationControllerClient::startUpdating() +{ + [[m_webView _geolocationProvider] registerWebView:m_webView]; +} + +void WebGeolocationControllerClient::stopUpdating() +{ + [[m_webView _geolocationProvider] unregisterWebView:m_webView]; +} + +GeolocationPosition* WebGeolocationControllerClient::lastPosition() +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + return core([[m_webView _geolocationProvider] lastPosition]); +#else + return 0; +#endif +} diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm index 0c87d19..b59c1f2 100644 --- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm +++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm @@ -46,5 +46,5 @@ bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode, bool isWindowed, bool WebPluginHalterClient::enabled() const { - return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:)]; + return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:isWindowed:pluginName:)]; } diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.m index f2a215d..7f4effd 100644 --- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m +++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.m @@ -31,6 +31,9 @@ #import <WebCore/WebCoreSystemInterface.h> #import <WebKitSystemInterface.h> +// Needed for builds not using PCH to expose BUILDING_ macros, see bug 32753. +#include <wtf/Platform.h> + #define INIT(function) wk##function = WK##function void InitWebCoreSystemInterface(void) @@ -73,6 +76,7 @@ void InitWebCoreSystemInterface(void) INIT(SetNSURLRequestShouldContentSniff); INIT(SetPatternBaseCTM); INIT(SetPatternPhaseInUserSpace); + INIT(GetUserToBaseCTM); INIT(SetUpFontCache); INIT(SignalCFReadStreamEnd); INIT(SignalCFReadStreamError); @@ -105,5 +109,9 @@ void InitWebCoreSystemInterface(void) INIT(SupportsMultipartXMixedReplace); #endif +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) + INIT(NoteOpenPanelFiles); +#endif + didInit = true; } diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm index 99729dc..2607f18 100644 --- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm +++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm @@ -630,6 +630,16 @@ return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); } +- (NSString *)AXMenuListPopupActionVerb +{ + return nil; +} + +- (NSString *)AXMenuListActionVerb +{ + return nil; +} + - (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles { return [NSString stringWithFormat:UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles]; diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp index 3aa270f..904f389 100644 --- a/WebKit/mac/WebKit.exp +++ b/WebKit/mac/WebKit.exp @@ -13,6 +13,7 @@ .objc_class_name_WebFrame .objc_class_name_WebFrameView .objc_class_name_WebGeolocationMock +.objc_class_name_WebGeolocationPosition .objc_class_name_WebHTMLRepresentation .objc_class_name_WebHTMLView .objc_class_name_WebHistory diff --git a/WebKit/mac/WebKitPrefix.h b/WebKit/mac/WebKitPrefix.h index 518fc1b..2a894e6 100644 --- a/WebKit/mac/WebKitPrefix.h +++ b/WebKit/mac/WebKitPrefix.h @@ -90,4 +90,5 @@ typedef float CGFloat; #undef catch #define JS_EXPORTDATA +#define JS_EXPORTCLASS #define WEBKIT_EXPORTDATA diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm index ecd89f7..8a3842e 100644 --- a/WebKit/mac/WebView/WebDataSource.mm +++ b/WebKit/mac/WebView/WebDataSource.mm @@ -194,6 +194,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl - (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier { +#if ENABLE(OFFLINE_WEB_APPLICATIONS) DocumentLoader* loader = [self _documentLoader]; if (!loader) @@ -202,6 +203,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl NSString *cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:destinationBundleIdentifier]; return ApplicationCacheStorage::storeCopyOfCache(cacheDir, loader->applicationCacheHost()); +#else + return NO; +#endif } @end diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm index 58400d6..41d7e01 100644 --- a/WebKit/mac/WebView/WebFrame.mm +++ b/WebKit/mac/WebView/WebFrame.mm @@ -56,6 +56,7 @@ #import <WebCore/AccessibilityObject.h> #import <WebCore/AnimationController.h> #import <WebCore/CSSMutableStyleDeclaration.h> +#import <WebCore/Chrome.h> #import <WebCore/ColorMac.h> #import <WebCore/DOMImplementation.h> #import <WebCore/DocLoader.h> @@ -847,7 +848,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) if (!_private->coreFrame || !_private->coreFrame->document()) return nil; - return kit(createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString).get()); + return kit(createFragmentFromMarkup(_private->coreFrame->document(), markupString, baseURLString, FragmentScriptingNotAllowed).get()); } - (DOMDocumentFragment *)_documentFragmentWithNodesAsParagraphs:(NSArray *)nodes @@ -1190,13 +1191,17 @@ static inline WebDataSource *dataSource(DocumentLoader* loader) if (domWindow->hasEventListeners(eventNames().unloadEvent)) [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameHasUnloadListener]; +#if ENABLE(OFFLINE_WEB_APPLICATIONS) if (domWindow->optionalApplicationCache()) [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesApplicationCache]; +#endif } if (Document* document = _private->coreFrame->document()) { +#if ENABLE(DATABASE) if (document->hasOpenDatabases()) [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesDatabases]; +#endif if (document->usingGeolocation()) [result setObject:[NSNumber numberWithBool:YES] forKey:WebFrameUsesGeolocation]; @@ -1355,7 +1360,10 @@ static bool needsMicrosoftMessengerDOMDocumentWorkaround() - (void)loadRequest:(NSURLRequest *)request { - _private->coreFrame->loader()->load(request, false); + Frame* coreFrame = _private->coreFrame; + if (!coreFrame) + return; + coreFrame->loader()->load(request, false); } static NSURL *createUniqueWebDataURL() diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm index 4638418..565e64d 100644 --- a/WebKit/mac/WebView/WebFrameView.mm +++ b/WebKit/mac/WebView/WebFrameView.mm @@ -55,6 +55,7 @@ #import "WebViewInternal.h" #import "WebViewPrivate.h" #import <Foundation/NSURLRequest.h> +#import <WebCore/BackForwardList.h> #import <WebCore/DragController.h> #import <WebCore/EventHandler.h> #import <WebCore/Frame.h> @@ -199,9 +200,8 @@ enum { - (float)_verticalPageScrollDistance { - float overlap = [self _verticalKeyboardScrollDistance]; float height = [[self _contentView] bounds].size.height; - return (height < overlap) ? height / 2 : height - overlap; + return max(height * cFractionToStepWhenPaging, 1.f); } static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes) @@ -342,7 +342,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl [scrollView setHasVerticalScroller:NO]; [scrollView setHasHorizontalScroller:NO]; [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [scrollView setLineScroll:40.0f]; + [scrollView setLineScroll:cScrollbarPixelsPerLineStep]; [self addSubview:scrollView]; // Don't call our overridden version of setNextKeyView here; we need to make the standard NSView @@ -612,9 +612,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl - (float)_horizontalPageScrollDistance { - float overlap = [self _horizontalKeyboardScrollDistance]; float width = [[self _contentView] bounds].size.width; - return (width < overlap) ? width / 2 : width - overlap; + return max(width * cFractionToStepWhenPaging, 1.f); } - (BOOL)_pageVertically:(BOOL)up diff --git a/WebKit/mac/WebView/WebGeolocationPosition.h b/WebKit/mac/WebView/WebGeolocationPosition.h new file mode 100644 index 0000000..99348b4 --- /dev/null +++ b/WebKit/mac/WebView/WebGeolocationPosition.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +@class WebGeolocationPositionInternal; + +@interface WebGeolocationPosition : NSObject +{ + WebGeolocationPositionInternal *_internal; +} + +- (id)initWithTimestamp:(double)timestamp latitude:(double)latitude longitude:(double)longitude accuracy:(double)accuracy; + +@end diff --git a/WebKit/mac/WebView/WebGeolocationPosition.mm b/WebKit/mac/WebView/WebGeolocationPosition.mm new file mode 100644 index 0000000..46f62c1 --- /dev/null +++ b/WebKit/mac/WebView/WebGeolocationPosition.mm @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "WebGeolocationPosition.h" + +#import "WebGeolocationPositionInternal.h" +#import <wtf/PassRefPtr.h> +#import <wtf/RefPtr.h> + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#import <WebCore/GeolocationPosition.h> + +using namespace WebCore; +#endif + +@interface WebGeolocationPositionInternal : NSObject +#if ENABLE(CLIENT_BASED_GEOLOCATION) +{ +@public + RefPtr<GeolocationPosition> _position; +} + +- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition; +#endif +@end + +@implementation WebGeolocationPositionInternal + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +- (id)initWithCoreGeolocationPosition:(PassRefPtr<GeolocationPosition>)coreGeolocationPosition +{ + self = [super init]; + if (!self) + return nil; + _position = coreGeolocationPosition; + return self; +} +#endif + +@end + +@implementation WebGeolocationPosition + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +GeolocationPosition* core(WebGeolocationPosition *position) +{ + return position ? position->_internal->_position.get() : 0; +} +#endif + +- (id)initWithTimestamp:(double)timestamp latitude:(double)latitude longitude:(double)longitude accuracy:(double)accuracy +{ + self = [super init]; + if (!self) + return nil; +#if ENABLE(CLIENT_BASED_GEOLOCATION) + _internal = [[WebGeolocationPositionInternal alloc] initWithCoreGeolocationPosition:GeolocationPosition::create(timestamp, latitude, longitude, accuracy)]; +#else + _internal = [[WebGeolocationPositionInternal alloc] init]; +#endif + return self; +} + +@end diff --git a/WebKit/mac/WebView/WebGeolocationPositionInternal.h b/WebKit/mac/WebView/WebGeolocationPositionInternal.h new file mode 100644 index 0000000..27f8a39 --- /dev/null +++ b/WebKit/mac/WebView/WebGeolocationPositionInternal.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "WebGeolocationPosition.h" + +#if ENABLE(CLIENT_BASED_GEOLOCATION) + +namespace WebCore { + class GeolocationPosition; +} + +WebCore::GeolocationPosition* core(WebGeolocationPosition *); + +#endif diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.h b/WebKit/mac/WebView/WebHTMLRepresentation.h index 2098c47..68f9bde 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.h +++ b/WebKit/mac/WebView/WebHTMLRepresentation.h @@ -30,6 +30,12 @@ #import <WebKit/WebDocumentPrivate.h> +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 +#define WebNSUInteger unsigned int +#else +#define WebNSUInteger NSUInteger +#endif + @class WebHTMLRepresentationPrivate; @class NSView; @@ -60,7 +66,12 @@ - (DOMElement *)formForElement:(DOMElement *)element; - (DOMElement *)currentForm; - (NSArray *)controlsInForm:(DOMElement *)form; -- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element; +- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(WebNSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove; - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element; +// Deprecated SPI +- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element; // Use -searchForLabels:beforeElement:resultDistance:resultIsInCellAbove: + @end + +#undef WebNSUInteger diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm index 39489e8..41ce9f9 100644 --- a/WebKit/mac/WebView/WebHTMLRepresentation.mm +++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm @@ -39,6 +39,7 @@ #import "WebKitStatisticsPrivate.h" #import "WebNSAttributedStringExtras.h" #import "WebNSObjectExtras.h" +#import "WebTypesInternal.h" #import "WebView.h" #import <Foundation/NSURLResponse.h> #import <WebCore/Document.h> @@ -337,7 +338,27 @@ static HTMLInputElement* inputElementFromDOMElement(DOMElement* element) - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element { - return core([_private->dataSource webFrame])->searchForLabelsBeforeElement(labels, core(element)); + return [self searchForLabels:labels beforeElement:element resultDistance:0 resultIsInCellAbove:0]; +} + +- (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(NSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove +{ + size_t distance; + bool isInCellAbove; + + NSString *result = core([_private->dataSource webFrame])->searchForLabelsBeforeElement(labels, core(element), &distance, &isInCellAbove); + + if (outDistance) { + if (distance == notFound) + *outDistance = NSNotFound; + else + *outDistance = distance; + } + + if (outIsInCellAbove) + *outIsInCellAbove = isInCellAbove; + + return result; } - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm index 5dc66ee..54a177e 100644 --- a/WebKit/mac/WebView/WebHTMLView.mm +++ b/WebKit/mac/WebView/WebHTMLView.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * (C) 2006, 2007 Graham Dennis (graham.dennis@gmail.com) * * Redistribution and use in source and binary forms, with or without @@ -103,6 +103,7 @@ #import <WebCore/Page.h> #import <WebCore/PlatformKeyboardEvent.h> #import <WebCore/Range.h> +#import <WebCore/RuntimeApplicationChecks.h> #import <WebCore/SelectionController.h> #import <WebCore/SharedBuffer.h> #import <WebCore/SimpleFontData.h> @@ -796,10 +797,26 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart) [webView _setInsertionPasteboard:pasteboard]; DOMRange *range = [self _selectedRange]; + +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText]; if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted]) [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO]; - +#else + // Mail is ignoring the frament passed to the delegate and creates a new one. + // We want to avoid creating the fragment twice. + if (applicationIsAppleMail()) { + if ([self _shouldInsertFragment:nil replacingDOMRange:range givenAction:WebViewInsertActionPasted]) { + DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText]; + if (fragment) + [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO]; + } + } else { + DOMDocumentFragment *fragment = [self _documentFragmentFromPasteboard:pasteboard inContext:range allowPlainText:allowPlainText]; + if (fragment && [self _shouldInsertFragment:fragment replacingDOMRange:range givenAction:WebViewInsertActionPasted]) + [[self _frame] _replaceSelectionWithFragment:fragment selectReplacement:NO smartReplace:[self _canSmartReplaceWithPasteboard:pasteboard] matchStyle:NO]; + } +#endif [webView _setInsertionPasteboard:nil]; [webView release]; } @@ -3309,6 +3326,12 @@ WEBCORE_COMMAND(yankAndSelect) return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsSelectedKey] boolValue]; } +- (BOOL)_isScrollBarEvent:(NSEvent *)event +{ + NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil]; + return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsInScrollBarKey] boolValue]; +} + - (BOOL)acceptsFirstMouse:(NSEvent *)event { // There's a chance that responding to this event will run a nested event loop, and @@ -3331,6 +3354,8 @@ WEBCORE_COMMAND(yankAndSelect) [hitHTMLView _setMouseDownEvent:event]; if ([hitHTMLView _isSelectionEvent:event]) result = coreFrame->eventHandler()->eventMayStartDrag(event); + else if ([hitHTMLView _isScrollBarEvent:event]) + result = true; [hitHTMLView _setMouseDownEvent:nil]; } return result; diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h index d295323..7085cec 100644 --- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h +++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h @@ -88,6 +88,7 @@ #define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders" #define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter" #define WebKitWebGLEnabledPreferenceKey @"WebKitWebGLEnabled" +#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel" #define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime" // These are private both because callers should be using the cover methods and because the diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm index 6b55ea3..d06cc13 100644 --- a/WebKit/mac/WebView/WebPreferences.mm +++ b/WebKit/mac/WebView/WebPreferences.mm @@ -351,9 +351,10 @@ static WebCacheModel cacheModelForMainBundle(void) [NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey, [NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey, [NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey, - [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey, - [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey, + [NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey, + [NSNumber numberWithBool:NO], WebKitShowRepaintCounterPreferenceKey, [NSNumber numberWithBool:NO], WebKitWebGLEnabledPreferenceKey, + [NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey, [NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey, nil]; @@ -1183,6 +1184,16 @@ static NSString *classIBCreatorID = nil; [self _setBoolValue:enabled forKey:WebKitWebGLEnabledPreferenceKey]; } +- (BOOL)usesProxiedOpenPanel +{ + return [self _boolValueForKey:WebKitUsesProxiedOpenPanelPreferenceKey]; +} + +- (void)setUsesProxiedOpenPanel:(BOOL)enabled +{ + [self _setBoolValue:enabled forKey:WebKitUsesProxiedOpenPanelPreferenceKey]; +} + - (unsigned)pluginAllowedRunTime { return [self _integerValueForKey:WebKitPluginAllowedRunTimePreferenceKey]; diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h index 3cea78b..20c98b2 100644 --- a/WebKit/mac/WebView/WebPreferencesPrivate.h +++ b/WebKit/mac/WebView/WebPreferencesPrivate.h @@ -158,6 +158,9 @@ extern NSString *WebPreferencesRemovedNotification; - (BOOL)webGLEnabled; - (void)setWebGLEnabled:(BOOL)enabled; +- (BOOL)usesProxiedOpenPanel; +- (void)setUsesProxiedOpenPanel:(BOOL)enabled; + // Other private methods - (void)_postPreferencesChangesNotification; + (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier; diff --git a/WebKit/mac/WebView/WebScriptDebugger.h b/WebKit/mac/WebView/WebScriptDebugger.h index 1213ab2..c4147a2 100644 --- a/WebKit/mac/WebView/WebScriptDebugger.h +++ b/WebKit/mac/WebView/WebScriptDebugger.h @@ -57,7 +57,7 @@ public: virtual void callEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); virtual void atStatement(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); virtual void returnEvent(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); - virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber); + virtual void exception(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineNumber, bool hasHandler); virtual void willExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); virtual void didExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); diff --git a/WebKit/mac/WebView/WebScriptDebugger.mm b/WebKit/mac/WebView/WebScriptDebugger.mm index 8deccff..a71d78b 100644 --- a/WebKit/mac/WebView/WebScriptDebugger.mm +++ b/WebKit/mac/WebView/WebScriptDebugger.mm @@ -200,7 +200,7 @@ void WebScriptDebugger::returnEvent(const DebuggerCallFrame& debuggerCallFrame, m_callingDelegate = false; } -void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber) +void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineNumber, bool hasHandler) { if (m_callingDelegate) return; diff --git a/WebKit/mac/WebView/WebScriptWorld.h b/WebKit/mac/WebView/WebScriptWorld.h index 9204975..7059b76 100644 --- a/WebKit/mac/WebView/WebScriptWorld.h +++ b/WebKit/mac/WebView/WebScriptWorld.h @@ -22,6 +22,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +typedef struct OpaqueJSContext* JSGlobalContextRef; + @class WebScriptWorldPrivate; @interface WebScriptWorld : NSObject { @@ -31,4 +33,7 @@ + (WebScriptWorld *)standardWorld; + (WebScriptWorld *)world; + ++ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)globalContext; + @end diff --git a/WebKit/mac/WebView/WebScriptWorld.mm b/WebKit/mac/WebView/WebScriptWorld.mm index 0310701..7dab1b3 100644 --- a/WebKit/mac/WebView/WebScriptWorld.mm +++ b/WebKit/mac/WebView/WebScriptWorld.mm @@ -27,6 +27,8 @@ #import "WebScriptWorldInternal.h" #import <WebCore/JSDOMBinding.h> #import <WebCore/ScriptController.h> +#import <JavaScriptCore/APICast.h> + #import <wtf/RefPtr.h> using namespace WebCore; @@ -94,6 +96,11 @@ static WorldMap& allWorlds() return [[[self alloc] init] autorelease]; } ++ (WebScriptWorld *)scriptWorldForGlobalContext:(JSGlobalContextRef)context +{ + return [self findOrCreateWorld:currentWorld(toJS(context))]; +} + @end @implementation WebScriptWorld (WebInternal) diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm index 946da90..e5fde5e 100644 --- a/WebKit/mac/WebView/WebVideoFullscreenController.mm +++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm @@ -34,6 +34,7 @@ #import <WebCore/HTMLMediaElement.h> #import <WebCore/SoftLinking.h> #import <objc/objc-runtime.h> +#import <wtf/UnusedParam.h> SOFT_LINK_FRAMEWORK(QTKit) SOFT_LINK_CLASS(QTKit, QTMovieView) diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm index ad8f33a..6dcbfb4 100644 --- a/WebKit/mac/WebView/WebView.mm +++ b/WebKit/mac/WebView/WebView.mm @@ -56,6 +56,8 @@ #import "WebFormDelegatePrivate.h" #import "WebFrameInternal.h" #import "WebFrameViewInternal.h" +#import "WebGeolocationControllerClient.h" +#import "WebGeolocationPositionInternal.h" #import "WebHTMLRepresentation.h" #import "WebHTMLViewInternal.h" #import "WebHistoryItemInternal.h" @@ -100,6 +102,7 @@ #import <CoreFoundation/CFSet.h> #import <Foundation/NSURLConnection.h> #import <WebCore/ApplicationCacheStorage.h> +#import <WebCore/BackForwardList.h> #import <WebCore/Cache.h> #import <WebCore/ColorMac.h> #import <WebCore/Cursor.h> @@ -162,6 +165,11 @@ #import <WebKit/WebDashboardRegion.h> #endif +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#import <WebCore/GeolocationController.h> +#import <WebCore/GeolocationError.h> +#endif + @interface NSSpellChecker (WebNSSpellCheckerDetails) - (void)_preflightChosenSpellServer; @end @@ -369,6 +377,7 @@ NSString *WebElementLinkURLKey = @"WebElementLinkURL"; NSString *WebElementSpellingToolTipKey = @"WebElementSpellingToolTip"; NSString *WebElementTitleKey = @"WebElementTitle"; NSString *WebElementLinkIsLiveKey = @"WebElementLinkIsLive"; +NSString *WebElementIsInScrollBarKey = @"WebElementIsInScrollBar"; NSString *WebElementIsContentEditableKey = @"WebElementIsContentEditableKey"; NSString *WebViewProgressStartedNotification = @"WebProgressStartedNotification"; @@ -515,6 +524,7 @@ static NSString *createUserVisibleWebKitVersionString() static void WebKitInitializeApplicationCachePathIfNecessary() { +#if ENABLE(OFFLINE_WEB_APPLICATIONS) static BOOL initialized = NO; if (initialized) return; @@ -529,6 +539,7 @@ static void WebKitInitializeApplicationCachePathIfNecessary() cacheStorage().setCacheDirectory(cacheDir); initialized = YES; +#endif } static bool runningLeopardMail() @@ -547,6 +558,11 @@ static bool runningTigerMail() return NO; } +static bool shouldEnableLoadDeferring() +{ + return !applicationIsAdobeInstaller(); +} + - (void)_dispatchPendingLoadRequests { cache()->loader()->servePendingRequests(); @@ -607,7 +623,16 @@ static bool runningTigerMail() didOneTimeInitialization = true; } +<<<<<<< HEAD _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), 0); +======= +#if ENABLE(CLIENT_BASED_GEOLOCATION) + WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(self); +#else + WebGeolocationControllerClient* geolocationControllerClient = 0; +#endif + _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient); +>>>>>>> webkit.org at r54127 _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]); @@ -987,7 +1012,9 @@ static bool fastDocumentTeardownEnabled() return; } +#if ENABLE(VIDEO) [self _exitFullscreen]; +#endif if (Frame* mainFrame = [self _mainCoreFrame]) mainFrame->loader()->detachFromParent(); @@ -1288,6 +1315,8 @@ static bool fastDocumentTeardownEnabled() settings->setApplicationChromeMode([preferences applicationChromeModeEnabled]); if ([preferences userStyleSheetEnabled]) { NSString* location = [[preferences userStyleSheetLocation] _web_originalDataAsString]; + if ([location isEqualToString:@"apple-dashboard://stylesheet"]) + location = @"file:///System/Library/PrivateFrameworks/DashboardClient.framework/Resources/widget.css"; settings->setUserStyleSheetLocation([NSURL URLWithString:(location ? location : @"")]); } else settings->setUserStyleSheetLocation([NSURL URLWithString:@""]); @@ -1308,6 +1337,7 @@ static bool fastDocumentTeardownEnabled() settings->setShowRepaintCounter([preferences showRepaintCounter]); settings->setPluginAllowedRunTime([preferences pluginAllowedRunTime]); settings->setWebGLEnabled([preferences webGLEnabled]); + settings->setLoadDeferringEnabled(shouldEnableLoadDeferring()); } static inline IMP getMethod(id o, SEL s) @@ -2319,6 +2349,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns) frame->animation()->resumeAnimations(frame->document()); } ++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme +{ + SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); +} + @end @implementation _WebSafeForwarder @@ -5577,6 +5612,41 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi @end +@implementation WebView (WebViewGeolocation) + +- (void)_setGeolocationProvider:(id<WebGeolocationProvider>)geolocationProvider +{ + if (_private) + _private->_geolocationProvider = geolocationProvider; +} + +- (id<WebGeolocationProvider>)_geolocationProvider +{ + if (_private) + return _private->_geolocationProvider; + return nil; +} + +- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position; +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (_private && _private->page) + _private->page->geolocationController()->positionChanged(core(position)); +#endif +} + +- (void)_geolocationDidFailWithError:(NSError *)error +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (_private && _private->page) { + RefPtr<GeolocationError> geolocatioError = GeolocationError::create(GeolocationError::PositionUnavailable, [error localizedDescription]); + _private->page->geolocationController()->errorOccurred(geolocatioError.get()); + } +#endif +} + +@end + #ifdef BUILDING_ON_LEOPARD static IMP originalRecursivelyRemoveMailAttributesImp; diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h index 37024c7..b0569a2 100644 --- a/WebKit/mac/WebView/WebViewData.h +++ b/WebKit/mac/WebView/WebViewData.h @@ -43,6 +43,7 @@ namespace WebCore { @class WebPreferences; @class WebTextCompletionController; @protocol WebFormDelegate; +@protocol WebGeolocationProvider; #if ENABLE(VIDEO) @class WebVideoFullscreenController; #endif @@ -165,5 +166,7 @@ extern int pluginDatabaseClientCount; #if ENABLE(VIDEO) WebVideoFullscreenController *fullscreenController; #endif + + id<WebGeolocationProvider> _geolocationProvider; } @end diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm index 835f46e..21ba4c8 100644 --- a/WebKit/mac/WebView/WebViewData.mm +++ b/WebKit/mac/WebView/WebViewData.mm @@ -81,7 +81,9 @@ int pluginDatabaseClientCount = 0; ASSERT(applicationIsTerminating || !page); ASSERT(applicationIsTerminating || !preferences); ASSERT(!insertionPasteboard); +#if ENABLE(VIDEO) ASSERT(!fullscreenController); +#endif [applicationNameForUserAgent release]; [backgroundColor release]; @@ -101,7 +103,9 @@ int pluginDatabaseClientCount = 0; { ASSERT_MAIN_THREAD(); ASSERT(!insertionPasteboard); +#if ENABLE(VIDEO) ASSERT(!fullscreenController); +#endif [super finalize]; } diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h index 0622d4c..4d1145e 100644 --- a/WebKit/mac/WebView/WebViewPrivate.h +++ b/WebKit/mac/WebView/WebViewPrivate.h @@ -43,6 +43,7 @@ @class NSError; @class WebFrame; +@class WebGeolocationPosition; @class WebInspector; @class WebPreferences; @class WebScriptWorld; @@ -66,6 +67,7 @@ extern NSString *WebElementIsContentEditableKey; // NSNumber indicating whether // other WebElementDictionary keys extern NSString *WebElementLinkIsLiveKey; // NSNumber of BOOL indictating whether the link is live or not +extern NSString *WebElementIsInScrollBarKey; // One of the subviews of the WebView entered compositing mode. extern NSString *_WebViewDidStartAcceleratedCompositingNotification; @@ -507,6 +509,8 @@ Could be worth adding to the API. */ - (void)setCSSAnimationsSuspended:(BOOL)suspended; ++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme; + @end @interface WebView (WebViewPrintingPrivate) @@ -573,6 +577,20 @@ Could be worth adding to the API. - (BOOL)_selectionIsAll; @end +@protocol WebGeolocationProvider <NSObject> +- (void)registerWebView:(WebView *)webView; +- (void)unregisterWebView:(WebView *)webView; +- (WebGeolocationPosition *)lastPosition; +@end + +@interface WebView (WebViewGeolocation) +- (void)_setGeolocationProvider:(id<WebGeolocationProvider>)locationProvider; +- (id<WebGeolocationProvider>)_geolocationProvider; + +- (void)_geolocationDidChangePosition:(WebGeolocationPosition *)position; +- (void)_geolocationDidFailWithError:(NSError *)error; +@end + @interface NSObject (WebFrameLoadDelegatePrivate) - (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame; diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index b25b53b..8d4f3ba 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -22,24 +22,71 @@ #include "qgraphicswebview.h" #include "qwebframe.h" +#include "qwebframe_p.h" #include "qwebpage.h" #include "qwebpage_p.h" #include "QWebPageClient.h" -#include <QtGui/QGraphicsScene> -#include <QtGui/QGraphicsView> +#include <FrameView.h> +#include <QtCore/qsharedpointer.h> +#include <QtCore/qtimer.h> #include <QtGui/qapplication.h> +#include <QtGui/qgraphicsscene.h> #include <QtGui/qgraphicssceneevent.h> +#include <QtGui/qgraphicsview.h> +#include <QtGui/qpixmapcache.h> #include <QtGui/qstyleoption.h> #if defined(Q_WS_X11) #include <QX11Info> #endif +#include <Settings.h> + +#if USE(ACCELERATED_COMPOSITING) + +// the overlay is here for one reason only: to have the scroll-bars and other +// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers +class QGraphicsWebViewOverlay : public QGraphicsItem { + public: + QGraphicsWebViewOverlay(QGraphicsWebView* view) + :QGraphicsItem(view) + , q(view) + { + setPos(0, 0); + setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); + setCacheMode(QGraphicsItem::DeviceCoordinateCache); + } + + QRectF boundingRect() const + { + return q->boundingRect(); + } + + void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*) + { + q->page()->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect()); + } + + friend class QGraphicsWebView; + QGraphicsWebView* q; +}; + +#endif class QGraphicsWebViewPrivate : public QWebPageClient { public: QGraphicsWebViewPrivate(QGraphicsWebView* parent) : q(parent) , page(0) - {} +#if USE(ACCELERATED_COMPOSITING) + , rootGraphicsLayer(0) + , shouldSync(true) +#endif + { +#if USE(ACCELERATED_COMPOSITING) + // the overlay and stays alive for the lifetime of + // this QGraphicsWebView as the scrollbars are needed when there's no compositing + q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption); +#endif + } virtual ~QGraphicsWebViewPrivate(); virtual void scroll(int dx, int dy, const QRect&); @@ -61,14 +108,97 @@ public: virtual QObject* pluginParent() const; + virtual QStyle* style() const; + +#if USE(ACCELERATED_COMPOSITING) + virtual void setRootGraphicsLayer(QGraphicsItem* layer); + virtual void markForSync(bool scheduleSync); + void updateCompositingScrollPosition(); +#endif + + void syncLayers(); void _q_doLoadFinished(bool success); QGraphicsWebView* q; QWebPage* page; +#if USE(ACCELERATED_COMPOSITING) + QGraphicsItem* rootGraphicsLayer; + + // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached + QSharedPointer<QGraphicsWebViewOverlay> overlay; + + // we need to sync the layers if we get a special call from the WebCore + // compositor telling us to do so. We'll get that call from ChromeClientQt + bool shouldSync; + + // we need to put the root graphics layer behind the overlay (which contains the scrollbar) + enum { RootGraphicsLayerZValue, OverlayZValue }; +#endif }; QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() { +#if USE(ACCELERATED_COMPOSITING) + if (rootGraphicsLayer) { + // we don't need to delete the root graphics layer + // The lifecycle is managed in GraphicsLayerQt.cpp + rootGraphicsLayer->setParentItem(0); + q->scene()->removeItem(rootGraphicsLayer); + } +#endif +} + +#if USE(ACCELERATED_COMPOSITING) +void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) +{ + if (rootGraphicsLayer) { + rootGraphicsLayer->setParentItem(0); + q->scene()->removeItem(rootGraphicsLayer); + QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); + } + + rootGraphicsLayer = layer; + + if (layer) { + layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); + layer->setParentItem(q); + layer->setZValue(RootGraphicsLayerZValue); + if (!overlay) { + overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q)); + overlay->setZValue(OverlayZValue); + } + updateCompositingScrollPosition(); + } else { + // we don't have compositing layers, we can render the scrollbars and content in one go + overlay.clear(); + } +} + +void QGraphicsWebViewPrivate::markForSync(bool scheduleSync) +{ + shouldSync = true; + if (scheduleSync) + QTimer::singleShot(0, q, SLOT(syncLayers())); +} + +void QGraphicsWebViewPrivate::updateCompositingScrollPosition() +{ + if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) { + const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition(); + rootGraphicsLayer->setPos(-scrollPosition); + } +} + +#endif + +void QGraphicsWebViewPrivate::syncLayers() +{ +#if USE(ACCELERATED_COMPOSITING) + if (shouldSync) { + QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); + shouldSync = false; + } +#endif } void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) @@ -83,11 +213,18 @@ void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll) { q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll)); +#if USE(ACCELERATED_COMPOSITING) + updateCompositingScrollPosition(); +#endif } void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) { q->update(QRectF(dirtyRect)); +#if USE(ACCELERATED_COMPOSITING) + if (overlay) + overlay->update(QRectF(dirtyRect)); +#endif } @@ -156,6 +293,11 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const return q; } +QStyle* QGraphicsWebViewPrivate::style() const +{ + return q->style(); +} + /*! \class QGraphicsWebView \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. @@ -244,7 +386,11 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) #endif setAcceptDrops(true); setAcceptHoverEvents(true); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + setAcceptTouchEvents(true); +#endif setFocusPolicy(Qt::StrongFocus); + setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); } /*! @@ -294,7 +440,12 @@ QWebPage* QGraphicsWebView::page() const */ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*) { - page()->mainFrame()->render(painter, option->exposedRect.toRect()); +#if USE(ACCELERATED_COMPOSITING) + page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); + d->syncLayers(); +#else + page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect()); +#endif } /*! \reimp @@ -302,6 +453,17 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* bool QGraphicsWebView::sceneEvent(QEvent* event) { // Re-implemented in order to allows fixing event-related bugs in patch releases. + +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + if (d->page && (event->type() == QEvent::TouchBegin + || event->type() == QEvent::TouchEnd + || event->type() == QEvent::TouchUpdate)) { + d->page->event(event); + if (event->isAccepted()) + return true; + } +#endif + return QGraphicsWidget::sceneEvent(event); } @@ -411,6 +573,10 @@ void QGraphicsWebView::setPage(QWebPage* page) d->page = page; if (!d->page) return; +#if USE(ACCELERATED_COMPOSITING) + if (d->overlay) + d->overlay->prepareGeometryChange(); +#endif d->page->d->client = d; // set the page client QSize size = geometry().size().toSize(); @@ -494,7 +660,6 @@ QIcon QGraphicsWebView::icon() const /*! \property QGraphicsWebView::zoomFactor - \since 4.5 \brief the zoom factor for the view */ @@ -515,6 +680,12 @@ qreal QGraphicsWebView::zoomFactor() const */ void QGraphicsWebView::updateGeometry() { + +#if USE(ACCELERATED_COMPOSITING) + if (d->overlay) + d->overlay->prepareGeometryChange(); +#endif + QGraphicsWidget::updateGeometry(); if (!d->page) @@ -530,6 +701,11 @@ void QGraphicsWebView::setGeometry(const QRectF& rect) { QGraphicsWidget::setGeometry(rect); +#if USE(ACCELERATED_COMPOSITING) + if (d->overlay) + d->overlay->prepareGeometryChange(); +#endif + if (!d->page) return; diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h index f3afb4c..3cf51b2 100644 --- a/WebKit/qt/Api/qgraphicswebview.h +++ b/WebKit/qt/Api/qgraphicswebview.h @@ -134,6 +134,9 @@ protected: private: Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success)) + // we don't want to change the moc based on USE() macro, so this function is here + // but will be empty if ACCLERATED_COMPOSITING is disabled + Q_PRIVATE_SLOT(d, void syncLayers()) QGraphicsWebViewPrivate* const d; friend class QGraphicsWebViewPrivate; diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index b98b4d5..aeb7a22 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -220,6 +220,22 @@ QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, cons return QString(); } +// Suspend active DOM objects in this frame. +void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame) +{ + Frame* frame = QWebFramePrivate::core(qFrame); + if (frame->document()) + frame->document()->suspendActiveDOMObjects(); +} + +// Resume active DOM objects in this frame. +void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame) +{ + Frame* frame = QWebFramePrivate::core(qFrame); + if (frame->document()) + frame->document()->resumeActiveDOMObjects(); +} + QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, WebCore::HTMLFrameOwnerElement* ownerFrameElement, const WebCore::String& frameName) @@ -361,6 +377,45 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame: } } +bool QWebFramePrivate::scrollOverflow(int dx, int dy) +{ + if (!frame || !frame->document() || !frame->eventHandler()) + return false; + + Node* node = frame->document()->focusedNode(); + if (!node) + node = frame->document()->elementFromPoint(frame->eventHandler()->currentMousePosition().x(), + frame->eventHandler()->currentMousePosition().y()); + if (!node) + return false; + + RenderObject* renderer = node->renderer(); + if (!renderer) + return false; + + if (renderer->isListBox()) + return false; + + RenderLayer* renderLayer = renderer->enclosingLayer(); + if (!renderLayer) + return false; + + bool scrolledHorizontal = false; + bool scrolledVertical = false; + + if (dx > 0) + scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); + else if (dx < 0) + scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); + + if (dy > 0) + scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); + else if (dy < 0) + scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); + + return (scrolledHorizontal || scrolledVertical); +} + /*! \class QWebFrame \since 4.4 @@ -1000,6 +1055,55 @@ void QWebFrame::scroll(int dx, int dy) } /*! + \since 4.7 + Scrolls nested frames starting at this frame, \a dx pixels to the right + and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts + to scroll elements with CSS overflow followed by this frame. If this + frame doesn't scroll, attempts to scroll the parent + + \sa QWebFrame::scroll +*/ +bool QWebFrame::scrollRecursively(int dx, int dy) +{ + bool scrolledHorizontal = false; + bool scrolledVertical = false; + bool scrolledOverflow = d->scrollOverflow(dx, dy); + + if (!scrolledOverflow) { + Frame* frame = d->frame; + if (!frame || !frame->view()) + return false; + + do { + IntSize scrollOffset = frame->view()->scrollOffset(); + IntPoint maxScrollOffset = frame->view()->maximumScrollPosition(); + + if (dx > 0) // scroll right + scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x(); + else if (dx < 0) // scroll left + scrolledHorizontal = scrollOffset.width() > 0; + + if (dy > 0) // scroll down + scrolledVertical = scrollOffset.height() < maxScrollOffset.y(); + else if (dy < 0) //scroll up + scrolledVertical = scrollOffset.height() > 0; + + if (scrolledHorizontal || scrolledVertical) { + frame->view()->scrollBy(IntSize(dx, dy)); + return true; + } + frame = frame->tree()->parent(); + } while (frame && frame->view()); + } + return (scrolledHorizontal || scrolledVertical || scrolledOverflow); +} + +bool QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy) +{ + return qFrame->scrollRecursively(dx, dy); +} + +/*! \property QWebFrame::scrollPosition \since 4.5 \brief the position the frame is currently scrolled to. @@ -1289,6 +1393,11 @@ void QWebFrame::print(QPrinter *printer) const // paranoia check fromPage = qMax(1, fromPage); toPage = qMin(printContext.pageCount(), toPage); + if (toPage < fromPage) { + // if the user entered a page range outside the actual number + // of printable pages, just return + return; + } if (printer->pageOrder() == QPrinter::LastPageFirst) { int tmp = fromPage; diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h index c2a6e9b..25f6c9b 100644 --- a/WebKit/qt/Api/qwebframe.h +++ b/WebKit/qt/Api/qwebframe.h @@ -156,6 +156,7 @@ public: QRect scrollBarGeometry(Qt::Orientation orientation) const; void scroll(int, int); + bool scrollRecursively(int, int); QPoint scrollPosition() const; void setScrollPosition(const QPoint &pos); diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index 045c70e..ee978be 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -85,6 +85,8 @@ public: void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip); void renderContentsLayerAbsoluteCoords(WebCore::GraphicsContext*, const QRegion& clip); + bool scrollOverflow(int dx, int dy); + QWebFrame *q; Qt::ScrollBarPolicy horizontalScrollBarPolicy; Qt::ScrollBarPolicy verticalScrollBarPolicy; diff --git a/WebKit/qt/Api/qwebinspector.cpp b/WebKit/qt/Api/qwebinspector.cpp index f43cbbf..c3ef530 100644 --- a/WebKit/qt/Api/qwebinspector.cpp +++ b/WebKit/qt/Api/qwebinspector.cpp @@ -151,16 +151,25 @@ void QWebInspector::resizeEvent(QResizeEvent* event) /*! \reimp */ void QWebInspector::showEvent(QShowEvent* event) { +#if ENABLE(INSPECTOR) // Allows QWebInspector::show() to init the inspector. if (d->page) d->page->d->inspectorController()->show(); +#endif } /*! \reimp */ void QWebInspector::hideEvent(QHideEvent* event) { +} + +/*! \reimp */ +void QWebInspector::closeEvent(QCloseEvent* event) +{ +#if ENABLE(INSPECTOR) if (d->page) d->page->d->inspectorController()->setWindowVisible(false); +#endif } /*! \internal */ diff --git a/WebKit/qt/Api/qwebinspector.h b/WebKit/qt/Api/qwebinspector.h index a5c1ed5..6cda479 100644 --- a/WebKit/qt/Api/qwebinspector.h +++ b/WebKit/qt/Api/qwebinspector.h @@ -43,6 +43,7 @@ protected: void resizeEvent(QResizeEvent* event); void showEvent(QShowEvent* event); void hideEvent(QHideEvent* event); + void closeEvent(QCloseEvent* event); private: QWebInspectorPrivate* d; diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index 50cbaf0..7e3b084 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -32,6 +32,8 @@ #include "qwebsettings.h" #include "qwebkitversion.h" +#include "Chrome.h" +#include "ContextMenuController.h" #include "Frame.h" #include "FrameTree.h" #include "FrameLoader.h" @@ -79,6 +81,7 @@ #include "runtime/InitializeThreading.h" #include "PageGroup.h" #include "QWebPageClient.h" +#include "WorkerThread.h" #include <QApplication> #include <QBasicTimer> @@ -108,6 +111,11 @@ #include <QX11Info> #endif +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) +#include <QTouchEvent> +#include "PlatformTouchEvent.h" +#endif + using namespace WebCore; void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() @@ -122,6 +130,15 @@ void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() db->refresh(); } +int QWEBKIT_EXPORT qt_drt_workerThreadCount() +{ +#if ENABLE(WORKERS) + return WebCore::WorkerThread::workerThreadCount(); +#else + return 0; +#endif +} + bool QWebPagePrivate::drtRun = false; void QWEBKIT_EXPORT qt_drt_run(bool b) { @@ -165,6 +182,8 @@ public: virtual QObject* pluginParent() const; + virtual QStyle* style() const; + QWidget* view; }; @@ -234,6 +253,11 @@ QObject* QWebPageWidgetClient::pluginParent() const return view; } +QStyle* QWebPageWidgetClient::style() const +{ + return view->style(); +} + // Lookup table mapping QWebPage::WebActions to the associated Editor commands static const char* editorCommandWebActions[] = { @@ -337,8 +361,10 @@ static inline DragOperation dropActionToDragOp(Qt::DropActions actions) unsigned result = 0; if (actions & Qt::CopyAction) result |= DragOperationCopy; + // DragOperationgeneric represents InternetExplorer's equivalent of Move operation, + // hence it should be considered as "move" if (actions & Qt::MoveAction) - result |= DragOperationMove; + result |= (DragOperationMove | DragOperationGeneric); if (actions & Qt::LinkAction) result |= DragOperationLink; return (DragOperation)result; @@ -351,6 +377,10 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions) result = Qt::CopyAction; else if (actions & DragOperationMove) result = Qt::MoveAction; + // DragOperationgeneric represents InternetExplorer's equivalent of Move operation, + // hence it should be considered as "move" + else if (actions & DragOperationGeneric) + result = Qt::MoveAction; else if (actions & DragOperationLink) result = Qt::LinkAction; return result; @@ -455,7 +485,9 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct case WebCore::ContextMenuItemTagBold: return QWebPage::ToggleBold; case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic; case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline; +#if ENABLE(INSPECTOR) case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement; +#endif default: break; } return QWebPage::NoWebAction; @@ -1061,8 +1093,9 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent*) // and the focus frame. But don't tell the focus controller so that upon // focusInEvent() we can re-activate the frame. FocusController *focusController = page->focusController(); - focusController->setActive(false); + // Call setFocused first so that window.onblur doesn't get called twice focusController->setFocused(false); + focusController->setActive(false); } void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev) @@ -1084,8 +1117,9 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev) dropActionToDragOp(ev->possibleActions())); Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData)); ev->setDropAction(action); - if (action != Qt::IgnoreAction) - ev->accept(); + // We must accept this event in order to receive the drag move events that are sent + // while the drag and drop action is in progress. + ev->accept(); #endif } @@ -1125,9 +1159,11 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev) DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(), dropActionToDragOp(ev->possibleActions())); Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData)); + m_lastDropAction = action; ev->setDropAction(action); - if (action != Qt::IgnoreAction) - ev->accept(); + // We must accept this event in order to receive the drag move events that are sent + // while the drag and drop action is in progress. + ev->accept(); #endif } @@ -1136,8 +1172,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev) #ifndef QT_NO_DRAGANDDROP DragData dragData(ev->mimeData(), ev->pos().toPoint(), QCursor::pos(), dropActionToDragOp(ev->possibleActions())); - Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData)); - if (action != Qt::IgnoreAction) + if (page->dragController()->performDrag(&dragData)) ev->accept(); #endif } @@ -1145,10 +1180,11 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev) void QWebPagePrivate::dropEvent(QDropEvent* ev) { #ifndef QT_NO_DRAGANDDROP + // Overwrite the defaults set by QDragManager::defaultAction() + ev->setDropAction(m_lastDropAction); DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(), - dropActionToDragOp(ev->possibleActions())); - Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData)); - if (action != Qt::IgnoreAction) + dropActionToDragOp(Qt::DropAction(ev->dropAction()))); + if (page->dragController()->performDrag(&dragData)) ev->accept(); #endif } @@ -1217,7 +1253,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) break; } case QInputMethodEvent::Cursor: { - frame->setCaretVisible(a.length); //if length is 0 cursor is invisible + frame->selection()->setCaretVisible(a.length); //if length is 0 cursor is invisible if (a.length > 0) { RenderObject* caretRenderer = frame->selection()->caretRenderer(); if (caretRenderer) { @@ -1334,6 +1370,18 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame) return frame->eventHandler()->scrollRecursively(direction, granularity); } +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) +void QWebPagePrivate::touchEvent(QTouchEvent* event) +{ + WebCore::Frame* frame = QWebFramePrivate::core(mainFrame); + if (!frame->view()) + return; + + bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event)); + event->setAccepted(accepted); +} +#endif + /*! This method is used by the input method to query a set of properties of the page to be able to support complex input method operations as support for surrounding @@ -1362,6 +1410,11 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const switch (property) { case Qt::ImMicroFocus: { + WebCore::FrameView* view = frame->view(); + if (view && view->needsLayout()) { + // We can't access absoluteCaretBounds() while the view needs to layout. + return QVariant(); + } return QVariant(frame->selection()->absoluteCaretBounds()); } case Qt::ImFont: { @@ -1460,6 +1513,7 @@ void QWebPagePrivate::setInspector(QWebInspector* insp) */ QWebInspector* QWebPagePrivate::getOrCreateInspector() { +#if ENABLE(INSPECTOR) if (!inspector) { QWebInspector* insp = new QWebInspector; insp->setPage(q); @@ -1467,13 +1521,18 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector() Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q) } +#endif return inspector; } /*! \internal */ InspectorController* QWebPagePrivate::inspectorController() { +#if ENABLE(INSPECTOR) return page->inspectorController(); +#else + return 0; +#endif } @@ -1837,7 +1896,8 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg) The program may provide an optional message, \a msg, as well as a default value for the input in \a defaultValue. If the prompt was cancelled by the user the implementation should return false; otherwise the - result should be written to \a result and true should be returned. + result should be written to \a result and true should be returned. If the prompt was not cancelled by the + user, the implementation should return true and the result string must not be null. The default implementation uses QInputDialog::getText. */ @@ -2014,11 +2074,13 @@ void QWebPage::triggerAction(WebAction action, bool) editor->setBaseWritingDirection(RightToLeftWritingDirection); break; case InspectElement: { +#if ENABLE(INSPECTOR) if (!d->hitTestResult.isNull()) { d->getOrCreateInspector(); // Make sure the inspector is created d->inspector->show(); // The inspector is expected to be shown on inspection d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get()); } +#endif break; } default: @@ -2548,6 +2610,13 @@ bool QWebPage::event(QEvent *ev) case QEvent::Leave: d->leaveEvent(ev); break; +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + case QEvent::TouchBegin: + case QEvent::TouchUpdate: + case QEvent::TouchEnd: + d->touchEvent(static_cast<QTouchEvent*>(ev)); + break; +#endif default: return QObject::event(ev); } @@ -2705,8 +2774,11 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result)); WebCore::ContextMenu menu(result); menu.populate(); + +#if ENABLE(INSPECTOR) if (d->page->inspectorController()->enabled()) menu.addInspectElementItem(); +#endif QBitArray visitedWebActions(QWebPage::WebActionCount); @@ -3396,9 +3468,9 @@ quint64 QWebPage::bytesReceived() const /*! \fn void QWebPage::unsupportedContent(QNetworkReply *reply) - This signals is emitted when webkit cannot handle a link the user navigated to. + This signal is emitted when WebKit cannot handle a link the user navigated to. - At signal emissions time the meta data of the QNetworkReply \a reply is available. + At signal emission time the meta-data of the QNetworkReply \a reply is available. \note This signal is only emitted if the forwardUnsupportedContent property is set to true. diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h index 5d97da4..dbc981e 100644 --- a/WebKit/qt/Api/qwebpage_p.h +++ b/WebKit/qt/Api/qwebpage_p.h @@ -114,6 +114,10 @@ public: void handleSoftwareInputPanel(Qt::MouseButton); bool handleScrolling(QKeyEvent*, WebCore::Frame*); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + void touchEvent(QTouchEvent*); +#endif + void setInspector(QWebInspector*); QWebInspector* getOrCreateInspector(); WebCore::InspectorController* inspectorController(); @@ -176,6 +180,7 @@ public: QWidget* inspectorFrontend; QWebInspector* inspector; bool inspectorIsInternalOnly; // True if created through the Inspect context menu action + Qt::DropAction m_lastDropAction; static bool drtRun; }; diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp index 2a225c5..6c26bd7 100644 --- a/WebKit/qt/Api/qwebsecurityorigin.cpp +++ b/WebKit/qt/Api/qwebsecurityorigin.cpp @@ -40,6 +40,11 @@ void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists() SecurityOrigin::resetOriginAccessWhiteLists(); } +void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme) +{ + SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme); +} + /*! \class QWebSecurityOrigin \since 4.5 diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp index 9a5ab46..a94a3aa 100644 --- a/WebKit/qt/Api/qwebsettings.cpp +++ b/WebKit/qt/Api/qwebsettings.cpp @@ -47,6 +47,17 @@ #include <QUrl> #include <QFileInfo> +#if ENABLE(QT_BEARER) +#include "NetworkStateNotifier.h" +#endif + +void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed) +{ +#if ENABLE(QT_BEARER) + WebCore::networkStateNotifier().setNetworkAccessAllowed(isAllowed); +#endif +} + class QWebSettingsPrivate { public: QWebSettingsPrivate(WebCore::Settings* wcSettings = 0) @@ -141,7 +152,12 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::JavascriptEnabled, global->attributes.value(QWebSettings::JavascriptEnabled)); settings->setJavaScriptEnabled(value); +#if USE(ACCELERATED_COMPOSITING) + value = attributes.value(QWebSettings::AcceleratedCompositingEnabled, + global->attributes.value(QWebSettings::AcceleratedCompositingEnabled)); + settings->setAcceleratedCompositingEnabled(value); +#endif value = attributes.value(QWebSettings::JavascriptCanOpenWindows, global->attributes.value(QWebSettings::JavascriptCanOpenWindows)); settings->setJavaScriptCanOpenWindowsAutomatically(value); @@ -193,12 +209,16 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::LocalStorageEnabled, global->attributes.value(QWebSettings::LocalStorageEnabled)); - settings->setLocalStorageEnabled(value); value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); + + value = attributes.value(QWebSettings::XSSAuditorEnabled, + global->attributes.value(QWebSettings::XSSAuditorEnabled)); + settings->setXSSAuditorEnabled(value); + settings->setUsesPageCache(WebCore::pageCache()->capacity()); } else { QList<QWebSettingsPrivate*> settings = *::allSettings(); @@ -343,6 +363,7 @@ QWebSettings* QWebSettings::globalSettings() \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use QWebSettings::LocalStorageEnabled instead. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. + \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts. */ /*! @@ -373,6 +394,7 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false); d->attributes.insert(QWebSettings::LocalStorageEnabled, false); d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); + d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, false); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); } diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h index 69f3b11..77f2167 100644 --- a/WebKit/qt/Api/qwebsettings.h +++ b/WebKit/qt/Api/qwebsettings.h @@ -67,7 +67,9 @@ public: LocalStorageDatabaseEnabled = LocalStorageEnabled, #endif LocalContentCanAccessRemoteUrls, - DnsPrefetchEnabled + DnsPrefetchEnabled, + XSSAuditorEnabled, + AcceleratedCompositingEnabled }; enum WebGraphic { MissingImageGraphic, diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp index 7bc3168..b5a5a90 100644 --- a/WebKit/qt/Api/qwebview.cpp +++ b/WebKit/qt/Api/qwebview.cpp @@ -22,10 +22,11 @@ #include "config.h" #include "qwebview.h" +#include "Page.h" #include "QWebPageClient.h" +#include "Settings.h" #include "qwebframe.h" #include "qwebpage_p.h" - #include "qbitmap.h" #include "qevent.h" #include "qpainter.h" @@ -57,6 +58,106 @@ void QWebViewPrivate::_q_pageDestroyed() view->setPage(0); } +#ifdef Q_WS_MAEMO_5 +#include "qabstractkineticscroller.h" + +class QWebViewKineticScroller : public QAbstractKineticScroller { +public: + QWebViewKineticScroller() : QAbstractKineticScroller() {} + // remember the frame where the button was pressed + bool eventFilter(QObject* o, QEvent* ev) + { + switch (ev->type()) { + case QEvent::MouseButtonPress: { + QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos()); + if (hitFrame) + m_frame = hitFrame; + break; + } + default: + break; + } + return QAbstractKineticScroller::eventFilter(o, ev); + } + +protected: + QWebFrame* currentFrame() const + { + if (!m_frame.isNull()) + return m_frame.data(); + + QWebView* view = static_cast<QWebView*>(widget()); + QWebFrame* frame = view->page()->mainFrame(); + return frame; + } + + // Returns the innermost frame at the given position that can scroll. + QWebFrame* scrollingFrameAt(const QPoint& pos) const + { + QWebView* view = static_cast<QWebView*>(widget()); + QWebFrame* mainFrame = view->page()->mainFrame(); + QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame(); + QSize range = hitFrame->contentsSize() - hitFrame->geometry().size(); + + while (hitFrame && range.width() <= 1 && range.height() <= 1) + hitFrame = hitFrame->parentFrame(); + + return hitFrame; + } + + void attachToWidget() + { + QWebView* view = static_cast<QWebView*>(widget()); + QWebFrame* mainFrame = view->page()->mainFrame(); + m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal); + m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical); + mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); + mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); + view->installEventFilter(this); + } + + void removeFromWidget() + { + QWebView* view = static_cast<QWebView*>(widget()); + view->removeEventFilter(this); + QWebFrame* mainFrame = view->page()->mainFrame(); + mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy); + mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy); + } + + QRect positionRange() const + { + QRect r; + QWebFrame* frame = currentFrame(); + r.setSize(frame->contentsSize() - frame->geometry().size()); + return r; + } + + QPoint position() const + { + QWebFrame* frame = currentFrame(); + return frame->scrollPosition(); + } + + QSize viewportSize() const + { + return static_cast<QWebView*>(widget())->page()->viewportSize(); + } + + void setPosition(const QPoint& point, const QPoint& /* overShootDelta */) + { + QWebFrame* frame = currentFrame(); + frame->setScrollPosition(point); + } + + QPointer<QWebFrame> m_frame; + Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy; + Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy; +}; + +#endif // Q_WS_MAEMO_5 + + /*! \class QWebView \since 4.4 @@ -153,6 +254,14 @@ QWebView::QWebView(QWidget *parent) setAttribute(Qt::WA_InputMethodEnabled); #endif +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + setAttribute(Qt::WA_AcceptTouchEvents); +#endif +#if defined(Q_WS_MAEMO_5) + QAbstractKineticScroller* scroller = new QWebViewKineticScroller(); + scroller->setWidget(this); + setProperty("kineticScroller", QVariant::fromValue(scroller)); +#endif setAcceptDrops(true); setMouseTracking(true); @@ -243,6 +352,9 @@ void QWebView::setPage(QWebPage* page) this, SLOT(_q_pageDestroyed())); } setAttribute(Qt::WA_OpaquePaintEvent, d->page); +#if USE(ACCELERATED_COMPOSITING) + d->page->d->page->settings()->setAcceleratedCompositingEnabled(false); +#endif update(); } @@ -640,6 +752,14 @@ bool QWebView::event(QEvent *e) if (cursor().shape() == Qt::ArrowCursor) d->page->d->client->resetCursor(); #endif +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + } else if (e->type() == QEvent::TouchBegin + || e->type() == QEvent::TouchEnd + || e->type() == QEvent::TouchUpdate) { + d->page->event(e); + if (e->isAccepted()) + return true; +#endif } else if (e->type() == QEvent::Leave) d->page->event(e); } diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h index d7910d9..f681fbc 100644 --- a/WebKit/qt/Api/qwebview.h +++ b/WebKit/qt/Api/qwebview.h @@ -49,12 +49,7 @@ class QWEBKIT_EXPORT QWebView : public QWidget { Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false) Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) -// FIXME: temporary work around for elftran issue that it couldn't find the QPainter::staticMetaObject -// symbol from Qt lib; it should be reverted after the right symbol is exported. -// See bug: http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=258893 -#if defined(Q_QDOC) || !defined(Q_OS_SYMBIAN) Q_PROPERTY(QPainter::RenderHints renderHints READ renderHints WRITE setRenderHints) -#endif Q_FLAGS(QPainter::RenderHints) public: explicit QWebView(QWidget* parent = 0); diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index 4d2467a..3928198 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,395 @@ +<<<<<<< HEAD +======= +2010-01-29 Ben Murdoch <benm@google.com> + + Reviewed by Dimitri Glazkov. + + [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage. + https://bugs.webkit.org/show_bug.cgi?id=34215 + + Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events. + + * WebCoreSupport/ChromeClientQt.h: + (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation. + +2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann + + Disable auto-uppercase and predictive text on Maemo5, just like the + build-in MicroB Browser. + + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::setInputMethodState): + +2010-01-28 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Support kinetic scrolling on Maemo 5 + + https://bugs.webkit.org/show_bug.cgi?id=34267 + + Patch by Ralf Engels <ralf.engels@nokia.com> and + Robert Griebl <rgriebl@trolltech.com> + + * Api/qwebview.cpp: + (QWebViewKineticScroller::QWebViewKineticScroller): + (QWebViewKineticScroller::eventFilter): + (QWebViewKineticScroller::currentFrame): + (QWebViewKineticScroller::scrollingFrameAt): + (QWebViewKineticScroller::attachToWidget): + (QWebViewKineticScroller::removeFromWidget): + (QWebViewKineticScroller::positionRange): + (QWebViewKineticScroller::position): + (QWebViewKineticScroller::viewportSize): + (QWebViewKineticScroller::setPosition): + (QWebView::QWebView): + +2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + Do not set the combobox font on Maemo5 and S60; use the + default instead. + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::populate): + +2010-01-28 Trond Kjernåsen <trond@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix for endless print loop when printing web pages + + * Api/qwebframe.cpp: + (QWebFrame::print): + +2010-01-27 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] DRT Provide worker thread ability to track counters + https://bugs.webkit.org/show_bug.cgi?id=34221 + + Implement workerThreadCount() in LayoutTestController of Qt DRT + + Tests: + fast/workers/dedicated-worker-lifecycle.html + fast/workers/shared-worker-frame-lifecycle.html + fast/workers/shared-worker-lifecycle.html + fast/workers/worker-lifecycle.html + + * Api/qwebpage.cpp: + (qt_drt_workerThreadCount): + +2010-01-27 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Update the .def files with exported symbols + + * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi. + +2010-01-27 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Meta-methods can't be introspected using ES5 API + https://bugs.webkit.org/show_bug.cgi?id=34087 + + Test that Object.getOwnPropertyDescriptor and + Object.getOwnPropertyNames work with meta-methods. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Show comboboxes on Maemo 5 + https://bugs.webkit.org/show_bug.cgi?id=34088 + + Don't try to show the combobox by simulating a mouse event from QCursor::pos() to + get the combobox position right. The position on Maemo 5 is independent from the mouse + and there's no QCursor::pos(). + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + +2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + First steps of the QtScript API. + + Two new classes were created; QScriptEngine and QScriptValue. + The first should encapsulate a javascript context and the second a script + value. + + This API is still in development, so it isn't compiled by default. + To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to + build-webkit. + + https://bugs.webkit.org/show_bug.cgi?id=32565 + + * docs/qtwebkit.qdocconf: + +2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Simon Hausmann. + + [Qt] JavaScript prompt is currently broken + https://bugs.webkit.org/show_bug.cgi?id=30914 + + In r52152 a patch was landed to convert a null QString + to an empty WebCore::String in case the prompt was accepted + but the default implementation returned the null QString. + + The patch tried to avoid assign to result twice and + was not checking the QString if it is null but the default + value. This lead to always returning an empty string on + successful prompts. Fix it by checking the variable 'x' + for isNull. + + The manual test case used didn't cover the case of non + empty input, replace it with an automatic test case that + should cover all cases. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug. + * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case + (JSPromptPage::JSPromptPage): + (JSPromptPage::javaScriptPrompt): + (tst_QWebPage::testJSPrompt): + +2010-01-25 Simon Hausmann <hausmann@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view + https://bugs.webkit.org/show_bug.cgi?id=34053 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics + widget's style. + * Api/qwebpage.cpp: + (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style. + +2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + [Qt] Phone backup support for QtWebkit for Symbian devices. + https://bugs.webkit.org/show_bug.cgi?id=34077 + + * symbian/backup_registration.xml: Added. + +2010-01-23 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix positioning of ComboBox popup in QGraphicsWebView. + + Wrap the popup in a QGraphicsProxyWidget, so that the popup + transforms with the item. + + https://bugs.webkit.org/show_bug.cgi?id=33887 + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopupCombo::hidePopup): + (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): + (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): + (WebCore::QtFallbackWebPopup::show): + * WebCoreSupport/QtFallbackWebPopup.h: + +2010-01-22 Peter Kasting <pkasting@google.com> + + Not reviewed, backout. + + Back out r52673, which caused several regressions. + https://bugs.webkit.org/show_bug.cgi?id=32533 + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopupCombo::hidePopup): + +2010-01-22 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Simon Hausmann. + + [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup + + The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will + need it to create a QGraphicsProxyWidget (in a future commit) for the + QGraphicsWebView's web popup. + + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopup::show): + +2010-01-22 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Kenneth Rohde Christiansen. + + QState::polished() was renamed to QState::propertiesAssigned() when + Qt 4.6.0 was released. + + * QGVLauncher/main.cpp: + (MainWindow::init): + +2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT + https://bugs.webkit.org/show_bug.cgi?id=33945 + + * Api/qwebsecurityorigin.cpp: + (qt_drt_setDomainRelaxationForbiddenForURLScheme): + +2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Antti Koivisto. + + [Qt] Implement GraphicsLayer for accelerated layer compositing + https://bugs.webkit.org/show_bug.cgi?id=33514 + + Here we have the QGraphicsWebView support for accelerated compositing + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewOverlay::q): access to container object + (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the + webview + (QGraphicsWebViewOverlay::paint): paint everything but the contents + (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed + for accelerated compositing + (QGraphicsWebViewPrivate::): + (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): + (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a + scrollbar overlay, and that the new graphics layer is parented by the + web-view + (QGraphicsWebViewPrivate::markForSync): flush changes at earliest + convenience or during the next draw + + (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the + position of the compositing layer with the scroll position + (QGraphicsWebViewPrivate::syncLayers): flush changes now + (QGraphicsWebViewPrivate::scroll): make sure we also move the + compositing layer + (QGraphicsWebViewPrivate::update): also update the overlay if needed + (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0 + (QGraphicsWebView::paint): paint only contents if we have an overlay, + sync the compositing layers now if needed + (QGraphicsWebView::setPage): also clean up the compositing + (QGraphicsWebView::updateGeometry): also update overlay geo + (QGraphicsWebView::setGeometry): also update overlay geo + * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient + * Api/qwebsettings.cpp: init new settings flag for compositing as + false + (QWebSettingsPrivate::apply): apply new settings flag for compositing + (QWebSettings::QWebSettings): + * Api/qwebsettings.h: new settings flag for compositing + * Api/qwebview.cpp: + (QWebView::setPage): qwebview doesn't support compositing: always false + * QGVLauncher/main.cpp: + (WebView::WebView): some more cmdline arguments + compositing + (MainWindow::init): some more cmdline arguments + (main): ditto + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for + accel-compositing + (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization): + reimp for accel compositing + (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for + accel compositing + * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing + +2010-01-21 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Improve the autotests of QtWebkit + https://bugs.webkit.org/show_bug.cgi?id=32216 + + Remove qWait() of the test when possible. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::loadFinished): + (tst_QWebPage::database): + (tst_QWebPage::testEnablePersistentStorage): + (tst_QWebPage::errorPageExtension): + (tst_QWebPage::screenshot): + +2010-01-21 Simon Hausmann <simon.hausmann@nokia.com> + + Prospective build fix for the Qt build. + + Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView + but widget.h instead and instantiating QWebView through a typedef, to ensure we're using + our locally built WebKit. + + * tests/hybridPixmap/widget.h: + * tests/hybridPixmap/widget.ui: + +2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Adding QPixmap/QImage support for the Qt hybrid layer + https://bugs.webkit.org/show_bug.cgi?id=32461 + + * tests/hybridPixmap: Added. + * tests/hybridPixmap/hybridPixmap.pro: Added. + * tests/hybridPixmap/resources.qrc: Added. + * tests/hybridPixmap/test.html: Added. + * tests/hybridPixmap/tst_hybridPixmap.cpp: Added. + (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for + hybrid pixmap/image manipulation + (tst_hybridPixmap::init): QTestLib initialization + (tst_hybridPixmap::cleanup): QTestLib cleanup + (tst_hybridPixmap::hybridPixmap): run the html file + * tests/hybridPixmap/widget.cpp: Added. + (Widget::Widget): + (Widget::refreshJS): + (Widget::start): + (Widget::completeTest): + (Widget::setPixmap): + (Widget::pixmap): + (Widget::setImage): + (Widget::image): + (Widget::~Widget): + (Widget::changeEvent): + (Widget::compare): + (Widget::imageSlot): + (Widget::pixmapSlot): + (Widget::randomSlot): + * tests/hybridPixmap/widget.h: Added. + * tests/hybridPixmap/widget.ui: Added. + * tests/tests.pro: + +2010-01-21 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Custom select popups. + https://bugs.webkit.org/show_bug.cgi?id=33418 + + Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::createSelectPopup): + * WebCoreSupport/ChromeClientQt.h: + * WebCoreSupport/QtFallbackWebPopup.cpp: + (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo): + (WebCore::QtFallbackWebPopupCombo::showPopup): + (WebCore::QtFallbackWebPopupCombo::hidePopup): + (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): + (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): + (WebCore::QtFallbackWebPopup::show): + (WebCore::QtFallbackWebPopup::hide): + (WebCore::QtFallbackWebPopup::populate): + * WebCoreSupport/QtFallbackWebPopup.h: + +>>>>>>> webkit.org at r54127 2010-01-19 Steve Block <steveblock@google.com> Reviewed by Adam Barth. @@ -7,6 +399,580 @@ * Api/qwebframe.cpp: +<<<<<<< HEAD +======= +2010-01-14 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Drag and Drop source/destination code needs cleanup. + <https://bugs.webkit.org/show_bug.cgi?id=33691>. + + Update to new way of calling sourceOperation. + + * WebCoreSupport/DragClientQt.cpp: + (WebCore::DragClientQt::startDrag): + +2010-01-14 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Symbian build fixes. + + * tests/qwebpage/tst_qwebpage.cpp: Include util.h + * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work. + * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt. + +2010-01-14 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Update Symbian .def symbol export files after private API additions. + + * symbian/bwins/QtWebKitu.def: + * symbian/eabi/QtWebKitu.def: + +2010-01-13 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + Move more of the selection and caret painting code from Frame to SelectionController. + https://bugs.webkit.org/show_bug.cgi?id=33619 + + * Api/qwebpage.cpp: + (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this + setCaretVisible here, but I updated it to call it in its new location. + +2010-01-11 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Holger Freyther. + + [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6. + + This is just a temporary addition until we have introduced #ifdefs to allow + safely removing the private API again. + + * Api/qwebframe.cpp: + (qtwebkit_webframe_scrollRecursively): + +2010-01-10 Robert Hogan <robert@roberthogan.net> + + Reviewed by Adam Barth. + + [Qt] Add enableXSSAuditor support to QWebSettings and DRT. + + https://bugs.webkit.org/show_bug.cgi?id=33419 + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + * Api/qwebsettings.h: + +2010-01-09 Daniel Bates <dbates@webkit.org> + + No review, rolling out r53044. + http://trac.webkit.org/changeset/53044 + https://bugs.webkit.org/show_bug.cgi?id=33419 + + We need to look into this some more because the Qt + bot is failing the XSSAuditor tests. See bug #33419 + for more details. + + * Api/qwebsettings.cpp: + * Api/qwebsettings.h: + +2010-01-09 Daniel Bates <dbates@webkit.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=33419 + + Adds support for the XSSAuditor to the Qt DRT. + + * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled. + * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled. + +2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Delegation client + https://bugs.webkit.org/show_bug.cgi?id=32826 + + Added method createPopup to ChromeClientQt used to create popups. + QtFallbackWebPopup moved from WebCore/platform/qt to + WebKit/qt/WebCoreSupport. + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::createPopup): + * WebCoreSupport/ChromeClientQt.h: + * WebCoreSupport/QtFallbackWebPopup.cpp: Added. + (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): + (WebCore::QtFallbackWebPopup::show): + (WebCore::QtFallbackWebPopup::populate): + (WebCore::QtFallbackWebPopup::showPopup): + (WebCore::QtFallbackWebPopup::hidePopup): + (WebCore::QtFallbackWebPopup::activeChanged): + (WebCore::QtFallbackWebPopup::setParent): + * WebCoreSupport/QtFallbackWebPopup.h: Added. + (WebCore::QtFallbackWebPopup::hide): + +2010-01-07 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Allow the application to override online/offline network status + https://bugs.webkit.org/show_bug.cgi?id=32684 + + Add a setting so that applications can overide the network status. + Applications that use this setting still need to block network access + through QNAM. + + * Api/qwebsettings.cpp: + (qt_networkAccessAllowed): + +2010-01-07 Yongjun Zhang <yongjun.zhang@nokia.com>, Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] need an API to suspend and resume active Javascript DOM objects. + https://bugs.webkit.org/show_bug.cgi?id=31673 + + Add suspend and resume DOM objects private API to QWebFrame. + + * Api/qwebframe.cpp: + (qt_suspendActiveDOMObjects): + (qt_resumeActiveDOMObjects): + +2010-01-06 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout. + + https://bugs.webkit.org/show_bug.cgi?id=33204 + + * Api/qwebpage.cpp: + (QWebPage::inputMethodQuery): + +2010-01-05 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Drag & drop layout tests fail even when run manually + https://bugs.webkit.org/show_bug.cgi?id=33055 + + No new tests. Fix 3 layout tests when run manually. + fast/events/drag-and-drop.html + fast/events/drag-and-drop-dataTransfer-types-nocrash.html + fast/events/drag-and-drop-fire-drag-dragover.html + Running these tests in DRT will be fixed in 31332. + + * Api/qwebpage.cpp: + (dropActionToDragOp): + (dragOpToDropAction): + (QWebPagePrivate::dragEnterEvent): + (QWebPagePrivate::dragMoveEvent): + (QWebPagePrivate::dropEvent): + Accept drag events even if they are not over a drop target. + This is to ensure that drag events will continue to be delivered. + + * Api/qwebpage_p.h: + * WebCoreSupport/DragClientQt.cpp: + (WebCore::dragOperationToDropActions): + (WebCore::dropActionToDragOperation): + (WebCore::DragClientQt::startDrag): + Send dragEnd event. + +2010-01-04 Daniel Bates <dbates@webkit.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=33097 + + Cleans up the File menu to better conform to the File menu in Safari + both in terms of options and keyboard shortcuts. Adds a "Quit" menu + options to close all open windows. + + * QGVLauncher/main.cpp: + (MainWindow::buildUI): + +2009-12-31 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable all HTML5 persistent features for QGVLauncher + https://bugs.webkit.org/show_bug.cgi?id=33086 + + * QGVLauncher/main.cpp: Call enablePersistentStorage() + (main): + +2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] It should be possible to disable inspector + https://bugs.webkit.org/show_bug.cgi?id=32724 + + This change fixes the build break. Some QtWebKit interfaces + will not be fully functional (most notable QWebInspector) if + INSPECTOR is disabled. + + * Api/qwebinspector.cpp: + (QWebInspector::showEvent): + (QWebInspector::closeEvent): + * Api/qwebpage.cpp: + (webActionForContextMenuAction): + (QWebPagePrivate::getOrCreateInspector): + (QWebPagePrivate::inspectorController): + (QWebPage::triggerAction): + (QWebPage::updatePositionDependentActions): + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::showWindow): + (WebCore::InspectorClientQt::closeWindow): + +2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + Upstream Symbian def files from Qt 4.6. + + These files define the ABI of QtWebKit on Symbian. + + * symbian/bwins/QtWebKitu.def: Added. + * symbian/eabi/QtWebKitu.def: Added. + +2009-12-29 Daniel Bates <dbates@webkit.org> + + Reviewed by Ariya Hidayat. + + https://bugs.webkit.org/show_bug.cgi?id=32925 + + Adds an Open File dialog to make it convenient to open a file + to view in the browser. + + * QGVLauncher/main.cpp: + (MainWindow::load): Modified to call loadURL. + (MainWindow::openFile): Added. + (MainWindow::loadURL): Added. + (MainWindow::buildUI): Added menu item Open File. + +2009-12-29 Robert Hogan <robert@roberthogan.net> + + Reviewed by Eric Seidel. + + [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html + + Related to https://bugs.webkit.org/show_bug.cgi?id=23806 + + If an embedded document is loaded within a page and it has an empty + URL, use a blank URL for the load request. + + https://bugs.webkit.org/show_bug.cgi?id=33017 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createFrame): + +2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Rubber-stamped by Simon Hausmann and Holger Freyther. + + [Qt] Remove WebKit/qt/WebKitPart empty directory + + The content of the directory has been removed by r34888. + + * WebKitPart: Removed. + +2009-12-29 Jakub Wieczorek <faw217@gmail.com> + + Reviewed by Eric Seidel. + + [Qt] DRT: Frame loader callbacks differ from the Mac port + https://bugs.webkit.org/show_bug.cgi?id=32989 + + Remove messages from the callbacks that should not dump them to match + the expected results for the http/loading tests. + + Unskip some http/loading tests which succeed now. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage): + (WebCore::FrameLoaderClientQt::dispatchWillClose): + (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon): + (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld): + +2009-12-29 Robert Hogan <robert@roberthogan.net> + + Reviewed by Eric Seidel. + + [Qt] fix fast/dom/Window/window-onFocus.html + + Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where + window.onblur was getting dispatched twice from QtWebKit. + + https://bugs.webkit.org/show_bug.cgi?id=32990 + + * Api/qwebpage.cpp: + (QWebPagePrivate::focusOutEvent): + +2009-12-24 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Gustavo Noronha. + + Doc : QGraphicsWebView::zoomFactor was introduced in 4.6. + + * Api/qgraphicswebview.cpp: + +2009-12-22 Simon Hausmann <simon.hausmann@nokia.com> + + Rubber-stamped by Holger Freyther. + + Moved QtLauncher to WebKitTools/ + + * QtLauncher: Removed. + * QtLauncher/QtLauncher.pro: Removed. + * QtLauncher/main.cpp: Removed. + +2009-12-21 David Boddie <dboddie@trolltech.com> + + Reviewed by Simon Hausmann. + + Doc: Minor fixes to language. + + * Api/qwebpage.cpp: + +2009-12-21 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Clean up the WebKit layer unit-tests + + - Use tests.pri for common options + - Standardize file naming + - Move all resources to 'resources' subdir + - Standardize how TESTS_SOURCE_DIR is used + - Get rid of UID3 for symbian (autogenerated) + - Don't build app bundles on Mac OS X + + * tests/benchmarks/loading/loading.pro: Added. + * tests/benchmarks/loading/tst_loading.pro: Removed. + * tests/benchmarks/painting/painting.pro: Added. + * tests/benchmarks/painting/tst_painting.pro: Removed. + * tests/qgraphicswebview/qgraphicswebview.pro: + * tests/qwebelement/qwebelement.pro: + * tests/qwebelement/qwebelement.qrc: Removed. + * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png. + * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css. + * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css. + * tests/qwebelement/tst_qwebelement.qrc: Added. + * tests/qwebframe/qwebframe.pro: + * tests/qwebframe/qwebframe.qrc: Removed. + * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png. + * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css. + * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html. + * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html. + * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html. + * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html. + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebframe/tst_qwebframe.qrc: Added. + * tests/qwebhistory/qwebhistory.pro: + * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html. + * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html. + * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html. + * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html. + * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html. + * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html. + * tests/qwebhistory/tst_qwebhistory.cpp: + (tst_QWebHistory::): + * tests/qwebhistory/tst_qwebhistory.qrc: + * tests/qwebhistoryinterface/qwebhistoryinterface.pro: + * tests/qwebinspector/qwebinspector.pro: + * tests/qwebpage/qwebpage.pro: + * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html. + * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html. + * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html. + * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html. + * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html. + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::backActionUpdate): + (tst_QWebPage::frameAt): + (tst_QWebPage::errorPageExtensionInFrameset): + (tst_QWebPage::screenshot): + * tests/qwebpage/tst_qwebpage.qrc: + * tests/qwebplugindatabase/qwebplugindatabase.pro: + * tests/qwebview/qwebview.pro: + * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html. + * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html. + * tests/qwebview/tst_qwebview.cpp: + (tst_QWebView::reusePage): + (tst_QWebView::crashTests): + * tests/qwebview/tst_qwebview.qrc: + * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png. + * tests/tests.pri: Added. + * tests/tests.pro: + +2009-12-18 Ariya Hidayat <ariya.hidayat@gmail.com> + + Build fix, not reviewed. + + * QtLauncher/main.cpp: + (MainWindow::setTouchMocking): Leave setTouchMocking as an empty + function for Qt < 4.6 so that moc still creates a slot for that. + Otherwise, it would have generated a linker error. + +2009-12-18 Adam Roben <aroben@apple.com> + + Qt build fix + + * Api/qwebpage.cpp: Added #include. + +2009-12-18 Adam Roben <aroben@apple.com> + + Qt build fix + + * Api/qwebpage.cpp: + Added #includes. + +2009-12-18 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow + then checking current frame and then ancestors + https://bugs.webkit.org/show_bug.cgi?id=32668 + + * Api/qwebframe.cpp: + (QWebFramePrivate::scrollOverflow): + (QWebFrame::scrollRecursively): + * Api/qwebframe.h: + * Api/qwebframe_p.h: + * tests/qwebframe/qwebframe.qrc: + * tests/qwebframe/testiframe.html: Added. + * tests/qwebframe/testiframe2.html: Added. + * tests/qwebframe/tst_qwebframe.cpp: + +2009-12-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Fix infinite recursion in touch mocking. + + Don't send the fake touch events to the view, as that'll trigger the + event filter again. + + * QtLauncher/main.cpp: + (MainWindow::sendTouchEvent): + +2009-12-17 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Add support for mocking touch events with Q(GV)Launcher + https://bugs.webkit.org/show_bug.cgi?id=32434 + + The event delivery should go through QCoreApplication::sendEvent() + + * QtLauncher/main.cpp: + (MainWindow::sendTouchEvent): + +2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com> + + Reviewed by Simon Hausmann. + + [Qt] Add support for touch events in QWebView and QGraphicsWebView + https://bugs.webkit.org/show_bug.cgi?id=32432 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::QGraphicsWebView): + (QGraphicsWebView::sceneEvent): + * Api/qwebview.cpp: + (QWebView::QWebView): + (QWebView::event): + +2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com> + + Reviewed by Simon Hausmann. + + [Qt] Add support for mocking touch events with QtLauncher + https://bugs.webkit.org/show_bug.cgi?id=32434 + + * QtLauncher/main.cpp: + (MainWindow::MainWindow): + (MainWindow::sendTouchEvent): + (MainWindow::eventFilter): + (MainWindow::setTouchMocking): + (MainWindow::setupUI): + +2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix JavaScript prompt behavior for empty/null strings. + https://bugs.webkit.org/show_bug.cgi?id=30914 + + The patch is based on the work done by Gupta Manish. + + In the default implementation of the JavaScript prompt + we are using a QInputDialog to get the text and this has + one quirk with regard to not entering any text. + + In other WebKit ports and in Firefox an empty string is + returned but in the Qt case it is a null string. + + Change the API documentation in QWebPage to mention we want to + have a non null string but do the fixup in the ChromeClientQt + to support existing code. + + * Api/qwebpage.cpp: + (QWebPage::javaScriptPrompt): Change API documentation + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString + +2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Simon Hausmann. + + [Qt] Do not disable the inspector on show and hide + https://bugs.webkit.org/show_bug.cgi?id=31851 + + On Qt/X11 with some window managers the window will be + hidden when switching windows. In this case all the results + are gone when coming back to the window. + + Attempt to use the CloseEvent to figure out if the window + was closed and withdrawn as this is more friendly to the + user of the inspector client. + + * Api/qwebinspector.cpp: + (QWebInspector::hideEvent): + (QWebInspector::closeEvent): + * Api/qwebinspector.h: + +2009-12-14 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Improve the autotests of QtWebkit + https://bugs.webkit.org/show_bug.cgi?id=32216 + + Refactor tst_qwebelement to remove the qWait() + + * tests/qwebelement/tst_qwebelement.cpp: + (tst_QWebElement::style): + +2009-12-14 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Simon Hausmann. + + Fix the QWebPage inputMethods() autotest after r51758 + to compare the Qt::ImFont property's family against an explicitly + previously configured family. + + https://bugs.webkit.org/show_bug.cgi?id=32491 + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): + +>>>>>>> webkit.org at r54127 2009-12-13 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. @@ -22,6 +988,63 @@ * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): +<<<<<<< HEAD +======= +2009-12-13 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005 + https://bugs.webkit.org/show_bug.cgi?id=29008 + + * tests/qwebframe/tst_qwebframe.cpp: + +2009-12-13 Simon Hausmann <hausmann@webkit.org> + + Reviewed by Holger Freyther. + + [Qt] Re-enable QWebView::renderHints property for Qt for Symbian + + https://bugs.webkit.org/show_bug.cgi?id=28273 + + The bug in Qt's moc that triggered a linking error when declaring this + property has been fixed and we can remove the workaround. + + * Api/qwebview.h: + +2009-12-11 Yael Aharon <yael.aharon@nokia.com> + + Unreviewed build fix for Qt versions < 4.6. + + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebview/tst_qwebview.cpp: + (tst_QWebView::reusePage): + +2009-12-11 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Tor Arne Vestbø. + + [Qt] Updated QWebElement documentation + + findAll() returns a QWebElementCollection, not QList<QWebElement>. + + * docs/webkitsnippets/webelement/main.cpp: + (findAll): + +2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com> + + Reviewed by Antti Koivisto. + + Forward Qt touch events to the event handler as platform touch events. + + https://bugs.webkit.org/show_bug.cgi?id=32114 + + * Api/qwebpage.cpp: + (QWebPagePrivate::touchEvent): + (QWebPage::event): + * Api/qwebpage_p.h: + +>>>>>>> webkit.org at r54127 2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/WebKit/qt/QGVLauncher/main.cpp b/WebKit/qt/QGVLauncher/main.cpp index 2021cb6..eefff7f 100644 --- a/WebKit/qt/QGVLauncher/main.cpp +++ b/WebKit/qt/QGVLauncher/main.cpp @@ -72,6 +72,8 @@ public: WebView(QGraphicsItem* parent = 0) : QGraphicsWebView(parent) { + if (QApplication::instance()->arguments().contains("--cacheWebView")) + setCacheMode(QGraphicsItem::DeviceCoordinateCache); } void setYRotation(qreal angle) { @@ -253,6 +255,12 @@ public: setAttribute(Qt::WA_DeleteOnClose); view->setScene(scene->scene()); + const QStringList arguments = QApplication::instance()->arguments(); + const int indexOfViewportUpdateMode = arguments.indexOf("--updateMode"); + if (indexOfViewportUpdateMode > 1 && indexOfViewportUpdateMode < arguments.count() - 1) { + const QString updateMode = arguments[indexOfViewportUpdateMode+1] + "ViewportUpdate"; + view->setViewportUpdateMode(static_cast<QGraphicsView::ViewportUpdateMode>(QGraphicsView::staticMetaObject.enumerator(QGraphicsView::staticMetaObject.indexOfEnumerator("ViewportUpdateMode")).keysToValue(updateMode.toAscii()))); + } setCentralWidget(view); @@ -277,7 +285,7 @@ public: QState *s2 = new QState(machine); s2->assignProperty(scene->webView(), "yRotation", -90); - s1->addTransition(s1, SIGNAL(polished()), s2); + s1->addTransition(s1, SIGNAL(propertiesAssigned()), s2); QAbstractTransition *t2 = s2->addTransition(s0); t2->addAnimation(yRotationAnim); @@ -296,9 +304,7 @@ public: if (!deducedUrl.isValid()) deducedUrl = QUrl("http://" + url + "/"); - urlEdit->setText(deducedUrl.toEncoded()); - scene->webView()->load(deducedUrl); - scene->webView()->setFocus(Qt::OtherFocusReason); + loadURL(deducedUrl); } QWebPage* page() const @@ -307,6 +313,23 @@ public: } protected slots: + + void openFile() + { + static const QString filter("HTML Files (*.htm *.html);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;All Files (*)"); + + QFileDialog fileDialog(this, tr("Open"), QString(), filter); + fileDialog.setAcceptMode(QFileDialog::AcceptOpen); + fileDialog.setFileMode(QFileDialog::ExistingFile); + fileDialog.setOptions(QFileDialog::ReadOnly); + + if (fileDialog.exec()) { + QString selectedFile = fileDialog.selectedFiles()[0]; + if (!selectedFile.isEmpty()) + loadURL(QUrl::fromLocalFile(selectedFile)); + } + } + void changeLocation() { load(urlEdit->text()); @@ -368,6 +391,17 @@ public slots: } private: + + void loadURL(const QUrl& url) + { + if (!url.isValid()) + return; + + urlEdit->setText(url.toString()); + scene->webView()->load(url); + scene->webView()->setFocus(Qt::OtherFocusReason); + } + void buildUI() { QWebPage* page = scene->webView()->page(); @@ -383,9 +417,12 @@ private: bar->addWidget(urlEdit); QMenu* fileMenu = menuBar()->addMenu("&File"); - fileMenu->addAction("New Window", this, SLOT(newWindow())); - fileMenu->addAction("Clone view", this, SLOT(clone())); - fileMenu->addAction("Close", this, SLOT(close())); + fileMenu->addAction("New Window", this, SLOT(newWindow()), QKeySequence::New); + fileMenu->addAction("Open File...", this, SLOT(openFile()), QKeySequence::Open); + fileMenu->addAction("Clone Window", this, SLOT(clone())); + fileMenu->addAction("Close Window", this, SLOT(close()), QKeySequence::Close); + fileMenu->addSeparator(); + fileMenu->addAction("Quit", QApplication::instance(), SLOT(closeAllWindows()), QKeySequence(Qt::CTRL | Qt::Key_Q)); QMenu* viewMenu = menuBar()->addMenu("&View"); viewMenu->addAction(page->action(QWebPage::Stop)); @@ -418,6 +455,10 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType) int main(int argc, char** argv) { QApplication app(argc, argv); + if (app.arguments().contains("--help")) { + qDebug() << "Usage: QGVLauncher [--url url] [--compositing] [--updateMode Full|Minimal|Smart|No|BoundingRect] [--cacheWebView]\n"; + return 0; + } QString url = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html")); app.setApplicationName("GQVLauncher"); @@ -426,17 +467,23 @@ int main(int argc, char** argv) QWebSettings::setMaximumPagesInCache(4); QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true); QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); - QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true); + QWebSettings::enablePersistentStorage(); const QStringList args = app.arguments(); - if (args.count() > 1) + const int indexOfUrl = args.indexOf("--url"); + if (indexOfUrl > 0 && indexOfUrl < args.count() - 1) + url = args.at(indexOfUrl+1); + else if (args.count() > 1) url = args.at(1); + if (args.contains("--compositing")) + QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true); MainWindow* window = new MainWindow; window->load(url); - for (int i = 2; i < args.count(); i++) - window->newWindow(args.at(i)); + for (int i = 2; i < args.count(); ++i) + if (!args.at(i).startsWith("-") && !args.at(i - 1).startsWith("-")) + window->newWindow(args.at(i)); window->show(); return app.exec(); diff --git a/WebKit/qt/QtLauncher/QtLauncher.pro b/WebKit/qt/QtLauncher/QtLauncher.pro deleted file mode 100644 index 133869c..0000000 --- a/WebKit/qt/QtLauncher/QtLauncher.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE = app -SOURCES += main.cpp -CONFIG -= app_bundle -CONFIG += uitools -DESTDIR = ../../../bin - -include(../../../WebKit.pri) - -QT += network -macx:QT+=xml -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E543 - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} diff --git a/WebKit/qt/QtLauncher/main.cpp b/WebKit/qt/QtLauncher/main.cpp deleted file mode 100644 index 2286712..0000000 --- a/WebKit/qt/QtLauncher/main.cpp +++ /dev/null @@ -1,656 +0,0 @@ -/* - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) - * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> - * Copyright (C) 2006 George Staikos <staikos@kde.org> - * Copyright (C) 2006 Dirk Mueller <mueller@kde.org> - * Copyright (C) 2006 Zack Rusin <zack@kde.org> - * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org> - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <QtGui> -#include <QtNetwork/QNetworkProxy> -#include <QtNetwork/QNetworkRequest> -#if !defined(QT_NO_PRINTER) -#include <QPrintPreviewDialog> -#endif - -#ifndef QT_NO_UITOOLS -#include <QtUiTools/QUiLoader> -#endif - -#include <QDebug> -#include <QFile> -#include <QTextStream> -#include <QVector> - -#include <cstdio> -#include <qwebelement.h> -#include <qwebframe.h> -#include <qwebinspector.h> -#include <qwebpage.h> -#include <qwebsettings.h> -#include <qwebview.h> - - -#ifndef NDEBUG -void QWEBKIT_EXPORT qt_drt_garbageCollector_collect(); -#endif - -static QUrl urlFromUserInput(const QString& input) -{ -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - return QUrl::fromUserInput(input); -#else - return QUrl(input); -#endif -} - -class WebView : public QWebView { - Q_OBJECT -public: - WebView(QWidget* parent) : QWebView(parent) {} - -protected: - virtual void contextMenuEvent(QContextMenuEvent* event) - { - QMenu* menu = page()->createStandardContextMenu(); - - QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos()); - - if (!r.linkUrl().isEmpty()) { - QAction* newTabAction = menu->addAction(tr("Open in Default &Browser"), this, SLOT(openUrlInDefaultBrowser())); - newTabAction->setData(r.linkUrl()); - menu->insertAction(menu->actions().at(2), newTabAction); - } - - menu->exec(mapToGlobal(event->pos())); - delete menu; - } - - virtual void mousePressEvent(QMouseEvent* event) - { - mouseButtons = event->buttons(); - keyboardModifiers = event->modifiers(); - - QWebView::mousePressEvent(event); - } - -public slots: - void openUrlInDefaultBrowser(const QUrl &url = QUrl()) - { - if (QAction* action = qobject_cast<QAction*>(sender())) - QDesktopServices::openUrl(action->data().toUrl()); - else - QDesktopServices::openUrl(url); - } - -public: - Qt::MouseButtons mouseButtons; - Qt::KeyboardModifiers keyboardModifiers; -}; - -class WebPage : public QWebPage { -public: - WebPage(QWidget *parent) : QWebPage(parent) {} - - virtual QWebPage *createWindow(QWebPage::WebWindowType); - virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&); - virtual bool supportsExtension(QWebPage::Extension extension) const - { - if (extension == QWebPage::ErrorPageExtension) - return true; - return false; - } - virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output); - - - virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type) - { - WebView* webView = static_cast<WebView*>(view()); - if (webView->keyboardModifiers & Qt::ShiftModifier) { - QWebPage* page = createWindow(QWebPage::WebBrowserWindow); - page->mainFrame()->load(request); - return false; - } - if (webView->keyboardModifiers & Qt::AltModifier) { - webView->openUrlInDefaultBrowser(request.url()); - return false; - } - - return QWebPage::acceptNavigationRequest(frame, request, type); - } -}; - -class WebInspector : public QWebInspector { - Q_OBJECT -public: - WebInspector(QWidget* parent) : QWebInspector(parent) {} -signals: - void visibleChanged(bool nowVisible); -protected: - void showEvent(QShowEvent* event) - { - QWebInspector::showEvent(event); - emit visibleChanged(true); - } - void hideEvent(QHideEvent* event) - { - QWebInspector::hideEvent(event); - emit visibleChanged(false); - } -}; - -class MainWindow : public QMainWindow { - Q_OBJECT -public: - MainWindow(QString url = QString()): currentZoom(100) - { - setAttribute(Qt::WA_DeleteOnClose); - if (qgetenv("QTLAUNCHER_USE_ARGB_VISUALS").toInt() == 1) - setAttribute(Qt::WA_TranslucentBackground); - - QSplitter* splitter = new QSplitter(Qt::Vertical, this); - setCentralWidget(splitter); - - view = new WebView(splitter); - WebPage* page = new WebPage(view); - view->setPage(page); - connect(view, SIGNAL(loadFinished(bool)), - this, SLOT(loadFinished())); - connect(view, SIGNAL(titleChanged(const QString&)), - this, SLOT(setWindowTitle(const QString&))); - connect(view->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString &)), - this, SLOT(showLinkHover(const QString&, const QString&))); - connect(view->page(), SIGNAL(windowCloseRequested()), this, SLOT(close())); - - inspector = new WebInspector(splitter); - inspector->setPage(page); - inspector->hide(); - connect(this, SIGNAL(destroyed()), inspector, SLOT(deleteLater())); - - setupUI(); - - // set the proxy to the http_proxy env variable - if present - QUrl proxyUrl = urlFromUserInput(qgetenv("http_proxy")); - - if (proxyUrl.isValid() && !proxyUrl.host().isEmpty()) { - int proxyPort = (proxyUrl.port() > 0) ? proxyUrl.port() : 8080; - page->networkAccessManager()->setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, proxyUrl.host(), proxyPort)); - } - - QFileInfo fi(url); - if (fi.exists() && fi.isRelative()) - url = fi.absoluteFilePath(); - - QUrl qurl = urlFromUserInput(url); - if (qurl.scheme().isEmpty()) - qurl = QUrl("http://" + url + "/"); - if (qurl.isValid()) { - urlEdit->setText(qurl.toEncoded()); - view->load(qurl); - } - - // the zoom values are chosen to be like in Mozilla Firefox 3 - zoomLevels << 30 << 50 << 67 << 80 << 90; - zoomLevels << 100; - zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300; - } - - QWebPage* webPage() const - { - return view->page(); - } - - QWebView* webView() const - { - return view; - } - -protected slots: - - void changeLocation() - { - QString string = urlEdit->text(); - QUrl url = urlFromUserInput(string); - if (url.scheme().isEmpty()) - url = QUrl("http://" + string + "/"); - if (url.isValid()) { - urlEdit->setText(url.toEncoded()); - view->load(url); - view->setFocus(Qt::OtherFocusReason); - } - } - - void loadFinished() - { - urlEdit->setText(view->url().toString()); - - QUrl::FormattingOptions opts; - opts |= QUrl::RemoveScheme; - opts |= QUrl::RemoveUserInfo; - opts |= QUrl::StripTrailingSlash; - QString s = view->url().toString(opts); - s = s.mid(2); - if (s.isEmpty()) - return; - - if (!urlList.contains(s)) - urlList += s; - urlModel.setStringList(urlList); - } - - void showLinkHover(const QString &link, const QString &toolTip) - { - statusBar()->showMessage(link); -#ifndef QT_NO_TOOLTIP - if (!toolTip.isEmpty()) - QToolTip::showText(QCursor::pos(), toolTip); -#endif - } - - void zoomIn() - { - int i = zoomLevels.indexOf(currentZoom); - Q_ASSERT(i >= 0); - if (i < zoomLevels.count() - 1) - currentZoom = zoomLevels[i + 1]; - - view->setZoomFactor(qreal(currentZoom) / 100.0); - } - - void zoomOut() - { - int i = zoomLevels.indexOf(currentZoom); - Q_ASSERT(i >= 0); - if (i > 0) - currentZoom = zoomLevels[i - 1]; - - view->setZoomFactor(qreal(currentZoom) / 100.0); - } - - void resetZoom() - { - currentZoom = 100; - view->setZoomFactor(1.0); - } - - void toggleZoomTextOnly(bool b) - { - view->page()->settings()->setAttribute(QWebSettings::ZoomTextOnly, b); - } - - void print() - { -#if !defined(QT_NO_PRINTER) - QPrintPreviewDialog dlg(this); - connect(&dlg, SIGNAL(paintRequested(QPrinter *)), - view, SLOT(print(QPrinter *))); - dlg.exec(); -#endif - } - - void screenshot() - { - QPixmap pixmap = QPixmap::grabWidget(view); - QLabel* label = new QLabel; - label->setAttribute(Qt::WA_DeleteOnClose); - label->setWindowTitle("Screenshot - Preview"); - label->setPixmap(pixmap); - label->show(); - - QString fileName = QFileDialog::getSaveFileName(label, "Screenshot"); - if (!fileName.isEmpty()) { - pixmap.save(fileName, "png"); - label->setWindowTitle(QString("Screenshot - Saved at %1").arg(fileName)); - } - } - - void setEditable(bool on) - { - view->page()->setContentEditable(on); - formatMenuAction->setVisible(on); - } - - /* - void dumpPlugins() { - QList<QWebPluginInfo> plugins = QWebSettings::pluginDatabase()->plugins(); - foreach (const QWebPluginInfo plugin, plugins) { - qDebug() << "Plugin:" << plugin.name(); - foreach (const QWebPluginInfo::MimeType mime, plugin.mimeTypes()) { - qDebug() << " " << mime.name; - } - } - } - */ - - void dumpHtml() - { - qDebug() << "HTML: " << view->page()->mainFrame()->toHtml(); - } - - void selectElements() - { - bool ok; - QString str = QInputDialog::getText(this, "Select elements", "Choose elements", - QLineEdit::Normal, "a", &ok); - - if (ok && !str.isEmpty()) { - QWebElementCollection result = view->page()->mainFrame()->findAllElements(str); - foreach (QWebElement e, result) - e.setStyleProperty("background-color", "yellow"); - statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000); - } - } - -public slots: - - void newWindow(const QString &url = QString()) - { - MainWindow* mw = new MainWindow(url); - mw->show(); - } - -private: - - QVector<int> zoomLevels; - int currentZoom; - - // create the status bar, tool bar & menu - void setupUI() - { - progress = new QProgressBar(this); - progress->setRange(0, 100); - progress->setMinimumSize(100, 20); - progress->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - progress->hide(); - statusBar()->addPermanentWidget(progress); - - connect(view, SIGNAL(loadProgress(int)), progress, SLOT(show())); - connect(view, SIGNAL(loadProgress(int)), progress, SLOT(setValue(int))); - connect(view, SIGNAL(loadFinished(bool)), progress, SLOT(hide())); - - urlEdit = new QLineEdit(this); - urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy()); - connect(urlEdit, SIGNAL(returnPressed()), - SLOT(changeLocation())); - QCompleter* completer = new QCompleter(this); - urlEdit->setCompleter(completer); - completer->setModel(&urlModel); - - QToolBar* bar = addToolBar("Navigation"); - bar->addAction(view->pageAction(QWebPage::Back)); - bar->addAction(view->pageAction(QWebPage::Forward)); - bar->addAction(view->pageAction(QWebPage::Reload)); - bar->addAction(view->pageAction(QWebPage::Stop)); - bar->addWidget(urlEdit); - - QMenu* fileMenu = menuBar()->addMenu("&File"); - QAction* newWindow = fileMenu->addAction("New Window", this, SLOT(newWindow())); - fileMenu->addAction(tr("Print"), this, SLOT(print()), QKeySequence::Print); - QAction* screenshot = fileMenu->addAction("Screenshot", this, SLOT(screenshot())); - fileMenu->addAction("Close", this, SLOT(close())); - - QMenu* editMenu = menuBar()->addMenu("&Edit"); - editMenu->addAction(view->pageAction(QWebPage::Undo)); - editMenu->addAction(view->pageAction(QWebPage::Redo)); - editMenu->addSeparator(); - editMenu->addAction(view->pageAction(QWebPage::Cut)); - editMenu->addAction(view->pageAction(QWebPage::Copy)); - editMenu->addAction(view->pageAction(QWebPage::Paste)); - editMenu->addSeparator(); - QAction* setEditable = editMenu->addAction("Set Editable", this, SLOT(setEditable(bool))); - setEditable->setCheckable(true); - - QMenu* viewMenu = menuBar()->addMenu("&View"); - viewMenu->addAction(view->pageAction(QWebPage::Stop)); - viewMenu->addAction(view->pageAction(QWebPage::Reload)); - viewMenu->addSeparator(); - QAction* zoomIn = viewMenu->addAction("Zoom &In", this, SLOT(zoomIn())); - QAction* zoomOut = viewMenu->addAction("Zoom &Out", this, SLOT(zoomOut())); - QAction* resetZoom = viewMenu->addAction("Reset Zoom", this, SLOT(resetZoom())); - QAction* zoomTextOnly = viewMenu->addAction("Zoom Text Only", this, SLOT(toggleZoomTextOnly(bool))); - zoomTextOnly->setCheckable(true); - zoomTextOnly->setChecked(false); - viewMenu->addSeparator(); - viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml())); - //viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins())); - - QMenu* formatMenu = new QMenu("F&ormat", this); - formatMenuAction = menuBar()->addMenu(formatMenu); - formatMenuAction->setVisible(false); - formatMenu->addAction(view->pageAction(QWebPage::ToggleBold)); - formatMenu->addAction(view->pageAction(QWebPage::ToggleItalic)); - formatMenu->addAction(view->pageAction(QWebPage::ToggleUnderline)); - QMenu* writingMenu = formatMenu->addMenu(tr("Writing Direction")); - writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionDefault)); - writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionLeftToRight)); - writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionRightToLeft)); - - newWindow->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N)); - screenshot->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_S)); - view->pageAction(QWebPage::Back)->setShortcut(QKeySequence::Back); - view->pageAction(QWebPage::Stop)->setShortcut(Qt::Key_Escape); - view->pageAction(QWebPage::Forward)->setShortcut(QKeySequence::Forward); - view->pageAction(QWebPage::Reload)->setShortcut(QKeySequence::Refresh); - view->pageAction(QWebPage::Undo)->setShortcut(QKeySequence::Undo); - view->pageAction(QWebPage::Redo)->setShortcut(QKeySequence::Redo); - view->pageAction(QWebPage::Cut)->setShortcut(QKeySequence::Cut); - view->pageAction(QWebPage::Copy)->setShortcut(QKeySequence::Copy); - view->pageAction(QWebPage::Paste)->setShortcut(QKeySequence::Paste); - zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus)); - zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus)); - resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0)); - view->pageAction(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B)); - view->pageAction(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I)); - view->pageAction(QWebPage::ToggleUnderline)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_U)); - - QMenu* toolsMenu = menuBar()->addMenu("&Tools"); - toolsMenu->addAction("Select elements...", this, SLOT(selectElements())); - QAction* showInspectorAction = toolsMenu->addAction("Show inspector", inspector, SLOT(setVisible(bool))); - showInspectorAction->setCheckable(true); - showInspectorAction->setShortcuts(QList<QKeySequence>() << QKeySequence(tr("F12"))); - showInspectorAction->connect(inspector, SIGNAL(visibleChanged(bool)), SLOT(setChecked(bool))); - - } - - QWebView* view; - QLineEdit* urlEdit; - QProgressBar* progress; - WebInspector* inspector; - - QAction* formatMenuAction; - - QStringList urlList; - QStringListModel urlModel; -}; - -bool WebPage::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output) -{ - const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option); - QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output); - - errorPage->content = QString("<html><head><title>Failed loading page</title></head><body>%1</body></html>") - .arg(info->errorString).toUtf8(); - - return true; -} - -QWebPage* WebPage::createWindow(QWebPage::WebWindowType) -{ - MainWindow* mw = new MainWindow; - mw->show(); - return mw->webPage(); -} - -QObject* WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) -{ - Q_UNUSED(url); - Q_UNUSED(paramNames); - Q_UNUSED(paramValues); -#ifndef QT_NO_UITOOLS - QUiLoader loader; - return loader.createWidget(classId, view()); -#else - Q_UNUSED(classId); - return 0; -#endif -} - -class URLLoader : public QObject { - Q_OBJECT -public: - URLLoader(QWebView* view, const QString& inputFileName) - : m_view(view) - , m_stdOut(stdout) - , m_loaded(0) - { - init(inputFileName); - } - -public slots: - void loadNext() - { - QString qstr; - if (getUrl(qstr)) { - QUrl url(qstr, QUrl::StrictMode); - if (url.isValid()) { - m_stdOut << "Loading " << qstr << " ......" << ++m_loaded << endl; - m_view->load(url); - } else - loadNext(); - } else - disconnect(m_view, 0, this, 0); - } - -private: - void init(const QString& inputFileName) - { - QFile inputFile(inputFileName); - if (inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream stream(&inputFile); - QString line; - while (true) { - line = stream.readLine(); - if (line.isNull()) - break; - m_urls.append(line); - } - } else { - qDebug() << "Cant't open list file"; - exit(0); - } - m_index = 0; - inputFile.close(); - } - - bool getUrl(QString& qstr) - { - if (m_index == m_urls.size()) - return false; - - qstr = m_urls[m_index++]; - return true; - } - -private: - QVector<QString> m_urls; - int m_index; - QWebView* m_view; - QTextStream m_stdOut; - int m_loaded; -}; - -#include "main.moc" - -int launcherMain(const QApplication& app) -{ -#ifndef NDEBUG - int retVal = app.exec(); - qt_drt_garbageCollector_collect(); - QWebSettings::clearMemoryCaches(); - return retVal; -#else - return app.exec(); -#endif -} - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html")); - - QWebSettings::setMaximumPagesInCache(4); - - app.setApplicationName("QtLauncher"); - app.setApplicationVersion("0.1"); - - QWebSettings::setObjectCacheCapacities((16*1024*1024) / 8, (16*1024*1024) / 8, 16*1024*1024); - - QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true); - QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); - QWebSettings::enablePersistentStorage(); - - // To allow QWebInspector's configuration persistence - QCoreApplication::setOrganizationName("Nokia"); - QCoreApplication::setApplicationName("QtLauncher"); - - const QStringList args = app.arguments(); - - if (args.contains(QLatin1String("-r"))) { - // robotized - QString listFile = args.at(2); - if (!(args.count() == 3) && QFile::exists(listFile)) { - qDebug() << "Usage: QtLauncher -r listfile"; - exit(0); - } - MainWindow* window = new MainWindow; - QWebView* view = window->webView(); - URLLoader loader(view, listFile); - QObject::connect(view, SIGNAL(loadFinished(bool)), &loader, SLOT(loadNext())); - loader.loadNext(); - window->show(); - launcherMain(app); - } else { - MainWindow* window = 0; - - // Look though the args for something we can open - for (int i = 1; i < args.count(); i++) { - if (!args.at(i).startsWith("-")) { - if (!window) - window = new MainWindow(args.at(i)); - else - window->newWindow(args.at(i)); - } - } - - // If not, just open the default URL - if (!window) - window = new MainWindow(defaultUrl); - - window->show(); - launcherMain(app); - } -} diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index eb7ac9a..f1e6a86 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -25,6 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "config.h" #include "ChromeClientQt.h" @@ -38,8 +39,13 @@ #include "NotImplemented.h" #include "WindowFeatures.h" #include "DatabaseTracker.h" -#include "SecurityOrigin.h" +#include "QtFallbackWebPopup.h" #include "QWebPageClient.h" +#include "SecurityOrigin.h" + +#include <qdebug.h> +#include <qtextdocument.h> +#include <qtooltip.h> #include "qwebpage.h" #include "qwebpage_p.h" @@ -48,12 +54,11 @@ #include "qwebsecurityorigin_p.h" #include "qwebview.h" -#include <qtooltip.h> -#include <qtextdocument.h> - -namespace WebCore -{ +#if USE(ACCELERATED_COMPOSITING) +#include "GraphicsLayerQt.h" +#endif +namespace WebCore { ChromeClientQt::ChromeClientQt(QWebPage* webPage) : m_webPage(webPage) @@ -283,7 +288,14 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const QString x = result; FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client()); bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x); - result = x; + + // Fix up a quirk in the QInputDialog class. If no input happened the string should be empty + // but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914. + if (rc && x.isNull()) + result = String(""); + else + result = x; + return rc; } @@ -458,4 +470,31 @@ void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*) notImplemented(); } +#if USE(ACCELERATED_COMPOSITING) +void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) +{ + if (platformPageClient()) + platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0); +} + +void ChromeClientQt::setNeedsOneShotDrawingSynchronization() +{ + // we want the layers to synchronize next time we update the screen anyway + if (platformPageClient()) + platformPageClient()->markForSync(false); +} + +void ChromeClientQt::scheduleCompositingLayerSync() +{ + // we want the layers to synchronize ASAP + if (platformPageClient()) + platformPageClient()->markForSync(true); +} +#endif + +QtAbstractWebPopup* ChromeClientQt::createSelectPopup() +{ + return new QtFallbackWebPopup; +} + } diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 939fe04..7699349 100644 --- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -42,6 +42,7 @@ namespace WebCore { class FloatRect; class Page; struct FrameLoadRequest; + class QtAbstractWebPopup; class ChromeClientQt : public ChromeClient { @@ -122,6 +123,19 @@ namespace WebCore { #if ENABLE(OFFLINE_WEB_APPLICATIONS) virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); #endif + +#if USE(ACCELERATED_COMPOSITING) + // see ChromeClient.h + // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers + virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*); + virtual void setNeedsOneShotDrawingSynchronization(); + virtual void scheduleCompositingLayerSync(); +#endif + +#if ENABLE(TOUCH_EVENTS) + virtual void needTouchEvents(bool) { } +#endif + virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); virtual void formStateDidChange(const Node*) { } @@ -134,6 +148,8 @@ namespace WebCore { virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); + QtAbstractWebPopup* createSelectPopup(); + QWebPage* m_webPage; WebCore::KURL lastHoverURL; WebCore::String lastHoverTitle; diff --git a/WebKit/qt/WebCoreSupport/DragClientQt.cpp b/WebKit/qt/WebCoreSupport/DragClientQt.cpp index 99e438d..e48c3e3 100644 --- a/WebKit/qt/WebCoreSupport/DragClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/DragClientQt.cpp @@ -27,6 +27,8 @@ #include "DragClientQt.h" #include "ClipboardQt.h" +#include "Frame.h" +#include "PlatformMouseEvent.h" #include "qwebpage.h" #include <QDrag> @@ -35,6 +37,32 @@ namespace WebCore { +static inline Qt::DropActions dragOperationsToDropActions(unsigned op) +{ + Qt::DropActions result = Qt::IgnoreAction; + if (op & DragOperationCopy) + result = Qt::CopyAction; + if (op & DragOperationMove) + result |= Qt::MoveAction; + if (op & DragOperationGeneric) + result |= Qt::MoveAction; + if (op & DragOperationLink) + result |= Qt::LinkAction; + return result; +} + +static inline DragOperation dropActionToDragOperation(Qt::DropActions action) +{ + DragOperation result = DragOperationNone; + if (action & Qt::CopyAction) + result = DragOperationCopy; + if (action & Qt::LinkAction) + result = DragOperationLink; + if (action & Qt::MoveAction) + result = DragOperationMove; + return result; +} + DragDestinationAction DragClientQt::actionMaskForDrag(DragData*) { return DragDestinationActionAny; @@ -58,7 +86,7 @@ void DragClientQt::willPerformDragSourceAction(DragSourceAction, const IntPoint& { } -void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame*, bool) +void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* frame, bool) { #ifndef QT_NO_DRAGANDDROP QMimeData* clipboardData = static_cast<ClipboardQt*>(clipboard)->clipboardData(); @@ -66,10 +94,15 @@ void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Cli QWidget* view = m_webPage->view(); if (view) { QDrag *drag = new QDrag(view); - if (clipboardData->hasImage()) + if (clipboardData && clipboardData->hasImage()) drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData())); + DragOperation dragOperationMask = clipboard->sourceOperation(); drag->setMimeData(clipboardData); - drag->start(); + Qt::DropAction actualDropAction = drag->exec(dragOperationsToDropActions(dragOperationMask)); + + // Send dragEnd event + PlatformMouseEvent me(m_webPage->view()->mapFromGlobal(QCursor::pos()), QCursor::pos(), LeftButton, MouseEventMoved, 0, false, false, false, false, 0); + frame->eventHandler()->dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction)); } #endif } diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 3091a43..90ebb1d 100644 --- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -625,7 +625,12 @@ void EditorClientQt::setInputMethodState(bool active) } } webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); -#endif +#ifdef Q_WS_MAEMO_5 + // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we. + webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true); + webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true); +#endif // Q_WS_MAEMO_5 +#endif // QT_VERSION check webPageClient->setInputMethodEnabled(active); } emit m_page->microFocusChanged(); diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 3c30ab5..760e37e 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -331,8 +331,6 @@ void FrameLoaderClientQt::dispatchDidPopStateWithinPage() void FrameLoaderClientQt::dispatchWillClose() { - if (dumpFrameLoaderCallbacks) - printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); } @@ -599,9 +597,6 @@ String FrameLoaderClientQt::userAgent(const KURL& url) void FrameLoaderClientQt::dispatchDidReceiveIcon() { - if (dumpFrameLoaderCallbacks) - printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); - if (m_webFrame) { emit m_webFrame->iconChanged(); } @@ -626,9 +621,6 @@ void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* w if (world != mainThreadNormalWorld()) return; - if (dumpFrameLoaderCallbacks) - printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); - if (m_webFrame) emit m_webFrame->javaScriptWindowObjectCleared(); } @@ -1036,7 +1028,12 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String return 0; QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name); - frameData.url = url; + + if (url.isEmpty()) + frameData.url = blankURL(); + else + frameData.url = url; + frameData.referrer = referrer; frameData.allowsScrolling = allowsScrolling; frameData.marginWidth = marginWidth; diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index d5683c4..1caf96d 100644 --- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -112,12 +112,16 @@ void InspectorClientQt::showWindow() { updateWindowTitle(); +#if ENABLE(INSPECTOR) m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true); +#endif } void InspectorClientQt::closeWindow() { +#if ENABLE(INSPECTOR) m_inspectedWebPage->d->inspectorController()->setWindowVisible(false); +#endif } void InspectorClientQt::attachWindow() diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp new file mode 100644 index 0000000..7ee2b7c --- /dev/null +++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2010 Girish Ramakrishnan <girish@forwardbias.in> + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ +#include "config.h" +#include "QtFallbackWebPopup.h" + +#include "HostWindow.h" +#include "PopupMenuClient.h" +#include "qgraphicswebview.h" +#include "QWebPageClient.h" +#include <QAbstractItemView> +#include <QApplication> +#include <QGraphicsProxyWidget> +#include <QGraphicsScene> +#include <QGraphicsView> +#include <QInputContext> +#include <QMouseEvent> +#include <QStandardItemModel> + +namespace WebCore { + +QtFallbackWebPopupCombo::QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup) + : m_ownerPopup(ownerPopup) +{ +} + +void QtFallbackWebPopupCombo::showPopup() +{ + QComboBox::showPopup(); + m_ownerPopup.m_popupVisible = true; +} + +void QtFallbackWebPopupCombo::hidePopup() +{ + QWidget* activeFocus = QApplication::focusWidget(); + if (activeFocus && activeFocus == QComboBox::view() + && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) { + QInputContext* qic = activeFocus->inputContext(); + if (qic) { + qic->reset(); + qic->setFocusWidget(0); + } + } + + QComboBox::hidePopup(); + + if (QGraphicsProxyWidget* proxy = graphicsProxyWidget()) + proxy->setVisible(false); + + if (!m_ownerPopup.m_popupVisible) + return; + + m_ownerPopup.m_popupVisible = false; + m_ownerPopup.popupDidHide(); +} + +// QtFallbackWebPopup + +QtFallbackWebPopup::QtFallbackWebPopup() + : QtAbstractWebPopup() + , m_popupVisible(false) + , m_combo(new QtFallbackWebPopupCombo(*this)) + , m_proxy(0) +{ + connect(m_combo, SIGNAL(activated(int)), + SLOT(activeChanged(int)), Qt::QueuedConnection); +} + +QtFallbackWebPopup::~QtFallbackWebPopup() +{ + // If we create a proxy, then the deletion of the proxy and the + // combo will be done by the proxy's parent (QGraphicsWebView) + if (!m_proxy) + delete m_combo; +} + +void QtFallbackWebPopup::show() +{ + populate(); + m_combo->setCurrentIndex(currentIndex()); + QRect rect = geometry(); + if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) { + if (!m_proxy) { + m_proxy = new QGraphicsProxyWidget(webView); + m_proxy->setWidget(m_combo); + } else + m_proxy->setVisible(true); + m_proxy->setGeometry(rect); + } else { + m_combo->setParent(pageClient()->ownerWidget()); + m_combo->setGeometry(QRect(rect.left(), rect.top(), + rect.width(), m_combo->sizeHint().height())); + + } + + // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates + // as comboboxes with Qt on Maemo 5 come up in their full width on the screen. + // On the other platforms it's okay to use QCursor::pos(). +#if defined(Q_WS_MAEMO_5) + m_combo->showPopup(); +#else + QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton, + Qt::LeftButton, Qt::NoModifier); + QCoreApplication::sendEvent(m_combo, &event); +#endif +} + +void QtFallbackWebPopup::hide() +{ + m_combo->hidePopup(); +} + +void QtFallbackWebPopup::populate() +{ + m_combo->clear(); + + QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_combo->model()); + Q_ASSERT(model); + +#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) + m_combo->setFont(font()); +#endif + for (int i = 0; i < itemCount(); ++i) { + switch (itemType(i)) { + case Separator: + m_combo->insertSeparator(i); + break; + case Group: + m_combo->insertItem(i, itemText(i)); + model->item(i)->setEnabled(false); + break; + case Option: + m_combo->insertItem(i, itemText(i)); + model->item(i)->setEnabled(itemIsEnabled(i)); + break; + } + } +} + +void QtFallbackWebPopup::activeChanged(int index) +{ + if (index < 0) + return; + + valueChanged(index); +} + +} diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h new file mode 100644 index 0000000..3924bf6 --- /dev/null +++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ +#ifndef QtFallbackWebPopup_h +#define QtFallbackWebPopup_h + +#include "QtAbstractWebPopup.h" +#include <QComboBox> + +class QGraphicsProxyWidget; + +namespace WebCore { + +class QtFallbackWebPopupCombo; + +class QtFallbackWebPopup : public QObject, public QtAbstractWebPopup { + Q_OBJECT +public: + QtFallbackWebPopup(); + ~QtFallbackWebPopup(); + + virtual void show(); + virtual void hide(); + +private slots: + void activeChanged(int); + +private: + friend class QtFallbackWebPopupCombo; + bool m_popupVisible; + QtFallbackWebPopupCombo* m_combo; + QGraphicsProxyWidget* m_proxy; + + void populate(); +}; + +class QtFallbackWebPopupCombo : public QComboBox { +public: + QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup); + virtual void showPopup(); + virtual void hidePopup(); + +private: + QtFallbackWebPopup& m_ownerPopup; +}; + +} + +#endif // QtFallbackWebPopup_h diff --git a/WebKit/qt/docs/qtwebkit.qdocconf b/WebKit/qt/docs/qtwebkit.qdocconf index 8ee8f69..292c124 100644 --- a/WebKit/qt/docs/qtwebkit.qdocconf +++ b/WebKit/qt/docs/qtwebkit.qdocconf @@ -4,7 +4,7 @@ project = qtwebkit description = "Qt WebKit API Documentation" headerdirs = $SRCDIR/WebKit/qt/Api -sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs +sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api outputdir = $OUTPUT_DIR/doc/html outputformats = HTML sources.fileextensions = "*.cpp *.doc *.qdoc *.h" diff --git a/WebKit/qt/docs/webkitsnippets/webelement/main.cpp b/WebKit/qt/docs/webkitsnippets/webelement/main.cpp index 2707ffb..822b61c 100644 --- a/WebKit/qt/docs/webkitsnippets/webelement/main.cpp +++ b/WebKit/qt/docs/webkitsnippets/webelement/main.cpp @@ -53,8 +53,8 @@ static void findAll() */ //! [FindAll intro] - QList<QWebElement> allSpans = document.findAll("span"); - QList<QWebElement> introSpans = document.findAll("p.intro span"); + QWebElementCollection allSpans = document.findAll("span"); + QWebElementCollection introSpans = document.findAll("p.intro span"); //! [FindAll intro] //! [FindAll] } diff --git a/WebKit/qt/symbian/backup_registration.xml b/WebKit/qt/symbian/backup_registration.xml new file mode 100644 index 0000000..e026140 --- /dev/null +++ b/WebKit/qt/symbian/backup_registration.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" standalone="yes"?> +<backup_registration> + <system_backup/> + <restore requires_reboot = "no"/> +</backup_registration> diff --git a/WebKit/qt/symbian/bwins/QtWebKitu.def b/WebKit/qt/symbian/bwins/QtWebKitu.def new file mode 100644 index 0000000..086e986 --- /dev/null +++ b/WebKit/qt/symbian/bwins/QtWebKitu.def @@ -0,0 +1,627 @@ +EXPORTS + ??0MimeType@QWebPluginFactory@@QAE@ABU01@@Z @ 1 NONAME ; QWebPluginFactory::MimeType::MimeType(struct QWebPluginFactory::MimeType const &) + ??0QGraphicsWebView@@QAE@PAVQGraphicsItem@@@Z @ 2 NONAME ; QGraphicsWebView::QGraphicsWebView(class QGraphicsItem *) + ??0QWebDatabase@@AAE@PAVQWebDatabasePrivate@@@Z @ 3 NONAME ; QWebDatabase::QWebDatabase(class QWebDatabasePrivate *) + ??0QWebDatabase@@QAE@ABV0@@Z @ 4 NONAME ; QWebDatabase::QWebDatabase(class QWebDatabase const &) + ??0QWebElement@@AAE@PAVElement@WebCore@@@Z @ 5 NONAME ; QWebElement::QWebElement(class WebCore::Element *) + ??0QWebElement@@AAE@PAVNode@WebCore@@@Z @ 6 NONAME ; QWebElement::QWebElement(class WebCore::Node *) + ??0QWebElement@@QAE@ABV0@@Z @ 7 NONAME ; QWebElement::QWebElement(class QWebElement const &) + ??0QWebElement@@QAE@XZ @ 8 NONAME ; QWebElement::QWebElement(void) + ??0QWebElementCollection@@QAE@ABV0@@Z @ 9 NONAME ; QWebElementCollection::QWebElementCollection(class QWebElementCollection const &) + ??0QWebElementCollection@@QAE@ABVQWebElement@@ABVQString@@@Z @ 10 NONAME ; QWebElementCollection::QWebElementCollection(class QWebElement const &, class QString const &) + ??0QWebElementCollection@@QAE@XZ @ 11 NONAME ; QWebElementCollection::QWebElementCollection(void) + ??0QWebFrame@@AAE@PAV0@PAVQWebFrameData@@@Z @ 12 NONAME ; QWebFrame::QWebFrame(class QWebFrame *, class QWebFrameData *) + ??0QWebFrame@@AAE@PAVQWebPage@@PAVQWebFrameData@@@Z @ 13 NONAME ; QWebFrame::QWebFrame(class QWebPage *, class QWebFrameData *) + ??0QWebHistory@@AAE@XZ @ 14 NONAME ; QWebHistory::QWebHistory(void) + ??0QWebHistoryInterface@@QAE@PAVQObject@@@Z @ 15 NONAME ; QWebHistoryInterface::QWebHistoryInterface(class QObject *) + ??0QWebHistoryItem@@AAE@PAVQWebHistoryItemPrivate@@@Z @ 16 NONAME ; QWebHistoryItem::QWebHistoryItem(class QWebHistoryItemPrivate *) + ??0QWebHistoryItem@@QAE@ABV0@@Z @ 17 NONAME ; QWebHistoryItem::QWebHistoryItem(class QWebHistoryItem const &) + ??0QWebHitTestResult@@AAE@PAVQWebHitTestResultPrivate@@@Z @ 18 NONAME ; QWebHitTestResult::QWebHitTestResult(class QWebHitTestResultPrivate *) + ??0QWebHitTestResult@@QAE@ABV0@@Z @ 19 NONAME ; QWebHitTestResult::QWebHitTestResult(class QWebHitTestResult const &) + ??0QWebHitTestResult@@QAE@XZ @ 20 NONAME ; QWebHitTestResult::QWebHitTestResult(void) + ??0QWebInspector@@QAE@PAVQWidget@@@Z @ 21 NONAME ; QWebInspector::QWebInspector(class QWidget *) + ??0QWebPage@@QAE@PAVQObject@@@Z @ 22 NONAME ; QWebPage::QWebPage(class QObject *) + ??0QWebPluginDatabase@@AAE@PAVQObject@@@Z @ 23 NONAME ; QWebPluginDatabase::QWebPluginDatabase(class QObject *) + ??0QWebPluginFactory@@QAE@PAVQObject@@@Z @ 24 NONAME ; QWebPluginFactory::QWebPluginFactory(class QObject *) + ??0QWebPluginInfo@@AAE@PAVPluginPackage@WebCore@@@Z @ 25 NONAME ; QWebPluginInfo::QWebPluginInfo(class WebCore::PluginPackage *) + ??0QWebPluginInfo@@QAE@ABV0@@Z @ 26 NONAME ; QWebPluginInfo::QWebPluginInfo(class QWebPluginInfo const &) + ??0QWebPluginInfo@@QAE@XZ @ 27 NONAME ; QWebPluginInfo::QWebPluginInfo(void) + ??0QWebSecurityOrigin@@AAE@PAVQWebSecurityOriginPrivate@@@Z @ 28 NONAME ; QWebSecurityOrigin::QWebSecurityOrigin(class QWebSecurityOriginPrivate *) + ??0QWebSecurityOrigin@@QAE@ABV0@@Z @ 29 NONAME ; QWebSecurityOrigin::QWebSecurityOrigin(class QWebSecurityOrigin const &) + ??0QWebSettings@@AAE@PAVSettings@WebCore@@@Z @ 30 NONAME ; QWebSettings::QWebSettings(class WebCore::Settings *) + ??0QWebSettings@@AAE@XZ @ 31 NONAME ; QWebSettings::QWebSettings(void) + ??0QWebView@@QAE@PAVQWidget@@@Z @ 32 NONAME ; QWebView::QWebView(class QWidget *) + ??1MimeType@QWebPluginFactory@@QAE@XZ @ 33 NONAME ; QWebPluginFactory::MimeType::~MimeType(void) + ??1QGraphicsWebView@@UAE@XZ @ 34 NONAME ; QGraphicsWebView::~QGraphicsWebView(void) + ??1QWebDatabase@@QAE@XZ @ 35 NONAME ; QWebDatabase::~QWebDatabase(void) + ??1QWebElement@@QAE@XZ @ 36 NONAME ; QWebElement::~QWebElement(void) + ??1QWebElementCollection@@QAE@XZ @ 37 NONAME ; QWebElementCollection::~QWebElementCollection(void) + ??1QWebFrame@@EAE@XZ @ 38 NONAME ; QWebFrame::~QWebFrame(void) + ??1QWebHistory@@AAE@XZ @ 39 NONAME ; QWebHistory::~QWebHistory(void) + ??1QWebHistoryInterface@@UAE@XZ @ 40 NONAME ; QWebHistoryInterface::~QWebHistoryInterface(void) + ??1QWebHistoryItem@@QAE@XZ @ 41 NONAME ; QWebHistoryItem::~QWebHistoryItem(void) + ??1QWebHitTestResult@@QAE@XZ @ 42 NONAME ; QWebHitTestResult::~QWebHitTestResult(void) + ??1QWebInspector@@UAE@XZ @ 43 NONAME ; QWebInspector::~QWebInspector(void) + ??1QWebPage@@UAE@XZ @ 44 NONAME ; QWebPage::~QWebPage(void) + ??1QWebPluginDatabase@@EAE@XZ @ 45 NONAME ; QWebPluginDatabase::~QWebPluginDatabase(void) + ??1QWebPluginFactory@@UAE@XZ @ 46 NONAME ; QWebPluginFactory::~QWebPluginFactory(void) + ??1QWebPluginInfo@@QAE@XZ @ 47 NONAME ; QWebPluginInfo::~QWebPluginInfo(void) + ??1QWebSecurityOrigin@@QAE@XZ @ 48 NONAME ; QWebSecurityOrigin::~QWebSecurityOrigin(void) + ??1QWebSettings@@AAE@XZ @ 49 NONAME ; QWebSettings::~QWebSettings(void) + ??1QWebView@@UAE@XZ @ 50 NONAME ; QWebView::~QWebView(void) + ??4QWebDatabase@@QAEAAV0@ABV0@@Z @ 51 NONAME ; class QWebDatabase & QWebDatabase::operator=(class QWebDatabase const &) + ??4QWebElement@@QAEAAV0@ABV0@@Z @ 52 NONAME ; class QWebElement & QWebElement::operator=(class QWebElement const &) + ??4QWebElementCollection@@QAEAAV0@ABV0@@Z @ 53 NONAME ; class QWebElementCollection & QWebElementCollection::operator=(class QWebElementCollection const &) + ??4QWebHistoryItem@@QAEAAV0@ABV0@@Z @ 54 NONAME ; class QWebHistoryItem & QWebHistoryItem::operator=(class QWebHistoryItem const &) + ??4QWebHitTestResult@@QAEAAV0@ABV0@@Z @ 55 NONAME ; class QWebHitTestResult & QWebHitTestResult::operator=(class QWebHitTestResult const &) + ??4QWebPluginInfo@@QAEAAV0@ABV0@@Z @ 56 NONAME ; class QWebPluginInfo & QWebPluginInfo::operator=(class QWebPluginInfo const &) + ??4QWebSecurityOrigin@@QAEAAV0@ABV0@@Z @ 57 NONAME ; class QWebSecurityOrigin & QWebSecurityOrigin::operator=(class QWebSecurityOrigin const &) + ??5@YAAAVQDataStream@@AAV0@AAVQWebHistory@@@Z @ 58 NONAME ; class QDataStream & operator>>(class QDataStream &, class QWebHistory &) + ??6@YAAAVQDataStream@@AAV0@ABVQWebHistory@@@Z @ 59 NONAME ; class QDataStream & operator<<(class QDataStream &, class QWebHistory const &) + ??8MimeType@QWebPluginFactory@@QBE_NABU01@@Z @ 60 NONAME ; bool QWebPluginFactory::MimeType::operator==(struct QWebPluginFactory::MimeType const &) const + ??8QWebElement@@QBE_NABV0@@Z @ 61 NONAME ; bool QWebElement::operator==(class QWebElement const &) const + ??8QWebPluginInfo@@QBE_NABV0@@Z @ 62 NONAME ; bool QWebPluginInfo::operator==(class QWebPluginInfo const &) const + ??9MimeType@QWebPluginFactory@@QBE_NABU01@@Z @ 63 NONAME ; bool QWebPluginFactory::MimeType::operator!=(struct QWebPluginFactory::MimeType const &) const + ??9QWebElement@@QBE_NABV0@@Z @ 64 NONAME ; bool QWebElement::operator!=(class QWebElement const &) const + ??9QWebPluginInfo@@QBE_NABV0@@Z @ 65 NONAME ; bool QWebPluginInfo::operator!=(class QWebPluginInfo const &) const + ??AQWebElementCollection@@QBE?AVQWebElement@@H@Z @ 66 NONAME ; class QWebElement QWebElementCollection::operator[](int) const + ??HQWebElementCollection@@QBE?AV0@ABV0@@Z @ 67 NONAME ; class QWebElementCollection QWebElementCollection::operator+(class QWebElementCollection const &) const + ??YQWebElementCollection@@QAEAAV0@ABV0@@Z @ 68 NONAME ; class QWebElementCollection & QWebElementCollection::operator+=(class QWebElementCollection const &) + ??_EMimeType@QWebPluginFactory@@QAE@I@Z @ 69 NONAME ; QWebPluginFactory::MimeType::~MimeType(unsigned int) + ??_EQGraphicsWebView@@UAE@I@Z @ 70 NONAME ; QGraphicsWebView::~QGraphicsWebView(unsigned int) + ??_EQWebFrame@@UAE@I@Z @ 71 NONAME ; QWebFrame::~QWebFrame(unsigned int) + ??_EQWebHistoryInterface@@UAE@I@Z @ 72 NONAME ; QWebHistoryInterface::~QWebHistoryInterface(unsigned int) + ??_EQWebInspector@@UAE@I@Z @ 73 NONAME ; QWebInspector::~QWebInspector(unsigned int) + ??_EQWebPage@@UAE@I@Z @ 74 NONAME ; QWebPage::~QWebPage(unsigned int) + ??_EQWebPluginDatabase@@UAE@I@Z @ 75 NONAME ; QWebPluginDatabase::~QWebPluginDatabase(unsigned int) + ??_EQWebPluginFactory@@UAE@I@Z @ 76 NONAME ; QWebPluginFactory::~QWebPluginFactory(unsigned int) + ??_EQWebView@@UAE@I@Z @ 77 NONAME ; QWebView::~QWebView(unsigned int) + ?acceptNavigationRequest@QWebPage@@MAE_NPAVQWebFrame@@ABVQNetworkRequest@@W4NavigationType@1@@Z @ 78 NONAME ; bool QWebPage::acceptNavigationRequest(class QWebFrame *, class QNetworkRequest const &, enum QWebPage::NavigationType) + ?action@QWebPage@@QBEPAVQAction@@W4WebAction@1@@Z @ 79 NONAME ; class QAction * QWebPage::action(enum QWebPage::WebAction) const + ?addClass@QWebElement@@QAEXABVQString@@@Z @ 80 NONAME ; void QWebElement::addClass(class QString const &) + ?addLocalScheme@QWebSecurityOrigin@@SAXABVQString@@@Z @ 81 NONAME ; void QWebSecurityOrigin::addLocalScheme(class QString const &) + ?addSearchPath@QWebPluginDatabase@@QAEXABVQString@@@Z @ 82 NONAME ; void QWebPluginDatabase::addSearchPath(class QString const &) + ?addToJavaScriptWindowObject@QWebFrame@@QAEXABVQString@@PAVQObject@@@Z @ 83 NONAME ; void QWebFrame::addToJavaScriptWindowObject(class QString const &, class QObject *) + ?addToJavaScriptWindowObject@QWebFrame@@QAEXABVQString@@PAVQObject@@W4ValueOwnership@QScriptEngine@@@Z @ 84 NONAME ; void QWebFrame::addToJavaScriptWindowObject(class QString const &, class QObject *, enum QScriptEngine::ValueOwnership) + ?allOrigins@QWebSecurityOrigin@@SA?AV?$QList@VQWebSecurityOrigin@@@@XZ @ 85 NONAME ; class QList<class QWebSecurityOrigin> QWebSecurityOrigin::allOrigins(void) + ?alternateText@QWebHitTestResult@@QBE?AVQString@@XZ @ 86 NONAME ; class QString QWebHitTestResult::alternateText(void) const + ?append@QWebElementCollection@@QAEXABV1@@Z @ 87 NONAME ; void QWebElementCollection::append(class QWebElementCollection const &) + ?appendInside@QWebElement@@QAEXABV1@@Z @ 88 NONAME ; void QWebElement::appendInside(class QWebElement const &) + ?appendInside@QWebElement@@QAEXABVQString@@@Z @ 89 NONAME ; void QWebElement::appendInside(class QString const &) + ?appendOutside@QWebElement@@QAEXABV1@@Z @ 90 NONAME ; void QWebElement::appendOutside(class QWebElement const &) + ?appendOutside@QWebElement@@QAEXABVQString@@@Z @ 91 NONAME ; void QWebElement::appendOutside(class QString const &) + ?at@QWebElementCollection@@QBE?AVQWebElement@@H@Z @ 92 NONAME ; class QWebElement QWebElementCollection::at(int) const + ?attribute@QWebElement@@QBE?AVQString@@ABV2@0@Z @ 93 NONAME ; class QString QWebElement::attribute(class QString const &, class QString const &) const + ?attributeNS@QWebElement@@QBE?AVQString@@ABV2@00@Z @ 94 NONAME ; class QString QWebElement::attributeNS(class QString const &, class QString const &, class QString const &) const + ?back@QGraphicsWebView@@QAEXXZ @ 95 NONAME ; void QGraphicsWebView::back(void) + ?back@QWebHistory@@QAEXXZ @ 96 NONAME ; void QWebHistory::back(void) + ?back@QWebView@@QAEXXZ @ 97 NONAME ; void QWebView::back(void) + ?backItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 98 NONAME ; class QWebHistoryItem QWebHistory::backItem(void) const + ?backItems@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@H@Z @ 99 NONAME ; class QList<class QWebHistoryItem> QWebHistory::backItems(int) const + ?baseUrl@QWebFrame@@QBE?AVQUrl@@XZ @ 100 NONAME ; class QUrl QWebFrame::baseUrl(void) const + ?begin@QWebElementCollection@@QAE?AViterator@1@XZ @ 101 NONAME ; class QWebElementCollection::iterator QWebElementCollection::begin(void) + ?begin@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 102 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::begin(void) const + ?boundingRect@QWebHitTestResult@@QBE?AVQRect@@XZ @ 103 NONAME ; class QRect QWebHitTestResult::boundingRect(void) const + ?bytesReceived@QWebPage@@QBE_KXZ @ 104 NONAME ; unsigned long long QWebPage::bytesReceived(void) const + ?canGoBack@QWebHistory@@QBE_NXZ @ 105 NONAME ; bool QWebHistory::canGoBack(void) const + ?canGoForward@QWebHistory@@QBE_NXZ @ 106 NONAME ; bool QWebHistory::canGoForward(void) const + ?changeEvent@QWebView@@MAEXPAVQEvent@@@Z @ 107 NONAME ; void QWebView::changeEvent(class QEvent *) + ?childFrames@QWebFrame@@QBE?AV?$QList@PAVQWebFrame@@@@XZ @ 108 NONAME ; class QList<class QWebFrame *> QWebFrame::childFrames(void) const + ?chooseFile@QWebPage@@MAE?AVQString@@PAVQWebFrame@@ABV2@@Z @ 109 NONAME ; class QString QWebPage::chooseFile(class QWebFrame *, class QString const &) + ?classes@QWebElement@@QBE?AVQStringList@@XZ @ 110 NONAME ; class QStringList QWebElement::classes(void) const + ?clear@QWebHistory@@QAEXXZ @ 111 NONAME ; void QWebHistory::clear(void) + ?clearIconDatabase@QWebSettings@@SAXXZ @ 112 NONAME ; void QWebSettings::clearIconDatabase(void) + ?clearMemoryCaches@QWebSettings@@SAXXZ @ 113 NONAME ; void QWebSettings::clearMemoryCaches(void) + ?clone@QWebElement@@QBE?AV1@XZ @ 114 NONAME ; class QWebElement QWebElement::clone(void) const + ?constBegin@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 115 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::constBegin(void) const + ?constEnd@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 116 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::constEnd(void) const + ?contentsChanged@QWebPage@@IAEXXZ @ 117 NONAME ; void QWebPage::contentsChanged(void) + ?contentsSize@QWebFrame@@QBE?AVQSize@@XZ @ 118 NONAME ; class QSize QWebFrame::contentsSize(void) const + ?contentsSizeChanged@QWebFrame@@IAEXABVQSize@@@Z @ 119 NONAME ; void QWebFrame::contentsSizeChanged(class QSize const &) + ?contextMenuEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneContextMenuEvent@@@Z @ 120 NONAME ; void QGraphicsWebView::contextMenuEvent(class QGraphicsSceneContextMenuEvent *) + ?contextMenuEvent@QWebView@@MAEXPAVQContextMenuEvent@@@Z @ 121 NONAME ; void QWebView::contextMenuEvent(class QContextMenuEvent *) + ?count@QWebElementCollection@@QBEHXZ @ 122 NONAME ; int QWebElementCollection::count(void) const + ?count@QWebHistory@@QBEHXZ @ 123 NONAME ; int QWebHistory::count(void) const + ?createPlugin@QWebPage@@MAEPAVQObject@@ABVQString@@ABVQUrl@@ABVQStringList@@2@Z @ 124 NONAME ; class QObject * QWebPage::createPlugin(class QString const &, class QUrl const &, class QStringList const &, class QStringList const &) + ?createStandardContextMenu@QWebPage@@QAEPAVQMenu@@XZ @ 125 NONAME ; class QMenu * QWebPage::createStandardContextMenu(void) + ?createWindow@QWebPage@@MAEPAV1@W4WebWindowType@1@@Z @ 126 NONAME ; class QWebPage * QWebPage::createWindow(enum QWebPage::WebWindowType) + ?createWindow@QWebView@@MAEPAV1@W4WebWindowType@QWebPage@@@Z @ 127 NONAME ; class QWebView * QWebView::createWindow(enum QWebPage::WebWindowType) + ?currentFrame@QWebPage@@QBEPAVQWebFrame@@XZ @ 128 NONAME ; class QWebFrame * QWebPage::currentFrame(void) const + ?currentItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 129 NONAME ; class QWebHistoryItem QWebHistory::currentItem(void) const + ?currentItemIndex@QWebHistory@@QBEHXZ @ 130 NONAME ; int QWebHistory::currentItemIndex(void) const + ?databaseQuota@QWebSecurityOrigin@@QBE_JXZ @ 131 NONAME ; long long QWebSecurityOrigin::databaseQuota(void) const + ?databaseQuotaExceeded@QWebPage@@IAEXPAVQWebFrame@@VQString@@@Z @ 132 NONAME ; void QWebPage::databaseQuotaExceeded(class QWebFrame *, class QString) + ?databaseUsage@QWebSecurityOrigin@@QBE_JXZ @ 133 NONAME ; long long QWebSecurityOrigin::databaseUsage(void) const + ?databases@QWebSecurityOrigin@@QBE?AV?$QList@VQWebDatabase@@@@XZ @ 134 NONAME ; class QList<class QWebDatabase> QWebSecurityOrigin::databases(void) const + ?defaultInterface@QWebHistoryInterface@@SAPAV1@XZ @ 135 NONAME ; class QWebHistoryInterface * QWebHistoryInterface::defaultInterface(void) + ?defaultSearchPaths@QWebPluginDatabase@@SA?AVQStringList@@XZ @ 136 NONAME ; class QStringList QWebPluginDatabase::defaultSearchPaths(void) + ?defaultTextEncoding@QWebSettings@@QBE?AVQString@@XZ @ 137 NONAME ; class QString QWebSettings::defaultTextEncoding(void) const + ?description@QWebPluginInfo@@QBE?AVQString@@XZ @ 138 NONAME ; class QString QWebPluginInfo::description(void) const + ?displayName@QWebDatabase@@QBE?AVQString@@XZ @ 139 NONAME ; class QString QWebDatabase::displayName(void) const + ?document@QWebElement@@QBE?AV1@XZ @ 140 NONAME ; class QWebElement QWebElement::document(void) const + ?documentElement@QWebFrame@@QBE?AVQWebElement@@XZ @ 141 NONAME ; class QWebElement QWebFrame::documentElement(void) const + ?downloadRequested@QWebPage@@IAEXABVQNetworkRequest@@@Z @ 142 NONAME ; void QWebPage::downloadRequested(class QNetworkRequest const &) + ?dragEnterEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 143 NONAME ; void QGraphicsWebView::dragEnterEvent(class QGraphicsSceneDragDropEvent *) + ?dragEnterEvent@QWebView@@MAEXPAVQDragEnterEvent@@@Z @ 144 NONAME ; void QWebView::dragEnterEvent(class QDragEnterEvent *) + ?dragLeaveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 145 NONAME ; void QGraphicsWebView::dragLeaveEvent(class QGraphicsSceneDragDropEvent *) + ?dragLeaveEvent@QWebView@@MAEXPAVQDragLeaveEvent@@@Z @ 146 NONAME ; void QWebView::dragLeaveEvent(class QDragLeaveEvent *) + ?dragMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 147 NONAME ; void QGraphicsWebView::dragMoveEvent(class QGraphicsSceneDragDropEvent *) + ?dragMoveEvent@QWebView@@MAEXPAVQDragMoveEvent@@@Z @ 148 NONAME ; void QWebView::dragMoveEvent(class QDragMoveEvent *) + ?dropEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneDragDropEvent@@@Z @ 149 NONAME ; void QGraphicsWebView::dropEvent(class QGraphicsSceneDragDropEvent *) + ?dropEvent@QWebView@@MAEXPAVQDropEvent@@@Z @ 150 NONAME ; void QWebView::dropEvent(class QDropEvent *) + ?element@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 151 NONAME ; class QWebElement QWebHitTestResult::element(void) const + ?enablePersistentStorage@QWebSettings@@SAXABVQString@@@Z @ 152 NONAME ; void QWebSettings::enablePersistentStorage(class QString const &) + ?encloseContentsWith@QWebElement@@QAEXABV1@@Z @ 153 NONAME ; void QWebElement::encloseContentsWith(class QWebElement const &) + ?encloseContentsWith@QWebElement@@QAEXABVQString@@@Z @ 154 NONAME ; void QWebElement::encloseContentsWith(class QString const &) + ?encloseWith@QWebElement@@QAEXABV1@@Z @ 155 NONAME ; void QWebElement::encloseWith(class QWebElement const &) + ?encloseWith@QWebElement@@QAEXABVQString@@@Z @ 156 NONAME ; void QWebElement::encloseWith(class QString const &) + ?enclosingBlockElement@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 157 NONAME ; class QWebElement QWebHitTestResult::enclosingBlockElement(void) const + ?enclosingElement@QWebElement@@CA?AV1@PAVNode@WebCore@@@Z @ 158 NONAME ; class QWebElement QWebElement::enclosingElement(class WebCore::Node *) + ?end@QWebElementCollection@@QAE?AViterator@1@XZ @ 159 NONAME ; class QWebElementCollection::iterator QWebElementCollection::end(void) + ?end@QWebElementCollection@@QBE?AVconst_iterator@1@XZ @ 160 NONAME ; class QWebElementCollection::const_iterator QWebElementCollection::end(void) const + ?evaluateJavaScript@QWebElement@@QAE?AVQVariant@@ABVQString@@@Z @ 161 NONAME ; class QVariant QWebElement::evaluateJavaScript(class QString const &) + ?evaluateJavaScript@QWebFrame@@QAE?AVQVariant@@ABVQString@@@Z @ 162 NONAME ; class QVariant QWebFrame::evaluateJavaScript(class QString const &) + ?event@QGraphicsWebView@@UAE_NPAVQEvent@@@Z @ 163 NONAME ; bool QGraphicsWebView::event(class QEvent *) + ?event@QWebFrame@@UAE_NPAVQEvent@@@Z @ 164 NONAME ; bool QWebFrame::event(class QEvent *) + ?event@QWebInspector@@UAE_NPAVQEvent@@@Z @ 165 NONAME ; bool QWebInspector::event(class QEvent *) + ?event@QWebPage@@UAE_NPAVQEvent@@@Z @ 166 NONAME ; bool QWebPage::event(class QEvent *) + ?event@QWebView@@UAE_NPAVQEvent@@@Z @ 167 NONAME ; bool QWebView::event(class QEvent *) + ?expectedSize@QWebDatabase@@QBE_JXZ @ 168 NONAME ; long long QWebDatabase::expectedSize(void) const + ?extension@QWebPage@@UAE_NW4Extension@1@PBVExtensionOption@1@PAVExtensionReturn@1@@Z @ 169 NONAME ; bool QWebPage::extension(enum QWebPage::Extension, class QWebPage::ExtensionOption const *, class QWebPage::ExtensionReturn *) + ?extension@QWebPluginFactory@@UAE_NW4Extension@1@PBVExtensionOption@1@PAVExtensionReturn@1@@Z @ 170 NONAME ; bool QWebPluginFactory::extension(enum QWebPluginFactory::Extension, class QWebPluginFactory::ExtensionOption const *, class QWebPluginFactory::ExtensionReturn *) + ?fileName@QWebDatabase@@QBE?AVQString@@XZ @ 171 NONAME ; class QString QWebDatabase::fileName(void) const + ?findAll@QWebElement@@QBE?AVQWebElementCollection@@ABVQString@@@Z @ 172 NONAME ; class QWebElementCollection QWebElement::findAll(class QString const &) const + ?findAllElements@QWebFrame@@QBE?AVQWebElementCollection@@ABVQString@@@Z @ 173 NONAME ; class QWebElementCollection QWebFrame::findAllElements(class QString const &) const + ?findFirst@QWebElement@@QBE?AV1@ABVQString@@@Z @ 174 NONAME ; class QWebElement QWebElement::findFirst(class QString const &) const + ?findFirstElement@QWebFrame@@QBE?AVQWebElement@@ABVQString@@@Z @ 175 NONAME ; class QWebElement QWebFrame::findFirstElement(class QString const &) const + ?findText@QGraphicsWebView@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 176 NONAME ; bool QGraphicsWebView::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>) + ?findText@QWebPage@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 177 NONAME ; bool QWebPage::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>) + ?findText@QWebView@@QAE_NABVQString@@V?$QFlags@W4FindFlag@QWebPage@@@@@Z @ 178 NONAME ; bool QWebView::findText(class QString const &, class QFlags<enum QWebPage::FindFlag>) + ?first@QWebElementCollection@@QBE?AVQWebElement@@XZ @ 179 NONAME ; class QWebElement QWebElementCollection::first(void) const + ?firstChild@QWebElement@@QBE?AV1@XZ @ 180 NONAME ; class QWebElement QWebElement::firstChild(void) const + ?focusInEvent@QGraphicsWebView@@MAEXPAVQFocusEvent@@@Z @ 181 NONAME ; void QGraphicsWebView::focusInEvent(class QFocusEvent *) + ?focusInEvent@QWebView@@MAEXPAVQFocusEvent@@@Z @ 182 NONAME ; void QWebView::focusInEvent(class QFocusEvent *) + ?focusNextPrevChild@QGraphicsWebView@@MAE_N_N@Z @ 183 NONAME ; bool QGraphicsWebView::focusNextPrevChild(bool) + ?focusNextPrevChild@QWebPage@@QAE_N_N@Z @ 184 NONAME ; bool QWebPage::focusNextPrevChild(bool) + ?focusNextPrevChild@QWebView@@MAE_N_N@Z @ 185 NONAME ; bool QWebView::focusNextPrevChild(bool) + ?focusOutEvent@QGraphicsWebView@@MAEXPAVQFocusEvent@@@Z @ 186 NONAME ; void QGraphicsWebView::focusOutEvent(class QFocusEvent *) + ?focusOutEvent@QWebView@@MAEXPAVQFocusEvent@@@Z @ 187 NONAME ; void QWebView::focusOutEvent(class QFocusEvent *) + ?fontFamily@QWebSettings@@QBE?AVQString@@W4FontFamily@1@@Z @ 188 NONAME ; class QString QWebSettings::fontFamily(enum QWebSettings::FontFamily) const + ?fontSize@QWebSettings@@QBEHW4FontSize@1@@Z @ 189 NONAME ; int QWebSettings::fontSize(enum QWebSettings::FontSize) const + ?forward@QGraphicsWebView@@QAEXXZ @ 190 NONAME ; void QGraphicsWebView::forward(void) + ?forward@QWebHistory@@QAEXXZ @ 191 NONAME ; void QWebHistory::forward(void) + ?forward@QWebView@@QAEXXZ @ 192 NONAME ; void QWebView::forward(void) + ?forwardItem@QWebHistory@@QBE?AVQWebHistoryItem@@XZ @ 193 NONAME ; class QWebHistoryItem QWebHistory::forwardItem(void) const + ?forwardItems@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@H@Z @ 194 NONAME ; class QList<class QWebHistoryItem> QWebHistory::forwardItems(int) const + ?forwardUnsupportedContent@QWebPage@@QBE_NXZ @ 195 NONAME ; bool QWebPage::forwardUnsupportedContent(void) const + ?frame@QWebHitTestResult@@QBEPAVQWebFrame@@XZ @ 196 NONAME ; class QWebFrame * QWebHitTestResult::frame(void) const + ?frameAt@QWebPage@@QBEPAVQWebFrame@@ABVQPoint@@@Z @ 197 NONAME ; class QWebFrame * QWebPage::frameAt(class QPoint const &) const + ?frameCreated@QWebPage@@IAEXPAVQWebFrame@@@Z @ 198 NONAME ; void QWebPage::frameCreated(class QWebFrame *) + ?frameName@QWebFrame@@QBE?AVQString@@XZ @ 199 NONAME ; class QString QWebFrame::frameName(void) const + ?geometry@QWebElement@@QBE?AVQRect@@XZ @ 200 NONAME ; class QRect QWebElement::geometry(void) const + ?geometry@QWebFrame@@QBE?AVQRect@@XZ @ 201 NONAME ; class QRect QWebFrame::geometry(void) const + ?geometryChangeRequested@QWebPage@@IAEXABVQRect@@@Z @ 202 NONAME ; void QWebPage::geometryChangeRequested(class QRect const &) + ?getStaticMetaObject@QGraphicsWebView@@SAABUQMetaObject@@XZ @ 203 NONAME ; struct QMetaObject const & QGraphicsWebView::getStaticMetaObject(void) + ?getStaticMetaObject@QWebFrame@@SAABUQMetaObject@@XZ @ 204 NONAME ; struct QMetaObject const & QWebFrame::getStaticMetaObject(void) + ?getStaticMetaObject@QWebHistoryInterface@@SAABUQMetaObject@@XZ @ 205 NONAME ; struct QMetaObject const & QWebHistoryInterface::getStaticMetaObject(void) + ?getStaticMetaObject@QWebInspector@@SAABUQMetaObject@@XZ @ 206 NONAME ; struct QMetaObject const & QWebInspector::getStaticMetaObject(void) + ?getStaticMetaObject@QWebPage@@SAABUQMetaObject@@XZ @ 207 NONAME ; struct QMetaObject const & QWebPage::getStaticMetaObject(void) + ?getStaticMetaObject@QWebPluginDatabase@@SAABUQMetaObject@@XZ @ 208 NONAME ; struct QMetaObject const & QWebPluginDatabase::getStaticMetaObject(void) + ?getStaticMetaObject@QWebPluginFactory@@SAABUQMetaObject@@XZ @ 209 NONAME ; struct QMetaObject const & QWebPluginFactory::getStaticMetaObject(void) + ?getStaticMetaObject@QWebView@@SAABUQMetaObject@@XZ @ 210 NONAME ; struct QMetaObject const & QWebView::getStaticMetaObject(void) + ?globalSettings@QWebSettings@@SAPAV1@XZ @ 211 NONAME ; class QWebSettings * QWebSettings::globalSettings(void) + ?goToItem@QWebHistory@@QAEXABVQWebHistoryItem@@@Z @ 212 NONAME ; void QWebHistory::goToItem(class QWebHistoryItem const &) + ?handle@QWebPage@@QBEPAVQWebPagePrivate@@XZ @ 213 NONAME ; class QWebPagePrivate * QWebPage::handle(void) const + ?handle@QWebSettings@@QBEPAVQWebSettingsPrivate@@XZ @ 214 NONAME ; class QWebSettingsPrivate * QWebSettings::handle(void) const + ?hasAttribute@QWebElement@@QBE_NABVQString@@@Z @ 215 NONAME ; bool QWebElement::hasAttribute(class QString const &) const + ?hasAttributeNS@QWebElement@@QBE_NABVQString@@0@Z @ 216 NONAME ; bool QWebElement::hasAttributeNS(class QString const &, class QString const &) const + ?hasAttributes@QWebElement@@QBE_NXZ @ 217 NONAME ; bool QWebElement::hasAttributes(void) const + ?hasClass@QWebElement@@QBE_NABVQString@@@Z @ 218 NONAME ; bool QWebElement::hasClass(class QString const &) const + ?hasFocus@QWebElement@@QBE_NXZ @ 219 NONAME ; bool QWebElement::hasFocus(void) const + ?hasFocus@QWebFrame@@QBE_NXZ @ 220 NONAME ; bool QWebFrame::hasFocus(void) const + ?hideEvent@QWebInspector@@MAEXPAVQHideEvent@@@Z @ 221 NONAME ; void QWebInspector::hideEvent(class QHideEvent *) + ?history@QGraphicsWebView@@QBEPAVQWebHistory@@XZ @ 222 NONAME ; class QWebHistory * QGraphicsWebView::history(void) const + ?history@QWebPage@@QBEPAVQWebHistory@@XZ @ 223 NONAME ; class QWebHistory * QWebPage::history(void) const + ?history@QWebView@@QBEPAVQWebHistory@@XZ @ 224 NONAME ; class QWebHistory * QWebView::history(void) const + ?hitTestContent@QWebFrame@@QBE?AVQWebHitTestResult@@ABVQPoint@@@Z @ 225 NONAME ; class QWebHitTestResult QWebFrame::hitTestContent(class QPoint const &) const + ?host@QWebSecurityOrigin@@QBE?AVQString@@XZ @ 226 NONAME ; class QString QWebSecurityOrigin::host(void) const + ?hoverLeaveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 227 NONAME ; void QGraphicsWebView::hoverLeaveEvent(class QGraphicsSceneHoverEvent *) + ?hoverMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneHoverEvent@@@Z @ 228 NONAME ; void QGraphicsWebView::hoverMoveEvent(class QGraphicsSceneHoverEvent *) + ?icon@QGraphicsWebView@@QBE?AVQIcon@@XZ @ 229 NONAME ; class QIcon QGraphicsWebView::icon(void) const + ?icon@QWebFrame@@QBE?AVQIcon@@XZ @ 230 NONAME ; class QIcon QWebFrame::icon(void) const + ?icon@QWebHistoryItem@@QBE?AVQIcon@@XZ @ 231 NONAME ; class QIcon QWebHistoryItem::icon(void) const + ?icon@QWebView@@QBE?AVQIcon@@XZ @ 232 NONAME ; class QIcon QWebView::icon(void) const + ?iconChanged@QGraphicsWebView@@IAEXXZ @ 233 NONAME ; void QGraphicsWebView::iconChanged(void) + ?iconChanged@QWebFrame@@IAEXXZ @ 234 NONAME ; void QWebFrame::iconChanged(void) + ?iconChanged@QWebView@@IAEXXZ @ 235 NONAME ; void QWebView::iconChanged(void) + ?iconDatabasePath@QWebSettings@@SA?AVQString@@XZ @ 236 NONAME ; class QString QWebSettings::iconDatabasePath(void) + ?iconForUrl@QWebSettings@@SA?AVQIcon@@ABVQUrl@@@Z @ 237 NONAME ; class QIcon QWebSettings::iconForUrl(class QUrl const &) + ?imageUrl@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 238 NONAME ; class QUrl QWebHitTestResult::imageUrl(void) const + ?initialLayoutCompleted@QWebFrame@@IAEXXZ @ 239 NONAME ; void QWebFrame::initialLayoutCompleted(void) + ?inputMethodEvent@QGraphicsWebView@@MAEXPAVQInputMethodEvent@@@Z @ 240 NONAME ; void QGraphicsWebView::inputMethodEvent(class QInputMethodEvent *) + ?inputMethodEvent@QWebView@@MAEXPAVQInputMethodEvent@@@Z @ 241 NONAME ; void QWebView::inputMethodEvent(class QInputMethodEvent *) + ?inputMethodQuery@QGraphicsWebView@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 242 NONAME ; class QVariant QGraphicsWebView::inputMethodQuery(enum Qt::InputMethodQuery) const + ?inputMethodQuery@QWebPage@@QBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 243 NONAME ; class QVariant QWebPage::inputMethodQuery(enum Qt::InputMethodQuery) const + ?inputMethodQuery@QWebView@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 244 NONAME ; class QVariant QWebView::inputMethodQuery(enum Qt::InputMethodQuery) const + ?isContentEditable@QWebHitTestResult@@QBE_NXZ @ 245 NONAME ; bool QWebHitTestResult::isContentEditable(void) const + ?isContentEditable@QWebPage@@QBE_NXZ @ 246 NONAME ; bool QWebPage::isContentEditable(void) const + ?isContentSelected@QWebHitTestResult@@QBE_NXZ @ 247 NONAME ; bool QWebHitTestResult::isContentSelected(void) const + ?isEnabled@QWebPluginInfo@@QBE_NXZ @ 248 NONAME ; bool QWebPluginInfo::isEnabled(void) const + ?isModified@QGraphicsWebView@@QBE_NXZ @ 249 NONAME ; bool QGraphicsWebView::isModified(void) const + ?isModified@QWebPage@@QBE_NXZ @ 250 NONAME ; bool QWebPage::isModified(void) const + ?isModified@QWebView@@QBE_NXZ @ 251 NONAME ; bool QWebView::isModified(void) const + ?isNull@QWebElement@@QBE_NXZ @ 252 NONAME ; bool QWebElement::isNull(void) const + ?isNull@QWebHitTestResult@@QBE_NXZ @ 253 NONAME ; bool QWebHitTestResult::isNull(void) const + ?isNull@QWebPluginInfo@@QBE_NXZ @ 254 NONAME ; bool QWebPluginInfo::isNull(void) const + ?isValid@QWebHistoryItem@@QBE_NXZ @ 255 NONAME ; bool QWebHistoryItem::isValid(void) const + ?itemAt@QWebHistory@@QBE?AVQWebHistoryItem@@H@Z @ 256 NONAME ; class QWebHistoryItem QWebHistory::itemAt(int) const + ?itemChange@QGraphicsWebView@@UAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 257 NONAME ; class QVariant QGraphicsWebView::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) + ?items@QWebHistory@@QBE?AV?$QList@VQWebHistoryItem@@@@XZ @ 258 NONAME ; class QList<class QWebHistoryItem> QWebHistory::items(void) const + ?javaScriptAlert@QWebPage@@MAEXPAVQWebFrame@@ABVQString@@@Z @ 259 NONAME ; void QWebPage::javaScriptAlert(class QWebFrame *, class QString const &) + ?javaScriptConfirm@QWebPage@@MAE_NPAVQWebFrame@@ABVQString@@@Z @ 260 NONAME ; bool QWebPage::javaScriptConfirm(class QWebFrame *, class QString const &) + ?javaScriptConsoleMessage@QWebPage@@MAEXABVQString@@H0@Z @ 261 NONAME ; void QWebPage::javaScriptConsoleMessage(class QString const &, int, class QString const &) + ?javaScriptPrompt@QWebPage@@MAE_NPAVQWebFrame@@ABVQString@@1PAV3@@Z @ 262 NONAME ; bool QWebPage::javaScriptPrompt(class QWebFrame *, class QString const &, class QString const &, class QString *) + ?javaScriptWindowObjectCleared@QWebFrame@@IAEXXZ @ 263 NONAME ; void QWebFrame::javaScriptWindowObjectCleared(void) + ?keyPressEvent@QGraphicsWebView@@MAEXPAVQKeyEvent@@@Z @ 264 NONAME ; void QGraphicsWebView::keyPressEvent(class QKeyEvent *) + ?keyPressEvent@QWebView@@MAEXPAVQKeyEvent@@@Z @ 265 NONAME ; void QWebView::keyPressEvent(class QKeyEvent *) + ?keyReleaseEvent@QGraphicsWebView@@MAEXPAVQKeyEvent@@@Z @ 266 NONAME ; void QGraphicsWebView::keyReleaseEvent(class QKeyEvent *) + ?keyReleaseEvent@QWebView@@MAEXPAVQKeyEvent@@@Z @ 267 NONAME ; void QWebView::keyReleaseEvent(class QKeyEvent *) + ?last@QWebElementCollection@@QBE?AVQWebElement@@XZ @ 268 NONAME ; class QWebElement QWebElementCollection::last(void) const + ?lastChild@QWebElement@@QBE?AV1@XZ @ 269 NONAME ; class QWebElement QWebElement::lastChild(void) const + ?lastVisited@QWebHistoryItem@@QBE?AVQDateTime@@XZ @ 270 NONAME ; class QDateTime QWebHistoryItem::lastVisited(void) const + ?linkClicked@QGraphicsWebView@@IAEXABVQUrl@@@Z @ 271 NONAME ; void QGraphicsWebView::linkClicked(class QUrl const &) + ?linkClicked@QWebPage@@IAEXABVQUrl@@@Z @ 272 NONAME ; void QWebPage::linkClicked(class QUrl const &) + ?linkClicked@QWebView@@IAEXABVQUrl@@@Z @ 273 NONAME ; void QWebView::linkClicked(class QUrl const &) + ?linkDelegationPolicy@QWebPage@@QBE?AW4LinkDelegationPolicy@1@XZ @ 274 NONAME ; enum QWebPage::LinkDelegationPolicy QWebPage::linkDelegationPolicy(void) const + ?linkElement@QWebHitTestResult@@QBE?AVQWebElement@@XZ @ 275 NONAME ; class QWebElement QWebHitTestResult::linkElement(void) const + ?linkHovered@QWebPage@@IAEXABVQString@@00@Z @ 276 NONAME ; void QWebPage::linkHovered(class QString const &, class QString const &, class QString const &) + ?linkTargetFrame@QWebHitTestResult@@QBEPAVQWebFrame@@XZ @ 277 NONAME ; class QWebFrame * QWebHitTestResult::linkTargetFrame(void) const + ?linkText@QWebHitTestResult@@QBE?AVQString@@XZ @ 278 NONAME ; class QString QWebHitTestResult::linkText(void) const + ?linkTitle@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 279 NONAME ; class QUrl QWebHitTestResult::linkTitle(void) const + ?linkUrl@QWebHitTestResult@@QBE?AVQUrl@@XZ @ 280 NONAME ; class QUrl QWebHitTestResult::linkUrl(void) const + ?load@QGraphicsWebView@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 281 NONAME ; void QGraphicsWebView::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &) + ?load@QGraphicsWebView@@QAEXABVQUrl@@@Z @ 282 NONAME ; void QGraphicsWebView::load(class QUrl const &) + ?load@QWebFrame@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 283 NONAME ; void QWebFrame::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &) + ?load@QWebFrame@@QAEXABVQUrl@@@Z @ 284 NONAME ; void QWebFrame::load(class QUrl const &) + ?load@QWebView@@QAEXABVQNetworkRequest@@W4Operation@QNetworkAccessManager@@ABVQByteArray@@@Z @ 285 NONAME ; void QWebView::load(class QNetworkRequest const &, enum QNetworkAccessManager::Operation, class QByteArray const &) + ?load@QWebView@@QAEXABVQUrl@@@Z @ 286 NONAME ; void QWebView::load(class QUrl const &) + ?loadFinished@QGraphicsWebView@@IAEX_N@Z @ 287 NONAME ; void QGraphicsWebView::loadFinished(bool) + ?loadFinished@QWebFrame@@IAEX_N@Z @ 288 NONAME ; void QWebFrame::loadFinished(bool) + ?loadFinished@QWebPage@@IAEX_N@Z @ 289 NONAME ; void QWebPage::loadFinished(bool) + ?loadFinished@QWebView@@IAEX_N@Z @ 290 NONAME ; void QWebView::loadFinished(bool) + ?loadProgress@QGraphicsWebView@@IAEXH@Z @ 291 NONAME ; void QGraphicsWebView::loadProgress(int) + ?loadProgress@QWebPage@@IAEXH@Z @ 292 NONAME ; void QWebPage::loadProgress(int) + ?loadProgress@QWebView@@IAEXH@Z @ 293 NONAME ; void QWebView::loadProgress(int) + ?loadStarted@QGraphicsWebView@@IAEXXZ @ 294 NONAME ; void QGraphicsWebView::loadStarted(void) + ?loadStarted@QWebFrame@@IAEXXZ @ 295 NONAME ; void QWebFrame::loadStarted(void) + ?loadStarted@QWebPage@@IAEXXZ @ 296 NONAME ; void QWebPage::loadStarted(void) + ?loadStarted@QWebView@@IAEXXZ @ 297 NONAME ; void QWebView::loadStarted(void) + ?localName@QWebElement@@QBE?AVQString@@XZ @ 298 NONAME ; class QString QWebElement::localName(void) const + ?localSchemes@QWebSecurityOrigin@@SA?AVQStringList@@XZ @ 299 NONAME ; class QStringList QWebSecurityOrigin::localSchemes(void) + ?localStoragePath@QWebSettings@@QBE?AVQString@@XZ @ 300 NONAME ; class QString QWebSettings::localStoragePath(void) const + ?mainFrame@QWebPage@@QBEPAVQWebFrame@@XZ @ 301 NONAME ; class QWebFrame * QWebPage::mainFrame(void) const + ?maximumItemCount@QWebHistory@@QBEHXZ @ 302 NONAME ; int QWebHistory::maximumItemCount(void) const + ?maximumPagesInCache@QWebSettings@@SAHXZ @ 303 NONAME ; int QWebSettings::maximumPagesInCache(void) + ?menuBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 304 NONAME ; void QWebPage::menuBarVisibilityChangeRequested(bool) + ?metaData@QWebFrame@@QBE?AV?$QMultiMap@VQString@@V1@@@XZ @ 305 NONAME ; class QMultiMap<class QString, class QString> QWebFrame::metaData(void) const + ?metaObject@QGraphicsWebView@@UBEPBUQMetaObject@@XZ @ 306 NONAME ; struct QMetaObject const * QGraphicsWebView::metaObject(void) const + ?metaObject@QWebFrame@@UBEPBUQMetaObject@@XZ @ 307 NONAME ; struct QMetaObject const * QWebFrame::metaObject(void) const + ?metaObject@QWebHistoryInterface@@UBEPBUQMetaObject@@XZ @ 308 NONAME ; struct QMetaObject const * QWebHistoryInterface::metaObject(void) const + ?metaObject@QWebInspector@@UBEPBUQMetaObject@@XZ @ 309 NONAME ; struct QMetaObject const * QWebInspector::metaObject(void) const + ?metaObject@QWebPage@@UBEPBUQMetaObject@@XZ @ 310 NONAME ; struct QMetaObject const * QWebPage::metaObject(void) const + ?metaObject@QWebPluginDatabase@@UBEPBUQMetaObject@@XZ @ 311 NONAME ; struct QMetaObject const * QWebPluginDatabase::metaObject(void) const + ?metaObject@QWebPluginFactory@@UBEPBUQMetaObject@@XZ @ 312 NONAME ; struct QMetaObject const * QWebPluginFactory::metaObject(void) const + ?metaObject@QWebView@@UBEPBUQMetaObject@@XZ @ 313 NONAME ; struct QMetaObject const * QWebView::metaObject(void) const + ?microFocusChanged@QWebPage@@IAEXXZ @ 314 NONAME ; void QWebPage::microFocusChanged(void) + ?mimeTypes@QWebPluginInfo@@QBE?AV?$QList@UMimeType@QWebPluginFactory@@@@XZ @ 315 NONAME ; class QList<struct QWebPluginFactory::MimeType> QWebPluginInfo::mimeTypes(void) const + ?mouseDoubleClickEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 316 NONAME ; void QGraphicsWebView::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *) + ?mouseDoubleClickEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 317 NONAME ; void QWebView::mouseDoubleClickEvent(class QMouseEvent *) + ?mouseMoveEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 318 NONAME ; void QGraphicsWebView::mouseMoveEvent(class QGraphicsSceneMouseEvent *) + ?mouseMoveEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 319 NONAME ; void QWebView::mouseMoveEvent(class QMouseEvent *) + ?mousePressEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 320 NONAME ; void QGraphicsWebView::mousePressEvent(class QGraphicsSceneMouseEvent *) + ?mousePressEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 321 NONAME ; void QWebView::mousePressEvent(class QMouseEvent *) + ?mouseReleaseEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 322 NONAME ; void QGraphicsWebView::mouseReleaseEvent(class QGraphicsSceneMouseEvent *) + ?mouseReleaseEvent@QWebView@@MAEXPAVQMouseEvent@@@Z @ 323 NONAME ; void QWebView::mouseReleaseEvent(class QMouseEvent *) + ?name@QWebDatabase@@QBE?AVQString@@XZ @ 324 NONAME ; class QString QWebDatabase::name(void) const + ?name@QWebPluginInfo@@QBE?AVQString@@XZ @ 325 NONAME ; class QString QWebPluginInfo::name(void) const + ?namespaceUri@QWebElement@@QBE?AVQString@@XZ @ 326 NONAME ; class QString QWebElement::namespaceUri(void) const + ?networkAccessManager@QWebPage@@QBEPAVQNetworkAccessManager@@XZ @ 327 NONAME ; class QNetworkAccessManager * QWebPage::networkAccessManager(void) const + ?nextSibling@QWebElement@@QBE?AV1@XZ @ 328 NONAME ; class QWebElement QWebElement::nextSibling(void) const + ?offlineStorageDefaultQuota@QWebSettings@@SA_JXZ @ 329 NONAME ; long long QWebSettings::offlineStorageDefaultQuota(void) + ?offlineStoragePath@QWebSettings@@SA?AVQString@@XZ @ 330 NONAME ; class QString QWebSettings::offlineStoragePath(void) + ?offlineWebApplicationCachePath@QWebSettings@@SA?AVQString@@XZ @ 331 NONAME ; class QString QWebSettings::offlineWebApplicationCachePath(void) + ?offlineWebApplicationCacheQuota@QWebSettings@@SA_JXZ @ 332 NONAME ; long long QWebSettings::offlineWebApplicationCacheQuota(void) + ?origin@QWebDatabase@@QBE?AVQWebSecurityOrigin@@XZ @ 333 NONAME ; class QWebSecurityOrigin QWebDatabase::origin(void) const + ?originalUrl@QWebHistoryItem@@QBE?AVQUrl@@XZ @ 334 NONAME ; class QUrl QWebHistoryItem::originalUrl(void) const + ?page@QGraphicsWebView@@QBEPAVQWebPage@@XZ @ 335 NONAME ; class QWebPage * QGraphicsWebView::page(void) const + ?page@QWebFrame@@QBEPAVQWebPage@@XZ @ 336 NONAME ; class QWebPage * QWebFrame::page(void) const + ?page@QWebInspector@@QBEPAVQWebPage@@XZ @ 337 NONAME ; class QWebPage * QWebInspector::page(void) const + ?page@QWebView@@QBEPAVQWebPage@@XZ @ 338 NONAME ; class QWebPage * QWebView::page(void) const + ?pageAction@QGraphicsWebView@@QBEPAVQAction@@W4WebAction@QWebPage@@@Z @ 339 NONAME ; class QAction * QGraphicsWebView::pageAction(enum QWebPage::WebAction) const + ?pageAction@QWebView@@QBEPAVQAction@@W4WebAction@QWebPage@@@Z @ 340 NONAME ; class QAction * QWebView::pageAction(enum QWebPage::WebAction) const + ?paint@QGraphicsWebView@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 341 NONAME ; void QGraphicsWebView::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *) + ?paintEvent@QWebView@@MAEXPAVQPaintEvent@@@Z @ 342 NONAME ; void QWebView::paintEvent(class QPaintEvent *) + ?palette@QWebPage@@QBE?AVQPalette@@XZ @ 343 NONAME ; class QPalette QWebPage::palette(void) const + ?parent@QWebElement@@QBE?AV1@XZ @ 344 NONAME ; class QWebElement QWebElement::parent(void) const + ?parentFrame@QWebFrame@@QBEPAV1@XZ @ 345 NONAME ; class QWebFrame * QWebFrame::parentFrame(void) const + ?path@QWebPluginInfo@@QBE?AVQString@@XZ @ 346 NONAME ; class QString QWebPluginInfo::path(void) const + ?pixmap@QWebHitTestResult@@QBE?AVQPixmap@@XZ @ 347 NONAME ; class QPixmap QWebHitTestResult::pixmap(void) const + ?pluginFactory@QWebPage@@QBEPAVQWebPluginFactory@@XZ @ 348 NONAME ; class QWebPluginFactory * QWebPage::pluginFactory(void) const + ?pluginForMimeType@QWebPluginDatabase@@QAE?AVQWebPluginInfo@@ABVQString@@@Z @ 349 NONAME ; class QWebPluginInfo QWebPluginDatabase::pluginForMimeType(class QString const &) + ?plugins@QWebPluginDatabase@@QBE?AV?$QList@VQWebPluginInfo@@@@XZ @ 350 NONAME ; class QList<class QWebPluginInfo> QWebPluginDatabase::plugins(void) const + ?port@QWebSecurityOrigin@@QBEHXZ @ 351 NONAME ; int QWebSecurityOrigin::port(void) const + ?pos@QWebFrame@@QBE?AVQPoint@@XZ @ 352 NONAME ; class QPoint QWebFrame::pos(void) const + ?pos@QWebHitTestResult@@QBE?AVQPoint@@XZ @ 353 NONAME ; class QPoint QWebHitTestResult::pos(void) const + ?preferredContentsSize@QWebPage@@QBE?AVQSize@@XZ @ 354 NONAME ; class QSize QWebPage::preferredContentsSize(void) const + ?prefix@QWebElement@@QBE?AVQString@@XZ @ 355 NONAME ; class QString QWebElement::prefix(void) const + ?prependInside@QWebElement@@QAEXABV1@@Z @ 356 NONAME ; void QWebElement::prependInside(class QWebElement const &) + ?prependInside@QWebElement@@QAEXABVQString@@@Z @ 357 NONAME ; void QWebElement::prependInside(class QString const &) + ?prependOutside@QWebElement@@QAEXABV1@@Z @ 358 NONAME ; void QWebElement::prependOutside(class QWebElement const &) + ?prependOutside@QWebElement@@QAEXABVQString@@@Z @ 359 NONAME ; void QWebElement::prependOutside(class QString const &) + ?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const + ?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const + ?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *) + ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const + ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const + ?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void) + ?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void) + ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void) + ?qWebKitVersion@@YA?AVQString@@XZ @ 368 NONAME ; class QString qWebKitVersion(void) + ?qt_drt_clearFrameName@@YAXPAVQWebFrame@@@Z @ 369 NONAME ; void qt_drt_clearFrameName(class QWebFrame *) + ?qt_drt_counterValueForElementById@@YA?AVQString@@PAVQWebFrame@@ABV1@@Z @ 370 NONAME ; class QString qt_drt_counterValueForElementById(class QWebFrame *, class QString const &) + ?qt_drt_garbageCollector_collect@@YAXXZ @ 371 NONAME ; void qt_drt_garbageCollector_collect(void) + ?qt_drt_garbageCollector_collectOnAlternateThread@@YAX_N@Z @ 372 NONAME ; void qt_drt_garbageCollector_collectOnAlternateThread(bool) + ?qt_drt_javaScriptObjectsCount@@YAHXZ @ 373 NONAME ; int qt_drt_javaScriptObjectsCount(void) + ?qt_drt_numberOfActiveAnimations@@YAHPAVQWebFrame@@@Z @ 374 NONAME ; int qt_drt_numberOfActiveAnimations(class QWebFrame *) + ?qt_drt_overwritePluginDirectories@@YAXXZ @ 375 NONAME ; void qt_drt_overwritePluginDirectories(void) + ?qt_drt_pauseAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 376 NONAME ; bool qt_drt_pauseAnimation(class QWebFrame *, class QString const &, double, class QString const &) + ?qt_drt_pauseTransitionOfProperty@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 377 NONAME ; bool qt_drt_pauseTransitionOfProperty(class QWebFrame *, class QString const &, double, class QString const &) + ?qt_drt_resetOriginAccessWhiteLists@@YAXXZ @ 378 NONAME ; void qt_drt_resetOriginAccessWhiteLists(void) + ?qt_drt_run@@YAX_N@Z @ 379 NONAME ; void qt_drt_run(bool) + ?qt_drt_setJavaScriptProfilingEnabled@@YAXPAVQWebFrame@@_N@Z @ 380 NONAME ; void qt_drt_setJavaScriptProfilingEnabled(class QWebFrame *, bool) + ?qt_drt_whiteListAccessFromOrigin@@YAXABVQString@@00_N@Z @ 381 NONAME ; void qt_drt_whiteListAccessFromOrigin(class QString const &, class QString const &, class QString const &, bool) + ?qt_dump_editing_callbacks@@YAX_N@Z @ 382 NONAME ; void qt_dump_editing_callbacks(bool) + ?qt_dump_frame_loader@@YAX_N@Z @ 383 NONAME ; void qt_dump_frame_loader(bool) + ?qt_dump_resource_load_callbacks@@YAX_N@Z @ 384 NONAME ; void qt_dump_resource_load_callbacks(bool) + ?qt_dump_set_accepts_editing@@YAX_N@Z @ 385 NONAME ; void qt_dump_set_accepts_editing(bool) + ?qt_metacall@QGraphicsWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 386 NONAME ; int QGraphicsWebView::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebFrame@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 387 NONAME ; int QWebFrame::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebHistoryInterface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 388 NONAME ; int QWebHistoryInterface::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebInspector@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 389 NONAME ; int QWebInspector::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebPage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 390 NONAME ; int QWebPage::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebPluginDatabase@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 391 NONAME ; int QWebPluginDatabase::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebPluginFactory@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 392 NONAME ; int QWebPluginFactory::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QWebView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 393 NONAME ; int QWebView::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacast@QGraphicsWebView@@UAEPAXPBD@Z @ 394 NONAME ; void * QGraphicsWebView::qt_metacast(char const *) + ?qt_metacast@QWebFrame@@UAEPAXPBD@Z @ 395 NONAME ; void * QWebFrame::qt_metacast(char const *) + ?qt_metacast@QWebHistoryInterface@@UAEPAXPBD@Z @ 396 NONAME ; void * QWebHistoryInterface::qt_metacast(char const *) + ?qt_metacast@QWebInspector@@UAEPAXPBD@Z @ 397 NONAME ; void * QWebInspector::qt_metacast(char const *) + ?qt_metacast@QWebPage@@UAEPAXPBD@Z @ 398 NONAME ; void * QWebPage::qt_metacast(char const *) + ?qt_metacast@QWebPluginDatabase@@UAEPAXPBD@Z @ 399 NONAME ; void * QWebPluginDatabase::qt_metacast(char const *) + ?qt_metacast@QWebPluginFactory@@UAEPAXPBD@Z @ 400 NONAME ; void * QWebPluginFactory::qt_metacast(char const *) + ?qt_metacast@QWebView@@UAEPAXPBD@Z @ 401 NONAME ; void * QWebView::qt_metacast(char const *) + ?qt_webpage_groupName@@YA?AVQString@@PAVQWebPage@@@Z @ 402 NONAME ; class QString qt_webpage_groupName(class QWebPage *) + ?qt_webpage_setGroupName@@YAXPAVQWebPage@@ABVQString@@@Z @ 403 NONAME ; void qt_webpage_setGroupName(class QWebPage *, class QString const &) + ?refresh@QWebPluginDatabase@@QAEXXZ @ 404 NONAME ; void QWebPluginDatabase::refresh(void) + ?refreshPlugins@QWebPluginFactory@@UAEXXZ @ 405 NONAME ; void QWebPluginFactory::refreshPlugins(void) + ?reload@QGraphicsWebView@@QAEXXZ @ 406 NONAME ; void QGraphicsWebView::reload(void) + ?reload@QWebView@@QAEXXZ @ 407 NONAME ; void QWebView::reload(void) + ?removeAllChildren@QWebElement@@QAEXXZ @ 408 NONAME ; void QWebElement::removeAllChildren(void) + ?removeAllDatabases@QWebDatabase@@SAXXZ @ 409 NONAME ; void QWebDatabase::removeAllDatabases(void) + ?removeAttribute@QWebElement@@QAEXABVQString@@@Z @ 410 NONAME ; void QWebElement::removeAttribute(class QString const &) + ?removeAttributeNS@QWebElement@@QAEXABVQString@@0@Z @ 411 NONAME ; void QWebElement::removeAttributeNS(class QString const &, class QString const &) + ?removeClass@QWebElement@@QAEXABVQString@@@Z @ 412 NONAME ; void QWebElement::removeClass(class QString const &) + ?removeDatabase@QWebDatabase@@SAXABV1@@Z @ 413 NONAME ; void QWebDatabase::removeDatabase(class QWebDatabase const &) + ?removeFromDocument@QWebElement@@QAEXXZ @ 414 NONAME ; void QWebElement::removeFromDocument(void) + ?removeLocalScheme@QWebSecurityOrigin@@SAXABVQString@@@Z @ 415 NONAME ; void QWebSecurityOrigin::removeLocalScheme(class QString const &) + ?render@QWebElement@@QAEXPAVQPainter@@@Z @ 416 NONAME ; void QWebElement::render(class QPainter *) + ?render@QWebFrame@@QAEXPAVQPainter@@@Z @ 417 NONAME ; void QWebFrame::render(class QPainter *) + ?render@QWebFrame@@QAEXPAVQPainter@@ABVQRegion@@@Z @ 418 NONAME ; void QWebFrame::render(class QPainter *, class QRegion const &) + ?render@QWebFrame@@QAEXPAVQPainter@@W4RenderLayer@1@ABVQRegion@@@Z @ 419 NONAME ; void QWebFrame::render(class QPainter *, enum QWebFrame::RenderLayer, class QRegion const &) + ?renderHints@QWebView@@QBE?AV?$QFlags@W4RenderHint@QPainter@@@@XZ @ 420 NONAME ; class QFlags<enum QPainter::RenderHint> QWebView::renderHints(void) const + ?renderTreeDump@QWebFrame@@QBE?AVQString@@XZ @ 421 NONAME ; class QString QWebFrame::renderTreeDump(void) const + ?repaintRequested@QWebPage@@IAEXABVQRect@@@Z @ 422 NONAME ; void QWebPage::repaintRequested(class QRect const &) + ?replace@QWebElement@@QAEXABV1@@Z @ 423 NONAME ; void QWebElement::replace(class QWebElement const &) + ?replace@QWebElement@@QAEXABVQString@@@Z @ 424 NONAME ; void QWebElement::replace(class QString const &) + ?requestedUrl@QWebFrame@@QBE?AVQUrl@@XZ @ 425 NONAME ; class QUrl QWebFrame::requestedUrl(void) const + ?resetAttribute@QWebSettings@@QAEXW4WebAttribute@1@@Z @ 426 NONAME ; void QWebSettings::resetAttribute(enum QWebSettings::WebAttribute) + ?resetFontFamily@QWebSettings@@QAEXW4FontFamily@1@@Z @ 427 NONAME ; void QWebSettings::resetFontFamily(enum QWebSettings::FontFamily) + ?resetFontSize@QWebSettings@@QAEXW4FontSize@1@@Z @ 428 NONAME ; void QWebSettings::resetFontSize(enum QWebSettings::FontSize) + ?resizeEvent@QWebInspector@@MAEXPAVQResizeEvent@@@Z @ 429 NONAME ; void QWebInspector::resizeEvent(class QResizeEvent *) + ?resizeEvent@QWebView@@MAEXPAVQResizeEvent@@@Z @ 430 NONAME ; void QWebView::resizeEvent(class QResizeEvent *) + ?restoreFrameStateRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 431 NONAME ; void QWebPage::restoreFrameStateRequested(class QWebFrame *) + ?saveFrameStateRequested@QWebPage@@IAEXPAVQWebFrame@@PAVQWebHistoryItem@@@Z @ 432 NONAME ; void QWebPage::saveFrameStateRequested(class QWebFrame *, class QWebHistoryItem *) + ?sceneEvent@QGraphicsWebView@@MAE_NPAVQEvent@@@Z @ 433 NONAME ; bool QGraphicsWebView::sceneEvent(class QEvent *) + ?scheme@QWebSecurityOrigin@@QBE?AVQString@@XZ @ 434 NONAME ; class QString QWebSecurityOrigin::scheme(void) const + ?scroll@QWebFrame@@QAEXHH@Z @ 435 NONAME ; void QWebFrame::scroll(int, int) + ?scrollBarGeometry@QWebFrame@@QBE?AVQRect@@W4Orientation@Qt@@@Z @ 436 NONAME ; class QRect QWebFrame::scrollBarGeometry(enum Qt::Orientation) const + ?scrollBarMaximum@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 437 NONAME ; int QWebFrame::scrollBarMaximum(enum Qt::Orientation) const + ?scrollBarMinimum@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 438 NONAME ; int QWebFrame::scrollBarMinimum(enum Qt::Orientation) const + ?scrollBarPolicy@QWebFrame@@QBE?AW4ScrollBarPolicy@Qt@@W4Orientation@3@@Z @ 439 NONAME ; enum Qt::ScrollBarPolicy QWebFrame::scrollBarPolicy(enum Qt::Orientation) const + ?scrollBarValue@QWebFrame@@QBEHW4Orientation@Qt@@@Z @ 440 NONAME ; int QWebFrame::scrollBarValue(enum Qt::Orientation) const + ?scrollPosition@QWebFrame@@QBE?AVQPoint@@XZ @ 441 NONAME ; class QPoint QWebFrame::scrollPosition(void) const + ?scrollRequested@QWebPage@@IAEXHHABVQRect@@@Z @ 442 NONAME ; void QWebPage::scrollRequested(int, int, class QRect const &) + ?searchPaths@QWebPluginDatabase@@QBE?AVQStringList@@XZ @ 443 NONAME ; class QStringList QWebPluginDatabase::searchPaths(void) const + ?securityOrigin@QWebFrame@@QBE?AVQWebSecurityOrigin@@XZ @ 444 NONAME ; class QWebSecurityOrigin QWebFrame::securityOrigin(void) const + ?selectedText@QWebPage@@QBE?AVQString@@XZ @ 445 NONAME ; class QString QWebPage::selectedText(void) const + ?selectedText@QWebView@@QBE?AVQString@@XZ @ 446 NONAME ; class QString QWebView::selectedText(void) const + ?selectionChanged@QWebPage@@IAEXXZ @ 447 NONAME ; void QWebPage::selectionChanged(void) + ?selectionChanged@QWebView@@IAEXXZ @ 448 NONAME ; void QWebView::selectionChanged(void) + ?setAttribute@QWebElement@@QAEXABVQString@@0@Z @ 449 NONAME ; void QWebElement::setAttribute(class QString const &, class QString const &) + ?setAttribute@QWebSettings@@QAEXW4WebAttribute@1@_N@Z @ 450 NONAME ; void QWebSettings::setAttribute(enum QWebSettings::WebAttribute, bool) + ?setAttributeNS@QWebElement@@QAEXABVQString@@00@Z @ 451 NONAME ; void QWebElement::setAttributeNS(class QString const &, class QString const &, class QString const &) + ?setContent@QGraphicsWebView@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 452 NONAME ; void QGraphicsWebView::setContent(class QByteArray const &, class QString const &, class QUrl const &) + ?setContent@QWebFrame@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 453 NONAME ; void QWebFrame::setContent(class QByteArray const &, class QString const &, class QUrl const &) + ?setContent@QWebView@@QAEXABVQByteArray@@ABVQString@@ABVQUrl@@@Z @ 454 NONAME ; void QWebView::setContent(class QByteArray const &, class QString const &, class QUrl const &) + ?setContentEditable@QWebPage@@QAEX_N@Z @ 455 NONAME ; void QWebPage::setContentEditable(bool) + ?setDatabaseQuota@QWebSecurityOrigin@@QAEX_J@Z @ 456 NONAME ; void QWebSecurityOrigin::setDatabaseQuota(long long) + ?setDefaultInterface@QWebHistoryInterface@@SAXPAV1@@Z @ 457 NONAME ; void QWebHistoryInterface::setDefaultInterface(class QWebHistoryInterface *) + ?setDefaultTextEncoding@QWebSettings@@QAEXABVQString@@@Z @ 458 NONAME ; void QWebSettings::setDefaultTextEncoding(class QString const &) + ?setEnabled@QWebPluginInfo@@QAEX_N@Z @ 459 NONAME ; void QWebPluginInfo::setEnabled(bool) + ?setFocus@QWebElement@@QAEXXZ @ 460 NONAME ; void QWebElement::setFocus(void) + ?setFocus@QWebFrame@@QAEXXZ @ 461 NONAME ; void QWebFrame::setFocus(void) + ?setFontFamily@QWebSettings@@QAEXW4FontFamily@1@ABVQString@@@Z @ 462 NONAME ; void QWebSettings::setFontFamily(enum QWebSettings::FontFamily, class QString const &) + ?setFontSize@QWebSettings@@QAEXW4FontSize@1@H@Z @ 463 NONAME ; void QWebSettings::setFontSize(enum QWebSettings::FontSize, int) + ?setForwardUnsupportedContent@QWebPage@@QAEX_N@Z @ 464 NONAME ; void QWebPage::setForwardUnsupportedContent(bool) + ?setGeometry@QGraphicsWebView@@UAEXABVQRectF@@@Z @ 465 NONAME ; void QGraphicsWebView::setGeometry(class QRectF const &) + ?setHtml@QGraphicsWebView@@QAEXABVQString@@ABVQUrl@@@Z @ 466 NONAME ; void QGraphicsWebView::setHtml(class QString const &, class QUrl const &) + ?setHtml@QWebFrame@@QAEXABVQString@@ABVQUrl@@@Z @ 467 NONAME ; void QWebFrame::setHtml(class QString const &, class QUrl const &) + ?setHtml@QWebView@@QAEXABVQString@@ABVQUrl@@@Z @ 468 NONAME ; void QWebView::setHtml(class QString const &, class QUrl const &) + ?setIconDatabasePath@QWebSettings@@SAXABVQString@@@Z @ 469 NONAME ; void QWebSettings::setIconDatabasePath(class QString const &) + ?setInnerXml@QWebElement@@QAEXABVQString@@@Z @ 470 NONAME ; void QWebElement::setInnerXml(class QString const &) + ?setLinkDelegationPolicy@QWebPage@@QAEXW4LinkDelegationPolicy@1@@Z @ 471 NONAME ; void QWebPage::setLinkDelegationPolicy(enum QWebPage::LinkDelegationPolicy) + ?setLocalStoragePath@QWebSettings@@QAEXABVQString@@@Z @ 472 NONAME ; void QWebSettings::setLocalStoragePath(class QString const &) + ?setMaximumItemCount@QWebHistory@@QAEXH@Z @ 473 NONAME ; void QWebHistory::setMaximumItemCount(int) + ?setMaximumPagesInCache@QWebSettings@@SAXH@Z @ 474 NONAME ; void QWebSettings::setMaximumPagesInCache(int) + ?setNetworkAccessManager@QWebPage@@QAEXPAVQNetworkAccessManager@@@Z @ 475 NONAME ; void QWebPage::setNetworkAccessManager(class QNetworkAccessManager *) + ?setObjectCacheCapacities@QWebSettings@@SAXHHH@Z @ 476 NONAME ; void QWebSettings::setObjectCacheCapacities(int, int, int) + ?setOfflineStorageDefaultQuota@QWebSettings@@SAX_J@Z @ 477 NONAME ; void QWebSettings::setOfflineStorageDefaultQuota(long long) + ?setOfflineStoragePath@QWebSettings@@SAXABVQString@@@Z @ 478 NONAME ; void QWebSettings::setOfflineStoragePath(class QString const &) + ?setOfflineWebApplicationCachePath@QWebSettings@@SAXABVQString@@@Z @ 479 NONAME ; void QWebSettings::setOfflineWebApplicationCachePath(class QString const &) + ?setOfflineWebApplicationCacheQuota@QWebSettings@@SAX_J@Z @ 480 NONAME ; void QWebSettings::setOfflineWebApplicationCacheQuota(long long) + ?setOuterXml@QWebElement@@QAEXABVQString@@@Z @ 481 NONAME ; void QWebElement::setOuterXml(class QString const &) + ?setPage@QGraphicsWebView@@QAEXPAVQWebPage@@@Z @ 482 NONAME ; void QGraphicsWebView::setPage(class QWebPage *) + ?setPage@QWebInspector@@QAEXPAVQWebPage@@@Z @ 483 NONAME ; void QWebInspector::setPage(class QWebPage *) + ?setPage@QWebView@@QAEXPAVQWebPage@@@Z @ 484 NONAME ; void QWebView::setPage(class QWebPage *) + ?setPalette@QWebPage@@QAEXABVQPalette@@@Z @ 485 NONAME ; void QWebPage::setPalette(class QPalette const &) + ?setPlainText@QWebElement@@QAEXABVQString@@@Z @ 486 NONAME ; void QWebElement::setPlainText(class QString const &) + ?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *) + ?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const + ?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &) + ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float) + ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float) + ?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool) + ?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>) + ?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy) + ?setScrollBarValue@QWebFrame@@QAEXW4Orientation@Qt@@H@Z @ 495 NONAME ; void QWebFrame::setScrollBarValue(enum Qt::Orientation, int) + ?setScrollPosition@QWebFrame@@QAEXABVQPoint@@@Z @ 496 NONAME ; void QWebFrame::setScrollPosition(class QPoint const &) + ?setSearchPaths@QWebPluginDatabase@@QAEXABVQStringList@@@Z @ 497 NONAME ; void QWebPluginDatabase::setSearchPaths(class QStringList const &) + ?setStyleProperty@QWebElement@@QAEXABVQString@@0@Z @ 498 NONAME ; void QWebElement::setStyleProperty(class QString const &, class QString const &) + ?setTextSizeMultiplier@QWebFrame@@QAEXM@Z @ 499 NONAME ; void QWebFrame::setTextSizeMultiplier(float) + ?setTextSizeMultiplier@QWebView@@QAEXM@Z @ 500 NONAME ; void QWebView::setTextSizeMultiplier(float) + ?setUrl@QGraphicsWebView@@QAEXABVQUrl@@@Z @ 501 NONAME ; void QGraphicsWebView::setUrl(class QUrl const &) + ?setUrl@QWebFrame@@QAEXABVQUrl@@@Z @ 502 NONAME ; void QWebFrame::setUrl(class QUrl const &) + ?setUrl@QWebView@@QAEXABVQUrl@@@Z @ 503 NONAME ; void QWebView::setUrl(class QUrl const &) + ?setUserData@QWebHistoryItem@@QAEXABVQVariant@@@Z @ 504 NONAME ; void QWebHistoryItem::setUserData(class QVariant const &) + ?setUserStyleSheetUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 505 NONAME ; void QWebSettings::setUserStyleSheetUrl(class QUrl const &) + ?setView@QWebPage@@QAEXPAVQWidget@@@Z @ 506 NONAME ; void QWebPage::setView(class QWidget *) + ?setViewportSize@QWebPage@@QBEXABVQSize@@@Z @ 507 NONAME ; void QWebPage::setViewportSize(class QSize const &) const + ?setWebGraphic@QWebSettings@@SAXW4WebGraphic@1@ABVQPixmap@@@Z @ 508 NONAME ; void QWebSettings::setWebGraphic(enum QWebSettings::WebGraphic, class QPixmap const &) + ?setZoomFactor@QGraphicsWebView@@QAEXM@Z @ 509 NONAME ; void QGraphicsWebView::setZoomFactor(float) + ?setZoomFactor@QWebFrame@@QAEXM@Z @ 510 NONAME ; void QWebFrame::setZoomFactor(float) + ?setZoomFactor@QWebView@@QAEXM@Z @ 511 NONAME ; void QWebView::setZoomFactor(float) + ?settings@QGraphicsWebView@@QBEPAVQWebSettings@@XZ @ 512 NONAME ; class QWebSettings * QGraphicsWebView::settings(void) const + ?settings@QWebPage@@QBEPAVQWebSettings@@XZ @ 513 NONAME ; class QWebSettings * QWebPage::settings(void) const + ?settings@QWebView@@QBEPAVQWebSettings@@XZ @ 514 NONAME ; class QWebSettings * QWebView::settings(void) const + ?shouldInterruptJavaScript@QWebPage@@QAE_NXZ @ 515 NONAME ; bool QWebPage::shouldInterruptJavaScript(void) + ?showEvent@QWebInspector@@MAEXPAVQShowEvent@@@Z @ 516 NONAME ; void QWebInspector::showEvent(class QShowEvent *) + ?size@QWebDatabase@@QBE_JXZ @ 517 NONAME ; long long QWebDatabase::size(void) const + ?sizeHint@QGraphicsWebView@@UBE?AVQSizeF@@W4SizeHint@Qt@@ABV2@@Z @ 518 NONAME ; class QSizeF QGraphicsWebView::sizeHint(enum Qt::SizeHint, class QSizeF const &) const + ?sizeHint@QWebInspector@@UBE?AVQSize@@XZ @ 519 NONAME ; class QSize QWebInspector::sizeHint(void) const + ?sizeHint@QWebView@@UBE?AVQSize@@XZ @ 520 NONAME ; class QSize QWebView::sizeHint(void) const + ?statusBarMessage@QGraphicsWebView@@IAEXABVQString@@@Z @ 521 NONAME ; void QGraphicsWebView::statusBarMessage(class QString const &) + ?statusBarMessage@QWebPage@@IAEXABVQString@@@Z @ 522 NONAME ; void QWebPage::statusBarMessage(class QString const &) + ?statusBarMessage@QWebView@@IAEXABVQString@@@Z @ 523 NONAME ; void QWebView::statusBarMessage(class QString const &) + ?statusBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 524 NONAME ; void QWebPage::statusBarVisibilityChangeRequested(bool) + ?stop@QGraphicsWebView@@QAEXXZ @ 525 NONAME ; void QGraphicsWebView::stop(void) + ?stop@QWebView@@QAEXXZ @ 526 NONAME ; void QWebView::stop(void) + ?styleProperty@QWebElement@@QBE?AVQString@@ABV2@W4StyleResolveStrategy@1@@Z @ 527 NONAME ; class QString QWebElement::styleProperty(class QString const &, enum QWebElement::StyleResolveStrategy) const + ?supportsExtension@QWebPage@@UBE_NW4Extension@1@@Z @ 528 NONAME ; bool QWebPage::supportsExtension(enum QWebPage::Extension) const + ?supportsExtension@QWebPluginFactory@@UBE_NW4Extension@1@@Z @ 529 NONAME ; bool QWebPluginFactory::supportsExtension(enum QWebPluginFactory::Extension) const + ?supportsMimeType@QWebPluginInfo@@QBE_NABVQString@@@Z @ 530 NONAME ; bool QWebPluginInfo::supportsMimeType(class QString const &) const + ?swallowContextMenuEvent@QWebPage@@QAE_NPAVQContextMenuEvent@@@Z @ 531 NONAME ; bool QWebPage::swallowContextMenuEvent(class QContextMenuEvent *) + ?tagName@QWebElement@@QBE?AVQString@@XZ @ 532 NONAME ; class QString QWebElement::tagName(void) const + ?takeFromDocument@QWebElement@@QAEAAV1@XZ @ 533 NONAME ; class QWebElement & QWebElement::takeFromDocument(void) + ?testAttribute@QWebSettings@@QBE_NW4WebAttribute@1@@Z @ 534 NONAME ; bool QWebSettings::testAttribute(enum QWebSettings::WebAttribute) const + ?textSizeMultiplier@QWebFrame@@QBEMXZ @ 535 NONAME ; float QWebFrame::textSizeMultiplier(void) const + ?textSizeMultiplier@QWebView@@QBEMXZ @ 536 NONAME ; float QWebView::textSizeMultiplier(void) const + ?title@QGraphicsWebView@@QBE?AVQString@@XZ @ 537 NONAME ; class QString QGraphicsWebView::title(void) const + ?title@QWebFrame@@QBE?AVQString@@XZ @ 538 NONAME ; class QString QWebFrame::title(void) const + ?title@QWebHistoryItem@@QBE?AVQString@@XZ @ 539 NONAME ; class QString QWebHistoryItem::title(void) const + ?title@QWebHitTestResult@@QBE?AVQString@@XZ @ 540 NONAME ; class QString QWebHitTestResult::title(void) const + ?title@QWebView@@QBE?AVQString@@XZ @ 541 NONAME ; class QString QWebView::title(void) const + ?titleChanged@QGraphicsWebView@@IAEXABVQString@@@Z @ 542 NONAME ; void QGraphicsWebView::titleChanged(class QString const &) + ?titleChanged@QWebFrame@@IAEXABVQString@@@Z @ 543 NONAME ; void QWebFrame::titleChanged(class QString const &) + ?titleChanged@QWebView@@IAEXABVQString@@@Z @ 544 NONAME ; void QWebView::titleChanged(class QString const &) + ?toHtml@QWebFrame@@QBE?AVQString@@XZ @ 545 NONAME ; class QString QWebFrame::toHtml(void) const + ?toInnerXml@QWebElement@@QBE?AVQString@@XZ @ 546 NONAME ; class QString QWebElement::toInnerXml(void) const + ?toList@QWebElementCollection@@QBE?AV?$QList@VQWebElement@@@@XZ @ 547 NONAME ; class QList<class QWebElement> QWebElementCollection::toList(void) const + ?toOuterXml@QWebElement@@QBE?AVQString@@XZ @ 548 NONAME ; class QString QWebElement::toOuterXml(void) const + ?toPlainText@QWebElement@@QBE?AVQString@@XZ @ 549 NONAME ; class QString QWebElement::toPlainText(void) const + ?toPlainText@QWebFrame@@QBE?AVQString@@XZ @ 550 NONAME ; class QString QWebFrame::toPlainText(void) const + ?toggleClass@QWebElement@@QAEXABVQString@@@Z @ 551 NONAME ; void QWebElement::toggleClass(class QString const &) + ?toolBarVisibilityChangeRequested@QWebPage@@IAEX_N@Z @ 552 NONAME ; void QWebPage::toolBarVisibilityChangeRequested(bool) + ?totalBytes@QWebPage@@QBE_KXZ @ 553 NONAME ; unsigned long long QWebPage::totalBytes(void) const + ?tr@QGraphicsWebView@@SA?AVQString@@PBD0@Z @ 554 NONAME ; class QString QGraphicsWebView::tr(char const *, char const *) + ?tr@QGraphicsWebView@@SA?AVQString@@PBD0H@Z @ 555 NONAME ; class QString QGraphicsWebView::tr(char const *, char const *, int) + ?tr@QWebFrame@@SA?AVQString@@PBD0@Z @ 556 NONAME ; class QString QWebFrame::tr(char const *, char const *) + ?tr@QWebFrame@@SA?AVQString@@PBD0H@Z @ 557 NONAME ; class QString QWebFrame::tr(char const *, char const *, int) + ?tr@QWebHistoryInterface@@SA?AVQString@@PBD0@Z @ 558 NONAME ; class QString QWebHistoryInterface::tr(char const *, char const *) + ?tr@QWebHistoryInterface@@SA?AVQString@@PBD0H@Z @ 559 NONAME ; class QString QWebHistoryInterface::tr(char const *, char const *, int) + ?tr@QWebInspector@@SA?AVQString@@PBD0@Z @ 560 NONAME ; class QString QWebInspector::tr(char const *, char const *) + ?tr@QWebInspector@@SA?AVQString@@PBD0H@Z @ 561 NONAME ; class QString QWebInspector::tr(char const *, char const *, int) + ?tr@QWebPage@@SA?AVQString@@PBD0@Z @ 562 NONAME ; class QString QWebPage::tr(char const *, char const *) + ?tr@QWebPage@@SA?AVQString@@PBD0H@Z @ 563 NONAME ; class QString QWebPage::tr(char const *, char const *, int) + ?tr@QWebPluginDatabase@@SA?AVQString@@PBD0@Z @ 564 NONAME ; class QString QWebPluginDatabase::tr(char const *, char const *) + ?tr@QWebPluginDatabase@@SA?AVQString@@PBD0H@Z @ 565 NONAME ; class QString QWebPluginDatabase::tr(char const *, char const *, int) + ?tr@QWebPluginFactory@@SA?AVQString@@PBD0@Z @ 566 NONAME ; class QString QWebPluginFactory::tr(char const *, char const *) + ?tr@QWebPluginFactory@@SA?AVQString@@PBD0H@Z @ 567 NONAME ; class QString QWebPluginFactory::tr(char const *, char const *, int) + ?tr@QWebView@@SA?AVQString@@PBD0@Z @ 568 NONAME ; class QString QWebView::tr(char const *, char const *) + ?tr@QWebView@@SA?AVQString@@PBD0H@Z @ 569 NONAME ; class QString QWebView::tr(char const *, char const *, int) + ?trUtf8@QGraphicsWebView@@SA?AVQString@@PBD0@Z @ 570 NONAME ; class QString QGraphicsWebView::trUtf8(char const *, char const *) + ?trUtf8@QGraphicsWebView@@SA?AVQString@@PBD0H@Z @ 571 NONAME ; class QString QGraphicsWebView::trUtf8(char const *, char const *, int) + ?trUtf8@QWebFrame@@SA?AVQString@@PBD0@Z @ 572 NONAME ; class QString QWebFrame::trUtf8(char const *, char const *) + ?trUtf8@QWebFrame@@SA?AVQString@@PBD0H@Z @ 573 NONAME ; class QString QWebFrame::trUtf8(char const *, char const *, int) + ?trUtf8@QWebHistoryInterface@@SA?AVQString@@PBD0@Z @ 574 NONAME ; class QString QWebHistoryInterface::trUtf8(char const *, char const *) + ?trUtf8@QWebHistoryInterface@@SA?AVQString@@PBD0H@Z @ 575 NONAME ; class QString QWebHistoryInterface::trUtf8(char const *, char const *, int) + ?trUtf8@QWebInspector@@SA?AVQString@@PBD0@Z @ 576 NONAME ; class QString QWebInspector::trUtf8(char const *, char const *) + ?trUtf8@QWebInspector@@SA?AVQString@@PBD0H@Z @ 577 NONAME ; class QString QWebInspector::trUtf8(char const *, char const *, int) + ?trUtf8@QWebPage@@SA?AVQString@@PBD0@Z @ 578 NONAME ; class QString QWebPage::trUtf8(char const *, char const *) + ?trUtf8@QWebPage@@SA?AVQString@@PBD0H@Z @ 579 NONAME ; class QString QWebPage::trUtf8(char const *, char const *, int) + ?trUtf8@QWebPluginDatabase@@SA?AVQString@@PBD0@Z @ 580 NONAME ; class QString QWebPluginDatabase::trUtf8(char const *, char const *) + ?trUtf8@QWebPluginDatabase@@SA?AVQString@@PBD0H@Z @ 581 NONAME ; class QString QWebPluginDatabase::trUtf8(char const *, char const *, int) + ?trUtf8@QWebPluginFactory@@SA?AVQString@@PBD0@Z @ 582 NONAME ; class QString QWebPluginFactory::trUtf8(char const *, char const *) + ?trUtf8@QWebPluginFactory@@SA?AVQString@@PBD0H@Z @ 583 NONAME ; class QString QWebPluginFactory::trUtf8(char const *, char const *, int) + ?trUtf8@QWebView@@SA?AVQString@@PBD0@Z @ 584 NONAME ; class QString QWebView::trUtf8(char const *, char const *) + ?trUtf8@QWebView@@SA?AVQString@@PBD0H@Z @ 585 NONAME ; class QString QWebView::trUtf8(char const *, char const *, int) + ?triggerAction@QWebPage@@UAEXW4WebAction@1@_N@Z @ 586 NONAME ; void QWebPage::triggerAction(enum QWebPage::WebAction, bool) + ?triggerPageAction@QGraphicsWebView@@QAEXW4WebAction@QWebPage@@_N@Z @ 587 NONAME ; void QGraphicsWebView::triggerPageAction(enum QWebPage::WebAction, bool) + ?triggerPageAction@QWebView@@QAEXW4WebAction@QWebPage@@_N@Z @ 588 NONAME ; void QWebView::triggerPageAction(enum QWebPage::WebAction, bool) + ?undoStack@QWebPage@@QBEPAVQUndoStack@@XZ @ 589 NONAME ; class QUndoStack * QWebPage::undoStack(void) const + ?unsupportedContent@QWebPage@@IAEXPAVQNetworkReply@@@Z @ 590 NONAME ; void QWebPage::unsupportedContent(class QNetworkReply *) + ?updateGeometry@QGraphicsWebView@@UAEXXZ @ 591 NONAME ; void QGraphicsWebView::updateGeometry(void) + ?updatePositionDependentActions@QWebPage@@QAEXABVQPoint@@@Z @ 592 NONAME ; void QWebPage::updatePositionDependentActions(class QPoint const &) + ?url@QGraphicsWebView@@QBE?AVQUrl@@XZ @ 593 NONAME ; class QUrl QGraphicsWebView::url(void) const + ?url@QWebFrame@@QBE?AVQUrl@@XZ @ 594 NONAME ; class QUrl QWebFrame::url(void) const + ?url@QWebHistoryItem@@QBE?AVQUrl@@XZ @ 595 NONAME ; class QUrl QWebHistoryItem::url(void) const + ?url@QWebView@@QBE?AVQUrl@@XZ @ 596 NONAME ; class QUrl QWebView::url(void) const + ?urlChanged@QGraphicsWebView@@IAEXABVQUrl@@@Z @ 597 NONAME ; void QGraphicsWebView::urlChanged(class QUrl const &) + ?urlChanged@QWebFrame@@IAEXABVQUrl@@@Z @ 598 NONAME ; void QWebFrame::urlChanged(class QUrl const &) + ?urlChanged@QWebView@@IAEXABVQUrl@@@Z @ 599 NONAME ; void QWebView::urlChanged(class QUrl const &) + ?userAgentForUrl@QWebPage@@MBE?AVQString@@ABVQUrl@@@Z @ 600 NONAME ; class QString QWebPage::userAgentForUrl(class QUrl const &) const + ?userData@QWebHistoryItem@@QBE?AVQVariant@@XZ @ 601 NONAME ; class QVariant QWebHistoryItem::userData(void) const + ?userStyleSheetUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 602 NONAME ; class QUrl QWebSettings::userStyleSheetUrl(void) const + ?view@QWebPage@@QBEPAVQWidget@@XZ @ 603 NONAME ; class QWidget * QWebPage::view(void) const + ?viewportSize@QWebPage@@QBE?AVQSize@@XZ @ 604 NONAME ; class QSize QWebPage::viewportSize(void) const + ?webFrame@QWebElement@@QBEPAVQWebFrame@@XZ @ 605 NONAME ; class QWebFrame * QWebElement::webFrame(void) const + ?webGraphic@QWebSettings@@SA?AVQPixmap@@W4WebGraphic@1@@Z @ 606 NONAME ; class QPixmap QWebSettings::webGraphic(enum QWebSettings::WebGraphic) + ?wheelEvent@QGraphicsWebView@@MAEXPAVQGraphicsSceneWheelEvent@@@Z @ 607 NONAME ; void QGraphicsWebView::wheelEvent(class QGraphicsSceneWheelEvent *) + ?wheelEvent@QWebView@@MAEXPAVQWheelEvent@@@Z @ 608 NONAME ; void QWebView::wheelEvent(class QWheelEvent *) + ?windowCloseRequested@QWebPage@@IAEXXZ @ 609 NONAME ; void QWebPage::windowCloseRequested(void) + ?zoomFactor@QGraphicsWebView@@QBEMXZ @ 610 NONAME ; float QGraphicsWebView::zoomFactor(void) const + ?zoomFactor@QWebFrame@@QBEMXZ @ 611 NONAME ; float QWebFrame::zoomFactor(void) const + ?zoomFactor@QWebView@@QBEMXZ @ 612 NONAME ; float QWebView::zoomFactor(void) const + ?staticMetaObject@QWebPluginDatabase@@2UQMetaObject@@B @ 613 NONAME ; struct QMetaObject const QWebPluginDatabase::staticMetaObject + ?staticMetaObject@QWebFrame@@2UQMetaObject@@B @ 614 NONAME ; struct QMetaObject const QWebFrame::staticMetaObject + ?staticMetaObject@QWebHistoryInterface@@2UQMetaObject@@B @ 615 NONAME ; struct QMetaObject const QWebHistoryInterface::staticMetaObject + ?staticMetaObject@QWebInspector@@2UQMetaObject@@B @ 616 NONAME ; struct QMetaObject const QWebInspector::staticMetaObject + ?staticMetaObject@QWebPluginFactory@@2UQMetaObject@@B @ 617 NONAME ; struct QMetaObject const QWebPluginFactory::staticMetaObject + ?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject + ?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject + ?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject + ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const + ?qt_networkAccessAllowed@@YAX_N@Z @ 622 NONAME ; void qt_networkAccessAllowed(bool) + ?qt_resumeActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 623 NONAME ; void qt_resumeActiveDOMObjects(class QWebFrame *) + ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *) + ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int) + diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def new file mode 100644 index 0000000..78523c6 --- /dev/null +++ b/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -0,0 +1,699 @@ +EXPORTS + _Z10qt_drt_runb @ 1 NONAME + _Z14qWebKitVersionv @ 2 NONAME + _Z19qWebKitMajorVersionv @ 3 NONAME + _Z19qWebKitMinorVersionv @ 4 NONAME + _Z20qt_dump_frame_loaderb @ 5 NONAME + _Z20qt_webpage_groupNameP8QWebPage @ 6 NONAME + _Z21qt_drt_clearFrameNameP9QWebFrame @ 7 NONAME + _Z21qt_drt_pauseAnimationP9QWebFrameRK7QStringdS3_ @ 8 NONAME + _Z23qt_webpage_setGroupNameP8QWebPageRK7QString @ 9 NONAME + _Z25qt_dump_editing_callbacksb @ 10 NONAME + _Z27qt_dump_set_accepts_editingb @ 11 NONAME + _Z29qt_drt_javaScriptObjectsCountv @ 12 NONAME + _Z31qt_drt_garbageCollector_collectv @ 13 NONAME + _Z31qt_drt_numberOfActiveAnimationsP9QWebFrame @ 14 NONAME + _Z31qt_dump_resource_load_callbacksb @ 15 NONAME + _Z32qt_drt_pauseTransitionOfPropertyP9QWebFrameRK7QStringdS3_ @ 16 NONAME + _Z33qt_drt_overwritePluginDirectoriesv @ 17 NONAME + _Z36qt_drt_setJavaScriptProfilingEnabledP9QWebFrameb @ 18 NONAME + _Z48qt_drt_garbageCollector_collectOnAlternateThreadb @ 19 NONAME + _ZN11QWebElement11encloseWithERK7QString @ 20 NONAME + _ZN11QWebElement11encloseWithERKS_ @ 21 NONAME + _ZN11QWebElement11removeClassERK7QString @ 22 NONAME + _ZN11QWebElement11setInnerXmlERK7QString @ 23 NONAME + _ZN11QWebElement11setOuterXmlERK7QString @ 24 NONAME + _ZN11QWebElement11toggleClassERK7QString @ 25 NONAME + _ZN11QWebElement12appendInsideERK7QString @ 26 NONAME + _ZN11QWebElement12appendInsideERKS_ @ 27 NONAME + _ZN11QWebElement12setAttributeERK7QStringS2_ @ 28 NONAME + _ZN11QWebElement12setPlainTextERK7QString @ 29 NONAME + _ZN11QWebElement13appendOutsideERK7QString @ 30 NONAME + _ZN11QWebElement13appendOutsideERKS_ @ 31 NONAME + _ZN11QWebElement13prependInsideERK7QString @ 32 NONAME + _ZN11QWebElement13prependInsideERKS_ @ 33 NONAME + _ZN11QWebElement14prependOutsideERK7QString @ 34 NONAME + _ZN11QWebElement14prependOutsideERKS_ @ 35 NONAME + _ZN11QWebElement14removeChildrenEv @ 36 NONAME ABSENT + _ZN11QWebElement14setAttributeNSERK7QStringS2_S2_ @ 37 NONAME + _ZN11QWebElement15removeAttributeERK7QString @ 38 NONAME + _ZN11QWebElement16enclosingElementEPN7WebCore4NodeE @ 39 NONAME + _ZN11QWebElement16setStylePropertyERK7QStringS2_ @ 40 NONAME + _ZN11QWebElement16takeFromDocumentEv @ 41 NONAME + _ZN11QWebElement17removeAttributeNSERK7QStringS2_ @ 42 NONAME + _ZN11QWebElement18evaluateJavaScriptERK7QString @ 43 NONAME + _ZN11QWebElement18removeFromDocumentEv @ 44 NONAME + _ZN11QWebElement19encloseContentsWithERK7QString @ 45 NONAME + _ZN11QWebElement19encloseContentsWithERKS_ @ 46 NONAME + _ZN11QWebElement7replaceERK7QString @ 47 NONAME + _ZN11QWebElement7replaceERKS_ @ 48 NONAME + _ZN11QWebElement8addClassERK7QString @ 49 NONAME + _ZN11QWebElement8setFocusEv @ 50 NONAME + _ZN11QWebElementC1EPN7WebCore4NodeE @ 51 NONAME + _ZN11QWebElementC1EPN7WebCore7ElementE @ 52 NONAME + _ZN11QWebElementC1ERKS_ @ 53 NONAME + _ZN11QWebElementC1Ev @ 54 NONAME + _ZN11QWebElementC2EPN7WebCore4NodeE @ 55 NONAME + _ZN11QWebElementC2EPN7WebCore7ElementE @ 56 NONAME + _ZN11QWebElementC2ERKS_ @ 57 NONAME + _ZN11QWebElementC2Ev @ 58 NONAME + _ZN11QWebElementD1Ev @ 59 NONAME + _ZN11QWebElementD2Ev @ 60 NONAME + _ZN11QWebElementaSERKS_ @ 61 NONAME + _ZN11QWebHistory12restoreStateERK10QByteArray @ 62 NONAME ABSENT + _ZN11QWebHistory19setMaximumItemCountEi @ 63 NONAME + _ZN11QWebHistory4backEv @ 64 NONAME + _ZN11QWebHistory5clearEv @ 65 NONAME + _ZN11QWebHistory7forwardEv @ 66 NONAME + _ZN11QWebHistory8goToItemERK15QWebHistoryItem @ 67 NONAME + _ZN11QWebHistoryC1Ev @ 68 NONAME + _ZN11QWebHistoryC2Ev @ 69 NONAME + _ZN11QWebHistoryD1Ev @ 70 NONAME + _ZN11QWebHistoryD2Ev @ 71 NONAME + _ZN12QWebDatabase14removeDatabaseERKS_ @ 72 NONAME + _ZN12QWebDatabase18removeAllDatabasesEv @ 73 NONAME + _ZN12QWebDatabaseC1EP19QWebDatabasePrivate @ 74 NONAME + _ZN12QWebDatabaseC1ERKS_ @ 75 NONAME + _ZN12QWebDatabaseC2EP19QWebDatabasePrivate @ 76 NONAME + _ZN12QWebDatabaseC2ERKS_ @ 77 NONAME + _ZN12QWebDatabaseD1Ev @ 78 NONAME + _ZN12QWebDatabaseD2Ev @ 79 NONAME + _ZN12QWebDatabaseaSERKS_ @ 80 NONAME + _ZN12QWebSettings10iconForUrlERK4QUrl @ 81 NONAME + _ZN12QWebSettings10webGraphicENS_10WebGraphicE @ 82 NONAME + _ZN12QWebSettings11setFontSizeENS_8FontSizeEi @ 83 NONAME + _ZN12QWebSettings12setAttributeENS_12WebAttributeEb @ 84 NONAME + _ZN12QWebSettings13resetFontSizeENS_8FontSizeE @ 85 NONAME + _ZN12QWebSettings13setFontFamilyENS_10FontFamilyERK7QString @ 86 NONAME + _ZN12QWebSettings13setWebGraphicENS_10WebGraphicERK7QPixmap @ 87 NONAME + _ZN12QWebSettings14globalSettingsEv @ 88 NONAME + _ZN12QWebSettings14pluginDatabaseEv @ 89 NONAME ABSENT + _ZN12QWebSettings14resetAttributeENS_12WebAttributeE @ 90 NONAME + _ZN12QWebSettings15resetFontFamilyENS_10FontFamilyE @ 91 NONAME + _ZN12QWebSettings16iconDatabasePathEv @ 92 NONAME + _ZN12QWebSettings17clearIconDatabaseEv @ 93 NONAME + _ZN12QWebSettings17clearMemoryCachesEv @ 94 NONAME + _ZN12QWebSettings18offlineStoragePathEv @ 95 NONAME + _ZN12QWebSettings19maximumPagesInCacheEv @ 96 NONAME + _ZN12QWebSettings19setIconDatabasePathERK7QString @ 97 NONAME + _ZN12QWebSettings19setLocalStoragePathERK7QString @ 98 NONAME + _ZN12QWebSettings20setUserStyleSheetUrlERK4QUrl @ 99 NONAME + _ZN12QWebSettings21setOfflineStoragePathERK7QString @ 100 NONAME + _ZN12QWebSettings22setDefaultTextEncodingERK7QString @ 101 NONAME + _ZN12QWebSettings22setMaximumPagesInCacheEi @ 102 NONAME + _ZN12QWebSettings23enablePersistentStorageERK7QString @ 103 NONAME + _ZN12QWebSettings24setObjectCacheCapacitiesEiii @ 104 NONAME + _ZN12QWebSettings26offlineStorageDefaultQuotaEv @ 105 NONAME + _ZN12QWebSettings29setOfflineStorageDefaultQuotaEx @ 106 NONAME + _ZN12QWebSettings30offlineWebApplicationCachePathEv @ 107 NONAME + _ZN12QWebSettings31offlineWebApplicationCacheQuotaEv @ 108 NONAME + _ZN12QWebSettings33setOfflineWebApplicationCachePathERK7QString @ 109 NONAME + _ZN12QWebSettings34setOfflineWebApplicationCacheQuotaEx @ 110 NONAME + _ZN12QWebSettingsC1EPN7WebCore8SettingsE @ 111 NONAME + _ZN12QWebSettingsC1Ev @ 112 NONAME + _ZN12QWebSettingsC2EPN7WebCore8SettingsE @ 113 NONAME + _ZN12QWebSettingsC2Ev @ 114 NONAME + _ZN12QWebSettingsD1Ev @ 115 NONAME + _ZN12QWebSettingsD2Ev @ 116 NONAME + _ZN13QWebInspector11qt_metacallEN11QMetaObject4CallEiPPv @ 117 NONAME + _ZN13QWebInspector11qt_metacastEPKc @ 118 NONAME + _ZN13QWebInspector11resizeEventEP12QResizeEvent @ 119 NONAME + _ZN13QWebInspector16staticMetaObjectE @ 120 NONAME DATA 16 + _ZN13QWebInspector18windowTitleChangedERK7QString @ 121 NONAME ABSENT + _ZN13QWebInspector19getStaticMetaObjectEv @ 122 NONAME + _ZN13QWebInspector5eventEP6QEvent @ 123 NONAME + _ZN13QWebInspector7setPageEP8QWebPage @ 124 NONAME + _ZN13QWebInspector9hideEventEP10QHideEvent @ 125 NONAME + _ZN13QWebInspector9showEventEP10QShowEvent @ 126 NONAME + _ZN13QWebInspectorC1EP7QWidget @ 127 NONAME + _ZN13QWebInspectorC2EP7QWidget @ 128 NONAME + _ZN13QWebInspectorD0Ev @ 129 NONAME + _ZN13QWebInspectorD1Ev @ 130 NONAME + _ZN13QWebInspectorD2Ev @ 131 NONAME + _ZN14QWebPluginInfo10setEnabledEb @ 132 NONAME + _ZN14QWebPluginInfoC1EPN7WebCore13PluginPackageE @ 133 NONAME + _ZN14QWebPluginInfoC1ERKS_ @ 134 NONAME + _ZN14QWebPluginInfoC1Ev @ 135 NONAME + _ZN14QWebPluginInfoC2EPN7WebCore13PluginPackageE @ 136 NONAME + _ZN14QWebPluginInfoC2ERKS_ @ 137 NONAME + _ZN14QWebPluginInfoC2Ev @ 138 NONAME + _ZN14QWebPluginInfoD1Ev @ 139 NONAME + _ZN14QWebPluginInfoD2Ev @ 140 NONAME + _ZN14QWebPluginInfoaSERKS_ @ 141 NONAME + _ZN15QWebHistoryItem11setUserDataERK8QVariant @ 142 NONAME + _ZN15QWebHistoryItemC1EP22QWebHistoryItemPrivate @ 143 NONAME + _ZN15QWebHistoryItemC1ERKS_ @ 144 NONAME + _ZN15QWebHistoryItemC2EP22QWebHistoryItemPrivate @ 145 NONAME + _ZN15QWebHistoryItemC2ERKS_ @ 146 NONAME + _ZN15QWebHistoryItemD1Ev @ 147 NONAME + _ZN15QWebHistoryItemD2Ev @ 148 NONAME + _ZN15QWebHistoryItemaSERKS_ @ 149 NONAME + _ZN16QGraphicsWebView10loadFailedEv @ 150 NONAME ABSENT + _ZN16QGraphicsWebView10sceneEventEP6QEvent @ 151 NONAME + _ZN16QGraphicsWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 152 NONAME + _ZN16QGraphicsWebView10urlChangedERK4QUrl @ 153 NONAME + _ZN16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 154 NONAME + _ZN16QGraphicsWebView11iconChangedEv @ 155 NONAME + _ZN16QGraphicsWebView11loadStartedEv @ 156 NONAME + _ZN16QGraphicsWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 157 NONAME + _ZN16QGraphicsWebView11qt_metacastEPKc @ 158 NONAME + _ZN16QGraphicsWebView11setGeometryERK6QRectF @ 159 NONAME + _ZN16QGraphicsWebView12focusInEventEP11QFocusEvent @ 160 NONAME + _ZN16QGraphicsWebView12loadFinishedEv @ 161 NONAME ABSENT + _ZN16QGraphicsWebView12titleChangedERK7QString @ 162 NONAME + _ZN16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 163 NONAME + _ZN16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 164 NONAME + _ZN16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 165 NONAME + _ZN16QGraphicsWebView13setZoomFactorEf @ 166 NONAME + _ZN16QGraphicsWebView13statusChangedEv @ 167 NONAME ABSENT + _ZN16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 168 NONAME + _ZN16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 169 NONAME + _ZN16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 170 NONAME + _ZN16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 171 NONAME + _ZN16QGraphicsWebView14setInteractiveEb @ 172 NONAME ABSENT + _ZN16QGraphicsWebView14updateGeometryEv @ 173 NONAME + _ZN16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 174 NONAME + _ZN16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 175 NONAME + _ZN16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 176 NONAME + _ZN16QGraphicsWebView15progressChangedEf @ 177 NONAME ABSENT + _ZN16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 178 NONAME + _ZN16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 179 NONAME + _ZN16QGraphicsWebView16staticMetaObjectE @ 180 NONAME DATA 16 + _ZN16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 181 NONAME + _ZN16QGraphicsWebView17zoomFactorChangedEv @ 182 NONAME ABSENT + _ZN16QGraphicsWebView18focusNextPrevChildEb @ 183 NONAME + _ZN16QGraphicsWebView19getStaticMetaObjectEv @ 184 NONAME + _ZN16QGraphicsWebView20interactivityChangedEv @ 185 NONAME ABSENT + _ZN16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 186 NONAME + _ZN16QGraphicsWebView4backEv @ 187 NONAME + _ZN16QGraphicsWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 188 NONAME + _ZN16QGraphicsWebView4loadERK4QUrl @ 189 NONAME + _ZN16QGraphicsWebView4stopEv @ 190 NONAME + _ZN16QGraphicsWebView5eventEP6QEvent @ 191 NONAME + _ZN16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 192 NONAME + _ZN16QGraphicsWebView6reloadEv @ 193 NONAME + _ZN16QGraphicsWebView6setUrlERK4QUrl @ 194 NONAME + _ZN16QGraphicsWebView7forwardEv @ 195 NONAME + _ZN16QGraphicsWebView7setHtmlERK7QStringRK4QUrl @ 196 NONAME + _ZN16QGraphicsWebView7setPageEP8QWebPage @ 197 NONAME + _ZN16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 198 NONAME + _ZN16QGraphicsWebViewC1EP13QGraphicsItem @ 199 NONAME + _ZN16QGraphicsWebViewC2EP13QGraphicsItem @ 200 NONAME + _ZN16QGraphicsWebViewD0Ev @ 201 NONAME + _ZN16QGraphicsWebViewD1Ev @ 202 NONAME + _ZN16QGraphicsWebViewD2Ev @ 203 NONAME + _ZN17QWebHitTestResultC1EP24QWebHitTestResultPrivate @ 204 NONAME + _ZN17QWebHitTestResultC1ERKS_ @ 205 NONAME + _ZN17QWebHitTestResultC1Ev @ 206 NONAME + _ZN17QWebHitTestResultC2EP24QWebHitTestResultPrivate @ 207 NONAME + _ZN17QWebHitTestResultC2ERKS_ @ 208 NONAME + _ZN17QWebHitTestResultC2Ev @ 209 NONAME + _ZN17QWebHitTestResultD1Ev @ 210 NONAME + _ZN17QWebHitTestResultD2Ev @ 211 NONAME + _ZN17QWebHitTestResultaSERKS_ @ 212 NONAME + _ZN17QWebPluginFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME + _ZN17QWebPluginFactory11qt_metacastEPKc @ 214 NONAME + _ZN17QWebPluginFactory14refreshPluginsEv @ 215 NONAME + _ZN17QWebPluginFactory16staticMetaObjectE @ 216 NONAME DATA 16 + _ZN17QWebPluginFactory19getStaticMetaObjectEv @ 217 NONAME + _ZN17QWebPluginFactory9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 218 NONAME + _ZN17QWebPluginFactoryC2EP7QObject @ 219 NONAME + _ZN17QWebPluginFactoryD0Ev @ 220 NONAME + _ZN17QWebPluginFactoryD1Ev @ 221 NONAME + _ZN17QWebPluginFactoryD2Ev @ 222 NONAME + _ZN18QWebPluginDatabase11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME + _ZN18QWebPluginDatabase11qt_metacastEPKc @ 224 NONAME + _ZN18QWebPluginDatabase13addSearchPathERK7QString @ 225 NONAME + _ZN18QWebPluginDatabase14setSearchPathsERK11QStringList @ 226 NONAME + _ZN18QWebPluginDatabase16staticMetaObjectE @ 227 NONAME DATA 16 + _ZN18QWebPluginDatabase17pluginForMimeTypeERK7QString @ 228 NONAME + _ZN18QWebPluginDatabase18defaultSearchPathsEv @ 229 NONAME + _ZN18QWebPluginDatabase19getStaticMetaObjectEv @ 230 NONAME + _ZN18QWebPluginDatabase29setPreferredPluginForMimeTypeERK7QStringRK14QWebPluginInfo @ 231 NONAME + _ZN18QWebPluginDatabase7refreshEv @ 232 NONAME + _ZN18QWebPluginDatabaseC1EP7QObject @ 233 NONAME + _ZN18QWebPluginDatabaseC2EP7QObject @ 234 NONAME + _ZN18QWebPluginDatabaseD0Ev @ 235 NONAME + _ZN18QWebPluginDatabaseD1Ev @ 236 NONAME + _ZN18QWebPluginDatabaseD2Ev @ 237 NONAME + _ZN18QWebSecurityOrigin10allOriginsEv @ 238 NONAME + _ZN18QWebSecurityOrigin12localSchemesEv @ 239 NONAME + _ZN18QWebSecurityOrigin14addLocalSchemeERK7QString @ 240 NONAME + _ZN18QWebSecurityOrigin16setDatabaseQuotaEx @ 241 NONAME + _ZN18QWebSecurityOrigin17removeLocalSchemeERK7QString @ 242 NONAME + _ZN18QWebSecurityOrigin25whiteListAccessFromOriginERK7QStringS2_S2_b @ 243 NONAME ABSENT + _ZN18QWebSecurityOrigin27resetOriginAccessWhiteListsEv @ 244 NONAME ABSENT + _ZN18QWebSecurityOriginC1EP25QWebSecurityOriginPrivate @ 245 NONAME + _ZN18QWebSecurityOriginC1ERKS_ @ 246 NONAME + _ZN18QWebSecurityOriginC2EP25QWebSecurityOriginPrivate @ 247 NONAME + _ZN18QWebSecurityOriginC2ERKS_ @ 248 NONAME + _ZN18QWebSecurityOriginD1Ev @ 249 NONAME + _ZN18QWebSecurityOriginD2Ev @ 250 NONAME + _ZN18QWebSecurityOriginaSERKS_ @ 251 NONAME + _ZN20QWebHistoryInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 252 NONAME + _ZN20QWebHistoryInterface11qt_metacastEPKc @ 253 NONAME + _ZN20QWebHistoryInterface16defaultInterfaceEv @ 254 NONAME + _ZN20QWebHistoryInterface16staticMetaObjectE @ 255 NONAME DATA 16 + _ZN20QWebHistoryInterface19getStaticMetaObjectEv @ 256 NONAME + _ZN20QWebHistoryInterface19setDefaultInterfaceEPS_ @ 257 NONAME + _ZN20QWebHistoryInterfaceC2EP7QObject @ 258 NONAME + _ZN20QWebHistoryInterfaceD0Ev @ 259 NONAME + _ZN20QWebHistoryInterfaceD1Ev @ 260 NONAME + _ZN20QWebHistoryInterfaceD2Ev @ 261 NONAME + _ZN8QWebPage10chooseFileEP9QWebFrameRK7QString @ 262 NONAME + _ZN8QWebPage10setPaletteERK8QPalette @ 263 NONAME + _ZN8QWebPage11linkClickedERK4QUrl @ 264 NONAME + _ZN8QWebPage11linkHoveredERK7QStringS2_S2_ @ 265 NONAME + _ZN8QWebPage11loadStartedEv @ 266 NONAME + _ZN8QWebPage11qt_metacallEN11QMetaObject4CallEiPPv @ 267 NONAME + _ZN8QWebPage11qt_metacastEPKc @ 268 NONAME + _ZN8QWebPage12createPluginERK7QStringRK4QUrlRK11QStringListS8_ @ 269 NONAME + _ZN8QWebPage12createWindowENS_13WebWindowTypeE @ 270 NONAME + _ZN8QWebPage12frameCreatedEP9QWebFrame @ 271 NONAME + _ZN8QWebPage12loadFinishedEb @ 272 NONAME + _ZN8QWebPage12loadProgressEi @ 273 NONAME + _ZN8QWebPage13triggerActionENS_9WebActionEb @ 274 NONAME + _ZN8QWebPage14printRequestedEP9QWebFrame @ 275 NONAME + _ZN8QWebPage15contentsChangedEv @ 276 NONAME + _ZN8QWebPage15javaScriptAlertEP9QWebFrameRK7QString @ 277 NONAME + _ZN8QWebPage15scrollRequestedEiiRK5QRect @ 278 NONAME + _ZN8QWebPage16javaScriptPromptEP9QWebFrameRK7QStringS4_PS2_ @ 279 NONAME + _ZN8QWebPage16repaintRequestedERK5QRect @ 280 NONAME + _ZN8QWebPage16selectionChangedEv @ 281 NONAME + _ZN8QWebPage16setPluginFactoryEP17QWebPluginFactory @ 282 NONAME + _ZN8QWebPage16staticMetaObjectE @ 283 NONAME DATA 16 + _ZN8QWebPage16statusBarMessageERK7QString @ 284 NONAME + _ZN8QWebPage17downloadRequestedERK15QNetworkRequest @ 285 NONAME + _ZN8QWebPage17javaScriptConfirmEP9QWebFrameRK7QString @ 286 NONAME + _ZN8QWebPage17microFocusChangedEv @ 287 NONAME + _ZN8QWebPage18focusNextPrevChildEb @ 288 NONAME + _ZN8QWebPage18setContentEditableEb @ 289 NONAME + _ZN8QWebPage18unsupportedContentEP13QNetworkReply @ 290 NONAME + _ZN8QWebPage19getStaticMetaObjectEv @ 291 NONAME + _ZN8QWebPage20windowCloseRequestedEv @ 292 NONAME + _ZN8QWebPage21databaseQuotaExceededEP9QWebFrame7QString @ 293 NONAME + _ZN8QWebPage21webInspectorTriggeredERK11QWebElement @ 294 NONAME ABSENT + _ZN8QWebPage23acceptNavigationRequestEP9QWebFrameRK15QNetworkRequestNS_14NavigationTypeE @ 295 NONAME + _ZN8QWebPage23geometryChangeRequestedERK5QRect @ 296 NONAME + _ZN8QWebPage23saveFrameStateRequestedEP9QWebFrameP15QWebHistoryItem @ 297 NONAME + _ZN8QWebPage23setLinkDelegationPolicyENS_20LinkDelegationPolicyE @ 298 NONAME + _ZN8QWebPage23setNetworkAccessManagerEP21QNetworkAccessManager @ 299 NONAME + _ZN8QWebPage23swallowContextMenuEventEP17QContextMenuEvent @ 300 NONAME + _ZN8QWebPage24javaScriptConsoleMessageERK7QStringiS2_ @ 301 NONAME + _ZN8QWebPage25createStandardContextMenuEv @ 302 NONAME + _ZN8QWebPage25shouldInterruptJavaScriptEv @ 303 NONAME + _ZN8QWebPage26restoreFrameStateRequestedEP9QWebFrame @ 304 NONAME + _ZN8QWebPage28setForwardUnsupportedContentEb @ 305 NONAME + _ZN8QWebPage30updatePositionDependentActionsERK6QPoint @ 306 NONAME + _ZN8QWebPage32menuBarVisibilityChangeRequestedEb @ 307 NONAME + _ZN8QWebPage32toolBarVisibilityChangeRequestedEb @ 308 NONAME + _ZN8QWebPage34statusBarVisibilityChangeRequestedEb @ 309 NONAME + _ZN8QWebPage5eventEP6QEvent @ 310 NONAME + _ZN8QWebPage7setViewEP7QWidget @ 311 NONAME + _ZN8QWebPage8findTextERK7QString6QFlagsINS_8FindFlagEE @ 312 NONAME + _ZN8QWebPage9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 313 NONAME + _ZN8QWebPageC1EP7QObject @ 314 NONAME + _ZN8QWebPageC2EP7QObject @ 315 NONAME + _ZN8QWebPageD0Ev @ 316 NONAME + _ZN8QWebPageD1Ev @ 317 NONAME + _ZN8QWebPageD2Ev @ 318 NONAME + _ZN8QWebView10paintEventEP11QPaintEvent @ 319 NONAME + _ZN8QWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 320 NONAME + _ZN8QWebView10urlChangedERK4QUrl @ 321 NONAME + _ZN8QWebView10wheelEventEP11QWheelEvent @ 322 NONAME + _ZN8QWebView11changeEventEP6QEvent @ 323 NONAME + _ZN8QWebView11iconChangedEv @ 324 NONAME + _ZN8QWebView11linkClickedERK4QUrl @ 325 NONAME + _ZN8QWebView11loadStartedEv @ 326 NONAME + _ZN8QWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 327 NONAME + _ZN8QWebView11qt_metacastEPKc @ 328 NONAME + _ZN8QWebView11resizeEventEP12QResizeEvent @ 329 NONAME + _ZN8QWebView12createWindowEN8QWebPage13WebWindowTypeE @ 330 NONAME + _ZN8QWebView12focusInEventEP11QFocusEvent @ 331 NONAME + _ZN8QWebView12loadFinishedEb @ 332 NONAME + _ZN8QWebView12loadProgressEi @ 333 NONAME + _ZN8QWebView12titleChangedERK7QString @ 334 NONAME + _ZN8QWebView13dragMoveEventEP14QDragMoveEvent @ 335 NONAME + _ZN8QWebView13focusOutEventEP11QFocusEvent @ 336 NONAME + _ZN8QWebView13keyPressEventEP9QKeyEvent @ 337 NONAME + _ZN8QWebView13setRenderHintEN8QPainter10RenderHintEb @ 338 NONAME + _ZN8QWebView13setZoomFactorEf @ 339 NONAME + _ZN8QWebView14dragEnterEventEP15QDragEnterEvent @ 340 NONAME + _ZN8QWebView14dragLeaveEventEP15QDragLeaveEvent @ 341 NONAME + _ZN8QWebView14mouseMoveEventEP11QMouseEvent @ 342 NONAME + _ZN8QWebView14setRenderHintsE6QFlagsIN8QPainter10RenderHintEE @ 343 NONAME + _ZN8QWebView15keyReleaseEventEP9QKeyEvent @ 344 NONAME + _ZN8QWebView15mousePressEventEP11QMouseEvent @ 345 NONAME + _ZN8QWebView16contextMenuEventEP17QContextMenuEvent @ 346 NONAME + _ZN8QWebView16inputMethodEventEP17QInputMethodEvent @ 347 NONAME + _ZN8QWebView16selectionChangedEv @ 348 NONAME + _ZN8QWebView16staticMetaObjectE @ 349 NONAME DATA 16 + _ZN8QWebView16statusBarMessageERK7QString @ 350 NONAME + _ZN8QWebView17mouseReleaseEventEP11QMouseEvent @ 351 NONAME + _ZN8QWebView17triggerPageActionEN8QWebPage9WebActionEb @ 352 NONAME + _ZN8QWebView18focusNextPrevChildEb @ 353 NONAME + _ZN8QWebView18guessUrlFromStringERK7QString @ 354 NONAME ABSENT + _ZN8QWebView19getStaticMetaObjectEv @ 355 NONAME + _ZN8QWebView21mouseDoubleClickEventEP11QMouseEvent @ 356 NONAME + _ZN8QWebView21setTextSizeMultiplierEf @ 357 NONAME + _ZN8QWebView4backEv @ 358 NONAME + _ZN8QWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 359 NONAME + _ZN8QWebView4loadERK4QUrl @ 360 NONAME + _ZN8QWebView4stopEv @ 361 NONAME + _ZN8QWebView5eventEP6QEvent @ 362 NONAME + _ZN8QWebView6reloadEv @ 363 NONAME + _ZN8QWebView6setUrlERK4QUrl @ 364 NONAME + _ZN8QWebView7forwardEv @ 365 NONAME + _ZN8QWebView7setHtmlERK7QStringRK4QUrl @ 366 NONAME + _ZN8QWebView7setPageEP8QWebPage @ 367 NONAME + _ZN8QWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 368 NONAME + _ZN8QWebView9dropEventEP10QDropEvent @ 369 NONAME + _ZN8QWebViewC1EP7QWidget @ 370 NONAME + _ZN8QWebViewC2EP7QWidget @ 371 NONAME + _ZN8QWebViewD0Ev @ 372 NONAME + _ZN8QWebViewD1Ev @ 373 NONAME + _ZN8QWebViewD2Ev @ 374 NONAME + _ZN9QWebFrame10setContentERK10QByteArrayRK7QStringRK4QUrl @ 375 NONAME + _ZN9QWebFrame10urlChangedERK4QUrl @ 376 NONAME + _ZN9QWebFrame11iconChangedEv @ 377 NONAME + _ZN9QWebFrame11loadStartedEv @ 378 NONAME + _ZN9QWebFrame11qt_metacallEN11QMetaObject4CallEiPPv @ 379 NONAME + _ZN9QWebFrame11qt_metacastEPKc @ 380 NONAME + _ZN9QWebFrame12loadFinishedEb @ 381 NONAME + _ZN9QWebFrame12titleChangedERK7QString @ 382 NONAME + _ZN9QWebFrame13setZoomFactorEf @ 383 NONAME + _ZN9QWebFrame15provisionalLoadEv @ 384 NONAME + _ZN9QWebFrame16staticMetaObjectE @ 385 NONAME DATA 16 + _ZN9QWebFrame17setScrollBarValueEN2Qt11OrientationEi @ 386 NONAME + _ZN9QWebFrame17setScrollPositionERK6QPoint @ 387 NONAME + _ZN9QWebFrame18evaluateJavaScriptERK7QString @ 388 NONAME + _ZN9QWebFrame18setScrollBarPolicyEN2Qt11OrientationENS0_15ScrollBarPolicyE @ 389 NONAME + _ZN9QWebFrame19contentsSizeChangedERK5QSize @ 390 NONAME + _ZN9QWebFrame19getStaticMetaObjectEv @ 391 NONAME + _ZN9QWebFrame21setTextSizeMultiplierEf @ 392 NONAME + _ZN9QWebFrame22initialLayoutCompletedEv @ 393 NONAME + _ZN9QWebFrame23setClipRenderToViewportEb @ 394 NONAME ABSENT + _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObject @ 395 NONAME + _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObjectN13QScriptEngine14ValueOwnershipE @ 396 NONAME + _ZN9QWebFrame29javaScriptWindowObjectClearedEv @ 397 NONAME + _ZN9QWebFrame4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 398 NONAME + _ZN9QWebFrame4loadERK4QUrl @ 399 NONAME + _ZN9QWebFrame5eventEP6QEvent @ 400 NONAME + _ZN9QWebFrame6renderEP8QPainter @ 401 NONAME + _ZN9QWebFrame6renderEP8QPainterRK7QRegion @ 402 NONAME + _ZN9QWebFrame6scrollEii @ 403 NONAME + _ZN9QWebFrame6setUrlERK4QUrl @ 404 NONAME + _ZN9QWebFrame7setHtmlERK7QStringRK4QUrl @ 405 NONAME + _ZN9QWebFrame8setFocusEv @ 406 NONAME + _ZN9QWebFrameC1EP8QWebPageP13QWebFrameData @ 407 NONAME + _ZN9QWebFrameC1EPS_P13QWebFrameData @ 408 NONAME + _ZN9QWebFrameC2EP8QWebPageP13QWebFrameData @ 409 NONAME + _ZN9QWebFrameC2EPS_P13QWebFrameData @ 410 NONAME + _ZN9QWebFrameD0Ev @ 411 NONAME + _ZN9QWebFrameD1Ev @ 412 NONAME + _ZN9QWebFrameD2Ev @ 413 NONAME + _ZNK11QWebElement10firstChildEv @ 414 NONAME + _ZNK11QWebElement10toInnerXmlEv @ 415 NONAME + _ZNK11QWebElement10toOuterXmlEv @ 416 NONAME + _ZNK11QWebElement11attributeNSERK7QStringS2_S2_ @ 417 NONAME + _ZNK11QWebElement11nextSiblingEv @ 418 NONAME + _ZNK11QWebElement11toPlainTextEv @ 419 NONAME + _ZNK11QWebElement12hasAttributeERK7QString @ 420 NONAME + _ZNK11QWebElement12namespaceUriEv @ 421 NONAME + _ZNK11QWebElement13hasAttributesEv @ 422 NONAME + _ZNK11QWebElement13stylePropertyERK7QStringNS_20StyleResolveStrategyE @ 423 NONAME + _ZNK11QWebElement14hasAttributeNSERK7QStringS2_ @ 424 NONAME + _ZNK11QWebElement15previousSiblingEv @ 425 NONAME + _ZNK11QWebElement5cloneEv @ 426 NONAME + _ZNK11QWebElement6isNullEv @ 427 NONAME + _ZNK11QWebElement6parentEv @ 428 NONAME + _ZNK11QWebElement6prefixEv @ 429 NONAME + _ZNK11QWebElement7classesEv @ 430 NONAME + _ZNK11QWebElement7findAllERK7QString @ 431 NONAME + _ZNK11QWebElement7tagNameEv @ 432 NONAME + _ZNK11QWebElement8documentEv @ 433 NONAME + _ZNK11QWebElement8geometryEv @ 434 NONAME + _ZNK11QWebElement8hasClassERK7QString @ 435 NONAME + _ZNK11QWebElement8hasFocusEv @ 436 NONAME + _ZNK11QWebElement8webFrameEv @ 437 NONAME + _ZNK11QWebElement9attributeERK7QStringS2_ @ 438 NONAME + _ZNK11QWebElement9findFirstERK7QString @ 439 NONAME + _ZNK11QWebElement9lastChildEv @ 440 NONAME + _ZNK11QWebElement9localNameEv @ 441 NONAME + _ZNK11QWebElementeqERKS_ @ 442 NONAME + _ZNK11QWebElementneERKS_ @ 443 NONAME + _ZNK11QWebHistory11currentItemEv @ 444 NONAME + _ZNK11QWebHistory11forwardItemEv @ 445 NONAME + _ZNK11QWebHistory12canGoForwardEv @ 446 NONAME + _ZNK11QWebHistory12forwardItemsEi @ 447 NONAME + _ZNK11QWebHistory16currentItemIndexEv @ 448 NONAME + _ZNK11QWebHistory16maximumItemCountEv @ 449 NONAME + _ZNK11QWebHistory5countEv @ 450 NONAME + _ZNK11QWebHistory5itemsEv @ 451 NONAME + _ZNK11QWebHistory6itemAtEi @ 452 NONAME + _ZNK11QWebHistory8backItemEv @ 453 NONAME + _ZNK11QWebHistory9backItemsEi @ 454 NONAME + _ZNK11QWebHistory9canGoBackEv @ 455 NONAME + _ZNK11QWebHistory9saveStateENS_19HistoryStateVersionE @ 456 NONAME ABSENT + _ZNK12QWebDatabase11displayNameEv @ 457 NONAME + _ZNK12QWebDatabase12expectedSizeEv @ 458 NONAME + _ZNK12QWebDatabase4nameEv @ 459 NONAME + _ZNK12QWebDatabase4sizeEv @ 460 NONAME + _ZNK12QWebDatabase6originEv @ 461 NONAME + _ZNK12QWebDatabase8fileNameEv @ 462 NONAME + _ZNK12QWebSettings10fontFamilyENS_10FontFamilyE @ 463 NONAME + _ZNK12QWebSettings13testAttributeENS_12WebAttributeE @ 464 NONAME + _ZNK12QWebSettings16localStoragePathEv @ 465 NONAME + _ZNK12QWebSettings17userStyleSheetUrlEv @ 466 NONAME + _ZNK12QWebSettings19defaultTextEncodingEv @ 467 NONAME + _ZNK12QWebSettings8fontSizeENS_8FontSizeE @ 468 NONAME + _ZNK13QWebInspector10metaObjectEv @ 469 NONAME + _ZNK13QWebInspector4pageEv @ 470 NONAME + _ZNK13QWebInspector8sizeHintEv @ 471 NONAME + _ZNK14QWebPluginInfo11descriptionEv @ 472 NONAME + _ZNK14QWebPluginInfo16supportsMimeTypeERK7QString @ 473 NONAME + _ZNK14QWebPluginInfo4nameEv @ 474 NONAME + _ZNK14QWebPluginInfo4pathEv @ 475 NONAME + _ZNK14QWebPluginInfo6isNullEv @ 476 NONAME + _ZNK14QWebPluginInfo9isEnabledEv @ 477 NONAME + _ZNK14QWebPluginInfo9mimeTypesEv @ 478 NONAME + _ZNK14QWebPluginInfoeqERKS_ @ 479 NONAME + _ZNK14QWebPluginInfoneERKS_ @ 480 NONAME + _ZNK15QWebHistoryItem11lastVisitedEv @ 481 NONAME + _ZNK15QWebHistoryItem11originalUrlEv @ 482 NONAME + _ZNK15QWebHistoryItem3urlEv @ 483 NONAME + _ZNK15QWebHistoryItem4iconEv @ 484 NONAME + _ZNK15QWebHistoryItem5titleEv @ 485 NONAME + _ZNK15QWebHistoryItem7isValidEv @ 486 NONAME + _ZNK15QWebHistoryItem8userDataEv @ 487 NONAME + _ZNK16QGraphicsWebView10metaObjectEv @ 488 NONAME + _ZNK16QGraphicsWebView10zoomFactorEv @ 489 NONAME + _ZNK16QGraphicsWebView13isInteractiveEv @ 490 NONAME ABSENT + _ZNK16QGraphicsWebView3urlEv @ 491 NONAME + _ZNK16QGraphicsWebView4iconEv @ 492 NONAME + _ZNK16QGraphicsWebView4pageEv @ 493 NONAME + _ZNK16QGraphicsWebView5titleEv @ 494 NONAME + _ZNK16QGraphicsWebView6statusEv @ 495 NONAME ABSENT + _ZNK16QGraphicsWebView6toHtmlEv @ 496 NONAME ABSENT + _ZNK16QGraphicsWebView7historyEv @ 497 NONAME + _ZNK16QGraphicsWebView8progressEv @ 498 NONAME ABSENT + _ZNK16QGraphicsWebView8settingsEv @ 499 NONAME + _ZNK17QWebHitTestResult11linkElementEv @ 500 NONAME + _ZNK17QWebHitTestResult12boundingRectEv @ 501 NONAME + _ZNK17QWebHitTestResult13alternateTextEv @ 502 NONAME + _ZNK17QWebHitTestResult15linkTargetFrameEv @ 503 NONAME + _ZNK17QWebHitTestResult17isContentEditableEv @ 504 NONAME + _ZNK17QWebHitTestResult17isContentSelectedEv @ 505 NONAME + _ZNK17QWebHitTestResult21enclosingBlockElementEv @ 506 NONAME + _ZNK17QWebHitTestResult3posEv @ 507 NONAME + _ZNK17QWebHitTestResult5frameEv @ 508 NONAME + _ZNK17QWebHitTestResult5titleEv @ 509 NONAME + _ZNK17QWebHitTestResult6isNullEv @ 510 NONAME + _ZNK17QWebHitTestResult6pixmapEv @ 511 NONAME + _ZNK17QWebHitTestResult7elementEv @ 512 NONAME + _ZNK17QWebHitTestResult7linkUrlEv @ 513 NONAME + _ZNK17QWebHitTestResult8imageUrlEv @ 514 NONAME + _ZNK17QWebHitTestResult8linkTextEv @ 515 NONAME + _ZNK17QWebHitTestResult9linkTitleEv @ 516 NONAME + _ZNK17QWebPluginFactory10metaObjectEv @ 517 NONAME + _ZNK17QWebPluginFactory17supportsExtensionENS_9ExtensionE @ 518 NONAME + _ZNK17QWebPluginFactory8MimeTypeeqERKS0_ @ 519 NONAME + _ZNK18QWebPluginDatabase10metaObjectEv @ 520 NONAME + _ZNK18QWebPluginDatabase11searchPathsEv @ 521 NONAME + _ZNK18QWebPluginDatabase7pluginsEv @ 522 NONAME + _ZNK18QWebSecurityOrigin13databaseQuotaEv @ 523 NONAME + _ZNK18QWebSecurityOrigin13databaseUsageEv @ 524 NONAME + _ZNK18QWebSecurityOrigin4hostEv @ 525 NONAME + _ZNK18QWebSecurityOrigin4portEv @ 526 NONAME + _ZNK18QWebSecurityOrigin6schemeEv @ 527 NONAME + _ZNK18QWebSecurityOrigin9databasesEv @ 528 NONAME + _ZNK20QWebHistoryInterface10metaObjectEv @ 529 NONAME + _ZNK8QWebPage10isModifiedEv @ 530 NONAME + _ZNK8QWebPage10metaObjectEv @ 531 NONAME + _ZNK8QWebPage10totalBytesEv @ 532 NONAME + _ZNK8QWebPage12currentFrameEv @ 533 NONAME + _ZNK8QWebPage12selectedTextEv @ 534 NONAME + _ZNK8QWebPage12viewportSizeEv @ 535 NONAME + _ZNK8QWebPage13bytesReceivedEv @ 536 NONAME + _ZNK8QWebPage13pluginFactoryEv @ 537 NONAME + _ZNK8QWebPage15setViewportSizeERK5QSize @ 538 NONAME + _ZNK8QWebPage15userAgentForUrlERK4QUrl @ 539 NONAME + _ZNK8QWebPage16inputMethodQueryEN2Qt16InputMethodQueryE @ 540 NONAME + _ZNK8QWebPage17fixedContentsSizeEv @ 541 NONAME ABSENT + _ZNK8QWebPage17isContentEditableEv @ 542 NONAME + _ZNK8QWebPage17supportsExtensionENS_9ExtensionE @ 543 NONAME + _ZNK8QWebPage20linkDelegationPolicyEv @ 544 NONAME + _ZNK8QWebPage20networkAccessManagerEv @ 545 NONAME + _ZNK8QWebPage20setFixedContentsSizeERK5QSize @ 546 NONAME ABSENT + _ZNK8QWebPage25forwardUnsupportedContentEv @ 547 NONAME + _ZNK8QWebPage4viewEv @ 548 NONAME + _ZNK8QWebPage6actionENS_9WebActionE @ 549 NONAME + _ZNK8QWebPage7frameAtERK6QPoint @ 550 NONAME + _ZNK8QWebPage7historyEv @ 551 NONAME + _ZNK8QWebPage7paletteEv @ 552 NONAME + _ZNK8QWebPage8settingsEv @ 553 NONAME + _ZNK8QWebPage9mainFrameEv @ 554 NONAME + _ZNK8QWebPage9undoStackEv @ 555 NONAME + _ZNK8QWebView10isModifiedEv @ 556 NONAME + _ZNK8QWebView10metaObjectEv @ 557 NONAME + _ZNK8QWebView10pageActionEN8QWebPage9WebActionE @ 558 NONAME + _ZNK8QWebView10zoomFactorEv @ 559 NONAME + _ZNK8QWebView11renderHintsEv @ 560 NONAME + _ZNK8QWebView12selectedTextEv @ 561 NONAME + _ZNK8QWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 562 NONAME + _ZNK8QWebView18textSizeMultiplierEv @ 563 NONAME + _ZNK8QWebView3urlEv @ 564 NONAME + _ZNK8QWebView4iconEv @ 565 NONAME + _ZNK8QWebView4pageEv @ 566 NONAME + _ZNK8QWebView5printEP8QPrinter @ 567 NONAME + _ZNK8QWebView5titleEv @ 568 NONAME + _ZNK8QWebView7historyEv @ 569 NONAME + _ZNK8QWebView8settingsEv @ 570 NONAME + _ZNK8QWebView8sizeHintEv @ 571 NONAME + _ZNK9QWebFrame10metaObjectEv @ 572 NONAME + _ZNK9QWebFrame10zoomFactorEv @ 573 NONAME + _ZNK9QWebFrame11childFramesEv @ 574 NONAME + _ZNK9QWebFrame11parentFrameEv @ 575 NONAME + _ZNK9QWebFrame11toPlainTextEv @ 576 NONAME + _ZNK9QWebFrame12contentsSizeEv @ 577 NONAME + _ZNK9QWebFrame12requestedUrlEv @ 578 NONAME + _ZNK9QWebFrame14hitTestContentERK6QPoint @ 579 NONAME + _ZNK9QWebFrame14renderTreeDumpEv @ 580 NONAME + _ZNK9QWebFrame14scrollBarValueEN2Qt11OrientationE @ 581 NONAME + _ZNK9QWebFrame14scrollPositionEv @ 582 NONAME + _ZNK9QWebFrame14securityOriginEv @ 583 NONAME + _ZNK9QWebFrame15documentElementEv @ 584 NONAME + _ZNK9QWebFrame15findAllElementsERK7QString @ 585 NONAME + _ZNK9QWebFrame15scrollBarPolicyEN2Qt11OrientationE @ 586 NONAME + _ZNK9QWebFrame16findFirstElementERK7QString @ 587 NONAME + _ZNK9QWebFrame16scrollBarMaximumEN2Qt11OrientationE @ 588 NONAME + _ZNK9QWebFrame16scrollBarMinimumEN2Qt11OrientationE @ 589 NONAME + _ZNK9QWebFrame17scrollBarGeometryEN2Qt11OrientationE @ 590 NONAME + _ZNK9QWebFrame18textSizeMultiplierEv @ 591 NONAME + _ZNK9QWebFrame20clipRenderToViewportEv @ 592 NONAME ABSENT + _ZNK9QWebFrame3posEv @ 593 NONAME + _ZNK9QWebFrame3urlEv @ 594 NONAME + _ZNK9QWebFrame4iconEv @ 595 NONAME + _ZNK9QWebFrame4pageEv @ 596 NONAME + _ZNK9QWebFrame5titleEv @ 597 NONAME + _ZNK9QWebFrame6toHtmlEv @ 598 NONAME + _ZNK9QWebFrame7baseUrlEv @ 599 NONAME + _ZNK9QWebFrame8geometryEv @ 600 NONAME + _ZNK9QWebFrame8hasFocusEv @ 601 NONAME + _ZNK9QWebFrame8metaDataEv @ 602 NONAME + _ZNK9QWebFrame9frameNameEv @ 603 NONAME + _ZTI13QWebInspector @ 604 NONAME + _ZTI16QGraphicsWebView @ 605 NONAME + _ZTI17QWebPluginFactory @ 606 NONAME + _ZTI18QWebPluginDatabase @ 607 NONAME + _ZTI20QWebHistoryInterface @ 608 NONAME + _ZTI8QWebPage @ 609 NONAME + _ZTI8QWebView @ 610 NONAME + _ZTI9QWebFrame @ 611 NONAME + _ZTV13QWebInspector @ 612 NONAME + _ZTV16QGraphicsWebView @ 613 NONAME + _ZTV17QWebPluginFactory @ 614 NONAME + _ZTV18QWebPluginDatabase @ 615 NONAME + _ZTV20QWebHistoryInterface @ 616 NONAME + _ZTV8QWebPage @ 617 NONAME + _ZTV8QWebView @ 618 NONAME + _ZTV9QWebFrame @ 619 NONAME + _ZThn16_N16QGraphicsWebView11setGeometryERK6QRectF @ 620 NONAME + _ZThn16_N16QGraphicsWebView14updateGeometryEv @ 621 NONAME + _ZThn16_N16QGraphicsWebViewD0Ev @ 622 NONAME + _ZThn16_N16QGraphicsWebViewD1Ev @ 623 NONAME + _ZThn8_N13QWebInspectorD0Ev @ 624 NONAME + _ZThn8_N13QWebInspectorD1Ev @ 625 NONAME + _ZThn8_N16QGraphicsWebView10sceneEventEP6QEvent @ 626 NONAME + _ZThn8_N16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 627 NONAME + _ZThn8_N16QGraphicsWebView12focusInEventEP11QFocusEvent @ 628 NONAME + _ZThn8_N16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 629 NONAME + _ZThn8_N16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 630 NONAME + _ZThn8_N16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 631 NONAME + _ZThn8_N16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 632 NONAME + _ZThn8_N16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 633 NONAME + _ZThn8_N16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 634 NONAME + _ZThn8_N16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 635 NONAME + _ZThn8_N16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 636 NONAME + _ZThn8_N16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 637 NONAME + _ZThn8_N16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 638 NONAME + _ZThn8_N16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 639 NONAME + _ZThn8_N16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 640 NONAME + _ZThn8_N16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 641 NONAME + _ZThn8_N16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 642 NONAME + _ZThn8_N16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 643 NONAME + _ZThn8_N16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 644 NONAME + _ZThn8_N16QGraphicsWebViewD0Ev @ 645 NONAME + _ZThn8_N16QGraphicsWebViewD1Ev @ 646 NONAME + _ZThn8_N8QWebViewD0Ev @ 647 NONAME + _ZThn8_N8QWebViewD1Ev @ 648 NONAME + _ZlsR11QDataStreamRK11QWebHistory @ 649 NONAME + _ZrsR11QDataStreamR11QWebHistory @ 650 NONAME + _Z32qt_drt_whiteListAccessFromOriginRK7QStringS1_S1_b @ 651 NONAME + _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME + _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME + _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME + _ZN11QWebElement6renderEP8QPainter @ 655 NONAME + _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT + _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT + _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME + _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME + _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME + _ZN16QGraphicsWebView12loadProgressEi @ 661 NONAME + _ZN16QGraphicsWebView16statusBarMessageERK7QString @ 662 NONAME + _ZN16QGraphicsWebView17triggerPageActionEN8QWebPage9WebActionEb @ 663 NONAME + _ZN16QGraphicsWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 664 NONAME + _ZN21QWebElementCollection6appendERKS_ @ 665 NONAME + _ZN21QWebElementCollectionC1ERK11QWebElementRK7QString @ 666 NONAME + _ZN21QWebElementCollectionC1ERKS_ @ 667 NONAME + _ZN21QWebElementCollectionC1Ev @ 668 NONAME + _ZN21QWebElementCollectionC2ERK11QWebElementRK7QString @ 669 NONAME + _ZN21QWebElementCollectionC2ERKS_ @ 670 NONAME + _ZN21QWebElementCollectionC2Ev @ 671 NONAME + _ZN21QWebElementCollectionD1Ev @ 672 NONAME + _ZN21QWebElementCollectionD2Ev @ 673 NONAME + _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME + _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME + _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT + _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT + _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME + _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME + _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME + _ZNK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 681 NONAME + _ZNK21QWebElementCollection2atEi @ 682 NONAME + _ZNK21QWebElementCollection5countEv @ 683 NONAME + _ZNK21QWebElementCollection6toListEv @ 684 NONAME + _ZNK21QWebElementCollectionplERKS_ @ 685 NONAME + _ZNK8QWebPage21preferredContentsSizeEv @ 686 NONAME + _ZNK8QWebPage24setPreferredContentsSizeERK5QSize @ 687 NONAME + _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME + _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME + _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME + _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME + _Z23qt_networkAccessAllowedb @ 692 NONAME + _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME + _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME + _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME + _ZN13QWebInspector10closeEventEP11QCloseEvent @ 696 NONAME + _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME + diff --git a/WebKit/qt/tests/benchmarks/loading/loading.pro b/WebKit/qt/tests/benchmarks/loading/loading.pro new file mode 100644 index 0000000..8b24274 --- /dev/null +++ b/WebKit/qt/tests/benchmarks/loading/loading.pro @@ -0,0 +1 @@ +include(../../tests.pri) diff --git a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro b/WebKit/qt/tests/benchmarks/loading/tst_loading.pro deleted file mode 100644 index bc5e75f..0000000 --- a/WebKit/qt/tests/benchmarks/loading/tst_loading.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = tst_loading -include(../../../../../WebKit.pri) -SOURCES += tst_loading.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E541 - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} diff --git a/WebKit/qt/tests/benchmarks/painting/painting.pro b/WebKit/qt/tests/benchmarks/painting/painting.pro new file mode 100644 index 0000000..8acdd5c --- /dev/null +++ b/WebKit/qt/tests/benchmarks/painting/painting.pro @@ -0,0 +1 @@ +include(../../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro b/WebKit/qt/tests/benchmarks/painting/tst_painting.pro deleted file mode 100644 index 48c7072..0000000 --- a/WebKit/qt/tests/benchmarks/painting/tst_painting.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = tst_painting -include(../../../../../WebKit.pri) -SOURCES += tst_painting.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E542 - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} diff --git a/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro new file mode 100644 index 0000000..0e49a70 --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro @@ -0,0 +1,10 @@ +# ------------------------------------------------- +# Project created by QtCreator 2009-12-10T11:25:02 +# ------------------------------------------------- +include(../tests.pri) +TARGET = hybridPixmap +SOURCES += widget.cpp +HEADERS += widget.h +FORMS += widget.ui +RESOURCES += resources.qrc +CONFIG += console diff --git a/WebKit/qt/tests/hybridPixmap/resources.qrc b/WebKit/qt/tests/hybridPixmap/resources.qrc new file mode 100644 index 0000000..5fd47e3 --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/resources.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>test.html</file> + </qresource> +</RCC> diff --git a/WebKit/qt/tests/hybridPixmap/test.html b/WebKit/qt/tests/hybridPixmap/test.html new file mode 100644 index 0000000..ddaf75c --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/test.html @@ -0,0 +1,57 @@ +<html> + <head> + <style> + img { display: block; border-style: groove} + </style> + <script> + function startTest() + { + var obj = myWidget.image; + var pxm = myWidget.pixmap; + + var img = obj.toHTMLImageElement(); + var img1 = document.getElementById("img1"); + var img2 = document.getElementById("img2"); + document.body.appendChild(img); + document.body.appendChild(pxm.toHTMLImageElement()); + var signalsFired = 0; + myWidget.compare(obj.toString(),"[Qt Native Pixmap "+obj.width+","+obj.height+"]"); + myWidget.compare(String(pxm),"[Qt Native Pixmap "+pxm.width+","+pxm.height+"]"); + + // this shouldn't work but shouldn't crash + myWidget.randomSlot("foobar"); + + myWidget.pixmapSignal.connect(function(imgFromSignal) { + myWidget.compare(imgFromSignal.height, img2.height); + if (++signalsFired == 2) + myWidget.completeTest(); + }); + + myWidget.imageSignal.connect(function(imgFromSignal) { + myWidget.compare(pxm.height, img2.height); + if (++signalsFired == 2) + myWidget.completeTest(); + }); + + function continueTestAfterImagesAreLoaded() + { + if (img1.complete && img2.complete) { + myWidget.compare(pxm.height, img2.height); + myWidget.pixmapSlot(img); + myWidget.imageSlot(pxm); + } + } + img1.onload = continueTestAfterImagesAreLoaded; + img2.onload = continueTestAfterImagesAreLoaded; + img1.src = obj.toDataUrl(); + img2.src = myWidget.pixmap.toDataUrl(); + myWidget.image = pxm; + myWidget.pixmap = img; + } + </script> + </head> + <body onload="startTest()"> + <img id="img1" /> + <img id="img2" /> + </body> +</html> diff --git a/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp b/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp new file mode 100644 index 0000000..72dbb3b --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "../util.h" + +#include "widget.h" +#include <QtTest/QtTest> + +class tst_hybridPixmap : public QObject { + Q_OBJECT + +public: + tst_hybridPixmap(QObject* o = 0) : QObject(o) {} + +public slots: + void init() + { + } + + void cleanup() + { + } + +private slots: + void hybridPixmap() + { + Widget widget; + widget.show(); + widget.start(); + waitForSignal(&widget, SIGNAL(testComplete())); + } +}; + +QTEST_MAIN(tst_hybridPixmap) + +#include <tst_hybridPixmap.moc> diff --git a/WebKit/qt/tests/hybridPixmap/widget.cpp b/WebKit/qt/tests/hybridPixmap/widget.cpp new file mode 100644 index 0000000..cfdb1d6 --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/widget.cpp @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "widget.h" + +#include "qwebelement.h" +#include "qwebframe.h" +#include "ui_widget.h" +#include <QPainter> +#include <QtTest/QtTest> + +Widget::Widget(QWidget* parent) : + QWidget(parent), + ui(new Ui::Widget) +{ + ui->setupUi(this); +} + +void Widget::refreshJS() +{ + ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this); +} +void Widget::start() +{ + ui->webView->load(QUrl("qrc:///test.html")); + connect(ui->webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(refreshJS())); + ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this); +} + +void Widget::completeTest() +{ + QCOMPARE(ui->lbl1->pixmap()->size(), ui->lbl2->size()); + QCOMPARE(ui->lbl3->size(), ui->lbl4->pixmap()->size()); + QCOMPARE(ui->lbl2->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img1").evaluateJavaScript("this.width").toInt()); + QCOMPARE(ui->lbl3->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img2").evaluateJavaScript("this.width").toInt()); + emit testComplete(); +} + +void Widget::setPixmap(const QPixmap& p) +{ + ui->lbl1->setPixmap(p); +} +QPixmap Widget::pixmap() const +{ + QPixmap px(ui->lbl3->size()); + { + QPainter p(&px); + ui->lbl3->render(&p); + } + return px; +} +void Widget::setImage(const QImage& img) +{ + ui->lbl4->setPixmap(QPixmap::fromImage(img)); +} + +QImage Widget::image() const +{ + QImage img(ui->lbl2->size(), QImage::Format_ARGB32); + { + QPainter p(&img); + ui->lbl2->render(&p); + } + return img; +} + +Widget::~Widget() +{ + delete ui; +} + +void Widget::changeEvent(QEvent* e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} +void Widget::compare(const QVariant& a, const QVariant& b) +{ + QCOMPARE(a, b); +} + +void Widget::imageSlot(const QImage& img) +{ + QCOMPARE(img.size(), ui->lbl3->size()); + emit pixmapSignal(QPixmap::fromImage(img)); +} + +void Widget::pixmapSlot(const QPixmap& pxm) +{ + QCOMPARE(pxm.size(), ui->lbl2->size()); + emit imageSignal(ui->lbl4->pixmap()->toImage()); +} + +void Widget::randomSlot(const QPixmap& pxm) +{ + QVERIFY(pxm.isNull()); +} diff --git a/WebKit/qt/tests/hybridPixmap/widget.h b/WebKit/qt/tests/hybridPixmap/widget.h new file mode 100644 index 0000000..a49f8ba --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/widget.h @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef widget_h +#define widget_h + +#include <QImage> +#include <QPixmap> +#include <QWidget> +#include "qwebview.h" + +typedef QWebView WebView; + +namespace Ui { +class Widget; +} + +class Widget : public QWidget { + Q_OBJECT + Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap) + Q_PROPERTY(QImage image READ image WRITE setImage) + +public: + Widget(QWidget* parent = 0); + ~Widget(); + void setPixmap(const QPixmap&); + QPixmap pixmap() const; + void setImage(const QImage&); + QImage image() const; + +private slots: + void refreshJS(); + +public slots: + void completeTest(); + void start(); + void compare(const QVariant& a, const QVariant& b); + void imageSlot(const QImage&); + void pixmapSlot(const QPixmap&); + void randomSlot(const QPixmap&); + +signals: + void testComplete(); + void imageSignal(const QImage&); + void pixmapSignal(const QPixmap&); + +protected: + void changeEvent(QEvent* e); + +private: + Ui::Widget* ui; +}; + +#endif // widget_h diff --git a/WebKit/qt/tests/hybridPixmap/widget.ui b/WebKit/qt/tests/hybridPixmap/widget.ui new file mode 100644 index 0000000..4f2b3b8 --- /dev/null +++ b/WebKit/qt/tests/hybridPixmap/widget.ui @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Widget</class> + <widget class="QWidget" name="Widget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>400</height> + </rect> + </property> + <property name="windowTitle"> + <string>Widget</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="WebView" name="webView" native="true"> + <property name="url" stdset="0"> + <url> + <string>about:blank</string> + </url> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="lbl1"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lbl2"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>120</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string>Image from Qt to HTML</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lbl3"> + <property name="text"> + <string>Pixmap from Qt to HTML</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="lbl4"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + <layoutdefault spacing="6" margin="11"/> + <customwidgets> + <customwidget> + <class>WebView</class> + <extends>QWidget</extends> + <header>widget.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro index 57b4437..4ca2bf6 100644 --- a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro +++ b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro @@ -1,10 +1 @@ -TEMPLATE = app -TARGET = tst_qgraphicswebview -include(../../../../WebKit.pri) -SOURCES += tst_qgraphicswebview.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebelement/qwebelement.pro b/WebKit/qt/tests/qwebelement/qwebelement.pro index c45a9ac..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebelement/qwebelement.pro +++ b/WebKit/qt/tests/qwebelement/qwebelement.pro @@ -1,12 +1 @@ -TEMPLATE = app -TARGET = tst_qwebelement -include(../../../../WebKit.pri) -SOURCES += tst_qwebelement.cpp -RESOURCES += qwebelement.qrc -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E53A - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebelement/qwebelement.qrc b/WebKit/qt/tests/qwebelement/qwebelement.qrc deleted file mode 100644 index 28b9d7b..0000000 --- a/WebKit/qt/tests/qwebelement/qwebelement.qrc +++ /dev/null @@ -1,7 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/"> -<file>style.css</file> -<file>style2.css</file> -<file>image.png</file> -</qresource> -</RCC> diff --git a/WebKit/qt/tests/qwebelement/image.png b/WebKit/qt/tests/qwebelement/resources/image.png Binary files differindex 8d70364..8d70364 100644 --- a/WebKit/qt/tests/qwebelement/image.png +++ b/WebKit/qt/tests/qwebelement/resources/image.png diff --git a/WebKit/qt/tests/qwebelement/style.css b/WebKit/qt/tests/qwebelement/resources/style.css index 2713dfd..2713dfd 100644 --- a/WebKit/qt/tests/qwebelement/style.css +++ b/WebKit/qt/tests/qwebelement/resources/style.css diff --git a/WebKit/qt/tests/qwebelement/style2.css b/WebKit/qt/tests/qwebelement/resources/style2.css index 6575dcb..6575dcb 100644 --- a/WebKit/qt/tests/qwebelement/style2.css +++ b/WebKit/qt/tests/qwebelement/resources/style2.css diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp index e9dae18..dde65cf 100644 --- a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp +++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp @@ -18,8 +18,8 @@ */ +#include <../util.h> #include <QtTest/QtTest> - #include <qwebpage.h> #include <qwidget.h> #include <qwebview.h> @@ -28,29 +28,6 @@ //TESTED_CLASS= //TESTED_FILES= -/** - * Starts an event loop that runs until the given signal is received. - Optionally the event loop - * can return earlier on a timeout. - * - * \return \p true if the requested signal was received - * \p false on timeout - */ -static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0) -{ - QEventLoop loop; - QObject::connect(obj, signal, &loop, SLOT(quit())); - QTimer timer; - QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); - if (timeout > 0) { - QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); - timer.setSingleShot(true); - timer.start(timeout); - } - loop.exec(); - return timeoutSpy.isEmpty(); -} - class tst_QWebElement : public QObject { Q_OBJECT @@ -576,9 +553,8 @@ void tst_QWebElement::style() "</body>"; // in few seconds, the CSS should be completey loaded - QSignalSpy spy(m_page, SIGNAL(loadFinished(bool))); m_mainFrame->setHtml(html6); - QTest::qWait(200); + waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200); p = m_mainFrame->documentElement().findAll("p").at(0); QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue")); @@ -596,7 +572,7 @@ void tst_QWebElement::style() // in few seconds, the style should be completey loaded m_mainFrame->setHtml(html7); - QTest::qWait(200); + waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200); p = m_mainFrame->documentElement().findAll("p").at(0); QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black")); diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc b/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc new file mode 100644 index 0000000..7384c76 --- /dev/null +++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc @@ -0,0 +1,7 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> +<file alias="style.css">resources/style.css</file> +<file alias="style2.css">resources/style2.css</file> +<file alias="image.png">resources/image.png</file> +</qresource> +</RCC> diff --git a/WebKit/qt/tests/qwebframe/qwebframe.pro b/WebKit/qt/tests/qwebframe/qwebframe.pro index b8734cd..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebframe/qwebframe.pro +++ b/WebKit/qt/tests/qwebframe/qwebframe.pro @@ -1,13 +1 @@ -TEMPLATE = app -TARGET = tst_qwebframe -include(../../../../WebKit.pri) -SOURCES += tst_qwebframe.cpp -RESOURCES += qwebframe.qrc -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\" - -symbian { - TARGET.UID3 = 0xA000E53D - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebframe/qwebframe.qrc b/WebKit/qt/tests/qwebframe/qwebframe.qrc deleted file mode 100644 index 9615e27..0000000 --- a/WebKit/qt/tests/qwebframe/qwebframe.qrc +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/"> -<file>image.png</file> -<file>style.css</file> -<file>test1.html</file> -<file>test2.html</file> -</qresource> -</RCC> diff --git a/WebKit/qt/tests/qwebframe/image.png b/WebKit/qt/tests/qwebframe/resources/image.png Binary files differindex 8d70364..8d70364 100644 --- a/WebKit/qt/tests/qwebframe/image.png +++ b/WebKit/qt/tests/qwebframe/resources/image.png diff --git a/WebKit/qt/tests/qwebframe/style.css b/WebKit/qt/tests/qwebframe/resources/style.css index c05b747..c05b747 100644 --- a/WebKit/qt/tests/qwebframe/style.css +++ b/WebKit/qt/tests/qwebframe/resources/style.css diff --git a/WebKit/qt/tests/qwebframe/test1.html b/WebKit/qt/tests/qwebframe/resources/test1.html index b323f96..b323f96 100644 --- a/WebKit/qt/tests/qwebframe/test1.html +++ b/WebKit/qt/tests/qwebframe/resources/test1.html diff --git a/WebKit/qt/tests/qwebframe/test2.html b/WebKit/qt/tests/qwebframe/resources/test2.html index 63ac1f6..63ac1f6 100644 --- a/WebKit/qt/tests/qwebframe/test2.html +++ b/WebKit/qt/tests/qwebframe/resources/test2.html diff --git a/WebKit/qt/tests/qwebframe/resources/testiframe.html b/WebKit/qt/tests/qwebframe/resources/testiframe.html new file mode 100644 index 0000000..203d3d3 --- /dev/null +++ b/WebKit/qt/tests/qwebframe/resources/testiframe.html @@ -0,0 +1,54 @@ +</html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#header {
+ background: #0f0;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 100px;
+}
+#content1 {
+ background: #ff0;
+ position: absolute;
+ top: 101px;
+ left: 0px;
+ width: 400px;
+ height: 400px;
+ overflow: scroll;
+}
+#content2 {
+ background: #ff7;
+ position: absolute;
+ top: 101px;
+ left: 401px;
+ width: 400px;
+ height: 400px;
+}
+#footer {
+ background: #0f0;
+ position: absolute;
+ top: 502px;
+ left: 0px;
+ width: 800px;
+ height: 200px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="header"></div>
+<div id="content1">You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.</div>
+<iframe id="content2" name="control" src="testiframe2.html"> </iframe>
+<div id="footer"></div>
+</body>
+</html>
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebframe/resources/testiframe2.html b/WebKit/qt/tests/qwebframe/resources/testiframe2.html new file mode 100644 index 0000000..0d3a22f --- /dev/null +++ b/WebKit/qt/tests/qwebframe/resources/testiframe2.html @@ -0,0 +1,21 @@ +</html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#content {
+ background: #fff;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 800px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="content"> </div>
+</body>
+</html>
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 7c13fd0..0fb0bd6 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -38,10 +38,6 @@ #endif #include "../util.h" -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -#endif - struct CustomType { QString string; }; @@ -550,6 +546,7 @@ private slots: void enumerate(); void objectDeleted(); void typeConversion(); + void arrayObjectEnumerable(); void symmetricUrl(); void progressSignal(); void urlChange(); @@ -575,6 +572,9 @@ private slots: void scrollPosition(); void evaluateWillCauseRepaint(); void qObjectWrapperWithSameIdentity(); + void scrollRecursively(); + void introspectQtMethods_data(); + void introspectQtMethods(); private: QString evalJS(const QString&s) { @@ -675,7 +675,6 @@ void tst_QWebFrame::init() m_page = m_view->page(); m_myObject = new MyQObject(); m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject); - QDir::setCurrent(SRCDIR); } void tst_QWebFrame::cleanup() @@ -2070,6 +2069,31 @@ void tst_QWebFrame::typeConversion() // ### RegExps } +class StringListTestObject : public QObject { + Q_OBJECT +public Q_SLOTS: + QVariant stringList() + { + return QStringList() << "Q" << "t"; + }; +}; + +void tst_QWebFrame::arrayObjectEnumerable() +{ + QWebPage page; + QWebFrame* frame = page.mainFrame(); + QObject* qobject = new StringListTestObject(); + frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership); + + const QString script("var stringArray = test.stringList();" + "var result = '';" + "for (var i in stringArray) {" + " result += stringArray[i];" + "}" + "result;"); + QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt")); +} + void tst_QWebFrame::symmetricUrl() { QVERIFY(m_view->url().isEmpty()); @@ -2350,6 +2374,11 @@ void tst_QWebFrame::setHtmlWithResource() void tst_QWebFrame::setHtmlWithBaseURL() { + if (!QDir(TESTS_SOURCE_DIR).exists()) + QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); + + QDir::setCurrent(TESTS_SOURCE_DIR); + QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>"); QWebPage page; @@ -2358,7 +2387,7 @@ void tst_QWebFrame::setHtmlWithBaseURL() // in few seconds, the image should be completey loaded QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); - frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath())); + frame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); QCOMPARE(spy.count(), 1); @@ -2464,6 +2493,7 @@ void tst_QWebFrame::popupFocus() QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25)); QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup"); QComboBox* combo = qobject_cast<QComboBox*>(webpopup); + QVERIFY(combo != 0); QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup // hide the popup and check if focus is on the page @@ -2719,7 +2749,11 @@ void tst_QWebFrame::evaluateWillCauseRepaint() view.setHtml(html); view.show(); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(&view); +#else + QTest::qWait(2000); +#endif view.page()->mainFrame()->evaluateJavaScript( "document.getElementById('junk').style.display = 'none';"); @@ -2765,5 +2799,111 @@ void tst_QWebFrame::qObjectWrapperWithSameIdentity() QCOMPARE(mainFrame->toPlainText(), QString("test2")); } +void tst_QWebFrame::scrollRecursively() +{ + // The test content is + // a nested frame set + // The main frame scrolls + // and has two children + // an iframe and a div overflow + // both scroll + QWebView webView; + QWebPage* webPage = webView.page(); + QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool))); + QUrl url = QUrl("qrc:///testiframe.html"); + webPage->mainFrame()->load(url); + QTRY_COMPARE(loadSpy.count(), 1); + + QList<QWebFrame*> children = webPage->mainFrame()->childFrames(); + QVERIFY(children.count() == 1); + + // 1st test + // call scrollRecursively over mainframe + // verify scrolled + // verify scroll postion changed + QPoint scrollPosition(webPage->mainFrame()->scrollPosition()); + QVERIFY(webPage->mainFrame()->scrollRecursively(10, 10)); + QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition()); + + // 2nd test + // call scrollRecursively over child iframe + // verify scrolled + // verify child scroll position changed + // verify parent's scroll position did not change + scrollPosition = webPage->mainFrame()->scrollPosition(); + QPoint childScrollPosition = children.at(0)->scrollPosition(); + QVERIFY(children.at(0)->scrollRecursively(10, 10)); + QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition()); + QVERIFY(childScrollPosition != children.at(0)->scrollPosition()); + + // 3rd test + // call scrollRecursively over div overflow + // verify scrolled == true + // verify parent and child frame's scroll postion did not change + QWebElement div = webPage->mainFrame()->documentElement().findFirst("#content1"); + QMouseEvent evpres(QEvent::MouseMove, div.geometry().center(), Qt::NoButton, Qt::NoButton, Qt::NoModifier); + webPage->event(&evpres); + scrollPosition = webPage->mainFrame()->scrollPosition(); + childScrollPosition = children.at(0)->scrollPosition(); + QVERIFY(webPage->mainFrame()->scrollRecursively(5, 5)); + QVERIFY(childScrollPosition == children.at(0)->scrollPosition()); + QVERIFY(scrollPosition == webPage->mainFrame()->scrollPosition()); + + // 4th test + // call scrollRecursively twice over childs iframe + // verify scrolled == true first time + // verify parent's scroll == true second time + // verify parent and childs scroll position changed + childScrollPosition = children.at(0)->scrollPosition(); + QVERIFY(children.at(0)->scrollRecursively(-10, -10)); + QVERIFY(childScrollPosition != children.at(0)->scrollPosition()); + scrollPosition = webPage->mainFrame()->scrollPosition(); + QVERIFY(children.at(0)->scrollRecursively(-10, -10)); + QVERIFY(scrollPosition != webPage->mainFrame()->scrollPosition()); + +} + +void tst_QWebFrame::introspectQtMethods_data() +{ + QTest::addColumn<QString>("objectExpression"); + QTest::addColumn<QString>("methodName"); + QTest::addColumn<QStringList>("expectedPropertyNames"); + + QTest::newRow("myObject.mySignal") + << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name"); + QTest::newRow("myObject.mySlot") + << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name"); + QTest::newRow("myObject.myInvokable") + << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name"); + QTest::newRow("myObject.mySignal.connect") + << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name"); + QTest::newRow("myObject.mySignal.disconnect") + << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name"); +} + +void tst_QWebFrame::introspectQtMethods() +{ + QFETCH(QString, objectExpression); + QFETCH(QString, methodName); + QFETCH(QStringList, expectedPropertyNames); + + QString methodLookup = QString::fromLatin1("%0['%1']").arg(objectExpression).arg(methodName); + QCOMPARE(evalJSV(QString::fromLatin1("Object.getOwnPropertyNames(%0).sort()").arg(methodLookup)).toStringList(), expectedPropertyNames); + + for (int i = 0; i < expectedPropertyNames.size(); ++i) { + QString name = expectedPropertyNames.at(i); + QCOMPARE(evalJS(QString::fromLatin1("%0.hasOwnProperty('%1')").arg(methodLookup).arg(name)), sTrue); + evalJS(QString::fromLatin1("var descriptor = Object.getOwnPropertyDescriptor(%0, '%1')").arg(methodLookup).arg(name)); + QCOMPARE(evalJS("typeof descriptor"), QString::fromLatin1("object")); + QCOMPARE(evalJS("descriptor.get"), sUndefined); + QCOMPARE(evalJS("descriptor.set"), sUndefined); + QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue); + QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse); + QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse); + } + + QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty()); +} + QTEST_MAIN(tst_QWebFrame) #include "tst_qwebframe.moc" diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc b/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc new file mode 100644 index 0000000..2a7d0b9 --- /dev/null +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc @@ -0,0 +1,10 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> +<file alias="image.png">resources/image.png</file> +<file alias="style.css">resources/style.css</file> +<file alias="test1.html">resources/test1.html</file> +<file alias="test2.html">resources/test2.html</file> +<file alias="testiframe.html">resources/testiframe.html</file> +<file alias="testiframe2.html">resources/testiframe2.html</file> +</qresource> +</RCC> diff --git a/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/WebKit/qt/tests/qwebhistory/qwebhistory.pro index 7445e3b..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebhistory/qwebhistory.pro +++ b/WebKit/qt/tests/qwebhistory/qwebhistory.pro @@ -1,12 +1 @@ -TEMPLATE = app -TARGET = tst_qwebhistory -include(../../../../WebKit.pri) -SOURCES += tst_qwebhistory.cpp -RESOURCES += tst_qwebhistory.qrc -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E53B - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebhistory/data/page1.html b/WebKit/qt/tests/qwebhistory/resources/page1.html index 82fa4af..82fa4af 100644 --- a/WebKit/qt/tests/qwebhistory/data/page1.html +++ b/WebKit/qt/tests/qwebhistory/resources/page1.html diff --git a/WebKit/qt/tests/qwebhistory/data/page2.html b/WebKit/qt/tests/qwebhistory/resources/page2.html index 5307bdc..5307bdc 100644 --- a/WebKit/qt/tests/qwebhistory/data/page2.html +++ b/WebKit/qt/tests/qwebhistory/resources/page2.html diff --git a/WebKit/qt/tests/qwebhistory/data/page3.html b/WebKit/qt/tests/qwebhistory/resources/page3.html index 4e5547c..4e5547c 100644 --- a/WebKit/qt/tests/qwebhistory/data/page3.html +++ b/WebKit/qt/tests/qwebhistory/resources/page3.html diff --git a/WebKit/qt/tests/qwebhistory/data/page4.html b/WebKit/qt/tests/qwebhistory/resources/page4.html index 3c57aed..3c57aed 100644 --- a/WebKit/qt/tests/qwebhistory/data/page4.html +++ b/WebKit/qt/tests/qwebhistory/resources/page4.html diff --git a/WebKit/qt/tests/qwebhistory/data/page5.html b/WebKit/qt/tests/qwebhistory/resources/page5.html index 8593552..8593552 100644 --- a/WebKit/qt/tests/qwebhistory/data/page5.html +++ b/WebKit/qt/tests/qwebhistory/resources/page5.html diff --git a/WebKit/qt/tests/qwebhistory/data/page6.html b/WebKit/qt/tests/qwebhistory/resources/page6.html index c5bbc6f..c5bbc6f 100644 --- a/WebKit/qt/tests/qwebhistory/data/page6.html +++ b/WebKit/qt/tests/qwebhistory/resources/page6.html diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp index ec2d497..e967dcc 100644 --- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp +++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp @@ -37,7 +37,7 @@ public: protected : void loadPage(int nr) { - frame->load(QUrl("qrc:/data/page" + QString::number(nr) + ".html")); + frame->load(QUrl("qrc:/resources/page" + QString::number(nr) + ".html")); waitForLoadFinished.exec(); } diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc index 7c5ff0e..6e2f50a 100644 --- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc +++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc @@ -1,11 +1,11 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource> - <file>data/page1.html</file> - <file>data/page2.html</file> - <file>data/page3.html</file> - <file>data/page4.html</file> - <file>data/page5.html</file> - <file>data/page6.html</file> + <file>resources/page1.html</file> + <file>resources/page2.html</file> + <file>resources/page3.html</file> + <file>resources/page4.html</file> + <file>resources/page5.html</file> + <file>resources/page6.html</file> </qresource> </RCC> diff --git a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro index 764f806..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro +++ b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro @@ -1,11 +1 @@ -TEMPLATE = app -TARGET = tst_qwebhistoryinterface -include(../../../../WebKit.pri) -SOURCES += tst_qwebhistoryinterface.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E53C - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/WebKit/qt/tests/qwebinspector/qwebinspector.pro index 520887e..e99c7f4 100644 --- a/WebKit/qt/tests/qwebinspector/qwebinspector.pro +++ b/WebKit/qt/tests/qwebinspector/qwebinspector.pro @@ -1,6 +1 @@ -TEMPLATE = app -TARGET = tst_qwebinspector -include(../../../../WebKit.pri) -SOURCES += tst_qwebinspector.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR +include(../tests.pri) diff --git a/WebKit/qt/tests/qwebpage/qwebpage.pro b/WebKit/qt/tests/qwebpage/qwebpage.pro index 7853b28..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebpage/qwebpage.pro +++ b/WebKit/qt/tests/qwebpage/qwebpage.pro @@ -1,13 +1 @@ -TEMPLATE = app -TARGET = tst_qwebpage -include(../../../../WebKit.pri) -SOURCES += tst_qwebpage.cpp -RESOURCES += tst_qwebpage.qrc -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" - -symbian { - TARGET.UID3 = 0xA000E53E - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebpage/frametest/frame_a.html b/WebKit/qt/tests/qwebpage/resources/frame_a.html index 9ff68f1..9ff68f1 100644 --- a/WebKit/qt/tests/qwebpage/frametest/frame_a.html +++ b/WebKit/qt/tests/qwebpage/resources/frame_a.html diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe.html b/WebKit/qt/tests/qwebpage/resources/iframe.html index f17027c..f17027c 100644 --- a/WebKit/qt/tests/qwebpage/frametest/iframe.html +++ b/WebKit/qt/tests/qwebpage/resources/iframe.html diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe2.html b/WebKit/qt/tests/qwebpage/resources/iframe2.html index 5017435..5017435 100644 --- a/WebKit/qt/tests/qwebpage/frametest/iframe2.html +++ b/WebKit/qt/tests/qwebpage/resources/iframe2.html diff --git a/WebKit/qt/tests/qwebpage/frametest/iframe3.html b/WebKit/qt/tests/qwebpage/resources/iframe3.html index ed6ac5b..ed6ac5b 100644 --- a/WebKit/qt/tests/qwebpage/frametest/iframe3.html +++ b/WebKit/qt/tests/qwebpage/resources/iframe3.html diff --git a/WebKit/qt/tests/qwebpage/frametest/index.html b/WebKit/qt/tests/qwebpage/resources/index.html index c53ad09..c53ad09 100644 --- a/WebKit/qt/tests/qwebpage/frametest/index.html +++ b/WebKit/qt/tests/qwebpage/resources/index.html diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 2a52631..f48fb73 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -1,6 +1,7 @@ /* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> + Copyright (C) 2010 Holger Hans Peter Freyther This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -18,72 +19,24 @@ Boston, MA 02110-1301, USA. */ - +#include "../util.h" +#include <QDir> +#include <QGraphicsWidget> +#include <QLineEdit> +#include <QMenu> +#include <QPushButton> #include <QtTest/QtTest> - #include <qgraphicsscene.h> #include <qgraphicsview.h> #include <qgraphicswebview.h> +#include <qnetworkrequest.h> +#include <qwebdatabase.h> #include <qwebelement.h> -#include <qwebpage.h> -#include <qwidget.h> -#include <QGraphicsWidget> -#include <qwebview.h> #include <qwebframe.h> #include <qwebhistory.h> -#include <qnetworkrequest.h> -#include <QDebug> -#include <QLineEdit> -#include <QMenu> +#include <qwebpage.h> #include <qwebsecurityorigin.h> -#include <qwebdatabase.h> -#include <QPushButton> -#include <QDir> - -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -#endif - -// Will try to wait for the condition while allowing event processing -#define QTRY_COMPARE(__expr, __expected) \ - do { \ - const int __step = 50; \ - const int __timeout = 5000; \ - if ((__expr) != (__expected)) { \ - QTest::qWait(0); \ - } \ - for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \ - QTest::qWait(__step); \ - } \ - QCOMPARE(__expr, __expected); \ - } while(0) - -//TESTED_CLASS= -//TESTED_FILES= - -// Task 160192 -/** - * Starts an event loop that runs until the given signal is received. - Optionally the event loop - * can return earlier on a timeout. - * - * \return \p true if the requested signal was received - * \p false on timeout - */ -static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) -{ - QEventLoop loop; - QObject::connect(obj, signal, &loop, SLOT(quit())); - QTimer timer; - QSignalSpy timeoutSpy(&timer, SIGNAL(timeout())); - if (timeout > 0) { - QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); - timer.setSingleShot(true); - timer.start(timeout); - } - loop.exec(); - return timeoutSpy.isEmpty(); -} +#include <qwebview.h> class EventSpy : public QObject, public QList<QEvent::Type> { @@ -156,6 +109,7 @@ private slots: void screenshot(); void originatingObjectInNetworkRequests(); + void testJSPrompt(); private: QWebView* m_view; @@ -270,10 +224,8 @@ void tst_QWebPage::loadFinished() "<frame src=\"data:text/html,bar\"></frameset>"), QUrl()); QTRY_COMPARE(spyLoadFinished.count(), 1); - QTest::qWait(3000); - - QVERIFY(spyLoadStarted.count() > 1); - QVERIFY(spyLoadFinished.count() > 1); + QTRY_VERIFY(spyLoadStarted.count() > 1); + QTRY_VERIFY(spyLoadFinished.count() > 1); spyLoadFinished.clear(); @@ -520,7 +472,6 @@ void tst_QWebPage::database() // Remove removed test :-) QWebDatabase::removeAllDatabases(); QVERIFY(!origin.databases().size()); - QTest::qWait(1000); } class PluginPage : public QWebPage @@ -1275,7 +1226,7 @@ void tst_QWebPage::backActionUpdate() QAction *action = page->action(QWebPage::Back); QVERIFY(!action->isEnabled()); QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool))); - QUrl url = QUrl("qrc:///frametest/index.html"); + QUrl url = QUrl("qrc:///resources/index.html"); page->mainFrame()->load(url); QTRY_COMPARE(loadSpy.count(), 1); QVERIFY(!action->isEnabled()); @@ -1306,7 +1257,7 @@ void tst_QWebPage::frameAt() QWebView webView; QWebPage* webPage = webView.page(); QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool))); - QUrl url = QUrl("qrc:///frametest/iframe.html"); + QUrl url = QUrl("qrc:///resources/iframe.html"); webPage->mainFrame()->load(url); QTRY_COMPARE(loadSpy.count(), 1); frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos()); @@ -1373,6 +1324,7 @@ void tst_QWebPage::inputMethods() else QVERIFY2(false, "Unknown view type"); + page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); page->mainFrame()->setHtml("<html><body>" \ "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \ "<input type='password'/>" \ @@ -1408,7 +1360,7 @@ void tst_QWebPage::inputMethods() //ImFont variant = page->inputMethodQuery(Qt::ImFont); QFont font = variant.value<QFont>(); - QCOMPARE(QString("-webkit-serif"), font.family()); + QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family()); QList<QInputMethodEvent::Attribute> inputAttributes; @@ -1599,16 +1551,14 @@ void tst_QWebPage::testEnablePersistentStorage() QWebSettings::enablePersistentStorage(); - // Give it some time to initialize - icon database needs it - QTest::qWait(1000); - QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true); - QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true); - QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true); + QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true); + QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true); + QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true); - QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty()); - QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty()); - QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty()); + QTRY_VERIFY(!webPage.settings()->offlineStoragePath().isEmpty()); + QTRY_VERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty()); + QTRY_VERIFY(!webPage.settings()->iconDatabasePath().isEmpty()); } void tst_QWebPage::defaultTextEncoding() @@ -1676,20 +1626,17 @@ void tst_QWebPage::errorPageExtension() QCOMPARE(page->history()->canGoForward(), false); page->triggerAction(QWebPage::Back); - QTest::qWait(2000); - QCOMPARE(page->history()->canGoBack(), false); - QCOMPARE(page->history()->canGoForward(), true); + QTRY_COMPARE(page->history()->canGoBack(), false); + QTRY_COMPARE(page->history()->canGoForward(), true); page->triggerAction(QWebPage::Forward); - QTest::qWait(2000); - QCOMPARE(page->history()->canGoBack(), true); - QCOMPARE(page->history()->canGoForward(), false); + QTRY_COMPARE(page->history()->canGoBack(), true); + QTRY_COMPARE(page->history()->canGoForward(), false); page->triggerAction(QWebPage::Back); - QTest::qWait(2000); - QCOMPARE(page->history()->canGoBack(), false); - QCOMPARE(page->history()->canGoForward(), true); - QCOMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo")); + QTRY_COMPARE(page->history()->canGoBack(), false); + QTRY_COMPARE(page->history()->canGoForward(), true); + QTRY_COMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo")); m_view->setPage(0); } @@ -1716,7 +1663,7 @@ void tst_QWebPage::errorPageExtensionInFrameset() ErrorPage* page = new ErrorPage; m_view->setPage(page); - m_view->load(QUrl("qrc:///frametest/index.html")); + m_view->load(QUrl("qrc:///resources/index.html")); QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); QTRY_COMPARE(spyLoadFinished.count(), 1); @@ -1765,17 +1712,17 @@ void tst_QWebPage::screenshot_data() void tst_QWebPage::screenshot() { - QDir::setCurrent(SRCDIR); + if (!QDir(TESTS_SOURCE_DIR).exists()) + QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); + + QDir::setCurrent(TESTS_SOURCE_DIR); QFETCH(QString, html); QWebPage* page = new QWebPage; page->settings()->setAttribute(QWebSettings::PluginsEnabled, true); QWebFrame* mainFrame = page->mainFrame(); - mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath())); - if (html.contains("</embed>")) { - // some reasonable time for the PluginStream to feed test.swf to flash and start painting - QTest::qWait(2000); - } + mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); + ::waitForSignal(mainFrame, SIGNAL(loadFinished(bool)), 2000); // take screenshot without a view takeScreenshot(page); @@ -1814,5 +1761,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests() #endif } +/** + * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914 + * + * From JS we test the following conditions. + * + * OK + QString() => SUCCESS, empty string (but not null) + * OK + "text" => SUCCESS, "text" + * CANCEL + QString() => CANCEL, null string + * CANCEL + "text" => CANCEL, null string + */ +class JSPromptPage : public QWebPage { + Q_OBJECT +public: + JSPromptPage() + {} + + bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result) + { + if (msg == QLatin1String("test1")) { + *result = QString(); + return true; + } else if (msg == QLatin1String("test2")) { + *result = QLatin1String("text"); + return true; + } else if (msg == QLatin1String("test3")) { + *result = QString(); + return false; + } else if (msg == QLatin1String("test4")) { + *result = QLatin1String("text"); + return false; + } + + qFatal("Unknown msg."); + return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result); + } +}; + +void tst_QWebPage::testJSPrompt() +{ + JSPromptPage page; + bool res; + + // OK + QString() + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test1');" + "retval=='' && retval.length == 0;").toBool(); + QVERIFY(res); + + // OK + "text" + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test2');" + "retval=='text' && retval.length == 4;").toBool(); + QVERIFY(res); + + // Cancel + QString() + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test3');" + "retval===null;").toBool(); + QVERIFY(res); + + // Cancel + "text" + res = page.mainFrame()->evaluateJavaScript( + "var retval = prompt('test4');" + "retval===null;").toBool(); + QVERIFY(res); +} + QTEST_MAIN(tst_QWebPage) #include "tst_qwebpage.moc" diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc b/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc index 3085ce2..0627cb4 100644 --- a/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc +++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc @@ -1,10 +1,10 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource> - <file>frametest/index.html</file> - <file>frametest/frame_a.html</file> - <file>frametest/iframe.html</file> - <file>frametest/iframe2.html</file> - <file>frametest/iframe3.html</file> + <file>resources/index.html</file> + <file>resources/frame_a.html</file> + <file>resources/iframe.html</file> + <file>resources/iframe2.html</file> + <file>resources/iframe3.html</file> </qresource> </RCC> diff --git a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro index 569146a..e99c7f4 100644 --- a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro +++ b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro @@ -1,11 +1 @@ -TEMPLATE = app -TARGET = tst_qwebplugindatabase -include(../../../../WebKit.pri) -SOURCES += tst_qwebplugindatabase.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR - -symbian { - TARGET.UID3 = 0xA000E540 - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri) diff --git a/WebKit/qt/tests/qwebview/qwebview.pro b/WebKit/qt/tests/qwebview/qwebview.pro index 735537b..4ca2bf6 100644 --- a/WebKit/qt/tests/qwebview/qwebview.pro +++ b/WebKit/qt/tests/qwebview/qwebview.pro @@ -1,13 +1 @@ -TEMPLATE = app -TARGET = tst_qwebview -include(../../../../WebKit.pri) -SOURCES += tst_qwebview.cpp -QT += testlib network -QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -RESOURCES += tst_qwebview.qrc -DEFINES += SRCDIR=\\\"$$PWD/\\\" - -symbian { - TARGET.UID3 = 0xA000E53F - TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices -} +include(../tests.pri)
\ No newline at end of file diff --git a/WebKit/qt/tests/qwebview/data/frame_a.html b/WebKit/qt/tests/qwebview/resources/frame_a.html index 9ff68f1..9ff68f1 100644 --- a/WebKit/qt/tests/qwebview/data/frame_a.html +++ b/WebKit/qt/tests/qwebview/resources/frame_a.html diff --git a/WebKit/qt/tests/qwebview/data/index.html b/WebKit/qt/tests/qwebview/resources/index.html index c53ad09..c53ad09 100644 --- a/WebKit/qt/tests/qwebview/data/index.html +++ b/WebKit/qt/tests/qwebview/resources/index.html diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp index bd2f185..ebcf4bb 100644 --- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp +++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp @@ -30,6 +30,8 @@ #include <qwebkitversion.h> #include <qwebframe.h> +#include <QDebug> + class tst_QWebView : public QObject { Q_OBJECT @@ -121,7 +123,10 @@ void tst_QWebView::reusePage_data() void tst_QWebView::reusePage() { - QDir::setCurrent(SRCDIR); + if (!QDir(TESTS_SOURCE_DIR).exists()) + QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll); + + QDir::setCurrent(TESTS_SOURCE_DIR); QFETCH(QString, html); QWebView* view1 = new QWebView; @@ -129,21 +134,29 @@ void tst_QWebView::reusePage() view1->setPage(page); page->settings()->setAttribute(QWebSettings::PluginsEnabled, true); QWebFrame* mainFrame = page->mainFrame(); - mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath())); + mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR)); if (html.contains("</embed>")) { // some reasonable time for the PluginStream to feed test.swf to flash and start painting waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000); } view1->show(); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(view1); +#else + QTest::qWait(2000); +#endif delete view1; QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view QWebView *view2 = new QWebView; view2->setPage(page); view2->show(); // in Windowless mode, you should still be able to see the plugin here +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTest::qWaitForWindowShown(view2); +#else + QTest::qWait(2000); +#endif delete view2; delete page; // must not crash @@ -185,7 +198,7 @@ void tst_QWebView::crashTests() // Test page should have frames. QWebView view; WebViewCrashTest tester(&view); - QUrl url("qrc:///data/index.html"); + QUrl url("qrc:///resources/index.html"); view.load(url); QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed. } diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/WebKit/qt/tests/qwebview/tst_qwebview.qrc index ede34a9..5abc64c 100644 --- a/WebKit/qt/tests/qwebview/tst_qwebview.qrc +++ b/WebKit/qt/tests/qwebview/tst_qwebview.qrc @@ -1,7 +1,7 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource> - <file>data/index.html</file> - <file>data/frame_a.html</file> + <file>resources/index.html</file> + <file>resources/frame_a.html</file> </qresource> </RCC> diff --git a/WebKit/qt/tests/qwebframe/resources/image2.png b/WebKit/qt/tests/resources/image2.png Binary files differindex 8d70364..8d70364 100644 --- a/WebKit/qt/tests/qwebframe/resources/image2.png +++ b/WebKit/qt/tests/resources/image2.png diff --git a/WebKit/qt/tests/tests.pri b/WebKit/qt/tests/tests.pri new file mode 100644 index 0000000..c3d7755 --- /dev/null +++ b/WebKit/qt/tests/tests.pri @@ -0,0 +1,20 @@ +TEMPLATE = app +CONFIG -= app_bundle + +TARGET = tst_$$TARGET +SOURCES += $$_PRO_FILE_PWD_/$${TARGET}.cpp + +exists($$_PRO_FILE_PWD_/$${TARGET}.qrc):RESOURCES += $$_PRO_FILE_PWD_/$${TARGET}.qrc + +include(../../../WebKit.pri) +QT += testlib network + +QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR + +symbian { + TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices +} + +# This define is used by some tests to look up resources in the source tree +!symbian: DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\" + diff --git a/WebKit/qt/tests/tests.pro b/WebKit/qt/tests/tests.pro index b967ca9..5e19202 100644 --- a/WebKit/qt/tests/tests.pro +++ b/WebKit/qt/tests/tests.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector -greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro +SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap +greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting benchmarks/loading diff --git a/WebKit/qt/tests/util.h b/WebKit/qt/tests/util.h index 15af262..c61bc6b 100644 --- a/WebKit/qt/tests/util.h +++ b/WebKit/qt/tests/util.h @@ -22,6 +22,10 @@ #include <QSignalSpy> #include <QTimer> +#if !defined(TESTS_SOURCE_DIR) +#define TESTS_SOURCE_DIR "" +#endif + /** * Starts an event loop that runs until the given signal is received. * Optionally the event loop diff --git a/WebKit/win/AccessibleBase.cpp b/WebKit/win/AccessibleBase.cpp index 47b8369..0704771 100644 --- a/WebKit/win/AccessibleBase.cpp +++ b/WebKit/win/AccessibleBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +29,8 @@ #include "AccessibleImage.h" #include "WebView.h" +#include <WebCore/AccessibilityListBox.h> +#include <WebCore/AccessibilityMenuListPopup.h> #include <WebCore/AccessibilityObject.h> #include <WebCore/AXObjectCache.h> #include <WebCore/BString.h> @@ -75,15 +77,30 @@ AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj) return new AccessibleBase(obj); } +HRESULT AccessibleBase::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) +{ + if (!IsEqualGUID(guidService, SID_AccessibleComparable)) { + *ppvObject = 0; + return E_INVALIDARG; + } + return QueryInterface(riid, ppvObject); +} + // IUnknown HRESULT STDMETHODCALLTYPE AccessibleBase::QueryInterface(REFIID riid, void** ppvObject) { if (IsEqualGUID(riid, __uuidof(IAccessible))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); else if (IsEqualGUID(riid, __uuidof(IDispatch))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); else if (IsEqualGUID(riid, __uuidof(IUnknown))) - *ppvObject = this; + *ppvObject = static_cast<IAccessible*>(this); + else if (IsEqualGUID(riid, __uuidof(IAccessibleComparable))) + *ppvObject = static_cast<IAccessibleComparable*>(this); + else if (IsEqualGUID(riid, __uuidof(IServiceProvider))) + *ppvObject = static_cast<IServiceProvider*>(this); + else if (IsEqualGUID(riid, __uuidof(AccessibleBase))) + *ppvObject = static_cast<AccessibleBase*>(this); else { *ppvObject = 0; return E_NOINTERFACE; @@ -106,7 +123,17 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accParent(IDispatch** parent) { *parent = 0; - if (!m_object || !m_object->topDocumentFrameView()) + if (!m_object) + return E_FAIL; + + AccessibilityObject* parentObject = m_object->parentObjectUnignored(); + if (parentObject) { + *parent = wrapper(parentObject); + (*parent)->AddRef(); + return S_OK; + } + + if (!m_object->topDocumentFrameView()) return E_FAIL; return WebView::AccessibleObjectFromWindow(m_object->topDocumentFrameView()->hostWindow()->platformPageClient(), @@ -252,9 +279,6 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT* if (childObj->isOffScreen()) pvState->lVal |= STATE_SYSTEM_OFFSCREEN; - if (childObj->isMultiSelect()) - pvState->lVal |= STATE_SYSTEM_MULTISELECTABLE; - if (childObj->isPasswordField()) pvState->lVal |= STATE_SYSTEM_PROTECTED; @@ -276,7 +300,27 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accState(VARIANT vChild, VARIANT* if (childObj->canSetFocusAttribute()) pvState->lVal |= STATE_SYSTEM_FOCUSABLE; - // TODO: Add selected and selectable states. + if (childObj->isSelected()) + pvState->lVal |= STATE_SYSTEM_SELECTED; + + if (childObj->canSetSelectedAttribute()) + pvState->lVal |= STATE_SYSTEM_SELECTABLE; + + if (childObj->isMultiSelectable()) + pvState->lVal |= STATE_SYSTEM_EXTSELECTABLE | STATE_SYSTEM_MULTISELECTABLE; + + if (!childObj->isVisible()) + pvState->lVal |= STATE_SYSTEM_INVISIBLE; + + if (childObj->isCollapsed()) + pvState->lVal |= STATE_SYSTEM_COLLAPSED; + + if (childObj->roleValue() == PopUpButtonRole) { + pvState->lVal |= STATE_SYSTEM_HASPOPUP; + + if (!childObj->isCollapsed()) + pvState->lVal |= STATE_SYSTEM_EXPANDED; + } return S_OK; } @@ -335,9 +379,54 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accKeyboardShortcut(VARIANT vChild return S_OK; } -HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long, VARIANT) +HRESULT STDMETHODCALLTYPE AccessibleBase::accSelect(long selectionFlags, VARIANT vChild) { - return E_NOTIMPL; + // According to MSDN, these combinations are invalid. + if (((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_REMOVESELECTION)) || + ((selectionFlags & (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_ADDSELECTION | SELFLAG_TAKESELECTION)) || + ((selectionFlags & (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION)) || + ((selectionFlags & (SELFLAG_EXTENDSELECTION | SELFLAG_TAKESELECTION)) == (SELFLAG_REMOVESELECTION | SELFLAG_TAKESELECTION))) + return E_INVALIDARG; + + AccessibilityObject* childObject; + HRESULT hr = getAccessibilityObjectForChild(vChild, childObject); + + if (FAILED(hr)) + return hr; + + if (selectionFlags & SELFLAG_TAKEFOCUS) + childObject->setFocused(true); + + AccessibilityObject* parentObject = childObject->parentObject(); + if (!parentObject) + return E_INVALIDARG; + + if (selectionFlags & SELFLAG_TAKESELECTION) { + if (parentObject->isListBox()) { + Vector<RefPtr<AccessibilityObject> > selectedChildren(1); + selectedChildren[0] = childObject; + static_cast<AccessibilityListBox*>(parentObject)->setSelectedChildren(selectedChildren); + } else if (parentObject->isMenuListPopup()) + childObject->setSelected(true); + else + return E_INVALIDARG; + } + + // MSDN says that ADD, REMOVE, and EXTENDSELECTION are invalid for + // single-select. + if (!parentObject->isMultiSelectable()) + return E_INVALIDARG; + + if (selectionFlags & SELFLAG_ADDSELECTION) + childObject->setSelected(true); + + if (selectionFlags & SELFLAG_REMOVESELECTION) + childObject->setSelected(false); + + // FIXME: Should implement SELFLAG_EXTENDSELECTION. For now, we just return + // S_OK, matching Firefox. + + return S_OK; } HRESULT STDMETHODCALLTYPE AccessibleBase::get_accSelection(VARIANT*) @@ -405,7 +494,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, lon if (!childObj->documentFrameView()) return E_FAIL; - IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->boundingBoxRect())); + IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect())); *left = screenRect.x(); *top = screenRect.y(); *width = screenRect.width(); @@ -542,8 +631,9 @@ static long MSAARole(AccessibilityRole role) return ROLE_SYSTEM_PAGETABLIST; case WebCore::TextFieldRole: case WebCore::TextAreaRole: - case WebCore::ListMarkerRole: + case WebCore::EditableTextRole: return ROLE_SYSTEM_TEXT; + case WebCore::ListMarkerRole: case WebCore::StaticTextRole: return ROLE_SYSTEM_STATICTEXT; case WebCore::OutlineRole: @@ -555,6 +645,8 @@ static long MSAARole(AccessibilityRole role) case WebCore::GroupRole: return ROLE_SYSTEM_GROUPING; case WebCore::ListRole: + case WebCore::ListBoxRole: + case WebCore::MenuListPopupRole: return ROLE_SYSTEM_LIST; case WebCore::TableRole: return ROLE_SYSTEM_TABLE; @@ -564,6 +656,12 @@ static long MSAARole(AccessibilityRole role) case WebCore::ImageMapRole: case WebCore::ImageRole: return ROLE_SYSTEM_GRAPHIC; + case WebCore::MenuListOptionRole: + case WebCore::ListItemRole: + case WebCore::ListBoxOptionRole: + return ROLE_SYSTEM_LISTITEM; + case WebCore::PopUpButtonRole: + return ROLE_SYSTEM_COMBOBOX; default: // This is the default role for MSAA. return ROLE_SYSTEM_CLIENT; @@ -572,7 +670,7 @@ static long MSAARole(AccessibilityRole role) long AccessibleBase::role() const { - return MSAARole(m_object->roleValue()); + return MSAARole(m_object->roleValueForMSAA()); } HRESULT AccessibleBase::getAccessibilityObjectForChild(VARIANT vChild, AccessibilityObject*& childObj) const @@ -616,3 +714,10 @@ AccessibleBase* AccessibleBase::wrapper(AccessibilityObject* obj) result = createInstance(obj); return result; } + +HRESULT AccessibleBase::isSameObject(IAccessibleComparable* other, BOOL* result) +{ + COMPtr<AccessibleBase> otherAccessibleBase(Query, other); + *result = (otherAccessibleBase == this || otherAccessibleBase->m_object == m_object); + return S_OK; +} diff --git a/WebKit/win/AccessibleBase.h b/WebKit/win/AccessibleBase.h index 3b6bce8..ca1703f 100644 --- a/WebKit/win/AccessibleBase.h +++ b/WebKit/win/AccessibleBase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,14 +26,18 @@ #ifndef AccessibleBase_h #define AccessibleBase_h -#include <oleacc.h> #include <WebCore/AccessibilityObject.h> #include <WebCore/AccessibilityObjectWrapperWin.h> +#include <WebKit/WebKit.h> +#include <oleacc.h> -class AccessibleBase : public IAccessible, public WebCore::AccessibilityObjectWrapper { +class DECLSPEC_UUID("3dbd565b-db22-4d88-8e0e-778bde54524a") AccessibleBase : public IAccessibleComparable, public IServiceProvider, public WebCore::AccessibilityObjectWrapper { public: static AccessibleBase* createInstance(WebCore::AccessibilityObject*); + // IServiceProvider + virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppv); + // IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++m_refCount; } @@ -89,6 +93,9 @@ public: m_object = 0; } + // IAccessibleComparable + virtual HRESULT STDMETHODCALLTYPE isSameObject(IAccessibleComparable* other, BOOL* result); + protected: AccessibleBase(WebCore::AccessibilityObject*); virtual ~AccessibleBase(); diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index 9ea12f6..e661272 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,785 @@ +<<<<<<< HEAD +======= +2010-01-29 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Drag and Drop: Windows uses "stop" sign as cursor when dragging + https://bugs.webkit.org/show_bug.cgi?id=34305 + <rdar://problem/7589672> + + Add a preference in WebKit (that defaults to false), for whether or not + we should show the custom cursors during drag and drop. However, this is + currently only used on Windows, and only used to hide the "drop not allowed" + icon inside the WebView is the preference is set to true. + + This will be off by default, so no change in behavior. + + * Interfaces/IWebPreferencesPrivate.idl: Added new functions. + * Interfaces/WebKit.idl: Touched to force Interfaces build. + * WebDropSource.cpp: + (WebDropSource::GiveFeedback): Implementation of conditional showing cursor + logic. + * WebPreferenceKeysPrivate.h: Added new preference key. + * WebPreferences.cpp: Added new functions. + (WebPreferences::setCustomDragCursorsEnabled): + (WebPreferences::customDragCursorsEnabled): + * WebPreferences.h: Added new functions. + +2010-01-28 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Crash when posting a notification for a detached object + + https://bugs.webkit.org/show_bug.cgi?id=34309 + <rdar://problem/7409759> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::QueryService): + If an unrecognized service ID is passed, return early. Otherwise, return + the result of QueryInterface. + (AccessibleBase::QueryInterface): + Add static_casts. Check for new UUIDs. + (AccessibleBase::isSameObject): + Query the object for AccessibleBase. Return whether the pointers or the + wrapped objects match. + + * AccessibleBase.h: + Give the class a UUID so we can query for it in isSameObject(). Inherit + from IAccessibleComparable; inherit from IServiceProvider so clients can + use QueryService to query for a custom interface. + + * Interfaces/AccessibleComparable.idl: Added. Declares a function that + can be called to compare to accessible objects. + + * Interfaces/WebKit.idl: + Include the new IDL. + + * WebKit.vcproj/Interfaces.vcproj: + Add the new IDL to the project. + +2010-01-27 Aaron Boodman <aa@chromium.org> + + Expand NotificationCenter::checkPermission() interface. + It now passes the full URL instead of just the origin. + + https://bugs.webkit.org/show_bug.cgi?id=34238 + + * WebCoreSupport/WebDesktopNotificationsDelegate.cpp: + (WebDesktopNotificationsDelegate::checkPermission): + * WebCoreSupport/WebDesktopNotificationsDelegate.h: + +2010-01-27 Adam Roben <aroben@apple.com> + + Make it possible to instantiate WebSerializedJSValue using + WebKitCreateInstance + + Reviewed by Dave Hyatt. + + * ForEachCoClass.h: + * WebKitClassFactory.cpp: + Added WebSerializedJSValue. + +2010-01-26 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Oliver Hunt. + + Windows build references non-existent include paths + https://bugs.webkit.org/show_bug.cgi?id=34175 + + * WebKit.vcproj/WebKit.vcproj: + +2010-01-25 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Simon Fraser. + + A WebGeolocationControllerClient is leaked for every WebView + https://bugs.webkit.org/show_bug.cgi?id=34145 + + * WebCoreSupport/WebGeolocationControllerClient.cpp: + (WebGeolocationControllerClient::geolocationDestroyed): Added. + * WebCoreSupport/WebGeolocationControllerClient.h: + +2010-01-23 Dan Bernstein <mitz@apple.com> + + Reviewed by Maciej Stachowiak. + + <rdar://problem/7569820> svg/custom/text-zoom.xhtml fails on Windows + https://bugs.webkit.org/show_bug.cgi?id=34006 + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): Added WebKitZoomsTextOnlyPreferenceKey + with a default value of true. + +2010-01-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Sam Weinig. + + Add missing implementation for WebGeolocationPosition::initWithTimestamp. + + * WebGeolocationPosition.cpp: + (WebGeolocationPosition::initWithTimestamp): Implemented. + +2010-01-20 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: accSelect() is not implemented + + https://bugs.webkit.org/show_bug.cgi?id=33918 + <rdar://problem/7436861> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::accSelect): + If there is an invalid combination of state flags, return early. If the + caller passed the "take focus" flag, focus the object. If the "take + selection" flag was passed, check whether the parent object is an + AccessibilityListBox; if so, call the object's setSelectedChildren() + function. If the parent is an AccessibilityMenuListPopup, call the + child object's setSelected() function. Otherwise, if the parent is some + other, unsupported object, return early. + If the selection flags include "add", "remove", or "extend" selection, + and the parent object is not multi-selectable, return early. Otherwise, + set or unset the child's selected flag based on the passed flag. + +2010-01-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler and Adam Roben. + + Feature defines are difficult to maintain on Windows builds + https://bugs.webkit.org/show_bug.cgi?id=33883 + + FeatureDefines.vsprops are now maintained in a way similar to + Configurations/FeatureDefines.xcconfig, with the added advantage + of having a single FeatureDefines file across all projects. + + * WebKit.vcproj/Interfaces.vcproj: Add FeatureDefines.vsprops inherited property sheet. + * WebKit.vcproj/WebKit.sln: Set up Cairo configuration for WebCoreGenerated. + * WebKit.vcproj/WebKit.vcproj: Remove ENABLE_ preprocessor definitions. + Add FeatureDefines.vsprops inherited property sheet. + * WebKit.vcproj/WebKitGUID.vcproj: Add FeatureDefines.vsprops inherited property sheet. + +2010-01-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: The child <option> elements of a non-multiple <select> are not + exposed + + https://bugs.webkit.org/show_bug.cgi?id=33773 + <rdar://problem/7550556> + + Reviewed by Alice Liu. + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + If the object is invisible, set the invisible state flag. If the object + is collapsed, set the collapsed state. If the object is a combo box, + set the has popup flag, and if it's not collapsed, set the expanded + flag. + (MSAARole): + Add new WebCore to MSAA role mappings. + + * WebCoreLocalizedStrings.cpp: + (WebCore::AXMenuListActionVerb): + Return the action verb that Firefox uses for <select> elements with + popups. + (WebCore::AXMenuListPopupActionVerb): + Return the verb that Firefox uses for a popup list. + +2010-01-19 John Sullivan <sullivan@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=33854 + Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns + more info about where the result was found + + Reviewed by Darin Adler + + * Interfaces/IWebHTMLRepresentation.idl: + Created variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + + * Interfaces/WebKit.idl: + Touched in order to get other idl change to propagate correctly. + + * WebHTMLRepresentation.cpp: + (WebHTMLRepresentation::deprecatedSearchForLabels): + Renamed since iDL doesn't support two functions with the same name but different signatures. + (WebHTMLRepresentation::searchForLabels): + Implemented variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + + * WebHTMLRepresentation.h: + Declared variant of searchForLabels that includes additional in/out parameters resultDistance and resultIsInCellAbove. + +2010-01-19 Adam Roben <aroben@apple.com> + + Windows build fix + + * WebScriptWorld.cpp: Added missing #include. + +2010-01-19 Dave Hyatt <hyatt@apple.com> + + Build bustage fix. Make sure the newly added scriptWorldForGlobalContext function is [local] in the IDL. + + * Interfaces/IWebScriptWorld.idl: + +2010-01-19 Dave Hyatt <hyatt@apple.com> + + Reviewed by Adam Roben. + + Add an API to obtain a WebScriptWorld from a JSGlobalContextRef. + + * Interfaces/IWebScriptWorld.idl: + * WebScriptWorld.cpp: + (WebScriptWorld::scriptWorldForGlobalContext): + * WebScriptWorld.h: + +2010-01-18 Adam Roben <aroben@apple.com> + + Add IWebViewPrivate::setDomainRelaxationForbiddenForURLScheme + + WebKit/win part of fixing <http://webkit.org/b/33806> + <rdar://problem/7552837> Would like API to disallow setting of + document.domain for pages with certain URL schemes + + Reviewed by Sam Weinig. + + * Interfaces/IWebViewPrivate.idl: Added + setDomainRelaxationForbiddenForURLScheme. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebView.cpp: + (WebView::setDomainRelaxationForbiddenForURLScheme): + * WebView.h: + Added. Calls through to SecurityOrigin. + +2010-01-18 Chris Marrin <cmarrin@apple.com> + + Reviewed by Darin Adler. + + Use new setScrollFrame API + https://bugs.webkit.org/show_bug.cgi?id=32279 + + * WebView.cpp: + (WebView::updateRootLayerContents): + +2010-01-15 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Screen rect for <option> elements is always the zero rect + + https://bugs.webkit.org/show_bug.cgi?id=33758 + + Reviewed by Oliver Hunt. + + * AccessibleBase.cpp: + (AccessibleBase::accLocation): + Use elementRect() rather than boundingBoxRect(), which + AccessibilityListBoxOption overrides. + +2010-01-15 Jon Honeycutt <jhoneycutt@apple.com> + + get_accParent should try to retrieve parent AccessibilityObject, before + calling upon window + + https://bugs.webkit.org/show_bug.cgi?id=22893 + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::get_accParent): + If the object has a parent object, return it. If not, return the + accessible for the WebView window. + +2010-01-12 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: selected, selectable, extended selectable, and multiple + selectable states are not reported + + https://bugs.webkit.org/show_bug.cgi?id=33574 + <rdar://problem/7536826> + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (AccessibleBase::get_accState): + Remove the call to isMultiSelect(). Call the correctly-named + isMultiSelectable(), and if it returns true, set both the "extended + selectable" and "multiple selectable" states. Check whether the object + is selected or selectable, and report those states. + +2010-01-13 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Add additional Geolocation interfaces in WebKit for Windows. + + * Interfaces/IWebGeolocationPolicyListener.idl: Added. + * Interfaces/IWebUIDelegatePrivate.idl: Add decidePolicyForGeolocationRequest to IWebUIDelegatePrivate2. + Append since this version hasn't shipped. + * Interfaces/WebKit.idl: Add include of IWebGeolocationPolicyListener.idl. + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::requestGeolocationPermissionForFrame): Call into decidePolicyForGeolocationRequest. + * WebCoreSupport/WebGeolocationControllerClient.cpp: + (WebGeolocationControllerClient::WebGeolocationControllerClient): Moved *. + * WebGeolocationPolicyListener.cpp: Added. + * WebGeolocationPolicyListener.h: Added. + * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPolicyListener. + * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPolicyListener, WebGeolocationPolicyListener. + * WebView.cpp: + (WebView::setGeolocationProvider): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationProvider): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationDidChangePosition): Removed extraneous STDMETHODCALLTYPE. + (WebView::geolocationDidFailWithError): Removed extraneous STDMETHODCALLTYPE. + +2010-01-12 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben, Sam Weinig. + + Add Geolocation interfaces in WebKit for Windows. + + * ForEachCoClass.h: Added WebGeolocationPosition. + * Interfaces/IWebError.idl: + * Interfaces/IWebGeolocationPosition.idl: Added. + * Interfaces/IWebGeolocationProvider.idl: Added. + * Interfaces/IWebViewPrivate.idl: + * Interfaces/WebKit.idl: + * WebCoreSupport/WebGeolocationControllerClient.cpp: Added. + (WebGeolocationControllerClient::WebGeolocationControllerClient): + (WebGeolocationControllerClient::startUpdating): + (WebGeolocationControllerClient::stopUpdating): + (WebGeolocationControllerClient::lastPosition): + * WebCoreSupport/WebGeolocationControllerClient.h: Added. + * WebGeolocationPosition.cpp: Added IWebGeolocationPosition implementation. + * WebGeolocationPosition.h: Added IWebGeolocationPosition implementation. + * WebKit.vcproj/Interfaces.vcproj: Added IWebGeolocationPosition.idl, IWebGeolocationProvider.idl, + relocated JavaScriptCoreAPITypes.idl, WebScrollbarTypes.idl + * WebKit.vcproj/WebKit.vcproj: Added WebGeolocationPosition.h/.cpp, WebGeolocationControllerClient.h/cpp, + * WebKitClassFactory.cpp: Add WebGeolocationPosition include. + * WebView.cpp: + (WebView::initWithFrame): Create WebGeolocationControllerClient if Geolocation is enabled. + (WebView::setGeolocationProvider): Added Geolocation-specific method. + (WebView::geolocationProvider): Added Geolocation-specific method. + (WebView::geolocationDidChangePosition): Added Geolocation-specific method. + (WebView::geolocationDidFailWithError): Added Geolocation-specific method. + * WebView.h: Added setGeolocationProvider, geolocationProvider, geolocationDidChangePosition, geolocationDidFailWithError. + +2010-01-11 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of <select multiple> elements is wrong + + https://bugs.webkit.org/show_bug.cgi?id=33522 + + Reviewed by Darin Adler. + + * AccessibleBase.cpp: + (MSAARole): + Map the WebCore::ListBox and WebCore::ListBoxOption roles to the MSAA + "list" and "list item" roles. + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Build fix, no review. + + Protect video control logic inside ENABLE(VIDEO). + + * WebView.cpp: + (WebView::enterFullscreenForNode): + (WebView::exitFullscreen): + * WebView.h: + +2010-01-08 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adam Roben. + + Implement full-screen video for Windows + https://bugs.webkit.org/show_bug.cgi?id=31318 + + This adds a full-screen controller, FullscreenVideoController, + which manages going in and out of full-screen. The actual + full-screen window is created and managed by logic added + to QTMovieWin. FullscreenVideoController also creates and + manages a HUD. The HUD renders and manages events to + control the playing video. Movie controller events go to + FullscreenVideoController which then sends them to HTMLMediaElement, + which is passed to the controller by WebView, which gets the call + to go into full-screen mode from HTMLMediaElement via + ChromeClient. + + I've also updated the icons so the related sets (Play/Pause and + volume high/volume low/exit fullscreen) are the same size. This + allows me to position them using common code. + + * WebCoreSupport/WebChromeClient.cpp: + (WebChromeClient::supportsFullscreenForNode): + (WebChromeClient::enterFullscreenForNode): + (WebChromeClient::exitFullscreenForNode): + * WebCoreSupport/WebChromeClient.h: + * WebKit.vcproj/WebKit.vcproj: + * WebKit.vcproj/fsVideoAudioVolumeHigh.png: + * WebKit.vcproj/fsVideoAudioVolumeLow.png: + * WebKit.vcproj/fsVideoExitFullscreen.png: + * WebKit.vcproj/fsVideoPause.png: + * WebKit.vcproj/fsVideoPlay.png: + * WebKitDLL.cpp: + (loadResourceIntoBuffer): + * FullscreenVideoController.cpp: Added. + * FullscreenVideoController.h: Added. + * WebView.cpp: + (WebView::enterFullscreenForNode): + (WebView::exitFullscreen): + * WebView.h: + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed correction. + + Accidentally left unnecessary modification to hdcFromContext + in when landing r52995. + + * WebFrame.cpp: + (hdcFromContext): Back out unneeded modification. + +2010-01-08 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + Use correct cairo surface data type for handling print operations. + https://bugs.webkit.org/show_bug.cgi?id=33022. + + * WebFrame.cpp: + (scaleFactor): Handle 'scale = 0' case. + (WebFrame::spoolPage): Use scaleFactor helper function. Account for + margin size in region passed to header/footer routines. + (WebFrame::spoolPages): Properly clean up Cairo surface. + +2010-01-07 Kent Tamura <tkent@chromium.org> + + Reviewed by Maciej Stachowiak. + + Remove COM code generation files. + https://bugs.webkit.org/show_bug.cgi?id=32854 + + * WebKit.vcproj/DerivedSources.make: Removed. + * WebKit.vcproj/build-generated-files.sh: Removed. + +2010-01-05 Adam Roben <aroben@apple.com> + + Make IWebView::close and destroying a WebView's HWND optional for + WebKit clients + + WebView will now take care of these operations itself when its last + reference is released, if they haven't already been done. + + IWebView::close now also destroys the WebView's HWND. All WebKit + clients were already performing these operations in succession anyway, + or were attempting to by calling IWebView::close then destroying the + WebView's host window (which actually resulted in the WebView's HWND + leaking, and the crash in the below bug). + + Fixes <rdar://problem/7374218> <http://webkit.org/b/32827> Crash when + calling IWebView::close, then releasing the WebView, without calling + DestroyWindow + + Fixes a few WebViewDestruction tests, too. + + Reviewed by Steve Falkenburg. + + * WebView.cpp: + (WebView::~WebView): Don't try to destroy m_viewWindow here. That + should already have happened. Assert that this is the case. + (WebView::close): If m_viewWindow isn't already being destroyed, + destroy it now. Moved the call to revokeDragDrop() here from our + WM_DESTROY handler because it needs to be done before m_viewWindow is + nulled out. + (WebView::WebViewWndProc): Removed call to revokeDragDrop() that + close() now performs. + (WebView::Release): If our last reference is being released, call + close() so that clients don't have to. (It's harmless to call close() + multiple times.) We do this here instead of in the destructor because + close() can cause AddRef() and Release() to be called, and calling + those from within the destructor leads to double-destruction. + (WebView::setHostWindow): Removed an unnecessary (and now harmful) + null-check. + (WebView::revokeDragDrop): Changed an assertion into a run-time check, + since this will now sometimes be called when m_viewWindow hasn't been + created yet. Changed the IsWindow call to a null-check because we + never hold onto a destroyed m_viewWindow. + (WebView::windowAncestryDidChange): If we don't have a view window, + stop tracking changes to our parent's active state. + +2010-01-05 Adam Roben <aroben@apple.com> + + Make it safe to call IWebView::close when IWebView::initWithFrame + hasn't been called + + Part of <rdar://problem/7374218> <http://webkit.org/b/32827> Crash + when IWebView::close, then releasing the WebView, without calling + DestroyWindow + + Reviewed by Steve Falkenburg. + + * WebView.cpp: + (WebView::close): Null-check m_page and m_preferences before using + them. They will be null if initWithFrame was never called. + +2010-01-05 Adam Roben <aroben@apple.com> + + Add assertions to catch double-destruction of WebViews earlier + + I basically copied the m_deletionHasBegun logic from WTF::RefCounted. + + Fixes <http://webkit.org/b/33219>. + + Reviewed by Darin Adler. + + * WebView.cpp: + (WebView::WebView): Initialize m_deletionHasBegun + (WebView::AddRef): Assert that deletion hasn't already begun. + (WebView::Release): Assert that deletion hasn't already begun, then + record when deletion *does* begin. + + * WebView.h: Added m_deletionHasBegun. + +2010-01-05 Adam Roben <aroben@apple.com> + + Remove dead code in WebViewWndProc + + Fixes <http://webkit.org/b/33218>. + + Reviewed by Darin Adler. + + * WebView.cpp: + (WebView::WebViewWndProc): Removed a redundant isBeingDestroyed check. + We bail out much earlier in this function if isBeingDestroyed is true. + +2010-01-04 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of <select> elements is wrong + + https://bugs.webkit.org/show_bug.cgi?id=33192 + + Reviewed by Sam Weinig. + + * AccessibleBase.cpp: + (MSAARole): + Map WebCore::PopUpButtonRole to MSAA's ROLE_SYSTEM_COMBOBOX. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33181 + The first letter is not removed properly from inline input hole + + * WebView.cpp: (WebView::onIMEEndComposition): If composition is ended before it was + confirmed, cancel it. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33161 + Assertion failure in WebView when using Chinese Simplified IME + + * WebView.cpp: (WebView::onIMERequestCharPosition): Changed the assertion into release mode + check. We can't make assertions about arguments passed from outside WebKit. + +2010-01-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33157 + Implement TextInput logging channel on Windows + + * WebKitLogging.cpp: (WebKitInitializeLoggingChannelsIfNecessary): + * WebKitLogging.h: + Added a TextInput channel in place of unused Network one. + + * WebView.cpp: + (WebView::WebViewWndProc): Changed onIMERequest to return result directly. We never forward + it to DefWindowProc, so there is no need to return an unused boolean result for "handled". + (WebView::onIMEStartComposition): Added logging. + (imeCompositionArgumentNames): A helper function for detailed logging in onIMEComposition. + (imeNotificationName): A helper function for detailed logging in onIMENotify. + (imeRequestName): A helper function for detailed logging in onIMERequest. + (WebView::onIMEComposition): Added logging. + (WebView::onIMEEndComposition): Ditto. + (WebView::onIMEChar): Ditto. + (WebView::onIMENotify): Ditto. + (WebView::onIMERequestCharPosition): Changed to return result directly. + (WebView::onIMERequestReconvertString): Ditto. + (WebView::onIMERequest): Changed to return result directly. Added logging. + (WebView::onIMESelect): Added logging. + (WebView::onIMESetContext): Added logging. + + * WebView.h: onIMERequest functions now return result directly. + + +2010-01-04 Adam Roben <aroben@apple.com> + + Add WebKitAPITest + + Fixes <http://webkit.org/b/33167>. + + Reviewed by Sam Weinig. + + * WebKit.vcproj/WebKit.sln: Added WebKitAPITest.vcproj. It builds just + after DumpRenderTree.vcproj. + +2010-01-04 Dan Bernstein <mitz@apple.com> + + Reviewed by Ada Chan and Mark Rowe. + + Updated copyright string + + * WebKit.vcproj/WebKit.rc: + +2009-12-22 Darin Adler <darin@apple.com> + + Another try at fixing Windows build. + + * WebKitPrefix.cpp: Touch it. + +2009-12-22 Darin Adler <darin@apple.com> + + Reviewed by Mark Rowe. + + Turn off datagrid by default, at least for all platforms Apple ships. + The datagrid implementation isn't ready for general web use yet. + + * WebKit.vcproj/WebKit.vcproj: Turn off datagrid by default. + +2009-12-21 Adam Roben <aroben@apple.com> + + Fix non-ACCELERATED_COMPOSITING builds + + * WebPreferences.cpp: + (WebPreferences::acceleratedCompositingEnabled): Guard use of + WKCACFLayerRenderer with USE(ACCELERATED_COMPOSITING). + +2009-12-18 Adam Roben <aroben@apple.com> + + Add IWebPreferencesPrivate::[set]AcceleratedCompositingEnabled + + Fixes <http://webkit.org/b/32745>. + + Reviewed by Ada Chan. + + * Interfaces/IWebPreferencesPrivate.idl: Added + [set]AcceleratedCompositingEnabled. + + * Interfaces/WebKit.idl: Touched to force a build. + + * WebPreferenceKeysPrivate.h: Added + WebKitAcceleratedCompositingEnabledPreferenceKey. + + * WebPreferences.cpp: + (WebPreferences::initializeDefaultSettings): Make accelerated + compositing be on by default. + (WebPreferences::setAcceleratedCompositingEnabled): Store the new + value. + (WebPreferences::acceleratedCompositingEnabled): If accelerated + compositing isn't available, return false. Otherwise, return the value + stored in preferences. + + * WebPreferences.h: Added [set]AcceleratedCompositingAvailable. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): Just pass the value from + WebPreferences on down. + +2009-12-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of list items is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32688 + + Reviewed by Adam Roben. + + * AccessibleBase.cpp: + (MSAARole): + Make the WebCore list item role map to the MSAA list item role. + +2009-12-17 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of list markers is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32687 + + Reviewed by Adam Roben. + + * AccessibleBase.cpp: + (MSAARole): + Make the WebCore list marker role map to the MSAA static text role. + +2009-12-18 Adam Roben <aroben@apple.com> + + Add #includes needed after WebCore clean-up + + Rubber-stamped by Anders Carlsson. + + Fixes <http://webkit.org/b/32718>. + + * WebCoreSupport/WebContextMenuClient.cpp: + * WebDataSource.cpp: + * WebHTMLRepresentation.cpp: + * WebView.cpp: + * WebView.h: + +2009-12-17 Benjamin Otte <otte@gnome.org> + + Reviewed by Adam Roben. + + Don't include all JSC headers everywhere + https://bugs.webkit.org/show_bug.cgi?id=32663 + + * WebCoreLocalizedStrings.cpp: Added now-needed #include of + MathExtras.h. + +2009-12-17 Adam Roben <aroben@apple.com> + + Remove WebKit.sln's Debug_All and Debug_Internal configurations + + These configurations aren't buildable by people outside of Apple, and + Apple doesn't use this solution file. + + Fixes <http://webkit.org/b/31000> Windows WebKit Build Configuration + should default to Debug instead of Debug_all. + + Rubber-stamped by Dan Bernstein. + + * WebKit.vcproj/WebKit.sln: + +2009-12-16 Jon Honeycutt <jhoneycutt@apple.com> + + MSAA: Accessibility role of text nodes is wrong + + https://bugs.webkit.org/show_bug.cgi?id=32631 + <rdar://problem/7369084> + + Reviewed by Alice Liu. + + * AccessibleBase.cpp: + (MSAARole): + If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT. + (AccessibleBase::role): + Call roleValueForMSAA(). + +2009-12-14 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Adam Roben. + + Provide working printing support for WinCairo port. + + * WebFrame.cpp: + (WebFrame::spoolPage): Conditionalize initialization of + PlatformGraphicsContext handling for CG vs. Cairo. + (scaleFactor): Add helper function. + (hdcFromContext): Add helper function. + (WebFrame::drawHeader): Correct Cairo variation. + (WebFrame::drawFooter): Correct Cairo variation. + (WebFrame::spoolPages): Correct Cairo variation. + +>>>>>>> webkit.org at r54127 2009-12-13 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. @@ -13,6 +795,59 @@ * WebView.cpp: (WebView::initWithFrame): +<<<<<<< HEAD +======= +2009-12-14 Adam Roben <aroben@apple.com> + + Change IWebFramePrivate's vtable to be compatible with Safari 4.0.4 + + Reviewed by Steve Falkenburg. + + Fixes <http://webkit.org/b/32433> REGRESSION (r51567): Right click on + a link element crashes WebKit nightly + + * Interfaces/IWebFramePrivate.idl: Moved pauseSVGAnimation to the end + of the interface so the vtable that Safari 4.0.4 sees is unchanged. + +2009-12-14 Adam Roben <aroben@apple.com> + + Build fix + + * WebKit.vcproj/WebKit.vcproj: Added $(DXSDK_DIR)\Lib\x86 to the + libpath for all non-Cairo configurations (it was missing from most of + them). + +2009-12-11 Chris Marrin <cmarrin@apple.com> + + Reviewed by Jon Honeycutt. + + Added icons for full-screen video on Windows + https://bugs.webkit.org/show_bug.cgi?id=31318 + + * WebKit.vcproj/WebKit.rc: + * WebKit.vcproj/WebKit.vcproj: + * WebKit.vcproj/fsVideoAudioVolumeHigh.png: Added. + * WebKit.vcproj/fsVideoAudioVolumeLow.png: Added. + * WebKit.vcproj/fsVideoExitFullscreen.png: Added. + * WebKit.vcproj/fsVideoPause.png: Added. + * WebKit.vcproj/fsVideoPlay.png: Added. + * WebKit.vcproj/resource.h: + +2009-12-11 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adam Roben. + + Delay load DLLs for accelerated compositing + https://bugs.webkit.org/show_bug.cgi?id=31856 + + If the DLLs (d3d9 and QuartzCore). are not present it + turns off accelerated compositing and avoids calling + any of the functions in the DLLs. + + * WebView.cpp: + (WebView::notifyPreferencesChanged): + +>>>>>>> webkit.org at r54127 2009-12-10 Jon Honeycutt <jhoneycutt@apple.com> Pass more information about a plug-in to the PluginHalterDelegate diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h index 39f8e32..ab7182d 100644 --- a/WebKit/win/ForEachCoClass.h +++ b/WebKit/win/ForEachCoClass.h @@ -64,6 +64,8 @@ macro(WebCookieManager) \ macro(WebWorkersPrivate) \ macro(WebScriptWorld) \ + macro(WebGeolocationPosition) \ + macro(WebSerializedJSValue) \ // end of macro // Everything below this point is deprecated. Please do not use. diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp new file mode 100644 index 0000000..6b8e5ac --- /dev/null +++ b/WebKit/win/FullscreenVideoController.cpp @@ -0,0 +1,615 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if ENABLE(VIDEO) + +#include "FullscreenVideoController.h" + +#include "WebKitDLL.h" +#include <ApplicationServices/ApplicationServices.h> +#include <WebCore/BitmapInfo.h> +#include <WebCore/Font.h> +#include <WebCore/FontSelector.h> +#include <WebCore/GraphicsContext.h> +#include <WebCore/TextRun.h> +#include <WebKitSystemInterface/WebKitSystemInterface.h> +#include <windowsx.h> +#include <wtf/StdLibExtras.h> + +using namespace std; +using namespace WebCore; + +static const float timerInterval = 0.033; + +// HUD Size +static const int windowHeight = 59; +static const int windowWidth = 438; + +// Margins and button sizes +static const int margin = 9; +static const int marginTop = 9; +static const int buttonSize = 25; +static const int buttonMiniSize = 16; +static const int volumeSliderWidth = 50; +static const int timeSliderWidth = 310; +static const int sliderHeight = 8; +static const int volumeSliderButtonSize = 10; +static const int timeSliderButtonSize = 8; +static const int textSize = 11; +static const float initialHUDPositionY = 0.9; // Initial Y position of HUD in percentage from top of screen + +// Background values +static const int borderRadius = 12; +static const int borderThickness = 2; + +// Colors +static const unsigned int backgroundColor = 0xA0202020; +static const unsigned int borderColor = 0xFFA0A0A0; +static const unsigned int sliderGutterColor = 0xFF141414; +static const unsigned int sliderButtonColor = 0xFF808080; +static const unsigned int textColor = 0xFFFFFFFF; + +HUDButton::HUDButton(HUDButtonType type, const IntPoint& position) + : HUDWidget(IntRect(position, IntSize())) + , m_type(type) + , m_showAltButton(false) +{ + const char* buttonResource = 0; + const char* buttonResourceAlt = 0; + switch (m_type) { + case PlayPauseButton: + buttonResource = "fsVideoPlay"; + buttonResourceAlt = "fsVideoPause"; + break; + case TimeSliderButton: + break; + case VolumeUpButton: + buttonResource = "fsVideoAudioVolumeHigh"; + break; + case VolumeSliderButton: + break; + case VolumeDownButton: + buttonResource = "fsVideoAudioVolumeLow"; + break; + case ExitFullscreenButton: + buttonResource = "fsVideoExitFullscreen"; + break; + } + + if (buttonResource) { + m_buttonImage = Image::loadPlatformResource(buttonResource); + m_rect.setWidth(m_buttonImage->width()); + m_rect.setHeight(m_buttonImage->height()); + } + if (buttonResourceAlt) + m_buttonImageAlt = Image::loadPlatformResource(buttonResourceAlt); +} + +void HUDButton::draw(GraphicsContext& context) +{ + Image* image = (m_showAltButton && m_buttonImageAlt) ? m_buttonImageAlt.get() : m_buttonImage.get(); + context.drawImage(image, DeviceColorSpace, m_rect.location()); +} + +HUDSlider::HUDSlider(HUDSliderButtonShape shape, int buttonSize, const IntRect& rect) + : HUDWidget(rect) + , m_buttonShape(shape) + , m_buttonSize(buttonSize) + , m_buttonPosition(0) + , m_dragStartOffset(0) +{ +} + +void HUDSlider::draw(GraphicsContext& context) +{ + // Draw gutter + IntSize radius(m_rect.height() / 2, m_rect.height() / 2); + context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), DeviceColorSpace); + + // Draw button + context.setStrokeColor(Color(sliderButtonColor), DeviceColorSpace); + context.setFillColor(Color(sliderButtonColor), DeviceColorSpace); + + if (m_buttonShape == RoundButton) { + context.drawEllipse(IntRect(m_rect.location().x() + m_buttonPosition, m_rect.location().y() - (m_buttonSize - m_rect.height()) / 2, m_buttonSize, m_buttonSize)); + return; + } + + // Draw a diamond + FloatPoint points[4]; + float half = static_cast<float>(m_buttonSize) / 2; + points[0].setX(m_rect.location().x() + m_buttonPosition + half); + points[0].setY(m_rect.location().y()); + points[1].setX(m_rect.location().x() + m_buttonPosition + m_buttonSize); + points[1].setY(m_rect.location().y() + half); + points[2].setX(m_rect.location().x() + m_buttonPosition + half); + points[2].setY(m_rect.location().y() + m_buttonSize); + points[3].setX(m_rect.location().x() + m_buttonPosition); + points[3].setY(m_rect.location().y() + half); + context.drawConvexPolygon(4, points, true); +} + +void HUDSlider::drag(const IntPoint& point, bool start) +{ + if (start) { + // When we start, we need to snap the slider position to the x position if we clicked the gutter. + // But if we click the button, we need to drag relative to where we clicked down. We only need + // to check X because we would not even get here unless Y were already inside. + int relativeX = point.x() - m_rect.location().x(); + if (relativeX >= m_buttonPosition && relativeX <= m_buttonPosition + m_buttonSize) + m_dragStartOffset = point.x() - m_buttonPosition; + else + m_dragStartOffset = m_rect.location().x() + m_buttonSize / 2; + } + + m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset)); +} + +FullscreenVideoController::FullscreenVideoController() + : m_hudWindow(0) + , m_videoWindow(0) + , m_playPauseButton(HUDButton::PlayPauseButton, IntPoint((windowWidth - buttonSize) / 2, marginTop)) + , m_timeSliderButton(HUDButton::TimeSliderButton, IntPoint(0, 0)) + , m_volumeUpButton(HUDButton::VolumeUpButton, IntPoint(margin + buttonMiniSize + volumeSliderWidth + buttonMiniSize / 2, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_volumeSliderButton(HUDButton::VolumeSliderButton, IntPoint(0, 0)) + , m_volumeDownButton(HUDButton::VolumeDownButton, IntPoint(margin, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_exitFullscreenButton(HUDButton::ExitFullscreenButton, IntPoint(windowWidth - 2 * margin - buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2)) + , m_volumeSlider(HUDSlider::RoundButton, volumeSliderButtonSize, IntRect(IntPoint(margin + buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2 + buttonMiniSize / 2 - sliderHeight / 2), IntSize(volumeSliderWidth, sliderHeight))) + , m_timeSlider(HUDSlider::DiamondButton, timeSliderButtonSize, IntRect(IntPoint(windowWidth / 2 - timeSliderWidth / 2, windowHeight - margin - sliderHeight), IntSize(timeSliderWidth, sliderHeight))) + , m_hitWidget(0) + , m_movingWindow(false) + , m_timer(this, &FullscreenVideoController::timerFired) +{ +} + +FullscreenVideoController::~FullscreenVideoController() +{ + if (movie()) + movie()->exitFullscreen(); +} + +QTMovieWin* FullscreenVideoController::movie() const +{ + return m_mediaElement ? reinterpret_cast<QTMovieWin*>(m_mediaElement->platformMedia().qtMovie) : 0; +} + +void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) +{ + if (mediaElement == m_mediaElement) + return; + + m_mediaElement = mediaElement; + if (!m_mediaElement) { + // Can't do full-screen, just get out + exitFullscreen(); + } +} + +void FullscreenVideoController::enterFullscreen() +{ + if (!movie()) + return; + + m_videoWindow = movie()->enterFullscreen(this); + + RECT windowRect; + GetClientRect(m_videoWindow, &windowRect); + m_fullscreenSize.setWidth(windowRect.right - windowRect.left); + m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top); + + createHUDWindow(); +} + +void FullscreenVideoController::exitFullscreen() +{ + if (movie()) + movie()->exitFullscreen(); + + m_videoWindow = 0; + SetWindowLongPtr(m_hudWindow, 0, 0); + DestroyWindow(m_hudWindow); + m_hudWindow = 0; +} + +bool FullscreenVideoController::canPlay() const +{ + return m_mediaElement && m_mediaElement->canPlay(); +} + +void FullscreenVideoController::play() +{ + if (m_mediaElement) + m_mediaElement->play(); +} + +void FullscreenVideoController::pause() +{ + if (m_mediaElement) + m_mediaElement->pause(); +} + +float FullscreenVideoController::volume() const +{ + return m_mediaElement ? m_mediaElement->volume() : 0; +} + +void FullscreenVideoController::setVolume(float volume) +{ + if (m_mediaElement) { + ExceptionCode ec; + m_mediaElement->setVolume(volume, ec); + } +} + +float FullscreenVideoController::currentTime() const +{ + return m_mediaElement ? m_mediaElement->currentTime() : 0; +} + +void FullscreenVideoController::setCurrentTime(float value) +{ + if (m_mediaElement) { + ExceptionCode ec; + m_mediaElement->setCurrentTime(value, ec); + } +} + +float FullscreenVideoController::duration() const +{ + return m_mediaElement ? m_mediaElement->duration() : 0; +} + +void FullscreenVideoController::beginScrubbing() +{ + if (m_mediaElement) + m_mediaElement->beginScrubbing(); +} + +void FullscreenVideoController::endScrubbing() +{ + if (m_mediaElement) + m_mediaElement->endScrubbing(); +} + +LRESULT FullscreenVideoController::fullscreenClientWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) { + case WM_CHAR: + onChar(wParam); + break; + case WM_LBUTTONDOWN: + onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_MOUSEMOVE: + onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_LBUTTONUP: + onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + } + + return DefWindowProc(wnd, message, wParam, lParam); +} + +static const LPCWSTR fullscreenVideeoHUDWindowClassName = L"fullscreenVideeoHUDWindowClass"; + +void FullscreenVideoController::registerHUDWindowClass() +{ + static bool haveRegisteredHUDWindowClass; + if (haveRegisteredHUDWindowClass) + return; + + haveRegisteredHUDWindowClass = true; + + WNDCLASSEX wcex; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = hudWndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 4; + wcex.hInstance = gInstance; + wcex.hIcon = 0; + wcex.hCursor = LoadCursor(0, IDC_ARROW); + wcex.hbrBackground = 0; + wcex.lpszMenuName = 0; + wcex.lpszClassName = fullscreenVideeoHUDWindowClassName; + wcex.hIconSm = 0; + + RegisterClassEx(&wcex); +} + +void FullscreenVideoController::createHUDWindow() +{ + m_hudPosition.setX((m_fullscreenSize.width() - windowWidth) / 2); + m_hudPosition.setY(m_fullscreenSize.height() * initialHUDPositionY - windowHeight / 2); + + // Local variable that will hold the returned pixels. No need to cleanup this value. It + // will get cleaned up when m_bitmap is destroyed in the dtor + void* pixels; + BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(windowWidth, windowHeight)); + m_bitmap.set(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0)); + + // Dirty the window so the HUD draws + RECT clearRect = { m_hudPosition.x(), m_hudPosition.y(), m_hudPosition.x() + windowWidth, m_hudPosition.y() + windowHeight }; + InvalidateRect(m_videoWindow, &clearRect, true); + + m_playPauseButton.setShowAltButton(!canPlay()); + m_volumeSlider.setValue(volume()); + m_timeSlider.setValue(currentTime() / duration()); + + if (!canPlay()) + m_timer.startRepeating(timerInterval); + + registerHUDWindowClass(); + + m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW, + fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE, + m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0); + ASSERT(::IsWindow(m_hudWindow)); + SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this)); + + draw(); +} + +static String timeToString(float time) +{ + if (!isfinite(time)) + time = 0; + int seconds = fabsf(time); + int hours = seconds / (60 * 60); + int minutes = (seconds / 60) % 60; + seconds %= 60; + + if (hours) { + if (hours > 9) + return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); + return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); + } + + return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds); +} + +void FullscreenVideoController::draw() +{ + HDC windowDC = GetDC(m_hudWindow); + HDC bitmapDC = CreateCompatibleDC(windowDC); + ::ReleaseDC(m_hudWindow, windowDC); + SelectObject(bitmapDC, m_bitmap.get()); + + GraphicsContext context(bitmapDC, true); + + context.save(); + + // Draw the background + IntSize outerRadius(borderRadius, borderRadius); + IntRect outerRect(0, 0, windowWidth, windowHeight); + IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness); + IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2); + + context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), DeviceColorSpace); + context.setCompositeOperation(CompositeCopy); + context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), DeviceColorSpace); + + // Draw the widgets + m_playPauseButton.draw(context); + m_volumeUpButton.draw(context); + m_volumeSliderButton.draw(context); + m_volumeDownButton.draw(context); + m_timeSliderButton.draw(context); + m_exitFullscreenButton.draw(context); + m_volumeSlider.draw(context); + m_timeSlider.draw(context); + + // Draw the text strings + FontDescription desc; + + NONCLIENTMETRICS metrics; + metrics.cbSize = sizeof(metrics); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0); + FontFamily family; + family.setFamily(metrics.lfSmCaptionFont.lfFaceName); + desc.setFamily(family); + + desc.setComputedSize(textSize); + Font font = Font(desc, 0, 0); + font.update(0); + + String s; + + // The y positioning of these two text strings is tricky because they are so small. They + // are currently positioned relative to the center of the slider and then down the font + // height / 4 (which is actually half of font height /2), which positions the center of + // the text at the center of the slider. + // Left string + s = timeToString(currentTime()); + TextRun leftText(s); + context.setFillColor(Color(textColor), DeviceColorSpace); + context.drawText(font, leftText, IntPoint(windowWidth / 2 - timeSliderWidth / 2 - margin - font.width(leftText), windowHeight - margin - sliderHeight / 2 + font.height() / 4)); + + // Right string + s = timeToString(currentTime() - duration()); + TextRun rightText(s); + context.setFillColor(Color(textColor), DeviceColorSpace); + context.drawText(font, rightText, IntPoint(windowWidth / 2 + timeSliderWidth / 2 + margin, windowHeight - margin - sliderHeight / 2 + font.height() / 4)); + + // Copy to the window + BLENDFUNCTION blendFunction = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; + SIZE size = { windowWidth, windowHeight }; + POINT sourcePoint = {0, 0}; + POINT destPoint = { m_hudPosition.x(), m_hudPosition.y() }; + BOOL result = UpdateLayeredWindow(m_hudWindow, 0, &destPoint, &size, bitmapDC, &sourcePoint, 0, &blendFunction, ULW_ALPHA); + + context.restore(); + + ::DeleteDC(bitmapDC); +} + +LRESULT FullscreenVideoController::hudWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + LONG_PTR longPtr = GetWindowLongPtr(wnd, 0); + FullscreenVideoController* controller = reinterpret_cast<FullscreenVideoController*>(longPtr); + if (!controller) + return DefWindowProc(wnd, message, wParam, lParam); + + switch (message) { + case WM_CHAR: + controller->onChar(wParam); + break; + case WM_LBUTTONDOWN: + controller->onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_MOUSEMOVE: + controller->onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + case WM_LBUTTONUP: + controller->onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); + break; + } + + return DefWindowProc(wnd, message, wParam, lParam); +} + +void FullscreenVideoController::onChar(int c) +{ + if (c == VK_ESCAPE) { + if (m_mediaElement) + m_mediaElement->exitFullscreen(); + } else if (c == VK_SPACE) + togglePlay(); +} + +void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*) +{ + // Update the time slider + m_timeSlider.setValue(currentTime() / duration()); + draw(); +} + +void FullscreenVideoController::onMouseDown(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + + // Don't bother hit testing if we're outside the bounds of the window + if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight) + return; + + m_hitWidget = 0; + m_movingWindow = false; + + if (m_playPauseButton.hitTest(convertedPoint)) + m_hitWidget = &m_playPauseButton; + else if (m_exitFullscreenButton.hitTest(convertedPoint)) + m_hitWidget = &m_exitFullscreenButton; + else if (m_volumeUpButton.hitTest(convertedPoint)) + m_hitWidget = &m_volumeUpButton; + else if (m_volumeDownButton.hitTest(convertedPoint)) + m_hitWidget = &m_volumeDownButton; + else if (m_volumeSlider.hitTest(convertedPoint)) { + m_hitWidget = &m_volumeSlider; + m_volumeSlider.drag(convertedPoint, true); + setVolume(m_volumeSlider.value()); + } else if (m_timeSlider.hitTest(convertedPoint)) { + m_hitWidget = &m_timeSlider; + m_timeSlider.drag(convertedPoint, true); + beginScrubbing(); + setCurrentTime(m_timeSlider.value() * duration()); + } + + // If we did not pick any of our widgets we are starting a window move + if (!m_hitWidget) { + m_moveOffset = convertedPoint; + m_movingWindow = true; + } + + draw(); +} + +void FullscreenVideoController::onMouseMove(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + + if (m_hitWidget) { + m_hitWidget->drag(convertedPoint, false); + if (m_hitWidget == &m_volumeSlider) + setVolume(m_volumeSlider.value()); + else if (m_hitWidget == &m_timeSlider) + setCurrentTime(m_timeSlider.value() * duration()); + draw(); + } else if (m_movingWindow) + m_hudPosition.move(convertedPoint.x() - m_moveOffset.x(), convertedPoint.y() - m_moveOffset.y()); +} + +void FullscreenVideoController::onMouseUp(const IntPoint& point) +{ + IntPoint convertedPoint(fullScreenToHUDCoordinates(point)); + m_movingWindow = false; + + if (m_hitWidget) { + if (m_hitWidget == &m_playPauseButton && m_playPauseButton.hitTest(convertedPoint)) + togglePlay(); + else if (m_hitWidget == &m_volumeUpButton && m_volumeUpButton.hitTest(convertedPoint)) { + setVolume(1); + m_volumeSlider.setValue(1); + } else if (m_hitWidget == &m_volumeDownButton && m_volumeDownButton.hitTest(convertedPoint)) { + setVolume(0); + m_volumeSlider.setValue(0); + } else if (m_hitWidget == &m_timeSlider) + endScrubbing(); + else if (m_hitWidget == &m_exitFullscreenButton && m_exitFullscreenButton.hitTest(convertedPoint)) { + m_hitWidget = 0; + if (m_mediaElement) + m_mediaElement->exitFullscreen(); + return; + } + } + + m_hitWidget = 0; + draw(); +} + +void FullscreenVideoController::togglePlay() +{ + if (canPlay()) + play(); + else + pause(); + + m_playPauseButton.setShowAltButton(!canPlay()); + + // Run a timer while the video is playing so we can keep the time + // slider and time values up to date. + if (!canPlay()) + m_timer.startRepeating(timerInterval); + else + m_timer.stop(); + + draw(); +} + +#endif diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h new file mode 100644 index 0000000..b39e30c --- /dev/null +++ b/WebKit/win/FullscreenVideoController.h @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FullscreenVideoController_h +#define FullscreenVideoController_h + +#if ENABLE(VIDEO) + +#include "QTMovieWin.h" + +#include <WebCore/HTMLMediaElement.h> +#include <WebCore/Image.h> +#include <WebCore/IntPoint.h> +#include <WebCore/IntSize.h> +#include <wtf/RefPtr.h> + +namespace WebCore { +class GraphicsContext; +} + +class HUDWidget { +public: + HUDWidget(const WebCore::IntRect& rect) : m_rect(rect) { } + + virtual ~HUDWidget() { } + + virtual void draw(WebCore::GraphicsContext&) = 0; + virtual void drag(const WebCore::IntPoint&, bool start) = 0; + bool hitTest(const WebCore::IntPoint& point) const { return m_rect.contains(point); } + +protected: + WebCore::IntRect m_rect; +}; + +class HUDButton : public HUDWidget { +public: + enum HUDButtonType { + NoButton, + PlayPauseButton, + TimeSliderButton, + VolumeUpButton, + VolumeSliderButton, + VolumeDownButton, + ExitFullscreenButton + }; + + HUDButton(HUDButtonType, const WebCore::IntPoint&); + ~HUDButton() { } + + virtual void draw(WebCore::GraphicsContext&); + virtual void drag(const WebCore::IntPoint&, bool start) { } + void setShowAltButton(bool b) { m_showAltButton = b; } + +private: + RefPtr<WebCore::Image> m_buttonImage; + RefPtr<WebCore::Image> m_buttonImageAlt; + HUDButtonType m_type; + bool m_showAltButton; +}; + +class HUDSlider : public HUDWidget { +public: + enum HUDSliderButtonShape { RoundButton, DiamondButton }; + + HUDSlider(HUDSliderButtonShape, int buttonSize, const WebCore::IntRect& rect); + ~HUDSlider() { } + + virtual void draw(WebCore::GraphicsContext&); + virtual void drag(const WebCore::IntPoint&, bool start); + float value() const { return static_cast<float>(m_buttonPosition) / (m_rect.width() - m_buttonSize); } + void setValue(float value) { m_buttonPosition = static_cast<int>(value * (m_rect.width() - m_buttonSize)); } + +private: + HUDSliderButtonShape m_buttonShape; + int m_buttonSize; + int m_buttonPosition; + int m_dragStartOffset; +}; + +class FullscreenVideoController : QTMovieWinFullscreenClient, public Noncopyable { +public: + FullscreenVideoController(); + virtual ~FullscreenVideoController(); + + void setMediaElement(WebCore::HTMLMediaElement*); + WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); } + + void enterFullscreen(); + void exitFullscreen(); + +private: + // QTMovieWinFullscreenClient + virtual LRESULT fullscreenClientWndProc(HWND, UINT message, WPARAM, LPARAM); + + void ensureWindow(); + QTMovieWin* movie() const; + + bool canPlay() const; + void play(); + void pause(); + float volume() const; + void setVolume(float); + float currentTime() const; + void setCurrentTime(float); + float duration() const; + void beginScrubbing(); + void endScrubbing(); + + WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const + { + return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y()); + } + + static void registerHUDWindowClass(); + static LRESULT CALLBACK hudWndProc(HWND, UINT message, WPARAM, LPARAM); + void createHUDWindow(); + void timerFired(WebCore::Timer<FullscreenVideoController>*); + + void togglePlay(); + void draw(); + + void onChar(int c); + void onMouseDown(const WebCore::IntPoint&); + void onMouseMove(const WebCore::IntPoint&); + void onMouseUp(const WebCore::IntPoint&); + + RefPtr<WebCore::HTMLMediaElement> m_mediaElement; + + HWND m_hudWindow, m_videoWindow; + OwnPtr<HBITMAP> m_bitmap; + WebCore::IntSize m_fullscreenSize; + WebCore::IntPoint m_hudPosition; + + HUDButton m_playPauseButton; + HUDButton m_timeSliderButton; + HUDButton m_volumeUpButton; + HUDButton m_volumeSliderButton; + HUDButton m_volumeDownButton; + HUDButton m_exitFullscreenButton; + HUDSlider m_volumeSlider; + HUDSlider m_timeSlider; + + HUDWidget* m_hitWidget; + WebCore::IntPoint m_moveOffset; + bool m_movingWindow; + WebCore::Timer<FullscreenVideoController> m_timer; +}; + +#endif + +#endif // FullscreenVideoController_h diff --git a/WebKit/win/Interfaces/AccessibleComparable.idl b/WebKit/win/Interfaces/AccessibleComparable.idl new file mode 100644 index 0000000..710e0d1 --- /dev/null +++ b/WebKit/win/Interfaces/AccessibleComparable.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +import "oleacc.idl"; + +cpp_quote("extern const GUID __declspec(selectany) SID_AccessibleComparable = { 0x62b8cb5f, 0xfb7a, 0x4faf, 0x81, 0xe8, 0x52, 0xb6, 0x5f, 0x12, 0x8b, 0x31 };") + +[ + object, + uuid(4f0381ad-dab3-42ad-9ca2-a85b0ae041c0), + hidden, + dual, + pointer_default(unique) +] +interface IAccessibleComparable : IAccessible +{ + HRESULT isSameObject([in] IAccessibleComparable* other, [out, retval] BOOL* result); +} diff --git a/WebKit/win/Interfaces/IWebError.idl b/WebKit/win/Interfaces/IWebError.idl index 4353ac6..e4a4ae9 100644 --- a/WebKit/win/Interfaces/IWebError.idl +++ b/WebKit/win/Interfaces/IWebError.idl @@ -99,6 +99,15 @@ enum { WebKitErrorJavaUnavailable = 202, }; +/*! + @enum + @abstract Geolocation errors + @constant WebKitErrorGeolocationLocationUnknown +*/ +enum { + WebKitErrorGeolocationLocationUnknown = 300, +}; + cpp_quote("#define WebKitErrorMIMETypeKey TEXT(\"WebKitErrorMIMETypeKey\")") cpp_quote("#define WebKitErrorPlugInNameKey TEXT(\"WebKitErrorPlugInNameKey\")") cpp_quote("#define WebKitErrorPlugInPageURLStringKey TEXT(\"WebKitErrorPlugInPageURLStringKey\")") diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl index 3ba71c8..ef1c133 100755 --- a/WebKit/win/Interfaces/IWebFramePrivate.idl +++ b/WebKit/win/Interfaces/IWebFramePrivate.idl @@ -89,7 +89,6 @@ interface IWebFramePrivate : IUnknown HRESULT pauseAnimation([in] BSTR animationName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning); - HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); HRESULT numberOfActiveAnimations([out, retval] UINT* number); HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result); @@ -101,4 +100,6 @@ interface IWebFramePrivate : IUnknown [local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*); HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result); + + HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning); } diff --git a/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl new file mode 100644 index 0000000..54b00bd --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationPolicyListener.idl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +[ + object, + oleautomation, + uuid(1300A76E-26DF-4BED-B79F-3930D7A4202F), + pointer_default(unique) +] +interface IWebGeolocationPolicyListener : IUnknown +{ + HRESULT allow(); + HRESULT deny(); +} diff --git a/WebKit/win/Interfaces/IWebGeolocationPosition.idl b/WebKit/win/Interfaces/IWebGeolocationPosition.idl new file mode 100644 index 0000000..c8f8eb4 --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationPosition.idl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +[ + object, + oleautomation, + uuid(8C92A6B9-4CBB-4626-A596-24C1B47D7CC7), + pointer_default(unique) +] +interface IWebGeolocationPosition : IUnknown +{ + HRESULT initWithTimestamp([in] double timestamp, [in] double latitude, [in] double longitude, [in] double accuracy); +} diff --git a/WebKit/win/Interfaces/IWebGeolocationProvider.idl b/WebKit/win/Interfaces/IWebGeolocationProvider.idl new file mode 100644 index 0000000..9a8cb32 --- /dev/null +++ b/WebKit/win/Interfaces/IWebGeolocationProvider.idl @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "ocidl.idl"; +#endif + +interface IWebView; +interface IWebGeolocationPosition; + +[ + object, + oleautomation, + uuid(47F4CCF6-963D-4306-BE0B-8205C94672B5), + pointer_default(unique) +] +interface IWebGeolocationProvider : IUnknown +{ + HRESULT registerWebView([in] IWebView* webView); + HRESULT unregisterWebView([in] IWebView* webView); + HRESULT lastPosition([out, retval] IWebGeolocationPosition** lastPosition); +} diff --git a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl index 7fbd451..ff39c0a 100644 --- a/WebKit/win/Interfaces/IWebHTMLRepresentation.idl +++ b/WebKit/win/Interfaces/IWebHTMLRepresentation.idl @@ -95,11 +95,17 @@ interface IWebHTMLRepresentation : IUnknown /* - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element; + Deprecated: use the variant that includes resultDistance and resultIsInCellAbove instead. */ - HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result); + HRESULT deprecatedSearchForLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* beforeElement, [out, retval] BSTR* result); /* - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element; */ HRESULT matchLabels([in, size_is(cLabels)] BSTR* labels, [in] int cLabels, [in] IDOMElement* againstElement, [out, retval] BSTR* result); + + /* + - (NSString *)searchForLabels:(NSArray *)labels beforeElement:(DOMElement *)element resultDistance:(NSUInteger*)outDistance resultIsInCellAbove:(BOOL*)outIsInCellAbove; + */ + HRESULT searchForLabels([in, size_is(cLabels)] BSTR* labels, [in] unsigned cLabels, [in] IDOMElement* beforeElement, [out] unsigned* resultDistance, [out] BOOL* resultIsInCellAbove, [out, retval] BSTR* result); } diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl index bec70e2..1293fb8 100644 --- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl +++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl @@ -91,4 +91,10 @@ interface IWebPreferencesPrivate : IUnknown HRESULT setPluginAllowedRunTime([in] UINT allowedRunTime); HRESULT pluginAllowedRunTime([out, retval] UINT* allowedRunTime); + + HRESULT setAcceleratedCompositingEnabled([in] BOOL); + HRESULT acceleratedCompositingEnabled([out, retval] BOOL*); + + HRESULT setCustomDragCursorsEnabled([in] BOOL); + HRESULT customDragCursorsEnabled([out, retval] BOOL*); } diff --git a/WebKit/win/Interfaces/IWebScriptWorld.idl b/WebKit/win/Interfaces/IWebScriptWorld.idl index 255255c..bd8012d 100644 --- a/WebKit/win/Interfaces/IWebScriptWorld.idl +++ b/WebKit/win/Interfaces/IWebScriptWorld.idl @@ -25,6 +25,7 @@ #ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +import "JavaScriptCoreAPITypes.idl"; #endif [ @@ -35,4 +36,5 @@ import "ocidl.idl"; ] interface IWebScriptWorld : IUnknown { HRESULT standardWorld([out, retval] IWebScriptWorld**); + [local] HRESULT scriptWorldForGlobalContext([in] JSGlobalContextRef, [out, retval] IWebScriptWorld**); } diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl index e09aac4..ce00430 100755 --- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl +++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl @@ -26,6 +26,7 @@ #ifndef DO_NO_IMPORTS import "oaidl.idl"; import "ocidl.idl"; +import "IWebGeolocationPolicyListener.idl"; import "IWebSecurityOrigin.idl"; import "IWebView.idl"; #endif @@ -37,6 +38,7 @@ cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\ interface IWebEmbeddedView; interface IWebFrame; +interface IWebGeolocationPolicyListener; interface IWebSecurityOrigin; interface IWebView; @@ -94,4 +96,6 @@ interface IWebUIDelegatePrivate2 : IWebUIDelegatePrivate HRESULT createWebViewWithRequest([in] IWebView* sender, [in] IWebURLRequest* request, [in] IPropertyBag* windowFeatures, [out, retval] IWebView** newWebView); HRESULT drawBackground([in] IWebView* sender, [in] OLE_HANDLE hdc, [in] const RECT* dirtyRect); + + HRESULT decidePolicyForGeolocationRequest([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] IWebGeolocationPolicyListener* listener); } diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl index 1c8cea2..7ab2304 100644 --- a/WebKit/win/Interfaces/IWebViewPrivate.idl +++ b/WebKit/win/Interfaces/IWebViewPrivate.idl @@ -219,4 +219,11 @@ interface IWebViewPrivate : IUnknown HRESULT isNodeHaltedPlugin([in] IDOMNode*, [retval, out] BOOL*); HRESULT restartHaltedPluginForNode([in] IDOMNode*); HRESULT hasPluginForNodeBeenHalted([in] IDOMNode*, [retval, out] BOOL*); + + HRESULT setGeolocationProvider([in] IWebGeolocationProvider* locationProvider); + HRESULT geolocationProvider([out, retval] IWebGeolocationProvider** locationProvider); + HRESULT geolocationDidChangePosition([in] IWebGeolocationPosition* position); + HRESULT geolocationDidFailWithError([in] IWebError* error); + + HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme); } diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl index 7b308db..94dc697 100644 --- a/WebKit/win/Interfaces/WebKit.idl +++ b/WebKit/win/Interfaces/WebKit.idl @@ -45,7 +45,7 @@ cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY") cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT") cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE") -cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ") +cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.") cpp_quote(" */") #include "autoversion.h" @@ -55,6 +55,7 @@ cpp_quote(" */") import "oaidl.idl"; import "ocidl.idl"; +#include "AccessibleComparable.idl" #include "WebScrollbarTypes.idl" #include "JavaScriptCoreAPITypes.idl" #include "IWebScriptObject.idl" @@ -88,6 +89,9 @@ import "ocidl.idl"; #include "IWebFrameLoadDelegatePrivate2.idl" #include "IWebFramePrivate.idl" #include "IWebFrameView.idl" +#include "IWebGeolocationPolicyListener.idl" +#include "IWebGeolocationPosition.idl" +#include "IWebGeolocationProvider.idl" #include "IWebHTMLRepresentation.idl" #include "IWebHTTPURLResponse.idl" #include "IWebHistory.idl" @@ -284,4 +288,10 @@ library WebKit coclass WebSerializedJSValue { [default] interface IWebSerializedJSValue; } + + [uuid(67712611-83CF-4703-89FC-07A0E2A19C0D)] + coclass WebGeolocationPosition { + [default] interface IWebGeolocationPosition; + } } + diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp index 9ee22db..5850605 100644 --- a/WebKit/win/WebCoreLocalizedStrings.cpp +++ b/WebKit/win/WebCoreLocalizedStrings.cpp @@ -28,6 +28,7 @@ #include <WebCore/IntSize.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/PlatformString.h> +#include <wtf/MathExtras.h> #include <wtf/RetainPtr.h> using namespace WebCore; @@ -91,6 +92,8 @@ String WebCore::AXTextFieldActionVerb() { return String(LPCTSTR_UI_STRING("activ String WebCore::AXCheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility")); } String WebCore::AXUncheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility")); } String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility")); } +String WebCore::AXMenuListActionVerb() { return String(LPCTSTR_UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility")); } +String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); } String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); } String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); } String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); } diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp index 6e82caf..a1bb3a8 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp @@ -30,6 +30,7 @@ #include "COMVariantSetter.h" #include "WebElementPropertyBag.h" #include "WebFrame.h" +#include "WebGeolocationPolicyListener.h" #include "WebHistory.h" #include "WebMutableURLRequest.h" #include "WebDesktopNotificationsDelegate.h" @@ -44,6 +45,8 @@ #include <WebCore/FloatRect.h> #include <WebCore/FrameLoadRequest.h> #include <WebCore/FrameView.h> +#include <WebCore/Geolocation.h> +#include <WebCore/HTMLNames.h> #include <WebCore/LocalizedStrings.h> #include <WebCore/NotImplemented.h> #include <WebCore/Page.h> @@ -748,10 +751,27 @@ bool WebChromeClient::setCursor(PlatformCursorHandle cursor) return true; } -void WebChromeClient::requestGeolocationPermissionForFrame(Frame*, Geolocation*) +void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) { - // See the comment in WebCore/page/ChromeClient.h - notImplemented(); + COMPtr<IWebUIDelegate> uiDelegate; + if (FAILED(m_webView->uiDelegate(&uiDelegate))) { + geolocation->setIsAllowed(false); + return; + } + + COMPtr<IWebUIDelegatePrivate2> uiDelegatePrivate2(Query, uiDelegate); + if (!uiDelegatePrivate2) { + geolocation->setIsAllowed(false); + return; + } + + COMPtr<WebSecurityOrigin> origin(AdoptCOM, WebSecurityOrigin::createInstance(frame->document()->securityOrigin())); + COMPtr<WebGeolocationPolicyListener> listener = WebGeolocationPolicyListener::createInstance(geolocation); + HRESULT hr = uiDelegatePrivate2->decidePolicyForGeolocationRequest(m_webView, kit(frame), origin.get(), listener.get()); + if (hr != E_NOTIMPL) + return; + + geolocation->setIsAllowed(false); } #if USE(ACCELERATED_COMPOSITING) @@ -773,3 +793,23 @@ COMPtr<IWebUIDelegate> WebChromeClient::uiDelegate() m_webView->uiDelegate(&delegate); return delegate; } + +#if ENABLE(VIDEO) + +bool WebChromeClient::supportsFullscreenForNode(const Node* node) +{ + return node->hasTagName(HTMLNames::videoTag); +} + +void WebChromeClient::enterFullscreenForNode(Node* node) +{ + m_webView->enterFullscreenForNode(node); +} + +void WebChromeClient::exitFullscreenForNode(Node*) +{ + m_webView->exitFullscreen(); +} + +#endif + diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h index e0c59ae..5198e7c 100644 --- a/WebKit/win/WebCoreSupport/WebChromeClient.h +++ b/WebKit/win/WebCoreSupport/WebChromeClient.h @@ -147,6 +147,12 @@ public: virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); +#if ENABLE(VIDEO) + virtual bool supportsFullscreenForNode(const WebCore::Node*); + virtual void enterFullscreenForNode(WebCore::Node*); + virtual void exitFullscreenForNode(WebCore::Node*); +#endif + #if ENABLE(NOTIFICATIONS) virtual WebCore::NotificationPresenter* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationPresenter*>(m_notificationsDelegate.get()); } #endif diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp index ca3a6c4..241c35d 100644 --- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp +++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp @@ -30,15 +30,14 @@ #include "WebLocalizableStrings.h" #include "WebView.h" -#pragma warning(push, 0) #include <WebCore/ContextMenu.h> #include <WebCore/Event.h> +#include <WebCore/Frame.h> #include <WebCore/FrameLoader.h> #include <WebCore/FrameLoadRequest.h> #include <WebCore/Page.h> #include <WebCore/ResourceRequest.h> #include <WebCore/NotImplemented.h> -#pragma warning(pop) #include <tchar.h> diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp index f822bfe..3f6eb07 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp @@ -33,6 +33,8 @@ #include "WebSecurityOrigin.h" #include "WebView.h" #include <WebCore/BString.h> +#include <WebCore/Document.h> +#include <WebCore/KURL.h> #if ENABLE(NOTIFICATIONS) @@ -170,10 +172,10 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin, notificationDelegate()->requestNotificationPermission(org); } -NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(SecurityOrigin* origin) +NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*) { int out = 0; - BString org(origin->toString()); + BString org(SecurityOrigin::create(url)->toString()); if (hasNotificationDelegate()) notificationDelegate()->checkNotificationPermission(org, &out); return (NotificationPresenter::Permission) out; diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h index 00c00d5..d30b1e7 100644 --- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h +++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h @@ -36,6 +36,11 @@ interface IWebDesktopNotificationPresenter; +namespace WebCore { +class Document; +class KURL; +} + class WebDesktopNotificationsDelegate : public WebCore::NotificationPresenter { public: WebDesktopNotificationsDelegate(WebView* view); @@ -45,7 +50,7 @@ public: virtual void cancel(WebCore::Notification* object); virtual void notificationObjectDestroyed(WebCore::Notification* object); virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback); - virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::SecurityOrigin* origin); + virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document); private: bool hasNotificationDelegate(); diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp new file mode 100644 index 0000000..db5ed90 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebGeolocationControllerClient.h" + +#include "WebGeolocationPosition.h" +#include "WebView.h" + +using namespace WebCore; + +WebGeolocationControllerClient::WebGeolocationControllerClient(WebView* webView) + : m_webView(webView) +{ +} + +void WebGeolocationControllerClient::geolocationDestroyed() +{ + delete this; +} + +void WebGeolocationControllerClient::startUpdating() +{ + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return; + provider->registerWebView(m_webView.get()); +} + +void WebGeolocationControllerClient::stopUpdating() +{ + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return; + provider->registerWebView(m_webView.get()); +} + +GeolocationPosition* WebGeolocationControllerClient::lastPosition() +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + COMPtr<IWebGeolocationProvider> provider; + if (FAILED(m_webView->geolocationProvider(&provider))) + return 0; + COMPtr<IWebGeolocationPosition> position; + if (FAILED(provider->lastPosition(&position))) + return 0; + return core(position.get()); +#else + return 0; +#endif +} diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h new file mode 100644 index 0000000..ec0bef7 --- /dev/null +++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebGeolocationControllerClient_h +#define WebGeolocationControllerClient_h + +#include "COMPtr.h" +#include <WebCore/GeolocationControllerClient.h> + +namespace WebCore { + class GeolocationPosition; +} + +class WebView; + +class WebGeolocationControllerClient : public WebCore::GeolocationControllerClient { +public: + WebGeolocationControllerClient(WebView*); + + virtual void geolocationDestroyed(); + virtual void startUpdating(); + virtual void stopUpdating(); + virtual WebCore::GeolocationPosition* lastPosition(); + +private: + COMPtr<WebView> m_webView; +}; + +#endif // WebGeolocationControllerClient_h diff --git a/WebKit/win/WebDataSource.cpp b/WebKit/win/WebDataSource.cpp index 6414bda..4ec1fd3 100644 --- a/WebKit/win/WebDataSource.cpp +++ b/WebKit/win/WebDataSource.cpp @@ -38,14 +38,12 @@ #include "WebMutableURLRequest.h" #include "WebResource.h" #include "WebURLResponse.h" - -#pragma warning(push, 0) #include <WebCore/BString.h> #include <WebCore/DocLoader.h> #include <WebCore/Document.h> +#include <WebCore/Frame.h> #include <WebCore/FrameLoader.h> #include <WebCore/KURL.h> -#pragma warning(pop) using namespace WebCore; diff --git a/WebKit/win/WebDropSource.cpp b/WebKit/win/WebDropSource.cpp index 294c337..8cf0588 100644 --- a/WebKit/win/WebDropSource.cpp +++ b/WebKit/win/WebDropSource.cpp @@ -29,9 +29,11 @@ #include "WebKitDLL.h" #include "WebView.h" +#include <WebCore/Cursor.h> #include <WebCore/DragActions.h> #include <WebCore/EventHandler.h> #include <WebCore/Frame.h> +#include <WebCore/FrameView.h> #include <WebCore/Page.h> #include <WebCore/PlatformMouseEvent.h> #include <wtf/CurrentTime.h> @@ -112,7 +114,43 @@ STDMETHODIMP WebDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyS return S_OK; } -STDMETHODIMP WebDropSource::GiveFeedback(DWORD) +STDMETHODIMP WebDropSource::GiveFeedback(DWORD dwEffect) { - return DRAGDROP_S_USEDEFAULTCURSORS; + BOOL showCustomCursors; + if (FAILED(WebPreferences::sharedStandardPreferences()->customDragCursorsEnabled(&showCustomCursors))) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // If we don't want to hide the stop icon, let Windows select the cursor. + if (!showCustomCursors) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // If we are going to show something other than the not allowed arrow, then let Windows + // show the cursor. + if (dwEffect != DROPEFFECT_NONE) + return DRAGDROP_S_USEDEFAULTCURSORS; + + HWND viewWindow; + if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow)))) + return DRAGDROP_S_USEDEFAULTCURSORS; + + RECT webViewRect; + GetWindowRect(viewWindow, &webViewRect); + + POINT cursorPoint; + GetCursorPos(&cursorPoint); + + if (!PtInRect(&webViewRect, cursorPoint)) { + // If our cursor is outside the bounds of the webView, we want to let Windows select the cursor. + return DRAGDROP_S_USEDEFAULTCURSORS; + } + + FrameView* view = m_webView->page()->mainFrame()->view(); + if (!view) + return DRAGDROP_S_USEDEFAULTCURSORS; + + // When dragging inside a WebView and the drag is not allowed, don't show the not allowed icon, + // instead, show the pointer cursor. + // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and drop (default to pointer). + view->setCursor(pointerCursor()); + return S_OK; } diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp index 9063fde..c0c1601 100644 --- a/WebKit/win/WebFrame.cpp +++ b/WebKit/win/WebFrame.cpp @@ -1278,13 +1278,17 @@ HRESULT WebFrame::elementIsPassword(IDOMElement *element, bool *result) return S_OK; } -HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result) +HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* outResultDistance, BOOL* outResultIsInCellAbove, BSTR* result) { if (!result) { ASSERT_NOT_REACHED(); return E_POINTER; } + if (outResultDistance) + *outResultDistance = 0; + if (outResultIsInCellAbove) + *outResultIsInCellAbove = FALSE; *result = 0; if (!cLabels) @@ -1303,11 +1307,18 @@ HRESULT WebFrame::searchForLabelsBeforeElement(const BSTR* labels, int cLabels, if (!coreElement) return E_FAIL; - String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement); + size_t resultDistance; + bool resultIsInCellAbove; + String label = coreFrame->searchForLabelsBeforeElement(labelStrings, coreElement, &resultDistance, &resultIsInCellAbove); *result = SysAllocStringLen(label.characters(), label.length()); if (label.length() && !*result) return E_OUTOFMEMORY; + if (outResultDistance) + *outResultDistance = resultDistance; + if (outResultIsInCellAbove) + *outResultIsInCellAbove = resultIsInCellAbove; + return S_OK; } @@ -1952,6 +1963,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::getPrintedPageCount( return S_OK; } +#if PLATFORM(CG) void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight) { int x = pageRect.x(); @@ -1968,7 +1980,6 @@ void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, con ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(pctx)), page+1, pageCount); } -#if PLATFORM(CG) void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount) { Frame* coreFrame = core(this); @@ -1985,7 +1996,6 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt CGContextBeginPage(pctx, &mediaBox); - // FIXME: Could some of this coordinate space manipulation be shared with Cairo? CGFloat scale = static_cast<float>(mediaBox.size.width)/static_cast<float>(pageRect.width()); CGAffineTransform ctm = CGContextGetBaseCTM(pctx); ctm = CGAffineTransformScale(ctm, -scale, -scale); @@ -2008,29 +2018,72 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt CGContextRestoreGState(pctx); } #elif PLATFORM(CAIRO) +static float scaleFactor(HDC printDC, const IntRect& pageRect) +{ + const IntRect& printRect = printerRect(printDC); + + float scale = static_cast<float>(printRect.width()) / static_cast<float>(pageRect.width()); + if (!scale) + scale = 1.0; + + return scale; +} + +static HDC hdcFromContext(PlatformGraphicsContext* pctx) +{ + cairo_surface_t* surface = cairo_get_target(pctx); + return cairo_win32_surface_get_dc(surface); +} + +void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, float headerHeight) +{ + HDC hdc = hdcFromContext(pctx); + + const float scale = scaleFactor(hdc, pageRect); + int x = static_cast<int>(scale * pageRect.x()); + int y = 0; + RECT headerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * headerHeight)}; + + ui->drawHeaderInRect(d->webView, &headerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc))); +} + +void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight) +{ + HDC hdc = hdcFromContext(pctx); + + const float scale = scaleFactor(hdc, pageRect); + int x = static_cast<int>(scale * pageRect.x()); + int y = static_cast<int>(scale * max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight-static_cast<int>(footerHeight))); + RECT footerRect = {x, y, x + static_cast<int>(scale * pageRect.width()), y + static_cast<int>(scale * footerHeight)}; + + ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)), page+1, pageCount); +} + void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount) { Frame* coreFrame = core(this); - IntRect pageRect = m_pageRects[page]; + const IntRect& pageRect = m_pageRects[page]; + IntRect marginRect = printerMarginRect(printDC); cairo_save(pctx); + float scale = scaleFactor(printDC, pageRect); + cairo_scale(pctx, scale, scale); - IntRect printRect = printerRect(printDC); - IntRect mediaBox(0, 0, printRect.width(), printRect.height()); + cairo_translate(pctx, -pageRect.x() + marginRect.x(), -pageRect.y() + marginRect.y() + headerHeight); + coreFrame->view()->paintContents(spoolCtx, pageRect); - ::StartPage(printDC); + cairo_translate(pctx, pageRect.x() - marginRect.x(), pageRect.y() - marginRect.y() - headerHeight); - // FIXME: Could some of this coordinate space manipulation be shared with CG? - float scale = static_cast<float>(mediaBox.size().width())/static_cast<float>(pageRect.width()); - cairo_scale(pctx, -scale, -scale); - cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight); - cairo_scale(pctx, scale, scale); - cairo_translate(pctx, -pageRect.x(), -pageRect.y()+headerHeight); // reserves space for header + XFORM originalWorld; + ::GetWorldTransform(printDC, &originalWorld); - coreFrame->view()->paintContents(spoolCtx, pageRect); + // Position world transform to account for margin + XFORM newWorld = originalWorld; + newWorld.eDx = scale * marginRect.x(); + newWorld.eDy = scale * marginRect.y(); - cairo_translate(pctx, pageRect.x(), pageRect.y()-headerHeight); + ::SetWorldTransform(printDC, &newWorld); if (headerHeight) drawHeader(pctx, ui, pageRect, headerHeight); @@ -2038,8 +2091,10 @@ void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCt if (footerHeight) drawFooter(pctx, ui, pageRect, page, pageCount, headerHeight, footerHeight); + ::SetWorldTransform(printDC, &originalWorld); + cairo_show_page(pctx); - ::EndPage(printDC); + ASSERT(!cairo_status(pctx)); cairo_restore(pctx); } #endif @@ -2050,10 +2105,25 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages( /* [in] */ UINT endPage, /* [retval][out] */ void* ctx) { +#if PLATFORM(CG) if (!printDC || !ctx) { ASSERT_NOT_REACHED(); return E_POINTER; } +#elif PLATFORM(CAIRO) + if (!printDC) { + ASSERT_NOT_REACHED(); + return E_POINTER; + } + + cairo_surface_t* printSurface = cairo_win32_printing_surface_create(printDC); + ctx = cairo_create(printSurface); + if (!ctx) { + cairo_surface_destroy(printSurface); + return E_FAIL; + } + cairo_surface_set_fallback_resolution(printSurface, 72.0, 72.0); +#endif if (!m_inPrintingMode) { ASSERT_NOT_REACHED(); @@ -2089,7 +2159,14 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoolPages( for (UINT ii = startPage; ii < endPage; ii++) spoolPage(pctx, &spoolCtx, printDC, ui.get(), headerHeight, footerHeight, ii, pageCount); - + +#if PLATFORM(CAIRO) + cairo_destroy(pctx); + cairo_surface_finish(printSurface); + ASSERT(!cairo_surface_status(printSurface)); + cairo_surface_destroy(printSurface); +#endif + return S_OK; } diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h index 91b8e14..1a92751 100644 --- a/WebKit/win/WebFrame.h +++ b/WebKit/win/WebFrame.h @@ -336,7 +336,7 @@ public: HRESULT formForElement(IDOMElement* element, IDOMElement** form); HRESULT controlsInForm(IDOMElement* form, IDOMElement** controls, int* cControls); HRESULT elementIsPassword(IDOMElement* element, bool* result); - HRESULT searchForLabelsBeforeElement(const BSTR* labels, int cLabels, IDOMElement* beforeElement, BSTR* result); + HRESULT searchForLabelsBeforeElement(const BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result); HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result); HRESULT canProvideDocumentSource(bool* result); diff --git a/WebKit/win/WebGeolocationPolicyListener.cpp b/WebKit/win/WebGeolocationPolicyListener.cpp new file mode 100644 index 0000000..d16f892 --- /dev/null +++ b/WebKit/win/WebGeolocationPolicyListener.cpp @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2010 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebGeolocationPolicyListener.h" + +#include <WebCore/Geolocation.h> + +using namespace WebCore; + +// WebGeolocationPolicyListener ---------------------------------------------------------------- + +COMPtr<WebGeolocationPolicyListener> WebGeolocationPolicyListener::createInstance(PassRefPtr<Geolocation> geolocation) +{ + return new WebGeolocationPolicyListener(geolocation); +} + +WebGeolocationPolicyListener::WebGeolocationPolicyListener(PassRefPtr<Geolocation> geolocation) + : m_refCount(0) + , m_geolocation(geolocation) +{ + gClassCount++; + gClassNameCount.add("WebGeolocationPolicyListener"); +} + +WebGeolocationPolicyListener::~WebGeolocationPolicyListener() +{ + gClassCount--; + gClassNameCount.remove("WebGeolocationPolicyListener"); +} + +// IUnknown ------------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualIID(riid, __uuidof(IUnknown))) + *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this); + else if (IsEqualIID(riid, __uuidof(IWebGeolocationPolicyListener))) + *ppvObject = static_cast<IWebGeolocationPolicyListener*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::AddRef() +{ + return ++m_refCount; +} + +ULONG STDMETHODCALLTYPE WebGeolocationPolicyListener::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete this; + + return newRef; +} + +// IWebPolicyDecisionListener ------------------------------------------------------------ + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::allow() +{ + m_geolocation->setIsAllowed(true); + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebGeolocationPolicyListener::deny() +{ + m_geolocation->setIsAllowed(false); + return S_OK; +} diff --git a/WebKit/win/WebGeolocationPolicyListener.h b/WebKit/win/WebGeolocationPolicyListener.h new file mode 100644 index 0000000..636c5f5 --- /dev/null +++ b/WebKit/win/WebGeolocationPolicyListener.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2010 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebGeolocationPolicyListener_h +#define WebGeolocationPolicyListener_h + +#include "WebKit.h" + +#include <WebCore/COMPtr.h> + +#include <WTF/PassRefPtr.h> +#include <WTF/RefPtr.h> + +namespace WebCore { + class Geolocation; +} + +class WebGeolocationPolicyListener : public IWebGeolocationPolicyListener { +public: + static COMPtr<WebGeolocationPolicyListener> createInstance(PassRefPtr<WebCore::Geolocation>); + + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebGeolocationPolicyListener + virtual HRESULT STDMETHODCALLTYPE allow(); + virtual HRESULT STDMETHODCALLTYPE deny(); + +private: + WebGeolocationPolicyListener(PassRefPtr<WebCore::Geolocation>); + ~WebGeolocationPolicyListener(); + + ULONG m_refCount; + RefPtr<WebCore::Geolocation> m_geolocation; +}; + +#endif WebGeolocationPolicyListener_h diff --git a/WebKit/win/WebGeolocationPosition.cpp b/WebKit/win/WebGeolocationPosition.cpp new file mode 100644 index 0000000..26554dd --- /dev/null +++ b/WebKit/win/WebGeolocationPosition.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebKitDLL.h" +#include "WebGeolocationPosition.h" +#include <WebCore/COMPtr.h> + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#include <WebCore/GeolocationPosition.h> + +using namespace WebCore; +#endif + +COMPtr<WebGeolocationPosition> WebGeolocationPosition::createInstance() +{ + return new WebGeolocationPosition; +} + +WebGeolocationPosition::WebGeolocationPosition() + : m_refCount(0) +{ + gClassCount++; + gClassNameCount.add("WebGeolocationPosition"); +} + +WebGeolocationPosition::~WebGeolocationPosition() +{ + gClassCount--; + gClassNameCount.remove("WebGeolocationPosition"); +} + +HRESULT WebGeolocationPosition::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualIID(riid, __uuidof(WebGeolocationPosition))) + *ppvObject = this; + else if (IsEqualIID(riid, __uuidof(IUnknown))) + *ppvObject = static_cast<IWebGeolocationPosition*>(this); + else if (IsEqualIID(riid, __uuidof(IWebGeolocationPosition))) + *ppvObject = static_cast<IWebGeolocationPosition*>(this); + else + return E_NOINTERFACE; + + AddRef(); + return S_OK; +} + +ULONG WebGeolocationPosition::AddRef() +{ + return ++m_refCount; +} + +ULONG WebGeolocationPosition::Release() +{ + ULONG newRef = --m_refCount; + if (!newRef) + delete this; + + return newRef; +} + +HRESULT WebGeolocationPosition::initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + m_position = GeolocationPosition::create(timestamp, latitude, longitude, accuracy); + return S_OK; +#else + return E_FAIL; +#endif +} + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +GeolocationPosition* core(IWebGeolocationPosition* position) +{ + if (!position) + return 0; + + COMPtr<WebGeolocationPosition> webGeolocationPosition(Query, position); + if (!webGeolocationPosition) + return 0; + + return webGeolocationPosition->impl(); +} +#endif diff --git a/WebKit/win/WebGeolocationPosition.h b/WebKit/win/WebGeolocationPosition.h new file mode 100644 index 0000000..8160270 --- /dev/null +++ b/WebKit/win/WebGeolocationPosition.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebGeolocationPosition_h +#define WebGeolocationPosition_h + +#include "WebKit.h" +#include <WebCore/COMPtr.h> + +namespace WebCore { + class GeolocationPosition; +}; + +class WebGeolocationPosition : public IWebGeolocationPosition { +public: + static COMPtr<WebGeolocationPosition> createInstance(); +private: + WebGeolocationPosition(); + ~WebGeolocationPosition(); + +public: + // IUnknown + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); + virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE Release(); + + // IWebGeolocationPosition + virtual HRESULT STDMETHODCALLTYPE initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy); + +#if ENABLE(CLIENT_BASED_GEOLOCATION) + WebCore::GeolocationPosition* impl() const { return m_position.get(); } +#endif + +private: + ULONG m_refCount; +#if ENABLE(CLIENT_BASED_GEOLOCATION) + RefPtr<WebCore::GeolocationPosition> m_position; +#endif +}; + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +WebCore::GeolocationPosition* core(IWebGeolocationPosition*); +#endif + +#endif // WebGeolocationPosition_h diff --git a/WebKit/win/WebHTMLRepresentation.cpp b/WebKit/win/WebHTMLRepresentation.cpp index 5e5d56b..dd5813d 100644 --- a/WebKit/win/WebHTMLRepresentation.cpp +++ b/WebKit/win/WebHTMLRepresentation.cpp @@ -30,11 +30,10 @@ #include "WebKit.h" #include "WebFrame.h" #include "WebKitStatisticsPrivate.h" -#pragma warning(push, 0) #include <WebCore/BString.h> +#include <WebCore/Frame.h> #include <WebCore/HTMLInputElement.h> #include <WebCore/TextResourceDecoder.h> -#pragma warning(pop) using namespace WebCore; @@ -104,7 +103,7 @@ ULONG STDMETHODCALLTYPE WebHTMLRepresentation::Release() // IWebHTMLRepresentation -------------------------------------------------------------------- -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -112,7 +111,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -120,7 +119,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedNonImageMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( /* [out][in] */ BSTR* /*types*/, /* [out][in] */ int* /*cTypes*/) { @@ -128,7 +127,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::supportedImageMIMETypes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( /* [in] */ IDOMNode* /*startNode*/, /* [in] */ int /*startOffset*/, /* [in] */ IDOMNode* /*endNode*/, @@ -139,7 +138,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::attributedStringFromDOMNodes( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( /* [in] */ BSTR name, /* [in] */ IDOMElement* form, /* [retval][out] */ IDOMElement** element) @@ -150,7 +149,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementWithName( return m_frame->elementWithName(name, form, element); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result) { @@ -160,7 +159,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementDoesAutoComplete( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result) { @@ -170,7 +169,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::elementIsPassword( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( /* [in] */ IDOMElement* element, /* [retval][out] */ IDOMElement** form) { @@ -180,7 +179,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::formForElement( return m_frame->formForElement(element, form); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( /* [retval][out] */ IDOMElement** form) { if (!m_frame) @@ -189,7 +188,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::currentForm( return m_frame->currentForm(form); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( /* [in] */ IDOMElement* form, /* [out][in] */ IDOMElement** controls, /* [out][in] */ int* cControls) @@ -197,16 +196,16 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::controlsInForm( return m_frame->controlsInForm(form, controls, cControls); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::searchForLabels( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::deprecatedSearchForLabels( /* [size_is][in] */ BSTR* labels, /* [in] */ int cLabels, /* [in] */ IDOMElement* beforeElement, /* [retval][out] */ BSTR* result) { - return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, result); + return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, 0, 0, result); } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( /* [size_is][in] */ BSTR* labels, /* [in] */ int cLabels, /* [in] */ IDOMElement* againstElement, @@ -215,16 +214,21 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::matchLabels( return m_frame->matchLabelsAgainstElement(labels, cLabels, againstElement, result); } +HRESULT WebHTMLRepresentation::searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result) +{ + return m_frame->searchForLabelsBeforeElement(labels, cLabels, beforeElement, resultDistance, resultIsInCellAbove, result); +} + // IWebDocumentRepresentation ---------------------------------------------------------------- -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::setDataSource( /* [in] */ IWebDataSource* /*dataSource*/) { ASSERT_NOT_REACHED(); return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( /* [in] */ IStream* /*data*/, /* [in] */ IWebDataSource* /*dataSource*/) { @@ -232,7 +236,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedData( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( /* [in] */ IWebError* /*error*/, /* [in] */ IWebDataSource* /*dataSource*/) { @@ -240,14 +244,14 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::receivedError( return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::finishedLoadingWithDataSource( /* [in] */ IWebDataSource* /*dataSource*/) { ASSERT_NOT_REACHED(); return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( /* [retval][out] */ BOOL* result) { bool canProvideSource; @@ -256,7 +260,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::canProvideDocumentSource( return hr; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( /* [retval][out] */ BSTR* source) { if (!source) @@ -307,7 +311,7 @@ HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::documentSource( return S_OK; } -HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title( +HRESULT STDMETHODCALLTYPE WebHTMLRepresentation::title( /* [retval][out] */ BSTR* /*docTitle*/) { ASSERT_NOT_REACHED(); diff --git a/WebKit/win/WebHTMLRepresentation.h b/WebKit/win/WebHTMLRepresentation.h index 01b8988..4d5eade 100644 --- a/WebKit/win/WebHTMLRepresentation.h +++ b/WebKit/win/WebHTMLRepresentation.h @@ -45,84 +45,87 @@ public: virtual ULONG STDMETHODCALLTYPE Release(); // IWebHTMLRepresentation - virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedNonImageMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes( + virtual HRESULT STDMETHODCALLTYPE supportedImageMIMETypes( /* [out][in] */ BSTR* types, /* [out][in] */ int* cTypes); - virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes( + virtual HRESULT STDMETHODCALLTYPE attributedStringFromDOMNodes( /* [in] */ IDOMNode* startNode, /* [in] */ int startOffset, /* [in] */ IDOMNode* endNode, /* [in] */ int endOffset, /* [retval][out] */ IDataObject** attributedString); - virtual HRESULT STDMETHODCALLTYPE elementWithName( + virtual HRESULT STDMETHODCALLTYPE elementWithName( /* [in] */ BSTR name, /* [in] */ IDOMElement* form, /* [retval][out] */ IDOMElement** element); - virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete( + virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE elementIsPassword( + virtual HRESULT STDMETHODCALLTYPE elementIsPassword( /* [in] */ IDOMElement* element, /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE formForElement( + virtual HRESULT STDMETHODCALLTYPE formForElement( /* [in] */ IDOMElement* element, /* [retval][out] */ IDOMElement** form); - virtual HRESULT STDMETHODCALLTYPE currentForm( + virtual HRESULT STDMETHODCALLTYPE currentForm( /* [retval][out] */ IDOMElement** form); - virtual HRESULT STDMETHODCALLTYPE controlsInForm( + virtual HRESULT STDMETHODCALLTYPE controlsInForm( /* [in] */ IDOMElement* form, /* [out][in] */ IDOMElement** controls, /* [out][in] */ int* cControls); - virtual HRESULT STDMETHODCALLTYPE searchForLabels( + /* Deprecated. Use the variant that includes resultDistance and resultIsInCellAbove instead. */ + virtual HRESULT STDMETHODCALLTYPE deprecatedSearchForLabels( /* [size_is][in] */ BSTR *labels, /* [in] */ int cLabels, /* [in] */ IDOMElement *beforeElement, /* [retval][out] */ BSTR *result); - virtual HRESULT STDMETHODCALLTYPE matchLabels( + virtual HRESULT STDMETHODCALLTYPE matchLabels( /* [size_is][in] */ BSTR *labels, /* [in] */ int cLabels, /* [in] */ IDOMElement *againstElement, /* [retval][out] */ BSTR *result); + virtual HRESULT STDMETHODCALLTYPE searchForLabels(BSTR* labels, unsigned cLabels, IDOMElement* beforeElement, unsigned* resultDistance, BOOL* resultIsInCellAbove, BSTR* result); + // IWebDocumentRepresentation - virtual HRESULT STDMETHODCALLTYPE setDataSource( + virtual HRESULT STDMETHODCALLTYPE setDataSource( /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE receivedData( + virtual HRESULT STDMETHODCALLTYPE receivedData( /* [in] */ IStream* data, /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE receivedError( + virtual HRESULT STDMETHODCALLTYPE receivedError( /* [in] */ IWebError* error, /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource( + virtual HRESULT STDMETHODCALLTYPE finishedLoadingWithDataSource( /* [in] */ IWebDataSource* dataSource); - virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource( + virtual HRESULT STDMETHODCALLTYPE canProvideDocumentSource( /* [retval][out] */ BOOL* result); - virtual HRESULT STDMETHODCALLTYPE documentSource( + virtual HRESULT STDMETHODCALLTYPE documentSource( /* [retval][out] */ BSTR* source); - virtual HRESULT STDMETHODCALLTYPE title( + virtual HRESULT STDMETHODCALLTYPE title( /* [retval][out] */ BSTR* docTitle); protected: diff --git a/WebKit/win/WebKit.vcproj/DerivedSources.make b/WebKit/win/WebKit.vcproj/DerivedSources.make deleted file mode 100644 index 73648a0..0000000 --- a/WebKit/win/WebKit.vcproj/DerivedSources.make +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (C) 2007 Apple Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of -# its contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PREFIX = IGEN_DOM - -WEBKIT_IDL = $(WEBKIT)/Interfaces/WebKit.idl - -HAND_WRITTEN_INTERFACES = $(filter-out $(WEBKIT_IDL), $(wildcard $(WEBKIT)/Interfaces/*.idl)) - -GENERATED_INTERFACES = \ - $(PREFIX)Node.idl \ - $(PREFIX)Attr.idl \ - $(PREFIX)NodeList.idl \ - $(PREFIX)Element.idl \ - $(PREFIX)Document.idl \ - $(PREFIX)CharacterData.idl \ - $(PREFIX)CDATASection.idl \ - $(PREFIX)Comment.idl \ - $(PREFIX)Text.idl \ - $(PREFIX)DocumentFragment.idl \ - $(PREFIX)DocumentType.idl \ - $(PREFIX)DOMImplementation.idl \ - $(PREFIX)Entity.idl \ - $(PREFIX)EntityReference.idl \ - $(PREFIX)NamedNodeMap.idl \ - $(PREFIX)Notation.idl \ - $(PREFIX)ProcessingInstruction.idl \ - \ - $(PREFIX)HTMLAnchorElement.idl \ - $(PREFIX)HTMLAppletElement.idl \ - $(PREFIX)HTMLAreaElement.idl \ - $(PREFIX)HTMLBRElement.idl \ - $(PREFIX)HTMLBaseElement.idl \ - $(PREFIX)HTMLBaseFontElement.idl \ - $(PREFIX)HTMLBlockquoteElement.idl \ - $(PREFIX)HTMLBodyElement.idl \ - $(PREFIX)HTMLButtonElement.idl \ - $(PREFIX)HTMLCollection.idl \ - $(PREFIX)HTMLDListElement.idl \ - $(PREFIX)HTMLDirectoryElement.idl \ - $(PREFIX)HTMLDivElement.idl \ - $(PREFIX)HTMLDocument.idl \ - $(PREFIX)HTMLElement.idl \ - $(PREFIX)HTMLEmbedElement.idl \ - $(PREFIX)HTMLFieldSetElement.idl \ - $(PREFIX)HTMLFontElement.idl \ - $(PREFIX)HTMLFormElement.idl \ - $(PREFIX)HTMLFrameElement.idl \ - $(PREFIX)HTMLFrameSetElement.idl \ - $(PREFIX)HTMLHRElement.idl \ - $(PREFIX)HTMLHeadElement.idl \ - $(PREFIX)HTMLHeadingElement.idl \ - $(PREFIX)HTMLHtmlElement.idl \ - $(PREFIX)HTMLIFrameElement.idl \ - $(PREFIX)HTMLImageElement.idl \ - $(PREFIX)HTMLInputElement.idl \ - $(PREFIX)HTMLIsIndexElement.idl \ - $(PREFIX)HTMLLIElement.idl \ - $(PREFIX)HTMLLabelElement.idl \ - $(PREFIX)HTMLLegendElement.idl \ - $(PREFIX)HTMLLinkElement.idl \ - $(PREFIX)HTMLMapElement.idl \ - $(PREFIX)HTMLMarqueeElement.idl \ - $(PREFIX)HTMLMenuElement.idl \ - $(PREFIX)HTMLMetaElement.idl \ - $(PREFIX)HTMLModElement.idl \ - $(PREFIX)HTMLOListElement.idl \ - $(PREFIX)HTMLObjectElement.idl \ - $(PREFIX)HTMLOptGroupElement.idl \ - $(PREFIX)HTMLOptionElement.idl \ - $(PREFIX)HTMLOptionsCollection.idl \ - $(PREFIX)HTMLParagraphElement.idl \ - $(PREFIX)HTMLParamElement.idl \ - $(PREFIX)HTMLPreElement.idl \ - $(PREFIX)HTMLQuoteElement.idl \ - $(PREFIX)HTMLScriptElement.idl \ - $(PREFIX)HTMLSelectElement.idl \ - $(PREFIX)HTMLStyleElement.idl \ - $(PREFIX)HTMLTableCaptionElement.idl \ - $(PREFIX)HTMLTableCellElement.idl \ - $(PREFIX)HTMLTableColElement.idl \ - $(PREFIX)HTMLTableElement.idl \ - $(PREFIX)HTMLTableRowElement.idl \ - $(PREFIX)HTMLTableSectionElement.idl \ - $(PREFIX)HTMLTextAreaElement.idl \ - $(PREFIX)HTMLTitleElement.idl \ - $(PREFIX)HTMLUListElement.idl \ - \ - $(PREFIX)CSSCharsetRule.idl \ - $(PREFIX)CSSFontFaceRule.idl \ - $(PREFIX)CSSImportRule.idl \ - $(PREFIX)CSSMediaRule.idl \ - $(PREFIX)CSSPageRule.idl \ - $(PREFIX)CSSPrimitiveValue.idl \ - $(PREFIX)CSSRule.idl \ - $(PREFIX)CSSRuleList.idl \ - $(PREFIX)CSSStyleDeclaration.idl \ - $(PREFIX)CSSStyleRule.idl \ - $(PREFIX)CSSStyleSheet.idl \ - $(PREFIX)CSSUnknownRule.idl \ - $(PREFIX)CSSValue.idl \ - $(PREFIX)CSSValueList.idl \ - $(PREFIX)Counter.idl \ - $(PREFIX)MediaList.idl \ - $(PREFIX)Rect.idl \ - $(PREFIX)StyleSheet.idl \ - $(PREFIX)StyleSheetList.idl \ - \ - $(PREFIX)Event.idl \ - $(PREFIX)EventTarget.idl \ - $(PREFIX)EventListener.idl \ -# - -.PHONY : all -all : \ - $(GENERATED_INTERFACES) \ - $(WEBKIT_IDL) \ -# - -# $(PREFIX)CanvasGradient.idl \ -# $(PREFIX)CanvasPattern.idl \ -# $(PREFIX)CanvasRenderingContext2D.idl \ -# $(PREFIX)HTMLCanvasElement.idl \ -# $(PREFIX)RGBColor.idl \ - -COM_BINDINGS_SCRIPTS = \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGenerator.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/CodeGeneratorCOM.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLParser.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/IDLStructure.pm \ - $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl \ -# - -$(PREFIX)%.idl : $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/%.idl $(COM_BINDINGS_SCRIPTS) - perl -I $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_COM" --generator COM --include $(WEBKIT_OUTPUT)/obj/WebKit/DOMInterfaces/ --outputdir . $< - -$(WEBKIT_IDL) : $(HAND_WRITTEN_INTERFACES) $(GENERATED_INTERFACES) - touch $@ diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj index ca9b2a4..c6a0add 100644 --- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj +++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj @@ -19,7 +19,7 @@ Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -86,7 +86,7 @@ Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\include\WebKit"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -152,6 +152,26 @@ </References>
<Files>
<File
+ RelativePath="..\Interfaces\AccessibleComparable.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\DOMCore.idl"
>
<FileConfiguration
@@ -764,6 +784,66 @@ </FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebGeolocationPolicyListener.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationPosition.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebGeolocationProvider.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebHistory.idl"
>
<FileConfiguration
@@ -1644,47 +1724,47 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebKit.idl"
+ RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
+ ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
- GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\WebScrollbarTypes.idl"
+ RelativePath="..\Interfaces\WebKit.idl"
>
<FileConfiguration
Name="Debug|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
- ExcludedFromBuild="true"
>
<Tool
Name="VCMIDLTool"
+ GenerateTypeLibrary="true"
/>
</FileConfiguration>
</File>
- <File
- RelativePath="..\Interfaces\JavaScriptCoreAPITypes.idl"
+ <File
+ RelativePath="..\Interfaces\WebScrollbarTypes.idl"
>
<FileConfiguration
Name="Debug|Win32"
diff --git a/WebKit/win/WebKit.vcproj/WebKit.rc b/WebKit/win/WebKit.vcproj/WebKit.rc index 3d00011..fa57ca3 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.rc +++ b/WebKit/win/WebKit.vcproj/WebKit.rc @@ -42,7 +42,7 @@ BEGIN VALUE "FileVersion", __VERSION_TEXT__ VALUE "CompanyName", "Apple Inc." VALUE "InternalName", "WebKit" - VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2009" + VALUE "LegalCopyright", "Copyright Apple Inc. 2003-2010" VALUE "OriginalFilename", "WebKit.dll" VALUE "ProductName", "WebKit" VALUE "ProductVersion", __BUILD_NUMBER_SHORT__ @@ -81,4 +81,9 @@ IDR_SEARCH_CANCEL PNG "searchCancel.png" IDR_SEARCH_CANCEL_PRESSED PNG "searchCancelPressed.png" IDR_SEARCH_MAGNIFIER PNG "searchMagnifier.png" IDR_SEARCH_MAGNIFIER_RESULTS PNG "searchMagnifierResults.png" +IDR_FS_VIDEO_AUDIO_VOLUME_HIGH PNG "fsVideoAudioVolumeHigh.png" +IDR_FS_VIDEO_AUDIO_VOLUME_LOW PNG "fsVideoAudioVolumeLow.png" +IDR_FS_VIDEO_EXIT_FULLSCREEN PNG "fsVideoExitFullscreen.png" +IDR_FS_VIDEO_PAUSE PNG "fsVideoPause.png" +IDR_FS_VIDEO_PLAY PNG "fsVideoPlay.png" diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln index 433bf4c..3b641fd 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.sln +++ b/WebKit/win/WebKit.vcproj/WebKit.sln @@ -80,218 +80,161 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScr EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\..\WebKitTools\record-memory-win\record-memory-win.vcproj", "{44B9C152-1870-4035-B94D-7B3285AA0C12}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitAPITest", "..\..\..\WebKitTools\WebKitAPITest\WebKitAPITest.vcproj", "{626089A3-25D3-4883-A96C-B8C66E036397}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1} = {6567DFD4-D6DE-4CD5-825D-17E353D160E1}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_All|Win32 = Debug_All|Win32
Debug_Cairo|Win32 = Debug_Cairo|Win32
- Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
Release_Cairo|Win32 = Release_Cairo|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = all|Win32
- {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.ActiveCfg = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.Build.0 = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.ActiveCfg = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.Build.0 = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.ActiveCfg = Release|Win32
- {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.Build.0 = Release|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.Build.0 = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.ActiveCfg = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj index 5846813..57d1da2 100644 --- a/WebKit/win/WebKit.vcproj/WebKit.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj @@ -18,7 +18,7 @@ <Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -39,8 +39,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -61,9 +61,9 @@ Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -94,7 +94,7 @@ <Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -116,8 +116,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -138,9 +138,9 @@ Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -171,7 +171,7 @@ <Configuration
Name="Debug_Internal|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -192,8 +192,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -217,7 +217,7 @@ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
/>
<Tool
Name="VCALinkTool"
@@ -248,7 +248,7 @@ <Configuration
Name="Debug_Cairo|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_wincairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
>
<Tool
@@ -269,8 +269,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -327,7 +327,7 @@ OutputDirectory="$(WebKitOutputDir)\bin"
IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;$(WebKitLibrariesDir)\tools\vsprops\WinCairo.vsprops;$(WebKitLibrariesDir)\tools\vsprops\cURL.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -349,8 +349,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
DisableSpecificWarnings="4819"
@@ -404,7 +404,7 @@ <Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
@@ -425,8 +425,8 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitOutputDir)\Include\icu";"$(WebKitLibrariesDir)\Include\icu";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders";"$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
- PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_FILTERS;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SHARED_WORKERS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_VIDEO;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+ AdditionalIncludeDirectories=""$(WebKitOutputDir)\include\WebKit";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include\JavaScriptCore";"$(WebKitLibrariesDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(ProjectDir)\..";"$(ProjectDir)";"$(ProjectDir)\..\WebCoreSupport";"$(IntDir)\include";"$(WebKitOutputDir)\obj\WebKit\DerivedSources""
+ PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
Detect64BitPortabilityProblems="false"
@@ -448,7 +448,7 @@ Name="VCLinkerTool"
AdditionalDependencies="delayimp.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib usp10.lib comctl32.lib version.lib shlwapi.lib libxml2$(LibraryConfigSuffix).lib libxslt$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib SQLite3$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib JavaScriptCore$(WebKitDLLConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebCore$(WebKitConfigSuffix).lib WebKitSystemInterface$(WebKitConfigSuffix).lib msimg32.lib QTMovieWin$(WebKitConfigSuffix).lib crypt32.lib iphlpapi.lib winmm.lib rpcrt4.lib comsuppw.lib"
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- AdditionalLibraryDirectories=""
+ AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
@@ -582,6 +582,10 @@ >
</File>
<File
+ RelativePath="..\FullscreenVideoController.h"
+ >
+ </File>
+ <File
RelativePath="..\MarshallingHelpers.h"
>
</File>
@@ -662,6 +666,14 @@ >
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.h"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.h"
>
</File>
@@ -722,14 +734,6 @@ >
</File>
<File
- RelativePath="..\WebScriptWorld.h"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.h"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.h"
>
</File>
@@ -802,6 +806,10 @@ >
</File>
<File
+ RelativePath="..\WebScriptWorld.h"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.h"
>
</File>
@@ -810,6 +818,10 @@ >
</File>
<File
+ RelativePath="..\WebSerializedJSValue.h"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.h"
>
</File>
@@ -894,6 +906,10 @@ >
</File>
<File
+ RelativePath="..\FullscreenVideoController.cpp"
+ >
+ </File>
+ <File
RelativePath="..\MemoryStream.cpp"
>
</File>
@@ -1070,6 +1086,14 @@ >
</File>
<File
+ RelativePath="..\WebGeolocationPolicyListener.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebGeolocationPosition.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebHistory.cpp"
>
</File>
@@ -1102,14 +1126,6 @@ >
</File>
<File
- RelativePath="..\WebScriptWorld.cpp"
- >
- </File>
- <File
- RelativePath="..\WebSerializedJSValue.cpp"
- >
- </File>
- <File
RelativePath="..\WebKitStatistics.cpp"
>
</File>
@@ -1146,6 +1162,10 @@ >
</File>
<File
+ RelativePath="..\WebScriptWorld.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebScrollBar.cpp"
>
</File>
@@ -1154,6 +1174,10 @@ >
</File>
<File
+ RelativePath="..\WebSerializedJSValue.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebTextRenderer.cpp"
>
</File>
@@ -1246,6 +1270,26 @@ Name="Resources"
>
<File
+ RelativePath=".\fsVideoAudioVolumeHigh.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoAudioVolumeLow.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoExitFullscreen.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPause.png"
+ >
+ </File>
+ <File
+ RelativePath=".\fsVideoPlay.png"
+ >
+ </File>
+ <File
RelativePath=".\missingImage.png"
>
</File>
@@ -1438,6 +1482,14 @@ >
</File>
<File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WebCoreSupport\WebGeolocationControllerClient.h"
+ >
+ </File>
+ <File
RelativePath="..\WebCoreSupport\WebInspectorClient.cpp"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj index ab7a0b2..b2b708e 100644 --- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj +++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj @@ -19,7 +19,7 @@ Name="Debug|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@ Name="Release|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -140,7 +140,7 @@ Name="Debug_Internal|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
CharacterSet="1"
>
<Tool
@@ -200,7 +200,7 @@ Name="Debug_All|Win32"
OutputDirectory="$(WebKitOutputDir)\lib"
ConfigurationType="4"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\FeatureDefines.vsprops;$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/WebKit/win/WebKit.vcproj/build-generated-files.sh b/WebKit/win/WebKit.vcproj/build-generated-files.sh deleted file mode 100644 index ac26fd2..0000000 --- a/WebKit/win/WebKit.vcproj/build-generated-files.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/bash - -# Copyright (C) 2007 Apple Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of -# its contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -NUMCPUPATH="../../../WebKitTools/Scripts/num-cpus" -if [ -x $NUMCPUPATH ]; then - NUMCPUS=`$NUMCPUPATH` -else - NUMCPUS=1 -fi - -XSRCROOT="`pwd`/.." -XSRCROOT=`realpath "$XSRCROOT"` -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XSRCROOT=`cygpath -m -s "$XSRCROOT"` -XSRCROOT=`cygpath -u "$XSRCROOT"` -export XSRCROOT -export SOURCE_ROOT=$XSRCROOT - -XDSTROOT="$1" -export XDSTROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XDSTROOT=`cygpath -m -s "$XDSTROOT"` -XDSTROOT=`cygpath -u "$XDSTROOT"` -export XDSTROOT - -export BUILT_PRODUCTS_DIR="$XDSTROOT/obj/WebKit" - -mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources" -cd "${BUILT_PRODUCTS_DIR}/DerivedSources" - -export WEBKIT=$XSRCROOT -export WEBKIT_OUTPUT=$XDSTROOT - -export FEATURE_DEFINES="ENABLE_XPATH ENABLE_SVG" -make -f "$WEBKIT/WebKit.vcproj/DerivedSources.make" -j ${NUMCPUS} || exit 1 diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png Binary files differnew file mode 100755 index 0000000..d04df37 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png Binary files differnew file mode 100755 index 0000000..e824a21 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png Binary files differnew file mode 100755 index 0000000..01ce692 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoPause.png b/WebKit/win/WebKit.vcproj/fsVideoPause.png Binary files differnew file mode 100755 index 0000000..b98fb36 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoPause.png diff --git a/WebKit/win/WebKit.vcproj/fsVideoPlay.png b/WebKit/win/WebKit.vcproj/fsVideoPlay.png Binary files differnew file mode 100755 index 0000000..035aeb2 --- /dev/null +++ b/WebKit/win/WebKit.vcproj/fsVideoPlay.png diff --git a/WebKit/win/WebKit.vcproj/resource.h b/WebKit/win/WebKit.vcproj/resource.h index 028cb3c..b999de6 100644 --- a/WebKit/win/WebKit.vcproj/resource.h +++ b/WebKit/win/WebKit.vcproj/resource.h @@ -23,6 +23,11 @@ #define IDR_SEARCH_CANCEL_PRESSED 19 #define IDR_SEARCH_MAGNIFIER 20 #define IDR_SEARCH_MAGNIFIER_RESULTS 21 +#define IDR_FS_VIDEO_AUDIO_VOLUME_HIGH 22 +#define IDR_FS_VIDEO_AUDIO_VOLUME_LOW 23 +#define IDR_FS_VIDEO_EXIT_FULLSCREEN 24 +#define IDR_FS_VIDEO_PAUSE 25 +#define IDR_FS_VIDEO_PLAY 26 #define IDC_STATIC -1 #define BUILD_NUMBER 1 diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp index b233a5c..d243588 100644 --- a/WebKit/win/WebKitClassFactory.cpp +++ b/WebKit/win/WebKitClassFactory.cpp @@ -37,6 +37,7 @@ #include "WebDownload.h" #include "WebError.h" #include "WebFrame.h" +#include "WebGeolocationPosition.h" #include "WebHistory.h" #include "WebHistoryItem.h" #include "WebIconDatabase.h" @@ -48,6 +49,7 @@ #include "WebPreferences.h" #include "WebScriptWorld.h" #include "WebScrollBar.h" +#include "WebSerializedJSValue.h" #include "WebTextRenderer.h" #include "WebURLCredential.h" #include "WebURLProtectionSpace.h" diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp index c34fe4b..9f4eaeb 100644 --- a/WebKit/win/WebKitDLL.cpp +++ b/WebKit/win/WebKitDLL.cpp @@ -179,6 +179,16 @@ PassRefPtr<WebCore::SharedBuffer> loadResourceIntoBuffer(const char* name) idr = IDR_ZOOM_OUT_CURSOR; else if (!strcmp(name, "verticalTextCursor")) idr = IDR_VERTICAL_TEXT_CURSOR; + else if (!strcmp(name, "fsVideoAudioVolumeHigh")) + idr = IDR_FS_VIDEO_AUDIO_VOLUME_HIGH; + else if (!strcmp(name, "fsVideoAudioVolumeLow")) + idr = IDR_FS_VIDEO_AUDIO_VOLUME_LOW; + else if (!strcmp(name, "fsVideoExitFullscreen")) + idr = IDR_FS_VIDEO_EXIT_FULLSCREEN; + else if (!strcmp(name, "fsVideoPause")) + idr = IDR_FS_VIDEO_PAUSE; + else if (!strcmp(name, "fsVideoPlay")) + idr = IDR_FS_VIDEO_PLAY; else return 0; diff --git a/WebKit/win/WebKitLogging.cpp b/WebKit/win/WebKitLogging.cpp index f7a333c..273ab56 100644 --- a/WebKit/win/WebKitLogging.cpp +++ b/WebKit/win/WebKitLogging.cpp @@ -29,7 +29,7 @@ #include "config.h" #include "WebKitLogging.h" -WTFLogChannel WebKitLogNetwork = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff }; +WTFLogChannel WebKitLogTextInput = { 0x00000010, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogTiming = { 0x00000020, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogLoading = { 0x00000040, "WebKitLogLevel", WTFLogChannelOff }; WTFLogChannel WebKitLogFontCache = { 0x00000100, "WebKitLogLevel", WTFLogChannelOff }; @@ -78,6 +78,7 @@ void WebKitInitializeLoggingChannelsIfNecessary() return; haveInitializedLoggingChannels = true; + initializeLogChannel(&WebKitLogTextInput); initializeLogChannel(&WebKitLogTiming); initializeLogChannel(&WebKitLogLoading); initializeLogChannel(&WebKitLogFontCache); diff --git a/WebKit/win/WebKitLogging.h b/WebKit/win/WebKitLogging.h index 0aafb51..d19933d 100644 --- a/WebKit/win/WebKitLogging.h +++ b/WebKit/win/WebKitLogging.h @@ -36,7 +36,7 @@ #endif -extern WTFLogChannel WebKitLogNetwork; +extern WTFLogChannel WebKitLogTextInput; extern WTFLogChannel WebKitLogTiming; extern WTFLogChannel WebKitLogLoading; extern WTFLogChannel WebKitLogFontCache; diff --git a/WebKit/win/WebKitPrefix.cpp b/WebKit/win/WebKitPrefix.cpp index e82b88d..9be9aed 100644 --- a/WebKit/win/WebKitPrefix.cpp +++ b/WebKit/win/WebKitPrefix.cpp @@ -25,5 +25,4 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include "WebKitPrefix.h" diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h index 09aeaff..3b4197c 100644 --- a/WebKit/win/WebPreferenceKeysPrivate.h +++ b/WebKit/win/WebPreferenceKeysPrivate.h @@ -129,3 +129,7 @@ #define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers" #define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime" + +#define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled" + +#define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled" diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp index 652e619..c23f236 100644 --- a/WebKit/win/WebPreferences.cpp +++ b/WebKit/win/WebPreferences.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,14 +32,13 @@ #include "WebNotificationCenter.h" #include "WebPreferenceKeysPrivate.h" -#pragma warning( push, 0 ) #include <WebCore/CString.h> #include <WebCore/FileSystem.h> #include <WebCore/Font.h> #include <WebCore/PlatformString.h> #include <WebCore/StringHash.h> +#include <WebCore/WKCACFLayerRenderer.h> #include "WebLocalizableStrings.h" -#pragma warning( pop ) #include <CoreFoundation/CoreFoundation.h> #include <limits> @@ -213,6 +212,7 @@ void WebPreferences::initializeDefaultSettings() CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalNotificationsEnabledPreferenceKey), kCFBooleanFalse); + CFDictionaryAddValue(defaults, CFSTR(WebKitZoomsTextOnlyPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImagesPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitAllowAnimatedImageLoopingPreferenceKey), kCFBooleanTrue); CFDictionaryAddValue(defaults, CFSTR(WebKitDisplayImagesKey), kCFBooleanTrue); @@ -255,6 +255,8 @@ void WebPreferences::initializeDefaultSettings() RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max())); CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get()); + CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue); + defaultSettings = defaults; } @@ -1356,6 +1358,34 @@ HRESULT WebPreferences::setPreferenceForTest(BSTR key, BSTR value) return S_OK; } +HRESULT WebPreferences::setAcceleratedCompositingEnabled(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), enabled); + return S_OK; +} + +HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled) +{ +#if USE(ACCELERATED_COMPOSITING) + *enabled = WKCACFLayerRenderer::acceleratedCompositingAvailable() && boolValueForKey(CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey)); +#else + *enabled = FALSE; +#endif + return S_OK; +} + +HRESULT WebPreferences::setCustomDragCursorsEnabled(BOOL enabled) +{ + setBoolValue(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey), enabled); + return S_OK; +} + +HRESULT WebPreferences::customDragCursorsEnabled(BOOL* enabled) +{ + *enabled = boolValueForKey(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey)); + return S_OK; +} + void WebPreferences::willAddToWebView() { ++m_numWebViews; diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h index 2a89269..1631e78 100644 --- a/WebKit/win/WebPreferences.h +++ b/WebKit/win/WebPreferences.h @@ -384,6 +384,11 @@ public: /* [in] */ BSTR key, /* [in] */ BSTR value); + virtual HRESULT STDMETHODCALLTYPE setAcceleratedCompositingEnabled(BOOL); + virtual HRESULT STDMETHODCALLTYPE acceleratedCompositingEnabled(BOOL*); + + virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL); + virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*); // WebPreferences diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp index 03eede7..7bc04eb 100644 --- a/WebKit/win/WebScriptWorld.cpp +++ b/WebKit/win/WebScriptWorld.cpp @@ -26,6 +26,7 @@ #include "WebKitDLL.h" #include "WebScriptWorld.h" +#include <JavaScriptCore/APICast.h> #include <WebCore/JSDOMBinding.h> #include <WebCore/ScriptController.h> @@ -128,3 +129,10 @@ HRESULT WebScriptWorld::standardWorld(IWebScriptWorld** outWorld) (*outWorld)->AddRef(); return S_OK; } + +HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context, IWebScriptWorld** outWorld) +{ + if (!outWorld) + return E_POINTER; + return findOrCreateWorld(currentWorld(toJS(context))).copyRefTo(outWorld); +} diff --git a/WebKit/win/WebScriptWorld.h b/WebKit/win/WebScriptWorld.h index b800225..dc7e9db 100644 --- a/WebKit/win/WebScriptWorld.h +++ b/WebKit/win/WebScriptWorld.h @@ -51,6 +51,7 @@ private: virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject); virtual HRESULT STDMETHODCALLTYPE standardWorld(IWebScriptWorld**); + virtual HRESULT STDMETHODCALLTYPE scriptWorldForGlobalContext(JSGlobalContextRef, IWebScriptWorld**); ULONG m_refCount; RefPtr<WebCore::DOMWrapperWorld> m_world; diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index aadf15e..b4b47cd 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -24,11 +24,12 @@ */ #include "config.h" -#include "WebKitDLL.h" + #include "WebView.h" #include "CFDictionaryPropertyBag.h" #include "DOMCoreClasses.h" +#include "FullscreenVideoController.h" #include "MarshallingHelpers.h" #include "SoftLinking.h" #include "WebBackForwardList.h" @@ -42,10 +43,14 @@ #include "WebEditorClient.h" #include "WebElementPropertyBag.h" #include "WebFrame.h" +#include "WebGeolocationControllerClient.h" +#include "WebGeolocationPosition.h" #include "WebIconDatabase.h" #include "WebInspector.h" #include "WebInspectorClient.h" #include "WebKit.h" +#include "WebKitDLL.h" +#include "WebKitLogging.h" #include "WebKitStatisticsPrivate.h" #include "WebKitSystemBits.h" #include "WebMutableURLRequest.h" @@ -54,16 +59,20 @@ #include "WebPreferences.h" #include "WebScriptWorld.h" #include "WindowsTouch.h" -#pragma warning( push, 0 ) -#include <WebCore/ApplicationCacheStorage.h> +#include <JavaScriptCore/InitializeThreading.h> +#include <JavaScriptCore/JSLock.h> +#include <JavaScriptCore/JSValue.h> #include <WebCore/AXObjectCache.h> -#include <WebCore/BitmapInfo.h> +#include <WebCore/ApplicationCacheStorage.h> #include <WebCore/BString.h> +#include <WebCore/BackForwardList.h> +#include <WebCore/BitmapInfo.h> +#include <WebCore/CString.h> #include <WebCore/Cache.h> +#include <WebCore/Chrome.h> #include <WebCore/ContextMenu.h> #include <WebCore/ContextMenuController.h> #include <WebCore/CookieStorageWin.h> -#include <WebCore/CString.h> #include <WebCore/Cursor.h> #include <WebCore/Document.h> #include <WebCore/DragController.h> @@ -72,14 +81,16 @@ #include <WebCore/EventHandler.h> #include <WebCore/EventNames.h> #include <WebCore/FileSystem.h> -#include <WebCore/FocusController.h> #include <WebCore/FloatQuad.h> +#include <WebCore/FocusController.h> #include <WebCore/FrameLoader.h> #include <WebCore/FrameTree.h> #include <WebCore/FrameView.h> #include <WebCore/FrameWin.h> #include <WebCore/GDIObjectCounter.h> #include <WebCore/GraphicsContext.h> +#include <WebCore/HTMLMediaElement.h> +#include <WebCore/HTMLNames.h> #include <WebCore/HistoryItem.h> #include <WebCore/HitTestRequest.h> #include <WebCore/HitTestResult.h> @@ -113,10 +124,11 @@ #include <WebCore/SimpleFontData.h> #include <WebCore/TypingCommand.h> #include <WebCore/WindowMessageBroadcaster.h> -#pragma warning(pop) -#include <JavaScriptCore/InitializeThreading.h> -#include <JavaScriptCore/JSLock.h> -#include <JavaScriptCore/JSValue.h> + +#if ENABLE(CLIENT_BASED_GEOLOCATION) +#include <WebCore/GeolocationController.h> +#include <WebCore/GeolocationError.h> +#endif #if PLATFORM(CG) #include <CoreGraphics/CGContext.h> @@ -132,13 +144,13 @@ #include <WebKitSystemInterface/WebKitSystemInterface.h> #endif -#include <wtf/HashSet.h> +#include <ShlObj.h> #include <comutil.h> #include <dimm.h> #include <oleacc.h> -#include <ShlObj.h> #include <tchar.h> #include <windowsx.h> +#include <wtf/HashSet.h> // Soft link functions for gestures and panning feedback SOFT_LINK_LIBRARY(USER32); @@ -295,6 +307,9 @@ bool WebView::s_allowSiteSpecificHacks = false; WebView::WebView() : m_refCount(0) +#if !ASSERT_DISABLED + , m_deletionHasBegun(false) +#endif , m_hostWindow(0) , m_viewWindow(0) , m_mainFrame(0) @@ -350,18 +365,13 @@ WebView::~WebView() { deleteBackingStore(); - // <rdar://4958382> m_viewWindow will be destroyed when m_hostWindow is destroyed, but if - // setHostWindow was never called we will leak our HWND. If we still have a valid HWND at - // this point, we should just destroy it ourselves. - if (!isBeingDestroyed() && ::IsWindow(m_viewWindow)) - ::DestroyWindow(m_viewWindow); - // the tooltip window needs to be explicitly destroyed since it isn't a WS_CHILD if (::IsWindow(m_toolTipHwnd)) ::DestroyWindow(m_toolTipHwnd); ASSERT(!m_page); ASSERT(!m_preferences); + ASSERT(!m_viewWindow); WebViewCount--; gClassCount--; @@ -631,9 +641,10 @@ HRESULT STDMETHODCALLTYPE WebView::close() removeFromAllWebViewsSet(); - Frame* frame = m_page->mainFrame(); - if (frame) - frame->loader()->detachFromParent(); + if (m_page) { + if (Frame* frame = m_page->mainFrame()) + frame->loader()->detachFromParent(); + } if (m_mouseOutTracker) { m_mouseOutTracker->dwFlags = TME_CANCEL; @@ -641,6 +652,18 @@ HRESULT STDMETHODCALLTYPE WebView::close() m_mouseOutTracker.set(0); } + revokeDragDrop(); + + if (m_viewWindow) { + // We can't check IsWindow(m_viewWindow) here, because that will return true even while + // we're already handling WM_DESTROY. So we check !isBeingDestroyed() instead. + if (!isBeingDestroyed()) + DestroyWindow(m_viewWindow); + // Either we just destroyed m_viewWindow, or it's in the process of being destroyed. Either + // way, we clear it out to make sure we don't try to use it later. + m_viewWindow = 0; + } + setHostWindow(0); setDownloadDelegate(0); @@ -664,17 +687,18 @@ HRESULT STDMETHODCALLTYPE WebView::close() IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal(); notifyCenter->removeObserver(this, WebPreferences::webPreferencesChangedNotification(), static_cast<IWebPreferences*>(m_preferences.get())); - BSTR identifier = 0; - m_preferences->identifier(&identifier); - - COMPtr<WebPreferences> preferences = m_preferences; - m_preferences = 0; - preferences->didRemoveFromWebView(); - // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences - preferences = 0; - if (identifier) { - WebPreferences::removeReferenceForIdentifier(identifier); - SysFreeString(identifier); + if (COMPtr<WebPreferences> preferences = m_preferences) { + BSTR identifier = 0; + preferences->identifier(&identifier); + + m_preferences = 0; + preferences->didRemoveFromWebView(); + // Make sure we release the reference, since WebPreferences::removeReferenceForIdentifier will check for last reference to WebPreferences + preferences = 0; + if (identifier) { + WebPreferences::removeReferenceForIdentifier(identifier); + SysFreeString(identifier); + } } deleteBackingStore(); @@ -1904,7 +1928,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, case WM_DESTROY: webView->setIsBeingDestroyed(); webView->close(); - webView->revokeDragDrop(); break; case WM_GESTURENOTIFY: handled = webView->gestureNotify(wParam, lParam); @@ -1953,10 +1976,6 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, break; // FIXME: We need to check WM_UNICHAR to support supplementary characters (that don't fit in 16 bits). case WM_SIZE: - if (webView->isBeingDestroyed()) - // If someone has sent us this message while we're being destroyed, we should bail out so we don't crash. - break; - if (lParam != 0) { webView->deleteBackingStore(); #if USE(ACCELERATED_COMPOSITING) @@ -2100,7 +2119,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, handled = webView->onIMEStartComposition(); break; case WM_IME_REQUEST: - webView->onIMERequest(wParam, lParam, &lResult); + lResult = webView->onIMERequest(wParam, lParam); break; case WM_IME_COMPOSITION: handled = webView->onIMEComposition(lParam); @@ -2270,14 +2289,29 @@ HRESULT STDMETHODCALLTYPE WebView::QueryInterface(REFIID riid, void** ppvObject) ULONG STDMETHODCALLTYPE WebView::AddRef(void) { + ASSERT(!m_deletionHasBegun); return ++m_refCount; } ULONG STDMETHODCALLTYPE WebView::Release(void) { + ASSERT(!m_deletionHasBegun); + + if (m_refCount == 1) { + // Call close() now so that clients don't have to. (It's harmless to call close() multiple + // times.) We do this here instead of in our destructor because close() can cause AddRef() + // and Release() to be called, and if that happened in our destructor we would be destroyed + // more than once. + close(); + } + ULONG newRef = --m_refCount; - if (!newRef) + if (!newRef) { +#if !ASSERT_DISABLED + m_deletionHasBegun = true; +#endif delete(this); + } return newRef; } @@ -2390,11 +2424,21 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame( Settings::setShouldPaintNativeControls(shouldPaintNativeControls); #endif +#if ENABLE(CLIENT_BASED_GEOLOCATION) + WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(this); +#else + WebGeolocationControllerClient* geolocationControllerClient = 0; +#endif + BOOL useHighResolutionTimer; if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer))) Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer); +<<<<<<< HEAD m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), 0); +======= + m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient); +>>>>>>> webkit.org at r54127 BSTR localStoragePath; if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) { @@ -3051,8 +3095,7 @@ HRESULT STDMETHODCALLTYPE WebView::setHostWindow( m_hostWindow = window; - if (m_viewWindow) - windowAncestryDidChange(); + windowAncestryDidChange(); return S_OK; } @@ -4504,6 +4547,13 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setPluginAllowedRunTime(runTime); +#if USE(ACCELERATED_COMPOSITING) + hr = prefsPrivate->acceleratedCompositingEnabled(&enabled); + if (FAILED(hr)) + return hr; + settings->setAcceleratedCompositingEnabled(enabled); +#endif + #if ENABLE(3D_CANVAS) settings->setExperimentalWebGLEnabled(true); #endif // ENABLE(3D_CANVAS) @@ -4925,7 +4975,9 @@ HRESULT WebView::registerDragDrop() HRESULT WebView::revokeDragDrop() { - ASSERT(::IsWindow(m_viewWindow)); + if (!m_viewWindow) + return S_OK; + return ::RevokeDragDrop(m_viewWindow); } @@ -5065,6 +5117,7 @@ void WebView::selectionChanged() bool WebView::onIMEStartComposition() { + LOG(TextInput, "onIMEStartComposition"); m_inIMEComposition++; Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); if (!targetFrame) @@ -5107,8 +5160,100 @@ static void compositionToUnderlines(const Vector<DWORD>& clauses, const Vector<B } } +#if !LOG_DISABLED +#define APPEND_ARGUMENT_NAME(name) \ + if (lparam & name) { \ + if (needsComma) \ + result += ", "; \ + result += #name; \ + needsComma = true; \ + } + +static String imeCompositionArgumentNames(LPARAM lparam) +{ + String result; + bool needsComma = false; + if (lparam & GCS_COMPATTR) { + result = "GCS_COMPATTR"; + needsComma = true; + } + APPEND_ARGUMENT_NAME(GCS_COMPCLAUSE); + APPEND_ARGUMENT_NAME(GCS_COMPREADSTR); + APPEND_ARGUMENT_NAME(GCS_COMPREADATTR); + APPEND_ARGUMENT_NAME(GCS_COMPREADCLAUSE); + APPEND_ARGUMENT_NAME(GCS_COMPSTR); + APPEND_ARGUMENT_NAME(GCS_CURSORPOS); + APPEND_ARGUMENT_NAME(GCS_DELTASTART); + APPEND_ARGUMENT_NAME(GCS_RESULTCLAUSE); + APPEND_ARGUMENT_NAME(GCS_RESULTREADCLAUSE); + APPEND_ARGUMENT_NAME(GCS_RESULTREADSTR); + APPEND_ARGUMENT_NAME(GCS_RESULTSTR); + APPEND_ARGUMENT_NAME(CS_INSERTCHAR); + APPEND_ARGUMENT_NAME(CS_NOMOVECARET); + + return result; +} + +static String imeNotificationName(WPARAM wparam) +{ + switch (wparam) { + case IMN_CHANGECANDIDATE: + return "IMN_CHANGECANDIDATE"; + case IMN_CLOSECANDIDATE: + return "IMN_CLOSECANDIDATE"; + case IMN_CLOSESTATUSWINDOW: + return "IMN_CLOSESTATUSWINDOW"; + case IMN_GUIDELINE: + return "IMN_GUIDELINE"; + case IMN_OPENCANDIDATE: + return "IMN_OPENCANDIDATE"; + case IMN_OPENSTATUSWINDOW: + return "IMN_OPENSTATUSWINDOW"; + case IMN_SETCANDIDATEPOS: + return "IMN_SETCANDIDATEPOS"; + case IMN_SETCOMPOSITIONFONT: + return "IMN_SETCOMPOSITIONFONT"; + case IMN_SETCOMPOSITIONWINDOW: + return "IMN_SETCOMPOSITIONWINDOW"; + case IMN_SETCONVERSIONMODE: + return "IMN_SETCONVERSIONMODE"; + case IMN_SETOPENSTATUS: + return "IMN_SETOPENSTATUS"; + case IMN_SETSENTENCEMODE: + return "IMN_SETSENTENCEMODE"; + case IMN_SETSTATUSWINDOWPOS: + return "IMN_SETSTATUSWINDOWPOS"; + default: + return "Unknown (" + String::number(wparam) + ")"; + } +} + +static String imeRequestName(WPARAM wparam) +{ + switch (wparam) { + case IMR_CANDIDATEWINDOW: + return "IMR_CANDIDATEWINDOW"; + case IMR_COMPOSITIONFONT: + return "IMR_COMPOSITIONFONT"; + case IMR_COMPOSITIONWINDOW: + return "IMR_COMPOSITIONWINDOW"; + case IMR_CONFIRMRECONVERTSTRING: + return "IMR_CONFIRMRECONVERTSTRING"; + case IMR_DOCUMENTFEED: + return "IMR_DOCUMENTFEED"; + case IMR_QUERYCHARPOSITION: + return "IMR_QUERYCHARPOSITION"; + case IMR_RECONVERTSTRING: + return "IMR_RECONVERTSTRING"; + default: + return "Unknown (" + String::number(wparam) + ")"; + } +} +#endif + bool WebView::onIMEComposition(LPARAM lparam) { + LOG(TextInput, "onIMEComposition %s", imeCompositionArgumentNames(lparam).latin1().data()); HIMC hInputContext = getIMMContext(); if (!hInputContext) return true; @@ -5153,25 +5298,39 @@ bool WebView::onIMEComposition(LPARAM lparam) bool WebView::onIMEEndComposition() { - if (m_inIMEComposition) + LOG(TextInput, "onIMEEndComposition"); + // If the composition hasn't been confirmed yet, it needs to be cancelled. + // This happens after deleting the last character from inline input hole. + Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); + if (targetFrame && targetFrame->editor()->hasComposition()) + targetFrame->editor()->confirmComposition(String()); + + if (m_inIMEComposition) m_inIMEComposition--; + return true; } -bool WebView::onIMEChar(WPARAM, LPARAM) +bool WebView::onIMEChar(WPARAM wparam, LPARAM lparam) { + UNUSED_PARAM(wparam); + UNUSED_PARAM(lparam); + LOG(TextInput, "onIMEChar U+%04X %08X", wparam, lparam); return true; } -bool WebView::onIMENotify(WPARAM, LPARAM, LRESULT*) +bool WebView::onIMENotify(WPARAM wparam, LPARAM, LRESULT*) { + UNUSED_PARAM(wparam); + LOG(TextInput, "onIMENotify %s", imeNotificationName(wparam).latin1().data()); return false; } -bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos, LRESULT* result) +LRESULT WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* charPos) { + if (charPos->dwCharPos && !targetFrame->editor()->hasComposition()) + return 0; IntRect caret; - ASSERT(charPos->dwCharPos == 0 || targetFrame->editor()->hasComposition()); if (RefPtr<Range> range = targetFrame->editor()->hasComposition() ? targetFrame->editor()->compositionRange() : targetFrame->selection()->selection().toNormalizedRange()) { ExceptionCode ec = 0; RefPtr<Range> tempRange = range->cloneRange(ec); @@ -5184,56 +5343,55 @@ bool WebView::onIMERequestCharPosition(Frame* targetFrame, IMECHARPOSITION* char ::ClientToScreen(m_viewWindow, &charPos->pt); charPos->cLineHeight = caret.height(); ::GetWindowRect(m_viewWindow, &charPos->rcDocument); - *result = TRUE; return true; } -bool WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString, LRESULT* result) +LRESULT WebView::onIMERequestReconvertString(Frame* targetFrame, RECONVERTSTRING* reconvertString) { RefPtr<Range> selectedRange = targetFrame->selection()->toNormalizedRange(); String text = selectedRange->text(); - if (!reconvertString) { - *result = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); - return true; - } + if (!reconvertString) + return sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); unsigned totalSize = sizeof(RECONVERTSTRING) + text.length() * sizeof(UChar); - *result = totalSize; - if (totalSize > reconvertString->dwSize) { - *result = 0; - return false; - } + if (totalSize > reconvertString->dwSize) + return 0; reconvertString->dwCompStrLen = text.length(); reconvertString->dwStrLen = text.length(); reconvertString->dwTargetStrLen = text.length(); reconvertString->dwStrOffset = sizeof(RECONVERTSTRING); memcpy(reconvertString + 1, text.characters(), text.length() * sizeof(UChar)); - return true; + return totalSize; } -bool WebView::onIMERequest(WPARAM request, LPARAM data, LRESULT* result) +LRESULT WebView::onIMERequest(WPARAM request, LPARAM data) { + LOG(TextInput, "onIMERequest %s", imeRequestName(request).latin1().data()); Frame* targetFrame = m_page->focusController()->focusedOrMainFrame(); if (!targetFrame || !targetFrame->editor()->canEdit()) - return true; + return 0; switch (request) { case IMR_RECONVERTSTRING: - return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data, result); + return onIMERequestReconvertString(targetFrame, (RECONVERTSTRING*)data); case IMR_QUERYCHARPOSITION: - return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data, result); + return onIMERequestCharPosition(targetFrame, (IMECHARPOSITION*)data); } - return false; + return 0; } -bool WebView::onIMESelect(WPARAM, LPARAM) +bool WebView::onIMESelect(WPARAM wparam, LPARAM lparam) { + UNUSED_PARAM(wparam); + UNUSED_PARAM(lparam); + LOG(TextInput, "onIMESelect locale %ld %s", lparam, wparam ? "select" : "deselect"); return false; } -bool WebView::onIMESetContext(WPARAM, LPARAM) +bool WebView::onIMESetContext(WPARAM wparam, LPARAM) { + LOG(TextInput, "onIMESetContext %s", wparam ? "active" : "inactive"); return false; } @@ -5247,7 +5405,15 @@ HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector) HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange() { - HWND newParent = findTopLevelParent(m_hostWindow); + HWND newParent; + if (m_viewWindow) + newParent = findTopLevelParent(m_hostWindow); + else { + // There's no point in tracking active state changes of our parent window if we don't have + // a window ourselves. + newParent = 0; + } + if (newParent == m_topLevelParent) return S_OK; @@ -5511,6 +5677,44 @@ static KURL toKURL(BSTR bstr) return KURL(KURL(), toString(bstr)); } +void WebView::enterFullscreenForNode(Node* node) +{ + if (!node->hasTagName(HTMLNames::videoTag)) + return; + +#if ENABLE(VIDEO) + HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node); + + if (m_fullscreenController) { + if (m_fullscreenController->mediaElement() == videoElement) { + // The backend may just warn us that the underlaying plaftormMovie() + // has changed. Just force an update. + m_fullscreenController->setMediaElement(videoElement); + return; // No more to do. + } + + // First exit Fullscreen for the old mediaElement. + m_fullscreenController->mediaElement()->exitFullscreen(); + // This previous call has to trigger exitFullscreen, + // which has to clear m_fullscreenController. + ASSERT(!m_fullscreenController); + } + + m_fullscreenController = new FullscreenVideoController; + m_fullscreenController->setMediaElement(videoElement); + m_fullscreenController->enterFullscreen(); +#endif +} + +void WebView::exitFullscreen() +{ +#if ENABLE(VIDEO) + if (m_fullscreenController) + m_fullscreenController->exitFullscreen(); + m_fullscreenController = 0; +#endif +} + static PassOwnPtr<Vector<String> > toStringVector(unsigned patternsCount, BSTR* patterns) { // Convert the patterns into a Vector. @@ -5789,8 +5993,7 @@ void WebView::updateRootLayerContents() return; FrameView* frameView = coreFrame->view(); - m_layerRenderer->setScrollFrame(frameView->layoutWidth(), frameView->layoutHeight(), - frameView->scrollX(), frameView->scrollY()); + m_layerRenderer->setScrollFrame(IntRect(frameView->scrollX(), frameView->scrollY(), frameView->layoutWidth(), frameView->layoutHeight())); } #endif @@ -5875,6 +6078,63 @@ HRESULT WebView::hasPluginForNodeBeenHalted(IDOMNode* domNode, BOOL* result) return S_OK; } +HRESULT WebView::setGeolocationProvider(IWebGeolocationProvider* locationProvider) +{ + m_geolocationProvider = locationProvider; + return S_OK; +} + +HRESULT WebView::geolocationProvider(IWebGeolocationProvider** locationProvider) +{ + if (!locationProvider) + return E_POINTER; + + if (!m_geolocationProvider) + return E_FAIL; + + return m_geolocationProvider.copyRefTo(locationProvider); +} + +HRESULT WebView::geolocationDidChangePosition(IWebGeolocationPosition* position) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (!m_page) + return E_FAIL; + m_page->geolocationController()->positionChanged(core(position)); + return S_OK; +#else + return E_NOTIMPL; +#endif +} + +HRESULT WebView::geolocationDidFailWithError(IWebError* error) +{ +#if ENABLE(CLIENT_BASED_GEOLOCATION) + if (!m_page) + return E_FAIL; + if (!error) + return E_POINTER; + + BSTR descriptionBSTR; + if (FAILED(error->localizedDescription(&descriptionBSTR))) + return E_FAIL; + String descriptionString(descriptionBSTR, SysStringLen(descriptionBSTR)); + SysFreeString(descriptionBSTR); + + RefPtr<GeolocationError> geolocationError = GeolocationError::create(GeolocationError::PositionUnavailable, descriptionString); + m_page->geolocationController()->errorOccurred(geolocationError.get()); + return S_OK; +#else + return E_NOTIMPL; +#endif +} + +HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme) +{ + SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme, SysStringLen(scheme))); + return S_OK; +} + class EnumTextMatches : public IEnumTextMatches { long m_ref; diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h index 4bdc98f..cd857a8 100644 --- a/WebKit/win/WebView.h +++ b/WebKit/win/WebView.h @@ -30,7 +30,7 @@ #include "WebKit.h" #include "WebFrame.h" #include "WebPreferences.h" - +#include <WebCore/DragActions.h> #include <WebCore/IntRect.h> #include <WebCore/Timer.h> #include <WebCore/WindowMessageListener.h> @@ -39,8 +39,9 @@ #include <wtf/HashSet.h> #include <wtf/OwnPtr.h> -class WebFrame; +class FullscreenVideoController; class WebBackForwardList; +class WebFrame; class WebInspector; class WebInspectorClient; @@ -772,6 +773,13 @@ public: virtual HRESULT STDMETHODCALLTYPE restartHaltedPluginForNode(IDOMNode*); virtual HRESULT STDMETHODCALLTYPE hasPluginForNodeBeenHalted(IDOMNode*, BOOL*); + virtual HRESULT STDMETHODCALLTYPE setGeolocationProvider(IWebGeolocationProvider* locationProvider); + virtual HRESULT STDMETHODCALLTYPE geolocationProvider(IWebGeolocationProvider** locationProvider); + virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(IWebGeolocationPosition* position); + virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error); + + virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme); + // WebView bool shouldUseEmbeddedView(const WebCore::String& mimeType) const; @@ -811,7 +819,7 @@ public: bool onIMEEndComposition(); bool onIMEChar(WPARAM, LPARAM); bool onIMENotify(WPARAM, LPARAM, LRESULT*); - bool onIMERequest(WPARAM, LPARAM, LRESULT*); + LRESULT onIMERequest(WPARAM, LPARAM); bool onIMESelect(WPARAM, LPARAM); bool onIMESetContext(WPARAM, LPARAM); void selectionChanged(); @@ -868,6 +876,9 @@ public: void setRootChildLayer(WebCore::PlatformLayer* layer); #endif + void enterFullscreenForNode(WebCore::Node*); + void exitFullscreen(); + private: void setZoomMultiplier(float multiplier, bool isTextOnly); float zoomMultiplier(bool isTextOnly); @@ -904,8 +915,8 @@ protected: void closeWindowTimerFired(WebCore::Timer<WebView>*); void prepareCandidateWindow(WebCore::Frame*, HIMC); void updateSelectionForIME(); - bool onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*, LRESULT*); - bool onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*, LRESULT*); + LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*); + LRESULT onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*); bool developerExtrasEnabled() const; // AllWebViewSet functions @@ -915,6 +926,9 @@ protected: virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM); ULONG m_refCount; +#if !ASSERT_DISABLED + bool m_deletionHasBegun; +#endif HWND m_hostWindow; HWND m_viewWindow; WebFrame* m_mainFrame; @@ -937,6 +951,7 @@ protected: COMPtr<WebPreferences> m_preferences; COMPtr<WebInspector> m_webInspector; COMPtr<IWebPluginHalterDelegate> m_pluginHalterDelegate; + COMPtr<IWebGeolocationProvider> m_geolocationProvider; bool m_userAgentOverridden; bool m_useBackForwardList; @@ -981,6 +996,10 @@ protected: long m_xOverpan; long m_yOverpan; +#if ENABLE(VIDEO) + OwnPtr<FullscreenVideoController> m_fullscreenController; +#endif + #if USE(ACCELERATED_COMPOSITING) bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; } void setAcceleratedCompositing(bool); diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index e6ed389..1c7adf2 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,125 @@ +2010-01-27 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + Add a way to get the parse mode to wxWebKit API. + + https://bugs.webkit.org/show_bug.cgi?id=34341 + + * WebFrame.cpp: + (wxWebFrame::GetParseMode): + * WebFrame.h: + * WebView.cpp: + (wxWebView::GetParseMode): + * WebView.h: + +2010-01-22 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + [wx] Remove the Bakefile build system, which is no longer being used. + + https://bugs.webkit.org/show_bug.cgi?id=34022 + + * bindings/python/wxwebkit-py.bkl: Removed. + * dependencies.bkl: Removed. + * presets/wxwebkit.bkl: Removed. + * wxwebkit.bkl: Removed. + * wxwk-settings.bkl: Removed. + +2010-01-22 Kevin Ollivier <kevino@theolliviers.com> + + Build fix after r53718. + + * WebView.cpp: + (wxWebView::OnKeyEvents): + +2010-01-15 Kevin Ollivier <kevino@theolliviers.com> + + Reviewed by Alexey Proskuryakov. + + Move the code adding the child frame to the FrameTree into wxWebFrame constructor + so that it happens before we call init() on the new frame. Fixes asserts checking + frame count consistency. + + * WebFrame.cpp: + (wxWebFrame::wxWebFrame): + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::createFrame): + +2010-01-14 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, missing header. + + * WebView.cpp: + +2010-01-09 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + ScriptController::isEnabled needs to be renamed + https://bugs.webkit.org/show_bug.cgi?id=32063 + + Rename ScriptController::isEnabled to + ScriptController::canExecuteScripts. + + * WebFrame.cpp: + (wxWebFrame::RunScript): + +2009-12-30 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + Introduce wxWebSettings API interface for editing wxWebView / page settings. + + https://bugs.webkit.org/show_bug.cgi?id=32956 + + * WebBrowserShell.h: + * WebFrame.h: + * WebKitDefines.h: Added. + * WebSettings.cpp: Added. + (wxWebSettings::SetDefaultFixedFontSize): + (wxWebSettings::GetDefaultFixedFontSize): + (wxWebSettings::SetDefaultFontSize): + (wxWebSettings::GetDefaultFontSize): + (wxWebSettings::SetMinimumFontSize): + (wxWebSettings::GetMinimumFontSize): + (wxWebSettings::SetLoadsImagesAutomatically): + (wxWebSettings::LoadsImagesAutomatically): + (wxWebSettings::SetJavaScriptEnabled): + (wxWebSettings::IsJavaScriptEnabled): + (wxWebSettings::SetDatabasesEnabled): + (wxWebSettings::AreDatabasesEnabled): + (wxWebSettings::SetLocalStoragePath): + (wxWebSettings::GetLocalStoragePath): + (wxWebSettings::SetEditableLinkBehavior): + (wxWebSettings::GetEditableLinkBehavior): + (wxWebSettings::SetPluginsEnabled): + (wxWebSettings::ArePluginsEnabled): + * WebSettings.h: Added. + * WebView.cpp: + (wxWebView::Create): + (wxWebView::GetWebSettings): + * WebView.h: + * bindings/python/webview.i: + +2009-12-28 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Maciej Stachowiak. + + Use JS_NO_EXPORT for JSBase.h. + + * wxwk-settings.bkl: + +2009-12-20 Kevin Ollivier <kevino@theolliviers.com> + + [wx] build fixes after recent changes. + + * WebFrame.cpp: Added missing header. + * WebKitSupport/EditorClientWx.cpp: Added missing header. + * WebView.cpp: Updated Page constructor call. + (wxWebView::Create): + 2009-12-08 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. diff --git a/WebKit/wx/WebBrowserShell.h b/WebKit/wx/WebBrowserShell.h index edda9e4..2f43ffb 100644 --- a/WebKit/wx/WebBrowserShell.h +++ b/WebKit/wx/WebBrowserShell.h @@ -33,6 +33,7 @@ #include "wx/wx.h" #endif +#include "WebKitDefines.h" #include "WebView.h" #include <wx/srchctrl.h> diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp index bd983f6..6cda197 100644 --- a/WebKit/wx/WebFrame.cpp +++ b/WebKit/wx/WebFrame.cpp @@ -24,6 +24,7 @@ */ #include "config.h" +#include "BackForwardList.h" #include "CString.h" #include "Document.h" #include "Editor.h" @@ -33,6 +34,7 @@ #include "FrameLoader.h" #include "FrameView.h" #include "HitTestResult.h" +#include "HostWindow.h" #include "HTMLFrameOwnerElement.h" #include "markup.h" #include "Page.h" @@ -90,6 +92,13 @@ wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameDat m_impl->frame = newFrame.get(); + if (data) + newFrame->tree()->setName(data->name); + + // Subframes expect to be added to the FrameTree before init is called. + if (parentFrame) + parentFrame->document()->frame()->tree()->appendChild(newFrame.get()); + loaderClient->setFrame(this); loaderClient->setWebView(container); @@ -192,7 +201,7 @@ wxString wxWebFrame::RunScript(const wxString& javascript) wxASSERT_MSG(hasLoaded, wxT("Document must be loaded before calling RunScript.")); if (hasLoaded) { WebCore::ScriptController* controller = m_impl->frame->script(); - bool jsEnabled = controller->isEnabled(); + bool jsEnabled = controller->canExecuteScripts(); wxASSERT_MSG(jsEnabled, wxT("RunScript requires JavaScript to be enabled.")); if (jsEnabled) { JSC::JSValue result = controller->executeScript(javascript, true).jsValue(); @@ -409,3 +418,11 @@ bool wxWebFrame::ShouldClose() const return true; } + +wxWebKitParseMode wxWebFrame::GetParseMode() const +{ + if (m_impl->frame && m_impl->frame->document()) + return (wxWebKitParseMode)m_impl->frame->document()->parseMode(); + + return NoDocument; +} diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h index bd4bdb0..95a0691 100644 --- a/WebKit/wx/WebFrame.h +++ b/WebKit/wx/WebFrame.h @@ -33,6 +33,8 @@ #include "wx/wx.h" #endif +#include "WebKitDefines.h" + class WebFramePrivate; class WebViewFrameData; class wxWebView; @@ -44,20 +46,6 @@ namespace WebCore { class Frame; } -#ifndef SWIG - -#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0) -#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) -#elif WXMAKINGDLL_WEBKIT -#define WXDLLIMPEXP_WEBKIT WXEXPORT -#elif defined(WXUSINGDLL_WEBKIT) -#define WXDLLIMPEXP_WEBKIT WXIMPORT -#endif - -#else -#define WXDLLIMPEXP_WEBKIT -#endif // SWIG - class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo { public: @@ -89,6 +77,9 @@ private: wxString m_link; }; +// based on enums in WebCore/dom/Document.h +enum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument }; + class WXDLLIMPEXP_WEBKIT wxWebFrame { // ChromeClientWx needs to get the Page* stored by the wxWebView @@ -153,6 +144,8 @@ public: bool ShouldClose() const; + wxWebKitParseMode GetParseMode() const; + private: float m_textMagnifier; bool m_isEditable; diff --git a/WebKit/wx/WebKitDefines.h b/WebKit/wx/WebKitDefines.h new file mode 100644 index 0000000..d973063 --- /dev/null +++ b/WebKit/wx/WebKitDefines.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com> + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebKitDefines_h +#define WebKitDefines_h + +#ifndef SWIG + +#if !wxCHECK_VERSION(2, 9, 0) && wxCHECK_GCC_VERSION(4, 0) +#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) +#elif defined(WXMAKINGDLL_WEBKIT) +#define WXDLLIMPEXP_WEBKIT WXEXPORT +#elif defined(WXUSINGDLL_WEBKIT) +#define WXDLLIMPEXP_WEBKIT WXIMPORT +#endif + +#else +#define WXDLLIMPEXP_WEBKIT +#endif // SWIG + +#endif // WebKitDefines_h diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp index bd3af48..b130557 100644 --- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp +++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp @@ -32,6 +32,7 @@ #include "FocusController.h" #include "Frame.h" #include "FrameView.h" +#include "HostWindow.h" #include "KeyboardEvent.h" #include "KeyboardCodes.h" #include "NotImplemented.h" diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index fbb4ec3..5bb4dc1 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -828,10 +828,6 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String RefPtr<Frame> childFrame = adoptRef(newFrame->m_impl->frame); - m_frame->tree()->appendChild(childFrame); - childFrame->tree()->setName(name); - childFrame->init(); - // The creation of the frame may have run arbitrary JavaScript that removed it from the page already. if (!childFrame->page()) return 0; diff --git a/WebKit/wx/WebSettings.cpp b/WebKit/wx/WebSettings.cpp new file mode 100644 index 0000000..2aa246c --- /dev/null +++ b/WebKit/wx/WebSettings.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2009 Kevin Ollivier. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebSettings.h" + +#include "PlatformString.h" +#include "Settings.h" + +void wxWebSettings::SetDefaultFixedFontSize(int size) +{ + if (m_settings) + m_settings->setDefaultFixedFontSize(size); +} + +int wxWebSettings::GetDefaultFixedFontSize() const +{ + if (m_settings) + return m_settings->defaultFixedFontSize(); + + return 0; +} + +void wxWebSettings::SetDefaultFontSize(int size) +{ + if (m_settings) + m_settings->setDefaultFontSize(size); +} + +int wxWebSettings::GetDefaultFontSize() const +{ + if (m_settings) + return m_settings->defaultFontSize(); + + return 0; +} + +void wxWebSettings::SetMinimumFontSize(int size) +{ + if (m_settings) + m_settings->setMinimumFontSize(size); +} + +int wxWebSettings::GetMinimumFontSize() const +{ + if (m_settings) + return m_settings->minimumFontSize(); + + return 0; +} + +void wxWebSettings::SetLoadsImagesAutomatically(bool loadAutomatically) +{ + if (m_settings) + m_settings->setLoadsImagesAutomatically(loadAutomatically); +} + +bool wxWebSettings::LoadsImagesAutomatically() const +{ + if (m_settings) + return m_settings->loadsImagesAutomatically(); + + return false; +} + +void wxWebSettings::SetJavaScriptEnabled(bool enabled) +{ + if (m_settings) + m_settings->setJavaScriptEnabled(enabled); +} + +bool wxWebSettings::IsJavaScriptEnabled() const +{ + if (m_settings) + return m_settings->isJavaScriptEnabled(); + + return false; +} + +void wxWebSettings::SetDatabasesEnabled(bool enabled) +{ + if (m_settings) + m_settings->setDatabasesEnabled(enabled); +} + +bool wxWebSettings::AreDatabasesEnabled() const +{ + if (m_settings) + return m_settings->databasesEnabled(); + + return false; +} + +void wxWebSettings::SetLocalStoragePath(const wxString& path) +{ + if (m_settings) + m_settings->setLocalStorageDatabasePath(path); +} + +wxString wxWebSettings::GetLocalStoragePath() const +{ + if (m_settings) + return m_settings->localStorageDatabasePath(); + + return wxEmptyString; +} + +void wxWebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior) +{ + WebCore::EditableLinkBehavior webCoreBehavior; + if (m_settings) { + switch (behavior) { + case wxEditableLinkAlwaysLive: + webCoreBehavior = WebCore::EditableLinkAlwaysLive; + break; + case wxEditableLinkOnlyLiveWithShiftKey: + webCoreBehavior = WebCore::EditableLinkOnlyLiveWithShiftKey; + break; + case wxEditableLinkLiveWhenNotFocused: + webCoreBehavior = WebCore::EditableLinkLiveWhenNotFocused; + break; + case wxEditableLinkNeverLive: + webCoreBehavior = WebCore::EditableLinkNeverLive; + break; + default: + webCoreBehavior = WebCore::EditableLinkDefaultBehavior; + } + m_settings->setEditableLinkBehavior(webCoreBehavior); + } +} + +wxEditableLinkBehavior wxWebSettings::GetEditableLinkBehavior() const +{ + wxEditableLinkBehavior behavior = wxEditableLinkDefaultBehavior; + if (m_settings) { + WebCore::EditableLinkBehavior webCoreBehavior = m_settings->editableLinkBehavior(); + switch (webCoreBehavior) { + case WebCore::EditableLinkAlwaysLive: + behavior = wxEditableLinkAlwaysLive; + break; + case WebCore::EditableLinkOnlyLiveWithShiftKey: + behavior = wxEditableLinkOnlyLiveWithShiftKey; + break; + case WebCore::EditableLinkLiveWhenNotFocused: + behavior = wxEditableLinkLiveWhenNotFocused; + break; + case WebCore::EditableLinkNeverLive: + behavior = wxEditableLinkNeverLive; + break; + default: + behavior = wxEditableLinkDefaultBehavior; + } + } + return behavior; +} + +void wxWebSettings::SetPluginsEnabled(bool enabled) +{ + if (m_settings) + m_settings->setPluginsEnabled(enabled); +} + +bool wxWebSettings::ArePluginsEnabled() const +{ + if (m_settings) + return m_settings->arePluginsEnabled(); + + return false; +} diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h new file mode 100644 index 0000000..e526b70 --- /dev/null +++ b/WebKit/wx/WebSettings.h @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2009 Kevin Ollivier. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebSettings_h +#define WebSettings_h + +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "WebKitDefines.h" + +namespace WebCore { +class Settings; +} + +enum wxEditableLinkBehavior { + wxEditableLinkDefaultBehavior, + wxEditableLinkAlwaysLive, + wxEditableLinkOnlyLiveWithShiftKey, + wxEditableLinkLiveWhenNotFocused, + wxEditableLinkNeverLive +}; + +/** + @class wxWebSettings + + This class is used to control the configurable aspects of the WebKit engine. + + Do not instantiate this object directly. Instead, create a wxWebView and + call its wxWebView::GetWebSettings() method to get and change that WebView's settings. + +*/ + +class WXDLLIMPEXP_WEBKIT wxWebSettings: public wxObject { +public: + wxWebSettings(WebCore::Settings* settings) : + wxObject(), + m_settings(settings) + {} + + wxWebSettings() : wxObject() {} + + /** + Sets the default font size for fixed fonts. + */ + void SetDefaultFixedFontSize(int size); + + /** + Returns the default font size for fixed fonts. + */ + int GetDefaultFixedFontSize() const; + + /** + Sets the default font size for fonts. + */ + void SetDefaultFontSize(int size); + + /** + Returns the default font size for fonts. + */ + int GetDefaultFontSize() const; + + /** + Sets the minimum acceptable font size. + */ + void SetMinimumFontSize(int size); + + /** + Returns the minimum acceptable font size. + */ + int GetMinimumFontSize() const; + + /** + Sets whether or not images are loaded automatically. (e.g. in email + programs you may wish to not load images until you confirm it is not SPAM) + */ + void SetLoadsImagesAutomatically(bool loadAutomatically); + + /** + Returns whether or not images are loaded automatically. + */ + bool LoadsImagesAutomatically() const; + + /** + Sets whether or not the WebView runs JavaScript code. + */ + void SetJavaScriptEnabled(bool enabled); + + /** + Returns whether or not the WebView runs JavaScript code. + */ + bool IsJavaScriptEnabled() const; + + /** + Sets whether or not web pages can create databases. + */ + void SetDatabasesEnabled(bool enabled); + + /** + Returns whether or not the WebView runs JavaScript code. + */ + bool AreDatabasesEnabled() const; + + /** + Sets the path where local data will be stored. + */ + void SetLocalStoragePath(const wxString& path); + + /** + Returns the path where local data will be stored. + */ + wxString GetLocalStoragePath() const; + + /** + Sets how links are handled when the wxWebView is in editing mode. + */ + void SetEditableLinkBehavior(wxEditableLinkBehavior behavior); + + /** + Returns how links are handled when the wxWebView is in editing mode. + */ + wxEditableLinkBehavior GetEditableLinkBehavior() const; + + /** + Sets whether or not web pages can load plugins. + */ + void SetPluginsEnabled(bool enabled); + + /** + Returns whether or not web pages can load plugins. + */ + bool ArePluginsEnabled() const; + +private: + WebCore::Settings* m_settings; + +}; + +#endif // WebSettings_h diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp index 2c752de..5fdae83 100644 --- a/WebKit/wx/WebView.cpp +++ b/WebKit/wx/WebView.cpp @@ -34,6 +34,7 @@ #include "Editor.h" #include "EmptyClients.h" #include "EventHandler.h" +#include "FileChooser.h" #include "FocusController.h" #include "Frame.h" #include "FrameLoader.h" @@ -317,7 +318,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, WebCore::HTMLFrameOwnerElement* parentFrame = 0; WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx(); - m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), new WebCore::EmptyPluginHalterClient()); + m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), 0, 0); editorClient->setPage(m_impl->page); m_mainFrame = new wxWebFrame(this); @@ -338,10 +339,6 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, settings->setDatabasesEnabled(true); #endif -#if __WXMSW__ || __WXMAC__ - settings->setPluginsEnabled(true); -#endif - m_isInitialized = true; return true; @@ -824,11 +821,11 @@ void wxWebView::OnKeyEvents(wxKeyEvent& event) return; case WXK_PAGEUP: case WXK_NUMPAD_PAGEUP: - frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() + WebCore::cAmountToKeepWhenPaging)); + frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging)); return; case WXK_PAGEDOWN: case WXK_NUMPAD_PAGEDOWN: - frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() - WebCore::cAmountToKeepWhenPaging)); + frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging)); return; //These we don't want turning into char events, stuff 'em case WXK_ESCAPE: @@ -966,3 +963,20 @@ void wxWebView::SetProxyInfo(const wxString& host, if (ResourceHandleManager* mgr = ResourceHandleManager::sharedInstance()) mgr->setProxyInfo(host, port, curlProxyType(type), username, password); } + +wxWebSettings wxWebView::GetWebSettings() +{ + ASSERT(m_impl->page); + if (m_impl->page) + return wxWebSettings(m_impl->page->settings()); + + return wxWebSettings(); +} + +wxWebKitParseMode wxWebView::GetParseMode() const +{ + if (m_mainFrame) + return m_mainFrame->GetParseMode(); + + return NoDocument; +}
\ No newline at end of file diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h index 9b1cfab..7d923a3 100644 --- a/WebKit/wx/WebView.h +++ b/WebKit/wx/WebView.h @@ -34,6 +34,8 @@ #endif #include "WebFrame.h" +#include "WebKitDefines.h" +#include "WebSettings.h" class WebViewPrivate; class WebViewFrameData; @@ -48,20 +50,6 @@ namespace WebCore { } #ifndef SWIG - -#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0) -#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) -#elif WXMAKINGDLL_WEBKIT -#define WXDLLIMPEXP_WEBKIT WXEXPORT -#elif defined(WXUSINGDLL_WEBKIT) -#define WXDLLIMPEXP_WEBKIT WXIMPORT -#endif - -#else -#define WXDLLIMPEXP_WEBKIT -#endif // SWIG - -#ifndef SWIG extern WXDLLIMPEXP_WEBKIT const wxChar* wxWebViewNameStr; #endif @@ -214,6 +202,10 @@ public: const wxString& username = wxEmptyString, const wxString& password = wxEmptyString); + wxWebSettings GetWebSettings(); + + wxWebKitParseMode GetParseMode() const; + protected: // event handlers (these functions should _not_ be virtual) diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i index 410191a..bdc5561 100644 --- a/WebKit/wx/bindings/python/webview.i +++ b/WebKit/wx/bindings/python/webview.i @@ -28,9 +28,12 @@ %{ #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" + +#include "WebBrowserShell.h" #include "WebFrame.h" +#include "WebKitDefines.h" +#include "WebSettings.h" #include "WebView.h" -#include "WebBrowserShell.h" %} //--------------------------------------------------------------------------- @@ -39,13 +42,16 @@ MAKE_CONST_WXSTRING(WebViewNameStr); +MustHaveApp(wxWebBrowserShell); MustHaveApp(wxWebFrame); MustHaveApp(wxWebView); -MustHaveApp(wxWebBrowserShell); +%include WebKitDefines.h + +%include WebBrowserShell.h %include WebFrame.h +%include WebSettings.h %include WebView.h -%include WebBrowserShell.h %constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD; %constant wxEventType wxEVT_WEBVIEW_LOAD; diff --git a/WebKit/wx/bindings/python/wxwebkit-py.bkl b/WebKit/wx/bindings/python/wxwebkit-py.bkl index 2fade58..e69de29 100644 --- a/WebKit/wx/bindings/python/wxwebkit-py.bkl +++ b/WebKit/wx/bindings/python/wxwebkit-py.bkl @@ -1,109 +0,0 @@ -<?xml version="1.0" ?> -<!-- -Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Bakefile for wxWebKit Python bindings. ---> - -<makefile> - <set var="WX_UNICODE">1</set> - <set var="WX_SHARED">1</set> - <include file="../../wxwk-settings.bkl"/> - - <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define - it in case the presets/wx.bkl doesn't define it for us. --> - <if cond="not isdefined('WX_PYTHON')"> - <set var="WX_PYTHON">1</set> - </if> - - <if cond="not isdefined('PYTHON_LIB')"> - <option name="PYTHON_LIB" never_empty="1"> - <default-value>python26</default-value> - <description> - The name of the Python library file. - </description> - </option> - </if> - - <if cond="not isdefined('PYTHON_LIBDIR')"> - <option name="PYTHON_LIBDIR" category="path"> - <default-value>C:/Python25/Libs</default-value> - <description> - The directory containing the Python library to link against. - </description> - </option> - </if> - - <module id="wxwebkit-python" template="wxwk,webcore,xml2,iconv,xslt,icu,jscore,curl,sqlite3,gtk,pthreads"> - <!-- make sure we relink wxwebkit if either webcore or jscore change --> - <if cond="FORMAT=='gnu'"> - <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file> - </if> - <if cond="FORMAT=='msvc'"> - <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file> - </if> - <runtime-libs>dynamic</runtime-libs> - <dllname>_webview</dllname> - - <include>$(WK_ROOT)/WebCore/platform/wx</include> - <include>$(WK_ROOT)/WebCore/bridge/wx</include> - <include>$(WK_ROOT)/WebCore/page/wx</include> - <include>$(WK_ROOT)/WebKit/wx</include> - <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include> - - <if cond="FORMAT=='gnu'"> - <sys-lib>png</sys-lib> - <set var="MAC_FLAGS"> - <if cond="PLATFORM_OS=='mac'">-bundle -undefined dynamic_lookup</if> - </set> - <ldflags>$(PYTHON_LIB)</ldflags> - <ldflags>$(MAC_FLAGS)</ldflags> - </if> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>libpng</sys-lib> - <lib-path>$(WK_ROOT)/libpng</lib-path> - <sys-lib>$(PYTHON_LIB)</sys-lib> - </if> - - <lib-path>$(PYTHON_LIBDIR)</lib-path> - - - <sys-lib>wxwebkit</sys-lib> - <lib-path>$(WKOUTPUTDIR)</lib-path> - - <define>SWIG_TYPE_TABLE=_wxPython_table</define> - <define>WXP_USE_THREAD=1</define> - <define>SWIG_PYTHON_OUTPUT_TUPLE</define> - - <sources> - webview.cpp - </sources> - </module> - -</makefile> diff --git a/WebKit/wx/dependencies.bkl b/WebKit/wx/dependencies.bkl index dc82c3f..e69de29 100644 --- a/WebKit/wx/dependencies.bkl +++ b/WebKit/wx/dependencies.bkl @@ -1,177 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This file contains templates with settings for components used by JavaScriptCore -and WebCore. Include this file to use these settings. - ---> - - -<makefile> - - <option name="SQLITE3_LIBS"> - <default-value>$(DOLLAR)(shell pkg-config --libs sqlite3)</default-value> - </option> - - <option name="SQLITE3_CFLAGS"> - <default-value>$(DOLLAR)(shell pkg-config --cflags sqlite3)</default-value> - </option> - - <template id="sqlite3"> - <if cond="FORMAT=='gnu'"> - <set var="SQLITE_LDFLAGS"><if cond="PLATFORM_OS=='mac'">-lWebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_LIBS)</if></set> - <set var="SQLITE_CFLAGS"><if cond="PLATFORM_OS=='mac'">-I$(WK_ROOT)/WebKitLibraries/WebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_CFLAGS)</if></set> - <ldflags>$(SQLITE_LDFLAGS)</ldflags> - <cxxflags>$(SQLITE_CFLAGS)</cxxflags> - </if> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>sqlite3</sys-lib> - <include>$(WK_ROOT)/WebKitLibraries/win/include/SQLite</include> - </if> - </template> - - <option name="CURL_LIBS"> - <default-value>$(DOLLAR)(shell curl-config --libs)</default-value> - </option> - - <option name="CURL_CFLAGS"> - <default-value>$(DOLLAR)(shell curl-config --cflags)</default-value> - </option> - - <template id="curl"> - <if cond="FORMAT not in ['msvc', 'msvc2005prj']"> - <ldflags>$(CURL_LIBS)</ldflags> - <cxxflags>$(CURL_CFLAGS)</cxxflags> - </if> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <sys-lib>libcurl</sys-lib> - </if> - </template> - - <option name="GTK_LIBS"> - <default-value>$(DOLLAR)(shell pkg-config --libs gtk+-2.0)</default-value> - </option> - - <option name="GTK_CFLAGS"> - <default-value>$(DOLLAR)(shell pkg-config --cflags gtk+-2.0)</default-value> - </option> - - <!-- GTK settings, for GTK ports - wx doesn't use these --> - <template id="gtk"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(GTK_LIBS)</ldflags> - <cxxflags>$(GTK_CFLAGS)</cxxflags> - </if> - - <!-- TODO: non-Cygwin Windows support for this? :) --> - </template> - - - <option name="XML2_LIBS"> - <default-value>$(DOLLAR)(shell xml2-config --libs)</default-value> - </option> - - <option name="XML2_CFLAGS"> - <default-value>$(DOLLAR)(shell xml2-config --cflags)</default-value> - </option> - - <!-- XML2 library settings --> - <template id="xml2"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(XML2_LIBS)</ldflags> - <cxxflags>$(XML2_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <sys-lib>libxml2</sys-lib> - </if> - </template> - - - <option name="XSLT_LIBS"> - <default-value>$(DOLLAR)(shell xslt-config --libs)</default-value> - </option> - - <option name="XSLT_CFLAGS"> - <default-value>$(DOLLAR)(shell xslt-config --cflags)</default-value> - </option> - - <!-- XSLT library settings --> - <template id="xslt" template="xml2"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(XSLT_LIBS)</ldflags> - <cxxflags>$(XSLT_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <sys-lib>libxslt</sys-lib> - </if> - </template> - - <!-- IBM ICU settings --> - <template id="icu"> - <if cond="FORMAT=='gnu'"> - <!-- Mac includes ICU with the system, but doesn't include headers or - icu-config, so we have to hardcode settings there. --> - <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/JavaScriptCore/icu</if></set> - <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/WebCore/icu</if></set> - <set var="ICU_LIB"><if cond="PLATFORM_OS=='mac'">icucore</if></set> - <set var="ICU_LDFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --ldflags)</if></set> - <set var="ICU_CFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --cppflags)</if></set> - - <include>$(ICU_INCLUDE)</include> - <sys-lib>$(ICU_LIB)</sys-lib> - <ldflags>$(ICU_LDFLAGS)</ldflags> - <cxxflags>$(ICU_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <sys-lib>icuuc</sys-lib> - <sys-lib>icuin</sys-lib> - </if> - </template> - - - <template id="iconv"> - </template> - - - <template id="pthreads"> - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include/pthreads</include> - <sys-lib>pthreadVC2</sys-lib> - </if> - <if cond="FORMAT=='gnu'"> - <sys-lib>pthread</sys-lib> - </if> - </template> - -</makefile> diff --git a/WebKit/wx/presets/wxwebkit.bkl b/WebKit/wx/presets/wxwebkit.bkl index 029441f..e69de29 100644 --- a/WebKit/wx/presets/wxwebkit.bkl +++ b/WebKit/wx/presets/wxwebkit.bkl @@ -1,164 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2007 Kevin Ollivier. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This file contains templates with settings for components used by JavaScriptCore -and WebCore. Include this file to use these settings. - ---> - - -<makefile> - <if cond="not isdefined('WK_ROOT')"> - <option name="WK_ROOT" category="path"> - <default-value>$(DOLLAR)(WEBKIT_ROOT)</default-value> - <description> - The root directory containing WebKit sources - </description> - </option> - </if> - <if cond="not isdefined('WKOUTPUTDIR')"> - <option name="WKOUTPUTDIR" category="path"> - <default-value>$(DOLLAR)(WEBKITOUTPUTDIR)</default-value> - <description> - The root directory containing WebKit products - </description> - </option> - </if> - - <if cond="not isdefined('WX_PORT')"> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <set var="WX_PORT_DEFAULT" overwrite="0"> - msw - </set> - </if> - <if cond="not FORMAT in ['msvc','msvs2005prj']"> - <set var="WX_PORT_DEFAULT" overwrite="0"> - $(DOLLAR)(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1) - </set> - </if> - <option name="WX_PORT"> - <values>gtk2,msw,mac</values> - <default-value force="1">$(WX_PORT_DEFAULT)</default-value> - <description> - Port of the wx library to build against - </description> - </option> - </if> - - <if cond="not isdefined('PLATFORM_OS')"> - <option name="PLATFORM_OS"> - <values>linux,mac,win</values> - <default-value force="1">win</default-value> - <description> - Platform the wx library is being built on - </description> - </option> - </if> - - - <if cond="not isdefined('DEBUG')"> - <option name="DEBUG"> - <values>0,1</values> - <default-value>0</default-value> - <description> - Whether or not to build debug - </description> - </option> - </if> - - <template id="jscore"> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <!-- MSVC chokes on #import, so don't use ForwardingHeaders... --> - <include>$(WK_ROOT)/JavaScriptCore/os-win32</include><!-- stdint.h is here --> - <include>$(WKOUTPUTDIR)</include> - </if> - <lib-path>$(WKOUTPUTDIR)</lib-path> - <sys-lib>jscore</sys-lib> - </template> - - <template id="webcore"> - <if cond="FORMAT=='gnu'"> - <!-- FIXME: we need proper configure checks --> - <define>HAVE_FUNC_ISNAN</define> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/os-win32</include> - <define>HAVE_SYS_TIMEB_H=1</define> - <define>HAVE_FLOAT_H=1</define> - <define>HAVE_FUNC__FINITE=1</define> - </if> - - <include>$(WKOUTPUTDIR)</include> - <include>$(WK_ROOT)/WebCore</include> - <include>$(WK_ROOT)/WebCore/DerivedSources/WebCore</include> - <include>$(WK_ROOT)/WebCore/bindings/js</include> - <include>$(WK_ROOT)/WebCore/bridge</include> - <include>$(WK_ROOT)/WebCore/css</include> - <include>$(WK_ROOT)/WebCore/dom</include> - <include>$(WK_ROOT)/WebCore/editing</include> - <include>$(WK_ROOT)/WebCore/history</include> - <include>$(WK_ROOT)/WebCore/html</include> - <include>$(WK_ROOT)/WebCore/inspector</include> - <include>$(WK_ROOT)/WebCore/loader</include> - <include>$(WK_ROOT)/WebCore/loader/icon</include> - <include>$(WK_ROOT)/WebCore/page</include> - <include>$(WK_ROOT)/WebCore/page/animation</include> - <include>$(WK_ROOT)/WebCore/platform</include> - <include>$(WK_ROOT)/WebCore/platform/animation</include> - <include>$(WK_ROOT)/WebCore/platform/graphics</include> - <include>$(WK_ROOT)/WebCore/platform/graphics/transforms</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/gif</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/jpeg</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/png</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/zlib</include> - <include>$(WK_ROOT)/WebCore/platform/network</include> - <include>$(WK_ROOT)/WebCore/platform/network/curl</include> - <include>$(WK_ROOT)/WebCore/platform/sql</include> - <include>$(WK_ROOT)/WebCore/platform/text</include> - <include>$(WK_ROOT)/WebCore/rendering</include> - <include>$(WK_ROOT)/WebCore/rendering/style</include> - <include>$(WK_ROOT)/WebCore/storage</include> - <include>$(WK_ROOT)/WebCore/xml</include> - - <include>$(WK_ROOT)/JavaScriptCore</include> - <include>$(WK_ROOT)/JavaScriptCore/assembler</include> - <include>$(WK_ROOT)/JavaScriptCore/bytecode</include> - <include>$(WK_ROOT)/JavaScriptCore/bytecompiler</include> - <include>$(WK_ROOT)/JavaScriptCore/jit</include> - <include>$(WK_ROOT)/JavaScriptCore/parser</include> - <include>$(WK_ROOT)/JavaScriptCore/pcre</include> - <include>$(WK_ROOT)/JavaScriptCore/profiler</include> - <include>$(WK_ROOT)/JavaScriptCore/runtime</include> - <include>$(WK_ROOT)/JavaScriptCore/interpreter</include> - <include>$(WK_ROOT)/JavaScriptCore/wtf</include> - </template> - -</makefile> diff --git a/WebKit/wx/wxwebkit.bkl b/WebKit/wx/wxwebkit.bkl index ccf6752..e69de29 100644 --- a/WebKit/wx/wxwebkit.bkl +++ b/WebKit/wx/wxwebkit.bkl @@ -1,83 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2007 Kevin Ollivier. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This file builds the wxWebKit library. - ---> - -<makefile> - <include file="wxwk-settings.bkl"/> - - <dll id="wxwebkit-dynamic" template="wxwk,jscore,webcore,xml2,iconv,xslt,icu,curl,sqlite3,gtk,pthreads"> - <!-- make sure we relink wxwebkit if either webcore or jscore change --> - <if cond="FORMAT=='gnu'"> - <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file> - </if> - <if cond="FORMAT=='msvc'"> - <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file> - </if> - <runtime-libs>dynamic</runtime-libs> - <dllname>wxwebkit</dllname> - <libname>wxwebkit</libname> - - <include>$(WK_ROOT)/WebCore/platform/graphics/wx</include> - <include>$(WK_ROOT)/WebCore/platform/wx</include> - <include>$(WK_ROOT)/WebCore/bridge/wx</include> - <include>$(WK_ROOT)/WebCore/page/wx</include> - <include>$(WK_ROOT)/WebKit/wx</include> - <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include> - - <lib-path>$(WKOUTPUTDIR)</lib-path> - <sys-lib>webcore-wx</sys-lib> - <sys-lib>jscore</sys-lib> - - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>winmm</sys-lib> <!-- for timeGetTime --> - <sys-lib>gdiplus</sys-lib> - <sys-lib>libpng</sys-lib> - <sys-lib>libjpeg</sys-lib> - </if> - - <sources> - WebKitSupport/ChromeClientWx.cpp - WebKitSupport/ContextMenuClientWx.cpp - WebKitSupport/DragClientWx.cpp - WebKitSupport/EditorClientWx.cpp - WebKitSupport/FrameLoaderClientWx.cpp - WebKitSupport/InspectorClientWx.cpp - - WebFrame.cpp - WebView.cpp - WebBrowserShell.cpp - </sources> - </dll> - -</makefile> diff --git a/WebKit/wx/wxwk-settings.bkl b/WebKit/wx/wxwk-settings.bkl index d51c18a..e69de29 100644 --- a/WebKit/wx/wxwk-settings.bkl +++ b/WebKit/wx/wxwk-settings.bkl @@ -1,109 +0,0 @@ -<?xml version="1.0" ?> -<!-- -Copyright (C) 2007 Kevin Ollivier All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -JavaScriptCore Bakefile project file. ---> - -<makefile> - <set var="WX_UNICODE">1</set> - <set var="WX_SHARED">1</set> - - <include file="presets/wx.bkl"/> - <include file="presets/wxwebkit.bkl"/> - <include file="dependencies.bkl"/> - - <set var="BUILDDIR">obj-$(FORMAT)</set> - <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define - it in case the presets/wx.bkl doesn't define it for us. --> - - <if cond="not isdefined('WX_PYTHON')"> - <set var="WX_PYTHON">0</set> - </if> - - <template id="wxwk_build_settings"> - <dirname>$(WKOUTPUTDIR)</dirname> - <warnings>default</warnings> - <cxx-rtti>on</cxx-rtti> - <cxx-exceptions>on</cxx-exceptions> - <define>BUILDING_WX__=1</define> - <define>ENABLE_DOM_STORAGE</define> - <define> - $(substituteFromDict(DEBUG,{'1':'','0':'NDEBUG'})) - </define> - <define>USE_SYSTEM_MALLOC</define> - <optimize> - $(substituteFromDict(DEBUG,{'1':'off','0':'speed'})) - </optimize> - <debug-info> - $(substituteFromDict(DEBUG,{'1':'on','0':'off'})) - </debug-info> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <set var="DEBUG_RUNTIME"> - <if cond="WX_PYTHON=='1' and WX_DEBUG=='0'">off</if> - <if cond="WX_PYTHON=='0' and WX_DEBUG=='0'">off</if> - <if cond="WX_PYTHON=='1' and WX_DEBUG=='1'">off</if> - <if cond="WX_PYTHON=='0' and WX_DEBUG=='1'">on</if> - </set> - <debug-runtime-libs> - $(DEBUG_RUNTIME) - </debug-runtime-libs> - </if> - <if cond="FORMAT=='gnu'"> - <include>$(WK_ROOT)/WebKitLibraries/unix/include</include> - <lib-path>$(WK_ROOT)/WebKitLibraries/unix/lib</lib-path> - <lib-path>$(WK_ROOT)/WebKitLibraries</lib-path> - </if> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <lib-path>$(WK_ROOT)/WebKitLibraries/win/lib</lib-path> - </if> - </template> - <template id="wxwk" template="wxwk_build_settings,wx"> - <!-- - since wx 2.8's libpng and libjpeg symbols get exported when using gcc/gnu make - we need to make sure our versions appear first, so that it will get the symbols - from the right place - --> - <if cond="FORMAT=='gnu'"> - <ldflags>-ljpeg -lpng</ldflags> - </if> - - <set var="WEBCORE_LIBS"> - <if cond="PLATFORM_OS=='mac'"> - WebKitSystemInterfaceTiger - </if> - </set> - <sys-lib>$(WEBCORE_LIBS)</sys-lib> - <wx-lib>core</wx-lib> - <wx-lib>base</wx-lib> - <if cond="PLATFORM_WIN32=='1'"> - <define>WXUSINGDLL=1</define> - </if> - </template> - -</makefile> |