summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-13 06:44:40 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-13 06:44:40 -0700
commit08014c20784f3db5df3a89b73cce46037b77eb59 (patch)
tree47749210d31e19e6e2f64036fa8fae2ad693476f /WebKit
parent860220379e56aeb66424861ad602b07ee22b4055 (diff)
parent4c3661f7918f8b3f139f824efb7855bedccb4c94 (diff)
downloadexternal_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.zip
external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.gz
external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.bz2
Merge changes Ide388898,Ic49f367c,I1158a808,Iacb6ca5d,I2100dd3a,I5c1abe54,Ib0ef9902,I31dbc523,I570314b3
* changes: Merge WebKit at r75315: Update WebKit version Merge WebKit at r75315: Add FrameLoaderClient PageCache stubs Merge WebKit at r75315: Stub out AXObjectCache::remove() Merge WebKit at r75315: Fix ImageBuffer Merge WebKit at r75315: Fix PluginData::initPlugins() Merge WebKit at r75315: Fix conflicts Merge WebKit at r75315: Fix Makefiles Merge WebKit at r75315: Move Android-specific WebCore files to Source Merge WebKit at r75315: Initial merge by git.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/ChangeLog6
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj8
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h3
-rw-r--r--WebKit/cf/ChangeLog12
-rw-r--r--WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp7
-rw-r--r--WebKit/chromium/ChangeLog427
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/README16
-rw-r--r--WebKit/chromium/WebKit.grd4
-rw-r--r--WebKit/chromium/WebKit.gyp39
-rw-r--r--WebKit/chromium/public/WebAnimationController.h21
-rw-r--r--WebKit/chromium/public/WebAudioDevice.h55
-rw-r--r--WebKit/chromium/public/WebAutoFillClient.h90
-rw-r--r--WebKit/chromium/public/WebFormElement.h8
-rw-r--r--WebKit/chromium/public/WebIDBDatabaseError.h8
-rw-r--r--WebKit/chromium/public/WebIDBKey.h4
-rw-r--r--WebKit/chromium/public/WebInputElement.h8
-rw-r--r--WebKit/chromium/public/WebKitClient.h5
-rw-r--r--WebKit/chromium/public/WebLabelElement.h8
-rw-r--r--WebKit/chromium/public/WebOptionElement.h8
-rw-r--r--WebKit/chromium/public/WebSelectElement.h12
-rw-r--r--WebKit/chromium/public/WebWidget.h9
-rw-r--r--WebKit/chromium/public/linux/WebThemeEngine.h7
-rw-r--r--WebKit/chromium/public/mac/WebThemeEngine.h78
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp21
-rw-r--r--WebKit/chromium/src/AudioDestinationChromium.cpp125
-rw-r--r--WebKit/chromium/src/AudioDestinationChromium.h67
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp34
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp8
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--WebKit/chromium/src/GraphicsContext3DChromium.cpp567
-rw-r--r--WebKit/chromium/src/GraphicsContext3DInternal.h311
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp1
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp16
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp5
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp249
-rw-r--r--WebKit/chromium/src/WebViewImpl.h3
-rw-r--r--WebKit/chromium/tests/PopupMenuTest.cpp1
-rw-r--r--WebKit/efl/ChangeLog125
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.h4
-rw-r--r--WebKit/efl/WebCoreSupport/EditorClientEfl.cpp8
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp8
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h3
-rw-r--r--WebKit/efl/ewk/ewk_contextmenu.cpp11
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp39
-rw-r--r--WebKit/efl/ewk/ewk_frame.h21
-rw-r--r--WebKit/efl/ewk/ewk_private.h4
-rw-r--r--WebKit/efl/ewk/ewk_tiled_backing_store.c72
-rw-r--r--WebKit/efl/ewk/ewk_tiled_matrix.c4
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp6
-rw-r--r--WebKit/efl/ewk/ewk_view.h2
-rw-r--r--WebKit/gtk/ChangeLog349
-rw-r--r--WebKit/gtk/GNUmakefile.am42
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp39
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.h1
-rw-r--r--WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp1
-rw-r--r--WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp8
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.cpp3
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp39
-rw-r--r--WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h1
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp53
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp45
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h3
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp1
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp9
-rw-r--r--WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h2
-rw-r--r--WebKit/gtk/docs/GNUmakefile.am8
-rw-r--r--WebKit/gtk/webkit/webkit.h1
-rw-r--r--WebKit/gtk/webkit/webkitapplicationcache.cpp7
-rw-r--r--WebKit/gtk/webkit/webkitapplicationcacheprivate.h35
-rw-r--r--WebKit/gtk/webkit/webkitdownload.cpp14
-rw-r--r--WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp3
-rw-r--r--WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h34
-rw-r--r--WebKit/gtk/webkit/webkitglobals.cpp (renamed from WebKit/gtk/webkit/webkitprivate.cpp)180
-rw-r--r--WebKit/gtk/webkit/webkitglobals.h64
-rw-r--r--WebKit/gtk/webkit/webkitglobalsprivate.h44
-rw-r--r--WebKit/gtk/webkit/webkithittestresult.cpp9
-rw-r--r--WebKit/gtk/webkit/webkitnetworkrequest.cpp10
-rw-r--r--WebKit/gtk/webkit/webkitnetworkresponse.cpp8
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h98
-rw-r--r--WebKit/gtk/webkit/webkitsecurityorigin.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitsoupauthdialog.h8
-rw-r--r--WebKit/gtk/webkit/webkitviewportattributes.cpp4
-rw-r--r--WebKit/gtk/webkit/webkitwebbackforwardlist.cpp5
-rw-r--r--WebKit/gtk/webkit/webkitwebdatabase.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitwebdatasource.cpp33
-rw-r--r--WebKit/gtk/webkit/webkitwebdatasourceprivate.h35
-rw-r--r--WebKit/gtk/webkit/webkitwebframe.cpp85
-rw-r--r--WebKit/gtk/webkit/webkitwebframeprivate.h3
-rw-r--r--WebKit/gtk/webkit/webkitwebhistoryitem.cpp5
-rw-r--r--WebKit/gtk/webkit/webkitwebinspector.cpp19
-rw-r--r--WebKit/gtk/webkit/webkitwebnavigationaction.cpp10
-rw-r--r--WebKit/gtk/webkit/webkitwebplugin.cpp4
-rw-r--r--WebKit/gtk/webkit/webkitwebplugindatabase.cpp4
-rw-r--r--WebKit/gtk/webkit/webkitwebpluginprivate.h1
-rw-r--r--WebKit/gtk/webkit/webkitwebpolicydecision.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitwebresource.cpp8
-rw-r--r--WebKit/gtk/webkit/webkitwebsettings.cpp43
-rw-r--r--WebKit/gtk/webkit/webkitwebsettingsprivate.h4
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp187
-rw-r--r--WebKit/gtk/webkit/webkitwebview.h30
-rw-r--r--WebKit/gtk/webkit/webkitwebviewprivate.h22
-rw-r--r--WebKit/gtk/webkit/webkitwebwindowfeatures.cpp68
-rw-r--r--WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h34
-rw-r--r--WebKit/haiku/ChangeLog27
-rw-r--r--WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp12
-rw-r--r--WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp8
-rw-r--r--WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h3
-rw-r--r--WebKit/mac/ChangeLog251
-rw-r--r--WebKit/mac/History/WebHistory.mm18
-rw-r--r--WebKit/mac/Info.plist2
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm2
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm6
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm35
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h7
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm10
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.mm30
-rw-r--r--WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm8
-rw-r--r--WebKit/mac/WebView/WebDocumentInternal.h3
-rw-r--r--WebKit/mac/WebView/WebFrame.mm57
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h4
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h3
-rw-r--r--WebKit/mac/WebView/WebFullScreenController.h78
-rw-r--r--WebKit/mac/WebView/WebFullScreenController.mm923
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm13
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm36
-rw-r--r--WebKit/mac/WebView/WebScriptDebugger.mm2
-rw-r--r--WebKit/mac/WebView/WebScriptWorld.mm2
-rw-r--r--WebKit/mac/WebView/WebTextCompletionController.mm2
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.mm12
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm4
-rw-r--r--WebKit/mac/WebView/WebView.mm39
-rw-r--r--WebKit/mac/WebView/WebViewData.h7
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h9
-rw-r--r--WebKit/qt/Api/qwebkitplatformplugin.h2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp50
-rw-r--r--WebKit/qt/Api/qwebpage.h4
-rw-r--r--WebKit/qt/Api/qwebview.cpp33
-rw-r--r--WebKit/qt/Api/qwebview.h4
-rw-r--r--WebKit/qt/ChangeLog268
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp26
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h42
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp251
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp15
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h3
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorServerQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp5
-rw-r--r--WebKit/qt/WebCoreSupport/WebPlatformStrategies.h1
-rw-r--r--WebKit/qt/WebKit_pch.h2
-rw-r--r--WebKit/qt/declarative/qdeclarativewebview.cpp2
-rw-r--r--WebKit/qt/docs/qtwebkit.qdoc2
-rw-r--r--WebKit/qt/docs/qtwebkit.qdocconf2
-rw-r--r--WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h8
-rw-r--r--WebKit/qt/tests/hybridPixmap/widget.h2
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp87
-rw-r--r--WebKit/win/AccessibleDocument.cpp2
-rw-r--r--WebKit/win/ChangeLog139
-rw-r--r--WebKit/win/FullscreenVideoController.cpp45
-rw-r--r--WebKit/win/FullscreenVideoController.h10
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.cpp4
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp8
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.h3
-rw-r--r--WebKit/win/WebFrame.cpp1
-rw-r--r--WebKit/win/WebKit.vcproj/InterfacesCommon.vsprops8
-rw-r--r--WebKit/win/WebKit.vcproj/InterfacesPostBuild.cmd4
-rw-r--r--WebKit/win/WebKit.vcproj/InterfacesPreBuild.cmd6
-rwxr-xr-xWebKit/win/WebKit.vcproj/WebKit.make13
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.sln16
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUID.vcproj2
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUIDCommon.vsprops4
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUIDPostBuild.cmd2
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitGUIDPreBuild.cmd4
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitLibCommon.vsprops6
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitLibPostBuild.cmd22
-rw-r--r--WebKit/win/WebKit.vcproj/WebKitLibPreBuild.cmd12
-rw-r--r--WebKit/win/WebScriptWorld.cpp2
-rw-r--r--WebKit/win/WebView.cpp17
-rw-r--r--WebKit/win/WebView.h12
-rw-r--r--WebKit/wince/ChangeLog44
-rw-r--r--WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp7
-rw-r--r--WebKit/wince/WebCoreSupport/ChromeClientWinCE.h13
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp4
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h2
-rw-r--r--WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp8
-rw-r--r--WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp8
-rw-r--r--WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h3
-rw-r--r--WebKit/wx/ChangeLog36
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp8
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.h5
-rw-r--r--WebKit/wx/bindings/python/wscript6
-rw-r--r--WebKit/wx/wscript28
196 files changed, 5510 insertions, 1730 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 34b9b13..a4bdeef 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-31 Adam Barth <abarth@webkit.org>
+
+ Update SVN ignore property to hide two more external dependencies.
+
+ * chromium: Modified property svn:ignore.
+
2010-12-22 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index 75254f2..5856175 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -363,6 +363,8 @@
C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */; };
CD8EAC7311CAC9A300774075 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8EAC7211CAC9A300774075 /* IOKit.framework */; };
+ CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */; };
+ CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */; };
DD7CDEE70A23BA9E00069928 /* WebTypesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */; };
DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */; };
@@ -685,6 +687,8 @@
C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; };
C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebUserContentURLPattern.mm; sourceTree = "<group>"; };
CD8EAC7211CAC9A300774075 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+ CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFullScreenController.h; sourceTree = "<group>"; };
+ CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFullScreenController.mm; sourceTree = "<group>"; };
DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTypesInternal.h; sourceTree = "<group>"; };
DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebElementDictionary.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1187,6 +1191,8 @@
51A8B52F04282B5900CA2D3A /* WebFrameView.mm */,
51A8B53204282BD200CA2D3A /* WebFrameViewInternal.h */,
93C6F14507920B93002449CD /* WebFrameViewPrivate.h */,
+ CDA62AE0125F87C2007FD118 /* WebFullScreenController.h */,
+ CDA62AE1125F87C2007FD118 /* WebFullScreenController.mm */,
BC7F889C10C9D30C00D6133D /* WebGeolocationPosition.h */,
BC7F889D10C9D30C00D6133D /* WebGeolocationPosition.mm */,
BC7F88A410C9D88B00D6133D /* WebGeolocationPositionInternal.h */,
@@ -1625,6 +1631,7 @@
598AD92A1201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h in Headers */,
598ADA461202275000ABAE4E /* WebDeviceOrientationProvider.h in Headers */,
93E2A1A4123B0B3C009FE12A /* WebDashboardRegion.h in Headers */,
+ CDA62AE2125F87C2007FD118 /* WebFullScreenController.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1993,6 +2000,7 @@
598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,
598AD9281201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm in Sources */,
93E2A1A5123B0B3C009FE12A /* WebDashboardRegion.mm in Sources */,
+ CDA62AE3125F87C2007FD118 /* WebFullScreenController.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
index 034333e..25561a8 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h
@@ -224,6 +224,9 @@ namespace android {
void dispatchDidChangeIcons();
void dispatchWillSendSubmitEvent(HTMLFormElement*);
+
+ virtual void didSaveToPageCache() { }
+ virtual void didRestoreFromPageCache() { }
private:
CacheBuilder m_cacheBuilder;
Frame* m_frame;
diff --git a/WebKit/cf/ChangeLog b/WebKit/cf/ChangeLog
index 1efdd4d..f712c97 100644
--- a/WebKit/cf/ChangeLog
+++ b/WebKit/cf/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-03 Pratik Solanki <psolanki@apple.com>
+
+ Mac build fix. Define WTF_USE_CFNETWORK for Windows build only.
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+
+2011-01-03 Brian Weinstein <bweinstein@apple.com>
+
+ Windows build fix. Define WTF_USE_CFNETWORK in WebInspectorClientCF.
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+
2010-10-18 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
index 62fdd4d..9183fa4 100644
--- a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -27,8 +27,8 @@
// before including any other files. Failing to include config.h will leave
// WTF_PLATFORM_CF and WTF_USE_JSC undefined, causing build failures in this
// file. But Mac doesn't have a config.h for WebKit, so we can't include the
-// Windows one here. For now we can just define WTF_PLATFORM_CF and WTF_USE_JSC
-// manually, but we need a better long-term solution.
+// Windows one here. For now we can just define WTF_PLATFORM_CF, WTF_USE_JSC, and
+// WTF_USE_CFNETWORK manually, but we need a better long-term solution.
#ifndef WTF_PLATFORM_CF
#define WTF_PLATFORM_CF 1
#endif
@@ -38,6 +38,9 @@
#endif
#if defined(WIN32) || defined(_WIN32)
+#ifndef WTF_USE_CFNETWORK
+#define WTF_USE_CFNETWORK 1
+#endif
#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
#define JS_EXPORTDATA __declspec(dllexport)
#else
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 335732a..54ca8ce 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,430 @@
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ Update references to WebCore.
+
+ * WebKit.grd:
+ * WebKit.gyp:
+
+2011-01-07 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Scrollbar code cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=52073
+
+ Scrollbar code cleanup:
+ - Fix typo in Linux scrollbar enum name
+
+ * public/linux/WebThemeEngine.h:
+ * src/ChromiumBridge.cpp:
+ (WebCore::WebThemePart):
+ (WebCore::GetWebThemeExtraParams):
+
+2011-01-07 James Robinson <jamesr@chromium.org>
+
+ Revert "Implement mozilla's animationTime property"
+ https://bugs.webkit.org/show_bug.cgi?id=51952
+
+ This approach isn't quite right.
+
+ * public/WebWidget.h:
+ * src/WebPopupMenuImpl.cpp:
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ * src/WebViewImpl.h:
+
+2011-01-05 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Define GC3D types to match GL types and use them in GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=45557
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::bindAttribLocation):
+ (WebCore::GraphicsContext3DInternal::bufferData):
+ (WebCore::GraphicsContext3DInternal::bufferSubData):
+ (WebCore::GraphicsContext3DInternal::getActiveAttrib):
+ (WebCore::GraphicsContext3DInternal::getActiveUniform):
+ (WebCore::GraphicsContext3DInternal::getAttribLocation):
+ (WebCore::GraphicsContext3DInternal::getString):
+ (WebCore::GraphicsContext3DInternal::getUniformLocation):
+ (WebCore::GraphicsContext3DInternal::texImage2D):
+ (WebCore::GraphicsContext3DInternal::texSubImage2D):
+ (WebCore::GraphicsContext3DInternal::uniform1fv):
+ (WebCore::GraphicsContext3DInternal::uniform1iv):
+ (WebCore::GraphicsContext3DInternal::uniform2fv):
+ (WebCore::GraphicsContext3DInternal::uniform2iv):
+ (WebCore::GraphicsContext3DInternal::uniform3fv):
+ (WebCore::GraphicsContext3DInternal::uniform3iv):
+ (WebCore::GraphicsContext3DInternal::uniform4fv):
+ (WebCore::GraphicsContext3DInternal::uniform4iv):
+ (WebCore::GraphicsContext3DInternal::uniformMatrix2fv):
+ (WebCore::GraphicsContext3DInternal::uniformMatrix3fv):
+ (WebCore::GraphicsContext3DInternal::uniformMatrix4fv):
+ * src/GraphicsContext3DInternal.h:
+
+2011-01-06 James Simonsen <simonjam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Web Timing] Remove vendor prefix
+ https://bugs.webkit.org/show_bug.cgi?id=48922
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::performance): Rename to performance.
+
+2011-01-06 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Implement mozilla's animationTime property
+ https://bugs.webkit.org/show_bug.cgi?id=51952
+
+ WebKit API support for webkitAnimationTime.
+
+ * public/WebWidget.h:
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime):
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::clearCurrentAnimationTime):
+ * src/WebViewImpl.h:
+
+2010-12-29 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add a WebAutoFillClient interface that moves some functions from WebViewClient
+ https://bugs.webkit.org/show_bug.cgi?id=51710
+
+ * WebKit.gyp:
+ * public/WebAutoFillClient.h: Added.
+ (WebKit::WebAutoFillClient::didAcceptAutoFillSuggestion):
+ (WebKit::WebAutoFillClient::didSelectAutoFillSuggestion):
+ (WebKit::WebAutoFillClient::didClearAutoFillSelection):
+ (WebKit::WebAutoFillClient::removeAutocompleteSugestion):
+ (WebKit::WebAutoFillClient::didAcceptAutocompleteSuggestion):
+ (WebKit::WebAutoFillClient::textFieldDidBeginEditing):
+ (WebKit::WebAutoFillClient::textFieldDidEndEditing):
+ (WebKit::WebAutoFillClient::textFieldDidChange):
+ (WebKit::WebAutoFillClient::textFieldDidReceiveKeyDown):
+ (WebKit::WebAutoFillClient::~WebAutoFillClient):
+
+2011-01-05 Chris Rogers <crogers@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add WebKitClient::createAudioDevice() for Chromium port of web audio API
+ https://bugs.webkit.org/show_bug.cgi?id=51424
+
+ * WebKit.gyp:
+ * public/WebAudioDevice.h: Added.
+ (WebKit::WebAudioDevice::RenderCallback::~RenderCallback):
+ (WebKit::WebAudioDevice::~WebAudioDevice):
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::createAudioDevice):
+ * src/AudioDestinationChromium.cpp: Added.
+ (WebCore::AudioDestination::create):
+ (WebCore::AudioDestinationChromium::AudioDestinationChromium):
+ (WebCore::AudioDestinationChromium::~AudioDestinationChromium):
+ (WebCore::AudioDestinationChromium::start):
+ (WebCore::AudioDestinationChromium::stop):
+ (WebCore::AudioDestination::hardwareSampleRate):
+ (WebCore::AudioDestinationChromium::render):
+ * src/AudioDestinationChromium.h: Added.
+ (WebCore::AudioDestinationChromium::isPlaying):
+ (WebCore::AudioDestinationChromium::sampleRate):
+
+2011-01-05 David Levin <levin@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] WEBKIT_API and styling fixes for the chromium api.
+ https://bugs.webkit.org/show_bug.cgi?id=51863
+
+ Removed some incorrect uses of WEBKIT_API.
+ Fixed some abbreviations by making them whole words.
+
+ * public/WebAnimationController.h: Removed WEBKIT_API from virtual functions.
+ * public/WebFormElement.h: Removed WEBKIT_API from inline functions
+ and fixed some abbreviations.
+ (WebKit::WebFormElement::WebFormElement):
+ (WebKit::WebFormElement::operator=):
+ (WebKit::WebFormElement::assign):
+ * public/WebIDBDatabaseError.h: Ditto.
+ (WebKit::WebIDBDatabaseError::WebIDBDatabaseError):
+ (WebKit::WebIDBDatabaseError::operator=):
+ * public/WebInputElement.h: Ditto.
+ (WebKit::WebInputElement::WebInputElement):
+ (WebKit::WebInputElement::operator=):
+ (WebKit::WebInputElement::assign):
+ * public/WebLabelElement.h: Ditto.
+ (WebKit::WebLabelElement::WebLabelElement):
+ (WebKit::WebLabelElement::operator=):
+ (WebKit::WebLabelElement::assign):
+ * public/WebOptionElement.h: Ditto.
+ (WebKit::WebOptionElement::WebOptionElement):
+ (WebKit::WebOptionElement::operator=):
+ (WebKit::WebOptionElement::assign):
+ * public/WebSelectElement.h: Ditto (and minor spacing cleanup).
+ (WebKit::WebSelectElement::WebSelectElement):
+ (WebKit::WebSelectElement::operator=):
+ (WebKit::WebSelectElement::assign):
+
+2011-01-05 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] WebIDBKey clean-up
+ https://bugs.webkit.org/show_bug.cgi?id=51925
+
+ Remove constructors that are no longer used since the
+ Chromium side has been updated.
+
+ * public/WebIDBKey.h:
+
+2011-01-04 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ Update README file with a description of the WEBKIT_API macro and
+ guidelines for its usage. Also document the various WEBKIT_USING_*
+ macros.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51880
+
+ * README:
+
+2011-01-04 Evan Martin <evan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] depend on harfbuzz explicitly
+ https://bugs.webkit.org/show_bug.cgi?id=51895
+
+ Update Chromium DEPS to pick up newer Chromium version
+ that simplifies expressing the Harfbuzz dependency.
+
+ * DEPS:
+
+2011-01-04 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Changes:
+ 1. Add WebKit::WebWidget::confirmComposition(const WebString& text)
+ This new method corresponds to Editor::confirmComposition(text) and
+ Editor::insertText(text). It'll be used by both DumpRenderTree's
+ TextInputController and chromium browser.
+ 2. Fix WebFrameImpl::insertText
+ It should call Editor::confirmComposition(text) rather than
+ Editor::insertText(text) if there is an ongoing composition.
+ It matches the behavior of WebKit Mac port.
+ 3. Fix WebFrameImpl::setMarkedText
+ Editor::confirmComposition(text) shouldn't be called in this
+ method, which incorrectly inserts the text.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51693
+
+ * public/WebWidget.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::insertText):
+ (WebKit::WebFrameImpl::setMarkedText):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::confirmComposition):
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::confirmComposition):
+ * src/WebViewImpl.h:
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestWebWidget::confirmComposition):
+
+2011-01-03 Daniel Bates <dbates@rim.com>
+
+ Attempt to fix the Chromium Linux Release build after changeset 74895 <http://trac.webkit.org/changeset/74895>.
+
+ The portion of the patch in <https://bugs.webkit.org/show_bug.cgi?id=51791> that modified the
+ file src/WebSearchableFormData.cpp was not landed (why?). Although the change log entry
+ associated with this change was landed.
+
+ * src/WebSearchableFormData.cpp:
+ (HTMLNames::IsInDefaultState):
+
+2011-01-02 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Clarify ImageBuffer and ImageData relationship
+ https://bugs.webkit.org/show_bug.cgi?id=51297
+
+ Use ByteArray instead of ImageData.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas):
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * WebKit.gyp:
+ - Point to JavaScriptCore in its new location.
+
+2010-12-30 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] Add WebThemeEngineDRTMac so that Chromium DRT scrollbar rendering can match the Mac port's
+ https://bugs.webkit.org/show_bug.cgi?id=51728
+
+ Roll DEPS to pick up WebThemeEngine changes.
+
+ * DEPS:
+
+2010-12-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r74735.
+ http://trac.webkit.org/changeset/74735
+ https://bugs.webkit.org/show_bug.cgi?id=51715
+
+ assert failures on fast/forms/input-maxlength-ime-
+ completed.html (Requested by mihaip on #webkit).
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::setMarkedText):
+
+2010-12-29 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix editing/input/ime-composition-clearpreedit.html test in chromium
+ by removing the line "editor->confirmComposition(text);" from
+ WebFrameImpl::setMarkedText() method, because that line will insert the
+ text into the focused node, which is apparently wrong.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51693
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::setMarkedText):
+
+2010-12-23 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Initialize to 0 for undefined values in CopyTexImage2D
+ https://bugs.webkit.org/show_bug.cgi?id=51421
+
+ * src/GraphicsContext3DChromium.cpp: Implement getInternalFramebufferSize().
+ (WebCore::GraphicsContext3DInternal::getInternalFramebufferSize):
+ * src/GraphicsContext3DInternal.h:
+
+2010-12-23 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r74561.
+ http://trac.webkit.org/changeset/74561
+ https://bugs.webkit.org/show_bug.cgi?id=51565
+
+ "Broke Chromium UI tests on Vista" (Requested by kbr_google on
+ #webkit).
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
+2010-12-23 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] Add WebThemeEngine for Mac to allow scrollbar rendering to be overridden for the DRT
+ https://bugs.webkit.org/show_bug.cgi?id=51507
+
+ Adds WebThemeEngine for the Mac (it already has parallel definitions for
+ Windows and Linux) so that scrollbar thumb rendering can be overridden
+ for the DRT (to be consistent with the NSScroller-based rendering
+ used by the Mac port).
+
+ * public/mac/WebThemeEngine.h: Added.
+ (WebKit::WebThemeEngine::paintScrollbarThumb):
+ * src/AssertMatchingEnums.cpp:
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::paintScrollbarThumb):
+
+2010-12-23 Sam Weinig <sam@webkit.org>
+
+ Fix build.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::didSaveToPageCache):
+ (WebKit::FrameLoaderClientImpl::didRestoreFromPageCache):
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::WebFrameLoaderClientImpl::didSaveToPageCache):
+ (WebKit::WebFrameLoaderClientImpl::didRestoreFromPageCache):
+ * src/FrameLoaderClientImpl.h:
+
+2010-12-20 Adrienne Walker <enne@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Tile root layer of the compositor.
+ https://bugs.webkit.org/show_bug.cgi?id=49947
+
+ Refactor root layer logic out of WebViewImpl and into
+ LayerTilerChromium. The painting is now done through an interface
+ rather than directly in WebViewImpl.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::scrollRootLayerRect):
+ (WebKit::WebViewImpl::invalidateRootLayerRect):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ (WebKit::WebViewImplTilePaintInterface::WebViewImplTilePaintInterface):
+ (WebKit::WebViewImplTilePaintInterface::paint):
+ (WebKit::WebViewImplScrollbarPaintInterface::WebViewImplScrollbarPaintInterface):
+ (WebKit::WebViewImplScrollbarPaintInterface::paint):
+ (WebKit::WebViewImpl::doComposite):
+ * src/WebViewImpl.h:
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::executeCommand):
+
+2010-12-23 W. James MacLean <wjmaclean@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+ https://bugs.webkit.org/show_bug.cgi?id=51186
+
+ Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
2010-12-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74503.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 0992f31..7fbcbcd 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '68558'
+ 'chromium_rev': '70840'
}
deps = {
diff --git a/WebKit/chromium/README b/WebKit/chromium/README
index 9173454..ecac503 100644
--- a/WebKit/chromium/README
+++ b/WebKit/chromium/README
@@ -27,6 +27,22 @@ DEFINES
defined when building the 'src' directory, and it should also be defined by
the consumer to ensure proper linkage to the shared library.
+ WEBKIT_API is defined for platforms (e.g., Windows) that require additional
+ annotations on functions and methods, which should be exported from WebKit
+ when it is built as a DLL. In general, this includes all public methods
+ unless the methods are defined inline, marked pure virtual, or contained
+ within a WEBKIT_IMPLEMENTATION section. Also, any private method called by a
+ public inline-defined method should be annotated with WEBKIT_API. WEBKIT_API
+ is not used to export whole classes.
+
+ WEBKIT_USING_SKIA is defined when using Skia as the graphics library.
+
+ WEBKIT_USING_CG is defined when using CG as the graphics library.
+
+ WEBKIT_USING_V8 is defined when using V8 as the JavaScript library.
+
+ WEBKIT_USING_JSC is defined when using JSC as the JavaScript library.
+
BASIC TYPES
diff --git a/WebKit/chromium/WebKit.grd b/WebKit/chromium/WebKit.grd
index 3b7209a..ab89640 100644
--- a/WebKit/chromium/WebKit.grd
+++ b/WebKit/chromium/WebKit.grd
@@ -9,8 +9,8 @@
</outputs>
<release seq="1">
<includes>
- <include name="IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS" file="..\..\WebCore\bindings\v8\DebuggerScript.js" type="BINDATA"/>
- <include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/>
+ <include name="IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS" file="..\..\Source\WebCore\bindings\v8\DebuggerScript.js" type="BINDATA"/>
+ <include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\Source\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/>
</includes>
</release>
</grit>
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 3612a08..9385778 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -30,7 +30,7 @@
{
'includes': [
- '../../WebCore/WebCore.gypi',
+ '../../Source/WebCore/WebCore.gypi',
'../../Tools/DumpRenderTree/DumpRenderTree.gypi',
'WebKit.gypi',
'features.gypi',
@@ -73,7 +73,7 @@
'target_name': 'webkit',
'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
'dependencies': [
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '../../Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(chromium_src_dir)/app/app.gyp:app_base', # For GLContext
'<(chromium_src_dir)/skia/skia.gyp:skia',
'<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
@@ -101,6 +101,7 @@
'public/mac/WebInputEventFactory.h',
'public/mac/WebSandboxSupport.h',
'public/mac/WebScreenInfoFactory.h',
+ 'public/mac/WebThemeEngine.h',
'public/WebAccessibilityCache.h',
'public/WebAccessibilityNotification.h',
'public/WebAccessibilityObject.h',
@@ -110,6 +111,8 @@
'public/WebApplicationCacheHostClient.h',
'public/WebAttribute.h',
'public/WebAudioBus.h',
+ 'public/WebAudioDevice.h',
+ 'public/WebAutoFillClient.h',
'public/WebBindings.h',
'public/WebBlobData.h',
'public/WebBlobRegistry.h',
@@ -303,6 +306,8 @@
'src/AsyncFileSystemChromium.h',
'src/AsyncFileWriterChromium.cpp',
'src/AsyncFileWriterChromium.h',
+ 'src/AudioDestinationChromium.cpp',
+ 'src/AudioDestinationChromium.h',
'src/AutoFillPopupMenuClient.cpp',
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
@@ -586,7 +591,7 @@
'WEBKIT_DLL',
],
'dependencies': [
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '../../Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
'<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/testing/gtest.gyp:gtest',
@@ -697,7 +702,7 @@
'type': 'none',
'dependencies': [
'devtools_html',
- '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
+ '../../Source/WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
],
'conditions': [
['debug_devtools==0', {
@@ -738,7 +743,7 @@
'scripts/generate_devtools_html.py',
# See issue 29695: WebKit.gypi is a source file for devtools.html.
'WebKit.gypi',
- '../../WebCore/inspector/front-end/inspector.html',
+ '../../Source/WebCore/inspector/front-end/inspector.html',
],
'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
'action': ['python', '<@(_inputs)', '<@(_outputs)', '<@(debug_devtools)', '<@(devtools_files)'],
@@ -749,13 +754,13 @@
'type': 'none',
'dependencies': [
'devtools_html',
- '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources'
+ '../../Source/WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources'
],
'sources': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'],
'actions': [{
'action_name': 'concatenate_devtools_js',
'script_name': 'scripts/concatenate_js_files.py',
- 'input_page': '../../WebCore/inspector/front-end/inspector.html',
+ 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html',
'inputs': [
'<@(_script_name)',
'<@(_input_page)',
@@ -764,7 +769,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js'
],
'search_path': [
- '../../WebCore/inspector/front-end',
+ '../../Source/WebCore/inspector/front-end',
'src/js',
'<(SHARED_INTERMEDIATE_DIR)/webcore',
],
@@ -782,7 +787,7 @@
'actions': [{
'action_name': 'concatenate_devtools_css',
'script_name': 'scripts/concatenate_css_files.py',
- 'input_page': '../../WebCore/inspector/front-end/inspector.html',
+ 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html',
'inputs': [
'<@(_script_name)',
'<@(_input_page)',
@@ -790,7 +795,7 @@
'<@(devtools_files)'
],
'search_path': [
- '../../WebCore/inspector/front-end',
+ '../../Source/WebCore/inspector/front-end',
'src/js',
],
'outputs': ['<(PRODUCT_DIR)/resources/inspector/devTools.css'],
@@ -803,7 +808,7 @@
'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
'dependencies': [
'webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '../../Source/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',
@@ -879,11 +884,11 @@
'type': 'executable',
'dependencies': [
'webkit',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
- '../../JavaScriptCore',
+ '../../Source/JavaScriptCore',
'<(DEPTH)',
],
'sources': [
@@ -900,7 +905,7 @@
'TestNetscapePlugIn',
'copy_TestNetscapePlugIn',
'webkit',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
+ '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
'<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
@@ -909,8 +914,8 @@
'include_dirs': [
'<(chromium_src_dir)',
'public',
- '../../JavaScriptCore',
- '../../JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
+ '../../Source/JavaScriptCore',
+ '../../Source/JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
'<(DEPTH)',
],
'defines': [
@@ -942,7 +947,7 @@
'public',
],
'dependencies': [
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
],
}],
['inside_chromium_build==1', {
diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h
index 0d3fcf5..c61e531 100644
--- a/WebKit/chromium/public/WebAnimationController.h
+++ b/WebKit/chromium/public/WebAnimationController.h
@@ -43,16 +43,17 @@ class WebURL;
// 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;
- WEBKIT_API virtual void suspendAnimations() const = 0;
- WEBKIT_API virtual void resumeAnimations() const = 0;
+ virtual bool pauseAnimationAtTime(WebElement&,
+ const WebString& animationName,
+ double time) = 0;
+ virtual bool pauseTransitionAtTime(WebElement&,
+ const WebString& propertyName,
+ double time) = 0;
+
+ virtual unsigned numberOfActiveAnimations() const = 0;
+ virtual void suspendAnimations() const = 0;
+ virtual void resumeAnimations() const = 0;
+
protected:
~WebAnimationController() { }
};
diff --git a/WebKit/chromium/public/WebAudioDevice.h b/WebKit/chromium/public/WebAudioDevice.h
new file mode 100644
index 0000000..a9f5a1c
--- /dev/null
+++ b/WebKit/chromium/public/WebAudioDevice.h
@@ -0,0 +1,55 @@
+/*
+ * 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:
+ *
+ * 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 WebAudioDevice_h
+#define WebAudioDevice_h
+
+#include "WebVector.h"
+
+namespace WebKit {
+
+// Abstract interface to the Chromium audio system.
+
+class WebAudioDevice {
+public:
+ class RenderCallback {
+ public:
+ virtual void render(const WebVector<float*>& audioData, size_t numberOfFrames) = 0;
+ protected:
+ virtual ~RenderCallback() { }
+ };
+
+ virtual ~WebAudioDevice() { }
+
+ virtual void start() = 0;
+ virtual void stop() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebAudioDevice_h
diff --git a/WebKit/chromium/public/WebAutoFillClient.h b/WebKit/chromium/public/WebAutoFillClient.h
new file mode 100644
index 0000000..4e73be0
--- /dev/null
+++ b/WebKit/chromium/public/WebAutoFillClient.h
@@ -0,0 +1,90 @@
+/*
+ * 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 WebAutoFillClient_h
+#define WebAutoFillClient_h
+
+namespace WebKit {
+
+class WebInputElement;
+class WebKeyboardEvent;
+class WebNode;
+class WebString;
+
+class WebAutoFillClient {
+public:
+ // Informs the browser that the user has accepted an AutoFill suggestion for
+ // a WebNode. |uniqueID| is used as a key into the set of AutoFill profiles,
+ // and should never be negative. If it is 0, then the suggestion is an
+ // Autocomplete suggestion; and |value| stores the suggested text. |index|
+ // is an index of the selected suggestion in the list of suggestions provided
+ // by the client.
+ virtual void didAcceptAutoFillSuggestion(const WebNode&,
+ const WebString& value,
+ const WebString& label,
+ int uniqueID,
+ unsigned index) { }
+
+ // Informs the browser that the user has selected an AutoFill suggestion for
+ // a WebNode. This happens when the user hovers over a suggestion or uses
+ // the arrow keys to navigate to a suggestion.
+ virtual void didSelectAutoFillSuggestion(const WebNode&,
+ const WebString& name,
+ const WebString& label,
+ int uniqueID) { }
+
+ // Informs the browser that the user has cleared the selection from the
+ // AutoFill suggestions popup. This happens when a user uses the arrow
+ // keys to navigate outside the range of possible selections.
+ virtual void didClearAutoFillSelection(const WebNode&) { }
+
+ // Instructs the browser to remove the Autocomplete entry specified from
+ // its DB.
+ virtual void removeAutocompleteSuggestion(const WebString& name,
+ const WebString& value) { }
+
+ // Informs the browser that the user has selected an autocomplete (password
+ // or field) suggestion from the drop-down. The input element text has
+ // already been set to the selected suggestion.
+ virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { }
+
+ // These methods are called when the users edits a text-field.
+ virtual void textFieldDidBeginEditing(const WebInputElement&) { }
+ virtual void textFieldDidEndEditing(const WebInputElement&) { }
+ virtual void textFieldDidChange(const WebInputElement&) { }
+ virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { }
+
+protected:
+ ~WebAutoFillClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 2b4ee53..53554d7 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -50,14 +50,14 @@ namespace WebKit {
~WebFormElement() { reset(); }
WebFormElement() : WebElement() { }
- WebFormElement(const WebFormElement& e) : WebElement(e) { }
+ WebFormElement(const WebFormElement& element) : WebElement(element) { }
- WebFormElement& operator=(const WebFormElement& e)
+ WebFormElement& operator=(const WebFormElement& element)
{
- WebElement::assign(e);
+ WebElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); }
+ void assign(const WebFormElement& element) { WebElement::assign(element); }
WEBKIT_API bool autoComplete() const;
WEBKIT_API WebString action() const;
diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h
index c181f78..f247b36 100644
--- a/WebKit/chromium/public/WebIDBDatabaseError.h
+++ b/WebKit/chromium/public/WebIDBDatabaseError.h
@@ -42,11 +42,11 @@ class WebIDBDatabaseError {
public:
~WebIDBDatabaseError() { reset(); }
- WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
- WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
- WEBKIT_API WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e)
+ WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
+ WebIDBDatabaseError(const WebIDBDatabaseError& error) { assign(error); }
+ WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error)
{
- assign(e);
+ assign(error);
return *this;
}
diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h
index 561af2f..376d1c5 100644
--- a/WebKit/chromium/public/WebIDBKey.h
+++ b/WebKit/chromium/public/WebIDBKey.h
@@ -50,10 +50,6 @@ public:
WEBKIT_API static WebIDBKey createInvalid();
WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScriptValue&, const WebIDBKeyPath&);
- // FIXME: Remove these two constructors after Chromium side is done.
- WebIDBKey(const WebString& string) { assignString(string); }
- WebIDBKey(double number) { assignNumber(number); }
-
WebIDBKey(const WebIDBKey& e) { assign(e); }
WebIDBKey& operator=(const WebIDBKey& e)
{
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 3dd7e40..be8623c 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -43,14 +43,14 @@ namespace WebKit {
class WebInputElement : public WebFormControlElement {
public:
WebInputElement() : WebFormControlElement() { }
- WebInputElement(const WebInputElement& e) : WebFormControlElement(e) { }
+ WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
- WebInputElement& operator=(const WebInputElement& e)
+ WebInputElement& operator=(const WebInputElement& element)
{
- WebFormControlElement::assign(e);
+ WebFormControlElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebInputElement& e) { WebFormControlElement::assign(e); }
+ void assign(const WebInputElement& element) { WebFormControlElement::assign(element); }
// This returns true for all of textfield-looking types such as text,
// password, search, email, url, and number.
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index bf9a97b..ae7892d 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -32,6 +32,7 @@
#define WebKitClient_h
#include "WebAudioBus.h"
+#include "WebAudioDevice.h"
#include "WebCommon.h"
#include "WebData.h"
#include "WebLocalizedString.h"
@@ -277,6 +278,10 @@ public:
// Returns newly allocated WebGraphicsContext3D instance.
virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; }
+ // Audio --------------------------------------------------------------
+
+ virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned numberOfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; }
+
// FileSystem ----------------------------------------------------------
// Must return non-null.
diff --git a/WebKit/chromium/public/WebLabelElement.h b/WebKit/chromium/public/WebLabelElement.h
index 3e97c39..eb9b06d 100644
--- a/WebKit/chromium/public/WebLabelElement.h
+++ b/WebKit/chromium/public/WebLabelElement.h
@@ -44,15 +44,15 @@ namespace WebKit {
class WebLabelElement : public WebElement {
public:
WebLabelElement() : WebElement() { }
- WebLabelElement(const WebLabelElement& e) : WebElement(e) { }
+ WebLabelElement(const WebLabelElement& element) : WebElement(element) { }
- WebLabelElement& operator=(const WebLabelElement& e)
+ WebLabelElement& operator=(const WebLabelElement& element)
{
- WebElement::assign(e);
+ WebElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebLabelElement& e) { WebElement::assign(e); }
+ void assign(const WebLabelElement& element) { WebElement::assign(element); }
WEBKIT_API WebElement correspondingControl();
diff --git a/WebKit/chromium/public/WebOptionElement.h b/WebKit/chromium/public/WebOptionElement.h
index 1689a57..24a6eaa 100644
--- a/WebKit/chromium/public/WebOptionElement.h
+++ b/WebKit/chromium/public/WebOptionElement.h
@@ -44,14 +44,14 @@ namespace WebKit {
class WebOptionElement : public WebFormControlElement {
public:
WebOptionElement() : WebFormControlElement() { }
- WebOptionElement(const WebOptionElement& e) : WebFormControlElement(e) { }
+ WebOptionElement(const WebOptionElement& element) : WebFormControlElement(element) { }
- WebOptionElement& operator=(const WebOptionElement& e)
+ WebOptionElement& operator=(const WebOptionElement& element)
{
- WebFormControlElement::assign(e);
+ WebFormControlElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebOptionElement& e) { WebFormControlElement::assign(e); }
+ void assign(const WebOptionElement& element) { WebFormControlElement::assign(element); }
WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value() const;
diff --git a/WebKit/chromium/public/WebSelectElement.h b/WebKit/chromium/public/WebSelectElement.h
index 3e7f5e2..97d3a78 100644
--- a/WebKit/chromium/public/WebSelectElement.h
+++ b/WebKit/chromium/public/WebSelectElement.h
@@ -45,14 +45,14 @@ namespace WebKit {
class WebSelectElement : public WebFormControlElement {
public:
WebSelectElement() : WebFormControlElement() { }
- WebSelectElement(const WebSelectElement& e) : WebFormControlElement(e) { }
+ WebSelectElement(const WebSelectElement& element) : WebFormControlElement(element) { }
- WebSelectElement& operator=(const WebSelectElement& e)
- {
- WebFormControlElement::assign(e);
- return *this;
+ WebSelectElement& operator=(const WebSelectElement& element)
+ {
+ WebFormControlElement::assign(element);
+ return *this;
}
- WEBKIT_API void assign(const WebSelectElement& e) { WebFormControlElement::assign(e); }
+ void assign(const WebSelectElement& element) { WebFormControlElement::assign(element); }
WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value();
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index d010270..ccad134 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -103,9 +103,18 @@ public:
int selectionEnd) = 0;
// Called to inform the WebWidget to confirm an ongoing composition.
+ // This method is same as confirmComposition(WebString());
// Returns true if there is an ongoing composition.
virtual bool confirmComposition() = 0;
+ // Called to inform the WebWidget to confirm an ongoing composition with a
+ // new composition text. If the text is empty then the current composition
+ // text is confirmed. If there is no ongoing composition, then deletes the
+ // current selection and inserts the text. This method has no effect if
+ // there is no ongoing composition and the text is empty.
+ // Returns true if there is an ongoing composition or the text is inserted.
+ virtual bool confirmComposition(const WebString& text) = 0;
+
// Returns the current text input type of this WebWidget.
virtual WebTextInputType textInputType() = 0;
diff --git a/WebKit/chromium/public/linux/WebThemeEngine.h b/WebKit/chromium/public/linux/WebThemeEngine.h
index fd72cf7..6f8cdc7 100644
--- a/WebKit/chromium/public/linux/WebThemeEngine.h
+++ b/WebKit/chromium/public/linux/WebThemeEngine.h
@@ -39,6 +39,9 @@ namespace WebKit {
struct WebRect;
+// FIXME: Remove once webkit/glue/webthemeengine_impl_linux.c has been updated to use the correct spelling.
+#define PartScrollbarHoriztonalTrack PartScrollbarHorizontalTrack
+
class WebThemeEngine {
public:
// The UI part which is being accessed.
@@ -49,7 +52,7 @@ public:
PartScrollbarUpArrow,
PartScrollbarHorizontalThumb,
PartScrollbarVerticalThumb,
- PartScrollbarHoriztonalTrack,
+ PartScrollbarHorizontalTrack,
PartScrollbarVerticalTrack
};
@@ -61,7 +64,7 @@ public:
StatePressed,
};
- // Extra parameters for drawing the PartScrollbarHoriztonalTrack and
+ // Extra parameters for drawing the PartScrollbarHorizontalTrack and
// PartScrollbarVerticalTrack.
struct ScrollbarTrackExtraParams {
// The bounds of the entire track, as opposed to the part being painted.
diff --git a/WebKit/chromium/public/mac/WebThemeEngine.h b/WebKit/chromium/public/mac/WebThemeEngine.h
new file mode 100644
index 0000000..8938816
--- /dev/null
+++ b/WebKit/chromium/public/mac/WebThemeEngine.h
@@ -0,0 +1,78 @@
+/*
+ * 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 WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebThemeEngine {
+public:
+ enum State {
+ StateDisabled,
+ StateInactive,
+ StateActive,
+ StatePressed,
+ };
+
+ enum Size {
+ SizeRegular,
+ SizeSmall,
+ };
+
+ enum ScrollbarOrientation {
+ ScrollbarOrientationHorizontal,
+ ScrollbarOrientationVertical,
+ };
+
+ enum ScrollbarParent {
+ ScrollbarParentScrollView,
+ ScrollbarParentRenderLayer,
+ };
+
+ struct ScrollbarInfo {
+ ScrollbarOrientation orientation;
+ ScrollbarParent parent;
+ int maxValue;
+ int currentValue;
+ int visibleSize;
+ int totalSize;
+ };
+
+ virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, const ScrollbarInfo&) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index ba9b4e7..936b8db 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -79,6 +79,11 @@
#include <wtf/Assertions.h>
#include <wtf/text/StringImpl.h>
+#if OS(DARWIN)
+#include "ChromiumBridge.h"
+#include "mac/WebThemeEngine.h"
+#endif
+
#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \
COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums)
@@ -393,3 +398,19 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR)
COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied);
COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
#endif
+
+#if OS(DARWIN)
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, ChromiumBridge::StateDisabled);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateInactive, ChromiumBridge::StateInactive);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateActive, ChromiumBridge::StateActive);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StatePressed, ChromiumBridge::StatePressed);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeRegular, ChromiumBridge::SizeRegular);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeSmall, ChromiumBridge::SizeSmall);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationHorizontal, ChromiumBridge::ScrollbarOrientationHorizontal);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationVertical, ChromiumBridge::ScrollbarOrientationVertical);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentScrollView, ChromiumBridge::ScrollbarParentScrollView);
+COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentRenderLayer, ChromiumBridge::ScrollbarParentRenderLayer);
+#endif
diff --git a/WebKit/chromium/src/AudioDestinationChromium.cpp b/WebKit/chromium/src/AudioDestinationChromium.cpp
new file mode 100644
index 0000000..bed2562
--- /dev/null
+++ b/WebKit/chromium/src/AudioDestinationChromium.cpp
@@ -0,0 +1,125 @@
+/*
+ * 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:
+ *
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioDestinationChromium.h"
+
+#include "AudioSourceProvider.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+using namespace WebKit;
+
+namespace WebCore {
+
+// Buffer size that the Chromium audio system will call us back with.
+// This value may need to be tuned based on the OS.
+// FIXME: It may be possible to reduce this value once real-time threads
+// and other Chromium audio improvements are made.
+const unsigned callbackBufferSize = 2048;
+
+// Buffer size at which the web audio engine will render.
+const unsigned renderBufferSize = 128;
+
+const unsigned renderCountPerCallback = callbackBufferSize / renderBufferSize;
+
+// FIXME: add support for multi-channel.
+const unsigned numberOfChannels = 2;
+
+// Factory method: Chromium-implementation
+PassOwnPtr<AudioDestination> AudioDestination::create(AudioSourceProvider& provider, double sampleRate)
+{
+ return adoptPtr(new AudioDestinationChromium(provider, sampleRate));
+}
+
+AudioDestinationChromium::AudioDestinationChromium(AudioSourceProvider& provider, double sampleRate)
+ : m_provider(provider)
+ , m_renderBus(numberOfChannels, renderBufferSize, false)
+ , m_sampleRate(sampleRate)
+ , m_isPlaying(false)
+{
+ m_audioDevice = adoptPtr(webKitClient()->createAudioDevice(callbackBufferSize, numberOfChannels, sampleRate, this));
+ ASSERT(m_audioDevice.get());
+}
+
+AudioDestinationChromium::~AudioDestinationChromium()
+{
+ stop();
+}
+
+void AudioDestinationChromium::start()
+{
+ if (!m_isPlaying && m_audioDevice.get()) {
+ m_audioDevice->start();
+ m_isPlaying = true;
+ }
+}
+
+void AudioDestinationChromium::stop()
+{
+ if (m_isPlaying && m_audioDevice.get()) {
+ m_audioDevice->stop();
+ m_isPlaying = false;
+ }
+}
+
+double AudioDestination::hardwareSampleRate()
+{
+ // FIXME: implement this properly for Chromium.
+ return 44100.0;
+}
+
+// Pulls on our provider to get the rendered audio stream.
+void AudioDestinationChromium::render(const WebVector<float*>& audioData, size_t numberOfFrames)
+{
+ bool isNumberOfChannelsGood = audioData.size() == numberOfChannels;
+ if (!isNumberOfChannelsGood) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ bool isBufferSizeGood = numberOfFrames == callbackBufferSize;
+ if (!isBufferSizeGood) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ // Split up the callback buffer into smaller chunks which we'll render one after the other.
+ for (unsigned i = 0; i < renderCountPerCallback; ++i) {
+ m_renderBus.setChannelMemory(0, audioData[0] + i * renderBufferSize, renderBufferSize);
+ m_renderBus.setChannelMemory(1, audioData[1] + i * renderBufferSize, renderBufferSize);
+ m_provider.provideInput(&m_renderBus, renderBufferSize);
+ }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebKit/chromium/src/AudioDestinationChromium.h b/WebKit/chromium/src/AudioDestinationChromium.h
new file mode 100644
index 0000000..a2a2b58
--- /dev/null
+++ b/WebKit/chromium/src/AudioDestinationChromium.h
@@ -0,0 +1,67 @@
+/*
+ * 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:
+ *
+ * 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 AudioDestinationChromium_h
+#define AudioDestinationChromium_h
+
+#include "AudioBus.h"
+#include "AudioDestination.h"
+#include "WebAudioDevice.h"
+#include "WebVector.h"
+
+namespace WebKit { class WebAudioDevice; }
+
+namespace WebCore {
+
+// An AudioDestination using Chromium's audio system
+
+class AudioDestinationChromium : public AudioDestination, public WebKit::WebAudioDevice::RenderCallback {
+public:
+ AudioDestinationChromium(AudioSourceProvider&, double sampleRate);
+ virtual ~AudioDestinationChromium();
+
+ virtual void start();
+ virtual void stop();
+ bool isPlaying() { return m_isPlaying; }
+
+ double sampleRate() const { return m_sampleRate; }
+
+ // WebKit::WebAudioDevice::RenderCallback
+ virtual void render(const WebKit::WebVector<float*>& audioData, size_t numberOfFrames);
+
+private:
+ AudioSourceProvider& m_provider;
+ AudioBus m_renderBus;
+ double m_sampleRate;
+ bool m_isPlaying;
+ OwnPtr<WebKit::WebAudioDevice> m_audioDevice;
+};
+
+} // namespace WebCore
+
+#endif // AudioDestinationChromium_h
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index e94a04f..38a3f1d 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -62,6 +62,10 @@
#include "WebViewImpl.h"
#include "WebWorkerClientImpl.h"
+#if PLATFORM(CG)
+#include <CoreGraphics/CGContext.h>
+#endif
+
#if OS(WINDOWS)
#include "WebRect.h"
#include "win/WebThemeEngine.h"
@@ -73,6 +77,10 @@
#include "WebFontRenderStyle.h"
#endif
+#if OS(DARWIN)
+#include "mac/WebThemeEngine.h"
+#endif
+
#if WEBKIT_USING_SKIA
#include "NativeImageSkia.h"
#endif
@@ -795,7 +803,7 @@ static WebThemeEngine::Part WebThemePart(ChromiumBridge::ThemePart part)
case ChromiumBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow;
case ChromiumBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb;
case ChromiumBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
- case ChromiumBridge::PartScrollbarHoriztonalTrack: return WebThemeEngine::PartScrollbarHoriztonalTrack;
+ case ChromiumBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack;
case ChromiumBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
}
ASSERT_NOT_REACHED();
@@ -816,7 +824,7 @@ static WebThemeEngine::State WebThemeState(ChromiumBridge::ThemePaintState state
static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridge::ThemePaintState state, const ChromiumBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
{
- if (part == ChromiumBridge::PartScrollbarHoriztonalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) {
+ if (part == ChromiumBridge::PartScrollbarHorizontalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) {
webThemeExtraParams->scrollbarTrack.trackX = extraParams->scrollbarTrack.trackX;
webThemeExtraParams->scrollbarTrack.trackY = extraParams->scrollbarTrack.trackY;
webThemeExtraParams->scrollbarTrack.trackWidth = extraParams->scrollbarTrack.trackWidth;
@@ -838,6 +846,28 @@ void ChromiumBridge::paintThemePart(
gc->platformContext()->canvas(), WebThemePart(part), WebThemeState(state), rect, &webThemeExtraParams);
}
+#elif OS(DARWIN)
+
+void ChromiumBridge::paintScrollbarThumb(
+ GraphicsContext* gc, ThemePaintState state, ThemePaintSize size, const IntRect& rect, const ThemePaintScrollbarInfo& scrollbarInfo)
+{
+ WebThemeEngine::ScrollbarInfo webThemeScrollbarInfo;
+
+ webThemeScrollbarInfo.orientation = static_cast<WebThemeEngine::ScrollbarOrientation>(scrollbarInfo.orientation);
+ webThemeScrollbarInfo.parent = static_cast<WebThemeEngine::ScrollbarParent>(scrollbarInfo.parent);
+ webThemeScrollbarInfo.maxValue = scrollbarInfo.maxValue;
+ webThemeScrollbarInfo.currentValue = scrollbarInfo.currentValue;
+ webThemeScrollbarInfo.visibleSize = scrollbarInfo.visibleSize;
+ webThemeScrollbarInfo.totalSize = scrollbarInfo.totalSize;
+
+ webKitClient()->themeEngine()->paintScrollbarThumb(
+ gc->platformContext(),
+ static_cast<WebThemeEngine::State>(state),
+ static_cast<WebThemeEngine::Size>(size),
+ rect,
+ webThemeScrollbarInfo);
+}
+
#endif
// Trace Event ----------------------------------------------------------------
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 9beef26..c84889e 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1349,6 +1349,14 @@ void FrameLoaderClientImpl::transitionToCommittedForNewPage()
makeDocumentView();
}
+void FrameLoaderClientImpl::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientImpl::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientImpl::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index ef00ed3..1d7a741 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -169,6 +169,8 @@ public:
virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
virtual void download(
diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 2dff52b..686d01c 100644
--- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -246,6 +246,11 @@ void GraphicsContext3DInternal::reshape(int width, int height)
#endif // PLATFORM(CG)
}
+IntSize GraphicsContext3DInternal::getInternalFramebufferSize()
+{
+ return IntSize(m_impl->width(), m_impl->height());
+}
+
bool GraphicsContext3DInternal::isContextLost()
{
return m_impl->isContextLost();
@@ -363,76 +368,76 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
}
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
-DELEGATE_TO_IMPL_1R(sizeInBytes, int, int)
+DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)
bool GraphicsContext3DInternal::isGLES2Compliant() const
{
return m_impl->isGLES2Compliant();
}
-DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
+DELEGATE_TO_IMPL_1(activeTexture, GC3Denum)
DELEGATE_TO_IMPL_2(attachShader, Platform3DObject, Platform3DObject)
-void GraphicsContext3DInternal::bindAttribLocation(Platform3DObject program, unsigned long index, const String& name)
+void GraphicsContext3DInternal::bindAttribLocation(Platform3DObject program, GC3Duint index, const String& name)
{
m_impl->bindAttribLocation(program, index, name.utf8().data());
}
-DELEGATE_TO_IMPL_2(bindBuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindFramebuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindRenderbuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindTexture, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_4(blendColor, double, double, double, double)
-DELEGATE_TO_IMPL_1(blendEquation, unsigned long)
-DELEGATE_TO_IMPL_2(blendEquationSeparate, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_2(blendFunc, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
+DELEGATE_TO_IMPL_2(bindBuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_2(bindFramebuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_2(bindRenderbuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_2(bindTexture, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_4(blendColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf)
+DELEGATE_TO_IMPL_1(blendEquation, GC3Denum)
+DELEGATE_TO_IMPL_2(blendEquationSeparate, GC3Denum, GC3Denum)
+DELEGATE_TO_IMPL_2(blendFunc, GC3Denum, GC3Denum)
+DELEGATE_TO_IMPL_4(blendFuncSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum)
-void GraphicsContext3DInternal::bufferData(unsigned long target, int size, unsigned long usage)
+void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, GC3Denum usage)
{
m_impl->bufferData(target, size, 0, usage);
}
-void GraphicsContext3DInternal::bufferData(unsigned long target, int size, const void* data, unsigned long usage)
+void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage)
{
m_impl->bufferData(target, size, data, usage);
}
-void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, int size, const void* data)
+void GraphicsContext3DInternal::bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr size, const void* data)
{
m_impl->bufferSubData(target, offset, size, data);
}
-DELEGATE_TO_IMPL_1R(checkFramebufferStatus, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1(clear, unsigned long)
-DELEGATE_TO_IMPL_4(clearColor, double, double, double, double)
-DELEGATE_TO_IMPL_1(clearDepth, double)
-DELEGATE_TO_IMPL_1(clearStencil, long)
-DELEGATE_TO_IMPL_4(colorMask, bool, bool, bool, bool)
+DELEGATE_TO_IMPL_1R(checkFramebufferStatus, GC3Denum, GC3Denum)
+DELEGATE_TO_IMPL_1(clear, GC3Dbitfield)
+DELEGATE_TO_IMPL_4(clearColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf)
+DELEGATE_TO_IMPL_1(clearDepth, GC3Dclampf)
+DELEGATE_TO_IMPL_1(clearStencil, GC3Dint)
+DELEGATE_TO_IMPL_4(colorMask, GC3Dboolean, GC3Dboolean, GC3Dboolean, GC3Dboolean)
DELEGATE_TO_IMPL_1(compileShader, Platform3DObject)
-DELEGATE_TO_IMPL_8(copyTexImage2D, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long)
-DELEGATE_TO_IMPL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1(cullFace, unsigned long)
-DELEGATE_TO_IMPL_1(depthFunc, unsigned long)
-DELEGATE_TO_IMPL_1(depthMask, bool)
-DELEGATE_TO_IMPL_2(depthRange, double, double)
+DELEGATE_TO_IMPL_8(copyTexImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Dint)
+DELEGATE_TO_IMPL_8(copyTexSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
+DELEGATE_TO_IMPL_1(cullFace, GC3Denum)
+DELEGATE_TO_IMPL_1(depthFunc, GC3Denum)
+DELEGATE_TO_IMPL_1(depthMask, GC3Dboolean)
+DELEGATE_TO_IMPL_2(depthRange, GC3Dclampf, GC3Dclampf)
DELEGATE_TO_IMPL_2(detachShader, Platform3DObject, Platform3DObject)
-DELEGATE_TO_IMPL_1(disable, unsigned long)
-DELEGATE_TO_IMPL_1(disableVertexAttribArray, unsigned long)
-DELEGATE_TO_IMPL_3(drawArrays, unsigned long, long, long)
-DELEGATE_TO_IMPL_4(drawElements, unsigned long, unsigned long, unsigned long, long)
+DELEGATE_TO_IMPL_1(disable, GC3Denum)
+DELEGATE_TO_IMPL_1(disableVertexAttribArray, GC3Duint)
+DELEGATE_TO_IMPL_3(drawArrays, GC3Denum, GC3Dint, GC3Dsizei)
+DELEGATE_TO_IMPL_4(drawElements, GC3Denum, GC3Dsizei, GC3Denum, GC3Dsizeiptr)
-DELEGATE_TO_IMPL_1(enable, unsigned long)
-DELEGATE_TO_IMPL_1(enableVertexAttribArray, unsigned long)
+DELEGATE_TO_IMPL_1(enable, GC3Denum)
+DELEGATE_TO_IMPL_1(enableVertexAttribArray, GC3Duint)
DELEGATE_TO_IMPL(finish)
DELEGATE_TO_IMPL(flush)
-DELEGATE_TO_IMPL_4(framebufferRenderbuffer, unsigned long, unsigned long, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_5(framebufferTexture2D, unsigned long, unsigned long, unsigned long, Platform3DObject, long)
-DELEGATE_TO_IMPL_1(frontFace, unsigned long)
-DELEGATE_TO_IMPL_1(generateMipmap, unsigned long)
+DELEGATE_TO_IMPL_4(framebufferRenderbuffer, GC3Denum, GC3Denum, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_5(framebufferTexture2D, GC3Denum, GC3Denum, GC3Denum, Platform3DObject, GC3Dint)
+DELEGATE_TO_IMPL_1(frontFace, GC3Denum)
+DELEGATE_TO_IMPL_1(generateMipmap, GC3Denum)
-bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, unsigned long index, ActiveInfo& info)
+bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, GC3Duint index, ActiveInfo& info)
{
WebKit::WebGraphicsContext3D::ActiveInfo webInfo;
if (!m_impl->getActiveAttrib(program, index, webInfo))
@@ -443,7 +448,7 @@ bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, unsign
return true;
}
-bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, unsigned long index, ActiveInfo& info)
+bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, GC3Duint index, ActiveInfo& info)
{
WebKit::WebGraphicsContext3D::ActiveInfo webInfo;
if (!m_impl->getActiveUniform(program, index, webInfo))
@@ -454,16 +459,16 @@ bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, unsig
return true;
}
-DELEGATE_TO_IMPL_4(getAttachedShaders, Platform3DObject, int, int*, unsigned int*)
+DELEGATE_TO_IMPL_4(getAttachedShaders, Platform3DObject, GC3Dsizei, GC3Dsizei*, Platform3DObject*)
-int GraphicsContext3DInternal::getAttribLocation(Platform3DObject program, const String& name)
+GC3Dint GraphicsContext3DInternal::getAttribLocation(Platform3DObject program, const String& name)
{
return m_impl->getAttribLocation(program, name.utf8().data());
}
-DELEGATE_TO_IMPL_2(getBooleanv, unsigned long, unsigned char*)
+DELEGATE_TO_IMPL_2(getBooleanv, GC3Denum, GC3Dboolean*)
-DELEGATE_TO_IMPL_3(getBufferParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getBufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes()
{
@@ -477,24 +482,24 @@ GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes()
return attributes;
}
-DELEGATE_TO_IMPL_R(getError, unsigned long)
+DELEGATE_TO_IMPL_R(getError, GC3Denum)
-DELEGATE_TO_IMPL_2(getFloatv, unsigned long, float*)
+DELEGATE_TO_IMPL_2(getFloatv, GC3Denum, GC3Dfloat*)
-DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, GC3Denum, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_2(getIntegerv, unsigned long, int*)
+DELEGATE_TO_IMPL_2(getIntegerv, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getProgramiv, Platform3DObject, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getProgramiv, Platform3DObject, GC3Denum, GC3Dint*)
String GraphicsContext3DInternal::getProgramInfoLog(Platform3DObject program)
{
return m_impl->getProgramInfoLog(program);
}
-DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getShaderiv, Platform3DObject, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*)
String GraphicsContext3DInternal::getShaderInfoLog(Platform3DObject shader)
{
@@ -506,139 +511,138 @@ String GraphicsContext3DInternal::getShaderSource(Platform3DObject shader)
return m_impl->getShaderSource(shader);
}
-String GraphicsContext3DInternal::getString(unsigned long name)
+String GraphicsContext3DInternal::getString(GC3Denum name)
{
return m_impl->getString(name);
}
-DELEGATE_TO_IMPL_3(getTexParameterfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_IMPL_3(getTexParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getTexParameteriv, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getUniformfv, Platform3DObject, long, float*)
-DELEGATE_TO_IMPL_3(getUniformiv, Platform3DObject, long, int*)
+DELEGATE_TO_IMPL_3(getUniformfv, Platform3DObject, GC3Dint, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getUniformiv, Platform3DObject, GC3Dint, GC3Dint*)
-long GraphicsContext3DInternal::getUniformLocation(Platform3DObject program, const String& name)
+GC3Dint GraphicsContext3DInternal::getUniformLocation(Platform3DObject program, const String& name)
{
return m_impl->getUniformLocation(program, name.utf8().data());
}
-DELEGATE_TO_IMPL_3(getVertexAttribfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_IMPL_3(getVertexAttribiv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getVertexAttribfv, GC3Duint, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getVertexAttribiv, GC3Duint, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_2R(getVertexAttribOffset, unsigned long, unsigned long, long)
+DELEGATE_TO_IMPL_2R(getVertexAttribOffset, GC3Duint, GC3Denum, GC3Dsizeiptr)
-DELEGATE_TO_IMPL_2(hint, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1R(isBuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isEnabled, unsigned long, bool)
-DELEGATE_TO_IMPL_1R(isFramebuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isProgram, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isRenderbuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isShader, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isTexture, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1(lineWidth, double)
+DELEGATE_TO_IMPL_2(hint, GC3Denum, GC3Denum)
+DELEGATE_TO_IMPL_1R(isBuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isEnabled, GC3Denum, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isFramebuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isProgram, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isRenderbuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isShader, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1R(isTexture, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_IMPL_1(lineWidth, GC3Dfloat)
DELEGATE_TO_IMPL_1(linkProgram, Platform3DObject)
-DELEGATE_TO_IMPL_2(pixelStorei, unsigned long, long)
-DELEGATE_TO_IMPL_2(polygonOffset, double, double)
-DELEGATE_TO_IMPL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*)
+DELEGATE_TO_IMPL_2(pixelStorei, GC3Denum, GC3Dint)
+DELEGATE_TO_IMPL_2(polygonOffset, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_IMPL_7(readPixels, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, void*)
DELEGATE_TO_IMPL(releaseShaderCompiler)
-DELEGATE_TO_IMPL_4(renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_2(sampleCoverage, double, bool)
-DELEGATE_TO_IMPL_4(scissor, long, long, unsigned long, unsigned long)
+DELEGATE_TO_IMPL_4(renderbufferStorage, GC3Denum, GC3Denum, GC3Dsizei, GC3Dsizei)
+DELEGATE_TO_IMPL_2(sampleCoverage, GC3Dclampf, GC3Dboolean)
+DELEGATE_TO_IMPL_4(scissor, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
void GraphicsContext3DInternal::shaderSource(Platform3DObject shader, const String& string)
{
m_impl->shaderSource(shader, string.utf8().data());
}
-DELEGATE_TO_IMPL_3(stencilFunc, unsigned long, long, unsigned long)
-DELEGATE_TO_IMPL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long)
-DELEGATE_TO_IMPL_1(stencilMask, unsigned long)
-DELEGATE_TO_IMPL_2(stencilMaskSeparate, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_3(stencilOp, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
+DELEGATE_TO_IMPL_3(stencilFunc, GC3Denum, GC3Dint, GC3Duint)
+DELEGATE_TO_IMPL_4(stencilFuncSeparate, GC3Denum, GC3Denum, GC3Dint, GC3Duint)
+DELEGATE_TO_IMPL_1(stencilMask, GC3Duint)
+DELEGATE_TO_IMPL_2(stencilMaskSeparate, GC3Denum, GC3Duint)
+DELEGATE_TO_IMPL_3(stencilOp, GC3Denum, GC3Denum, GC3Denum)
+DELEGATE_TO_IMPL_4(stencilOpSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum)
-int GraphicsContext3DInternal::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels)
+bool GraphicsContext3DInternal::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels)
{
m_impl->texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
- return 0;
+ return true;
}
-DELEGATE_TO_IMPL_3(texParameterf, unsigned, unsigned, float)
-DELEGATE_TO_IMPL_3(texParameteri, unsigned, unsigned, int)
+DELEGATE_TO_IMPL_3(texParameterf, GC3Denum, GC3Denum, GC3Dfloat)
+DELEGATE_TO_IMPL_3(texParameteri, GC3Denum, GC3Denum, GC3Dint)
-int GraphicsContext3DInternal::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels)
+void GraphicsContext3DInternal::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels)
{
m_impl->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
- return 0;
}
-DELEGATE_TO_IMPL_2(uniform1f, long, float)
+DELEGATE_TO_IMPL_2(uniform1f, GC3Dint, GC3Dfloat)
-void GraphicsContext3DInternal::uniform1fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform1fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform1fv(location, size, v);
}
-DELEGATE_TO_IMPL_2(uniform1i, long, int)
+DELEGATE_TO_IMPL_2(uniform1i, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform1iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform1iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform1iv(location, size, v);
}
-DELEGATE_TO_IMPL_3(uniform2f, long, float, float)
+DELEGATE_TO_IMPL_3(uniform2f, GC3Dint, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform2fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform2fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform2fv(location, size, v);
}
-DELEGATE_TO_IMPL_3(uniform2i, long, int, int)
+DELEGATE_TO_IMPL_3(uniform2i, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform2iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform2iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform2iv(location, size, v);
}
-DELEGATE_TO_IMPL_4(uniform3f, long, float, float, float)
+DELEGATE_TO_IMPL_4(uniform3f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform3fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform3fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform3fv(location, size, v);
}
-DELEGATE_TO_IMPL_4(uniform3i, long, int, int, int)
+DELEGATE_TO_IMPL_4(uniform3i, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform3iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform3iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform3iv(location, size, v);
}
-DELEGATE_TO_IMPL_5(uniform4f, long, float, float, float, float)
+DELEGATE_TO_IMPL_5(uniform4f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform4fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform4fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform4fv(location, size, v);
}
-DELEGATE_TO_IMPL_5(uniform4i, long, int, int, int, int)
+DELEGATE_TO_IMPL_5(uniform4i, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform4iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform4iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform4iv(location, size, v);
}
-void GraphicsContext3DInternal::uniformMatrix2fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix2fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix2fv(location, size, transpose, value);
}
-void GraphicsContext3DInternal::uniformMatrix3fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix3fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix3fv(location, size, transpose, value);
}
-void GraphicsContext3DInternal::uniformMatrix4fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix4fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix4fv(location, size, transpose, value);
}
@@ -646,33 +650,33 @@ void GraphicsContext3DInternal::uniformMatrix4fv(long location, bool transpose,
DELEGATE_TO_IMPL_1(useProgram, Platform3DObject)
DELEGATE_TO_IMPL_1(validateProgram, Platform3DObject)
-DELEGATE_TO_IMPL_2(vertexAttrib1f, unsigned long, float)
-DELEGATE_TO_IMPL_2(vertexAttrib1fv, unsigned long, float*)
-DELEGATE_TO_IMPL_3(vertexAttrib2f, unsigned long, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib2fv, unsigned long, float*)
-DELEGATE_TO_IMPL_4(vertexAttrib3f, unsigned long, float, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib3fv, unsigned long, float*)
-DELEGATE_TO_IMPL_5(vertexAttrib4f, unsigned long, float, float, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib4fv, unsigned long, float*)
-DELEGATE_TO_IMPL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long)
-
-DELEGATE_TO_IMPL_4(viewport, long, long, unsigned long, unsigned long)
-
-DELEGATE_TO_IMPL_R(createBuffer, unsigned)
-DELEGATE_TO_IMPL_R(createFramebuffer, unsigned)
-DELEGATE_TO_IMPL_R(createProgram, unsigned)
-DELEGATE_TO_IMPL_R(createRenderbuffer, unsigned)
-DELEGATE_TO_IMPL_1R(createShader, unsigned long, unsigned)
-DELEGATE_TO_IMPL_R(createTexture, unsigned)
-
-DELEGATE_TO_IMPL_1(deleteBuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteFramebuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteProgram, unsigned)
-DELEGATE_TO_IMPL_1(deleteRenderbuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteShader, unsigned)
-DELEGATE_TO_IMPL_1(deleteTexture, unsigned)
-
-DELEGATE_TO_IMPL_1(synthesizeGLError, unsigned long)
+DELEGATE_TO_IMPL_2(vertexAttrib1f, GC3Duint, GC3Dfloat)
+DELEGATE_TO_IMPL_2(vertexAttrib1fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(vertexAttrib2f, GC3Duint, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_IMPL_2(vertexAttrib2fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_IMPL_4(vertexAttrib3f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_IMPL_2(vertexAttrib3fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_IMPL_5(vertexAttrib4f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_IMPL_2(vertexAttrib4fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_IMPL_6(vertexAttribPointer, GC3Duint, GC3Dint, GC3Denum, GC3Dboolean, GC3Dsizei, GC3Dsizeiptr)
+
+DELEGATE_TO_IMPL_4(viewport, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
+
+DELEGATE_TO_IMPL_R(createBuffer, Platform3DObject)
+DELEGATE_TO_IMPL_R(createFramebuffer, Platform3DObject)
+DELEGATE_TO_IMPL_R(createProgram, Platform3DObject)
+DELEGATE_TO_IMPL_R(createRenderbuffer, Platform3DObject)
+DELEGATE_TO_IMPL_1R(createShader, GC3Denum, Platform3DObject)
+DELEGATE_TO_IMPL_R(createTexture, Platform3DObject)
+
+DELEGATE_TO_IMPL_1(deleteBuffer, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteFramebuffer, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteProgram, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteRenderbuffer, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteShader, Platform3DObject)
+DELEGATE_TO_IMPL_1(deleteTexture, Platform3DObject)
+
+DELEGATE_TO_IMPL_1(synthesizeGLError, GC3Denum)
Extensions3D* GraphicsContext3DInternal::getExtensions()
{
@@ -731,11 +735,11 @@ bool GraphicsContext3DInternal::ensureExtensionEnabled(const String& name)
return m_enabledExtensions.contains(name);
}
-DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, unsigned, int, int, unsigned, void*)
+DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*)
DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*)
-DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, unsigned, int, int, int, int, int, unsigned, unsigned, unsigned, void*)
+DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, GC3Denum, void*)
DELEGATE_TO_IMPL_1(unmapTexSubImage2DCHROMIUM, const void*)
-DELEGATE_TO_IMPL_2(copyTextureToParentTextureCHROMIUM, unsigned, unsigned)
+DELEGATE_TO_IMPL_2(copyTextureToParentTextureCHROMIUM, Platform3DObject, Platform3DObject)
//----------------------------------------------------------------------
// GraphicsContext3D
@@ -840,6 +844,12 @@ void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8
m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8); \
}
+#define DELEGATE_TO_INTERNAL_9(name, t1, t2, t3, t4, t5, t6, t7, t8, t9) \
+void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \
+{ \
+ m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \
+}
+
#define DELEGATE_TO_INTERNAL_9R(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, rt) \
rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \
{ \
@@ -890,169 +900,150 @@ PlatformLayer* GraphicsContext3D::platformLayer() const
#endif
DELEGATE_TO_INTERNAL(makeContextCurrent)
-DELEGATE_TO_INTERNAL_1R(sizeInBytes, int, int)
+DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int)
DELEGATE_TO_INTERNAL_2(reshape, int, int)
+DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize)
-DELEGATE_TO_INTERNAL_1(activeTexture, unsigned long)
+DELEGATE_TO_INTERNAL_1(activeTexture, GC3Denum)
DELEGATE_TO_INTERNAL_2(attachShader, Platform3DObject, Platform3DObject)
-DELEGATE_TO_INTERNAL_3(bindAttribLocation, Platform3DObject, unsigned long, const String&)
-
-DELEGATE_TO_INTERNAL_2(bindBuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindFramebuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindRenderbuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindTexture, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_4(blendColor, double, double, double, double)
-DELEGATE_TO_INTERNAL_1(blendEquation, unsigned long)
-DELEGATE_TO_INTERNAL_2(blendEquationSeparate, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_2(blendFunc, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
-
-DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, int, unsigned long)
-DELEGATE_TO_INTERNAL_4(bufferData, unsigned long, int, const void*, unsigned long)
-DELEGATE_TO_INTERNAL_4(bufferSubData, unsigned long, long, int, const void*)
-
-DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1(clear, unsigned long)
-DELEGATE_TO_INTERNAL_4(clearColor, double, double, double, double)
-DELEGATE_TO_INTERNAL_1(clearDepth, double)
-DELEGATE_TO_INTERNAL_1(clearStencil, long)
-DELEGATE_TO_INTERNAL_4(colorMask, bool, bool, bool, bool)
+DELEGATE_TO_INTERNAL_3(bindAttribLocation, Platform3DObject, GC3Duint, const String&)
+
+DELEGATE_TO_INTERNAL_2(bindBuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_2(bindFramebuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_2(bindRenderbuffer, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_2(bindTexture, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_4(blendColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf)
+DELEGATE_TO_INTERNAL_1(blendEquation, GC3Denum)
+DELEGATE_TO_INTERNAL_2(blendEquationSeparate, GC3Denum, GC3Denum)
+DELEGATE_TO_INTERNAL_2(blendFunc, GC3Denum, GC3Denum)
+DELEGATE_TO_INTERNAL_4(blendFuncSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum)
+
+DELEGATE_TO_INTERNAL_3(bufferData, GC3Denum, GC3Dsizeiptr, GC3Denum)
+DELEGATE_TO_INTERNAL_4(bufferData, GC3Denum, GC3Dsizeiptr, const void*, GC3Denum)
+DELEGATE_TO_INTERNAL_4(bufferSubData, GC3Denum, GC3Dintptr, GC3Dsizeiptr, const void*)
+
+DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, GC3Denum, GC3Denum)
+DELEGATE_TO_INTERNAL_1(clear, GC3Dbitfield)
+DELEGATE_TO_INTERNAL_4(clearColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf)
+DELEGATE_TO_INTERNAL_1(clearDepth, GC3Dclampf)
+DELEGATE_TO_INTERNAL_1(clearStencil, GC3Dint)
+DELEGATE_TO_INTERNAL_4(colorMask, GC3Dboolean, GC3Dboolean, GC3Dboolean, GC3Dboolean)
DELEGATE_TO_INTERNAL_1(compileShader, Platform3DObject)
-DELEGATE_TO_INTERNAL_8(copyTexImage2D, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long)
-DELEGATE_TO_INTERNAL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1(cullFace, unsigned long)
-DELEGATE_TO_INTERNAL_1(depthFunc, unsigned long)
-DELEGATE_TO_INTERNAL_1(depthMask, bool)
-DELEGATE_TO_INTERNAL_2(depthRange, double, double)
+DELEGATE_TO_INTERNAL_8(copyTexImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Dint)
+DELEGATE_TO_INTERNAL_8(copyTexSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
+DELEGATE_TO_INTERNAL_1(cullFace, GC3Denum)
+DELEGATE_TO_INTERNAL_1(depthFunc, GC3Denum)
+DELEGATE_TO_INTERNAL_1(depthMask, GC3Dboolean)
+DELEGATE_TO_INTERNAL_2(depthRange, GC3Dclampf, GC3Dclampf)
DELEGATE_TO_INTERNAL_2(detachShader, Platform3DObject, Platform3DObject)
-DELEGATE_TO_INTERNAL_1(disable, unsigned long)
-DELEGATE_TO_INTERNAL_1(disableVertexAttribArray, unsigned long)
-DELEGATE_TO_INTERNAL_3(drawArrays, unsigned long, long, long)
-DELEGATE_TO_INTERNAL_4(drawElements, unsigned long, unsigned long, unsigned long, long)
+DELEGATE_TO_INTERNAL_1(disable, GC3Denum)
+DELEGATE_TO_INTERNAL_1(disableVertexAttribArray, GC3Duint)
+DELEGATE_TO_INTERNAL_3(drawArrays, GC3Denum, GC3Dint, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(drawElements, GC3Denum, GC3Dsizei, GC3Denum, GC3Dintptr)
-DELEGATE_TO_INTERNAL_1(enable, unsigned long)
-DELEGATE_TO_INTERNAL_1(enableVertexAttribArray, unsigned long)
+DELEGATE_TO_INTERNAL_1(enable, GC3Denum)
+DELEGATE_TO_INTERNAL_1(enableVertexAttribArray, GC3Duint)
DELEGATE_TO_INTERNAL(finish)
DELEGATE_TO_INTERNAL(flush)
-DELEGATE_TO_INTERNAL_4(framebufferRenderbuffer, unsigned long, unsigned long, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_5(framebufferTexture2D, unsigned long, unsigned long, unsigned long, Platform3DObject, long)
-DELEGATE_TO_INTERNAL_1(frontFace, unsigned long)
-DELEGATE_TO_INTERNAL_1(generateMipmap, unsigned long)
-
-DELEGATE_TO_INTERNAL_3R(getActiveAttrib, Platform3DObject, unsigned long, ActiveInfo&, bool)
-DELEGATE_TO_INTERNAL_3R(getActiveUniform, Platform3DObject, unsigned long, ActiveInfo&, bool)
-
-DELEGATE_TO_INTERNAL_4(getAttachedShaders, Platform3DObject, int, int*, unsigned int*)
-
-DELEGATE_TO_INTERNAL_2R(getAttribLocation, Platform3DObject, const String&, int)
-
-DELEGATE_TO_INTERNAL_2(getBooleanv, unsigned long, unsigned char*)
-
-DELEGATE_TO_INTERNAL_3(getBufferParameteriv, unsigned long, unsigned long, int*)
-
+DELEGATE_TO_INTERNAL_4(framebufferRenderbuffer, GC3Denum, GC3Denum, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_5(framebufferTexture2D, GC3Denum, GC3Denum, GC3Denum, Platform3DObject, GC3Dint)
+DELEGATE_TO_INTERNAL_1(frontFace, GC3Denum)
+DELEGATE_TO_INTERNAL_1(generateMipmap, GC3Denum)
+
+DELEGATE_TO_INTERNAL_3R(getActiveAttrib, Platform3DObject, GC3Duint, ActiveInfo&, bool)
+DELEGATE_TO_INTERNAL_3R(getActiveUniform, Platform3DObject, GC3Duint, ActiveInfo&, bool)
+DELEGATE_TO_INTERNAL_4(getAttachedShaders, Platform3DObject, GC3Dsizei, GC3Dsizei*, Platform3DObject*)
+DELEGATE_TO_INTERNAL_2R(getAttribLocation, Platform3DObject, const String&, GC3Dint)
+DELEGATE_TO_INTERNAL_2(getBooleanv, GC3Denum, GC3Dboolean*)
+DELEGATE_TO_INTERNAL_3(getBufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
DELEGATE_TO_INTERNAL_R(getContextAttributes, GraphicsContext3D::Attributes)
-
-DELEGATE_TO_INTERNAL_R(getError, unsigned long)
-
-DELEGATE_TO_INTERNAL_2(getFloatv, unsigned long, float*)
-
-DELEGATE_TO_INTERNAL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_2(getIntegerv, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getProgramiv, Platform3DObject, unsigned long, int*)
-
+DELEGATE_TO_INTERNAL_R(getError, GC3Denum)
+DELEGATE_TO_INTERNAL_2(getFloatv, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_4(getFramebufferAttachmentParameteriv, GC3Denum, GC3Denum, GC3Denum, GC3Dint*)
+DELEGATE_TO_INTERNAL_2(getIntegerv, GC3Denum, GC3Dint*)
+DELEGATE_TO_INTERNAL_3(getProgramiv, Platform3DObject, GC3Denum, GC3Dint*)
DELEGATE_TO_INTERNAL_1R(getProgramInfoLog, Platform3DObject, String)
-
-DELEGATE_TO_INTERNAL_3(getRenderbufferParameteriv, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getShaderiv, Platform3DObject, unsigned long, int*)
-
+DELEGATE_TO_INTERNAL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
+DELEGATE_TO_INTERNAL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*)
DELEGATE_TO_INTERNAL_1R(getShaderInfoLog, Platform3DObject, String)
-
DELEGATE_TO_INTERNAL_1R(getShaderSource, Platform3DObject, String)
-DELEGATE_TO_INTERNAL_1R(getString, unsigned long, String)
-
-DELEGATE_TO_INTERNAL_3(getTexParameterfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(getTexParameteriv, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getUniformfv, Platform3DObject, long, float*)
-DELEGATE_TO_INTERNAL_3(getUniformiv, Platform3DObject, long, int*)
-
-DELEGATE_TO_INTERNAL_2R(getUniformLocation, Platform3DObject, const String&, long)
-
-DELEGATE_TO_INTERNAL_3(getVertexAttribfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(getVertexAttribiv, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_2R(getVertexAttribOffset, unsigned long, unsigned long, long)
-
-DELEGATE_TO_INTERNAL_2(hint, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1R(isBuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isEnabled, unsigned long, bool)
-DELEGATE_TO_INTERNAL_1R(isFramebuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isProgram, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isRenderbuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isShader, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isTexture, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1(lineWidth, double)
+DELEGATE_TO_INTERNAL_1R(getString, GC3Denum, String)
+DELEGATE_TO_INTERNAL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_3(getTexParameteriv, GC3Denum, GC3Denum, GC3Dint*)
+DELEGATE_TO_INTERNAL_3(getUniformfv, Platform3DObject, GC3Dint, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_3(getUniformiv, Platform3DObject, GC3Dint, GC3Dint*)
+DELEGATE_TO_INTERNAL_2R(getUniformLocation, Platform3DObject, const String&, GC3Dint)
+DELEGATE_TO_INTERNAL_3(getVertexAttribfv, GC3Duint, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_3(getVertexAttribiv, GC3Duint, GC3Denum, GC3Dint*)
+DELEGATE_TO_INTERNAL_2R(getVertexAttribOffset, GC3Duint, GC3Denum, GC3Dsizeiptr)
+
+DELEGATE_TO_INTERNAL_2(hint, GC3Denum, GC3Denum)
+DELEGATE_TO_INTERNAL_1R(isBuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isEnabled, GC3Denum, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isFramebuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isProgram, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isRenderbuffer, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isShader, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1R(isTexture, Platform3DObject, GC3Dboolean)
+DELEGATE_TO_INTERNAL_1(lineWidth, GC3Dfloat)
DELEGATE_TO_INTERNAL_1(linkProgram, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(pixelStorei, unsigned long, long)
-DELEGATE_TO_INTERNAL_2(polygonOffset, double, double)
+DELEGATE_TO_INTERNAL_2(pixelStorei, GC3Denum, GC3Dint)
+DELEGATE_TO_INTERNAL_2(polygonOffset, GC3Dfloat, GC3Dfloat)
-DELEGATE_TO_INTERNAL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*)
+DELEGATE_TO_INTERNAL_7(readPixels, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, void*)
DELEGATE_TO_INTERNAL(releaseShaderCompiler)
-DELEGATE_TO_INTERNAL_4(renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_2(sampleCoverage, double, bool)
-DELEGATE_TO_INTERNAL_4(scissor, long, long, unsigned long, unsigned long)
+DELEGATE_TO_INTERNAL_4(renderbufferStorage, GC3Denum, GC3Denum, GC3Dsizei, GC3Dsizei)
+DELEGATE_TO_INTERNAL_2(sampleCoverage, GC3Dclampf, GC3Dboolean)
+DELEGATE_TO_INTERNAL_4(scissor, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
DELEGATE_TO_INTERNAL_2(shaderSource, Platform3DObject, const String&)
-DELEGATE_TO_INTERNAL_3(stencilFunc, unsigned long, long, unsigned long)
-DELEGATE_TO_INTERNAL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long)
-DELEGATE_TO_INTERNAL_1(stencilMask, unsigned long)
-DELEGATE_TO_INTERNAL_2(stencilMaskSeparate, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
-
-DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float)
-DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int)
-DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-
-DELEGATE_TO_INTERNAL_2(uniform1f, long, float)
-DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int)
-DELEGATE_TO_INTERNAL_2(uniform1i, long, int)
-DELEGATE_TO_INTERNAL_3(uniform1iv, long, int*, int)
-DELEGATE_TO_INTERNAL_3(uniform2f, long, float, float)
-DELEGATE_TO_INTERNAL_3(uniform2fv, long, float*, int)
-DELEGATE_TO_INTERNAL_3(uniform2i, long, int, int)
-DELEGATE_TO_INTERNAL_3(uniform2iv, long, int*, int)
-DELEGATE_TO_INTERNAL_4(uniform3f, long, float, float, float)
-DELEGATE_TO_INTERNAL_3(uniform3fv, long, float*, int)
-DELEGATE_TO_INTERNAL_4(uniform3i, long, int, int, int)
-DELEGATE_TO_INTERNAL_3(uniform3iv, long, int*, int)
-DELEGATE_TO_INTERNAL_5(uniform4f, long, float, float, float, float)
-DELEGATE_TO_INTERNAL_3(uniform4fv, long, float*, int)
-DELEGATE_TO_INTERNAL_5(uniform4i, long, int, int, int, int)
-DELEGATE_TO_INTERNAL_3(uniform4iv, long, int*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix2fv, long, bool, float*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix3fv, long, bool, float*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix4fv, long, bool, float*, int)
+DELEGATE_TO_INTERNAL_3(stencilFunc, GC3Denum, GC3Dint, GC3Duint)
+DELEGATE_TO_INTERNAL_4(stencilFuncSeparate, GC3Denum, GC3Denum, GC3Dint, GC3Duint)
+DELEGATE_TO_INTERNAL_1(stencilMask, GC3Duint)
+DELEGATE_TO_INTERNAL_2(stencilMaskSeparate, GC3Denum, GC3Duint)
+DELEGATE_TO_INTERNAL_3(stencilOp, GC3Denum, GC3Denum, GC3Denum)
+DELEGATE_TO_INTERNAL_4(stencilOpSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum)
+
+DELEGATE_TO_INTERNAL_9R(texImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dsizei, GC3Dsizei, GC3Dint, GC3Denum, GC3Denum, const void*, bool)
+DELEGATE_TO_INTERNAL_3(texParameterf, GC3Denum, GC3Denum, GC3Dfloat)
+DELEGATE_TO_INTERNAL_3(texParameteri, GC3Denum, GC3Denum, GC3Dint)
+DELEGATE_TO_INTERNAL_9(texSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, const void*)
+
+DELEGATE_TO_INTERNAL_2(uniform1f, GC3Dint, GC3Dfloat)
+DELEGATE_TO_INTERNAL_3(uniform1fv, GC3Dint, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_2(uniform1i, GC3Dint, GC3Dint)
+DELEGATE_TO_INTERNAL_3(uniform1iv, GC3Dint, GC3Dint*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_3(uniform2f, GC3Dint, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_3(uniform2fv, GC3Dint, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_3(uniform2i, GC3Dint, GC3Dint, GC3Dint)
+DELEGATE_TO_INTERNAL_3(uniform2iv, GC3Dint, GC3Dint*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(uniform3f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_3(uniform3fv, GC3Dint, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(uniform3i, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
+DELEGATE_TO_INTERNAL_3(uniform3iv, GC3Dint, GC3Dint*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_5(uniform4f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_3(uniform4fv, GC3Dint, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_5(uniform4i, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
+DELEGATE_TO_INTERNAL_3(uniform4iv, GC3Dint, GC3Dint*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(uniformMatrix2fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(uniformMatrix3fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei)
+DELEGATE_TO_INTERNAL_4(uniformMatrix4fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei)
DELEGATE_TO_INTERNAL_1(useProgram, Platform3DObject)
DELEGATE_TO_INTERNAL_1(validateProgram, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(vertexAttrib1f, unsigned long, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib1fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(vertexAttrib2f, unsigned long, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib2fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_4(vertexAttrib3f, unsigned long, float, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib3fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_5(vertexAttrib4f, unsigned long, float, float, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib4fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long)
+DELEGATE_TO_INTERNAL_2(vertexAttrib1f, GC3Duint, GC3Dfloat)
+DELEGATE_TO_INTERNAL_2(vertexAttrib1fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_3(vertexAttrib2f, GC3Duint, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_2(vertexAttrib2fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_4(vertexAttrib3f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_2(vertexAttrib3fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_5(vertexAttrib4f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat)
+DELEGATE_TO_INTERNAL_2(vertexAttrib4fv, GC3Duint, GC3Dfloat*)
+DELEGATE_TO_INTERNAL_6(vertexAttribPointer, GC3Duint, GC3Dint, GC3Denum, GC3Dboolean, GC3Dsizei, GC3Dintptr)
-DELEGATE_TO_INTERNAL_4(viewport, long, long, unsigned long, unsigned long)
+DELEGATE_TO_INTERNAL_4(viewport, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
DELEGATE_TO_INTERNAL_1(paintRenderingResultsToCanvas, CanvasRenderingContext*)
@@ -1061,21 +1052,21 @@ bool GraphicsContext3D::paintsIntoCanvasBuffer() const
return m_internal->paintsIntoCanvasBuffer();
}
-DELEGATE_TO_INTERNAL_R(createBuffer, unsigned)
-DELEGATE_TO_INTERNAL_R(createFramebuffer, unsigned)
-DELEGATE_TO_INTERNAL_R(createProgram, unsigned)
-DELEGATE_TO_INTERNAL_R(createRenderbuffer, unsigned)
-DELEGATE_TO_INTERNAL_1R(createShader, unsigned long, unsigned)
-DELEGATE_TO_INTERNAL_R(createTexture, unsigned)
+DELEGATE_TO_INTERNAL_R(createBuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_R(createFramebuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_R(createProgram, Platform3DObject)
+DELEGATE_TO_INTERNAL_R(createRenderbuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_1R(createShader, GC3Denum, Platform3DObject)
+DELEGATE_TO_INTERNAL_R(createTexture, Platform3DObject)
-DELEGATE_TO_INTERNAL_1(deleteBuffer, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteFramebuffer, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteProgram, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteRenderbuffer, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteShader, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned)
+DELEGATE_TO_INTERNAL_1(deleteBuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_1(deleteFramebuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_1(deleteProgram, Platform3DObject)
+DELEGATE_TO_INTERNAL_1(deleteRenderbuffer, Platform3DObject)
+DELEGATE_TO_INTERNAL_1(deleteShader, Platform3DObject)
+DELEGATE_TO_INTERNAL_1(deleteTexture, Platform3DObject)
-DELEGATE_TO_INTERNAL_1(synthesizeGLError, unsigned long)
+DELEGATE_TO_INTERNAL_1(synthesizeGLError, GC3Denum)
DELEGATE_TO_INTERNAL_R(getExtensions, Extensions3D*)
bool GraphicsContext3D::isGLES2Compliant() const
diff --git a/WebKit/chromium/src/GraphicsContext3DInternal.h b/WebKit/chromium/src/GraphicsContext3DInternal.h
index ad54a4f..30a8e57 100644
--- a/WebKit/chromium/src/GraphicsContext3DInternal.h
+++ b/WebKit/chromium/src/GraphicsContext3DInternal.h
@@ -62,9 +62,10 @@ public:
bool makeContextCurrent();
- int sizeInBytes(int type);
+ unsigned int sizeInBytes(GC3Denum type);
void reshape(int width, int height);
+ IntSize getInternalFramebufferSize();
void paintRenderingResultsToCanvas(CanvasRenderingContext*);
bool paintsIntoCanvasBuffer() const;
@@ -76,191 +77,169 @@ public:
#endif
bool isGLES2Compliant() const;
+ void releaseShaderCompiler();
+ bool isContextLost();
+
//----------------------------------------------------------------------
// Entry points for WebGL.
//
- void activeTexture(unsigned long texture);
+ void activeTexture(GC3Denum texture);
void attachShader(Platform3DObject program, Platform3DObject shader);
- void bindAttribLocation(Platform3DObject, unsigned long index, const String& name);
- void bindBuffer(unsigned long target, Platform3DObject);
- void bindFramebuffer(unsigned long target, Platform3DObject);
- void bindRenderbuffer(unsigned long target, Platform3DObject);
- void bindTexture(unsigned long target, Platform3DObject texture);
- void blendColor(double red, double green, double blue, double alpha);
- void blendEquation(unsigned long mode);
- void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha);
- void blendFunc(unsigned long sfactor, unsigned long dfactor);
- void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
-
- void bufferData(unsigned long target, int size, unsigned long usage);
- void bufferData(unsigned long target, int size, const void* data, unsigned long usage);
- void bufferSubData(unsigned long target, long offset, int size, const void* data);
-
- unsigned long checkFramebufferStatus(unsigned long target);
- void clear(unsigned long mask);
- void clearColor(double red, double green, double blue, double alpha);
- void clearDepth(double depth);
- void clearStencil(long s);
- void colorMask(bool red, bool green, bool blue, bool alpha);
+ void bindAttribLocation(Platform3DObject, GC3Duint index, const String& name);
+ void bindBuffer(GC3Denum target, Platform3DObject);
+ void bindFramebuffer(GC3Denum target, Platform3DObject);
+ void bindRenderbuffer(GC3Denum target, Platform3DObject);
+ void bindTexture(GC3Denum target, Platform3DObject);
+ void blendColor(GC3Dclampf red, GC3Dclampf green, GC3Dclampf blue, GC3Dclampf alpha);
+ void blendEquation(GC3Denum mode);
+ void blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha);
+ void blendFunc(GC3Denum sfactor, GC3Denum dfactor);
+ void blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha);
+
+ void bufferData(GC3Denum target, GC3Dsizeiptr size, GC3Denum usage);
+ void bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage);
+ void bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr size, const void* data);
+
+ GC3Denum checkFramebufferStatus(GC3Denum target);
+ void clear(GC3Dbitfield mask);
+ void clearColor(GC3Dclampf red, GC3Dclampf green, GC3Dclampf blue, GC3Dclampf alpha);
+ void clearDepth(GC3Dclampf depth);
+ void clearStencil(GC3Dint s);
+ void colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha);
void compileShader(Platform3DObject);
- void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border);
- void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height);
- void cullFace(unsigned long mode);
- void depthFunc(unsigned long func);
- void depthMask(bool flag);
- void depthRange(double zNear, double zFar);
+ void copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border);
+ void copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height);
+ void cullFace(GC3Denum mode);
+ void depthFunc(GC3Denum func);
+ void depthMask(GC3Dboolean flag);
+ void depthRange(GC3Dclampf zNear, GC3Dclampf zFar);
void detachShader(Platform3DObject, Platform3DObject);
- void disable(unsigned long cap);
- void disableVertexAttribArray(unsigned long index);
- void drawArrays(unsigned long mode, long first, long count);
- void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset);
+ void disable(GC3Denum cap);
+ void disableVertexAttribArray(GC3Duint index);
+ void drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count);
+ void drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, GC3Dintptr offset);
- void enable(unsigned long cap);
- void enableVertexAttribArray(unsigned long index);
+ void enable(GC3Denum cap);
+ void enableVertexAttribArray(GC3Duint index);
void finish();
void flush();
- void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, Platform3DObject);
- void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, Platform3DObject, long level);
- void frontFace(unsigned long mode);
- void generateMipmap(unsigned long target);
-
- bool getActiveAttrib(Platform3DObject program, unsigned long index, ActiveInfo&);
- bool getActiveUniform(Platform3DObject program, unsigned long index, ActiveInfo&);
-
- void getAttachedShaders(Platform3DObject program, int maxCount, int* count, unsigned int* shaders);
-
- int getAttribLocation(Platform3DObject, const String& name);
-
- void getBooleanv(unsigned long pname, unsigned char* value);
-
- void getBufferParameteriv(unsigned long target, unsigned long pname, int* value);
-
+ void framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, Platform3DObject);
+ void framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, Platform3DObject, GC3Dint level);
+ void frontFace(GC3Denum mode);
+ void generateMipmap(GC3Denum target);
+
+ bool getActiveAttrib(Platform3DObject program, GC3Duint index, ActiveInfo&);
+ bool getActiveUniform(Platform3DObject program, GC3Duint index, ActiveInfo&);
+ void getAttachedShaders(Platform3DObject program, GC3Dsizei maxCount, GC3Dsizei* count, Platform3DObject* shaders);
+ GC3Dint getAttribLocation(Platform3DObject, const String& name);
+ void getBooleanv(GC3Denum pname, GC3Dboolean* value);
+ void getBufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
GraphicsContext3D::Attributes getContextAttributes();
-
- unsigned long getError();
-
- bool isContextLost();
-
- void getFloatv(unsigned long pname, float* value);
-
- void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value);
-
- void getIntegerv(unsigned long pname, int* value);
-
- void getProgramiv(Platform3DObject program, unsigned long pname, int* value);
-
+ GC3Denum getError();
+ void getFloatv(GC3Denum pname, GC3Dfloat* value);
+ void getFramebufferAttachmentParameteriv(GC3Denum target, GC3Denum attachment, GC3Denum pname, GC3Dint* value);
+ void getIntegerv(GC3Denum pname, GC3Dint* value);
+ void getProgramiv(Platform3DObject program, GC3Denum pname, GC3Dint* value);
String getProgramInfoLog(Platform3DObject);
-
- void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value);
-
- void getShaderiv(Platform3DObject, unsigned long pname, int* value);
-
+ void getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
+ void getShaderiv(Platform3DObject, GC3Denum pname, GC3Dint* value);
String getShaderInfoLog(Platform3DObject);
String getShaderSource(Platform3DObject);
- String getString(unsigned long name);
-
- void getTexParameterfv(unsigned long target, unsigned long pname, float* value);
- void getTexParameteriv(unsigned long target, unsigned long pname, int* value);
-
- void getUniformfv(Platform3DObject program, long location, float* value);
- void getUniformiv(Platform3DObject program, long location, int* value);
-
- long getUniformLocation(Platform3DObject, const String& name);
-
- void getVertexAttribfv(unsigned long index, unsigned long pname, float* value);
- void getVertexAttribiv(unsigned long index, unsigned long pname, int* value);
-
- long getVertexAttribOffset(unsigned long index, unsigned long pname);
-
- void hint(unsigned long target, unsigned long mode);
- bool isBuffer(Platform3DObject);
- bool isEnabled(unsigned long cap);
- bool isFramebuffer(Platform3DObject);
- bool isProgram(Platform3DObject);
- bool isRenderbuffer(Platform3DObject);
- bool isShader(Platform3DObject);
- bool isTexture(Platform3DObject);
- void lineWidth(double);
+ String getString(GC3Denum name);
+ void getTexParameterfv(GC3Denum target, GC3Denum pname, GC3Dfloat* value);
+ void getTexParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
+ void getUniformfv(Platform3DObject program, GC3Dint location, GC3Dfloat* value);
+ void getUniformiv(Platform3DObject program, GC3Dint location, GC3Dint* value);
+ GC3Dint getUniformLocation(Platform3DObject, const String& name);
+ void getVertexAttribfv(GC3Duint index, GC3Denum pname, GC3Dfloat* value);
+ void getVertexAttribiv(GC3Duint index, GC3Denum pname, GC3Dint* value);
+ GC3Dsizeiptr getVertexAttribOffset(GC3Duint index, GC3Denum pname);
+
+ void hint(GC3Denum target, GC3Denum mode);
+ GC3Dboolean isBuffer(Platform3DObject);
+ GC3Dboolean isEnabled(GC3Denum cap);
+ GC3Dboolean isFramebuffer(Platform3DObject);
+ GC3Dboolean isProgram(Platform3DObject);
+ GC3Dboolean isRenderbuffer(Platform3DObject);
+ GC3Dboolean isShader(Platform3DObject);
+ GC3Dboolean isTexture(Platform3DObject);
+ void lineWidth(GC3Dfloat);
void linkProgram(Platform3DObject);
- void pixelStorei(unsigned long pname, long param);
- void polygonOffset(double factor, double units);
+ void pixelStorei(GC3Denum pname, GC3Dint param);
+ void polygonOffset(GC3Dfloat factor, GC3Dfloat units);
- void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* data);
+ void readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, void* data);
- void releaseShaderCompiler();
- void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height);
- void sampleCoverage(double value, bool invert);
- void scissor(long x, long y, unsigned long width, unsigned long height);
+ void renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height);
+ void sampleCoverage(GC3Dclampf value, GC3Dboolean invert);
+ void scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height);
void shaderSource(Platform3DObject, const String& string);
- void stencilFunc(unsigned long func, long ref, unsigned long mask);
- void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask);
- void stencilMask(unsigned long mask);
- void stencilMaskSeparate(unsigned long face, unsigned long mask);
- void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass);
- void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass);
-
- // These next several functions return an error code (0 if no errors) rather than using an ExceptionCode.
- // Currently they return -1 on any error.
- int texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels);
-
- void texParameterf(unsigned target, unsigned pname, float param);
- void texParameteri(unsigned target, unsigned pname, int param);
-
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels);
-
- void uniform1f(long location, float x);
- void uniform1fv(long location, float* v, int size);
- void uniform1i(long location, int x);
- void uniform1iv(long location, int* v, int size);
- void uniform2f(long location, float x, float y);
- void uniform2fv(long location, float* v, int size);
- void uniform2i(long location, int x, int y);
- void uniform2iv(long location, int* v, int size);
- void uniform3f(long location, float x, float y, float z);
- void uniform3fv(long location, float* v, int size);
- void uniform3i(long location, int x, int y, int z);
- void uniform3iv(long location, int* v, int size);
- void uniform4f(long location, float x, float y, float z, float w);
- void uniform4fv(long location, float* v, int size);
- void uniform4i(long location, int x, int y, int z, int w);
- void uniform4iv(long location, int* v, int size);
- void uniformMatrix2fv(long location, bool transpose, float* value, int size);
- void uniformMatrix3fv(long location, bool transpose, float* value, int size);
- void uniformMatrix4fv(long location, bool transpose, float* value, int size);
+ void stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask);
+ void stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask);
+ void stencilMask(GC3Duint mask);
+ void stencilMaskSeparate(GC3Denum face, GC3Duint mask);
+ void stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass);
+ void stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass);
+
+ // texImage2D return false on any error rather than using an ExceptionCode.
+ bool texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels);
+ void texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param);
+ void texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param);
+ void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels);
+
+ void uniform1f(GC3Dint location, GC3Dfloat x);
+ void uniform1fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size);
+ void uniform1i(GC3Dint location, GC3Dint x);
+ void uniform1iv(GC3Dint location, GC3Dint* v, GC3Dsizei size);
+ void uniform2f(GC3Dint location, GC3Dfloat x, float y);
+ void uniform2fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size);
+ void uniform2i(GC3Dint location, GC3Dint x, GC3Dint y);
+ void uniform2iv(GC3Dint location, GC3Dint* v, GC3Dsizei size);
+ void uniform3f(GC3Dint location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z);
+ void uniform3fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size);
+ void uniform3i(GC3Dint location, GC3Dint x, GC3Dint y, GC3Dint z);
+ void uniform3iv(GC3Dint location, GC3Dint* v, GC3Dsizei size);
+ void uniform4f(GC3Dint location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w);
+ void uniform4fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size);
+ void uniform4i(GC3Dint location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w);
+ void uniform4iv(GC3Dint location, GC3Dint* v, GC3Dsizei size);
+ void uniformMatrix2fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size);
+ void uniformMatrix3fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size);
+ void uniformMatrix4fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size);
void useProgram(Platform3DObject);
void validateProgram(Platform3DObject);
- void vertexAttrib1f(unsigned long indx, float x);
- void vertexAttrib1fv(unsigned long indx, float* values);
- void vertexAttrib2f(unsigned long indx, float x, float y);
- void vertexAttrib2fv(unsigned long indx, float* values);
- void vertexAttrib3f(unsigned long indx, float x, float y, float z);
- void vertexAttrib3fv(unsigned long indx, float* values);
- void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w);
- void vertexAttrib4fv(unsigned long indx, float* values);
- void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
- unsigned long stride, unsigned long offset);
-
- void viewport(long x, long y, unsigned long width, unsigned long height);
-
- unsigned createBuffer();
- unsigned createFramebuffer();
- unsigned createProgram();
- unsigned createRenderbuffer();
- unsigned createShader(unsigned long);
- unsigned createTexture();
-
- void deleteBuffer(unsigned);
- void deleteFramebuffer(unsigned);
- void deleteProgram(unsigned);
- void deleteRenderbuffer(unsigned);
- void deleteShader(unsigned);
- void deleteTexture(unsigned);
-
- void synthesizeGLError(unsigned long error);
+ void vertexAttrib1f(GC3Duint index, GC3Dfloat x);
+ void vertexAttrib1fv(GC3Duint index, GC3Dfloat* values);
+ void vertexAttrib2f(GC3Duint index, GC3Dfloat x, GC3Dfloat y);
+ void vertexAttrib2fv(GC3Duint index, GC3Dfloat* values);
+ void vertexAttrib3f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z);
+ void vertexAttrib3fv(GC3Duint index, GC3Dfloat* values);
+ void vertexAttrib4f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w);
+ void vertexAttrib4fv(GC3Duint index, GC3Dfloat* values);
+ void vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized,
+ GC3Dsizei stride, GC3Dintptr offset);
+
+ void viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height);
+
+ Platform3DObject createBuffer();
+ Platform3DObject createFramebuffer();
+ Platform3DObject createProgram();
+ Platform3DObject createRenderbuffer();
+ Platform3DObject createShader(GC3Denum);
+ Platform3DObject createTexture();
+
+ void deleteBuffer(Platform3DObject);
+ void deleteFramebuffer(Platform3DObject);
+ void deleteProgram(Platform3DObject);
+ void deleteRenderbuffer(Platform3DObject);
+ void deleteShader(Platform3DObject);
+ void deleteTexture(Platform3DObject);
+
+ void synthesizeGLError(GC3Denum error);
// Extensions3D support.
Extensions3D* getExtensions();
@@ -272,14 +251,14 @@ public:
// GL_CHROMIUM_map_sub
bool supportsMapSubCHROMIUM();
- void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access);
+ void* mapBufferSubDataCHROMIUM(GC3Denum target, GC3Dsizeiptr offset, GC3Dsizei size, GC3Denum access);
void unmapBufferSubDataCHROMIUM(const void*);
- void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access);
+ void* mapTexSubImage2DCHROMIUM(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Denum access);
void unmapTexSubImage2DCHROMIUM(const void*);
// GL_CHROMIUM_copy_texture_to_parent_texture
bool supportsCopyTextureToParentTextureCHROMIUM();
- void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture);
+ void copyTextureToParentTextureCHROMIUM(Platform3DObject texture, Platform3DObject parentTexture);
private:
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index 345e43e..caeffb6 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -38,7 +38,6 @@
#include "Document.h"
#include "Event.h"
#include "Frame.h"
-#include "InspectorBackend.h"
#include "InspectorController.h"
#include "InspectorFrontendClientImpl.h"
#include "InspectorFrontendHost.h"
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 4422e1b..5baf73b 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -82,6 +82,7 @@
#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :(
#include "DocumentLoader.h"
#include "DocumentMarker.h"
+#include "DocumentMarkerController.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FormState.h"
@@ -712,7 +713,7 @@ WebPerformance WebFrameImpl::performance() const
if (!m_frame || !m_frame->domWindow())
return WebPerformance();
- return WebPerformance(m_frame->domWindow()->webkitPerformance());
+ return WebPerformance(m_frame->domWindow()->performance());
}
WebSecurityOrigin WebFrameImpl::securityOrigin() const
@@ -1073,7 +1074,12 @@ void WebFrameImpl::replaceSelection(const WebString& text)
void WebFrameImpl::insertText(const WebString& text)
{
- frame()->editor()->insertText(text, 0);
+ Editor* editor = frame()->editor();
+
+ if (editor->hasComposition())
+ editor->confirmComposition(text);
+ else
+ editor->insertText(text, 0);
}
void WebFrameImpl::setMarkedText(
@@ -1081,8 +1087,6 @@ void WebFrameImpl::setMarkedText(
{
Editor* editor = frame()->editor();
- editor->confirmComposition(text);
-
Vector<CompositionUnderline> decorations;
editor->setComposition(text, decorations, location, length);
}
@@ -1150,11 +1154,11 @@ bool WebFrameImpl::executeCommand(const WebString& name)
// support.
if (command == "DeleteToEndOfParagraph") {
Editor* editor = frame()->editor();
- if (!editor->deleteWithDirection(SelectionController::DirectionForward,
+ if (!editor->deleteWithDirection(DirectionForward,
ParagraphBoundary,
true,
false)) {
- editor->deleteWithDirection(SelectionController::DirectionForward,
+ editor->deleteWithDirection(DirectionForward,
CharacterGranularity,
true,
false);
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 085a157..63ebed8 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -253,6 +253,11 @@ bool WebPopupMenuImpl::confirmComposition()
return false;
}
+bool WebPopupMenuImpl::confirmComposition(const WebString& text)
+{
+ return false;
+}
+
WebTextInputType WebPopupMenuImpl::textInputType()
{
return WebTextInputTypeNone;
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 221ba03..b8ef7ba 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -73,6 +73,7 @@ public:
const WebVector<WebCompositionUnderline>& underlines,
int selectionStart, int selectionEnd);
virtual bool confirmComposition();
+ virtual bool confirmComposition(const WebString& text);
virtual WebTextInputType textInputType();
virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 178e4db..8e27a67 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -46,6 +46,7 @@
#include "WebFormElement.h"
using namespace WebCore;
+using namespace HTMLNames;
namespace {
@@ -128,13 +129,13 @@ bool IsSelectInDefaultState(const HTMLSelectElement* select)
// Returns true if the form element is in its default state, false otherwise.
// The default state is the state of the form element on initial load of the
// page, and varies depending upon the form element. For example, a checkbox is
-// in its default state if the checked state matches the defaultChecked state.
+// in its default state if the checked state matches the state of the checked attribute.
bool IsInDefaultState(const HTMLFormControlElement* formElement)
{
if (formElement->hasTagName(HTMLNames::inputTag)) {
const HTMLInputElement* inputElement = static_cast<const HTMLInputElement*>(formElement);
if (inputElement->isCheckbox() || inputElement->isRadioButton())
- return inputElement->checked() == inputElement->defaultChecked();
+ return inputElement->checked() == inputElement->hasAttribute(checkedAttr);
} else if (formElement->hasTagName(HTMLNames::selectTag))
return IsSelectInDefaultState(static_cast<const HTMLSelectElement*>(formElement));
return true;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index ac05dd2..e47c89e 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -69,7 +69,6 @@
#include "HTMLNames.h"
#include "Image.h"
#include "ImageBuffer.h"
-#include "ImageData.h"
#include "InspectorController.h"
#include "KeyboardCodes.h"
#include "KeyboardEvent.h"
@@ -120,6 +119,7 @@
#include "WebString.h"
#include "WebVector.h"
#include "WebViewClient.h"
+#include <wtf/ByteArray.h>
#include <wtf/RefPtr.h>
#if PLATFORM(CG)
@@ -1020,10 +1020,10 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
IntRect invertRect(rect.x(), bitmapHeight - rect.bottom(), rect.width(), rect.height());
OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size()));
- RefPtr<ImageData> imageData(ImageData::create(rect.width(), rect.height()));
- if (imageBuffer.get() && imageData.get()) {
- m_layerRenderer->getFramebufferPixels(imageData->data()->data()->data(), invertRect);
- imageBuffer->putPremultipliedImageData(imageData.get(), IntRect(IntPoint(), rect.size()), IntPoint());
+ RefPtr<ByteArray> pixelArray(ByteArray::create(rect.width() * rect.height() * 4));
+ if (imageBuffer.get() && pixelArray.get()) {
+ m_layerRenderer->getFramebufferPixels(pixelArray->data(), invertRect);
+ imageBuffer->putPremultipliedImageData(pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint());
gc.save();
gc.translate(FloatSize(0.0f, bitmapHeight));
gc.scale(FloatSize(1.0f, -1.0f));
@@ -1303,11 +1303,16 @@ bool WebViewImpl::setComposition(
bool WebViewImpl::confirmComposition()
{
+ return confirmComposition(WebString());
+}
+
+bool WebViewImpl::confirmComposition(const WebString& text)
+{
Frame* focused = focusedWebCoreFrame();
if (!focused || !m_imeAcceptEvents)
return false;
Editor* editor = focused->editor();
- if (!editor || !editor->hasComposition())
+ if (!editor || (!editor->hasComposition() && !text.length()))
return false;
// We should verify the parent node of this IME composition node are
@@ -1321,7 +1326,14 @@ bool WebViewImpl::confirmComposition()
return false;
}
- editor->confirmComposition();
+ if (editor->hasComposition()) {
+ if (text.length())
+ editor->confirmComposition(String(text));
+ else
+ editor->confirmComposition();
+ } else
+ editor->insertText(String(text), 0);
+
return true;
}
@@ -2268,70 +2280,6 @@ void WebViewImpl::setRootLayerNeedsDisplay()
void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& clipRect)
{
- ASSERT(m_layerRenderer);
- // Compute the damage rect in viewport space.
- WebFrameImpl* webframe = mainFrameImpl();
- if (!webframe)
- return;
- FrameView* view = webframe->frameView();
- if (!view)
- return;
-
- IntRect contentRect = view->visibleContentRect(false);
- IntRect screenRect = view->contentsToWindow(contentRect);
-
- // We support fast scrolling in one direction at a time.
- if (scrollDelta.width() && scrollDelta.height()) {
- invalidateRootLayerRect(WebRect(screenRect));
- return;
- }
-
- // Compute the region we will expose by scrolling. We use the
- // content rect for invalidation. Using this space for damage
- // rects allows us to intermix invalidates with scrolls.
- IntRect damagedContentsRect;
- if (scrollDelta.width()) {
- int dx = scrollDelta.width();
- damagedContentsRect.setY(screenRect.y());
- damagedContentsRect.setHeight(screenRect.height());
- if (dx > 0) {
- damagedContentsRect.setX(screenRect.x());
- damagedContentsRect.setWidth(dx);
- } else {
- damagedContentsRect.setX(screenRect.right() + dx);
- damagedContentsRect.setWidth(-dx);
- }
- } else {
- int dy = scrollDelta.height();
- damagedContentsRect.setX(screenRect.x());
- damagedContentsRect.setWidth(screenRect.width());
- if (dy > 0) {
- damagedContentsRect.setY(screenRect.y());
- damagedContentsRect.setHeight(dy);
- } else {
- damagedContentsRect.setY(screenRect.bottom() + dy);
- damagedContentsRect.setHeight(-dy);
- }
- }
-
- // Move the previous damage
- m_rootLayerScrollDamage.move(scrollDelta.width(), scrollDelta.height());
- // Union with the new damage rect.
- m_rootLayerScrollDamage.unite(damagedContentsRect);
-
- // Scroll any existing damage that intersects with clip rect
- if (clipRect.intersects(m_rootLayerDirtyRect)) {
- // Find the inner damage
- IntRect innerDamage(clipRect);
- innerDamage.intersect(m_rootLayerDirtyRect);
-
- // Move the damage
- innerDamage.move(scrollDelta.width(), scrollDelta.height());
-
- // Merge it back into the damaged rect
- m_rootLayerDirtyRect.unite(innerDamage);
- }
-
setRootLayerNeedsDisplay();
}
@@ -2342,9 +2290,12 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
if (!page())
return;
- // FIXME: add a smarter damage aggregation logic and/or unify with
- // LayerChromium's damage logic
- m_rootLayerDirtyRect.unite(rect);
+ FrameView* view = page()->mainFrame()->view();
+ IntRect contentRect = view->visibleContentRect(false);
+ IntRect visibleRect = view->visibleContentRect(true);
+
+ IntRect dirtyRect = view->windowToContents(rect);
+ m_layerRenderer->invalidateRootLayerRect(dirtyRect, visibleRect, contentRect);
setRootLayerNeedsDisplay();
}
@@ -2361,89 +2312,77 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (m_layerRenderer)
m_layerRenderer->finish(); // finish all GL rendering before we hide the window?
m_client->didActivateAcceleratedCompositing(false);
- return;
- }
-
- if (m_layerRenderer) {
+ } else if (m_layerRenderer) {
m_isAcceleratedCompositingActive = true;
m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
std::max(1, m_size.height)));
m_client->didActivateAcceleratedCompositing(true);
- return;
- }
-
- RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
- if (!context) {
- context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
- if (context)
- context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
- }
- m_layerRenderer = LayerRendererChromium::create(context.release());
- if (m_layerRenderer) {
- m_client->didActivateAcceleratedCompositing(true);
- m_isAcceleratedCompositingActive = true;
- m_compositorCreationFailed = false;
} else {
- m_isAcceleratedCompositingActive = false;
- m_client->didActivateAcceleratedCompositing(false);
- m_compositorCreationFailed = true;
+ RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
+ if (!context) {
+ context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
+ if (context)
+ context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
+ }
+ m_layerRenderer = LayerRendererChromium::create(context.release());
+ if (m_layerRenderer) {
+ m_client->didActivateAcceleratedCompositing(true);
+ m_isAcceleratedCompositingActive = true;
+ m_compositorCreationFailed = false;
+ } else {
+ m_isAcceleratedCompositingActive = false;
+ m_client->didActivateAcceleratedCompositing(false);
+ m_compositorCreationFailed = true;
+ }
}
+ if (page())
+ page()->mainFrame()->view()->setClipsRepaints(!m_isAcceleratedCompositingActive);
}
-void WebViewImpl::updateRootLayerContents(const IntRect& rect)
-{
- if (!isAcceleratedCompositingActive())
- return;
-
- WebFrameImpl* webframe = mainFrameImpl();
- if (!webframe)
- return;
- FrameView* view = webframe->frameView();
- if (!view)
- return;
-
- LayerChromium* rootLayer = m_layerRenderer->rootLayer();
- if (rootLayer) {
- IntRect visibleRect = view->visibleContentRect(true);
-
- m_layerRenderer->setRootLayerCanvasSize(IntSize(rect.width(), rect.height()));
- GraphicsContext* rootLayerContext = m_layerRenderer->rootLayerGraphicsContext();
-
-#if PLATFORM(SKIA)
- PlatformContextSkia* skiaContext = rootLayerContext->platformContext();
- skia::PlatformCanvas* platformCanvas = skiaContext->canvas();
-
- platformCanvas->save();
-
- // Bring the canvas into the coordinate system of the paint rect.
- platformCanvas->translate(static_cast<SkScalar>(-rect.x()), static_cast<SkScalar>(-rect.y()));
-
- rootLayerContext->save();
-
- webframe->paintWithContext(*rootLayerContext, rect);
- rootLayerContext->restore();
+class WebViewImplTilePaintInterface : public TilePaintInterface {
+public:
+ explicit WebViewImplTilePaintInterface(WebViewImpl* webViewImpl)
+ : m_webViewImpl(webViewImpl)
+ {
+ }
- platformCanvas->restore();
-#elif PLATFORM(CG)
- CGContextRef cgContext = rootLayerContext->platformContext();
+ virtual void paint(GraphicsContext& context, const IntRect& contentRect)
+ {
+ Page* page = m_webViewImpl->page();
+ if (!page)
+ return;
+ FrameView* view = page->mainFrame()->view();
+ view->paintContents(&context, contentRect);
+ }
- CGContextSaveGState(cgContext);
+private:
+ WebViewImpl* m_webViewImpl;
+};
- // Bring the CoreGraphics context into the coordinate system of the paint rect.
- CGContextTranslateCTM(cgContext, -rect.x(), -rect.y());
- rootLayerContext->save();
+class WebViewImplScrollbarPaintInterface : public TilePaintInterface {
+public:
+ explicit WebViewImplScrollbarPaintInterface(WebViewImpl* webViewImpl)
+ : m_webViewImpl(webViewImpl)
+ {
+ }
- webframe->paintWithContext(*rootLayerContext, rect);
- rootLayerContext->restore();
+ virtual void paint(GraphicsContext& context, const IntRect& contentRect)
+ {
+ Page* page = m_webViewImpl->page();
+ if (!page)
+ return;
+ FrameView* view = page->mainFrame()->view();
- CGContextRestoreGState(cgContext);
-#else
-#error Must port to your platform
-#endif
+ context.translate(view->scrollX(), view->scrollY());
+ IntRect windowRect = view->contentsToWindow(contentRect);
+ view->paintScrollbars(&context, windowRect);
}
-}
+
+private:
+ WebViewImpl* m_webViewImpl;
+};
void WebViewImpl::doComposite()
{
@@ -2455,32 +2394,12 @@ void WebViewImpl::doComposite()
// The visibleRect includes scrollbars whereas the contentRect doesn't.
IntRect visibleRect = view->visibleContentRect(true);
IntRect contentRect = view->visibleContentRect(false);
- IntRect viewPort = IntRect(0, 0, m_size.width, m_size.height);
-
- // Give the compositor a chance to setup/resize the root texture handle and perform scrolling.
- m_layerRenderer->prepareToDrawLayers(visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY()));
+ IntPoint scroll(view->scrollX(), view->scrollY());
- // Draw the contents of the root layer.
- Vector<IntRect> damageRects;
- damageRects.append(m_rootLayerScrollDamage);
- damageRects.append(m_rootLayerDirtyRect);
- for (size_t i = 0; i < damageRects.size(); ++i) {
- IntRect damagedRect = damageRects[i];
-
- // Intersect this rectangle with the viewPort.
- damagedRect.intersect(viewPort);
-
- // Now render it.
- if (damagedRect.width() && damagedRect.height()) {
- updateRootLayerContents(damagedRect);
- m_layerRenderer->updateRootLayerTextureRect(damagedRect);
- }
- }
- m_rootLayerDirtyRect = IntRect();
- m_rootLayerScrollDamage = IntRect();
+ WebViewImplTilePaintInterface tilePaint(this);
- // Draw the actual layers...
- m_layerRenderer->drawLayers(visibleRect, contentRect);
+ WebViewImplScrollbarPaintInterface scrollbarPaint(this);
+ m_layerRenderer->drawLayers(visibleRect, contentRect, scroll, tilePaint, scrollbarPaint);
}
void WebViewImpl::reallocateRenderer()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 6e8dcac..cc25c84 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -105,6 +105,7 @@ public:
int selectionStart,
int selectionEnd);
virtual bool confirmComposition();
+ virtual bool confirmComposition(const WebString& text);
virtual WebTextInputType textInputType();
virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
@@ -396,7 +397,6 @@ private:
#if USE(ACCELERATED_COMPOSITING)
void setIsAcceleratedCompositingActive(bool);
- void updateRootLayerContents(const WebCore::IntRect&);
void doComposite();
void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
void reallocateRenderer();
@@ -528,7 +528,6 @@ private:
RefPtr<WebCore::Node> m_mouseCaptureNode;
#if USE(ACCELERATED_COMPOSITING)
- WebCore::IntRect m_rootLayerDirtyRect;
WebCore::IntRect m_rootLayerScrollDamage;
RefPtr<WebCore::LayerRendererChromium> m_layerRenderer;
bool m_isAcceleratedCompositingActive;
diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp
index b68980f..4b6b123 100644
--- a/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -139,6 +139,7 @@ public:
int selectionStart,
int selectionEnd) { return true; }
virtual bool confirmComposition() { return true; }
+ virtual bool confirmComposition(const WebString& text) { return true; }
virtual WebTextInputType textInputType() { return WebKit::WebTextInputTypeNone; }
virtual WebRect caretOrSelectionBounds() { return WebRect(); }
virtual void setTextDirection(WebTextDirection) { }
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index fde9fea..c9d6bfe 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,128 @@
+2010-12-27 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Set the frame smart object base clipper to non-static.
+ https://bugs.webkit.org/show_bug.cgi?id=51552
+
+ The base clipper of the clipped smart object, which is the parent
+ class of the ewk_frame class is a static clipper. It's normally only
+ used for showing/hiding the object, but in the case of the ewk_frame,
+ it needs to clip the object to its dimension, in order to clip
+ scrollbars of inner frames.
+
+ Setting it to non-static makes the clipper to be automatically moved
+ by the parent class, thus staying on the correct position when the
+ frame is moved.
+
+ This change needed to be done after the adoption of the static clipper
+ on the clipped smart base class.
+
+ * ewk/ewk_frame.cpp:
+ (_ewk_frame_smart_add):
+
+2010-12-24 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Add option to enable Touch Events.
+ https://bugs.webkit.org/show_bug.cgi?id=49125
+
+ Implement ewk_frame_feed_touch_event to feed touch events. Because EFL
+ doesn't have touch events, Application should generate and pass it.
+
+ * WebCoreSupport/ChromeClientEfl.h:
+ (WebCore::ChromeClientEfl::needTouchEvents):
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_feed_touch_event):
+ * ewk/ewk_frame.h:
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::didSaveToPageCache):
+ (WebCore::FrameLoaderClientEfl::didRestoreFromPageCache):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * WebCoreSupport/EditorClientEfl.cpp:
+ (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
+
+2010-12-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Fix ContextMenu removal
+ https://bugs.webkit.org/show_bug.cgi?id=51530
+
+ Fix ContextMenu removal
+
+ In r74207 the support for ContextMenu was removed from EFL while the
+ code is being ported to the new CROSS_PLATFORM_MENUS due to build
+ breakage. However there were some missing removals in the shutdown
+ logic that introduced a bug, leading to a segmentation fault when
+ ContexController was destroyed.
+
+ The best way to effectively disable the ContextMenu is to conditionally
+ compile the meaningful stuff by surrounding with "#if
+ ENABLE(CONTEXT_MENUS)" and then disabling it in CMake.
+
+ * ewk/ewk_contextmenu.cpp: surround need parts with #if
+ ENABLE(CONTEXT_MENUS).
+ (ewk_context_menu_destroy): ditto.
+ (ewk_context_menu_item_select): ditto.
+ * ewk/ewk_private.h: ditto.
+ * ewk/ewk_view.cpp: ditto.
+
+2010-12-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Clean warnings in Tiled Backing Store
+ https://bugs.webkit.org/show_bug.cgi?id=51529
+
+ Tiled backing store in EFL was giving the following warnings that are
+ gone now:
+
+ - Static function defined but not used;
+ - Comparison between signed and unsigned integer expressions;
+
+ * ewk/ewk_tiled_backing_store.c:
+ (_ewk_tiled_backing_store_item_fill):
+ (_ewk_tiled_backing_store_smart_calculate):
+ * ewk/ewk_tiled_matrix.c:
+ (_ewk_tile_matrix_slicer_setup):
+
+2010-12-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed build warning fix.
+
+ [EFL] Remove warning messages during the webkit efl compiling
+ https://bugs.webkit.org/show_bug.cgi?id=51520
+
+ Remove build warning messages.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_smart_show):
+ (_ewk_view_smart_hide):
+ * ewk/ewk_view.h:
+
2010-12-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index c6c82d4..a714dd4 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -120,6 +120,10 @@ public:
virtual void showContextMenu() { }
#endif
+#if ENABLE(TOUCH_EVENTS)
+ virtual void needTouchEvents(bool) { }
+#endif
+
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
virtual void formStateDidChange(const Node*);
diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
index 6bb961b..a9e45dd 100644
--- a/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
@@ -343,25 +343,25 @@ bool EditorClientEfl::handleEditingKeyboardEvent(KeyboardEvent* event)
switch (keyEvent->windowsVirtualKeyCode()) {
case VK_LEFT:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionLeft,
+ DirectionLeft,
keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
return true;
case VK_RIGHT:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionRight,
+ DirectionRight,
keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
return true;
case VK_UP:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionBackward,
+ DirectionBackward,
keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
return true;
case VK_DOWN:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionForward,
+ DirectionForward,
keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
return true;
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 627c1b9..929b269 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -923,6 +923,14 @@ void FrameLoaderClientEfl::transitionToCommittedForNewPage()
ewk_view_frame_main_cleared(m_view);
}
+void FrameLoaderClientEfl::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientEfl::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientEfl::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index e138139..cf7bdf0 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -200,6 +200,9 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void transitionToCommittedFromCachedFrame(CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
diff --git a/WebKit/efl/ewk/ewk_contextmenu.cpp b/WebKit/efl/ewk/ewk_contextmenu.cpp
index c0c68ba..40bd2ba 100644
--- a/WebKit/efl/ewk/ewk_contextmenu.cpp
+++ b/WebKit/efl/ewk/ewk_contextmenu.cpp
@@ -33,7 +33,9 @@
struct _Ewk_Context_Menu {
unsigned int __ref;
+#if ENABLE(CONTEXT_MENUS)
WebCore::ContextMenuController* controller;
+#endif
Evas_Object* view;
Eina_List* items;
@@ -73,9 +75,12 @@ void ewk_context_menu_unref(Ewk_Context_Menu* menu)
Eina_Bool ewk_context_menu_destroy(Ewk_Context_Menu* menu)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(menu, EINA_FALSE);
+#if ENABLE(CONTEXT_MENUS)
EINA_SAFETY_ON_NULL_RETURN_VAL(menu->controller, EINA_FALSE);
menu->controller->clearContextMenu();
+#endif
+
return EINA_TRUE;
}
@@ -106,6 +111,7 @@ Ewk_Context_Menu_Item* ewk_context_menu_item_new(Ewk_Context_Menu_Item_Type type
Eina_Bool ewk_context_menu_item_select(Ewk_Context_Menu* menu, Ewk_Context_Menu_Item* item)
{
+#if ENABLE(CONTEXT_MENUS)
EINA_SAFETY_ON_NULL_RETURN_VAL(menu, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
WebCore::ContextMenuAction action = static_cast<WebCore::ContextMenuAction>(item->action);
@@ -114,6 +120,8 @@ Eina_Bool ewk_context_menu_item_select(Ewk_Context_Menu* menu, Ewk_Context_Menu_
// Don't care about title and submenu as they're not used after this point.
WebCore::ContextMenuItem core(type, action, WTF::String());
menu->controller->contextMenuItemSelected(&core);
+#endif
+
return EINA_TRUE;
}
@@ -193,6 +201,7 @@ Eina_Bool ewk_context_menu_item_enabled_set(Ewk_Context_Menu_Item *o, Eina_Bool
/* internal methods ****************************************************/
+#if ENABLE(CONTEXT_MENUS)
/**
* @internal
*
@@ -260,3 +269,5 @@ void ewk_context_menu_show(Ewk_Context_Menu* o)
evas_object_smart_callback_call(o->view, "contextmenu,show", o);
}
+
+#endif
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 5076be5..1cadc77 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -24,6 +24,7 @@
#include "config.h"
#include "ewk_frame.h"
+#include "DocumentMarkerController.h"
#include "EWebKit.h"
#include "EventHandler.h"
#include "FocusController.h"
@@ -36,6 +37,7 @@
#include "KURL.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
#include "PlatformWheelEvent.h"
#include "ProgressTracker.h"
#include "RefPtr.h"
@@ -191,6 +193,7 @@ static void _ewk_frame_smart_add(Evas_Object* o)
sd->self = o;
_parent_sc.add(o);
+ evas_object_static_clip_set(sd->base.clipper, EINA_FALSE);
evas_object_move(sd->base.clipper, 0, 0);
evas_object_resize(sd->base.clipper, 0, 0);
@@ -1474,6 +1477,42 @@ Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move*
return sd->frame->eventHandler()->mouseMoved(event);
}
+Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+#if ENABLE(TOUCH_EVENTS)
+ EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(points, EINA_FALSE);
+
+ Evas_Coord x, y;
+ evas_object_geometry_get(sd->view, &x, &y, 0, 0);
+
+ WebCore::TouchEventType type = WebCore::TouchStart;
+ switch (action) {
+ case EWK_TOUCH_START:
+ type = WebCore::TouchStart;
+ break;
+ case EWK_TOUCH_END:
+ type = WebCore::TouchEnd;
+ break;
+ case EWK_TOUCH_MOVE:
+ type = WebCore::TouchMove;
+ break;
+ case EWK_TOUCH_CANCEL:
+ type = WebCore::TouchCancel;
+ break;
+ default:
+ return EINA_FALSE;
+ }
+
+ WebCore::PlatformTouchEvent te(points, WebCore::IntPoint(x, y), type, metaState);
+ ret = sd->frame->eventHandler()->handleTouchEvent(te);
+#endif
+ return ret;
+}
+
static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent &event)
{
WebCore::ScrollDirection direction;
diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h
index 156bd82..63936f3 100644
--- a/WebKit/efl/ewk/ewk_frame.h
+++ b/WebKit/efl/ewk/ewk_frame.h
@@ -130,6 +130,26 @@ struct _Ewk_Hit_Test {
} flags;
};
+typedef enum {
+ EWK_TOUCH_START,
+ EWK_TOUCH_END,
+ EWK_TOUCH_MOVE,
+ EWK_TOUCH_CANCEL
+} Ewk_Touch_Event_Type;
+
+typedef enum {
+ EWK_TOUCH_POINT_PRESSED,
+ EWK_TOUCH_POINT_RELEASED,
+ EWK_TOUCH_POINT_MOVED,
+ EWK_TOUCH_POINT_CANCELLED
+} Ewk_Touch_Point_Type;
+
+typedef struct _Ewk_Touch_Point Ewk_Touch_Point;
+struct _Ewk_Touch_Point {
+ unsigned int id;
+ int x, y;
+ Ewk_Touch_Point_Type state;
+};
EAPI Evas_Object *ewk_frame_view_get(const Evas_Object *o);
EAPI void ewk_frame_theme_set(Evas_Object *o, const char *path);
@@ -200,6 +220,7 @@ EAPI Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object *o, const Evas_Event_Mo
EAPI Eina_Bool ewk_frame_feed_mouse_down(Evas_Object *o, const Evas_Event_Mouse_Down *ev);
EAPI Eina_Bool ewk_frame_feed_mouse_up(Evas_Object *o, const Evas_Event_Mouse_Up *ev);
EAPI Eina_Bool ewk_frame_feed_mouse_move(Evas_Object *o, const Evas_Event_Mouse_Move *ev);
+EAPI Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState);
EAPI Eina_Bool ewk_frame_feed_key_down(Evas_Object *o, const Evas_Event_Key_Down *ev);
EAPI Eina_Bool ewk_frame_feed_key_up(Evas_Object *o, const Evas_Event_Key_Up *ev);
diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h
index 7c81982..496efdb 100644
--- a/WebKit/efl/ewk/ewk_private.h
+++ b/WebKit/efl/ewk/ewk_private.h
@@ -111,12 +111,16 @@ int ewk_view_dpi_get();
Ewk_History *ewk_history_new(WebCore::BackForwardListImpl *history);
void ewk_history_free(Ewk_History *history);
+#if ENABLE(CONTEXT_MENUS)
+
Ewk_Context_Menu *ewk_context_menu_new(Evas_Object *view, WebCore::ContextMenuController *controller);
Eina_Bool ewk_context_menu_free(Ewk_Context_Menu *o);
void ewk_context_menu_item_append(Ewk_Context_Menu *o, WebCore::ContextMenuItem& core);
Ewk_Context_Menu *ewk_context_menu_custom_get(Ewk_Context_Menu *o);
void ewk_context_menu_show(Ewk_Context_Menu *o);
+#endif
+
Ewk_Window_Features *ewk_window_features_new_from_core(const WebCore::WindowFeatures* core);
Evas_Object *ewk_frame_add(Evas *e);
diff --git a/WebKit/efl/ewk/ewk_tiled_backing_store.c b/WebKit/efl/ewk/ewk_tiled_backing_store.c
index a998c5c..4fbd905 100644
--- a/WebKit/efl/ewk/ewk_tiled_backing_store.c
+++ b/WebKit/efl/ewk/ewk_tiled_backing_store.c
@@ -491,66 +491,15 @@ static Eina_Bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_
return EINA_TRUE;
}
-/**
- * Returns a rectangle whose coordinates indicate which tiles are
- * currently inside the viewport.
- *
- * Specifically, the returned rectangle's coordinates have the
- * following meaning:
- * - x: Column number for the top-level tile inside the viewport.
- * - y: Row number for the top-level tile inside the viewport.
- * - w: Number of tiles horizontally inside the viewport.
- * - h: Number of tiles vertically inside the viewport.
- */
-static Eina_Rectangle _ewk_tiled_backing_store_visible_tiles_rect(Ewk_Tiled_Backing_Store_Data *priv)
-{
- Eina_Rectangle r;
-
- const Evas_Coord ox = -priv->view.offset.cur.x;
- const Evas_Coord oy = -priv->view.offset.cur.y;
- const Evas_Coord tw = priv->view.tile.w;
- const Evas_Coord th = priv->view.tile.h;
-
- r.x = MAX(0, ox / tw);
- r.y = MAX(0, oy / th);
- r.w = MIN(priv->model.cur.cols,
- ceil((float)(priv->view.w + (ox % tw)) / tw));
- r.h = MIN(priv->model.cur.rows,
- ceil((float)(priv->view.h + (oy % th)) / th));
-
- DBG("Returning %d,%d+%dx%d", r.x, r.y, r.w, r.h);
-
- return r;
-}
-
-static Eina_Bool _ewk_tiled_backing_store_tile_is_inside_viewport(Ewk_Tiled_Backing_Store_Data *priv, int col, int row)
-{
- const Eina_Rectangle r = _ewk_tiled_backing_store_visible_tiles_rect(priv);
-
- return eina_rectangle_coords_inside(&r, col, row);
-}
-
-static Eina_Bool _ewk_tiled_backing_store_tile_is_adjacent_to_viewport(Ewk_Tiled_Backing_Store_Data *priv, int col, int row)
-{
- const Eina_Rectangle r = _ewk_tiled_backing_store_visible_tiles_rect(priv);
-
- if (row == (r.y - 1) || row == (r.y + r.h))
- return (col >= (r.x - 1) && col <= (r.x + r.w));
-
- if (col == (r.x - 1) || col == (r.x + r.w))
- return (row >= (r.y - 1) && row <= (r.y + r.h));
-
- return EINA_FALSE;
-}
-
static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tiled_Backing_Store_Item *it, long col, int row)
{
- int m_col = priv->model.base.col + col;
- int m_row = priv->model.base.row + row;
+ long m_col = priv->model.base.col + col;
+ long m_row = priv->model.base.row + row;
double last_used = ecore_loop_time_get();
if (m_col < 0 || m_row < 0
- || m_col >= priv->model.cur.cols || m_row >= priv->model.cur.rows) {
+ || (unsigned long)(m_col) >= priv->model.cur.cols
+ || (unsigned long)(m_row) >= priv->model.cur.rows) {
if (it->tile) {
_ewk_tiled_backing_store_tile_dissociate(priv, it, last_used);
@@ -562,8 +511,8 @@ static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Sto
const float zoom = priv->view.tile.zoom;
if (it->update.process) {
- if (it->update.row == m_row
- && it->update.col == m_col
+ if (it->update.row == (unsigned long)(m_row)
+ && it->update.col == (unsigned long)(m_col)
&& it->update.zoom == zoom)
return EINA_TRUE;
@@ -572,12 +521,15 @@ static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Sto
if (it->tile) {
Ewk_Tile *old = it->tile;
- if (old->row != m_row || old->col != m_col || old->zoom != zoom) {
+ if (old->row != (unsigned long)(m_row)
+ || old->col != (unsigned long)(m_col)
+ || old->zoom != zoom) {
_ewk_tiled_backing_store_tile_dissociate(priv, it,
last_used);
if (it->update.process)
_ewk_tiled_backing_store_item_request_del(priv, it);
- } else if (old->row == m_row && old->col == m_col
+ } else if (old->row == (unsigned long)(m_row)
+ && old->col == (unsigned long)(m_col)
&& old->zoom == zoom)
goto end;
}
@@ -1450,7 +1402,7 @@ static void _ewk_tiled_backing_store_smart_calculate(Evas_Object *o)
ewk_tile_matrix_freeze(priv->model.matrix);
if (!priv->render.suspend && priv->changed.model) {
- long cols, rows;
+ unsigned long cols, rows;
cols = priv->model.width / priv->view.tile.w + 1;
rows = priv->model.height / priv->view.tile.h + 1;
diff --git a/WebKit/efl/ewk/ewk_tiled_matrix.c b/WebKit/efl/ewk/ewk_tiled_matrix.c
index fccbfa1..130a48a 100644
--- a/WebKit/efl/ewk/ewk_tiled_matrix.c
+++ b/WebKit/efl/ewk/ewk_tiled_matrix.c
@@ -600,9 +600,9 @@ static Eina_Bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix *tm, const Eina_R
y = 0;
}
- if (y + h - 1 > rows * th)
+ if (y + h - 1 > (long)(rows * th))
h = rows * th - y;
- if (x + w - 1 > cols * tw)
+ if (x + w - 1 > (long)(cols * tw))
w = cols * tw - x;
return eina_tile_grid_slicer_setup(slicer, x, y, w, h, tw, th);
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 9eee9cb..b8633c5 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -864,7 +864,6 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
static void _ewk_view_smart_show(Evas_Object *o)
{
EWK_VIEW_SD_GET(o, sd);
- EWK_VIEW_PRIV_GET(sd, priv);
if (evas_object_clipees_get(sd->base.clipper))
evas_object_show(sd->base.clipper);
@@ -874,7 +873,6 @@ static void _ewk_view_smart_show(Evas_Object *o)
static void _ewk_view_smart_hide(Evas_Object *o)
{
EWK_VIEW_SD_GET(o, sd);
- EWK_VIEW_PRIV_GET(sd, priv);
evas_object_hide(sd->base.clipper);
evas_object_hide(sd->backing_store);
@@ -1616,6 +1614,8 @@ Eina_Bool ewk_view_select_word(Evas_Object* o)
return _ewk_view_editor_command(priv, "SelectWord");
}
+#if ENABLE(CONTEXT_MENUS)
+
/**
* Forwards a request of new Context Menu to WebCore.
*
@@ -1656,6 +1656,8 @@ Eina_Bool ewk_view_context_menu_forward_event(Evas_Object* o, const Evas_Event_M
return EINA_TRUE;
}
+#endif
+
/**
* Get current load progress estimate from 0.0 to 1.0.
*
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 6902949..e487f5e 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -155,7 +155,7 @@ struct _Ewk_View_Smart_Class {
* @see EWK_VIEW_SMART_CLASS_INIT_VERSION
* @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
*/
-#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/**
* Initializer to zero a whole Ewk_View_Smart_Class structure.
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 59f09af..1bf56f2 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,352 @@
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ * GNUmakefile.am:
+
+2011-01-07 Mario Sanchez Prada <msanchez@igalia.com>
+
+ Reviewed by Chris Fleizach.
+
+ GTK: AX: atk tests need to be updated after recent changes
+ https://bugs.webkit.org/show_bug.cgi?id=51932
+
+ Fix gtk_widget_get_accessible() in WebKitWebView to keep returning
+ the AtkObject of role ATK_ROLE_DOCUMENT_FRAME.
+
+ With the change to support WK2 accessibility, the root object of
+ the AX hierarchy is different from what GTK expects as the current
+ hirarchy right now includes a new accessible object as the parent
+ of the accessible web area (AXScrollView).
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_accessible): Return the first child of the
+ wrapper associated to the root accessible object in the document,
+ to keep everything in the GTK port working as it used to be.
+
+ Re-enable skipped ATK unit tests now they are passing again.
+
+ * tests/testatk.c:
+ (main): Re-enable skipped tests.
+ * tests/testatkroles.c:
+ (main): Ditto.
+
+2011-01-06 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ GTK: AX: atk tests need to be updated after recent changes
+ https://bugs.webkit.org/show_bug.cgi?id=51932
+
+ Skip ATK unit tests until we can look into what is causing these failures.
+
+ * tests/testatk.c:
+ (main): Skip all tests.
+ * tests/testatkroles.c:
+ (main): Ditto.
+
+2011-01-06 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Include a new header in the static headers list. This is necessary
+ so that "make install" installs the header.
+
+ * GNUmakefile.am: Include webkitglobals.h in the header list.
+
+2011-01-05 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Build fix for GTK+ 3.x. Remove the call to gtk_range_set_update_policy.
+ GTK+ 3.x has removed this method and the default in GTK+ 2.x is continuous,
+ so this call is unnecessary.
+
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ (FullscreenVideoController::createHud): Remove call to gtk_range_set_update_policy().
+
+2011-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Martin Robinson.
+
+ GTK: AX: DRT needs to use correct root object method.
+ https://bugs.webkit.org/show_bug.cgi?id=51911
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::getRootAccessibleElement):
+ (DumpRenderTreeSupportGtk::getFocusedAccessibleElement):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+
+2011-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WK2: Support Accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=51859
+
+ Use rootObject() method to get top of ax tree.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::getFocusedAccessibleElement):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_accessible):
+
+2011-01-03 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Darin Adler.
+
+ Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
+ https://bugs.webkit.org/show_bug.cgi?id=51846
+
+ Changed all references to PlatformRefPtr in GTK+ code to GRefPtr.
+
+2011-01-03 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Split webkitprivate.{cpp,h} in more manageable chunks
+ https://bugs.webkit.org/show_bug.cgi?id=50698
+
+ Final patch, removing webkitprivate.{cpp,h}, and adding a
+ webkitglobals module to hold non-object-specific functions and
+ definitions that do not make sense on their own.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::createWindow):
+ * WebCoreSupport/ContextMenuClientGtk.cpp:
+ * WebCoreSupport/DocumentLoaderGtk.cpp:
+ (WebKit::DocumentLoader::attachToFrame):
+ * WebCoreSupport/DragClientGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::ignoreWordInSpellDocument):
+ (WebKit::EditorClient::learnWord):
+ (WebKit::EditorClient::checkSpellingOfString):
+ (WebKit::EditorClient::getGuessesForWord):
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::createDocumentLoader):
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ * webkit/webkit.h:
+ * webkit/webkitapplicationcache.cpp:
+ (webkit_application_cache_set_maximum_size):
+ * webkit/webkitdownload.cpp:
+ (webkit_download_class_init):
+ * webkit/webkitgeolocationpolicydecision.cpp:
+ * webkit/webkitglobals.cpp: Added.
+ (webkit_get_default_session):
+ (webkit_set_cache_model):
+ (webkit_get_cache_model):
+ (webkit_get_web_plugin_database):
+ (currentToplevelCallback):
+ (closeIconDatabaseOnExit):
+ (webkitInit):
+ (WebKit::pasteboardHelperInstance):
+ * webkit/webkitglobals.h: Added.
+ * webkit/webkitglobalsprivate.h: Copied from WebKit/gtk/webkit/webkitwebsettingsprivate.h.
+ * webkit/webkithittestresult.cpp:
+ (webkit_hit_test_result_class_init):
+ * webkit/webkitnetworkrequest.cpp:
+ (webkit_network_request_class_init):
+ * webkit/webkitnetworkresponse.cpp:
+ (webkit_network_response_class_init):
+ * webkit/webkitprivate.cpp: Removed.
+ * webkit/webkitprivate.h: Removed.
+ * webkit/webkitsecurityorigin.cpp:
+ * webkit/webkitviewportattributes.cpp:
+ * webkit/webkitwebbackforwardlist.cpp:
+ (webkit_web_back_forward_list_class_init):
+ * webkit/webkitwebdatabase.cpp:
+ * webkit/webkitwebdatasource.cpp:
+ (webkit_web_data_source_class_init):
+ (webkit_web_data_source_new_with_request):
+ (WebKit::kitNew):
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_class_init):
+ * webkit/webkitwebframeprivate.h:
+ * webkit/webkitwebhistoryitem.cpp:
+ (webkit_web_history_item_class_init):
+ * webkit/webkitwebinspector.cpp:
+ * webkit/webkitwebnavigationaction.cpp:
+ * webkit/webkitwebplugin.cpp:
+ (webkit_web_plugin_class_init):
+ * webkit/webkitwebplugindatabase.cpp:
+ (webkit_web_plugin_database_class_init):
+ * webkit/webkitwebpluginprivate.h:
+ * webkit/webkitwebpolicydecision.cpp:
+ * webkit/webkitwebresource.cpp:
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkitWebViewGetEnchantDicts):
+ (WebKit::core):
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+ * webkit/webkitwebview.h:
+ * webkit/webkitwebwindowfeatures.cpp:
+ (webkit_web_window_features_class_init):
+ (WebKit::kitNew):
+
+2011-01-02 Xan Lopez <xlopez@igalia.com>
+
+ Fix GTK+ build.
+
+ * GNUmakefile.am: tests do actually include JSC.
+
+2011-01-02 Xan Lopez <xlopez@igalia.com>
+
+ Fix GTK+ build.
+
+ * GNUmakefile.am: remove individual -I$(srcdir)/Source when we'll
+ already get them from javascriptcore_cppflags, and add it for the
+ introspection build (which is not tested in the bots).
+
+2011-01-02 Adam Barth <abarth@webkit.org>
+
+ Speculative build fix for GTK. Add Source to the include paths.
+
+ * GNUmakefile.am:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * GNUmakefile.am:
+ * docs/GNUmakefile.am:
+ - Point to JavaScriptCore in its new location.
+
+2010-12-29 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix for GTK+.
+
+ * webkit/webkitwebinspector.cpp: Add missing DumpRenderTreeSupportGtk include.
+
+2010-12-29 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] GSettings warning is concealing real warnings on the build bots
+ https://bugs.webkit.org/show_bug.cgi?id=51691
+
+ Reviewed by Xan Lopez.
+
+ Do not print the GSettings warning message when running in DumpRenderTree.
+
+ * webkit/webkitwebinspector.cpp:
+ (inspectorGSettings): Do not print the GSettings warning if we are running
+ in DumpRenderTree. This should clean up the test results page a great deal.
+
+2010-12-28 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Closing a window during an onload event can trigger serious GLib warnings
+ https://bugs.webkit.org/show_bug.cgi?id=51686
+
+ Don't emit the close-web-view signal immediately during execution of closeWindowSoon.
+ The signal handler may choose to destroy the web view while handling that signal,
+ which may remove the last reference to the web view. FrameLoaderClient depends on the
+ view still existing though. Instead, let the caller finish executing and emit the signal
+ after a 0 length timeout. This matches the behavior on the Windows and Mac ports.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::ChromeClient): Initialize the timer id.
+ (WebKit::emitCloseWebViewSignalLater): Callback for the timer.
+ (WebKit::ChromeClient::closeWindowSoon): Do the actual signal invocation after
+ the caller finishes its tasks.
+ * WebCoreSupport/ChromeClientGtk.h: Add a new member for the timer id. We
+ can use this to prevent emitting the close-web-view signal twice.
+
+2010-12-28 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] Clean up usage of NULL in webkitwebframe.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=51685
+
+ Replace occurrences of NULL with 0, in webkitwebframe.cpp. Not all
+ uses of NULL have been changed, as certain GLib functions require
+ an explicit NULL as a sentinel.
+
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_get_data_source_from_core_loader):
+ (webkit_web_frame_class_init):
+ (webkit_web_frame_new):
+ (webkit_web_frame_get_title):
+ (webkit_web_frame_get_uri):
+ (webkit_web_frame_get_web_view):
+ (webkit_web_frame_get_name):
+ (webkit_web_frame_get_parent):
+ (webkit_web_frame_load_string):
+ (webkit_web_frame_load_alternate_string):
+ (webkit_web_frame_find_frame):
+ (webkit_web_frame_get_global_context):
+ (webkit_web_frame_get_data_source):
+ (webkit_web_frame_get_provisional_data_source):
+ (webkit_web_frame_print_full):
+ (webkit_web_frame_get_security_origin):
+ (webkit_web_frame_get_network_response):
+
+2010-12-27 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Ryosuke Niwa.
+
+ [GTK] EditorClient::generateEditorCommands queues up "null string" commands
+ https://bugs.webkit.org/show_bug.cgi?id=51569
+
+ Prevent adding "null string" editor commands by first checking whether or not
+ the command string is null in generateEditorCommands before appending it to the
+ list of pending editor command strings.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::generateEditorCommands): Check for the null string (no
+ command for this key combination) before appending a command string to the list of
+ pending editor commands.
+ (WebKit::EditorClient::executePendingEditorCommands): Add an ASSERT which detects
+ null command strings.
+
+2010-12-27 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ Remove unneeded includes from our headers.
+
+ * WebCoreSupport/PasteboardHelperGtk.h: ditto.
+ * webkit/webkitprivate.h: ditto.
+ * webkit/webkitsoupauthdialog.h: ditto.
+
+2010-12-21 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ [GTK] minimal build with --database fails
+ https://bugs.webkit.org/show_bug.cgi?id=51394
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init): Use cacheStorage() only if the
+ OFFLINE_WEB_APPLICATIONS feature is enabled.
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::didSaveToPageCache):
+ (WebKit::FrameLoaderClient::didRestoreFromPageCache):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+
2010-12-22 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
diff --git a/WebKit/gtk/GNUmakefile.am b/WebKit/gtk/GNUmakefile.am
index 256122c..59ac8ac 100644
--- a/WebKit/gtk/GNUmakefile.am
+++ b/WebKit/gtk/GNUmakefile.am
@@ -108,12 +108,13 @@ libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBA
$(OLE32_LIBS)
webkitgtk_static_h_api += \
- $(srcdir)/WebCore/platform/network/soup/cache/webkit/soup-cache.h \
+ $(srcdir)/Source/WebCore/platform/network/soup/cache/webkit/soup-cache.h \
$(srcdir)/WebKit/gtk/webkit/webkit.h \
$(srcdir)/WebKit/gtk/webkit/webkitdefines.h \
$(srcdir)/WebKit/gtk/webkit/webkitdownload.h \
$(srcdir)/WebKit/gtk/webkit/webkiterror.h \
$(srcdir)/WebKit/gtk/webkit/webkitgeolocationpolicydecision.h \
+ $(srcdir)/WebKit/gtk/webkit/webkitglobals.h \
$(srcdir)/WebKit/gtk/webkit/webkithittestresult.h \
$(srcdir)/WebKit/gtk/webkit/webkitnetworkrequest.h \
$(srcdir)/WebKit/gtk/webkit/webkitnetworkresponse.h \
@@ -154,6 +155,21 @@ webkitgtk_built_sources += \
BUILT_SOURCES += $(webkitgtk_built_sources)
webkitgtk_sources += \
+ Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp \
+ Source/WebCore/bindings/gobject/ConvertToUTF8String.h \
+ Source/WebCore/bindings/gobject/DOMObjectCache.cpp \
+ Source/WebCore/bindings/gobject/DOMObjectCache.h \
+ Source/WebCore/bindings/gobject/GObjectEventListener.cpp \
+ Source/WebCore/bindings/gobject/GObjectEventListener.h \
+ Source/WebCore/bindings/gobject/WebKitDOMBinding.cpp \
+ Source/WebCore/bindings/gobject/WebKitDOMBinding.h \
+ Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp \
+ Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h \
+ Source/WebCore/bindings/gobject/WebKitDOMEventTargetPrivate.h \
+ Source/WebCore/bindings/gobject/WebKitDOMObject.cpp \
+ Source/WebCore/bindings/gobject/WebKitDOMObject.h \
+ Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp \
+ Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h \
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp \
WebKit/gtk/WebCoreSupport/ChromeClientGtk.h \
WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp \
@@ -176,18 +192,20 @@ webkitgtk_sources += \
WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp \
WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
WebKit/gtk/webkit/webkitapplicationcache.cpp \
+ WebKit/gtk/webkit/webkitapplicationcacheprivate.h \
WebKit/gtk/webkit/webkitdownload.cpp \
WebKit/gtk/webkit/webkitdownloadprivate.h \
WebKit/gtk/webkit/webkiterror.cpp \
WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp \
+ WebKit/gtk/webkit/webkitglobals.cpp \
+ WebKit/gtk/webkit/webkitglobals.h \
+ WebKit/gtk/webkit/webkitglobalsprivate.h \
WebKit/gtk/webkit/webkithittestresult.cpp \
WebKit/gtk/webkit/webkithittestresultprivate.h \
WebKit/gtk/webkit/webkitnetworkrequest.cpp \
WebKit/gtk/webkit/webkitnetworkrequestprivate.h \
WebKit/gtk/webkit/webkitnetworkresponse.cpp \
WebKit/gtk/webkit/webkitnetworkresponseprivate.h \
- WebKit/gtk/webkit/webkitprivate.cpp \
- WebKit/gtk/webkit/webkitprivate.h \
WebKit/gtk/webkit/webkitsecurityorigin.cpp \
WebKit/gtk/webkit/webkitsecurityoriginprivate.h \
WebKit/gtk/webkit/webkitsoupauthdialog.c \
@@ -249,12 +267,13 @@ $(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITG
--output=$@ \
--add-include-path=$(WebKit) \
--add-include-path=$(top_builddir) \
- -I$(top_srcdir)/WebCore/platform/network/soup/cache \
+ -I$(srcdir)/Source \
+ -I$(top_srcdir)/Source/WebCore/platform/network/soup/cache \
-I$(WebKit) \
-I$(GENSOURCES) \
-I$(GENSOURCES_WEBKIT) \
-I$(top_builddir)/WebKit/gtk \
- -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
+ -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
-I$(top_srcdir) \
$(GENSOURCES_WEBKIT)/webkitenumtypes.h \
$(webkitgtk_h_api) \
@@ -366,15 +385,16 @@ dist_resources_DATA = \
noinst_PROGRAMS += $(TEST_PROGS)
webkit_tests_cflags = \
-fno-strict-aliasing \
- -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
+ -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \
-I$(WebCore)/platform/network/soup/cache \
-I$(WebKit) \
-I$(GENSOURCES) \
-I$(top_builddir)/WebKit/gtk \
- -I$(top_srcdir)/WebCore/bindings \
- -I$(top_srcdir)/WebCore/bindings/gobject \
+ -I$(top_srcdir)/Source/WebCore/bindings \
+ -I$(top_srcdir)/Source/WebCore/bindings/gobject \
$(global_cppflags) \
$(global_cflags) \
+ $(javascriptcore_cppflags) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBSOUP_CFLAGS)
@@ -529,10 +549,10 @@ Programs_unittests_testkeyevents_LDADD = $(webkit_tests_ldadd)
Programs_unittests_testkeyevents_LDFLAGS = $(webkit_tests_ldflags)
Programs_unittests_testcopyandpaste_SOURCES = WebKit/gtk/tests/testcopyandpaste.c \
- WebCore/platform/gtk/GtkVersioning.c
+ Source/WebCore/platform/gtk/GtkVersioning.c
Programs_unittests_testcopyandpaste_CFLAGS = $(webkit_tests_cflags) \
- -I$(srcdir)/WebCore/platform/gtk \
- -I$(srcdir)/WebCore
+ -I$(srcdir)/Source/WebCore/platform/gtk \
+ -I$(srcdir)/Source/WebCore
Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd)
Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags)
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 12f4f14..7f39d37 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -48,13 +48,14 @@
#include "SecurityOrigin.h"
#include "WindowFeatures.h"
#include "webkitgeolocationpolicydecision.h"
+#include "webkitgeolocationpolicydecisionprivate.h"
#include "webkitnetworkrequest.h"
-#include "webkitprivate.h"
#include "webkitsecurityoriginprivate.h"
#include "webkitviewportattributesprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
+#include "webkitwebwindowfeaturesprivate.h"
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
@@ -70,6 +71,7 @@ namespace WebKit {
ChromeClient::ChromeClient(WebKitWebView* webView)
: m_webView(webView)
+ , m_closeSoonTimer(0)
{
ASSERT(m_webView);
}
@@ -155,9 +157,8 @@ Page* ChromeClient::createWindow(Frame* frame, const FrameLoadRequest& frameLoad
if (!webView)
return 0;
- WebKitWebWindowFeatures* webWindowFeatures = webkit_web_window_features_new_from_core_features(coreFeatures);
- g_object_set(webView, "window-features", webWindowFeatures, NULL);
- g_object_unref(webWindowFeatures);
+ GRefPtr<WebKitWebWindowFeatures> webWindowFeatures(adoptGRef(kitNew(coreFeatures)));
+ g_object_set(webView, "window-features", webWindowFeatures.get(), NULL);
if (!frameLoadRequest.isEmpty())
webkit_web_view_open(webView, frameLoadRequest.resourceRequest().url().string().utf8().data());
@@ -249,19 +250,37 @@ void ChromeClient::setResizable(bool)
// Ignored for now
}
+static gboolean emitCloseWebViewSignalLater(WebKitWebView* view)
+{
+ gboolean isHandled;
+ g_signal_emit_by_name(view, "close-web-view", &isHandled);
+ return FALSE;
+}
+
void ChromeClient::closeWindowSoon()
{
// We may not have a WebView as create-web-view can return NULL.
if (!m_webView)
return;
+ if (m_closeSoonTimer) // Don't call close-web-view more than once.
+ return;
- webkit_web_view_stop_loading(m_webView);
+ // We need to remove the parent WebView from WebViewSets here, before it actually
+ // closes, to make sure that JavaScript code that executes before it closes
+ // can't find it. Otherwise, window.open will select a closed WebView instead of
+ // opening a new one <rdar://problem/3572585>.
+ m_webView->priv->corePage->setGroupName("");
- gboolean isHandled = false;
- g_signal_emit_by_name(m_webView, "close-web-view", &isHandled);
+ // We also need to stop the load to prevent further parsing or JavaScript execution
+ // after the window has torn down <rdar://problem/4161660>.
+ webkit_web_view_stop_loading(m_webView);
- if (isHandled)
- return;
+ // Clients commonly destroy the web view during the close-web-view signal, but our caller
+ // may need to send more signals to the web view. For instance, if this happened in the
+ // onload handler, it will need to call FrameLoaderClient::dispatchDidHandleOnloadEvents.
+ // Instead of firing the close-web-view signal now, fire it after the caller finishes.
+ // This seems to match the Mac/Windows port behavior.
+ m_closeSoonTimer = g_timeout_add(0, reinterpret_cast<GSourceFunc>(emitCloseWebViewSignalLater), m_webView);
}
bool ChromeClient::canTakeFocus(FocusDirection)
@@ -638,7 +657,7 @@ void ChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocatio
WebKitWebFrame* webFrame = kit(frame);
WebKitWebView* webView = getViewFromFrame(webFrame);
- PlatformRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptPlatformRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
+ GRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptGRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
gboolean isHandled = FALSE;
g_signal_emit_by_name(webView, "geolocation-policy-decision-requested", webFrame, policyDecision.get(), &isHandled);
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index e9f1c83..d607c54 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -154,6 +154,7 @@ namespace WebKit {
private:
WebKitWebView* m_webView;
WebCore::KURL m_hoveredLinkURL;
+ unsigned int m_closeSoonTimer;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
index 137f9ab..d9c59d0 100644
--- a/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
@@ -26,7 +26,6 @@
#include "KURL.h"
#include "NotImplemented.h"
#include "Page.h"
-#include "webkitprivate.h"
#include "webkitwebviewprivate.h"
#include <glib-object.h>
#include <glib/gi18n-lib.h>
diff --git a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
index 2b355cb..6031b62 100644
--- a/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DocumentLoaderGtk.cpp
@@ -30,8 +30,9 @@
#include "config.h"
#include "DocumentLoaderGtk.h"
-#include "webkitprivate.h"
+#include "GRefPtr.h"
#include "webkitwebdatasource.h"
+#include "webkitwebdatasourceprivate.h"
using namespace WebCore;
@@ -68,9 +69,8 @@ void DocumentLoader::attachToFrame()
// 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);
+ GRefPtr<WebKitWebDataSource> dataSource(adoptGRef(kitNew(this)));
+ setDataSource(dataSource.get());
}
void DocumentLoader::detachFromFrame()
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index 5f391ec..c92c083 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -32,7 +32,6 @@
#include "NotImplemented.h"
#include "PasteboardHelper.h"
#include "RenderObject.h"
-#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebviewprivate.h"
#include "webkitwebview.h"
@@ -104,7 +103,7 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin,
WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
RefPtr<DataObjectGtk> dataObject = clipboardGtk->dataObject();
- PlatformRefPtr<GtkTargetList> targetList(clipboardGtk->helper()->targetListForDataObject(dataObject.get()));
+ GRefPtr<GtkTargetList> targetList(clipboardGtk->helper()->targetListForDataObject(dataObject.get()));
GOwnPtr<GdkEvent> currentEvent(gtk_get_current_event());
GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get());
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.h b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
index 086ec69..9c6d948 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
@@ -59,7 +59,7 @@ namespace WebKit {
private:
WebKitWebView* m_webView;
WebCore::IntPoint m_startPos;
- PlatformRefPtr<GtkWidget> m_dragIconWindow;
+ GRefPtr<GtkWidget> m_dragIconWindow;
RefPtr<cairo_surface_t> m_dragImage;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index a751c77..dabe4b5 100644
--- a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -21,15 +21,16 @@
#include "config.h"
#include "DumpRenderTreeSupportGtk.h"
-#include "AccessibilityObjectWrapperAtk.h"
-#include "AnimationController.h"
#include "APICast.h"
#include "AXObjectCache.h"
+#include "AccessibilityObjectWrapperAtk.h"
+#include "AnimationController.h"
+#include "DOMWrapperWorld.h"
#include "Document.h"
#include "FocusController.h"
#include "FrameLoaderClientGtk.h"
-#include "FrameView.h"
#include "FrameTree.h"
+#include "FrameView.h"
#include "GCController.h"
#include "GraphicsContext.h"
#include "JSDOMWindow.h"
@@ -43,21 +44,20 @@
#include "PlatformString.h"
#include "PrintContext.h"
#include "RenderListItem.h"
-#include "RenderView.h"
#include "RenderTreeAsText.h"
+#include "RenderView.h"
#include "SecurityOrigin.h"
-#if ENABLE(SVG)
-#include "SVGSMILElement.h"
-#endif
#include "WorkerThread.h"
-#include "webkitprivate.h"
+#include "webkitwebframe.h"
#include "webkitwebframeprivate.h"
-#include "webkitwebviewprivate.h"
#include "webkitwebview.h"
-#include "webkitwebframe.h"
-#include "DOMWrapperWorld.h"
+#include "webkitwebviewprivate.h"
#include <JavaScriptCore/APICast.h>
+#if ENABLE(SVG)
+#include "SVGSMILElement.h"
+#endif
+
using namespace JSC;
using namespace WebCore;
using namespace WebKit;
@@ -413,7 +413,7 @@ void DumpRenderTreeSupportGtk::clearMainFrameName(WebKitWebFrame* frame)
core(frame)->tree()->clearName();
}
-AtkObject* DumpRenderTreeSupportGtk::getFocusedAccessibleElement(WebKitWebFrame* frame)
+AtkObject* DumpRenderTreeSupportGtk::getRootAccessibleElement(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
@@ -425,11 +425,20 @@ AtkObject* DumpRenderTreeSupportGtk::getFocusedAccessibleElement(WebKitWebFrame*
if (!priv->coreFrame || !priv->coreFrame->document())
return 0;
- RenderView* root = toRenderView(priv->coreFrame->document()->renderer());
- if (!root)
+ AtkObject* wrapper = priv->coreFrame->document()->axObjectCache()->rootObject()->wrapper();
+ if (!wrapper)
return 0;
- AtkObject* wrapper = priv->coreFrame->document()->axObjectCache()->getOrCreate(root)->wrapper();
+ return wrapper;
+#else
+ return 0;
+#endif
+}
+
+AtkObject* DumpRenderTreeSupportGtk::getFocusedAccessibleElement(WebKitWebFrame* frame)
+{
+#if HAVE(ACCESSIBILITY)
+ AtkObject* wrapper = getRootAccessibleElement(frame);
if (!wrapper)
return 0;
diff --git a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 61764ab..663f13a 100644
--- a/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -64,6 +64,7 @@ public:
static void resumeAnimations(WebKitWebFrame*);
static void clearMainFrameName(WebKitWebFrame*);
static AtkObject* getFocusedAccessibleElement(WebKitWebFrame*);
+ static AtkObject* getRootAccessibleElement(WebKitWebFrame*);
static void layoutFrame(WebKitWebFrame*);
// WebKitWebView
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 0522f87..ee9bf9a 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -44,8 +44,8 @@
#include "WebKitDOMNodePrivate.h"
#include "WebKitDOMRangePrivate.h"
#include "WindowsKeyboardCodes.h"
+#include "webkitglobalsprivate.h"
#include "webkitmarshal.h"
-#include "webkitprivate.h"
#include "webkitwebsettingsprivate.h"
#include "webkitwebviewprivate.h"
#include <wtf/text/CString.h>
@@ -270,7 +270,7 @@ void EditorClient::setInputMethodState(bool active)
bool EditorClient::shouldDeleteRange(Range* range)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-delete-range", kitRange.get(), &accept);
return accept;
}
@@ -278,7 +278,7 @@ bool EditorClient::shouldDeleteRange(Range* range)
bool EditorClient::shouldShowDeleteInterface(HTMLElement* element)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMHTMLElement> kitElement(adoptPlatformRef(kit(element)));
+ GRefPtr<WebKitDOMHTMLElement> kitElement(adoptGRef(kit(element)));
g_signal_emit_by_name(m_webView, "should-show-delete-interface-for-element", kitElement.get(), &accept);
return accept;
}
@@ -310,7 +310,7 @@ bool EditorClient::shouldBeginEditing(WebCore::Range* range)
clearPendingComposition();
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-begin-editing", kitRange.get(), &accept);
return accept;
}
@@ -320,7 +320,7 @@ bool EditorClient::shouldEndEditing(WebCore::Range* range)
clearPendingComposition();
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-end-editing", kitRange.get(), &accept);
return accept;
}
@@ -342,7 +342,7 @@ static WebKitInsertAction kit(EditorInsertAction action)
bool EditorClient::shouldInsertText(const String& string, Range* range, EditorInsertAction action)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-insert-text", string.utf8().data(), kitRange.get(), kit(action), &accept);
return accept;
}
@@ -362,8 +362,8 @@ static WebKitSelectionAffinity kit(EAffinity affinity)
bool EditorClient::shouldChangeSelectedRange(Range* fromRange, Range* toRange, EAffinity affinity, bool stillSelecting)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitFromRange(fromRange ? adoptPlatformRef(kit(fromRange)) : 0);
- PlatformRefPtr<WebKitDOMRange> kitToRange(toRange ? adoptPlatformRef(kit(toRange)) : 0);
+ GRefPtr<WebKitDOMRange> kitFromRange(fromRange ? adoptGRef(kit(fromRange)) : 0);
+ GRefPtr<WebKitDOMRange> kitToRange(toRange ? adoptGRef(kit(toRange)) : 0);
g_signal_emit_by_name(m_webView, "should-change-selected-range", kitFromRange.get(), kitToRange.get(),
kit(affinity), stillSelecting, &accept);
return accept;
@@ -372,8 +372,8 @@ bool EditorClient::shouldChangeSelectedRange(Range* fromRange, Range* toRange, E
bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration* declaration, WebCore::Range* range)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMCSSStyleDeclaration> kitDeclaration(kit(declaration));
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
+ GRefPtr<WebKitDOMCSSStyleDeclaration> kitDeclaration(kit(declaration));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-apply-style", kitDeclaration.get(), kitRange.get(), &accept);
return accept;
}
@@ -543,8 +543,8 @@ void EditorClient::redo()
bool EditorClient::shouldInsertNode(Node* node, Range* range, EditorInsertAction action)
{
gboolean accept = TRUE;
- PlatformRefPtr<WebKitDOMRange> kitRange(adoptPlatformRef(kit(range)));
- PlatformRefPtr<WebKitDOMNode> kitNode(adoptPlatformRef(kit(node)));
+ GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
+ GRefPtr<WebKitDOMNode> kitNode(adoptGRef(kit(node)));
g_signal_emit_by_name(m_webView, "should-insert-node", kitNode.get(), kitRange.get(), kit(action), &accept);
return accept;
}
@@ -652,24 +652,23 @@ void EditorClient::generateEditorCommands(const KeyboardEvent* event)
if (event->ctrlKey())
modifiers |= CtrlKey;
-
- if (event->type() == eventNames().keydownEvent) {
- int mapKey = modifiers << 16 | event->keyCode();
- if (mapKey)
- m_pendingEditorCommands.append(keyDownCommandsMap.get(mapKey));
+ // For keypress events, we want charCode(), but keyCode() does that.
+ int mapKey = modifiers << 16 | event->keyCode();
+ if (!mapKey)
return;
- }
-
- int mapKey = modifiers << 16 | event->charCode();
- if (mapKey)
- m_pendingEditorCommands.append(keyPressCommandsMap.get(mapKey));
+ HashMap<int, const char*>* commandMap = event->type() == eventNames().keydownEvent ?
+ &keyDownCommandsMap : &keyPressCommandsMap;
+ if (const char* commandString = commandMap->get(mapKey))
+ m_pendingEditorCommands.append(commandString);
}
bool EditorClient::executePendingEditorCommands(Frame* frame, bool allowTextInsertion)
{
Vector<Editor::Command> commands;
for (size_t i = 0; i < m_pendingEditorCommands.size(); i++) {
- Editor::Command command = frame->editor()->command(m_pendingEditorCommands.at(i));
+ const char* commandString = m_pendingEditorCommands.at(i);
+ ASSERT(commandString);
+ Editor::Command command = frame->editor()->command(commandString);
if (command.isTextInsertion() && !allowTextInsertion)
return false;
@@ -890,7 +889,7 @@ void EditorClient::textDidChangeInTextArea(Element*)
void EditorClient::ignoreWordInSpellDocument(const String& text)
{
- GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView);
+ GSList* dicts = webkitWebViewGetEnchantDicts(m_webView);
for (; dicts; dicts = dicts->next) {
EnchantDict* dict = static_cast<EnchantDict*>(dicts->data);
@@ -901,7 +900,7 @@ void EditorClient::ignoreWordInSpellDocument(const String& text)
void EditorClient::learnWord(const String& text)
{
- GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView);
+ GSList* dicts = webkitWebViewGetEnchantDicts(m_webView);
for (; dicts; dicts = dicts->next) {
EnchantDict* dict = static_cast<EnchantDict*>(dicts->data);
@@ -912,7 +911,7 @@ void EditorClient::learnWord(const String& text)
void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
{
- GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView);
+ GSList* dicts = webkitWebViewGetEnchantDicts(m_webView);
if (!dicts)
return;
@@ -1005,7 +1004,7 @@ bool EditorClient::spellingUIIsShowing()
void EditorClient::getGuessesForWord(const String& word, const String& context, WTF::Vector<String>& guesses)
{
- GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView);
+ GSList* dicts = webkitWebViewGetEnchantDicts(m_webView);
guesses.clear();
for (; dicts; dicts = dicts->next) {
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index f2db1d9..214dbd6 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -140,7 +140,7 @@ namespace WebKit {
bool m_treatContextCommitAsKeyEvent;
GOwnPtr<gchar> m_pendingComposition;
Vector<const char*> m_pendingEditorCommands;
- PlatformRefPtr<GtkWidget> m_nativeWidget;
+ GRefPtr<GtkWidget> m_nativeWidget;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 9bac2d0..13cbc59 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -58,14 +58,17 @@
#include "ResourceHandle.h"
#include "ResourceRequest.h"
#include "ScriptController.h"
+#include "Settings.h"
#include "webkiterror.h"
+#include "webkitglobals.h"
+#include "webkitglobalsprivate.h"
#include "webkitnetworkrequest.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponse.h"
#include "webkitnetworkresponseprivate.h"
-#include "webkitprivate.h"
#include "webkitviewportattributes.h"
#include "webkitviewportattributesprivate.h"
+#include "webkitwebdatasourceprivate.h"
#include "webkitwebframe.h"
#include "webkitwebframeprivate.h"
#include "webkitwebnavigationaction.h"
@@ -74,6 +77,7 @@
#include "webkitwebpolicydecisionprivate.h"
#include "webkitwebresource.h"
#include "webkitwebresourceprivate.h"
+#include "webkitwebsettingsprivate.h"
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include <JavaScriptCore/APICast.h>
@@ -240,9 +244,8 @@ WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClient::createDocumentLoader
{
RefPtr<WebKit::DocumentLoader> loader = WebKit::DocumentLoader::create(request, substituteData);
- WebKitWebDataSource* webDataSource = webkit_web_data_source_new_with_loader(loader.get());
- loader->setDataSource(webDataSource);
- g_object_unref(webDataSource);
+ GRefPtr<WebKitWebDataSource> webDataSource(adoptGRef(kitNew(loader.get())));
+ loader->setDataSource(webDataSource.get());
return loader.release();
}
@@ -309,19 +312,19 @@ static char* toString(unsigned long identifier)
void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
- PlatformRefPtr<WebKitNetworkResponse> networkResponse(0);
+ GRefPtr<WebKitNetworkResponse> networkResponse(0);
// We are adding one more resource to the load, or maybe we are
// just redirecting a load.
if (redirectResponse.isNull())
static_cast<WebKit::DocumentLoader*>(loader)->increaseLoadCount(identifier);
else
- networkResponse = adoptPlatformRef(kitNew(redirectResponse));
+ networkResponse = adoptGRef(kitNew(redirectResponse));
WebKitWebView* webView = getViewFromFrame(m_frame);
GOwnPtr<gchar> identifierString(toString(identifier));
WebKitWebResource* webResource = webkit_web_view_get_resource(webView, identifierString.get());
- PlatformRefPtr<WebKitNetworkRequest> networkRequest(adoptPlatformRef(kitNew(request)));
+ GRefPtr<WebKitNetworkRequest> networkRequest(adoptGRef(kitNew(request)));
if (!redirectResponse.isNull()) {
// This is a redirect, so we need to update the WebResource's knowledge
@@ -415,7 +418,7 @@ void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction poli
}
WebKitWebView* page = getViewFromFrame(m_frame);
- PlatformRefPtr<WebKitNetworkRequest> request(adoptPlatformRef(kitNew(resourceRequest)));
+ GRefPtr<WebKitNetworkRequest> request(adoptGRef(kitNew(resourceRequest)));
WebKitWebPolicyDecision* policyDecision = webkit_web_policy_decision_new(m_frame, policyFunction);
if (m_policyDecision)
@@ -428,7 +431,7 @@ void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction poli
if (isHandled)
return;
- PlatformRefPtr<WebKitNetworkResponse> networkResponse(adoptPlatformRef(webkit_web_frame_get_network_response(m_frame)));
+ GRefPtr<WebKitNetworkResponse> networkResponse(adoptGRef(webkit_web_frame_get_network_response(m_frame)));
if (networkResponse) {
ResourceResponse response = core(networkResponse.get());
if (response.isAttachment()) {
@@ -495,8 +498,8 @@ void FrameLoaderClient::dispatchDecidePolicyForNewWindowAction(FramePolicyFuncti
m_policyDecision = policyDecision;
WebKitWebView* webView = getViewFromFrame(m_frame);
- PlatformRefPtr<WebKitNetworkRequest> request(adoptPlatformRef(webkit_network_request_new(resourceRequest.url().string().utf8().data())));
- PlatformRefPtr<WebKitWebNavigationAction> navigationAction(adoptPlatformRef(getNavigationAction(action, frameName.utf8().data())));
+ GRefPtr<WebKitNetworkRequest> request(adoptGRef(webkit_network_request_new(resourceRequest.url().string().utf8().data())));
+ GRefPtr<WebKitWebNavigationAction> navigationAction(adoptGRef(getNavigationAction(action, frameName.utf8().data())));
gboolean isHandled = false;
g_signal_emit_by_name(webView, "new-window-policy-decision-requested", m_frame, request.get(), navigationAction.get(), policyDecision, &isHandled);
@@ -519,7 +522,7 @@ void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunct
}
WebKitWebView* webView = getViewFromFrame(m_frame);
- PlatformRefPtr<WebKitNetworkRequest> request(adoptPlatformRef(kitNew(resourceRequest)));
+ GRefPtr<WebKitNetworkRequest> request(adoptGRef(kitNew(resourceRequest)));
WebKitNavigationResponse response;
/*
* We still support the deprecated navigation-requested signal, if the
@@ -540,7 +543,7 @@ void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunct
g_object_unref(m_policyDecision);
m_policyDecision = policyDecision;
- PlatformRefPtr<WebKitWebNavigationAction> navigationAction(adoptPlatformRef(getNavigationAction(action, 0)));
+ GRefPtr<WebKitWebNavigationAction> navigationAction(adoptGRef(getNavigationAction(action, 0)));
gboolean isHandled = false;
g_signal_emit_by_name(webView, "navigation-policy-decision-requested", m_frame, request.get(), navigationAction.get(), policyDecision, &isHandled);
@@ -556,7 +559,7 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT
CString mimeTypeString = mimeType.utf8();
ASSERT(paramNames.size() == paramValues.size());
- PlatformRefPtr<GHashTable> hash = adoptPlatformRef(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()),
@@ -1168,7 +1171,7 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
void FrameLoaderClient::download(ResourceHandle* handle, const ResourceRequest& request, const ResourceRequest&, const ResourceResponse& response)
{
- PlatformRefPtr<WebKitNetworkRequest> networkRequest(adoptPlatformRef(kitNew(request)));
+ GRefPtr<WebKitNetworkRequest> networkRequest(adoptGRef(kitNew(request)));
WebKitWebView* view = getViewFromFrame(m_frame);
webkit_web_view_request_download(view, networkRequest.get(), response, handle);
@@ -1256,7 +1259,7 @@ void FrameLoaderClient::setMainDocumentError(WebCore::DocumentLoader*, const Res
void FrameLoaderClient::startDownload(const ResourceRequest& request)
{
- PlatformRefPtr<WebKitNetworkRequest> networkRequest(adoptPlatformRef(kitNew(request)));
+ GRefPtr<WebKitNetworkRequest> networkRequest(adoptGRef(kitNew(request)));
WebKitWebView* view = getViewFromFrame(m_frame);
webkit_web_view_request_download(view, networkRequest.get());
@@ -1297,7 +1300,7 @@ static void postCommitFrameViewSetup(WebKitWebFrame *frame, FrameView *view, boo
g_object_notify(G_OBJECT(containingWindow->priv->viewportAttributes.get()), "valid");
if (priv->currentMenu) {
- PlatformRefPtr<GtkMenu> menu(priv->currentMenu);
+ GRefPtr<GtkMenu> menu(priv->currentMenu);
priv->currentMenu.clear();
gtk_menu_popdown(menu.get());
}
@@ -1341,6 +1344,14 @@ void FrameLoaderClient::transitionToCommittedForNewPage()
postCommitFrameViewSetup(m_frame, frame->view(), true);
}
+void FrameLoaderClient::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClient::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClient::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index ffb3c56..d8d3684 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -181,6 +181,9 @@ namespace WebKit {
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
index 158a3b8..c042b5e 100644
--- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
@@ -545,7 +545,6 @@ void FullscreenVideoController::createHud()
m_timeHScale = gtk_hscale_new(adjustment);
gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);
gtk_range_set_show_fill_level(GTK_RANGE(m_timeHScale), TRUE);
- gtk_range_set_update_policy(GTK_RANGE(m_timeHScale), GTK_UPDATE_CONTINUOUS);
g_signal_connect(m_timeHScale, "button-press-event", G_CALLBACK(timeScaleButtonPressed), this);
g_signal_connect(m_timeHScale, "button-release-event", G_CALLBACK(timeScaleButtonReleased), this);
m_hscaleUpdateId = g_signal_connect(m_timeHScale, "value-changed", G_CALLBACK(timeScaleValueChanged), this);
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index c269078..31af243 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -24,7 +24,6 @@
#include "InspectorController.h"
#include "NotImplemented.h"
#include "PlatformString.h"
-#include "webkitprivate.h"
#include "webkitversion.h"
#include "webkitwebinspector.h"
#include "webkitwebinspectorprivate.h"
@@ -180,7 +179,7 @@ void InspectorClient::populateSetting(const String& key, String* value)
if (!settings)
return;
- PlatformRefPtr<GVariant> variant = adoptPlatformRef(g_settings_get_value(settings, toGSettingName(key).utf8().data()));
+ GRefPtr<GVariant> variant = adoptGRef(g_settings_get_value(settings, toGSettingName(key).utf8().data()));
if (key == "resourceTrackingEnabled" || key == "xhrMonitor"
|| key == "debuggerEnabled" || key == "profilerEnabled")
@@ -198,15 +197,15 @@ void InspectorClient::storeSetting(const String& key, const String& value)
if (!settings)
return;
- PlatformRefPtr<GVariant> variant(0);
+ GRefPtr<GVariant> variant(0);
// Set the key with the appropriate type, and also avoid setting
// unknown keys to avoid aborting the execution.
if (key == "resourceTrackingEnabled" || key == "xhrMonitor"
|| key == "debuggerEnabled" || key == "profilerEnabled")
- variant = adoptPlatformRef(variantFromTruthString(value));
+ variant = adoptGRef(variantFromTruthString(value));
else if (key == "frontendSettings")
- variant = adoptPlatformRef(g_variant_new_string(value.utf8().data()));
+ variant = adoptGRef(g_variant_new_string(value.utf8().data()));
if (!variant)
return;
diff --git a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
index 64fcdba..d00333c 100644
--- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
+++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h
@@ -32,8 +32,6 @@
#include "Frame.h"
#include "PasteboardHelper.h"
-#include <gtk/gtk.h>
-
using namespace WebCore;
namespace WebKit {
diff --git a/WebKit/gtk/docs/GNUmakefile.am b/WebKit/gtk/docs/GNUmakefile.am
index d38a7aa..565f535 100644
--- a/WebKit/gtk/docs/GNUmakefile.am
+++ b/WebKit/gtk/docs/GNUmakefile.am
@@ -73,10 +73,10 @@ INCLUDES= \
$(global_cppflags) \
$(global_cflags) \
-I$(top_srcdir) \
- -I$(top_srcdir)/JavaScriptCore \
- -I$(top_srcdir)/JavaScriptCore/ForwardingHeaders \
- -I$(top_srcdir)/JavaScriptCore/parser \
- -I$(top_srcdir)/JavaScriptCore/wtf \
+ -I$(top_srcdir)/Source/JavaScriptCore \
+ -I$(top_srcdir)/Source/JavaScriptCore/ForwardingHeaders \
+ -I$(top_srcdir)/Source/JavaScriptCore/parser \
+ -I$(top_srcdir)/Source/JavaScriptCore/wtf \
-I$(top_builddir)/DerivedSources \
-I$(top_srcdir)/WebCore/platform/network/soup/cache \
$(GLOBALDEPS_CFLAGS) \
diff --git a/WebKit/gtk/webkit/webkit.h b/WebKit/gtk/webkit/webkit.h
index c0d0e31..d93fae1 100644
--- a/WebKit/gtk/webkit/webkit.h
+++ b/WebKit/gtk/webkit/webkit.h
@@ -26,6 +26,7 @@
#include <webkit/webkitdom.h>
#include <webkit/webkitdownload.h>
#include <webkit/webkitgeolocationpolicydecision.h>
+#include <webkit/webkitglobals.h>
#include <webkit/webkithittestresult.h>
#include <webkit/webkitnetworkrequest.h>
#include <webkit/webkitnetworkresponse.h>
diff --git a/WebKit/gtk/webkit/webkitapplicationcache.cpp b/WebKit/gtk/webkit/webkitapplicationcache.cpp
index e967d34..87f3ab5 100644
--- a/WebKit/gtk/webkit/webkitapplicationcache.cpp
+++ b/WebKit/gtk/webkit/webkitapplicationcache.cpp
@@ -18,15 +18,14 @@
*/
#include "config.h"
-#include "webkitprivate.h"
-
-#include <wtf/UnusedParam.h>
#include "ApplicationCacheStorage.h"
+#include "webkitapplicationcacheprivate.h"
+#include <wtf/UnusedParam.h>
void webkit_application_cache_set_maximum_size(unsigned long long size)
{
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
WebCore::cacheStorage().empty();
WebCore::cacheStorage().vacuumDatabaseFile();
WebCore::cacheStorage().setMaximumSize(size);
diff --git a/WebKit/gtk/webkit/webkitapplicationcacheprivate.h b/WebKit/gtk/webkit/webkitapplicationcacheprivate.h
new file mode 100644
index 0000000..cbf3759
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitapplicationcacheprivate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitapplicationcacheprivate_h
+#define webkitapplicationcacheprivate_h
+
+#include "webkitdefines.h"
+#include <glib.h>
+
+extern "C" {
+
+WEBKIT_API void webkit_application_cache_set_maximum_size(unsigned long long size);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index 6be591c..60b8e6d 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -19,8 +19,8 @@
*/
#include "config.h"
+#include "webkitdownload.h"
-#include <glib/gi18n-lib.h>
#include "GRefPtr.h"
#include "Noncopyable.h"
#include "NotImplemented.h"
@@ -28,17 +28,17 @@
#include "ResourceHandleInternal.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
-#include "webkitdownload.h"
#include "webkitdownloadprivate.h"
#include "webkitenumtypes.h"
+#include "webkitglobals.h"
+#include "webkitglobalsprivate.h"
#include "webkitmarshal.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponse.h"
#include "webkitnetworkresponseprivate.h"
-#include "webkitprivate.h"
-#include <wtf/text/CString.h>
-
+#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
+#include <wtf/text/CString.h>
#ifdef ERROR
#undef ERROR
@@ -230,7 +230,7 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass)
objectClass->get_property = webkit_download_get_property;
objectClass->set_property = webkit_download_set_property;
- webkit_init();
+ webkitInit();
/**
* WebKitDownload::error:
@@ -907,7 +907,7 @@ static void webkit_download_error(WebKitDownload* download, const ResourceError&
webkit_download_close_stream(download);
WebKitDownloadPrivate* priv = download->priv;
- PlatformRefPtr<WebKitDownload> protect(download);
+ GRefPtr<WebKitDownload> protect(download);
g_timer_stop(priv->timer);
webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_ERROR);
diff --git a/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
index cb023d6..2523c9b 100644
--- a/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
+++ b/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp
@@ -20,10 +20,9 @@
#include "config.h"
#include "webkitgeolocationpolicydecision.h"
-#include "webkitprivate.h"
#include "Geolocation.h"
+#include "webkitgeolocationpolicydecisionprivate.h"
-using namespace WebKit;
using namespace WebCore;
/**
diff --git a/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h b/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h
new file mode 100644
index 0000000..d250044
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitgeolocationpolicydecisionprivate_h
+#define webkitgeolocationpolicydecisionprivate_h
+
+#include "webkitgeolocationpolicydecision.h"
+
+extern "C" {
+
+WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitglobals.cpp
index 4652031..6b57533 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitglobals.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2007 Holger Hans Peter Freyther
- * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2008, 2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,63 +19,170 @@
*/
#include "config.h"
-#include "webkitprivate.h"
+#include "webkitglobals.h"
#include "ApplicationCacheStorage.h"
#include "Chrome.h"
-#include "ChromeClientGtk.h"
-#include "Element.h"
-#include "Frame.h"
-#include "FrameLoader.h"
-#include "FrameLoaderClientGtk.h"
#include "FrameNetworkingContextGtk.h"
-#include "GtkVersioning.h"
-#include "HTMLMediaElement.h"
-#include "HTMLNames.h"
-#include "HitTestResult.h"
+#include "GOwnPtr.h"
#include "IconDatabase.h"
#include "Logging.h"
+#include "MemoryCache.h"
+#include "Page.h"
#include "PageCache.h"
#include "PageGroup.h"
+#include "TextEncodingRegistry.h"
#include "Pasteboard.h"
#include "PasteboardHelperGtk.h"
#include "ResourceHandle.h"
#include "ResourceHandleClient.h"
#include "ResourceHandleInternal.h"
#include "ResourceResponse.h"
-#include "TextEncodingRegistry.h"
-#include "webkitnetworkresponse.h"
+#include "webkitglobalsprivate.h"
#include "webkitsoupauthdialog.h"
-#include "webkitversion.h"
+#include "webkitwebdatabase.h"
+#include "webkitwebplugindatabaseprivate.h"
#include <libintl.h>
#include <runtime/InitializeThreading.h>
#include <stdlib.h>
#include <wtf/Threading.h>
-#if ENABLE(VIDEO)
-#include "FullscreenVideoController.h"
-#endif
-
-#if ENABLE(DATABASE)
-#include "DatabaseTracker.h"
-#endif
+static WebKitCacheModel cacheModel = WEBKIT_CACHE_MODEL_DEFAULT;
using namespace WebCore;
-namespace WebKit {
+/**
+ * SECTION:webkit
+ * @short_description: Global functions controlling WebKit
+ *
+ * WebKit manages many resources which are not related to specific
+ * views. These functions relate to cross-view limits, such as cache
+ * sizes, database quotas, and the HTTP session management.
+ */
-WebCore::EditingBehaviorType core(WebKitEditingBehavior type)
+/**
+ * webkit_get_default_session:
+ *
+ * Retrieves the default #SoupSession used by all web views.
+ * Note that the session features are added by WebKit on demand,
+ * so if you insert your own #SoupCookieJar before any network
+ * traffic occurs, WebKit will use it instead of the default.
+ *
+ * Return value: (transfer none): the default #SoupSession
+ *
+ * Since: 1.1.1
+ */
+SoupSession* webkit_get_default_session ()
{
- return (WebCore::EditingBehaviorType)type;
+ webkitInit();
+ return ResourceHandle::defaultSession();
}
-PasteboardHelperGtk* pasteboardHelperInstance()
+/**
+ * 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)
{
- static PasteboardHelperGtk* helper = new PasteboardHelperGtk();
- return helper;
+ webkitInit();
+
+ 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:
+ // Page cache capacity (in pages). Comment from Mac port:
+ // (Research indicates that value / page drops substantially after 3 pages.)
+ 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()
+{
+ webkitInit();
+ return cacheModel;
+}
+
+/**
+ * webkit_get_web_plugin_database:
+ *
+ * Returns the current #WebKitWebPluginDatabase with information about
+ * all the plugins WebKit knows about in this instance.
+ *
+ * Return value: (transfer none): the current #WebKitWebPluginDatabase
+ *
+ * Since: 1.3.8
+ */
+WebKitWebPluginDatabase* webkit_get_web_plugin_database()
+{
+ static WebKitWebPluginDatabase* database = 0;
+
+ webkitInit();
+
+ if (!database)
+ database = webkit_web_plugin_database_new();
+
+ return database;
}
-} /** end namespace WebKit */
static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMessage* message, gpointer userData)
{
@@ -110,7 +217,7 @@ static void closeIconDatabaseOnExit()
iconDatabase()->close();
}
-void webkit_init()
+void webkitInit()
{
static bool isInitialized = false;
if (isInitialized)
@@ -129,14 +236,14 @@ void webkit_init()
// that may only be done by the main thread.
atomicCanonicalTextEncodingName("UTF-8");
-#if ENABLE(DATABASE)
gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
webkit_set_web_database_directory_path(databaseDirectory);
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
// FIXME: It should be possible for client applications to override the default appcache location
WebCore::cacheStorage().setCacheDirectory(databaseDirectory);
- g_free(databaseDirectory);
#endif
+ g_free(databaseDirectory);
PageGroup::setShouldTrackVisitedLinks(true);
@@ -162,3 +269,14 @@ void webkit_init()
soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
}
+
+namespace WebKit {
+
+PasteboardHelperGtk* pasteboardHelperInstance()
+{
+ static PasteboardHelperGtk* helper = new PasteboardHelperGtk();
+ return helper;
+}
+
+} /** end namespace WebKit */
+
diff --git a/WebKit/gtk/webkit/webkitglobals.h b/WebKit/gtk/webkit/webkitglobals.h
new file mode 100644
index 0000000..6d144fc
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitglobals.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitglobals_h
+#define webkitglobals_h
+
+#include "webkitdefines.h"
+#include <glib.h>
+#include <libsoup/soup.h>
+
+G_BEGIN_DECLS
+
+/*
+ * WebKitCacheModel:
+ * @WEBKIT_CACHE_MODEL_DEFAULT: The default cache model. This is
+ * WEBKIT_CACHE_MODEL_WEB_BROWSER.
+ * @WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: Disable the cache completely, which
+ * substantially reduces memory usage. Useful for applications that only
+ * access local files.
+ * @WEBKIT_CACHE_MODEL_WEB_BROWSER: Improve document load speed substantially
+ * by caching previously viewed content.
+ *
+ * Enum values used for determining the webview cache model.
+ */
+typedef enum {
+ WEBKIT_CACHE_MODEL_DEFAULT,
+ WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
+ WEBKIT_CACHE_MODEL_WEB_BROWSER
+} WebKitCacheModel;
+
+WEBKIT_API SoupSession*
+webkit_get_default_session (void);
+
+WEBKIT_API WebKitWebPluginDatabase *
+webkit_get_web_plugin_database (void);
+
+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/gtk/webkit/webkitglobalsprivate.h b/WebKit/gtk/webkit/webkitglobalsprivate.h
new file mode 100644
index 0000000..5923f2e
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitglobalsprivate.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitglobalsprivate_h
+#define webkitglobalsprivate_h
+
+#include <glib.h>
+
+#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
+#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
+
+namespace WebKit {
+
+class PasteboardHelperGtk;
+PasteboardHelperGtk* pasteboardHelperInstance();
+
+}
+
+extern "C" {
+
+void webkitInit();
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkithittestresult.cpp b/WebKit/gtk/webkit/webkithittestresult.cpp
index fa0b40b..9632493 100644
--- a/WebKit/gtk/webkit/webkithittestresult.cpp
+++ b/WebKit/gtk/webkit/webkithittestresult.cpp
@@ -23,13 +23,14 @@
#include "GOwnPtr.h"
#include "HitTestResult.h"
+#include "KURL.h"
#include "WebKitDOMBinding.h"
#include "WebKitDOMNode.h"
#include "webkitenumtypes.h"
-#include "webkitprivate.h"
-#include <wtf/text/CString.h>
-
+#include "webkitglobals.h"
+#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkithittestresult
@@ -142,7 +143,7 @@ static void webkit_hit_test_result_class_init(WebKitHitTestResultClass* webHitTe
objectClass->get_property = webkit_hit_test_result_get_property;
objectClass->set_property = webkit_hit_test_result_set_property;
- webkit_init();
+ webkitInit();
/**
* WebKitHitTestResult:context:
diff --git a/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
index 23f22a3..7005637 100644
--- a/WebKit/gtk/webkit/webkitnetworkrequest.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
@@ -21,11 +21,11 @@
#include "config.h"
#include "webkitnetworkrequest.h"
+#include "GRefPtr.h"
#include "ResourceRequest.h"
-#include "webkitprivate.h"
-#include <wtf/text/CString.h>
-
+#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkitnetworkrequest
@@ -120,7 +120,7 @@ static void webkit_network_request_class_init(WebKitNetworkRequestClass* request
objectClass->get_property = webkit_network_request_get_property;
objectClass->set_property = webkit_network_request_set_property;
- webkit_init();
+ webkitInit();
/**
* WebKitNetworkRequest:uri:
@@ -253,7 +253,7 @@ namespace WebKit {
WebKitNetworkRequest* kitNew(const WebCore::ResourceRequest& resourceRequest)
{
- PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceRequest.toSoupMessage()));
+ GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceRequest.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
index da29212..4b8661b 100644
--- a/WebKit/gtk/webkit/webkitnetworkresponse.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
@@ -24,9 +24,9 @@
#include "GRefPtr.h"
#include "ResourceResponse.h"
-#include "webkitprivate.h"
-
+#include "webkitglobalsprivate.h"
#include <glib/gi18n-lib.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkitnetworkresponse
@@ -120,7 +120,7 @@ static void webkit_network_response_class_init(WebKitNetworkResponseClass* respo
objectClass->get_property = webkit_network_response_get_property;
objectClass->set_property = webkit_network_response_set_property;
- webkit_init();
+ webkitInit();
/**
* WebKitNetworkResponse:uri:
@@ -263,7 +263,7 @@ WebCore::ResourceResponse core(WebKitNetworkResponse* response)
WebKitNetworkResponse* kitNew(const WebCore::ResourceResponse& resourceResponse)
{
- PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceResponse.toSoupMessage()));
+ GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceResponse.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
deleted file mode 100644
index cf2e9d6..0000000
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
- * Copyright (C) 2008 Jan Michael C. Alonzo
- * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2010 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
- * 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 webkitprivate_h
-#define webkitprivate_h
-
-/*
- * This file knows the shared secret of WebKitWebView, WebKitWebFrame,
- * and WebKitNetworkRequest.
- * They are using WebCore which musn't be exposed to the outer world.
- */
-
-#include <webkit/webkitdefines.h>
-#include <webkit/webkitnetworkrequest.h>
-#include <webkit/webkitwebview.h>
-#include <webkit/webkitwebdatasource.h>
-#include <webkit/webkitwebframe.h>
-#include <webkit/webkitwebsettings.h>
-#include <webkit/webkitwebwindowfeatures.h>
-#include <webkit/webkitnetworkrequest.h>
-#include <webkit/webkitsecurityorigin.h>
-
-#include "DataObjectGtk.h"
-#include "DragActions.h"
-#include "Frame.h"
-#include "GOwnPtr.h"
-#include "Geolocation.h"
-#include "IntPoint.h"
-#include "IntRect.h"
-#include "FrameLoaderClient.h"
-#include "Node.h"
-#include "Page.h"
-#include "PlatformString.h"
-#include "ResourceHandle.h"
-#include "ResourceRequest.h"
-#include "WindowFeatures.h"
-#include "Settings.h"
-#include <enchant.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/text/CString.h>
-
-#include <atk/atk.h>
-#include <glib.h>
-#include <libsoup/soup.h>
-
-namespace WebKit {
-
- class DocumentLoader;
- class PasteboardHelperGtk;
-
- WebCore::EditingBehaviorType core(WebKitEditingBehavior type);
-
- PasteboardHelperGtk* pasteboardHelperInstance();
-}
-
-extern "C" {
- void webkit_init();
-
-#define WEBKIT_PARAM_READABLE ((GParamFlags)(G_PARAM_READABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
-#define WEBKIT_PARAM_READWRITE ((GParamFlags)(G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB))
-
- WTF::String
- webkitUserAgent();
-
- WebKitWebWindowFeatures*
- webkit_web_window_features_new_from_core_features (const WebCore::WindowFeatures& features);
-
- WebKitGeolocationPolicyDecision*
- webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*);
-
- WEBKIT_API void
- webkit_application_cache_set_maximum_size(unsigned long long size);
-
- // WebKitWebDataSource private
- WebKitWebDataSource*
- webkit_web_data_source_new_with_loader(PassRefPtr<WebKit::DocumentLoader>);
-}
-
-#endif
diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
index 927b76d..5f9afae 100644
--- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp
+++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
@@ -22,7 +22,7 @@
#include "DatabaseTracker.h"
#include "PlatformString.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitsecurityoriginprivate.h"
#include <glib/gi18n-lib.h>
#include <wtf/text/CString.h>
diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.h b/WebKit/gtk/webkit/webkitsoupauthdialog.h
index db0ccb8..08b7c9f 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.h
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.h
@@ -17,14 +17,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <gtk/gtk.h>
-#include <libsoup/soup.h>
-
-#include <webkit/webkitdefines.h>
-
#ifndef webkitsoupauthdialog_h
#define webkitsoupauthdialog_h
+#include <gtk/gtk.h>
+#include <webkit/webkitdefines.h>
+
G_BEGIN_DECLS
#define WEBKIT_TYPE_SOUP_AUTH_DIALOG (webkit_soup_auth_dialog_get_type ())
diff --git a/WebKit/gtk/webkit/webkitviewportattributes.cpp b/WebKit/gtk/webkit/webkitviewportattributes.cpp
index c2de5c1..9a98e44 100644
--- a/WebKit/gtk/webkit/webkitviewportattributes.cpp
+++ b/WebKit/gtk/webkit/webkitviewportattributes.cpp
@@ -22,7 +22,9 @@
#include "webkitviewportattributes.h"
#include "Chrome.h"
-#include "webkitprivate.h"
+#include "Frame.h"
+#include "Page.h"
+#include "webkitglobalsprivate.h"
#include "webkitviewportattributesprivate.h"
#include "webkitwebviewprivate.h"
#include <glib/gi18n-lib.h>
diff --git a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
index c906ba3..62f7e8c 100644
--- a/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
+++ b/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
@@ -23,7 +23,8 @@
#include "BackForwardListImpl.h"
#include "HistoryItem.h"
-#include "webkitprivate.h"
+#include "Page.h"
+#include "webkitglobalsprivate.h"
#include "webkitwebbackforwardlistprivate.h"
#include "webkitwebhistoryitem.h"
#include "webkitwebhistoryitemprivate.h"
@@ -84,7 +85,7 @@ static void webkit_web_back_forward_list_class_init(WebKitWebBackForwardListClas
object_class->dispose = webkit_web_back_forward_list_dispose;
- webkit_init();
+ webkitInit();
g_type_class_add_private(klass, sizeof(WebKitWebBackForwardListPrivate));
}
diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp
index db72cde..1291986 100644
--- a/WebKit/gtk/webkit/webkitwebdatabase.cpp
+++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp
@@ -22,7 +22,7 @@
#include "DatabaseDetails.h"
#include "DatabaseTracker.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitsecurityoriginprivate.h"
#include <glib/gi18n-lib.h>
#include <wtf/text/CString.h>
diff --git a/WebKit/gtk/webkit/webkitwebdatasource.cpp b/WebKit/gtk/webkit/webkitwebdatasource.cpp
index 7d967f7..8538665 100644
--- a/WebKit/gtk/webkit/webkitwebdatasource.cpp
+++ b/WebKit/gtk/webkit/webkitwebdatasource.cpp
@@ -30,8 +30,9 @@
#include "SharedBuffer.h"
#include "SubstituteData.h"
#include "runtime/InitializeThreading.h"
+#include "webkitglobalsprivate.h"
#include "webkitnetworkrequestprivate.h"
-#include "webkitprivate.h"
+#include "webkitwebdatasourceprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebresource.h"
#include "webkitwebviewprivate.h"
@@ -126,7 +127,7 @@ static void webkit_web_data_source_class_init(WebKitWebDataSourceClass* klass)
gobject_class->dispose = webkit_web_data_source_dispose;
gobject_class->finalize = webkit_web_data_source_finalize;
- webkit_init();
+ webkitInit();
g_type_class_add_private(gobject_class, sizeof(WebKitWebDataSourcePrivate));
}
@@ -136,15 +137,6 @@ static void webkit_web_data_source_init(WebKitWebDataSource* webDataSource)
webDataSource->priv = G_TYPE_INSTANCE_GET_PRIVATE(webDataSource, WEBKIT_TYPE_WEB_DATA_SOURCE, WebKitWebDataSourcePrivate);
}
-WebKitWebDataSource* webkit_web_data_source_new_with_loader(PassRefPtr<WebKit::DocumentLoader> loader)
-{
- WebKitWebDataSource* webDataSource = WEBKIT_WEB_DATA_SOURCE(g_object_new(WEBKIT_TYPE_WEB_DATA_SOURCE, NULL));
- WebKitWebDataSourcePrivate* priv = webDataSource->priv;
- priv->loader = loader.releaseRef();
-
- return webDataSource;
-}
-
/**
* webkit_web_data_source_new:
*
@@ -182,10 +174,8 @@ WebKitWebDataSource* webkit_web_data_source_new_with_request(WebKitNetworkReques
const gchar* uri = webkit_network_request_get_uri(request);
- WebKitWebDataSource* datasource;
- datasource = webkit_web_data_source_new_with_loader(
- WebKit::DocumentLoader::create(ResourceRequest(KURL(KURL(), String::fromUTF8(uri))),
- SubstituteData()));
+ ResourceRequest resourceRequest(ResourceRequest(KURL(KURL(), String::fromUTF8(uri))));
+ WebKitWebDataSource* datasource = kitNew(WebKit::DocumentLoader::create(resourceRequest, SubstituteData()));
WebKitWebDataSourcePrivate* priv = datasource->priv;
priv->initialRequest = request;
@@ -437,3 +427,16 @@ GList* webkit_web_data_source_get_subresources(WebKitWebDataSource* webDataSourc
return webkit_web_view_get_subresources(webView);
}
+
+namespace WebKit {
+
+WebKitWebDataSource* kitNew(PassRefPtr<WebKit::DocumentLoader> loader)
+{
+ WebKitWebDataSource* webDataSource = WEBKIT_WEB_DATA_SOURCE(g_object_new(WEBKIT_TYPE_WEB_DATA_SOURCE, NULL));
+ WebKitWebDataSourcePrivate* priv = webDataSource->priv;
+ priv->loader = loader.releaseRef();
+
+ return webDataSource;
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitwebdatasourceprivate.h b/WebKit/gtk/webkit/webkitwebdatasourceprivate.h
new file mode 100644
index 0000000..5c18493
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebdatasourceprivate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitwebdatasourceprivate_h
+#define webkitwebdatasourceprivate_h
+
+#include "RefPtr.h"
+#include "webkitwebdatasource.h"
+
+namespace WebKit {
+
+WebKitWebDataSource* kitNew(PassRefPtr<WebKit::DocumentLoader>);
+
+}
+
+#endif
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index ca2b681..d0ea875 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -51,10 +51,10 @@
#include "ScriptController.h"
#include "SubstituteData.h"
#include "webkitenumtypes.h"
+#include "webkitglobalsprivate.h"
+#include "webkitmarshal.h"
#include "webkitnetworkrequestprivate.h"
#include "webkitnetworkresponseprivate.h"
-#include "webkitmarshal.h"
-#include "webkitprivate.h"
#include "webkitsecurityoriginprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebview.h"
@@ -115,11 +115,11 @@ static guint webkit_web_frame_signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE(WebKitWebFrame, webkit_web_frame, G_TYPE_OBJECT)
-static void webkit_web_frame_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
+static void webkit_web_frame_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* paramSpec)
{
WebKitWebFrame* frame = WEBKIT_WEB_FRAME(object);
- switch(prop_id) {
+ switch (propertyId) {
case PROP_NAME:
g_value_set_string(value, webkit_web_frame_get_name(frame));
break;
@@ -139,7 +139,7 @@ static void webkit_web_frame_get_property(GObject* object, guint prop_id, GValue
g_value_set_enum(value, webkit_web_frame_get_vertical_scrollbar_policy(frame));
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, paramSpec);
break;
}
}
@@ -158,7 +158,7 @@ void webkit_web_frame_core_frame_gone(WebKitWebFrame* frame)
static WebKitWebDataSource* webkit_web_frame_get_data_source_from_core_loader(WebCore::DocumentLoader* loader)
{
- return loader ? static_cast<WebKit::DocumentLoader*>(loader)->dataSource() : NULL;
+ return loader ? static_cast<WebKit::DocumentLoader*>(loader)->dataSource() : 0;
}
static void webkit_web_frame_finalize(GObject* object)
@@ -181,7 +181,7 @@ static void webkit_web_frame_finalize(GObject* object)
static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
{
- webkit_init();
+ webkitInit();
/*
* signals
@@ -190,8 +190,8 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
0,
- NULL,
- NULL,
+ 0,
+ 0,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -207,8 +207,8 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
0,
- NULL,
- NULL,
+ 0,
+ 0,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
@@ -225,8 +225,8 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
0,
- NULL,
- NULL,
+ 0,
+ 0,
g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
@@ -244,8 +244,8 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
0,
- NULL,
- NULL,
+ 0,
+ 0,
webkit_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
@@ -254,8 +254,8 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_FROM_CLASS(frameClass),
(GSignalFlags)G_SIGNAL_RUN_LAST,
0,
- NULL,
- NULL,
+ 0,
+ 0,
webkit_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_STRING);
@@ -290,7 +290,7 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
(GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
0,
g_signal_accumulator_true_handled,
- NULL,
+ 0,
webkit_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
@@ -308,21 +308,21 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
g_param_spec_string("name",
_("Name"),
_("The name of the frame"),
- NULL,
+ 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(objectClass, PROP_TITLE,
g_param_spec_string("title",
_("Title"),
_("The document title of the frame"),
- NULL,
+ 0,
WEBKIT_PARAM_READABLE));
g_object_class_install_property(objectClass, PROP_URI,
g_param_spec_string("uri",
_("URI"),
_("The current URI of the contents displayed by the frame"),
- NULL,
+ 0,
WEBKIT_PARAM_READABLE));
/**
@@ -387,6 +387,7 @@ static void webkit_web_frame_init(WebKitWebFrame* frame)
frame->priv = priv;
}
+
/**
* webkit_web_frame_new:
* @web_view: the controlling #WebKitWebView
@@ -400,7 +401,7 @@ static void webkit_web_frame_init(WebKitWebFrame* frame)
**/
WebKitWebFrame* webkit_web_frame_new(WebKitWebView* webView)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
WebKitWebFrame* frame = WEBKIT_WEB_FRAME(g_object_new(WEBKIT_TYPE_WEB_FRAME, NULL));
WebKitWebFramePrivate* priv = frame->priv;
@@ -411,7 +412,7 @@ WebKitWebFrame* webkit_web_frame_new(WebKitWebView* webView)
priv->coreFrame = Frame::create(viewPriv->corePage, 0, client).get();
priv->coreFrame->init();
- priv->origin = NULL;
+ priv->origin = 0;
return frame;
}
@@ -426,7 +427,7 @@ WebKitWebFrame* webkit_web_frame_new(WebKitWebView* webView)
*/
G_CONST_RETURN gchar* webkit_web_frame_get_title(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
WebKitWebFramePrivate* priv = frame->priv;
return priv->title;
@@ -442,7 +443,7 @@ G_CONST_RETURN gchar* webkit_web_frame_get_title(WebKitWebFrame* frame)
*/
G_CONST_RETURN gchar* webkit_web_frame_get_uri(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
WebKitWebFramePrivate* priv = frame->priv;
return priv->uri;
@@ -461,7 +462,7 @@ G_CONST_RETURN gchar* webkit_web_frame_get_uri(WebKitWebFrame* frame)
*/
WebKitWebView* webkit_web_frame_get_web_view(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
WebKitWebFramePrivate* priv = frame->priv;
return priv->webView;
@@ -477,7 +478,7 @@ WebKitWebView* webkit_web_frame_get_web_view(WebKitWebFrame* frame)
*/
G_CONST_RETURN gchar* webkit_web_frame_get_name(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
WebKitWebFramePrivate* priv = frame->priv;
@@ -503,11 +504,11 @@ G_CONST_RETURN gchar* webkit_web_frame_get_name(WebKitWebFrame* frame)
*/
WebKitWebFrame* webkit_web_frame_get_parent(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
Frame* coreFrame = core(frame);
if (!coreFrame)
- return NULL;
+ return 0;
return kit(coreFrame->tree()->parent());
}
@@ -574,7 +575,7 @@ void webkit_web_frame_load_string(WebKitWebFrame* frame, const gchar* content, c
g_return_if_fail(WEBKIT_IS_WEB_FRAME(frame));
g_return_if_fail(content);
- webkit_web_frame_load_data(frame, content, contentMimeType, contentEncoding, baseUri, NULL);
+ webkit_web_frame_load_data(frame, content, contentMimeType, contentEncoding, baseUri, 0);
}
/**
@@ -595,7 +596,7 @@ void webkit_web_frame_load_alternate_string(WebKitWebFrame* frame, const gchar*
g_return_if_fail(WEBKIT_IS_WEB_FRAME(frame));
g_return_if_fail(content);
- webkit_web_frame_load_data(frame, content, NULL, NULL, baseURL, unreachableURL);
+ webkit_web_frame_load_data(frame, content, 0, 0, baseURL, unreachableURL);
}
/**
@@ -674,12 +675,12 @@ void webkit_web_frame_reload(WebKitWebFrame* frame)
*/
WebKitWebFrame* webkit_web_frame_find_frame(WebKitWebFrame* frame, const gchar* name)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
- g_return_val_if_fail(name, NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
+ g_return_val_if_fail(name, 0);
Frame* coreFrame = core(frame);
if (!coreFrame)
- return NULL;
+ return 0;
String nameString = String::fromUTF8(name);
return kit(coreFrame->tree()->find(AtomicString(nameString)));
@@ -696,11 +697,11 @@ WebKitWebFrame* webkit_web_frame_find_frame(WebKitWebFrame* frame, const gchar*
*/
JSGlobalContextRef webkit_web_frame_get_global_context(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
Frame* coreFrame = core(frame);
if (!coreFrame)
- return NULL;
+ return 0;
return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec());
}
@@ -717,7 +718,7 @@ JSGlobalContextRef webkit_web_frame_get_global_context(WebKitWebFrame* frame)
*/
WebKitWebDataSource* webkit_web_frame_get_data_source(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
Frame* coreFrame = core(frame);
return webkit_web_frame_get_data_source_from_core_loader(coreFrame->loader()->documentLoader());
@@ -739,7 +740,7 @@ WebKitWebDataSource* webkit_web_frame_get_data_source(WebKitWebFrame* frame)
*/
WebKitWebDataSource* webkit_web_frame_get_provisional_data_source(WebKitWebFrame* frame)
{
- g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
Frame* coreFrame = core(frame);
return webkit_web_frame_get_data_source_from_core_loader(coreFrame->loader()->provisionalDocumentLoader());
@@ -804,7 +805,7 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr
GtkWidget* topLevel = gtk_widget_get_toplevel(GTK_WIDGET(webkit_web_frame_get_web_view(frame)));
if (!gtk_widget_is_toplevel(topLevel))
- topLevel = NULL;
+ topLevel = 0;
Frame* coreFrame = core(frame);
if (!coreFrame)
@@ -933,7 +934,7 @@ WebKitSecurityOrigin* webkit_web_frame_get_security_origin(WebKitWebFrame* frame
{
WebKitWebFramePrivate* priv = frame->priv;
if (!priv->coreFrame || !priv->coreFrame->document() || !priv->coreFrame->document()->securityOrigin())
- return NULL;
+ return 0;
if (priv->origin && priv->origin->priv->coreOrigin.get() == priv->coreFrame->document()->securityOrigin())
return priv->origin;
@@ -962,11 +963,11 @@ WebKitNetworkResponse* webkit_web_frame_get_network_response(WebKitWebFrame* fra
{
Frame* coreFrame = core(frame);
if (!coreFrame)
- return NULL;
+ return 0;
WebCore::DocumentLoader* loader = coreFrame->loader()->activeDocumentLoader();
if (!loader)
- return NULL;
+ return 0;
return kitNew(loader->response());
}
diff --git a/WebKit/gtk/webkit/webkitwebframeprivate.h b/WebKit/gtk/webkit/webkitwebframeprivate.h
index 23f1e40..80210d8 100644
--- a/WebKit/gtk/webkit/webkitwebframeprivate.h
+++ b/WebKit/gtk/webkit/webkitwebframeprivate.h
@@ -23,6 +23,9 @@
#ifndef webkitwebframeprivate_h
#define webkitwebframeprivate_h
+#include "Frame.h"
+#include "webkitwebframe.h"
+
namespace WebKit {
WebKitWebView* getViewFromFrame(WebKitWebFrame*);
diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
index ac8e57f..eabdc49 100644
--- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
+++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp
@@ -19,12 +19,11 @@
*/
#include "config.h"
-
#include "webkitwebhistoryitem.h"
-#include "webkitprivate.h"
#include "HistoryItem.h"
#include "PlatformString.h"
+#include "webkitglobalsprivate.h"
#include "webkitwebhistoryitemprivate.h"
#include <glib.h>
#include <glib/gi18n-lib.h>
@@ -128,7 +127,7 @@ static void webkit_web_history_item_class_init(WebKitWebHistoryItemClass* klass)
gobject_class->set_property = webkit_web_history_item_set_property;
gobject_class->get_property = webkit_web_history_item_get_property;
- webkit_init();
+ webkitInit();
/**
* WebKitWebHistoryItem:title:
diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp
index ad455bb..1fa2fad 100644
--- a/WebKit/gtk/webkit/webkitwebinspector.cpp
+++ b/WebKit/gtk/webkit/webkitwebinspector.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "webkitwebinspector.h"
+#include "DumpRenderTreeSupportGtk.h"
#include "FocusController.h"
#include "Frame.h"
#include "HitTestRequest.h"
@@ -32,8 +33,8 @@
#include "RenderLayer.h"
#include "RenderView.h"
#include "webkit/WebKitDOMNodePrivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitmarshal.h"
-#include "webkitprivate.h"
#include "webkitwebinspectorprivate.h"
#include <glib/gi18n-lib.h>
@@ -596,23 +597,23 @@ static bool isSchemaAvailable(const char* schemaID)
GSettings* inspectorGSettings()
{
static GSettings* settings = 0;
-
if (settings)
return settings;
+ // Unfortunately GSettings will abort the process execution if the schema is not
+ // installed, which is the case for when running tests, or even the introspection dump
+ // at build time, so check if we have the schema before trying to initialize it.
const gchar* schemaID = "org.webkitgtk-"WEBKITGTK_API_VERSION_STRING".inspector";
-
- // Unfortunately GSettings will abort the process execution if the
- // schema is not installed, which is the case for when running
- // tests, or even the introspection dump at build time, so check
- // if we have the schema before trying to initialize it.
if (!isSchemaAvailable(schemaID)) {
- g_warning("GSettings schema not found - settings will not be used or saved.");
+
+ // This warning is very common on the build bots, which hides valid warnings.
+ // Skip printing it if we are running inside DumpRenderTree.
+ if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
+ g_warning("GSettings schema not found - settings will not be used or saved.");
return 0;
}
settings = g_settings_new(schemaID);
-
return settings;
}
#endif
diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
index b12279e..9f13f28 100644
--- a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
@@ -18,16 +18,14 @@
*/
#include "config.h"
+#include "webkitwebnavigationaction.h"
-#include <wtf/Assertions.h>
#include "FrameLoaderTypes.h"
-
-#include <glib/gi18n-lib.h>
-#include "webkitwebnavigationaction.h"
-#include "webkitprivate.h"
#include "webkitenumtypes.h"
-
+#include "webkitglobalsprivate.h"
+#include <glib/gi18n-lib.h>
#include <string.h>
+#include <wtf/Assertions.h>
static void webkit_web_navigation_action_set_target_frame(WebKitWebNavigationAction* navigationAction, const gchar* targetFrame);
diff --git a/WebKit/gtk/webkit/webkitwebplugin.cpp b/WebKit/gtk/webkit/webkitwebplugin.cpp
index 0b06416..52d5965 100644
--- a/WebKit/gtk/webkit/webkitwebplugin.cpp
+++ b/WebKit/gtk/webkit/webkitwebplugin.cpp
@@ -20,7 +20,7 @@
#include "webkitwebplugin.h"
#include "PluginPackage.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitwebpluginprivate.h"
#include <glib/gi18n-lib.h>
@@ -98,7 +98,7 @@ static void webkit_web_plugin_set_property(GObject* object, guint prop_id, const
static void webkit_web_plugin_class_init(WebKitWebPluginClass* klass)
{
- webkit_init();
+ webkitInit();
GObjectClass* gobjectClass = reinterpret_cast<GObjectClass*>(klass);
diff --git a/WebKit/gtk/webkit/webkitwebplugindatabase.cpp b/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
index 08328a0..2d36115 100644
--- a/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
+++ b/WebKit/gtk/webkit/webkitwebplugindatabase.cpp
@@ -20,7 +20,7 @@
#include "webkitwebplugindatabase.h"
#include "PluginDatabase.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitwebplugindatabaseprivate.h"
#include "webkitwebpluginprivate.h"
@@ -47,7 +47,7 @@ static void webkit_web_plugin_database_dispose(GObject* object)
static void webkit_web_plugin_database_class_init(WebKitWebPluginDatabaseClass* klass)
{
- webkit_init();
+ webkitInit();
GObjectClass* gobjectClass = reinterpret_cast<GObjectClass*>(klass);
diff --git a/WebKit/gtk/webkit/webkitwebpluginprivate.h b/WebKit/gtk/webkit/webkitwebpluginprivate.h
index 885313e..4ae204b 100644
--- a/WebKit/gtk/webkit/webkitwebpluginprivate.h
+++ b/WebKit/gtk/webkit/webkitwebpluginprivate.h
@@ -21,6 +21,7 @@
#include "webkitwebplugin.h"
#include <glib-object.h>
+#include <wtf/text/CString.h>
namespace WebCore {
class PluginPackage;
diff --git a/WebKit/gtk/webkit/webkitwebpolicydecision.cpp b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
index 06c1fcb..624ff9a 100644
--- a/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
+++ b/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
@@ -20,8 +20,8 @@
#include "config.h"
#include "webkitwebpolicydecision.h"
+#include "FrameLoaderClient.h"
#include "FrameLoaderTypes.h"
-#include "webkitprivate.h"
#include "webkitwebframeprivate.h"
#include "webkitwebpolicydecisionprivate.h"
diff --git a/WebKit/gtk/webkit/webkitwebresource.cpp b/WebKit/gtk/webkit/webkitwebresource.cpp
index c2f3a15..b7f4036 100644
--- a/WebKit/gtk/webkit/webkitwebresource.cpp
+++ b/WebKit/gtk/webkit/webkitwebresource.cpp
@@ -25,14 +25,13 @@
#include "PlatformString.h"
#include "SharedBuffer.h"
#include "webkitenumtypes.h"
+#include "webkitglobalsprivate.h"
#include "webkitmarshal.h"
-#include "webkitprivate.h"
#include "webkitwebresourceprivate.h"
-#include <wtf/Assertions.h>
-#include <wtf/text/CString.h>
-
#include <glib.h>
#include <glib/gi18n-lib.h>
+#include <wtf/Assertions.h>
+#include <wtf/text/CString.h>
/**
* SECTION:webkitwebresource
@@ -44,7 +43,6 @@
*/
using namespace WebCore;
-using namespace WebKit;
enum {
PROP_0,
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 92370d7..3deae30 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -26,16 +26,19 @@
#include "config.h"
#include "webkitwebsettings.h"
+#include "EditingBehavior.h"
#include "FileSystem.h"
#include "Language.h"
#include "PluginDatabase.h"
#include "webkitenumtypes.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
#include "webkitversion.h"
#include "webkitwebsettingsprivate.h"
+#include <enchant.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringConcatenate.h>
#include <glib/gi18n-lib.h>
+
#if OS(UNIX)
#include <sys/utsname.h>
#endif
@@ -241,7 +244,7 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
gobject_class->set_property = webkit_web_settings_set_property;
gobject_class->get_property = webkit_web_settings_get_property;
- webkit_init();
+ webkitInit();
GParamFlags flags = (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT);
@@ -1404,24 +1407,6 @@ void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* webView, cons
}
/**
- * webkit_web_settings_get_enchant_dicts:
- * @web_view: a #WebKitWebView
- *
- * Internal use only. Retrieves a GSList of EnchantDicts from the
- * #WebKitWebSettings of @web_view.
- *
- * Since: 1.1.22
- */
-GSList* webkit_web_settings_get_enchant_dicts(WebKitWebView* webView)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
-
- WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
-
- return settings->priv->enchant_dicts;
-}
-
-/**
* webkit_web_settings_get_user_agent:
* @web_settings: a #WebKitWebSettings
*
@@ -1438,3 +1423,21 @@ G_CONST_RETURN gchar* webkit_web_settings_get_user_agent(WebKitWebSettings* webS
return priv->user_agent;
}
+
+GSList* webkitWebViewGetEnchantDicts(WebKitWebView* webView)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
+
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+
+ return settings->priv->enchant_dicts;
+}
+
+namespace WebKit {
+
+WebCore::EditingBehaviorType core(WebKitEditingBehavior type)
+{
+ return (WebCore::EditingBehaviorType)type;
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitwebsettingsprivate.h b/WebKit/gtk/webkit/webkitwebsettingsprivate.h
index e848a08..9700ba5 100644
--- a/WebKit/gtk/webkit/webkitwebsettingsprivate.h
+++ b/WebKit/gtk/webkit/webkitwebsettingsprivate.h
@@ -29,7 +29,9 @@ extern "C" {
WEBKIT_API void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*, const gchar* directory);
-GSList* webkit_web_settings_get_enchant_dicts(WebKitWebView*);
+GSList* webkitWebViewGetEnchantDicts(WebKitWebView*);
+
+WTF::String webkitUserAgent();
}
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index c814474..bd3538c 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -76,16 +76,17 @@
#include "ResourceHandle.h"
#include "ScriptValue.h"
#include "Scrollbar.h"
+#include "Settings.h"
#include "webkit/WebKitDOMDocumentPrivate.h"
#include "webkitdownload.h"
#include "webkitdownloadprivate.h"
#include "webkitenumtypes.h"
#include "webkitgeolocationpolicydecision.h"
+#include "webkitglobalsprivate.h"
#include "webkithittestresultprivate.h"
#include "webkitmarshal.h"
#include "webkitnetworkrequest.h"
#include "webkitnetworkresponse.h"
-#include "webkitprivate.h"
#include "webkitviewportattributes.h"
#include "webkitviewportattributesprivate.h"
#include "webkitwebbackforwardlist.h"
@@ -96,7 +97,9 @@
#include "webkitwebinspectorprivate.h"
#include "webkitwebpolicydecision.h"
#include "webkitwebresource.h"
+#include "webkitwebsettingsprivate.h"
#include "webkitwebplugindatabaseprivate.h"
+#include "webkitwebwindowfeatures.h"
#include "webkitwebviewprivate.h"
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n-lib.h>
@@ -137,7 +140,6 @@
*/
static const double defaultDPI = 96.0;
-static WebKitCacheModel cacheModel = WEBKIT_CACHE_MODEL_DEFAULT;
static IntPoint globalPointForClientPoint(GdkWindow* window, const IntPoint& clientPoint);
using namespace WebKit;
@@ -1438,23 +1440,36 @@ static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
if (!core(webView))
- return NULL;
+ return 0;
AXObjectCache::enableAccessibility();
Frame* coreFrame = core(webView)->mainFrame();
if (!coreFrame)
- return NULL;
+ return 0;
Document* doc = coreFrame->document();
if (!doc)
- return NULL;
+ return 0;
+
+ AccessibilityObject* rootAccessible = doc->axObjectCache()->rootObject();
+ if (!rootAccessible)
+ return 0;
+
+ // We need to return the root accessibility object's first child
+ // to get to the actual ATK Object associated with the web view.
+ // See https://bugs.webkit.org/show_bug.cgi?id=51932
+ AtkObject* axRoot = rootAccessible->wrapper();
+ if (!axRoot || !ATK_IS_OBJECT(axRoot))
+ return 0;
- AccessibilityObject* coreAccessible = doc->axObjectCache()->getOrCreate(doc->renderer());
- if (!coreAccessible || !coreAccessible->wrapper())
- return NULL;
+ AtkObject* axWebView = atk_object_ref_accessible_child(ATK_OBJECT(axRoot), 0);
+ if (!axWebView || !ATK_IS_OBJECT(axWebView))
+ return 0;
- return coreAccessible->wrapper();
+ // We don't want the extra reference returned by ref_accessible_child.
+ g_object_unref(axWebView);
+ return axWebView;
}
static gdouble webViewGetDPI(WebKitWebView* webView)
@@ -1757,7 +1772,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
{
GtkBindingSet* binding_set;
- webkit_init();
+ webkitInit();
/*
* Signals
@@ -3330,7 +3345,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows);
settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
- settings->setEditingBehaviorType(core(editingBehavior));
+ settings->setEditingBehaviorType(static_cast<WebCore::EditingBehaviorType>(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
settings->setAllowFileAccessFromFileURLs(enableFileAccessFromFileURI);
settings->setDOMPasteAllowed(enableDOMPaste);
@@ -3436,7 +3451,7 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
else if (name == g_intern_string("enable-offline-web-application-cache"))
settings->setOfflineWebApplicationCacheEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("editing-behavior"))
- settings->setEditingBehaviorType(core(static_cast<WebKitEditingBehavior>(g_value_get_enum(&value))));
+ settings->setEditingBehaviorType(static_cast<WebCore::EditingBehaviorType>(g_value_get_enum(&value)));
else if (name == g_intern_string("enable-universal-access-from-file-uris"))
settings->setAllowUniversalAccessFromFileURLs(g_value_get_boolean(&value));
else if (name == g_intern_string("enable-file-access-from-file-uris"))
@@ -3471,7 +3486,7 @@ static void webkit_web_view_init(WebKitWebView* webView)
// members, which ensures they are initialized properly.
new (priv) WebKitWebViewPrivate();
- priv->imContext = adoptPlatformRef(gtk_im_multicontext_new());
+ priv->imContext = adoptGRef(gtk_im_multicontext_new());
Page::PageClients pageClients;
pageClients.chromeClient = new WebKit::ChromeClient(webView);
@@ -3489,11 +3504,11 @@ static void webkit_web_view_init(WebKitWebView* webView)
// We also add a simple wrapper class to provide the public
// interface for the Web Inspector.
- priv->webInspector = adoptPlatformRef(WEBKIT_WEB_INSPECTOR(g_object_new(WEBKIT_TYPE_WEB_INSPECTOR, NULL)));
+ priv->webInspector = adoptGRef(WEBKIT_WEB_INSPECTOR(g_object_new(WEBKIT_TYPE_WEB_INSPECTOR, NULL)));
webkit_web_inspector_set_inspector_client(priv->webInspector.get(), priv->corePage);
// And our ViewportAttributes friend.
- priv->viewportAttributes = adoptPlatformRef(WEBKIT_VIEWPORT_ATTRIBUTES(g_object_new(WEBKIT_TYPE_VIEWPORT_ATTRIBUTES, NULL)));
+ priv->viewportAttributes = adoptGRef(WEBKIT_VIEWPORT_ATTRIBUTES(g_object_new(WEBKIT_TYPE_VIEWPORT_ATTRIBUTES, NULL)));
priv->viewportAttributes->priv->webView = webView;
// The smart pointer will call g_object_ref_sink on these adjustments.
@@ -3505,17 +3520,17 @@ static void webkit_web_view_init(WebKitWebView* webView)
priv->lastPopupXPosition = priv->lastPopupYPosition = -1;
priv->editable = false;
- priv->backForwardList = adoptPlatformRef(webkit_web_back_forward_list_new_with_web_view(webView));
+ priv->backForwardList = adoptGRef(webkit_web_back_forward_list_new_with_web_view(webView));
priv->zoomFullContent = FALSE;
- priv->webSettings = adoptPlatformRef(webkit_web_settings_new());
+ priv->webSettings = adoptGRef(webkit_web_settings_new());
webkit_web_view_update_settings(webView);
g_signal_connect(priv->webSettings.get(), "notify", G_CALLBACK(webkit_web_view_settings_notify), webView);
- priv->webWindowFeatures = adoptPlatformRef(webkit_web_window_features_new());
+ priv->webWindowFeatures = adoptGRef(webkit_web_window_features_new());
- priv->subResources = adoptPlatformRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref));
+ priv->subResources = adoptGRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref));
priv->currentClickCount = 0;
priv->previousClickButton = 0;
@@ -4892,7 +4907,7 @@ void webkit_web_view_add_main_resource(WebKitWebView* webView, const char* ident
{
WebKitWebViewPrivate* priv = webView->priv;
- priv->mainResource = adoptPlatformRef(webResource);
+ priv->mainResource = adoptGRef(webResource);
priv->mainResourceIdentifier = identifier;
}
@@ -5050,138 +5065,6 @@ webkit_web_view_get_dom_document(WebKitWebView* webView)
return kit(doc);
}
-/**
- * SECTION:webkit
- * @short_description: Global functions controlling WebKit
- *
- * WebKit manages many resources which are not related to specific
- * views. These functions relate to cross-view limits, such as cache
- * sizes, database quotas, and the HTTP session management.
- */
-
-/**
- * webkit_get_default_session:
- *
- * Retrieves the default #SoupSession used by all web views.
- * Note that the session features are added by WebKit on demand,
- * so if you insert your own #SoupCookieJar before any network
- * traffic occurs, WebKit will use it instead of the default.
- *
- * Return value: (transfer none): the default #SoupSession
- *
- * Since: 1.1.1
- */
-SoupSession* webkit_get_default_session ()
-{
- webkit_init();
- return ResourceHandle::defaultSession();
-}
-
-/**
- * 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)
-{
- webkit_init();
-
- 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:
- // Page cache capacity (in pages). Comment from Mac port:
- // (Research indicates that value / page drops substantially after 3 pages.)
- 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()
-{
- webkit_init();
- return cacheModel;
-}
-
-/**
- * webkit_get_web_plugin_database:
- *
- * Returns the current #WebKitWebPluginDatabase with information about
- * all the plugins WebKit knows about in this instance.
- *
- * Return value: (transfer none): the current #WebKitWebPluginDatabase
- *
- * Since: 1.3.8
- */
-WebKitWebPluginDatabase* webkit_get_web_plugin_database()
-{
- static WebKitWebPluginDatabase* database = 0;
-
- webkit_init();
-
- if (!database)
- database = webkit_web_plugin_database_new();
-
- return database;
-}
-
GtkMenu* webkit_web_view_get_context_menu(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h
index 9abfef6..1838bfe 100644
--- a/WebKit/gtk/webkit/webkitwebview.h
+++ b/WebKit/gtk/webkit/webkitwebview.h
@@ -50,24 +50,6 @@ typedef enum {
WEBKIT_NAVIGATION_RESPONSE_DOWNLOAD
} WebKitNavigationResponse;
-/*
- * WebKitCacheModel:
- * @WEBKIT_CACHE_MODEL_DEFAULT: The default cache model. This is
- * WEBKIT_CACHE_MODEL_WEB_BROWSER.
- * @WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: Disable the cache completely, which
- * substantially reduces memory usage. Useful for applications that only
- * access local files.
- * @WEBKIT_CACHE_MODEL_WEB_BROWSER: Improve document load speed substantially
- * by caching previously viewed content.
- *
- * Enum values used for determining the webview cache model.
- */
-typedef enum {
- WEBKIT_CACHE_MODEL_DEFAULT,
- WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
- WEBKIT_CACHE_MODEL_WEB_BROWSER
-} WebKitCacheModel;
-
typedef enum
{
WEBKIT_WEB_VIEW_TARGET_INFO_HTML,
@@ -361,12 +343,6 @@ WEBKIT_API void
webkit_web_view_set_full_content_zoom (WebKitWebView *webView,
gboolean full_content_zoom);
-WEBKIT_API SoupSession*
-webkit_get_default_session (void);
-
-WEBKIT_API WebKitWebPluginDatabase *
-webkit_get_web_plugin_database (void);
-
WEBKIT_API const gchar*
webkit_web_view_get_encoding (WebKitWebView * webView);
@@ -421,12 +397,6 @@ 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);
-
WEBKIT_API WebKitDOMDocument *
webkit_web_view_get_dom_document (WebKitWebView *webView);
diff --git a/WebKit/gtk/webkit/webkitwebviewprivate.h b/WebKit/gtk/webkit/webkitwebviewprivate.h
index dec6dad..29da1fe 100644
--- a/WebKit/gtk/webkit/webkitwebviewprivate.h
+++ b/WebKit/gtk/webkit/webkitwebviewprivate.h
@@ -52,26 +52,26 @@ extern "C" {
typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
struct _WebKitWebViewPrivate {
WebCore::Page* corePage;
- PlatformRefPtr<WebKitWebSettings> webSettings;
- PlatformRefPtr<WebKitWebInspector> webInspector;
- PlatformRefPtr<WebKitViewportAttributes> viewportAttributes;
- PlatformRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
+ GRefPtr<WebKitWebSettings> webSettings;
+ GRefPtr<WebKitWebInspector> webInspector;
+ GRefPtr<WebKitViewportAttributes> viewportAttributes;
+ GRefPtr<WebKitWebWindowFeatures> webWindowFeatures;
WebKitWebFrame* mainFrame;
- PlatformRefPtr<WebKitWebBackForwardList> backForwardList;
+ GRefPtr<WebKitWebBackForwardList> backForwardList;
- PlatformRefPtr<GtkMenu> currentMenu;
+ GRefPtr<GtkMenu> currentMenu;
gint lastPopupXPosition;
gint lastPopupYPosition;
HashSet<GtkWidget*> children;
bool editable;
- PlatformRefPtr<GtkIMContext> imContext;
+ GRefPtr<GtkIMContext> imContext;
gboolean transparent;
- PlatformRefPtr<GtkAdjustment> horizontalAdjustment;
- PlatformRefPtr<GtkAdjustment> verticalAdjustment;
+ GRefPtr<GtkAdjustment> horizontalAdjustment;
+ GRefPtr<GtkAdjustment> verticalAdjustment;
#ifndef GTK_API_VERSION_2
// GtkScrollablePolicy needs to be checked when
@@ -96,9 +96,9 @@ struct _WebKitWebViewPrivate {
// These are hosted here because the DataSource object is
// created too late in the frame loading process.
- PlatformRefPtr<WebKitWebResource> mainResource;
+ GRefPtr<WebKitWebResource> mainResource;
CString mainResourceIdentifier;
- PlatformRefPtr<GHashTable> subResources;
+ GRefPtr<GHashTable> subResources;
CString tooltipText;
WebCore::IntRect tooltipArea;
diff --git a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
index ddc657d..93e08ac 100644
--- a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
+++ b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
@@ -19,10 +19,11 @@
*/
#include "config.h"
+#include "webkitwebwindowfeatures.h"
#include "WindowFeatures.h"
-#include "webkitwebwindowfeatures.h"
-#include "webkitprivate.h"
+#include "webkitglobalsprivate.h"
+#include "webkitwebwindowfeaturesprivate.h"
/**
* SECTION:webkitwebwindowfeatures
@@ -100,7 +101,7 @@ static void webkit_web_window_features_class_init(WebKitWebWindowFeaturesClass*
GParamFlags flags = (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT);
- webkit_init();
+ webkitInit();
/**
* WebKitWebWindowFeatures:x:
@@ -378,35 +379,6 @@ WebKitWebWindowFeatures* webkit_web_window_features_new()
return WEBKIT_WEB_WINDOW_FEATURES(g_object_new(WEBKIT_TYPE_WEB_WINDOW_FEATURES, NULL));
}
-// for internal use only
-WebKitWebWindowFeatures* webkit_web_window_features_new_from_core_features(const WebCore::WindowFeatures& features)
-{
- WebKitWebWindowFeatures *webWindowFeatures = webkit_web_window_features_new();
-
- if(features.xSet)
- g_object_set(webWindowFeatures, "x", static_cast<int>(features.x), NULL);
-
- if(features.ySet)
- g_object_set(webWindowFeatures, "y", static_cast<int>(features.y), NULL);
-
- if(features.widthSet)
- g_object_set(webWindowFeatures, "width", static_cast<int>(features.width), NULL);
-
- if(features.heightSet)
- g_object_set(webWindowFeatures, "height", static_cast<int>(features.height), NULL);
-
- g_object_set(webWindowFeatures,
- "toolbar-visible", features.toolBarVisible,
- "statusbar-visible", features.statusBarVisible,
- "scrollbar-visible", features.scrollbarsVisible,
- "menubar-visible", features.menuBarVisible,
- "locationbar-visible", features.locationBarVisible,
- "fullscreen", features.fullscreen,
- NULL);
-
- return webWindowFeatures;
-}
-
/**
* webkit_web_window_features_equal:
* @features1: a #WebKitWebWindowFeatures instance
@@ -443,3 +415,35 @@ gboolean webkit_web_window_features_equal(WebKitWebWindowFeatures* features1, We
return TRUE;
return FALSE;
}
+
+namespace WebKit {
+
+WebKitWebWindowFeatures* kitNew(const WebCore::WindowFeatures& features)
+{
+ WebKitWebWindowFeatures *webWindowFeatures = webkit_web_window_features_new();
+
+ if(features.xSet)
+ g_object_set(webWindowFeatures, "x", static_cast<int>(features.x), NULL);
+
+ if(features.ySet)
+ g_object_set(webWindowFeatures, "y", static_cast<int>(features.y), NULL);
+
+ if(features.widthSet)
+ g_object_set(webWindowFeatures, "width", static_cast<int>(features.width), NULL);
+
+ if(features.heightSet)
+ g_object_set(webWindowFeatures, "height", static_cast<int>(features.height), NULL);
+
+ g_object_set(webWindowFeatures,
+ "toolbar-visible", features.toolBarVisible,
+ "statusbar-visible", features.statusBarVisible,
+ "scrollbar-visible", features.scrollbarsVisible,
+ "menubar-visible", features.menuBarVisible,
+ "locationbar-visible", features.locationBarVisible,
+ "fullscreen", features.fullscreen,
+ NULL);
+
+ return webWindowFeatures;
+}
+
+}
diff --git a/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h b/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h
new file mode 100644
index 0000000..6ea919b
--- /dev/null
+++ b/WebKit/gtk/webkit/webkitwebwindowfeaturesprivate.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
+ * Copyright (C) 2008 Jan Michael C. Alonzo
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 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
+ * 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 webkitwebwindowfeaturesprivate_h
+#define webkitwebwindowfeaturesprivate_h
+
+#include "webkitwebwindowfeatures.h"
+
+namespace WebKit {
+
+WebKitWebWindowFeatures* kitNew(const WebCore::WindowFeatures&);
+
+}
+
+#endif
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index 0c689bc..4315bb5 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,30 @@
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/FrameLoaderClientHaiku.cpp:
+ (WebCore::FrameLoaderClientHaiku::didSaveToPageCache):
+ (WebCore::FrameLoaderClientHaiku::didRestoreFromPageCache):
+ * WebCoreSupport/FrameLoaderClientHaiku.h:
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * WebCoreSupport/EditorClientHaiku.cpp:
+ (WebCore::EditorClientHaiku::handleKeyboardEvent):
+
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
index deca47a..2b175d8 100644
--- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
@@ -253,36 +253,36 @@ void EditorClientHaiku::handleKeyboardEvent(KeyboardEvent* event)
if (start->isContentEditable()) {
switch (kevent->windowsVirtualKeyCode()) {
case VK_BACK:
- frame->editor()->deleteWithDirection(SelectionController::DirectionBackward,
+ frame->editor()->deleteWithDirection(DirectionBackward,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
false, true);
break;
case VK_DELETE:
- frame->editor()->deleteWithDirection(SelectionController::DirectionForward,
+ frame->editor()->deleteWithDirection(DirectionForward,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
false, true);
break;
case VK_LEFT:
frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionLeft,
+ DirectionLeft,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
break;
case VK_RIGHT:
frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionRight,
+ DirectionRight,
kevent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
break;
case VK_UP:
frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionBackward,
+ DirectionBackward,
kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
break;
case VK_DOWN:
frame->selection()->modify(kevent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionForward,
+ DirectionForward,
kevent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
break;
diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
index 74625c5..48c65a1 100644
--- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
@@ -857,6 +857,14 @@ void FrameLoaderClientHaiku::transitionToCommittedForNewPage()
m_frame->view()->setScrollbarModes(owner->scrollingMode(), owner->scrollingMode());
}
+void FrameLoaderClientHaiku::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientHaiku::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientHaiku::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
index dcdb1a0..e54ba03 100644
--- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
@@ -151,6 +151,9 @@ namespace WebCore {
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual void updateGlobalHistory();
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 1a66b1a..5bd9ff5 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,254 @@
+2011-01-07 Jer Noble <jer.noble@apple.com>
+
+ Yet another Leopard build fix: NSRect and CGRect are not inter-
+ changable in 32-bit.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController exitFullscreen]):
+
+2011-01-07 Jer Noble <jer.noble@apple.com>
+
+ Fix the Leopard build: Replace CoreAnimation SL-only functions
+ with Leopard equivalents.
+
+ * WebView/WebFullScreenController.mm:
+ (+[CATransaction setDisableActions:]):
+ (+[CATransaction setAnimationDuration:]):
+ (-[WebFullScreenController _animationDuration]):
+ (-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
+
+2010-12-21 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement WebKit Full Screen support.
+ https://bugs.webkit.org/show_bug.cgi?id=49481
+ rdar://problem/8247444
+
+ Support the new fullscreen Chrome client requests. WebView will pass
+ through these requests to a WebFullscreenController.
+
+ * WebCoreSupport/WebChromeClient.h: Add fullScreenRendererChanged().
+ * WebView/WebView.mm:
+ (-[WebView _supportsFullScreenForElement:WebCore::]): Check to see if the fullscreen pref has been enabled.
+ (-[WebView _enterFullScreenForElement:WebCore::]): Create a WebFullScreenController.
+ (-[WebView _exitFullScreenForElement:WebCore::]): Request that the WebFullScreenController exit fullscreen.
+ (-[WebView _fullScreenRendererChanged:WebCore::]): Notify the WebFullScreenController that its renderer has changed.
+ * WebView/WebViewData.h: Add ivar newFullscreenController.
+
+2010-12-17 Jer Noble <jer@kokode.apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Implement WebKit Full Screen support.
+ https://bugs.webkit.org/show_bug.cgi?id=49481
+ rdar://problem/8247444
+
+ This patch implements the FullScreen APIs using the new RenderFullScreen renderer and the new
+ Document client APIs. The RenderFullScreen renderer's CALayer is hosted in a new, fullscreen
+ window, and a custom CAAnimation animates that layer between the initial screen rect of the
+ full screen element, to its final value. WebFullscreenController will swap the WebView out of
+ its original window, and into the fullscreen window. The controller will replace the WebView
+ with a placeholder view, so that if the placeholder moves or resized while the WebView is
+ absent, the WebView will move back to the correct location when exiting fullscreen.
+
+ * WebView/WebFullscreenController.h: Added.
+ * WebView/WebFullscreenController.mm: Added.
+ (-[WebFullscreenController windowDidExitFullscreen:]): Close the fullscreen window.
+ (-[WebFullscreenController windowDidEnterFullscreen:]): Swap the webView back into the fullscreen window.
+ (-[WebFullscreenController animationDidStop:finished:]): Call windowDid{Exit|Enter}FullScreen as appropriate.
+ (-[WebFullscreenController applicationDidResignActive:]):
+ (-[WebFullscreenController applicationDidChangeScreenParameters:]): Resize the fullscreen window to match
+ the new screen parameters.
+ (-[WebFullscreenController enterFullscreen:]): Set up the animation that will take the fullscreen element
+ from its original screen rect into fullscreen.
+ (-[WebFullscreenController exitFullscreen]): Swap the webView back into its original window.
+ Set up the animation that will take the fullscreen element back into its original screen
+ rect.
+ (-[WebFullscreenController _updatePowerAssertions]): Now checks _isAnyMoviePlaying to determine
+ whether to disable screensaver and sleep.
+ (-[WebFullscreenController _isAnyMoviePlaying]): Walks through the sub-tree starting at the fullscreen element
+ looking for HTMLVideoElements; returns whether any are found to be playing.
+ (-[WebFullscreenController _animationDuration]): Returns the current animation duration, affected by control
+ and shift keys.
+ (-[WebFullscreenWindow canBecomeKeyWindow]): Allow the window to become key.
+ (-[WebFullscreenWindow keyDown:]): Handle the 'Esc' key.
+ (-[WebFullscreenWindow cancelOperation:]): Request to exit fullscreen.
+ (-[WebFullscreenWindow rendererLayer]): Convenience accessor.
+ (-[WebFullscreenWindow setRendererLayer:]): Ditto.
+ (-[WebFullscreenWindow backgroundLayer]): Ditto.
+ (-[WebFullscreenWindow animationView]): Ditto.
+ (MediaEventListener::MediaEventListener): Implements the EventListener protocol.
+ (MediaEventListener::handleEvent): Tells its delegate to _updatePowerAssertions.
+
+2011-01-07 James Robinson <jamesr@chromium.org>
+
+ Revert "Implement mozilla's animationTime property"
+ https://bugs.webkit.org/show_bug.cgi?id=51952
+
+ This approach isn't quite right.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack):
+
+2011-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
+
+ The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
+ destructor early, in order to release wrappers once we know we no longer intend to use them.
+ Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
+ lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
+ A sequence of events that triggers the bug would look like this:
+
+ (1) Create a DOMWrapperWorld.
+ (2) Register a timer in the world.
+ (3) Call unregisterWorld() on the world.
+ (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
+ (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
+ called forgetWorld() none exists.
+ (6) Attempt to add a wrapper to a NULL map.
+
+ Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
+
+ * WebView/WebScriptWorld.mm:
+ (-[WebScriptWorld unregisterWorld]):
+
+2011-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WK2: Support Accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=51859
+
+ Use rootObject() method to get top of AX tree.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient::accessibilityRemoteObject):
+ * WebView/WebFrame.mm:
+ (-[WebFrame setAccessibleName:]):
+ (-[WebFrame accessibilityRoot]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebFramePrivate.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView accessibilityAttributeValue:]):
+ (-[WebHTMLView accessibilityFocusedUIElement]):
+ (-[WebHTMLView accessibilityHitTest:]):
+ (-[WebHTMLView _accessibilityParentForSubview:]):
+
+2011-01-04 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/51889> WebFrameLoaderClient::createMediaPlayerProxyPlugin() should use WebCore::PluginInfo.name
+
+ Reviewed by Eric Carlson.
+
+ This originally broke in r61581. It is inside an
+ ENABLE(PLUGIN_PROXY_FOR_VIDEO) macro, so it didn't break the Mac
+ build then.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Call
+ (WebFrameLoaderClient::createMediaPlayerProxyPlugin): Updated to
+ use WebCore::PluginInfo.name instead of
+ -[WebBasePluginPackage name].
+
+2011-01-02 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Simon Fraser.
+
+ <rdar://problem/8812159> Update copyright strings
+
+ * Info.plist:
+
+2010-12-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Ada Chan.
+
+ <rdar://problem/8758191> REGRESSION (r72887): Mail crashes when doing searches in a message due to method name conflict
+ https://bugs.webkit.org/show_bug.cgi?id=51717
+
+ Renamed -findString:options: to -_findString:options: in the WebDocumentOptionsSearching
+ protocol to avoid conflict with -[WebHTMLView(MailExtras) findString:options:] which Mail defines.
+
+ * WebView/WebDocumentInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
+ (-[WebHTMLView _findString:options:]):
+ * WebView/WebView.mm:
+ (findString):
+
+2010-12-28 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Sam Weinig.
+
+ Substitute // MARK: for compiler-specific #pragma mark
+ https://bugs.webkit.org/show_bug.cgi?id=51657
+
+ For consistency, we should substitute "// MARK:" for compiler-
+ specific "#pragma mark" in the source files for the Mac port.
+
+ * History/WebHistory.mm:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ * WebCoreSupport/WebInspectorClient.mm:
+ * WebCoreSupport/WebSecurityOrigin.mm:
+ * WebView/WebPDFView.mm:
+ * WebView/WebVideoFullscreenController.mm:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+
+2010-12-23 Yongjun Zhang <yongjun_zhang@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
+ https://bugs.webkit.org/show_bug.cgi?id=38535
+
+ WebScriptDebugger in WebKit has empty implementations for willExecuteProgram and didExecuteProgram. As a result,
+ if the top call frame is from a program, WebKitScriptDebugger doesn't record that callframe as the top frame, and
+ WebScriptDebugger's callframe stack is wrong from this point. That could cause crash if we trying to access the top
+ call frame from this stack when an exception throws because the saved top frame could be invalid.
+
+ To fix that, we need to maintain the call frame stack in willExecuteProgram and didExecuteProgram, as we did in
+ callEvent and returnEvent.
+
+ * WebView/WebScriptDebugger.mm:
+ (WebScriptDebugger::willExecuteProgram):
+ (WebScriptDebugger::didExecuteProgram):
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::didSaveToPageCache):
+ (WebFrameLoaderClient::didRestoreFromPageCache):
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:granularity:]):
+ Takes SelectionDirection instead of SelectionController::EDirection.
+ * WebView/WebFrameInternal.h:
+ * WebView/WebTextCompletionController.mm:
+ (-[WebTextCompletionController doCompletion]): Calls _rangeByAlteringCurrentSelection:SelectionController.
+
2010-12-22 Simon Fraser <simon.fraser@apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/mac/History/WebHistory.mm b/WebKit/mac/History/WebHistory.mm
index af40a24..00cee78 100644
--- a/WebKit/mac/History/WebHistory.mm
+++ b/WebKit/mac/History/WebHistory.mm
@@ -110,7 +110,7 @@ private:
@implementation WebHistoryPrivate
-#pragma mark OBJECT FRAMEWORK
+// MARK: OBJECT FRAMEWORK
+ (void)initialize
{
@@ -146,7 +146,7 @@ private:
[super finalize];
}
-#pragma mark MODIFYING CONTENTS
+// MARK: MODIFYING CONTENTS
static void getDayBoundaries(NSTimeInterval interval, NSTimeInterval& beginningOfDay, NSTimeInterval& beginningOfNextDay)
{
@@ -399,7 +399,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
[self addItem:entry discardDuplicate:NO];
}
-#pragma mark DATE-BASED RETRIEVAL
+// MARK: DATE-BASED RETRIEVAL
- (NSArray *)orderedLastVisitedDays
{
@@ -431,7 +431,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return _entriesByDate->get(dateKey).get();
}
-#pragma mark URL MATCHING
+// MARK: URL MATCHING
- (WebHistoryItem *)itemForURLString:(NSString *)URLString
{
@@ -453,7 +453,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return [_entriesByURL allValues];
}
-#pragma mark ARCHIVING/UNARCHIVING
+// MARK: ARCHIVING/UNARCHIVING
- (void)setHistoryAgeInDaysLimit:(int)limit
{
@@ -676,7 +676,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
[super dealloc];
}
-#pragma mark MODIFYING CONTENTS
+// MARK: MODIFYING CONTENTS
- (void)_sendNotification:(NSString *)name entries:(NSArray *)entries
{
@@ -707,7 +707,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
entries:newEntries];
}
-#pragma mark DATE-BASED RETRIEVAL
+// MARK: DATE-BASED RETRIEVAL
- (NSArray *)orderedLastVisitedDays
{
@@ -719,7 +719,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return [_historyPrivate orderedItemsLastVisitedOnDay:date];
}
-#pragma mark URL MATCHING
+// MARK: URL MATCHING
- (BOOL)containsURL:(NSURL *)URL
{
@@ -731,7 +731,7 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
return [_historyPrivate itemForURL:URL];
}
-#pragma mark SAVING TO DISK
+// MARK: SAVING TO DISK
- (BOOL)loadFromURL:(NSURL *)URL error:(NSError **)error
{
diff --git a/WebKit/mac/Info.plist b/WebKit/mac/Info.plist
index 7232293..34ec7d4 100644
--- a/WebKit/mac/Info.plist
+++ b/WebKit/mac/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleGetInfoString</key>
- <string>${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.</string>
+ <string>${BUNDLE_VERSION}, Copyright 2003-2011 Apple Inc.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 7837608..7f73443 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -690,7 +690,7 @@ String WebHaltablePlugin::pluginName() const
}
}
-#pragma mark NOTIFICATIONS
+// MARK: NOTIFICATIONS
- (void)windowWillClose:(NSNotification *)notification
{
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index dbbe129..b215c8d 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -199,7 +199,7 @@ typedef struct {
WKSendUserChangeNotifications();
}
-#pragma mark EVENTS
+// MARK: EVENTS
// The WindowRef created by -[NSWindow windowRef] has a QuickDraw GrafPort that covers
// the entire window frame (or structure region to use the Carbon term) rather then just the window content.
@@ -859,7 +859,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
[self didCallPlugInFunction];
}
-#pragma mark WEB_NETSCAPE_PLUGIN
+// MARK: WEB_NETSCAPE_PLUGIN
- (BOOL)isNewWindowEqualToOldWindow
{
@@ -1342,7 +1342,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
#endif
-#pragma mark NSVIEW
+// MARK: NSVIEW
- (id)initWithFrame:(NSRect)frame
pluginPackage:(WebNetscapePluginPackage *)pluginPackage
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 8649662..05db524 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -164,6 +164,7 @@ public:
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
+ virtual void fullScreenRendererChanged(WebCore::RenderBox*);
#endif
#if ENABLE(FULLSCREEN_API)
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 965e607..a2c4ee5 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -29,6 +29,7 @@
#import "WebChromeClient.h"
+#import "DOMElementInternal.h"
#import "DOMNodeInternal.h"
#import "WebDefaultUIDelegate.h"
#import "WebDelegateImplementationCaching.h"
@@ -822,21 +823,41 @@ void WebChromeClient::exitFullscreenForNode(Node*)
bool WebChromeClient::supportsFullScreenForElement(const Element* element)
{
- return CallUIDelegateReturningBoolean(false, m_webView, @selector(webView:supportsFullScreenForElement:), kit(const_cast<WebCore::Element*>(element)));
+ SEL selector = @selector(webView:supportsFullScreenForElement:);
+ if ([[m_webView UIDelegate] respondsToSelector:selector])
+ return CallUIDelegateReturningBoolean(false, m_webView, selector, kit(const_cast<WebCore::Element*>(element)));
+ return [m_webView _supportsFullScreenForElement:const_cast<WebCore::Element*>(element)];
}
void WebChromeClient::enterFullScreenForElement(Element* element)
{
- WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
- CallUIDelegate(m_webView, @selector(webView:enterFullScreenForElement:listener:), kit(element), listener);
- [listener release];
+ SEL selector = @selector(webView:enterFullScreenForElement:listener:);
+ if ([[m_webView UIDelegate] respondsToSelector:selector]) {
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, selector, kit(element), listener);
+ [listener release];
+ } else
+ [m_webView _enterFullScreenForElement:element];
}
void WebChromeClient::exitFullScreenForElement(Element* element)
{
- WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
- CallUIDelegate(m_webView, @selector(webView:exitFullScreenForElement:listener:), kit(element), listener);
- [listener release];
+ SEL selector = @selector(webView:exitFullScreenForElement:listener:);
+ if ([[m_webView UIDelegate] respondsToSelector:selector]) {
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, selector, kit(element), listener);
+ [listener release];
+ } else
+ [m_webView _exitFullScreenForElement:element];
+}
+
+void WebChromeClient::fullScreenRendererChanged(RenderBox* renderer)
+{
+ SEL selector = @selector(webView:fullScreenRendererChanged:);
+ if ([[m_webView UIDelegate] respondsToSelector:selector])
+ CallUIDelegate(m_webView, selector, (id)renderer);
+ else
+ [m_webView _fullScreenRendererChanged:renderer];
}
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 2b3b2cc..9de4246 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -175,6 +175,9 @@ private:
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
@@ -224,6 +227,10 @@ private:
virtual jobject javaApplet(NSView*);
#endif
+#if PLATFORM(MAC)
+ virtual RemoteAXObjectRef accessibilityRemoteObject() { return 0; }
+#endif
+
void setOriginalURLForDownload(WebDownload *, const WebCore::ResourceRequest&) const;
RetainPtr<WebFramePolicyListener> setUpPolicyListener(WebCore::FramePolicyFunction);
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index c8285dc..227d13a 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1253,6 +1253,14 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
}
}
+void WebFrameLoaderClient::didSaveToPageCache()
+{
+}
+
+void WebFrameLoaderClient::didRestoreFromPageCache()
+{
+}
+
void WebFrameLoaderClient::dispatchDidBecomeFrameset(bool)
{
}
@@ -1858,7 +1866,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntS
if (errorCode) {
NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
- contentURL:URL pluginPageURL:nil pluginName:[pluginPackage name] MIMEType:mimeType];
+ contentURL:URL pluginPageURL:nil pluginName:[pluginPackage pluginInfo].name MIMEType:mimeType];
WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
error:error DOMElement:kit(element)] autorelease];
view = nullView;
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index b08c161..5beedcf 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -69,7 +69,7 @@ using namespace WebCore;
- (void)destroyInspectorView:(bool)notifyInspectorController;
@end
-#pragma mark -
+// MARK: -
@interface WebNodeHighlighter : NSObject {
@private
@@ -81,7 +81,7 @@ using namespace WebCore;
- (void)hideHighlight;
@end
-#pragma mark -
+// MARK: -
WebInspectorClient::WebInspectorClient(WebView *webView)
@@ -208,7 +208,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
}
-#pragma mark -
+// MARK: -
@implementation WebInspectorWindowController
- (id)init
@@ -271,7 +271,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[super dealloc];
}
-#pragma mark -
+// MARK: -
- (WebView *)webView
{
@@ -307,7 +307,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
return window;
}
-#pragma mark -
+// MARK: -
- (BOOL)windowShouldClose:(id)sender
{
@@ -385,7 +385,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
}
}
-#pragma mark -
+// MARK: -
- (void)attach
{
@@ -465,8 +465,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[_webView close];
}
-#pragma mark -
-#pragma mark WebNodeHighlight delegate
+// MARK: -
+// MARK: WebNodeHighlight delegate
- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight
{
@@ -478,15 +478,15 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[_inspectedWebView setCurrentNodeHighlight:nil];
}
-#pragma mark -
-#pragma mark UI delegate
+// MARK: -
+// MARK: UI delegate
- (NSUInteger)webView:(WebView *)sender dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
{
return WebDragDestinationActionNone;
}
-#pragma mark -
+// MARK: -
// These methods can be used by UI elements such as menu items and toolbar buttons when the inspector is the key window.
@@ -534,7 +534,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
@end
-#pragma mark -
+// MARK: -
@implementation WebNodeHighlighter
- (id)initWithInspectedWebView:(WebView *)webView
@@ -550,7 +550,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const
[super dealloc];
}
-#pragma mark -
+// MARK: -
- (void)highlightNode:(DOMNode *)node
{
@@ -575,8 +575,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
_currentHighlight = nil;
}
-#pragma mark -
-#pragma mark WebNodeHighlight delegate
+// MARK: -
+// MARK: WebNodeHighlight delegate
- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight
{
diff --git a/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
index f19dcb5..385d869 100644
--- a/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
+++ b/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
@@ -124,8 +124,8 @@ using namespace WebCore;
@end
-#pragma mark -
-#pragma mark WebQuotaManagers
+// MARK: -
+// MARK: WebQuotaManagers
@implementation WebSecurityOrigin (WebQuotaManagers)
@@ -146,8 +146,8 @@ using namespace WebCore;
@end
-#pragma mark -
-#pragma mark Deprecated
+// MARK: -
+// MARK: Deprecated
// FIXME: The following methods are deprecated and should removed later.
// Clients should instead get a WebQuotaManager, and query / set the quota via the Manager.
diff --git a/WebKit/mac/WebView/WebDocumentInternal.h b/WebKit/mac/WebView/WebDocumentInternal.h
index 4bf11d1..bcb6c07 100644
--- a/WebKit/mac/WebView/WebDocumentInternal.h
+++ b/WebKit/mac/WebView/WebDocumentInternal.h
@@ -68,7 +68,8 @@
@end
@protocol WebDocumentOptionsSearching <NSObject>
-- (BOOL)findString:(NSString *)string options:(WebFindOptions)options;
+// Prefixed with an underscore to avoid conflict with Mail's -[WebHTMLView(MailExtras) findString:options:].
+- (BOOL)_findString:(NSString *)string options:(WebFindOptions)options;
@end
/* Used to save and restore state in the view, typically when going back/forward */
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index b0f9bb9..5c2f256 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -56,11 +56,12 @@
#import <WebCore/AccessibilityObject.h>
#import <WebCore/AnimationController.h>
#import <WebCore/CSSMutableStyleDeclaration.h>
+#import <WebCore/CachedResourceLoader.h>
#import <WebCore/Chrome.h>
#import <WebCore/ColorMac.h>
#import <WebCore/DOMImplementation.h>
-#import <WebCore/CachedResourceLoader.h>
#import <WebCore/DocumentFragment.h>
+#import <WebCore/DocumentMarkerController.h>
#import <WebCore/EventHandler.h>
#import <WebCore/EventNames.h>
#import <WebCore/Frame.h>
@@ -688,27 +689,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return _private->coreFrame->view() ? _private->coreFrame->view()->needsLayout() : false;
}
-- (id)_accessibilityTree
-{
-#if HAVE(ACCESSIBILITY)
- if (!AXObjectCache::accessibilityEnabled()) {
- AXObjectCache::enableAccessibility();
- if ([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue])
- AXObjectCache::enableEnhancedUserInterfaceAccessibility();
- }
-
- if (!_private->coreFrame || !_private->coreFrame->document())
- return nil;
- RenderView* root = toRenderView(_private->coreFrame->document()->renderer());
- if (!root)
- return nil;
- return _private->coreFrame->document()->axObjectCache()->getOrCreate(root)->wrapper();
-#else
- return nil;
-#endif
-}
-
-- (DOMRange *)_rangeByAlteringCurrentSelection:(SelectionController::EAlteration)alteration direction:(SelectionController::EDirection)direction granularity:(TextGranularity)granularity
+- (DOMRange *)_rangeByAlteringCurrentSelection:(SelectionController::EAlteration)alteration direction:(SelectionDirection)direction granularity:(TextGranularity)granularity
{
if (_private->coreFrame->selection()->isNone())
return nil;
@@ -1338,13 +1319,14 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (!AXObjectCache::accessibilityEnabled())
return;
- RenderView* root = toRenderView(_private->coreFrame->document()->renderer());
- if (!root)
+ if (!_private->coreFrame || !_private->coreFrame->document())
return;
- AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->getOrCreate(root);
- String strName(name);
- rootObject->setAccessibleName(strName);
+ AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject();
+ if (rootObject) {
+ String strName(name);
+ rootObject->setAccessibleName(strName);
+ }
#endif
}
@@ -1365,6 +1347,27 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return coreFrame->editor()->selectionStartHasSpellingMarkerFor(from, length);
}
+- (id)accessibilityRoot
+{
+#if HAVE(ACCESSIBILITY)
+ if (!AXObjectCache::accessibilityEnabled()) {
+ AXObjectCache::enableAccessibility();
+ if ([[NSApp accessibilityAttributeValue:NSAccessibilityEnhancedUserInterfaceAttribute] boolValue])
+ AXObjectCache::enableEnhancedUserInterfaceAccessibility();
+ }
+
+ if (!_private->coreFrame || !_private->coreFrame->document())
+ return nil;
+
+ AccessibilityObject* rootObject = _private->coreFrame->document()->axObjectCache()->rootObject();
+ if (rootObject)
+ return rootObject->wrapper();
+ return nil;
+#else
+ return nil;
+#endif
+}
+
@end
@implementation WebFrame
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 8cdc272..7ff5e75 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -138,9 +138,7 @@ WebView *getWebView(WebFrame *webFrame);
- (NSRect)_firstRectForDOMRange:(DOMRange *)range;
- (void)_scrollDOMRangeToVisible:(DOMRange *)range;
-- (id)_accessibilityTree;
-
-- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
+- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionDirection)direction granularity:(WebCore::TextGranularity)granularity;
- (NSRange)_convertToNSRange:(WebCore::Range*)range;
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index b0cb0f3..ddfa5cc 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -142,4 +142,7 @@ typedef enum {
// Returns whether there is a spelling marker in the specified range of the focused node.
- (BOOL)hasSpellingMarker:(int)location length:(int)length;
+// The top of the accessibility tree.
+- (id)accessibilityRoot;
+
@end
diff --git a/WebKit/mac/WebView/WebFullScreenController.h b/WebKit/mac/WebView/WebFullScreenController.h
new file mode 100644
index 0000000..f867dc2
--- /dev/null
+++ b/WebKit/mac/WebView/WebFullScreenController.h
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#if ENABLE(FULLSCREEN_API)
+
+#import <wtf/RefPtr.h>
+
+@class WebWindowFadeAnimation;
+@class WebView;
+namespace WebCore {
+ class Element;
+ class RenderBox;
+ class EventListener;
+}
+
+@interface WebFullScreenController : NSWindowController {
+@private
+ RefPtr<WebCore::Element> _element;
+ WebCore::RenderBox* _renderer; // (set)
+ RefPtr<WebCore::Element> _replacementElement;
+ NSWindow *_backgroundFullscreenWindow; // (retain)
+ WebWindowFadeAnimation *_fadeAnimation; // (retain)
+ WebView *_webView;
+ NSView* _placeholderView;
+ CALayer* _rendererLayer;
+ CALayer* _backgroundLayer;
+ RefPtr<WebCore::EventListener> _mediaEventListener;
+
+ BOOL _isAnimating;
+ BOOL _isFullscreen;
+ BOOL _isWindowLoaded;
+ BOOL _forceDisableAnimation;
+ BOOL _isPlaying;
+ uint32_t _idleDisplaySleepAssertion;
+ uint32_t _idleSystemSleepAssertion;
+ NSTimer *_tickleTimer;
+ SystemUIMode _savedUIMode;
+ SystemUIOptions _savedUIOptions;
+ CGRect _initialFrame;
+}
+
+- (WebView*)webView;
+- (void)setWebView:(WebView*)webView;
+
+- (void)setElement:(PassRefPtr<WebCore::Element>)element;
+- (WebCore::Element*)element;
+
+- (void)setRenderer:(WebCore::RenderBox*)renderer;
+- (WebCore::RenderBox*)renderer;
+
+- (void)enterFullscreen:(NSScreen *)screen;
+- (void)exitFullscreen;
+
+@end
+
+#endif // ENABLE(FULLSCREEN_API)
diff --git a/WebKit/mac/WebView/WebFullScreenController.mm b/WebKit/mac/WebView/WebFullScreenController.mm
new file mode 100644
index 0000000..a958e90
--- /dev/null
+++ b/WebKit/mac/WebView/WebFullScreenController.mm
@@ -0,0 +1,923 @@
+/*
+ * 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.
+ */
+
+#if ENABLE(FULLSCREEN_API)
+
+#import "WebFullScreenController.h"
+
+#import "WebPreferencesPrivate.h"
+#import "WebWindowAnimation.h"
+#import "WebViewInternal.h"
+#import <IOKit/pwr_mgt/IOPMLib.h>
+#import <WebCore/AnimationList.h>
+#import <WebCore/CSSPropertyNames.h>
+#import <WebCore/Color.h>
+#import <WebCore/Document.h>
+#import <WebCore/DOMDocument.h>
+#import <WebCore/DOMDocumentInternal.h>
+#import <WebCore/DOMHTMLElement.h>
+#import <WebCore/DOMWindow.h>
+#import <WebCore/EventListener.h>
+#import <WebCore/EventNames.h>
+#import <WebCore/HTMLElement.h>
+#import <WebCore/HTMLNames.h>
+#import <WebCore/HTMLMediaElement.h>
+#import <WebCore/IntRect.h>
+#import <WebCore/NodeList.h>
+#import <WebCore/SoftLinking.h>
+#import <WebCore/RenderBlock.h>
+#import <WebCore/RenderLayer.h>
+#import <WebCore/RenderLayerBacking.h>
+#import <objc/objc-runtime.h>
+#import <wtf/UnusedParam.h>
+
+static const NSTimeInterval tickleTimerInterval = 1.0;
+static NSString* const isEnteringFullscreenKey = @"isEnteringFullscreen";
+
+using namespace WebCore;
+
+#if defined(BUILDING_ON_LEOPARD)
+@interface CATransaction(SnowLeopardConvenienceFunctions)
++ (void)setDisableActions:(BOOL)flag;
++ (void)setAnimationDuration:(CFTimeInterval)dur;
+@end
+
+@implementation CATransaction(SnowLeopardConvenienceFunctions)
++ (void)setDisableActions:(BOOL)flag
+{
+ [self setValue:[NSNumber numberWithBool:flag] forKey:kCATransactionDisableActions];
+}
+
++ (void)setAnimationDuration:(CFTimeInterval)dur
+{
+ [self setValue:[NSNumber numberWithDouble:dur] forKey:kCATransactionAnimationDuration];
+}
+@end
+
+#endif
+
+@interface WebFullscreenWindow : NSWindow
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
+<NSAnimationDelegate>
+#endif
+{
+ NSView* _animationView;
+
+ CALayer* _rendererLayer;
+ CALayer* _backgroundLayer;
+}
+- (CALayer*)rendererLayer;
+- (void)setRendererLayer:(CALayer*)rendererLayer;
+- (CALayer*)backgroundLayer;
+- (NSView*)animationView;
+@end
+
+class MediaEventListener : public EventListener {
+public:
+ static PassRefPtr<MediaEventListener> create(WebFullScreenController* delegate);
+ virtual bool operator==(const EventListener&);
+ virtual void handleEvent(ScriptExecutionContext*, Event*);
+
+private:
+ MediaEventListener(WebFullScreenController* delegate);
+ WebFullScreenController* delegate;
+};
+
+@interface WebFullScreenController(Private)
+- (void)_requestExitFullscreenWithAnimation:(BOOL)animation;
+- (void)_updateMenuAndDockForFullscreen;
+- (void)_updatePowerAssertions;
+- (WebFullscreenWindow *)_fullscreenWindow;
+- (Document*)_document;
+- (CFTimeInterval)_animationDuration;
+- (BOOL)_isAnyMoviePlaying;
+@end
+
+@interface NSWindow(IsOnActiveSpaceAdditionForTigerAndLeopard)
+- (BOOL)isOnActiveSpace;
+@end
+
+@implementation WebFullScreenController
+
+#pragma mark -
+#pragma mark Initialization
+- (id)init
+{
+ // Do not defer window creation, to make sure -windowNumber is created (needed by WebWindowScaleAnimation).
+ NSWindow *window = [[WebFullscreenWindow alloc] initWithContentRect:NSZeroRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+ self = [super initWithWindow:window];
+ [window release];
+ if (!self)
+ return nil;
+ [self windowDidLoad];
+ _mediaEventListener = MediaEventListener::create(self);
+ return self;
+
+}
+
+- (void)dealloc
+{
+ ASSERT(!_tickleTimer);
+
+ [self setWebView:nil];
+ [_placeholderView release];
+
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [super dealloc];
+}
+
+- (void)windowDidLoad
+{
+#ifdef BUILDING_ON_TIGER
+ // WebFullScreenController is not supported on Tiger:
+ ASSERT_NOT_REACHED();
+#else
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidResignActive:) name:NSApplicationDidResignActiveNotification object:NSApp];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidChangeScreenParameters:) name:NSApplicationDidChangeScreenParametersNotification object:NSApp];
+#endif
+}
+
+#pragma mark -
+#pragma mark Accessors
+
+- (WebView*)webView
+{
+ return _webView;
+}
+
+- (void)setWebView:(WebView *)webView
+{
+ [webView retain];
+ [_webView release];
+ _webView = webView;
+}
+
+- (Element*)element
+{
+ return _element.get();
+}
+
+- (void)setElement:(PassRefPtr<Element>)element
+{
+#ifdef BUILDING_ON_TIGER
+ // WebFullScreenController is not supported on Tiger:
+ ASSERT_NOT_REACHED();
+#else
+ // When a new Element is set as the current full screen element, register event
+ // listeners on that Element's window, listening for changes in media play states.
+ // We will use these events to determine whether to disable the screensaver and
+ // display sleep timers when playing video in full screen. Make sure to unregister
+ // the events on the old element's window, if necessary, as well.
+
+ EventNames& eventNames = WebCore::eventNames();
+
+ if (_element) {
+ DOMWindow* window = _element->document()->domWindow();
+ if (window) {
+ window->removeEventListener(eventNames.playEvent, _mediaEventListener.get(), true);
+ window->removeEventListener(eventNames.pauseEvent, _mediaEventListener.get(), true);
+ window->removeEventListener(eventNames.endedEvent, _mediaEventListener.get(), true);
+ }
+ }
+
+ _element = element;
+
+ if (_element) {
+ DOMWindow* window = _element->document()->domWindow();
+ if (window) {
+ window->addEventListener(eventNames.playEvent, _mediaEventListener, true);
+ window->addEventListener(eventNames.pauseEvent, _mediaEventListener, true);
+ window->addEventListener(eventNames.endedEvent, _mediaEventListener, true);
+ }
+ }
+#endif
+}
+
+- (RenderBox*)renderer
+{
+ return _renderer;
+}
+
+- (void)setRenderer:(RenderBox*)renderer
+{
+#ifdef BUILDING_ON_TIGER
+ // WebFullScreenController is not supported on Tiger:
+ ASSERT_NOT_REACHED();
+#else
+ _renderer = renderer;
+#endif
+}
+
+#pragma mark -
+#pragma mark Notifications
+
+- (void)windowDidExitFullscreen:(BOOL)finished
+{
+ if (!_isAnimating)
+ return;
+
+ if (_isFullscreen)
+ return;
+
+ NSDisableScreenUpdates();
+ ASSERT(_element);
+ [self _document]->setFullScreenRendererBackgroundColor(Color::black);
+ [self _document]->webkitDidExitFullScreenForElement(_element.get());
+ [self setElement:nil];
+
+ if (finished) {
+ [self _updateMenuAndDockForFullscreen];
+ [self _updatePowerAssertions];
+
+ [[_webView window] display];
+ [[self _fullscreenWindow] setRendererLayer:nil];
+ [[self window] close];
+ }
+
+ NSEnableScreenUpdates();
+
+ _isAnimating = NO;
+ [self autorelease]; // Associated -retain is in -exitFullscreen.
+}
+
+- (void)windowDidEnterFullscreen:(BOOL)finished
+{
+ if (!_isAnimating)
+ return;
+
+ if (!_isFullscreen)
+ return;
+
+ NSDisableScreenUpdates();
+ [self _document]->webkitDidEnterFullScreenForElement(_element.get());
+ [self _document]->setFullScreenRendererBackgroundColor(Color::black);
+
+ if (finished) {
+ [self _updateMenuAndDockForFullscreen];
+ [self _updatePowerAssertions];
+ [NSCursor setHiddenUntilMouseMoves:YES];
+
+ // Move the webView into our fullscreen Window
+ if (!_placeholderView)
+ _placeholderView = [[NSView alloc] init];
+
+ // Do not swap the placeholder into place if already is in a window,
+ // assuming the placeholder's window will always be the webView's
+ // original window.
+ if (![_placeholderView window]) {
+ WebView* webView = [self webView];
+ [_placeholderView setFrame:[webView frame]];
+ [_placeholderView setAutoresizingMask:[webView autoresizingMask]];
+ [_placeholderView removeFromSuperview];
+ [[webView superview] replaceSubview:webView with:_placeholderView];
+
+ [[[self window] contentView] addSubview:webView];
+ [webView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
+ [webView setFrame:[[[self window] contentView] bounds]];
+ }
+
+ WebFullscreenWindow* window = [self _fullscreenWindow];
+ [window setBackgroundColor:[NSColor blackColor]];
+ [window setOpaque:YES];
+
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
+ [[[window animationView] layer] setOpacity:0];
+ [CATransaction commit];
+ }
+ NSEnableScreenUpdates();
+
+ _isAnimating = NO;
+}
+
+- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)finished
+{
+ BOOL isEnteringFullscreenAnimation = [[anim valueForKey:isEnteringFullscreenKey] boolValue];
+
+ if (!isEnteringFullscreenAnimation)
+ [self windowDidExitFullscreen:finished];
+ else
+ [self windowDidEnterFullscreen:finished];
+}
+
+- (void)applicationDidResignActive:(NSNotification*)notification
+{
+ // Check to see if the fullscreenWindow is on the active space; this function is available
+ // on 10.6 and later, so default to YES if the function is not available:
+ NSWindow* fullscreenWindow = [self _fullscreenWindow];
+ BOOL isOnActiveSpace = ([fullscreenWindow respondsToSelector:@selector(isOnActiveSpace)] ? [fullscreenWindow isOnActiveSpace] : YES);
+
+ // Replicate the QuickTime Player (X) behavior when losing active application status:
+ // Is the fullscreen screen the main screen? (Note: this covers the case where only a
+ // single screen is available.) Is the fullscreen screen on the current space? IFF so,
+ // then exit fullscreen mode.
+ if ([fullscreenWindow screen] == [[NSScreen screens] objectAtIndex:0] && isOnActiveSpace)
+ [self _requestExitFullscreenWithAnimation:NO];
+}
+
+- (void)applicationDidChangeScreenParameters:(NSNotification*)notification
+{
+ // The user may have changed the main screen by moving the menu bar, or they may have changed
+ // the Dock's size or location, or they may have changed the fullscreen screen's dimensions.
+ // Update our presentation parameters, and ensure that the full screen window occupies the
+ // entire screen:
+ [self _updateMenuAndDockForFullscreen];
+ NSWindow* window = [self window];
+ [window setFrame:[[window screen] frame] display:YES];
+}
+
+#pragma mark -
+#pragma mark Exposed Interface
+
+- (void)enterFullscreen:(NSScreen *)screen
+{
+ // Disable animation if we are already in full-screen mode.
+ BOOL shouldAnimate = !_isFullscreen;
+
+ if (_isAnimating) {
+ // The CAAnimation delegate functions will only be called the
+ // next trip through the run-loop, so manually call the delegate
+ // function here, letting it know the animation did not complete:
+ [self windowDidExitFullscreen:NO];
+ ASSERT(!_isAnimating);
+ }
+ _isFullscreen = YES;
+ _isAnimating = YES;
+
+ // setElement: must be called with a non-nil value before calling enterFullscreen:.
+ ASSERT(_element);
+
+ NSDisableScreenUpdates();
+
+ if (!screen)
+ screen = [NSScreen mainScreen];
+ NSRect screenFrame = [screen frame];
+
+ WebView* webView = [self webView];
+ NSRect webViewFrame = [webView convertRectToBase:[webView frame]];
+ webViewFrame.origin = [[webView window] convertBaseToScreen:webViewFrame.origin];
+
+ NSRect elementFrame = _element->screenRect();
+
+ // In the case of a multi-monitor setup where the webView straddles two
+ // monitors, we must create a window large enough to contain the destination
+ // frame and the initial frame.
+ NSRect windowFrame = NSUnionRect(screenFrame, elementFrame);
+ [[self window] setFrame:windowFrame display:YES];
+
+ // In a previous incarnation, the NSWindow attached to this controller may have
+ // been on a different screen. Temporarily change the collectionBehavior of the window:
+ NSWindowCollectionBehavior behavior = [[self window] collectionBehavior];
+ [[self window] setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
+ [[self window] makeKeyAndOrderFront:self];
+ [[self window] setCollectionBehavior:behavior];
+
+ NSView* animationView = [[self _fullscreenWindow] animationView];
+ NSRect viewBounds = [animationView bounds];
+
+ NSRect backgroundBounds = {[[self window] convertScreenToBase:screenFrame.origin], screenFrame.size};
+ backgroundBounds = [animationView convertRectFromBase:backgroundBounds];
+ // Flip the background layer's coordinate system.
+ backgroundBounds.origin.y = windowFrame.size.height - NSMaxY(backgroundBounds);
+
+ // Set our fullscreen element's initial frame, and flip the coordinate systems from
+ // screen coordinates (bottom/left) to layer coordinates (top/left):
+ _initialFrame = NSRectToCGRect(NSIntersectionRect(elementFrame, webViewFrame));
+ _initialFrame.origin.y = screenFrame.size.height - CGRectGetMaxY(_initialFrame);
+
+ // Inform the document that we will begin entering full screen. This will change
+ // pseudo-classes on the fullscreen element and the document element.
+ Document* document = [self _document];
+ document->webkitWillEnterFullScreenForElement(_element.get());
+
+ // Check to see if the fullscreen renderer is composited. If not, accelerated graphics
+ // may be disabled. In this case, do not attempt to animate the contents into place;
+ // merely snap to the final position:
+ if (!shouldAnimate || !_renderer || !_renderer->layer()->isComposited()) {
+ [self windowDidEnterFullscreen:YES];
+ NSEnableScreenUpdates();
+ return;
+ }
+
+ // Set up the final style of the FullScreen render block. Set an absolute
+ // width and height equal to the size of the screen, and anchor the layer
+ // at the top, left at (0,0). The RenderFullScreen style is already set
+ // to position:fixed.
+ [self _document]->setFullScreenRendererSize(IntSize(screenFrame.size));
+ [self _document]->setFullScreenRendererBackgroundColor(Color::transparent);
+
+ // Cause the document to layout, thus calculating a new fullscreen element size:
+ [self _document]->updateLayout();
+
+ // FIXME: try to use the fullscreen element's calculated x, y, width, and height instead of the
+ // renderBox functions:
+ RenderBox* childRenderer = _renderer->firstChildBox();
+ CGRect destinationFrame = CGRectMake(childRenderer->x(), childRenderer->y(), childRenderer->width(), childRenderer->height());
+
+ // Some properties haven't propogated from the GraphicsLayer to the CALayer yet. So
+ // tell the renderer's layer to sync it's compositing state:
+ GraphicsLayer* rendererGraphics = _renderer->layer()->backing()->graphicsLayer();
+ rendererGraphics->syncCompositingState();
+
+ CALayer* rendererLayer = rendererGraphics->platformLayer();
+ [[self _fullscreenWindow] setRendererLayer:rendererLayer];
+
+ CFTimeInterval duration = [self _animationDuration];
+
+ // Create a transformation matrix that will transform the renderer layer such that
+ // the fullscreen element appears to move from its starting position and size to its
+ // final one. Perform the transformation in two steps, using the CALayer's matrix
+ // math to calculate the effects of each step:
+ // 1. Apply a scale tranform to shrink the apparent size of the layer to the original
+ // element screen size.
+ // 2. Apply a translation transform to move the shrunk layer into the same screen position
+ // as the original element.
+ CATransform3D shrinkTransform = CATransform3DMakeScale(_initialFrame.size.width / destinationFrame.size.width, _initialFrame.size.height / destinationFrame.size.height, 1);
+ [rendererLayer setTransform:shrinkTransform];
+ CGRect shrunkDestinationFrame = [rendererLayer convertRect:destinationFrame toLayer:[animationView layer]];
+ CATransform3D moveTransform = CATransform3DMakeTranslation(_initialFrame.origin.x - shrunkDestinationFrame.origin.x, _initialFrame.origin.y - shrunkDestinationFrame.origin.y, 0);
+ CATransform3D finalTransform = CATransform3DConcat(shrinkTransform, moveTransform);
+ [rendererLayer setTransform:finalTransform];
+ CGRect translatedDestinationFrame = [rendererLayer convertRect:destinationFrame toLayer:[animationView layer]];
+
+ CALayer* backgroundLayer = [[self _fullscreenWindow] backgroundLayer];
+
+ // Start the opacity animation. We can use implicit animations here because we don't care when
+ // the animation finishes.
+ [CATransaction begin];
+ [CATransaction setAnimationDuration:duration];
+ [backgroundLayer setOpacity:1];
+ [CATransaction commit];
+
+ // Use a CABasicAnimation here for the zoom effect. We want to be notified that the animation has
+ // completed by way of the CAAnimation delegate.
+ CABasicAnimation* zoomAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
+ [zoomAnimation setFromValue:[NSValue valueWithCATransform3D:finalTransform]];
+ [zoomAnimation setToValue:[NSValue valueWithCATransform3D:CATransform3DIdentity]];
+ [zoomAnimation setDelegate:self];
+ [zoomAnimation setDuration:duration];
+ [zoomAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+ [zoomAnimation setFillMode:kCAFillModeForwards];
+ [zoomAnimation setValue:(id)kCFBooleanTrue forKey:isEnteringFullscreenKey];
+
+ // Disable implicit animations and set the layer's transformation matrix to its final state.
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
+ [rendererLayer setTransform:CATransform3DIdentity];
+ [rendererLayer addAnimation:zoomAnimation forKey:@"zoom"];
+ [backgroundLayer setFrame:NSRectToCGRect(backgroundBounds)];
+ [CATransaction commit];
+
+ NSEnableScreenUpdates();
+}
+
+- (void)exitFullscreen
+{
+ if (!_isFullscreen)
+ return;
+
+ CATransform3D startTransform = CATransform3DIdentity;
+ if (_isAnimating) {
+ if (_renderer && _renderer->layer()->isComposited()) {
+ CALayer* rendererLayer = _renderer->layer()->backing()->graphicsLayer()->platformLayer();
+ startTransform = [[rendererLayer presentationLayer] transform];
+ }
+
+ // The CAAnimation delegate functions will only be called the
+ // next trip through the run-loop, so manually call the delegate
+ // function here, letting it know the animation did not complete:
+ [self windowDidEnterFullscreen:NO];
+ ASSERT(!_isAnimating);
+ }
+ _isFullscreen = NO;
+ _isAnimating = YES;
+
+ NSDisableScreenUpdates();
+
+ // The user may have moved the fullscreen window in Spaces, so temporarily change
+ // the collectionBehavior of the webView's window:
+ NSWindow* webWindow = [[self webView] window];
+ NSWindowCollectionBehavior behavior = [webWindow collectionBehavior];
+ [webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
+ [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
+ [webWindow setCollectionBehavior:behavior];
+
+ // The fullscreen animation may have been cancelled before the
+ // webView was moved to the fullscreen window. Check to see
+ // if the _placeholderView exists and is in a window before
+ // attempting to swap the webView back to it's original tree:
+ if (_placeholderView && [_placeholderView window]) {
+ // Move the webView back to its own native window:
+ WebView* webView = [self webView];
+ [webView setFrame:[_placeholderView frame]];
+ [webView setAutoresizingMask:[_placeholderView autoresizingMask]];
+ [webView removeFromSuperview];
+ [[_placeholderView superview] replaceSubview:_placeholderView with:webView];
+
+ // Because the animation view is layer-hosted, make sure to
+ // disable animations when changing the layer's opacity. Other-
+ // wise, the content will appear to fade into view.
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
+ WebFullscreenWindow* window = [self _fullscreenWindow];
+ [[[window animationView] layer] setOpacity:1];
+ [window setBackgroundColor:[NSColor clearColor]];
+ [window setOpaque:NO];
+ [CATransaction commit];
+ }
+
+ NSView* animationView = [[self _fullscreenWindow] animationView];
+ CGRect layerEndFrame = NSRectToCGRect([animationView convertRect:NSRectFromCGRect(_initialFrame) fromView:nil]);
+
+ // The _renderer might be NULL due to its ancestor being removed:
+ CGRect layerStartFrame = CGRectZero;
+ if (_renderer) {
+ RenderBox* childRenderer = _renderer->firstChildBox();
+ layerStartFrame = CGRectMake(childRenderer->x(), childRenderer->y(), childRenderer->width(), childRenderer->height());
+ }
+
+ [self _document]->webkitWillExitFullScreenForElement(_element.get());
+ [self _document]->updateLayout();
+
+ // We have to retain ourselves because we want to be alive for the end of the animation.
+ // If our owner releases us we could crash if this is not the case.
+ // Balanced in windowDidExitFullscreen
+ [self retain];
+
+ // Check to see if the fullscreen renderer is composited. If not, accelerated graphics
+ // may be disabled. In this case, do not attempt to animate the contents into place;
+ // merely snap to the final position:
+ if (!_renderer || !_renderer->layer()->isComposited()) {
+ [self windowDidExitFullscreen:YES];
+ NSEnableScreenUpdates();
+ return;
+ }
+
+ GraphicsLayer* rendererGraphics = _renderer->layer()->backing()->graphicsLayer();
+
+ [self _document]->setFullScreenRendererBackgroundColor(Color::transparent);
+
+ rendererGraphics->syncCompositingState();
+
+ CALayer* rendererLayer = rendererGraphics->platformLayer();
+ [[self _fullscreenWindow] setRendererLayer:rendererLayer];
+
+ // Create a transformation matrix that will transform the renderer layer such that
+ // the fullscreen element appears to move from the full screen to its original position
+ // and size. Perform the transformation in two steps, using the CALayer's matrix
+ // math to calculate the effects of each step:
+ // 1. Apply a scale tranform to shrink the apparent size of the layer to the original
+ // element screen size.
+ // 2. Apply a translation transform to move the shrunk layer into the same screen position
+ // as the original element.
+ CATransform3D shrinkTransform = CATransform3DMakeScale(layerEndFrame.size.width / layerStartFrame.size.width, layerEndFrame.size.height / layerStartFrame.size.height, 1);
+ [rendererLayer setTransform:shrinkTransform];
+ CGRect shrunkDestinationFrame = [rendererLayer convertRect:layerStartFrame toLayer:[animationView layer]];
+ CATransform3D moveTransform = CATransform3DMakeTranslation(layerEndFrame.origin.x - shrunkDestinationFrame.origin.x, layerEndFrame.origin.y - shrunkDestinationFrame.origin.y, 0);
+ CATransform3D finalTransform = CATransform3DConcat(shrinkTransform, moveTransform);
+ [rendererLayer setTransform:finalTransform];
+ CGRect translatedDestinationFrame = [rendererLayer convertRect:layerStartFrame toLayer:[animationView layer]];
+
+ CFTimeInterval duration = [self _animationDuration];
+
+ CALayer* backgroundLayer = [[self _fullscreenWindow] backgroundLayer];
+ [CATransaction begin];
+ [CATransaction setAnimationDuration:duration];
+ [backgroundLayer setOpacity:0];
+ [CATransaction commit];
+
+ CABasicAnimation* zoomAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
+ [zoomAnimation setFromValue:[NSValue valueWithCATransform3D:startTransform]];
+ [zoomAnimation setToValue:[NSValue valueWithCATransform3D:finalTransform]];
+ [zoomAnimation setDelegate:self];
+ [zoomAnimation setDuration:duration];
+ [zoomAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
+ [zoomAnimation setFillMode:kCAFillModeBoth];
+ [zoomAnimation setRemovedOnCompletion:NO];
+ [zoomAnimation setValue:(id)kCFBooleanFalse forKey:isEnteringFullscreenKey];
+
+ [rendererLayer addAnimation:zoomAnimation forKey:@"zoom"];
+
+ NSEnableScreenUpdates();
+}
+
+#pragma mark -
+#pragma mark Internal Interface
+
+- (void)_updateMenuAndDockForFullscreen
+{
+ // NSApplicationPresentationOptions is available on > 10.6 only:
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSApplicationPresentationOptions options = NSApplicationPresentationDefault;
+ NSScreen* fullscreenScreen = [[self window] screen];
+
+ if (_isFullscreen) {
+ // Auto-hide the menu bar if the fullscreenScreen contains the menu bar:
+ // NOTE: if the fullscreenScreen contains the menu bar but not the dock, we must still
+ // auto-hide the dock, or an exception will be thrown.
+ if ([[NSScreen screens] objectAtIndex:0] == fullscreenScreen)
+ options |= (NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock);
+ // Check if the current screen contains the dock by comparing the screen's frame to its
+ // visibleFrame; if a dock is present, the visibleFrame will differ. If the current screen
+ // contains the dock, hide it.
+ else if (!NSEqualRects([fullscreenScreen frame], [fullscreenScreen visibleFrame]))
+ options |= NSApplicationPresentationAutoHideDock;
+ }
+
+ if ([NSApp respondsToSelector:@selector(setPresentationOptions:)])
+ [NSApp setPresentationOptions:options];
+ else
+#endif
+ SetSystemUIMode(_isFullscreen ? kUIModeNormal : kUIModeAllHidden, 0);
+}
+
+#if !defined(BUILDING_ON_TIGER) // IOPMAssertionCreateWithName not defined on < 10.5
+- (void)_disableIdleDisplaySleep
+{
+ if (_idleDisplaySleepAssertion == kIOPMNullAssertionID)
+#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK
+ IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &_idleDisplaySleepAssertion);
+#else // IOPMAssertionCreate is depreciated in > 10.5
+ IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleDisplaySleepAssertion);
+#endif
+}
+
+- (void)_enableIdleDisplaySleep
+{
+ if (_idleDisplaySleepAssertion != kIOPMNullAssertionID) {
+ IOPMAssertionRelease(_idleDisplaySleepAssertion);
+ _idleDisplaySleepAssertion = kIOPMNullAssertionID;
+ }
+}
+
+- (void)_disableIdleSystemSleep
+{
+ if (_idleSystemSleepAssertion == kIOPMNullAssertionID)
+#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK
+ IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &_idleSystemSleepAssertion);
+#else // IOPMAssertionCreate is depreciated in > 10.5
+ IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleSystemSleepAssertion);
+#endif
+}
+
+- (void)_enableIdleSystemSleep
+{
+ if (_idleSystemSleepAssertion != kIOPMNullAssertionID) {
+ IOPMAssertionRelease(_idleSystemSleepAssertion);
+ _idleSystemSleepAssertion = kIOPMNullAssertionID;
+ }
+}
+
+- (void)_enableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = [[NSTimer scheduledTimerWithTimeInterval:tickleTimerInterval target:self selector:@selector(_tickleTimerFired) userInfo:nil repeats:YES] retain];
+}
+
+- (void)_disableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = nil;
+}
+
+- (void)_tickleTimerFired
+{
+ UpdateSystemActivity(OverallAct);
+}
+#endif
+
+- (void)_updatePowerAssertions
+{
+#if !defined(BUILDING_ON_TIGER)
+ BOOL isPlaying = [self _isAnyMoviePlaying];
+
+ if (isPlaying && _isFullscreen) {
+ [self _disableIdleSystemSleep];
+ [self _disableIdleDisplaySleep];
+ [self _enableTickleTimer];
+ } else {
+ [self _enableIdleSystemSleep];
+ [self _enableIdleDisplaySleep];
+ [self _disableTickleTimer];
+ }
+#endif
+}
+
+- (void)_requestExit
+{
+ [self exitFullscreen];
+ _forceDisableAnimation = NO;
+}
+
+- (void)_requestExitFullscreenWithAnimation:(BOOL)animation
+{
+ _forceDisableAnimation = !animation;
+ [self performSelector:@selector(_requestExit) withObject:nil afterDelay:0];
+
+}
+
+- (BOOL)_isAnyMoviePlaying
+{
+ if (!_element)
+ return NO;
+
+ Node* nextNode = _element.get();
+ while (nextNode)
+ {
+ if (nextNode->hasTagName(HTMLNames::videoTag)) {
+ HTMLMediaElement* element = static_cast<HTMLMediaElement*>(nextNode);
+ if (!element->paused() && !element->ended())
+ return YES;
+ }
+
+ nextNode = nextNode->traverseNextNode(_element.get());
+ }
+
+ return NO;
+}
+
+#pragma mark -
+#pragma mark Utility Functions
+
+- (WebFullscreenWindow *)_fullscreenWindow
+{
+ return (WebFullscreenWindow *)[self window];
+}
+
+- (Document*)_document
+{
+ return core([[[self webView] mainFrame] DOMDocument]);
+}
+
+- (CFTimeInterval)_animationDuration
+{
+ static const CFTimeInterval defaultDuration = 0.5;
+ CFTimeInterval duration = defaultDuration;
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSUInteger modifierFlags = [NSEvent modifierFlags];
+#else
+ NSUInteger modifierFlags = [[NSApp currentEvent] modifierFlags];
+#endif
+ if ((modifierFlags & NSControlKeyMask) == NSControlKeyMask)
+ duration *= 2;
+ if ((modifierFlags & NSShiftKeyMask) == NSShiftKeyMask)
+ duration *= 10;
+ if (_forceDisableAnimation) {
+ // This will disable scale animation
+ duration = 0;
+ }
+ return duration;
+}
+
+@end
+
+#pragma mark -
+@implementation WebFullscreenWindow
+
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
+{
+ UNUSED_PARAM(aStyle);
+ self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag];
+ if (!self)
+ return nil;
+ [self setOpaque:NO];
+ [self setBackgroundColor:[NSColor clearColor]];
+ [self setIgnoresMouseEvents:NO];
+ [self setAcceptsMouseMovedEvents:YES];
+ [self setReleasedWhenClosed:NO];
+ [self setHasShadow:YES];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ [self setMovable:NO];
+#else
+ [self setMovableByWindowBackground:NO];
+#endif
+
+ NSView* contentView = [self contentView];
+ _animationView = [[NSView alloc] initWithFrame:[contentView bounds]];
+
+ CALayer* contentLayer = [[CALayer alloc] init];
+ [_animationView setLayer:contentLayer];
+ [_animationView setWantsLayer:YES];
+ [_animationView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
+ [contentView addSubview:_animationView];
+
+ _backgroundLayer = [[CALayer alloc] init];
+ [contentLayer addSublayer:_backgroundLayer];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ [contentLayer setGeometryFlipped:YES];
+#else
+ [contentLayer setSublayerTransform:CATransform3DMakeScale(1, -1, 1)];
+#endif
+ [contentLayer setOpacity:0];
+
+ [_backgroundLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
+ [_backgroundLayer setOpacity:0];
+ return self;
+}
+
+- (void)dealloc
+{
+ [_animationView release];
+ [_backgroundLayer release];
+ [_rendererLayer release];
+ [super dealloc];
+}
+
+- (BOOL)canBecomeKeyWindow
+{
+ return YES;
+}
+
+- (void)keyDown:(NSEvent *)theEvent
+{
+ if ([[theEvent charactersIgnoringModifiers] isEqual:@"\e"]) // Esacpe key-code
+ [self cancelOperation:self];
+ else [super keyDown:theEvent];
+}
+
+- (void)cancelOperation:(id)sender
+{
+ UNUSED_PARAM(sender);
+ [[self windowController] _requestExitFullscreenWithAnimation:YES];
+}
+
+- (CALayer*)rendererLayer
+{
+ return _rendererLayer;
+}
+
+- (void)setRendererLayer:(CALayer *)rendererLayer
+{
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
+ [rendererLayer retain];
+ [_rendererLayer removeFromSuperlayer];
+ [_rendererLayer release];
+ _rendererLayer = rendererLayer;
+
+ if (_rendererLayer)
+ [[[self animationView] layer] addSublayer:_rendererLayer];
+ [CATransaction commit];
+}
+
+- (CALayer*)backgroundLayer
+{
+ return _backgroundLayer;
+}
+
+- (NSView*)animationView
+{
+ return _animationView;
+}
+@end
+
+#pragma mark -
+#pragma mark MediaEventListener
+
+MediaEventListener::MediaEventListener(WebFullScreenController* delegate)
+ : EventListener(CPPEventListenerType)
+ , delegate(delegate)
+{
+}
+
+PassRefPtr<MediaEventListener> MediaEventListener::create(WebFullScreenController* delegate)
+{
+ return adoptRef(new MediaEventListener(delegate));
+}
+
+bool MediaEventListener::operator==(const EventListener& listener)
+{
+ return this == &listener;
+}
+
+void MediaEventListener::handleEvent(ScriptExecutionContext* context, Event* event)
+{
+ [delegate _updatePowerAssertions];
+}
+
+#endif /* ENABLE(FULLSCREEN_API) */
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 3e8be9a..093f3db 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -83,6 +83,7 @@
#import <WebCore/ContextMenuController.h>
#import <WebCore/Document.h>
#import <WebCore/DocumentFragment.h>
+#import <WebCore/DocumentMarkerController.h>
#import <WebCore/DragController.h>
#import <WebCore/Editor.h>
#import <WebCore/EditorDeleteAction.h>
@@ -4273,7 +4274,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
- (id)accessibilityAttributeValue:(NSString*)attributeName
{
if ([attributeName isEqualToString: NSAccessibilityChildrenAttribute]) {
- id accTree = [[self _frame] _accessibilityTree];
+ id accTree = [[self _frame] accessibilityRoot];
if (accTree)
return [NSArray arrayWithObject:accTree];
return nil;
@@ -4283,7 +4284,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
- (id)accessibilityFocusedUIElement
{
- id accTree = [[self _frame] _accessibilityTree];
+ id accTree = [[self _frame] accessibilityRoot];
if (accTree)
return [accTree accessibilityFocusedUIElement];
return self;
@@ -4291,7 +4292,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
- (id)accessibilityHitTest:(NSPoint)point
{
- id accTree = [[self _frame] _accessibilityTree];
+ id accTree = [[self _frame] accessibilityRoot];
if (accTree) {
NSPoint windowCoord = [[self window] convertScreenToBase:point];
return [accTree accessibilityHitTest:[self convertPoint:windowCoord fromView:nil]];
@@ -4301,7 +4302,7 @@ static BOOL isInPasswordField(Frame* coreFrame)
- (id)_accessibilityParentForSubview:(NSView *)subview
{
- id accTree = [[self _frame] _accessibilityTree];
+ id accTree = [[self _frame] accessibilityRoot];
if (!accTree)
return self;
id parent = [accTree _accessibilityParentForSubview:subview];
@@ -6281,7 +6282,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection
{
- return [self findString:string options:(forward ? 0 : WebFindOptionsBackwards) | (caseFlag ? 0 : WebFindOptionsCaseInsensitive) | (startInSelection ? WebFindOptionsStartInSelection : 0)];
+ return [self _findString:string options:(forward ? 0 : WebFindOptionsBackwards) | (caseFlag ? 0 : WebFindOptionsCaseInsensitive) | (startInSelection ? WebFindOptionsStartInSelection : 0)];
}
@end
@@ -6352,7 +6353,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
return result;
}
-- (BOOL)findString:(NSString *)string options:(WebFindOptions)options
+- (BOOL)_findString:(NSString *)string options:(WebFindOptions)options
{
if (![string length])
return NO;
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index 0f54980..445b537 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -106,7 +106,7 @@ extern "C" NSString *_NSPathForSystemFramework(NSString *framework);
- (id)initWithView:(WebPDFView *)view;
@end
-#pragma mark C UTILITY FUNCTIONS
+// MARK: C UTILITY FUNCTIONS
static void _applicationInfoForMIMEType(NSString *type, NSString **name, NSImage **image)
{
@@ -151,7 +151,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
@implementation WebPDFView
-#pragma mark WebPDFView API
+// MARK: WebPDFView API
+ (NSBundle *)PDFKitBundle
{
@@ -190,7 +190,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return [PDFSubview document];
}
-#pragma mark NSObject OVERRIDES
+// MARK: NSObject OVERRIDES
- (void)dealloc
{
@@ -204,7 +204,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
[super dealloc];
}
-#pragma mark NSResponder OVERRIDES
+// MARK: NSResponder OVERRIDES
- (void)centerSelectionInVisibleArea:(id)sender
{
@@ -257,7 +257,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
[self centerSelectionInVisibleArea:nil];
}
-#pragma mark NSView OVERRIDES
+// MARK: NSView OVERRIDES
- (BOOL)acceptsFirstResponder {
return YES;
@@ -483,7 +483,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
firstResponderIsPDFDocumentView = NO;
}
-#pragma mark NSUserInterfaceValidations PROTOCOL IMPLEMENTATION
+// MARK: NSUserInterfaceValidations PROTOCOL IMPLEMENTATION
- (BOOL)validateUserInterfaceItemWithoutDelegate:(id <NSValidatedUserInterfaceItem>)item
{
@@ -510,7 +510,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return CallUIDelegateReturningBoolean(result, [self _webView], @selector(webView:validateUserInterfaceItem:defaultValidation:), item, result);
}
-#pragma mark INTERFACE BUILDER ACTIONS FOR SAFARI
+// MARK: INTERFACE BUILDER ACTIONS FOR SAFARI
// Surprisingly enough, this isn't defined in any superclass, though it is defined in assorted AppKit classes since
// it's a standard menu item IBAction.
@@ -526,7 +526,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
[NSPasteboard _web_setFindPasteboardString:[[PDFSubview currentSelection] string] withOwner:self];
}
-#pragma mark WebFrameView UNDECLARED "DELEGATE METHODS"
+// MARK: WebFrameView UNDECLARED "DELEGATE METHODS"
// This is tested in -[WebFrameView canPrintHeadersAndFooters], but isn't declared anywhere (yuck)
- (BOOL)canPrintHeadersAndFooters
@@ -540,7 +540,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return [[PDFSubview document] getPrintOperationForPrintInfo:printInfo autoRotate:YES];
}
-#pragma mark WebDocumentView PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentView PROTOCOL IMPLEMENTATION
- (void)setDataSource:(WebDataSource *)ds
{
@@ -574,7 +574,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
{
}
-#pragma mark WebDocumentElement PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentElement PROTOCOL IMPLEMENTATION
- (NSDictionary *)elementAtPoint:(NSPoint)point
{
@@ -592,14 +592,14 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return [self elementAtPoint:point];
}
-#pragma mark WebDocumentSearching PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentSearching PROTOCOL IMPLEMENTATION
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag
{
return [self searchFor:string direction:forward caseSensitive:caseFlag wrap:wrapFlag startInSelection:NO];
}
-#pragma mark WebDocumentIncrementalSearching PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentIncrementalSearching PROTOCOL IMPLEMENTATION
- (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag startInSelection:(BOOL)startInSelection
{
@@ -612,7 +612,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return YES;
}
-#pragma mark WebMultipleTextMatches PROTOCOL IMPLEMENTATION
+// MARK: WebMultipleTextMatches PROTOCOL IMPLEMENTATION
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
{
@@ -696,7 +696,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
return result;
}
-#pragma mark WebDocumentText PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentText PROTOCOL IMPLEMENTATION
- (BOOL)supportsTextEncoding
{
@@ -750,7 +750,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
[PDFSubview clearSelection];
}
-#pragma mark WebDocumentViewState PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentViewState PROTOCOL IMPLEMENTATION
// Even though to WebKit we are the "docView", in reality a PDFView contains its own scrollview and docView.
// And it even turns out there is another PDFKit view between the docView and its enclosing ScrollView, so
@@ -809,7 +809,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
[PDFSubview setScaleFactor:[[state objectAtIndex:i++] floatValue]];
}
-#pragma mark _WebDocumentTextSizing PROTOCOL IMPLEMENTATION
+// MARK: _WebDocumentTextSizing PROTOCOL IMPLEMENTATION
- (IBAction)_zoomOut:(id)sender
{
@@ -841,7 +841,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
return [PDFSubview scaleFactor] != 1.0;
}
-#pragma mark WebDocumentSelection PROTOCOL IMPLEMENTATION
+// MARK: WebDocumentSelection PROTOCOL IMPLEMENTATION
- (NSRect)selectionRect
{
@@ -934,7 +934,7 @@ static BOOL isFrameInRange(WebFrame *frame, DOMRange *range)
[pasteboard setString:[self selectedString] forType:NSStringPboardType];
}
-#pragma mark PDFView DELEGATE METHODS
+// MARK: PDFView DELEGATE METHODS
- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)URL
{
diff --git a/WebKit/mac/WebView/WebScriptDebugger.mm b/WebKit/mac/WebView/WebScriptDebugger.mm
index f67b46f..25ef4b7 100644
--- a/WebKit/mac/WebView/WebScriptDebugger.mm
+++ b/WebKit/mac/WebView/WebScriptDebugger.mm
@@ -220,10 +220,12 @@ void WebScriptDebugger::exception(const DebuggerCallFrame& debuggerCallFrame, in
void WebScriptDebugger::willExecuteProgram(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineno)
{
+ callEvent(debuggerCallFrame, sourceID, lineno);
}
void WebScriptDebugger::didExecuteProgram(const DebuggerCallFrame& debuggerCallFrame, intptr_t sourceID, int lineno)
{
+ returnEvent(debuggerCallFrame, sourceID, lineno);
}
void WebScriptDebugger::didReachBreakpoint(const DebuggerCallFrame&, intptr_t, int)
diff --git a/WebKit/mac/WebView/WebScriptWorld.mm b/WebKit/mac/WebView/WebScriptWorld.mm
index 8ca6f44..61daff1 100644
--- a/WebKit/mac/WebView/WebScriptWorld.mm
+++ b/WebKit/mac/WebView/WebScriptWorld.mm
@@ -77,7 +77,7 @@ static WorldMap& allWorlds()
- (void)unregisterWorld
{
- _private->world->unregisterWorld();
+ _private->world->clearWrappers();
}
- (void)dealloc
diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm
index 82ad16c..48b5035 100644
--- a/WebKit/mac/WebView/WebTextCompletionController.mm
+++ b/WebKit/mac/WebView/WebTextCompletionController.mm
@@ -173,7 +173,7 @@ using namespace std;
WebFrame *frame = [_htmlView _frame];
DOMRange *selection = kit(core(frame)->selection()->toNormalizedRange().get());
DOMRange *wholeWord = [frame _rangeByAlteringCurrentSelection:SelectionController::AlterationExtend
- direction:SelectionController::DirectionBackward granularity:WordGranularity];
+ direction:DirectionBackward granularity:WordGranularity];
DOMRange *prefix = [wholeWord cloneRange];
[prefix setEnd:[selection startContainer] offset:[selection startOffset]];
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index 2687b14..93e3d8c 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -219,8 +219,8 @@ static const NSTimeInterval tickleTimerInterval = 1.0;
}
-#pragma mark -
-#pragma mark Exposed Interface
+// MARK: -
+// MARK: Exposed Interface
static void constrainFrameToRatioOfFrame(NSRect *frameToConstrain, const NSRect *frame)
{
@@ -422,8 +422,8 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
#endif
}
-#pragma mark -
-#pragma mark Window callback
+// MARK: -
+// MARK: Window callback
- (void)_requestExit
{
@@ -452,8 +452,8 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
[_hudController fadeWindowIn];
}
-#pragma mark -
-#pragma mark QTMovie callbacks
+// MARK: -
+// MARK: QTMovie callbacks
- (void)rateChanged:(NSNotification *)unusedNotification
{
diff --git a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
index 6907311..0a5aca4 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm
@@ -623,7 +623,7 @@ static NSString *timeToString(double time)
return timeToString([_delegate mediaElement]->currentTime());
}
-#pragma mark NSResponder
+// MARK: NSResponder
- (void)mouseEntered:(NSEvent *)theEvent
{
@@ -659,7 +659,7 @@ static NSString *timeToString(double time)
[_delegate requestExitFullscreen];
}
-#pragma mark NSWindowDelegate
+// MARK: NSWindowDelegate
- (void)windowDidExpose:(NSNotification *)notification
{
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index bd13ff0..9c7de2c 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -60,6 +60,7 @@
#import "WebFormDelegatePrivate.h"
#import "WebFrameInternal.h"
#import "WebFrameViewInternal.h"
+#import "WebFullScreenController.h"
#import "WebGeolocationClient.h"
#import "WebGeolocationPositionInternal.h"
#import "WebHTMLRepresentation.h"
@@ -4286,7 +4287,7 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *string, WebFindOptions options)
{
if ([searchView conformsToProtocol:@protocol(WebDocumentOptionsSearching)])
- return [(NSView <WebDocumentOptionsSearching> *)searchView findString:string options:options];
+ return [(NSView <WebDocumentOptionsSearching> *)searchView _findString:string options:options];
if ([searchView conformsToProtocol:@protocol(WebDocumentIncrementalSearching)])
return [(NSView <WebDocumentIncrementalSearching> *)searchView searchFor:string direction:!(options & WebFindOptionsBackwards) caseSensitive:!(options & WebFindOptionsCaseInsensitive) wrap:!!(options & WebFindOptionsWrapAround) startInSelection:!!(options & WebFindOptionsStartInSelection)];
return [searchView searchFor:string direction:!(options & WebFindOptionsBackwards) caseSensitive:!(options & WebFindOptionsCaseInsensitive) wrap:!!(options & WebFindOptionsWrapAround)];
@@ -6027,6 +6028,42 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
#endif
+#if ENABLE(FULLSCREEN_API)
+- (BOOL)_supportsFullScreenForElement:(const WebCore::Element*)element
+{
+ if (![[WebPreferences standardPreferences] fullScreenEnabled])
+ return NO;
+
+ // FIXME: If the element is in an IFrame, we should ensure it has
+ // an AllowsFullScreen=YES attribute before allowing fullscreen access.
+ return YES;
+}
+
+- (void)_enterFullScreenForElement:(WebCore::Element*)element
+{
+ if (!_private->newFullscreenController)
+ _private->newFullscreenController = [[WebFullScreenController alloc] init];
+
+ [_private->newFullscreenController setElement:element];
+ [_private->newFullscreenController setWebView:self];
+ [_private->newFullscreenController enterFullscreen:[[self window] screen]];
+}
+
+- (void)_exitFullScreenForElement:(WebCore::Element*)element
+{
+ if (!_private->newFullscreenController)
+ return;
+ [_private->newFullscreenController exitFullscreen];
+}
+
+- (void)_fullScreenRendererChanged:(WebCore::RenderBox*)renderer
+{
+ if (!_private->newFullscreenController)
+ _private->newFullscreenController = [[WebFullScreenController alloc] init];
+ [_private->newFullscreenController setRenderer:renderer];
+}
+#endif
+
#if ENABLE(GLIB_SUPPORT)
static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity, void*)
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index 8b834ca..97d0fc3 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -49,6 +49,9 @@ namespace WebCore {
#if ENABLE(VIDEO)
@class WebVideoFullscreenController;
#endif
+#if ENABLE(FULLSCREEN_API)
+@class WebFullScreenController;
+#endif
extern BOOL applicationIsTerminating;
extern int pluginDatabaseClientCount;
@@ -171,6 +174,10 @@ extern int pluginDatabaseClientCount;
#if ENABLE(VIDEO)
WebVideoFullscreenController *fullscreenController;
#endif
+
+#if ENABLE(FULLSCREEN_API)
+ WebFullScreenController *newFullscreenController;
+#endif
#if ENABLE(GLIB_SUPPORT)
CFRunLoopObserverRef glibRunLoopObserver;
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 0a6f462..555c4d1 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -39,10 +39,12 @@
#include <wtf/Forward.h>
namespace WebCore {
+ class Element;
class Frame;
class KURL;
class KeyboardEvent;
class Page;
+ class RenderBox;
class Node;
}
#endif
@@ -185,6 +187,13 @@ namespace WebCore {
- (void)_exitFullscreen;
#endif
+#if ENABLE(FULLSCREEN_API) && defined(__cplusplus)
+- (BOOL)_supportsFullScreenForElement:(WebCore::Element*)element;
+- (void)_enterFullScreenForElement:(WebCore::Element*)element;
+- (void)_exitFullScreenForElement:(WebCore::Element*)element;
+- (void)_fullScreenRendererChanged:(WebCore::RenderBox*)renderer;
+#endif
+
- (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value;
@end
diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h
index 2ceaac1..b8cc984 100644
--- a/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -131,6 +131,8 @@ public:
virtual QObject* createExtension(Extension extension) const = 0;
};
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.6");
+QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index e82bd45..eab514b 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -418,6 +418,7 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
case WebCore::ContextMenuItemTagBold: return QWebPage::ToggleBold;
case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
+ case WebCore::ContextMenuItemTagSelectAll: return QWebPage::SelectAll;
#if ENABLE(INSPECTOR)
case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
#endif
@@ -1095,10 +1096,15 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
setSelectionRange(node, start, start + ev->replacementLength());
// Commit regardless of whether commitString is empty, to get rid of selection.
editor->confirmComposition(ev->commitString());
- } else if (!ev->commitString().isEmpty())
- editor->confirmComposition(ev->commitString());
- else if (!hasSelection && !ev->preeditString().isEmpty())
+ } else if (!ev->commitString().isEmpty()) {
+ if (editor->hasComposition())
+ editor->confirmComposition(ev->commitString());
+ else
+ editor->insertText(ev->commitString(), 0);
+ } else if (!hasSelection && !ev->preeditString().isEmpty())
editor->setComposition(ev->preeditString(), underlines, 0, 0);
+ else if (ev->preeditString().isEmpty() && editor->hasComposition())
+ editor->confirmComposition(String());
ev->accept();
}
@@ -2624,12 +2630,27 @@ bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &
}
/*!
+ \property QWebPage::hasSelection
+ \brief whether this page contains selected content or not.
+
+ \sa selectionChanged()
+*/
+bool QWebPage::hasSelection() const
+{
+ d->createMainFrame();
+ WebCore::Frame* frame = d->page->focusController()->focusedOrMainFrame();
+ if (frame)
+ return (frame->selection()->selection().selectionType() != VisibleSelection::NoSelection);
+ return false;
+}
+
+/*!
\property QWebPage::selectedText
\brief the text currently selected
By default, this property contains an empty string.
- \sa selectionChanged()
+ \sa selectionChanged(), selectedHtml()
*/
QString QWebPage::selectedText() const
{
@@ -2640,6 +2661,21 @@ QString QWebPage::selectedText() const
return frame->editor()->selectedText();
}
+/*!
+ \since 4.8
+ \property QWebPage::selectedHtml
+ \brief the HTML currently selected
+
+ By default, this property contains an empty string.
+
+ \sa selectionChanged(), selectedText()
+*/
+QString QWebPage::selectedHtml() const
+{
+ d->createMainFrame();
+ return d->page->focusController()->focusedOrMainFrame()->editor()->selectedRange()->toHTML();
+}
+
#ifndef QT_NO_ACTION
/*!
Returns a QAction for the specified WebAction \a action.
@@ -2717,6 +2753,9 @@ QAction *QWebPage::action(WebAction action) const
case Paste:
text = contextMenuItemTagPaste();
break;
+ case SelectAll:
+ text = contextMenuItemTagSelectAll();
+ break;
#ifndef QT_NO_UNDOSTACK
case Undo: {
QAction *a = undoStack()->createUndoAction(d->q);
@@ -2765,9 +2804,6 @@ QAction *QWebPage::action(WebAction action) const
case MoveToEndOfDocument:
text = tr("Move the cursor to the end of the document");
break;
- case SelectAll:
- text = tr("Select all");
- break;
case SelectNextChar:
text = tr("Select to the next character");
break;
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index 1e0b3b7..b66adb2 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -72,6 +72,8 @@ class QWEBKIT_EXPORT QWebPage : public QObject {
Q_PROPERTY(bool modified READ isModified)
Q_PROPERTY(QString selectedText READ selectedText)
+ Q_PROPERTY(QString selectedHtml READ selectedHtml)
+ Q_PROPERTY(bool hasSelection READ hasSelection)
Q_PROPERTY(QSize viewportSize READ viewportSize WRITE setViewportSize)
Q_PROPERTY(QSize preferredContentsSize READ preferredContentsSize WRITE setPreferredContentsSize)
Q_PROPERTY(bool forwardUnsupportedContent READ forwardUnsupportedContent WRITE setForwardUnsupportedContent)
@@ -268,7 +270,9 @@ public:
quint64 totalBytes() const;
quint64 bytesReceived() const;
+ bool hasSelection() const;
QString selectedText() const;
+ QString selectedHtml() const;
#ifndef QT_NO_ACTION
QAction *action(WebAction action) const;
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 31ee521..f4b23f3 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -572,12 +572,27 @@ QIcon QWebView::icon() const
}
/*!
+ \property QWebView::hasSelection
+ \brief whether this page contains selected content or not.
+
+ By default, this property is false.
+
+ \sa selectionChanged()
+*/
+bool QWebView::hasSelection() const
+{
+ if (d->page)
+ return d->page->hasSelection();
+ return false;
+}
+
+/*!
\property QWebView::selectedText
\brief the text currently selected
By default, this property contains an empty string.
- \sa findText(), selectionChanged()
+ \sa findText(), selectionChanged(), selectedHtml()
*/
QString QWebView::selectedText() const
{
@@ -586,6 +601,22 @@ QString QWebView::selectedText() const
return QString();
}
+/*!
+ \since 4.8
+ \property QWebView::selectedHtml
+ \brief the HTML currently selected
+
+ By default, this property contains an empty string.
+
+ \sa findText(), selectionChanged(), selectedText()
+*/
+QString QWebView::selectedHtml() const
+{
+ if (d->page)
+ return d->page->selectedHtml();
+ return QString();
+}
+
#ifndef QT_NO_ACTION
/*!
Returns a pointer to a QAction that encapsulates the specified web action \a action.
diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h
index 1d651d5..8b28f62 100644
--- a/WebKit/qt/Api/qwebview.h
+++ b/WebKit/qt/Api/qwebview.h
@@ -44,6 +44,8 @@ class QWEBKIT_EXPORT QWebView : public QWidget {
Q_PROPERTY(QUrl url READ url WRITE setUrl)
Q_PROPERTY(QIcon icon READ icon)
Q_PROPERTY(QString selectedText READ selectedText)
+ Q_PROPERTY(QString selectedHtml READ selectedHtml)
+ Q_PROPERTY(bool hasSelection READ hasSelection)
Q_PROPERTY(bool modified READ isModified)
//Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags)
Q_PROPERTY(qreal textSizeMultiplier READ textSizeMultiplier WRITE setTextSizeMultiplier DESIGNABLE false)
@@ -73,7 +75,9 @@ public:
QUrl url() const;
QIcon icon() const;
+ bool hasSelection() const;
QString selectedText() const;
+ QString selectedHtml() const;
#ifndef QT_NO_ACTION
QAction* pageAction(QWebPage::WebAction action) const;
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 7016d6c..d59d413 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,271 @@
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ Update documentation to reference new location of WebCore.
+
+ * docs/qtwebkit.qdoc:
+
+2011-01-07 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add selectedHtml function to QWebView
+ https://bugs.webkit.org/show_bug.cgi?id=35028
+
+ Add QWebView::selectedHtml() and QWebPage::selectedHtml()
+ which return the current selection range's HTML representation.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::selectedHtml):
+ * Api/qwebpage.h:
+ * Api/qwebview.cpp:
+ (QWebView::selectedText):
+ (QWebView::selectedHtml):
+ * Api/qwebview.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::cursorMovements):
+ (tst_QWebPage::textSelection):
+ (tst_QWebPage::crashTests_LazyInitializationOfMainFrame):
+ (tst_QWebPage::findText):
+
+2011-01-06 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
+
+ This allows LayoutTestController to pass WebCore::Node back to
+ layout tests.
+
+ Also amend nodesFromRect-links-and-text.html and
+ nodesFromRect-inner-documents.html so that they do not produce
+ platform-specific results.
+
+ Unskip:
+ fast/dom/nodesFromRect-links-and-text.html
+ fast/dom/nodesFromRect-inner-documents.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=48957
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (QDRTNode::QDRTNode):
+ (QDRTNode::~QDRTNode):
+ (DumpRenderTreeSupportQt::nodesFromRect):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2011-01-04 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+ Acked by Aaron Kennedy <aaron.kennedy@nokia.com>
+
+ [Qt] QML WebView does not transfer focus to underlying QGraphicsWebView
+
+ QML WebView creates QGraphicsWebView as it's child. The WebView is not
+ setup as a focus proxy of the QGraphicsWebView. Thus, even though the
+ WebView gets focus, the QGraphicsWebView does not get focus.
+ In QML, focus proxies or "focus scopes" are created using FocusScope.
+ This change makes WebView a FocusScope and sets the focus on the
+ QGraphicsWebView.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51094
+
+ * declarative/qdeclarativewebview.cpp:
+ (QDeclarativeWebView::init):
+
+2011-01-05 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Sync qwebkitplatformplugin.h in the plugin example
+ https://bugs.webkit.org/show_bug.cgi?id=51882
+
+ Make examples/platformplugin/qwebkitplatformplugin.h exactly the same
+ as the one in the Api folder.
+
+ * examples/platformplugin/qwebkitplatformplugin.h:
+
+2011-01-04 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Fix test LayoutTests/fast/events/ime-composition-events-001.html.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51693
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent): Calls editor->insertText() to
+ insert the commit string when no composition text is available.
+
+2011-01-03 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add SelectAll option to the context menu for the editor
+ https://bugs.webkit.org/show_bug.cgi?id=50049
+
+ Enable SelectAll for the Qt context menu.
+
+ * Api/qwebpage.cpp:
+ (webActionForContextMenuAction):
+ (QWebPage::action):
+ * WebCoreSupport/WebPlatformStrategies.cpp:
+ (WebPlatformStrategies::contextMenuItemTagSelectAll):
+ * WebCoreSupport/WebPlatformStrategies.h:
+
+2011-01-03 Antonio Gomes <agomes@rim.com>
+
+ Unreviewed crash fix.
+
+ Follow up of r74891: potential crash fix (bogus assertion).
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::editorCommandForKeyDownEvent):
+
+2011-01-03 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] document.getElementById(...) doesn't return the right object in combination with QGraphicsWidget
+ https://bugs.webkit.org/show_bug.cgi?id=51464
+
+ Added a way to bind any QObject created as a plugin to JavaScript,
+ by adding a custom membe to WebCore::Widget.
+ Added a test to make sure plugins created as QGraphicsWidget are
+ accessible through JavaScript.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (PluginPage::createPlugin):
+ (tst_QWebPage::graphicsWidgetPlugin):
+
+2011-01-02 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Refactor EditorClientQt::handleKeyboardEvent
+ https://bugs.webkit.org/show_bug.cgi?id=51306
+
+ EditorClientQt::handleKeyboardEvent relies on QWebPagePrivate::editorActionForKeyEvent()
+ to handle all editor commands that have a QAction associted with it.
+ In practice, that covers most of editor commands (as one can see in editorCommandWebActions,
+ in qwebpage.cpp). However, there are some key down events that are associated to no QAction
+ or need special handling when features like spatial navigation or
+ caret browsing are enabled. Currently, these cases are being handled with confusing
+ and nested if/else switch's statements in EditorClientQt::handleKeyboardEvent(),
+ and the code is hardly readable.
+
+ This patch introduces a mapping hash for those cases, simplifying much
+ the code. Basically, nested switches statements mixed with if/else's were
+ refactored, and early returns were added right after an event gets consumed
+ by the Editor.
+
+ Since it is a refactor only patch, there is no funcionality change at
+ all, and then no new tests are being added.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::interpretKeyEvent):
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * WebKit_pch.h:
+ * docs/qtwebkit.qdocconf:
+ - Point to JavaScriptCore in its new location.
+
+2010-12-29 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with Qt in namespace
+ https://bugs.webkit.org/show_bug.cgi?id=51701
+
+ * Api/qwebkitplatformplugin.h:
+ * WebCoreSupport/InspectorServerQt.h:
+ * tests/hybridPixmap/widget.h:
+
+2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ [Qt] Composition text is not removed from the editor when composition is cancelled
+ https://bugs.webkit.org/show_bug.cgi?id=29391
+
+ Ensure that the composition text is cleared when an empty QInputMethodEvent
+ is received and the editor is in composition mode.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent):
+
+2010-12-23 Jan Erik Hanssen <jhanssen@sencha.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
+ https://bugs.webkit.org/show_bug.cgi?id=35635
+
+ Test that QClipboard contains the charset information and unicode data
+ after copying unicode text.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::macCopyUnicodeToClipboard):
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didSaveToPageCache):
+ (WebCore::FrameLoaderClientQt::didRestoreFromPageCache):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
+2010-12-23 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add a 'hasSelection' function to QWebView and QWebPage.
+ https://bugs.webkit.org/show_bug.cgi?id=48722
+
+ This is a convenience API that optimizes the case where checking for
+ the presence of selected content and accessing the selected content
+ are two separate actions in the client. See comment #12 in the above
+ bug report link for details.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::hasSelection):
+ * Api/qwebpage.h:
+ * Api/qwebview.cpp:
+ (QWebView::hasSelection):
+ * Api/qwebview.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::textSelection):
+
2010-12-20 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Andreas Kling.
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 754b20a..e958751 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -82,6 +82,27 @@ using namespace WebCore;
QMap<int, QWebScriptWorld*> m_worldMap;
+QDRTNode::QDRTNode()
+ : m_node(0)
+{
+}
+
+QDRTNode::QDRTNode(WebCore::Node* node)
+ : m_node(0)
+{
+ if (node) {
+ m_node = node;
+ m_node->ref();
+ }
+}
+
+QDRTNode::~QDRTNode()
+{
+ if (m_node)
+ m_node->deref();
+}
+
+
DumpRenderTreeSupportQt::DumpRenderTreeSupportQt()
{
}
@@ -854,7 +875,10 @@ QVariantList DumpRenderTreeSupportQt::nodesFromRect(const QWebElement& document,
for (int i = 0; i < nodes->length(); i++) {
QVariant v;
// QWebElement will be null if the Node is not an HTML Element
- v.setValue(QWebElement(nodes->item(i)));
+ if (nodes->item(i)->isHTMLElement())
+ v.setValue(QWebElement(nodes->item(i)));
+ else
+ v.setValue(QDRTNode(nodes->item(i)));
res << v;
}
return res;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index e08d962..6917039 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -26,6 +26,26 @@
#include "qwebkitglobal.h"
#include <QVariant>
+namespace WebCore {
+class Text;
+class Node;
+}
+
+
+#if defined(WTF_USE_V8) && WTF_USE_V8
+namespace V8 {
+namespace Bindings {
+class QtDRTNodeRuntime;
+}
+}
+#else
+namespace JSC {
+namespace Bindings {
+class QtDRTNodeRuntime;
+}
+}
+#endif
+
class QWebElement;
class QWebFrame;
class QWebPage;
@@ -34,6 +54,28 @@ class QWebScriptWorld;
extern QMap<int, QWebScriptWorld*> m_worldMap;
+// Used to pass WebCore::Node's to layout tests using LayoutTestController
+class QWEBKIT_EXPORT QDRTNode {
+public:
+ QDRTNode();
+ ~QDRTNode();
+
+private:
+ explicit QDRTNode(WebCore::Node*);
+
+ friend class DumpRenderTreeSupportQt;
+
+#if defined(WTF_USE_V8) && WTF_USE_V8
+ friend class V8::Bindings::QtDRTNodeRuntime;
+#else
+ friend class JSC::Bindings::QtDRTNodeRuntime;
+#endif
+
+ WebCore::Node* m_node;
+};
+
+Q_DECLARE_METATYPE(QDRTNode)
+
class QWEBKIT_EXPORT DumpRenderTreeSupportQt {
public:
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 3fbc83d..534e334 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -346,6 +346,60 @@ void EditorClientQt::toggleGrammarChecking()
notImplemented();
}
+static const unsigned CtrlKey = 1 << 0;
+static const unsigned AltKey = 1 << 1;
+static const unsigned ShiftKey = 1 << 2;
+
+struct KeyDownEntry {
+ unsigned virtualKey;
+ unsigned modifiers;
+ const char* editorCommand;
+};
+
+// Handle here key down events that are needed for spatial navigation and caret browsing, or
+// are not handled by QWebPage.
+static const KeyDownEntry keyDownEntries[] = {
+ // Ones that do not have an associated QAction:
+ { VK_DELETE, 0, "DeleteForward" },
+ { VK_BACK, ShiftKey, "DeleteBackward" },
+ { VK_BACK, 0, "DeleteBackward" },
+ // Ones that need special handling for caret browsing:
+ { VK_PRIOR, 0, "MovePageUp" },
+ { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" },
+ { VK_NEXT, 0, "MovePageDown" },
+ { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" },
+ // Ones that need special handling for spatial navigation:
+ { VK_LEFT, 0, "MoveLeft" },
+ { VK_RIGHT, 0, "MoveRight" },
+ { VK_UP, 0, "MoveUp" },
+ { VK_DOWN, 0, "MoveDown" },
+};
+
+const char* editorCommandForKeyDownEvent(const KeyboardEvent* event)
+{
+ if (event->type() != eventNames().keydownEvent)
+ return "";
+
+ static HashMap<int, const char*> keyDownCommandsMap;
+ if (keyDownCommandsMap.isEmpty()) {
+
+ unsigned numEntries = sizeof(keyDownEntries) / sizeof((keyDownEntries)[0]);
+ for (unsigned i = 0; i < numEntries; i++)
+ keyDownCommandsMap.set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].editorCommand);
+ }
+
+ unsigned modifiers = 0;
+ if (event->shiftKey())
+ modifiers |= ShiftKey;
+ if (event->altKey())
+ modifiers |= AltKey;
+ if (event->ctrlKey())
+ modifiers |= CtrlKey;
+
+ int mapKey = modifiers << 16 | event->keyCode();
+ return mapKey ? keyDownCommandsMap.get(mapKey) : 0;
+}
+
void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
{
Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
@@ -387,150 +441,85 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
return;
m_page->triggerAction(action);
- } else
+ event->setDefaultHandled();
+ return;
+ } else {
#endif // QT_NO_SHORTCUT
- switch (kevent->windowsVirtualKeyCode()) {
- case VK_BACK:
- frame->editor()->deleteWithDirection(SelectionController::DirectionBackward,
- CharacterGranularity, false, true);
- break;
- case VK_DELETE:
- frame->editor()->deleteWithDirection(SelectionController::DirectionForward,
- CharacterGranularity, false, true);
- break;
- case VK_LEFT:
- if (kevent->shiftKey())
- frame->editor()->command("MoveLeftAndModifySelection").execute();
- else if (!frame->editor()->command("MoveLeft").execute())
- return;
- break;
- case VK_RIGHT:
- if (kevent->shiftKey())
- frame->editor()->command("MoveRightAndModifySelection").execute();
- else if (!frame->editor()->command("MoveRight").execute())
- return;
- break;
- case VK_UP:
- if (kevent->shiftKey())
- frame->editor()->command("MoveUpAndModifySelection").execute();
- else if (!frame->editor()->command("MoveUp").execute())
+ String commandName = editorCommandForKeyDownEvent(event);
+ if (!commandName.isEmpty()) {
+ if (frame->editor()->command(commandName).execute()) // Event handled.
+ event->setDefaultHandled();
return;
- break;
- case VK_DOWN:
- if (kevent->shiftKey())
- frame->editor()->command("MoveDownAndModifySelection").execute();
- else if (!frame->editor()->command("MoveDown").execute())
+ }
+
+ if (kevent->windowsVirtualKeyCode() == VK_TAB) {
+ // Do not handle TAB text insertion here.
return;
- break;
- case VK_PRIOR: // PageUp
- if (kevent->shiftKey())
- frame->editor()->command("MovePageUpAndModifySelection").execute();
- else
- frame->editor()->command("MovePageUp").execute();
- break;
- case VK_NEXT: // PageDown
- if (kevent->shiftKey())
- frame->editor()->command("MovePageDownAndModifySelection").execute();
- else
- frame->editor()->command("MovePageDown").execute();
- break;
- case VK_TAB:
- return;
- default:
- if (kevent->type() != PlatformKeyboardEvent::KeyDown && !kevent->ctrlKey()
+ }
+
+ // Text insertion.
+ bool shouldInsertText = false;
+ if (kevent->type() != PlatformKeyboardEvent::KeyDown && !kevent->text().isEmpty()) {
+
+ if (kevent->ctrlKey()) {
+ if (kevent->altKey())
+ shouldInsertText = true;
+ } else {
#ifndef Q_WS_MAC
// We need to exclude checking for Alt because it is just a different Shift
- && !kevent->altKey()
+ if (!kevent->altKey())
#endif
- && !kevent->text().isEmpty()) {
- frame->editor()->insertText(kevent->text(), event);
- } else if (kevent->ctrlKey()) {
- switch (kevent->windowsVirtualKeyCode()) {
- case VK_A:
- frame->editor()->command("SelectAll").execute();
- break;
- case VK_B:
- frame->editor()->command("ToggleBold").execute();
- break;
- case VK_I:
- frame->editor()->command("ToggleItalic").execute();
- break;
- default:
- // catch combination AltGr+key or Ctrl+Alt+key
- if (kevent->type() != PlatformKeyboardEvent::KeyDown && kevent->altKey() && !kevent->text().isEmpty()) {
- frame->editor()->insertText(kevent->text(), event);
- break;
- }
- return;
+ shouldInsertText = true;
+
}
- } else
+ }
+
+ if (shouldInsertText) {
+ frame->editor()->insertText(kevent->text(), event);
+ event->setDefaultHandled();
return;
+ }
}
- } else {
- if (m_page->handle()->page->settings()->caretBrowsingEnabled()) {
- switch (kevent->windowsVirtualKeyCode()) {
- case VK_LEFT:
- if (kevent->shiftKey() && kevent->ctrlKey())
- frame->editor()->command("MoveWordBackwardAndModifySelection").execute();
- else if (kevent->shiftKey())
- frame->editor()->command("MoveLeftAndModifySelection").execute();
- else if (kevent->ctrlKey())
- frame->editor()->command("MoveWordBackward").execute();
- else
- frame->editor()->command("MoveLeft").execute();
- break;
- case VK_RIGHT:
- if (kevent->shiftKey() && kevent->ctrlKey())
- frame->editor()->command("MoveWordForwardAndModifySelection").execute();
- else if (kevent->shiftKey())
- frame->editor()->command("MoveRightAndModifySelection").execute();
- else if (kevent->ctrlKey())
- frame->editor()->command("MoveWordForward").execute();
- else
- frame->editor()->command("MoveRight").execute();
- break;
- case VK_UP:
- if (kevent->shiftKey())
- frame->editor()->command("MoveUpAndModifySelection").execute();
- else
- frame->editor()->command("MoveUp").execute();
- break;
- case VK_DOWN:
- if (kevent->shiftKey())
- frame->editor()->command("MoveDownAndModifySelection").execute();
- else
- frame->editor()->command("MoveDown").execute();
- break;
- case VK_PRIOR: // PageUp
- frame->editor()->command("MovePageUp").execute();
- break;
- case VK_NEXT: // PageDown
- frame->editor()->command("MovePageDown").execute();
- break;
- case VK_HOME:
- if (kevent->shiftKey())
- frame->editor()->command("MoveToBeginningOfLineAndModifySelection").execute();
- else
- frame->editor()->command("MoveToBeginningOfLine").execute();
- break;
- case VK_END:
- if (kevent->shiftKey())
- frame->editor()->command("MoveToEndOfLineAndModifySelection").execute();
- else
- frame->editor()->command("MoveToEndOfLine").execute();
- break;
- default:
- break;
+
+ // Event not handled.
+ return;
+ }
+
+ // Non editable content.
+ if (m_page->handle()->page->settings()->caretBrowsingEnabled()) {
+ switch (kevent->windowsVirtualKeyCode()) {
+ case VK_LEFT:
+ case VK_RIGHT:
+ case VK_UP:
+ case VK_DOWN:
+ case VK_HOME:
+ case VK_END:
+ {
+ QWebPage::WebAction action = QWebPagePrivate::editorActionForKeyEvent(kevent->qtEvent());
+ ASSERT(action != QWebPage::NoWebAction);
+ m_page->triggerAction(action);
+ event->setDefaultHandled();
+ return;
+ }
+ case VK_PRIOR: // PageUp
+ case VK_NEXT: // PageDown
+ {
+ String commandName = editorCommandForKeyDownEvent(event);
+ ASSERT(!commandName.isEmpty());
+ frame->editor()->command(commandName).execute();
+ event->setDefaultHandled();
+ return;
}
}
+ }
+
#ifndef QT_NO_SHORTCUT
- if (kevent->qtEvent() == QKeySequence::Copy)
- m_page->triggerAction(QWebPage::Copy);
- else
-#endif // QT_NO_SHORTCUT
- return;
+ if (kevent->qtEvent() == QKeySequence::Copy) {
+ m_page->triggerAction(QWebPage::Copy);
+ event->setDefaultHandled();
+ return;
}
- event->setDefaultHandled();
+#endif // QT_NO_SHORTCUT
}
void EditorClientQt::handleInputMethodKeydown(KeyboardEvent*)
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 849958f..e83d5ef 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -295,6 +295,14 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
}
+void FrameLoaderClientQt::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientQt::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientQt::dispatchDidBecomeFrameset(bool)
{
}
@@ -1437,7 +1445,12 @@ public:
graphicsWidget->hide();
}
private:
- QtPluginGraphicsWidget(QGraphicsWidget* w = 0): Widget(0), graphicsWidget(w) {}
+ QtPluginGraphicsWidget(QGraphicsWidget* w = 0)
+ : Widget(0)
+ , graphicsWidget(w)
+ {
+ setBindingObject(graphicsWidget);
+ }
QGraphicsWidget* graphicsWidget;
};
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 275b0e8..3d93eaf 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -193,6 +193,9 @@ public:
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
diff --git a/WebKit/qt/WebCoreSupport/InspectorServerQt.h b/WebKit/qt/WebCoreSupport/InspectorServerQt.h
index 74e8c2f..922b63e 100644
--- a/WebKit/qt/WebCoreSupport/InspectorServerQt.h
+++ b/WebKit/qt/WebCoreSupport/InspectorServerQt.h
@@ -27,8 +27,10 @@
#include <QString>
#include <wtf/Forward.h>
+QT_BEGIN_NAMESPACE
class QTcpServer;
class QTcpSocket;
+QT_END_NAMESPACE
class QWebPage;
namespace WebCore {
diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
index 7cd255f..c67ec2f 100644
--- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
+++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
@@ -290,6 +290,11 @@ String WebPlatformStrategies::contextMenuItemTagPaste()
return QCoreApplication::translate("QWebPage", "Paste", "Paste context menu item");
}
+String WebPlatformStrategies::contextMenuItemTagSelectAll()
+{
+ return QCoreApplication::translate("QWebPage", "Select All", "Select All context menu item");
+}
+
String WebPlatformStrategies::contextMenuItemTagNoGuessesFound()
{
return QCoreApplication::translate("QWebPage", "No Guesses Found", "No Guesses Found context menu item");
diff --git a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
index ea366e0..5f72f46 100644
--- a/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
+++ b/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
@@ -74,6 +74,7 @@ private:
virtual WTF::String contextMenuItemTagReload();
virtual WTF::String contextMenuItemTagCut();
virtual WTF::String contextMenuItemTagPaste();
+ virtual WTF::String contextMenuItemTagSelectAll();
virtual WTF::String contextMenuItemTagNoGuessesFound();
virtual WTF::String contextMenuItemTagIgnoreSpelling();
virtual WTF::String contextMenuItemTagLearnSpelling();
diff --git a/WebKit/qt/WebKit_pch.h b/WebKit/qt/WebKit_pch.h
index 1dd4d52..f9f0fc1 100644
--- a/WebKit/qt/WebKit_pch.h
+++ b/WebKit/qt/WebKit_pch.h
@@ -39,7 +39,7 @@
#include <windows.h>
#endif
-#include "../../JavaScriptCore/config.h"
+#include "../../Source/JavaScriptCore/config.h"
#include <math.h>
#include <stdio.h>
diff --git a/WebKit/qt/declarative/qdeclarativewebview.cpp b/WebKit/qt/declarative/qdeclarativewebview.cpp
index 94f08bd..e26889e 100644
--- a/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -253,10 +253,12 @@ void QDeclarativeWebView::init()
setAcceptedMouseButtons(Qt::LeftButton);
setFlag(QGraphicsItem::ItemHasNoContents, true);
+ setFlag(QGraphicsItem::ItemIsFocusScope, true);
setClip(true);
d->view = new GraphicsWebView(this);
d->view->setResizesToContents(true);
+ d->view->setFocus();
QWebPage* wp = new QDeclarativeWebPage(this);
setPage(wp);
connect(d->view, SIGNAL(geometryChanged()), this, SLOT(updateDeclarativeWebViewSize()));
diff --git a/WebKit/qt/docs/qtwebkit.qdoc b/WebKit/qt/docs/qtwebkit.qdoc
index 0335d46..df22e65 100644
--- a/WebKit/qt/docs/qtwebkit.qdoc
+++ b/WebKit/qt/docs/qtwebkit.qdoc
@@ -51,7 +51,7 @@
building the module only in release mode for embedded platforms.
Currently QtWebKit will always be compiled without debugging symbols
when using gcc. Take a look at the last lines of
- \c{src/3rdparty/webkit/WebCore/WebCore.pro} if you need to change this.
+ \c{src/3rdparty/webkit/Source/WebCore/WebCore.pro} if you need to change this.
\note Web site icons, also known as "FavIcons", are currently not supported
on Windows. We plan to address this in a future release.
diff --git a/WebKit/qt/docs/qtwebkit.qdocconf b/WebKit/qt/docs/qtwebkit.qdocconf
index 5f877c2..f1d198d 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 $SRCDIR/WebKit/qt/declarative
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative
+sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative
outputdir = $OUTPUT_DIR/doc/html
outputformats = HTML
sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index f38a8fb..b8cc984 100644
--- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -84,9 +84,13 @@ Q_SIGNALS:
void notificationClicked();
};
-class QWebHapticFeedbackPlayer
+class QWebHapticFeedbackPlayer: public QObject
{
+ Q_OBJECT
public:
+ QWebHapticFeedbackPlayer() {}
+ virtual ~QWebHapticFeedbackPlayer() {}
+
enum HapticStrength {
None, Weak, Medium, Strong
};
@@ -127,6 +131,8 @@ public:
virtual QObject* createExtension(Extension extension) const = 0;
};
+QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.6");
+QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/tests/hybridPixmap/widget.h b/WebKit/qt/tests/hybridPixmap/widget.h
index a49f8ba..2ac8a06 100644
--- a/WebKit/qt/tests/hybridPixmap/widget.h
+++ b/WebKit/qt/tests/hybridPixmap/widget.h
@@ -27,9 +27,11 @@
typedef QWebView WebView;
+QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
+QT_END_NAMESPACE
class Widget : public QWidget {
Q_OBJECT
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 4645a06..b71f665 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -21,6 +21,7 @@
#include "../util.h"
#include "../WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include <QClipboard>
#include <QDir>
#include <QGraphicsWidget>
#include <QLineEdit>
@@ -90,6 +91,7 @@ private slots:
void destroyPlugin();
void createViewlessPlugin_data();
void createViewlessPlugin();
+ void graphicsWidgetPlugin();
void multiplePageGroupsAndLocalStorage();
void cursorMovements();
void textSelection();
@@ -129,6 +131,10 @@ private slots:
void supportedContentType();
void infiniteLoopJS();
void networkAccessManagerOnDifferentThread();
+
+#ifdef Q_OS_MAC
+ void macCopyUnicodeToClipboard();
+#endif
private:
QWebView* m_view;
@@ -583,6 +589,8 @@ protected:
result = new QPushButton();
else if (classid == "lineedit")
result = new QLineEdit();
+ else if (classid == "graphicswidget")
+ result = new QGraphicsWidget();
if (result)
result->setObjectName(classid);
calls.append(CallInfo(classid, url, paramNames, paramValues, result));
@@ -672,6 +680,54 @@ static void createPlugin(QWebView *view)
}
}
+void tst_QWebPage::graphicsWidgetPlugin()
+{
+ m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ QGraphicsWebView webView;
+
+ QSignalSpy loadSpy(&webView, SIGNAL(loadFinished(bool)));
+
+ PluginPage* newPage = new PluginPage(&webView);
+ webView.setPage(newPage);
+
+ // type has to be application/x-qt-plugin
+ webView.setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='graphicswidget' id='mygraphicswidget'/></body></html>"));
+ QTRY_COMPARE(loadSpy.count(), 1);
+ QCOMPARE(newPage->calls.count(), 0);
+
+ webView.setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='graphicswidget' id='mygraphicswidget'/></body></html>"));
+ QTRY_COMPARE(loadSpy.count(), 2);
+ QCOMPARE(newPage->calls.count(), 1);
+ {
+ PluginPage::CallInfo ci = newPage->calls.takeFirst();
+ QCOMPARE(ci.classid, QString::fromLatin1("graphicswidget"));
+ QCOMPARE(ci.url, QUrl());
+ QCOMPARE(ci.paramNames.count(), 3);
+ QCOMPARE(ci.paramValues.count(), 3);
+ QCOMPARE(ci.paramNames.at(0), QString::fromLatin1("type"));
+ QCOMPARE(ci.paramValues.at(0), QString::fromLatin1("application/x-qt-plugin"));
+ QCOMPARE(ci.paramNames.at(1), QString::fromLatin1("classid"));
+ QCOMPARE(ci.paramValues.at(1), QString::fromLatin1("graphicswidget"));
+ QCOMPARE(ci.paramNames.at(2), QString::fromLatin1("id"));
+ QCOMPARE(ci.paramValues.at(2), QString::fromLatin1("mygraphicswidget"));
+ QVERIFY(ci.returnValue);
+ QVERIFY(ci.returnValue->inherits("QGraphicsWidget"));
+ }
+ // test JS bindings
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("document.getElementById('mygraphicswidget').toString()").toString(),
+ QString::fromLatin1("[object HTMLObjectElement]"));
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("mygraphicswidget.toString()").toString(),
+ QString::fromLatin1("[object HTMLObjectElement]"));
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("typeof mygraphicswidget.objectName").toString(),
+ QString::fromLatin1("string"));
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("mygraphicswidget.objectName").toString(),
+ QString::fromLatin1("graphicswidget"));
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("typeof mygraphicswidget.geometryChanged").toString(),
+ QString::fromLatin1("function"));
+ QCOMPARE(newPage->mainFrame()->evaluateJavaScript("mygraphicswidget.geometryChanged.toString()").toString(),
+ QString::fromLatin1("function geometryChanged() {\n [native code]\n}"));
+}
+
void tst_QWebPage::createPluginWithPluginsEnabled()
{
m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
@@ -879,6 +935,7 @@ void tst_QWebPage::cursorMovements()
"getSelection().addRange(range);";
page->mainFrame()->evaluateJavaScript(script);
QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
+ QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>"));
// these actions must exist
QVERIFY(page->action(QWebPage::MoveToNextChar) != 0);
@@ -1099,6 +1156,9 @@ void tst_QWebPage::textSelection()
// ..but SelectAll is awalys enabled
QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
+ // Verify hasSelection returns false since there is no selection yet...
+ QCOMPARE(page->hasSelection(), false);
+
// this will select the first paragraph
QString selectScript = "var range = document.createRange(); " \
"var node = document.getElementById(\"one\"); " \
@@ -1106,6 +1166,10 @@ void tst_QWebPage::textSelection()
"getSelection().addRange(range);";
page->mainFrame()->evaluateJavaScript(selectScript);
QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
+ QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>"));
+
+ // Make sure hasSelection returns true, since there is selected text now...
+ QCOMPARE(page->hasSelection(), true);
// here the actions are enabled after a selection has been created
QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
@@ -2318,6 +2382,10 @@ void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
}
{
QWebPage webPage;
+ webPage.selectedHtml();
+ }
+ {
+ QWebPage webPage;
webPage.triggerAction(QWebPage::Back, true);
}
{
@@ -2512,14 +2580,18 @@ void tst_QWebPage::findText()
m_view->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>"));
m_page->triggerAction(QWebPage::SelectAll);
QVERIFY(!m_page->selectedText().isEmpty());
+ QVERIFY(!m_page->selectedHtml().isEmpty());
m_page->findText("");
QVERIFY(m_page->selectedText().isEmpty());
+ QVERIFY(m_page->selectedHtml().isEmpty());
QStringList words = (QStringList() << "foo" << "bar");
foreach (QString subString, words) {
m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
QCOMPARE(m_page->selectedText(), subString);
+ QCOMPARE(m_page->selectedHtml(), QString("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \">%1</span>").arg(subString));
m_page->findText("");
QVERIFY(m_page->selectedText().isEmpty());
+ QVERIFY(m_page->selectedHtml().isEmpty());
}
}
@@ -2638,5 +2710,20 @@ void tst_QWebPage::networkAccessManagerOnDifferentThread()
QCOMPARE(m_page->mainFrame()->childFrames()[0]->url(), QUrl("qrc:///resources/frame_a.html"));
}
+#ifdef Q_OS_MAC
+void tst_QWebPage::macCopyUnicodeToClipboard()
+{
+ QString unicodeText = QString::fromUtf8("αβγδεζηθικλμπ");
+ m_page->mainFrame()->setHtml(QString("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>%1</body></html>").arg(unicodeText));
+ m_page->triggerAction(QWebPage::SelectAll);
+ m_page->triggerAction(QWebPage::Copy);
+
+ QString clipboardData = QString::fromUtf8(QApplication::clipboard()->mimeData()->data(QLatin1String("text/html")));
+
+ QVERIFY(clipboardData.contains(QLatin1String("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />")));
+ QVERIFY(clipboardData.contains(unicodeText));
+}
+#endif
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/WebKit/win/AccessibleDocument.cpp b/WebKit/win/AccessibleDocument.cpp
index 3b53323..e98acc1 100644
--- a/WebKit/win/AccessibleDocument.cpp
+++ b/WebKit/win/AccessibleDocument.cpp
@@ -34,7 +34,7 @@ using namespace WebCore;
// AccessibleDocument
AccessibleDocument::AccessibleDocument(Document* doc)
- : AccessibleBase(doc->axObjectCache()->getOrCreate(doc->renderer()))
+ : AccessibleBase(doc->axObjectCache()->rootObject())
{
}
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 57fbf08..de26c59 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,142 @@
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ * WebKit.vcproj/WebKit.sln:
+
+2011-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
+
+ The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
+ destructor early, in order to release wrappers once we know we no longer intend to use them.
+ Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
+ lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
+ A sequence of events that triggers the bug would look like this:
+
+ (1) Create a DOMWrapperWorld.
+ (2) Register a timer in the world.
+ (3) Call unregisterWorld() on the world.
+ (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
+ (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
+ called forgetWorld() none exists.
+ (6) Attempt to add a wrapper to a NULL map.
+
+ Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
+
+ * WebScriptWorld.cpp:
+ (WebScriptWorld::unregisterWorld):
+
+2011-01-07 Chris Marrin <cmarrin@apple.com>
+
+ Rubber-stamped by Simon Fraser.
+
+ Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
+ https://bugs.webkit.org/show_bug.cgi?id=49388
+
+ Change client API for the fullscreen video controller. It now uses a
+ PlatformCALayerClient so it can use a PlaformCALayer directly. Also
+ updated how to connect the layer tree to the view to reflect the updated
+ hardware compositing logic.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::LayerClient::LayerClient):
+ (FullscreenVideoController::LayerClient::platformCALayerRespondsToLayoutChanges):
+ (FullscreenVideoController::LayerClient::platformCALayerAnimationStarted):
+ (FullscreenVideoController::LayerClient::platformCALayerContentsOrientation):
+ (FullscreenVideoController::LayerClient::platformCALayerPaintContents):
+ (FullscreenVideoController::LayerClient::platformCALayerShowDebugBorders):
+ (FullscreenVideoController::LayerClient::platformCALayerShowRepaintCounter):
+ (FullscreenVideoController::LayerClient::platformCALayerIncrementRepaintCount):
+ (FullscreenVideoController::LayerClient::platformCALayerContentsOpaque):
+ (FullscreenVideoController::LayerClient::platformCALayerDrawsContent):
+ (FullscreenVideoController::LayerClient::platformCALayerLayerDidDisplay):
+ (FullscreenVideoController::LayerClient::platformCALayerLayoutSublayersOfLayer):
+ (FullscreenVideoController::FullscreenVideoController):
+ (FullscreenVideoController::~FullscreenVideoController):
+ (FullscreenVideoController::enterFullscreen):
+ * FullscreenVideoController.h:
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::attachRootGraphicsLayer):
+ (WebChromeClient::scheduleCompositingLayerSync):
+ * WebView.cpp:
+ (WebView::setRootChildLayer):
+ (WebView::animationsStarted):
+ (WebView::syncCompositingState):
+ * WebView.h:
+ (WebView::setRootLayerNeedsDisplay):
+
+2011-01-05 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Debug and Release builds on Windows clobber each other
+ https://bugs.webkit.org/show_bug.cgi?id=49185
+
+ Changes the structure of WebKitBuild build products directory so we
+ completely separate each build configuration into independent directories.
+
+ Although we previously had per-configuration directories for obj, this change adds
+ per-configuration directories for bin, lib, obj, and include. Each configuration's
+ build products are stored within a directory inside of WebKitBuild.
+
+ Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
+ defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
+
+ * WebKit.vcproj/InterfacesCommon.vsprops:
+ * WebKit.vcproj/InterfacesPostBuild.cmd:
+ * WebKit.vcproj/InterfacesPreBuild.cmd:
+ * WebKit.vcproj/WebKit.make:
+ * WebKit.vcproj/WebKitGUID.vcproj:
+ * WebKit.vcproj/WebKitGUIDCommon.vsprops:
+ * WebKit.vcproj/WebKitGUIDPostBuild.cmd:
+ * WebKit.vcproj/WebKitGUIDPreBuild.cmd:
+ * WebKit.vcproj/WebKitLibCommon.vsprops:
+ * WebKit.vcproj/WebKitLibPostBuild.cmd:
+ * WebKit.vcproj/WebKitLibPreBuild.cmd:
+
+2011-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WK2: Support Accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=51859
+
+ Use rootObject() method to get the top of the AX tree.
+
+ * AccessibleDocument.cpp:
+ (AccessibleDocument::AccessibleDocument):
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * WebKit.vcproj/WebKit.sln:
+ - Point to JavaScriptCore in its new location.
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::didSaveToPageCache):
+ (WebFrameLoaderClient::didRestoreFromPageCache):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+
2010-12-22 Dan Bernstein <mitz@apple.com>
Changed WebKitTools to Tools.
diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp
index 5f9b959..ab954f8 100644
--- a/WebKit/win/FullscreenVideoController.cpp
+++ b/WebKit/win/FullscreenVideoController.cpp
@@ -38,8 +38,8 @@
#include <WebCore/FontSelector.h>
#include <WebCore/GraphicsContext.h>
#include <WebCore/Page.h>
+#include <WebCore/PlatformCALayer.h>
#include <WebCore/TextRun.h>
-#include <WebCore/WKCACFLayer.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#include <windowsx.h>
#include <wtf/StdLibExtras.h>
@@ -174,20 +174,29 @@ void HUDSlider::drag(const IntPoint& point, bool start)
}
#if USE(ACCELERATED_COMPOSITING)
-class FullscreenVideoController::LayoutClient : public WKCACFLayerLayoutClient {
+class FullscreenVideoController::LayerClient : public WebCore::PlatformCALayerClient {
public:
- LayoutClient(FullscreenVideoController* parent);
- void layoutSublayersOfLayer(WKCACFLayer* layer);
+ LayerClient(FullscreenVideoController* parent) : m_parent(parent) { }
+
+private:
+ virtual void platformCALayerLayoutSublayersOfLayer(PlatformCALayer*);
+ virtual bool platformCALayerRespondsToLayoutChanges() const { return true; }
+
+ virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { }
+ virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; }
+ virtual void platformCALayerPaintContents(GraphicsContext&, const IntRect& inClip) { }
+ virtual bool platformCALayerShowDebugBorders() const { return false; }
+ virtual bool platformCALayerShowRepaintCounter() const { return false; }
+ virtual int platformCALayerIncrementRepaintCount() { return 0; }
+
+ virtual bool platformCALayerContentsOpaque() const { return false; }
+ virtual bool platformCALayerDrawsContent() const { return false; }
+ virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }
FullscreenVideoController* m_parent;
};
-FullscreenVideoController::LayoutClient::LayoutClient(FullscreenVideoController* parent)
- : m_parent(parent)
-{
-}
-
-void FullscreenVideoController::LayoutClient::layoutSublayersOfLayer(WKCACFLayer* layer)
+void FullscreenVideoController::LayerClient::platformCALayerLayoutSublayersOfLayer(PlatformCALayer* layer)
{
ASSERT_ARG(layer, layer == m_parent->m_rootChild);
@@ -195,7 +204,8 @@ void FullscreenVideoController::LayoutClient::layoutSublayersOfLayer(WKCACFLayer
if (!mediaElement)
return;
- WKCACFLayer* videoLayer = mediaElement->platformLayer();
+
+ PlatformCALayer* videoLayer = PlatformCALayer::platformCALayer(mediaElement->platformLayer());
if (!videoLayer || videoLayer->superlayer() != layer)
return;
@@ -232,20 +242,17 @@ FullscreenVideoController::FullscreenVideoController()
, m_movingWindow(false)
, m_timer(this, &FullscreenVideoController::timerFired)
#if USE(ACCELERATED_COMPOSITING)
- , m_rootChild(WKCACFLayer::create(WKCACFLayer::Layer))
- , m_layoutClient(new LayoutClient(this))
+ , m_layerClient(new LayerClient(this))
+ , m_rootChild(PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get()))
#endif
, m_fullscreenWindow(new MediaPlayerPrivateFullscreenWindow(this))
{
-#if USE(ACCELERATED_COMPOSITING)
- m_rootChild->setLayoutClient(m_layoutClient.get());
-#endif
}
FullscreenVideoController::~FullscreenVideoController()
{
#if USE(ACCELERATED_COMPOSITING)
- m_rootChild->setLayoutClient(0);
+ m_rootChild->setOwner(0);
#endif
}
@@ -273,8 +280,8 @@ void FullscreenVideoController::enterFullscreen()
#if USE(ACCELERATED_COMPOSITING)
m_fullscreenWindow->setRootChildLayer(m_rootChild);
- WKCACFLayer* videoLayer = m_mediaElement->platformLayer();
- m_rootChild->addSublayer(videoLayer);
+ PlatformCALayer* videoLayer = PlatformCALayer::platformCALayer(m_mediaElement->platformLayer());
+ m_rootChild->appendSublayer(videoLayer);
m_rootChild->setNeedsLayout();
m_rootChild->setGeometryFlipped(1);
#endif
diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h
index 9ac8c69..6b56ab5 100644
--- a/WebKit/win/FullscreenVideoController.h
+++ b/WebKit/win/FullscreenVideoController.h
@@ -39,7 +39,7 @@
namespace WebCore {
class GraphicsContext;
#if USE(ACCELERATED_COMPOSITING)
-class WKCACFLayer;
+class PlatformCALayer;
#endif
}
@@ -157,10 +157,10 @@ private:
WebCore::IntPoint m_hudPosition;
OwnPtr<WebCore::MediaPlayerPrivateFullscreenWindow> m_fullscreenWindow;
#if USE(ACCELERATED_COMPOSITING)
- RefPtr<WebCore::WKCACFLayer> m_rootChild;
- class LayoutClient;
- friend class LayoutClient;
- OwnPtr<LayoutClient> m_layoutClient;
+ class LayerClient;
+ friend class LayerClient;
+ OwnPtr<LayerClient> m_layerClient;
+ RefPtr<WebCore::PlatformCALayer> m_rootChild;
#endif
HUDButton m_playPauseButton;
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 9bc4799..9446e15 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -820,12 +820,12 @@ void WebChromeClient::setLastSetCursorToCurrentCursor()
#if USE(ACCELERATED_COMPOSITING)
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
{
- m_webView->setRootChildLayer(graphicsLayer ? static_cast<WKCACFLayer*>(graphicsLayer->platformLayer()) : 0);
+ m_webView->setRootChildLayer(graphicsLayer ? PlatformCALayer::platformCALayer(graphicsLayer->platformLayer()) : 0);
}
void WebChromeClient::scheduleCompositingLayerSync()
{
- m_webView->setRootLayerNeedsDisplay();
+ m_webView->setRootLayerNeedsDisplay(true);
}
#endif
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 24f97ca..7fd2b98 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -720,6 +720,14 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
core(m_webFrame)->createView(IntRect(rect).size(), backgroundColor, transparent, IntSize(), false);
}
+void WebFrameLoaderClient::didSaveToPageCache()
+{
+}
+
+void WebFrameLoaderClient::didRestoreFromPageCache()
+{
+}
+
void WebFrameLoaderClient::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index 981daec..573b58f 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -108,6 +108,9 @@ public:
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index e91a9e2..bb5f886 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -58,6 +58,7 @@
#include <WebCore/MemoryCache.h>
#include <WebCore/Document.h>
#include <WebCore/DocumentLoader.h>
+#include <WebCore/DocumentMarkerController.h>
#include <WebCore/DOMImplementation.h>
#include <WebCore/DOMWindow.h>
#include <WebCore/Event.h>
diff --git a/WebKit/win/WebKit.vcproj/InterfacesCommon.vsprops b/WebKit/win/WebKit.vcproj/InterfacesCommon.vsprops
index f4385ea..73d55b5 100644
--- a/WebKit/win/WebKit.vcproj/InterfacesCommon.vsprops
+++ b/WebKit/win/WebKit.vcproj/InterfacesCommon.vsprops
@@ -3,12 +3,12 @@
ProjectType="Visual C++"
Version="8.00"
Name="InterfacesCommon"
- OutputDirectory="$(WebKitOutputDir)\include\WebKit"
+ OutputDirectory="$(ConfigurationBuildDir)\include\WebKit"
>
<Tool
Name="VCMIDLTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;;..\Interfaces;&quot;$(IntDir)\include&quot;"
- TypeLibraryName="$(WebKitOutputDir)\lib\WebKit.tlb"
- OutputDirectory="$(WebKitOutputDir)\obj\WebKit\$(ProjectName)"
+ AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\obj\WebKit\DerivedSources&quot;;..\Interfaces;&quot;$(IntDir)\include&quot;"
+ TypeLibraryName="$(ConfigurationBuildDir)\lib\WebKit.tlb"
+ OutputDirectory="$(ConfigurationBuildDir)\obj\WebKit\$(ProjectName)"
/>
</VisualStudioPropertySheet>
diff --git a/WebKit/win/WebKit.vcproj/InterfacesPostBuild.cmd b/WebKit/win/WebKit.vcproj/InterfacesPostBuild.cmd
index efe6904..e5d4873 100644
--- a/WebKit/win/WebKit.vcproj/InterfacesPostBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/InterfacesPostBuild.cmd
@@ -2,6 +2,6 @@
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-perl FixMIDLHeaders.pl "%WEBKITOUTPUTDIR%/include/webkit/"
+perl FixMIDLHeaders.pl "%CONFIGURATIONBUILDDIR%/include/webkit/"
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/WebKit/win/WebKit.vcproj/InterfacesPreBuild.cmd b/WebKit/win/WebKit.vcproj/InterfacesPreBuild.cmd
index f720a20..5f2ea56 100644
--- a/WebKit/win/WebKit.vcproj/InterfacesPreBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/InterfacesPreBuild.cmd
@@ -1,9 +1,9 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\obj\WebKit\%PROJECTNAME%"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\obj\WebKit\%PROJECTNAME%"
bash "%WEBKITLIBRARIESDIR%\tools\scripts\auto-version.sh" "%INTDIR%"
diff --git a/WebKit/win/WebKit.vcproj/WebKit.make b/WebKit/win/WebKit.vcproj/WebKit.make
index 77273c5..ef8e7a6 100755
--- a/WebKit/win/WebKit.vcproj/WebKit.make
+++ b/WebKit/win/WebKit.vcproj/WebKit.make
@@ -7,12 +7,13 @@ BUILDSTYLE=Release_LTCG
install:
set WebKitLibrariesDir=$(SRCROOT)\AppleInternal
set WebKitOutputDir=$(OBJROOT)
+ set ConfigurationBuildDir=$(OBJROOT)\$(BUILDSTYLE)
set WebKitVSPropsRedirectionDir=$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\
set PRODUCTION=1
devenv "WebKit.submit.sln" /rebuild $(BUILDSTYLE)
- -xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
- xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
- -xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
- xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y
- xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
- xcopy "$(OBJROOT)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
+ -xcopy "$(ConfigurationBuildDir)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
+ xcopy "$(ConfigurationBuildDir)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
+ -xcopy "$(ConfigurationBuildDir)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
+ xcopy "$(ConfigurationBuildDir)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y
+ xcopy "$(ConfigurationBuildDir)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
+ xcopy "$(ConfigurationBuildDir)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln
index c5a57eb..febe55e 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -1,43 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"
ProjectSection(ProjectDependencies) = postProject
{AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\Source\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
ProjectSection(ProjectDependencies) = postProject
{E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\Source\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
ProjectSection(ProjectDependencies) = postProject
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "..\..\..\Source\JavaScriptCore\JavaScriptCore.vcproj\jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
ProjectSection(ProjectDependencies) = postProject
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2} = {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScriptCore Folder", "JavaScriptCore Folder", "{557FA164-0E39-4DEC-B66C-8795C8E52399}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebCore Folder", "WebCore Folder", "{63FB6F8A-C601-43E3-BD16-A00A465C2CB6}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\..\WebCore\WebCore.vcproj\WebCoreGenerated.vcproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\..\Source\WebCore\WebCore.vcproj\WebCoreGenerated.vcproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}"
ProjectSection(ProjectDependencies) = postProject
{011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\Source\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"
ProjectSection(ProjectDependencies) = postProject
{0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testapi\testapi.vcproj", "{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\Source\JavaScriptCore\JavaScriptCore.vcproj\testapi\testapi.vcproj", "{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}"
ProjectSection(ProjectDependencies) = postProject
{DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
EndProjectSection
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
index ce0973f..4d0ebdf 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKitGUID.vcproj
@@ -339,7 +339,7 @@
</References>
<Files>
<File
- RelativePath="$(WebKitOutputDir)\obj\WebKit\Interfaces\WebKit_i.c"
+ RelativePath="$(ConfigurationBuildDir)\obj\WebKit\Interfaces\WebKit_i.c"
>
</File>
</Files>
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUIDCommon.vsprops b/WebKit/win/WebKit.vcproj/WebKitGUIDCommon.vsprops
index 677847d..1621ea6 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUIDCommon.vsprops
+++ b/WebKit/win/WebKit.vcproj/WebKitGUIDCommon.vsprops
@@ -3,11 +3,11 @@
ProjectType="Visual C++"
Version="8.00"
Name="WebKitGUIDCommon"
- OutputDirectory="$(WebKitOutputDir)\lib"
+ OutputDirectory="$(ConfigurationBuildDir)\lib"
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(WebKitOutputDir)\$(ConfigurationName)\WebKit"
+ AdditionalIncludeDirectories="$(ConfigurationBuildDir)\WebKit"
PreprocessorDefinitions="_USRDLL;WEBKITGUID_EXPORTS"
/>
<Tool
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUIDPostBuild.cmd b/WebKit/win/WebKit.vcproj/WebKitGUIDPostBuild.cmd
index f011495..26707ca 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUIDPostBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/WebKitGUIDPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/WebKit/win/WebKit.vcproj/WebKitGUIDPreBuild.cmd b/WebKit/win/WebKit.vcproj/WebKitGUIDPreBuild.cmd
index 3a84c26..a770776 100644
--- a/WebKit/win/WebKit.vcproj/WebKitGUIDPreBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/WebKitGUIDPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/WebKit/win/WebKit.vcproj/WebKitLibCommon.vsprops b/WebKit/win/WebKit.vcproj/WebKitLibCommon.vsprops
index 7caff4d..0797866 100644
--- a/WebKit/win/WebKit.vcproj/WebKitLibCommon.vsprops
+++ b/WebKit/win/WebKit.vcproj/WebKitLibCommon.vsprops
@@ -3,11 +3,11 @@
ProjectType="Visual C++"
Version="8.00"
Name="WebKitLibCommon"
- OutputDirectory="$(WebKitOutputDir)\lib"
+ OutputDirectory="$(ConfigurationBuildDir)\lib"
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include\WebKit&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..\WebCoreSupport&quot;;&quot;$(IntDir)\include&quot;;&quot;$(ConfigurationBuildDir)\obj\WebKit\DerivedSources&quot;"
PreprocessorDefinitions="_USRDLL;WEBKIT_EXPORTS;FRAMEWORK_NAME=WebKit"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebKitPrefix.h"
@@ -17,6 +17,6 @@
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="$(WebKitOutputDir)\obj\WebKit\"
+ AdditionalIncludeDirectories="$(ConfigurationBuildDir)\obj\WebKit\"
/>
</VisualStudioPropertySheet>
diff --git a/WebKit/win/WebKit.vcproj/WebKitLibPostBuild.cmd b/WebKit/win/WebKit.vcproj/WebKitLibPostBuild.cmd
index 99f84fe..7968952 100644
--- a/WebKit/win/WebKit.vcproj/WebKitLibPostBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/WebKitLibPostBuild.cmd
@@ -1,19 +1,19 @@
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\include\WebKit"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\WebKit"
-xcopy /y /d "%PROJECTDIR%\..\WebLocalizableStrings.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%PROJECTDIR%\..\WebKitGraphics.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%PROJECTDIR%\..\WebKitCOMAPI.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%PROJECTDIR%\..\WebPreferenceKeysPrivate.h" "%WEBKITOUTPUTDIR%\include\WebKit"
+xcopy /y /d "%PROJECTDIR%\..\WebLocalizableStrings.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%PROJECTDIR%\..\WebKitGraphics.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%PROJECTDIR%\..\WebKitCOMAPI.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%PROJECTDIR%\..\WebPreferenceKeysPrivate.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
-xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\npapi.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\npfunctions.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\npruntime.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\npruntime_internal.h" "%WEBKITOUTPUTDIR%\include\WebKit"
-xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\nptypes.h" "%WEBKITOUTPUTDIR%\include\WebKit"
+xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\npapi.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\npfunctions.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\npruntime.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\npruntime_internal.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
+xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\nptypes.h" "%CONFIGURATIONBUILDDIR%\include\WebKit"
mkdir 2>NUL "%OUTDIR%\..\bin\WebKit.resources"
xcopy /y /d "%PROJECTDIR%..\WebKit.resources\*" "%OUTDIR%\..\bin\WebKit.resources"
mkdir 2>NUL "%OUTDIR%\..\bin\WebKit.resources\en.lproj"
xcopy /y /d "%PROJECTDIR%..\..\English.lproj\Localizable.strings" "%OUTDIR%\..\bin\WebKit.resources\en.lproj\"
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/WebKit/win/WebKit.vcproj/WebKitLibPreBuild.cmd b/WebKit/win/WebKit.vcproj/WebKitLibPreBuild.cmd
index 312033d..b6f0bd4 100644
--- a/WebKit/win/WebKit.vcproj/WebKitLibPreBuild.cmd
+++ b/WebKit/win/WebKit.vcproj/WebKitLibPreBuild.cmd
@@ -1,16 +1,16 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
-touch "%WEBKITOUTPUTDIR%\tmp.cpp"
-cl /analyze /nologo /c "%WEBKITOUTPUTDIR%\tmp.cpp" /Fo"%INTDIR%\tmp.obj" 2>&1 | findstr D9040
+touch "%CONFIGURATIONBUILDDIR%\tmp.cpp"
+cl /analyze /nologo /c "%CONFIGURATIONBUILDDIR%\tmp.cpp" /Fo"%INTDIR%\tmp.obj" 2>&1 | findstr D9040
if ERRORLEVEL 1 (set EnablePREfast="true") else (set EnablePREfast="false")
if ERRORLEVEL 1 (set AnalyzeWithLargeStack="/analyze:65536") else (set AnalyzeWithLargeStack="")
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\include\JavaScriptCore"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\include\JavaScriptCore\*" "%WEBKITOUTPUTDIR%\include\JavaScriptCore"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\JavaScriptCore"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\include\JavaScriptCore\*" "%CONFIGURATIONBUILDDIR%\include\JavaScriptCore"
bash "%WEBKITLIBRARIESDIR%\tools\scripts\auto-version.sh" "%INTDIR%"
diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp
index 9c661d9..6a35571 100644
--- a/WebKit/win/WebScriptWorld.cpp
+++ b/WebKit/win/WebScriptWorld.cpp
@@ -139,6 +139,6 @@ HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context,
HRESULT WebScriptWorld::unregisterWorld()
{
- m_world->unregisterWorld();
+ m_world->clearWrappers();
return S_OK;
}
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 1b658bf..f0d504e 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -75,6 +75,7 @@
#include <WebCore/ContextMenuController.h>
#include <WebCore/Cursor.h>
#include <WebCore/Document.h>
+#include <WebCore/DocumentMarkerController.h>
#include <WebCore/DragController.h>
#include <WebCore/DragData.h>
#include <WebCore/Editor.h>
@@ -6230,7 +6231,7 @@ void WebView::downloadURL(const KURL& url)
}
#if USE(ACCELERATED_COMPOSITING)
-void WebView::setRootChildLayer(WebCore::WKCACFLayer* layer)
+void WebView::setRootChildLayer(WebCore::PlatformCALayer* layer)
{
setAcceleratedCompositing(layer ? true : false);
if (m_layerRenderer)
@@ -6468,6 +6469,20 @@ bool WebView::shouldRender() const
return !frameView->layoutPending();
}
+
+void WebView::animationsStarted(CFTimeInterval t)
+{
+ // Tell the animation controller that its animations have started
+ m_page->mainFrame()->animation()->notifyAnimationStarted(0, t);
+}
+
+void WebView::syncCompositingState()
+{
+ Frame* coreFrame = core(m_mainFrame);
+ if (coreFrame && coreFrame->view())
+ coreFrame->view()->syncCompositingStateRecursive();
+}
+
#endif
class EnumTextMatches : public IEnumTextMatches
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 424b03a..192c05c 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -40,7 +40,7 @@
#include <wtf/RefPtr.h>
#if USE(ACCELERATED_COMPOSITING)
-#include <WebCore/WKCACFLayer.h>
+#include <WebCore/PlatformCALayer.h>
#include <WebCore/WKCACFLayerRenderer.h>
#endif
@@ -904,8 +904,12 @@ public:
void downloadURL(const WebCore::KURL&);
#if USE(ACCELERATED_COMPOSITING)
- void setRootLayerNeedsDisplay() { if (m_layerRenderer) m_layerRenderer->setNeedsDisplay(); }
- void setRootChildLayer(WebCore::WKCACFLayer* layer);
+ void setRootLayerNeedsDisplay(bool sync = false)
+ {
+ if (m_layerRenderer)
+ m_layerRenderer->setNeedsDisplay(sync);
+ }
+ void setRootChildLayer(WebCore::PlatformCALayer*);
#endif
void enterFullscreenForNode(WebCore::Node*);
@@ -941,6 +945,8 @@ private:
#if USE(ACCELERATED_COMPOSITING)
// WKCACFLayerRendererClient
virtual bool shouldRender() const;
+ virtual void animationsStarted(CFTimeInterval);
+ virtual void syncCompositingState();
#endif
protected:
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index 741e527..f44bddf 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,47 @@
+2011-01-04 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed WinCE build fix.
+
+ * WebCoreSupport/ChromeClientWinCE.cpp:
+ (WebKit::ChromeClientWinCE::exceededDatabaseQuota): Added missing semicolon.
+ (WebKit::ChromeClientWinCE::reachedApplicationCacheOriginQuota):
+ * WebCoreSupport/ChromeClientWinCE.h:
+
+2010-12-29 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed build fix for WinCE after r73802.
+
+ * WebCoreSupport/ContextMenuClientWinCE.cpp:
+ (WebKit::ContextMenuClientWinCE::customizeMenu):
+ * WebCoreSupport/ContextMenuClientWinCE.h:
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebCoreSupport/FrameLoaderClientWinCE.cpp:
+ (WebKit::FrameLoaderClientWinCE::didSaveToPageCache):
+ (WebKit::FrameLoaderClientWinCE::didRestoreFromPageCache):
+ * WebCoreSupport/FrameLoaderClientWinCE.h:
+
+2010-12-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Editor.h doesn't need to include SelectionController.h
+ https://bugs.webkit.org/show_bug.cgi?id=51441
+
+ Renamed SelectionController::EDirection to SelectionDirection.
+
+ * WebCoreSupport/EditorClientWinCE.cpp:
+ (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
+
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
index e19d6ad..659d246 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
@@ -305,7 +305,7 @@ void ChromeClientWinCE::print(Frame*)
#if ENABLE(DATABASE)
void ChromeClientWinCE::exceededDatabaseQuota(Frame*, const String&)
{
- notImplemented()
+ notImplemented();
}
#endif
@@ -314,6 +314,11 @@ void ChromeClientWinCE::reachedMaxAppCacheSize(int64_t)
{
notImplemented();
}
+
+void ChromeClientWinCE::reachedApplicationCacheOriginQuota(SecurityOrigin*)
+{
+ notImplemented();
+}
#endif
#if ENABLE(TOUCH_EVENTS)
diff --git a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
index 3069472..4e7fb28 100644
--- a/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
@@ -114,7 +114,7 @@ public:
virtual void print(WebCore::Frame*);
#if ENABLE(DATABASE)
- virtual void exceededDatabaseQuota(WebCore::Frame*, const WTF::String& databaseName) = 0;
+ virtual void exceededDatabaseQuota(WebCore::Frame*, const WTF::String& databaseName);
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
@@ -123,7 +123,14 @@ public:
// size or past the amount of free space on the device.
// The chrome client would need to take some action such as evicting some
// old caches.
- virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) = 0;
+ virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
+
+ // Callback invoked when the application cache origin quota is reached. This
+ // means that the resources attempting to be cached via the manifest are
+ // more than allowed on this origin. This callback allows the chrome client
+ // to take action, such as prompting the user to ask to increase the quota
+ // for this origin.
+ virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*);
#endif
#if ENABLE(CONTEXT_MENUS)
@@ -131,7 +138,7 @@ public:
#endif
#if ENABLE(NOTIFICATIONS)
- virtual WebCore::NotificationPresenter* notificationPresenter() const = 0;
+ virtual WebCore::NotificationPresenter* notificationPresenter() const;
#endif
// This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
index 7358f2a..dda4d27 100644
--- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
@@ -42,9 +42,9 @@ void ContextMenuClientWinCE::contextMenuDestroyed()
delete this;
}
-PlatformMenuDescription ContextMenuClientWinCE::getCustomMenuFromDefaultItems(ContextMenu* menu)
+PassOwnPtr<ContextMenu> ContextMenuClientWinCE::customizeMenu(PassOwnPtr<ContextMenu> menu)
{
- return menu->releasePlatformDescription();
+ return menu;
}
void ContextMenuClientWinCE::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
index 13d91d1..8cd1951 100644
--- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
@@ -37,7 +37,7 @@ public:
virtual void contextMenuDestroyed();
- virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
+ virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
virtual void downloadURL(const WebCore::KURL&);
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
index c4555ed..77cc720 100644
--- a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
@@ -353,25 +353,25 @@ bool EditorClientWinCE::handleEditingKeyboardEvent(KeyboardEvent* event)
switch (keyEvent->windowsVirtualKeyCode()) {
case VK_LEFT:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionLeft,
+ DirectionLeft,
keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
return true;
case VK_RIGHT:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionRight,
+ DirectionRight,
keyEvent->ctrlKey() ? WordGranularity : CharacterGranularity,
true);
return true;
case VK_UP:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionBackward,
+ DirectionBackward,
keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
return true;
case VK_DOWN:
frame->selection()->modify(keyEvent->shiftKey() ? SelectionController::AlterationExtend : SelectionController::AlterationMove,
- SelectionController::DirectionForward,
+ DirectionForward,
keyEvent->ctrlKey() ? ParagraphGranularity : LineGranularity,
true);
return true;
diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
index f3643b2..6a8fb74 100644
--- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
@@ -630,6 +630,14 @@ void FrameLoaderClientWinCE::transitionToCommittedForNewPage()
m_frame->ownerRenderer()->setWidget(frameView);
}
+void FrameLoaderClientWinCE::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientWinCE::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientWinCE::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
index 46b3a19..c4dcf6d 100644
--- a/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
@@ -175,6 +175,9 @@ public:
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual bool canCachePage() const;
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index a40fc5c..e1a6dad 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,39 @@
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ * bindings/python/wscript:
+ * wscript:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * bindings/python/wscript:
+ * wscript:
+ - Point to JavaScriptCore in its new location.
+
+2010-12-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebKit2 needs to mirror the frame tree in the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=51546
+
+ - Add client functions to notify that a frame has been added or
+ removed from the page cache.
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::didSaveToPageCache):
+ (WebCore::FrameLoaderClientWx::didRestoreFromPageCache):
+ * WebKitSupport/FrameLoaderClientWx.h:
+
2010-12-20 Eric Seidel <eric@webkit.org>
Unreviewed.
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 8748a98..362c726 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -966,6 +966,14 @@ void FrameLoaderClientWx::transitionToCommittedForNewPage()
m_frame->createView(size, backgroundColor, transparent, IntSize(), false);
}
+void FrameLoaderClientWx::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientWx::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientWx::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
index cb34b0f..b56a900 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
@@ -151,7 +151,10 @@ namespace WebCore {
virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
virtual void transitionToCommittedForNewPage();
-
+
+ virtual void didSaveToPageCache();
+ virtual void didRestoreFromPageCache();
+
virtual void dispatchDidBecomeFrameset(bool);
virtual void updateGlobalHistory();
diff --git a/WebKit/wx/bindings/python/wscript b/WebKit/wx/bindings/python/wscript
index cd07836..0a1df31 100644
--- a/WebKit/wx/bindings/python/wscript
+++ b/WebKit/wx/bindings/python/wscript
@@ -30,9 +30,9 @@ import Logs
import Options
include_paths = [
- os.path.join(wk_root, 'JavaScriptCore'),
- os.path.join(wk_root, 'WebCore', 'bindings', 'cpp'),
- os.path.join(wk_root, 'WebCore', 'DerivedSources'),
+ os.path.join(wk_root, 'Source', 'JavaScriptCore'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'cpp'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'DerivedSources'),
os.path.join(wk_root, 'WebKit', 'wx'),
os.path.join(wx_root, 'wxPython', 'include'),
os.path.join(wx_root, '..', 'wxPython', 'include'),
diff --git a/WebKit/wx/wscript b/WebKit/wx/wscript
index fa3e06f..f91a69c 100644
--- a/WebKit/wx/wscript
+++ b/WebKit/wx/wscript
@@ -30,20 +30,20 @@ from settings import *
webkit_dirs = ['.', 'WebKitSupport']
include_paths = webkit_dirs + common_includes + ['.', '..',
wk_root,
- os.path.join(wk_root, 'JavaScriptCore'),
- os.path.join(wk_root, 'WebCore'),
- os.path.join(wk_root, 'WebCore', 'bindings', 'wx'),
- os.path.join(wk_root, 'WebCore', 'DerivedSources'),
+ os.path.join(wk_root, 'Source', 'JavaScriptCore'),
+ os.path.join(wk_root, 'Source', 'WebCore'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'wx'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'DerivedSources'),
os.path.join(output_dir),
- os.path.join(wk_root, 'WebCore', 'page', 'wx'),
- os.path.join(wk_root, 'WebCore', 'platform', 'network', 'curl'),
- os.path.join(wk_root, 'WebCore', 'platform', 'wx'),
- os.path.join(wk_root, 'WebCore', 'platform', 'bridge', 'wx'),
- os.path.join(wk_root, 'WebCore', 'platform', 'graphics', 'wx'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'page', 'wx'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'network', 'curl'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'wx'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'bridge', 'wx'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'platform', 'graphics', 'wx'),
]
if sys.platform.startswith("win"):
- include_paths.append(os.path.join(wk_root, 'WebCore','platform','win'))
+ include_paths.append(os.path.join(wk_root, 'Source', 'WebCore','platform','win'))
windows_deps = [
'lib/pthreadVC2.dll',
@@ -54,11 +54,11 @@ windows_deps = [
webcore_include_dirs = []
for dir in webcore_dirs + ['DerivedSources']:
- include_paths.append(os.path.join(wk_root, 'WebCore', dir))
+ include_paths.append(os.path.join(wk_root, 'Source', 'WebCore', dir))
-js_include_dirs = [os.path.join(wk_root, 'JavaScriptCore', 'assembler')]
+js_include_dirs = [os.path.join(wk_root, 'Source', 'JavaScriptCore', 'assembler')]
for dir in jscore_dirs:
- js_include_dirs.append(os.path.join(wk_root, 'JavaScriptCore', dir))
+ js_include_dirs.append(os.path.join(wk_root, 'Source', 'JavaScriptCore', dir))
def set_options(opt):
common_set_options(opt)
@@ -110,7 +110,7 @@ def build(bld):
exts = ['.c', '.cpp']
if sys.platform.startswith('darwin'):
exts.append('.mm')
- obj.includes += '../mac/WebCoreSupport ../../WebCore/platform/mac'
+ obj.includes += '../mac/WebCoreSupport ../../Source/WebCore/platform/mac'
obj.source = "../mac/WebCoreSupport/WebSystemInterface.mm"
obj.find_sources_in_dirs(webkit_dirs)