summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-06-15 19:36:43 +0100
committerBen Murdoch <benm@google.com>2010-06-16 14:52:28 +0100
commit545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch)
treec0c14763654d84d37577dde512c3d3b4699a9e86 /WebKit
parent719298a66237d38ea5c05f1547123ad8aacbc237 (diff)
downloadexternal_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/ChangeLog53
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj8
-rw-r--r--WebKit/cf/ChangeLog42
-rw-r--r--WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp27
-rw-r--r--WebKit/chromium/ChangeLog800
-rw-r--r--WebKit/chromium/DEPS27
-rw-r--r--WebKit/chromium/WebKit.grd1
-rw-r--r--WebKit/chromium/WebKit.gyp86
-rw-r--r--WebKit/chromium/WebKit.gypi1
-rw-r--r--WebKit/chromium/features.gypi1
-rwxr-xr-xWebKit/chromium/gyp_webkit8
-rw-r--r--WebKit/chromium/public/WebDevToolsAgentClient.h1
-rw-r--r--WebKit/chromium/public/WebIDBCallbacks.h2
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h42
-rwxr-xr-xWebKit/chromium/public/WebIDBObjectStore.h75
-rw-r--r--WebKit/chromium/public/WebIndexedDatabase.h10
-rw-r--r--WebKit/chromium/public/WebInputElement.h5
-rw-r--r--WebKit/chromium/public/WebURLResponse.h4
-rw-r--r--WebKit/chromium/public/WebView.h5
-rw-r--r--WebKit/chromium/public/WebViewClient.h28
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.cpp77
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.h12
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp83
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h4
-rw-r--r--WebKit/chromium/src/DebuggerAgent.h5
-rw-r--r--WebKit/chromium/src/DebuggerAgentImpl.cpp5
-rw-r--r--WebKit/chromium/src/DebuggerAgentImpl.h1
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp2
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.cpp7
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.h3
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp31
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h14
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.cpp89
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.h67
-rw-r--r--WebKit/chromium/src/IndexedDatabaseProxy.cpp6
-rw-r--r--WebKit/chromium/src/IndexedDatabaseProxy.h2
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.cpp18
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.h13
-rw-r--r--WebKit/chromium/src/NotificationPresenterImpl.cpp5
-rw-r--r--WebKit/chromium/src/SuggestionsPopupMenuClient.h2
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebEntities.cpp4
-rw-r--r--WebKit/chromium/src/WebFormControlElement.cpp2
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.h1
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp41
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h18
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.cpp84
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.h60
-rw-r--r--WebKit/chromium/src/WebImageCG.cpp10
-rw-r--r--WebKit/chromium/src/WebIndexedDatabaseImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebIndexedDatabaseImpl.h2
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp15
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp1
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp14
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp2
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp10
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp60
-rw-r--r--WebKit/chromium/src/WebViewImpl.h8
-rw-r--r--WebKit/chromium/src/gtk/WebInputEventFactory.cpp54
-rw-r--r--WebKit/chromium/src/js/DebuggerAgent.js72
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js46
-rw-r--r--WebKit/chromium/src/js/DevTools.js71
-rw-r--r--WebKit/chromium/src/js/DevToolsHostStub.js4
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js21
-rw-r--r--WebKit/chromium/src/js/Tests.js4
-rwxr-xr-xWebKit/chromium/src/js/devTools.css4
-rw-r--r--WebKit/chromium/tests/PopupMenuTest.cpp2
-rw-r--r--WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp7
-rw-r--r--WebKit/efl/WebCoreSupport/InspectorClientEfl.h2
-rw-r--r--WebKit/gtk/ChangeLog240
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp6
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.cpp16
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp5
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp50
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.h16
-rw-r--r--WebKit/gtk/docs/webkitgtk-docs.sgml6
-rw-r--r--WebKit/gtk/docs/webkitgtk-sections.txt13
-rw-r--r--WebKit/gtk/tests/testdomnode.c147
-rw-r--r--WebKit/gtk/tests/testhittestresult.c22
-rw-r--r--WebKit/gtk/webkit/webkithittestresult.cpp33
-rw-r--r--WebKit/gtk/webkit/webkitprivate.cpp20
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h4
-rw-r--r--WebKit/gtk/webkit/webkitwebinspector.cpp1
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp147
-rw-r--r--WebKit/haiku/ChangeLog42
-rw-r--r--WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp6
-rw-r--r--WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h2
-rw-r--r--WebKit/mac/ChangeLog184
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h1
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm2
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm10
-rw-r--r--WebKit/mac/WebCoreSupport/WebContextMenuClient.mm2
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationMock.mm63
-rw-r--r--WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h33
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.h20
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.mm16
-rw-r--r--WebKit/mac/WebKit.exp1
-rw-r--r--WebKit/mac/WebView/WebDynamicScrollBarsView.mm4
-rw-r--r--WebKit/mac/WebView/WebFrame.mm2
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h2
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm10
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebView.mm3
-rw-r--r--WebKit/qt/Api/qwebframe.cpp8
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp5
-rw-r--r--WebKit/qt/Api/qwebhistory.h1
-rw-r--r--WebKit/qt/Api/qwebhistory_p.h2
-rw-r--r--WebKit/qt/Api/qwebkitplatformplugin.h31
-rw-r--r--WebKit/qt/Api/qwebpage.cpp55
-rw-r--r--WebKit/qt/Api/qwebpage.h1
-rw-r--r--WebKit/qt/Api/qwebpage_p.h5
-rw-r--r--WebKit/qt/Api/qwebpluginfactory.cpp4
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp18
-rw-r--r--WebKit/qt/Api/qwebsettings.h6
-rw-r--r--WebKit/qt/ChangeLog686
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp45
-rw-r--r--WebKit/qt/WebCoreSupport/ContextMenuClientQt.h33
-rw-r--r--WebKit/qt/WebCoreSupport/DragClientQt.cpp2
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp77
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h16
-rw-r--r--WebKit/qt/WebCoreSupport/EditCommandQt.cpp25
-rw-r--r--WebKit/qt/WebCoreSupport/EditCommandQt.h16
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp36
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.h4
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp12
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h378
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorClientQt.cpp57
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorClientQt.h8
-rw-r--r--WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp253
-rw-r--r--WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h64
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h4
-rw-r--r--WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp64
-rw-r--r--WebKit/qt/WebCoreSupport/QtPlatformPlugin.h10
-rw-r--r--WebKit/qt/docs/qtwebkit-bridge.qdoc427
-rw-r--r--WebKit/qt/docs/qtwebkit.qdoc5
-rw-r--r--WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp177
-rw-r--r--WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp66
-rw-r--r--WebKit/qt/examples/platformplugin/WebNotificationPresenter.h59
-rw-r--r--WebKit/qt/examples/platformplugin/WebPlugin.cpp10
-rw-r--r--WebKit/qt/examples/platformplugin/WebPlugin.h6
-rw-r--r--WebKit/qt/examples/platformplugin/platformplugin.pro8
-rw-r--r--WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h31
-rw-r--r--WebKit/qt/qt_webkit_version.pri (renamed from WebKit/qt/qtwebkit_version.pri)0
-rw-r--r--WebKit/qt/symbian/eabi/QtWebKitu.def6
-rw-r--r--WebKit/qt/tests/qgraphicswebview/resources/input_types.html8
-rw-r--r--WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp76
-rw-r--r--WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc6
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp58
-rw-r--r--WebKit/qt/tests/qwebview/resources/input_types.html8
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp63
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.qrc1
-rw-r--r--WebKit/win/ChangeLog96
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl2
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl2
-rw-r--r--WebKit/win/Interfaces/WebKit.idl1
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.cpp7
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.h16
-rw-r--r--WebKit/win/WebFrame.cpp7
-rw-r--r--WebKit/win/WebFrame.h2
-rw-r--r--WebKit/win/WebView.cpp7
-rw-r--r--WebKit/win/WebView.h2
-rw-r--r--WebKit/wx/ChangeLog42
-rw-r--r--WebKit/wx/WebKitSupport/InspectorClientWx.cpp6
-rw-r--r--WebKit/wx/WebKitSupport/InspectorClientWx.h2
168 files changed, 5663 insertions, 922 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c283bb7..77dc9cf 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,56 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * efl/WebCoreSupport/InspectorClientEfl.cpp:
+ (WebCore::InspectorClientEfl::sendMessageToFrontend):
+ * efl/WebCoreSupport/InspectorClientEfl.h:
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * efl/WebCoreSupport/InspectorClientEfl.cpp:
+ * efl/WebCoreSupport/InspectorClientEfl.h:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * efl/WebCoreSupport/InspectorClientEfl.cpp:
+ (WebCore::InspectorClientEfl::sendMessageToFrontend):
+ * efl/WebCoreSupport/InspectorClientEfl.h:
+
+2010-06-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39434
+ REGRESSION (r59811): Geolocation callbacks cannot be created
+
+ Removing unused WebGeolocationMock.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
2010-05-31 Lyon Chen <liachen@rim.com>
Reviewed by Kent Tamura.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index d80e3aa..2972a3d 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -110,8 +110,6 @@
51FDC4D30B0AF5C100F84EB3 /* WebHistoryItemPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FDC4D20B0AF5C100F84EB3 /* WebHistoryItemPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
5241ADF50B1BC48A004012BD /* WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5241ADF30B1BC48A004012BD /* WebCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5241ADF40B1BC48A004012BD /* WebCache.mm */; };
- 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */ = {isa = PBXBuildFile; fileRef = 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */; };
- 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D7BF8120C2A1D90008CE06D /* WebInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; };
5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib */; };
@@ -510,8 +508,6 @@
51FDC4D20B0AF5C100F84EB3 /* WebHistoryItemPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryItemPrivate.h; sourceTree = "<group>"; };
5241ADF30B1BC48A004012BD /* WebCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCache.h; sourceTree = "<group>"; };
5241ADF40B1BC48A004012BD /* WebCache.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCache.mm; sourceTree = "<group>"; };
- 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocationMock.mm; sourceTree = "<group>"; };
- 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationMockPrivate.h; sourceTree = "<group>"; };
5D7BF8120C2A1D90008CE06D /* WebInspector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebInspector.h; sourceTree = "<group>"; };
5D7BF8130C2A1D90008CE06D /* WebInspector.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspector.mm; sourceTree = "<group>"; };
5DE83A750D0F7F9400CAD12A /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/WebJavaScriptTextInputPanel.nib; sourceTree = SOURCE_ROOT; };
@@ -1234,8 +1230,6 @@
931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
BC7F884910C8775A00D6133D /* WebGeolocationControllerClient.h */,
BC7F884A10C8775A00D6133D /* WebGeolocationControllerClient.mm */,
- 59C77F3310545F7E00506104 /* WebGeolocationMock.mm */,
- 59C77F4A105471E700506104 /* WebGeolocationMockPrivate.h */,
51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */,
51494CD50C7EBDE0004178C5 /* WebIconDatabaseClient.mm */,
9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */,
@@ -1414,7 +1408,6 @@
9398106F0824BF01008DF038 /* WebFrameViewInternal.h in Headers */,
939810AF0824BF01008DF038 /* WebFrameViewPrivate.h in Headers */,
BC7F884B10C8775A00D6133D /* WebGeolocationControllerClient.h in Headers */,
- 59C77F4B105471E700506104 /* WebGeolocationMockPrivate.h in Headers */,
BC7F889E10C9D30C00D6133D /* WebGeolocationPosition.h in Headers */,
BC7F88A510C9D88B00D6133D /* WebGeolocationPositionInternal.h in Headers */,
939810120824BF01008DF038 /* WebHistory.h in Headers */,
@@ -1813,7 +1806,6 @@
931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
BC7F884C10C8775A00D6133D /* WebGeolocationControllerClient.mm in Sources */,
- 59C77F3510545F7E00506104 /* WebGeolocationMock.mm in Sources */,
BC7F889F10C9D30C00D6133D /* WebGeolocationPosition.mm in Sources */,
939811130824BF01008DF038 /* WebHistory.mm in Sources */,
939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */,
diff --git a/WebKit/cf/ChangeLog b/WebKit/cf/ChangeLog
index 1f59dec..957dce1 100644
--- a/WebKit/cf/ChangeLog
+++ b/WebKit/cf/ChangeLog
@@ -1,3 +1,45 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+ (WebInspectorClient::releaseFrontendPage):
+ (WebInspectorClient::sendMessageToFrontend):
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+ (WebInspectorClient::storeSetting):
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+ (WebInspectorClient::releaseFrontendPage):
+ (WebInspectorClient::sendMessageToFrontend):
+
2010-01-07 Alexey Proskuryakov <ap@apple.com>
Reviewed by Geoffrey Garen.
diff --git a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
index 0d66b83..dc5a186 100644
--- a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -53,6 +53,8 @@
#include <CoreFoundation/CoreFoundation.h>
+#include <WebCore/Frame.h>
+#include <WebCore/Page.h>
#include <WebCore/PlatformString.h>
#include <wtf/RetainPtr.h>
@@ -92,3 +94,28 @@ void WebInspectorClient::storeSetting(const String& key, const String& setting)
RetainPtr<CFStringRef> preferencesKey(AdoptCF, createKeyForPreferences(key));
CFPreferencesSetAppValue(preferencesKey.get(), objectToStore.get(), kCFPreferencesCurrentApplication);
}
+
+void WebInspectorClient::releaseFrontendPage()
+{
+ m_frontendPage = 0;
+}
+
+bool WebInspectorClient::sendMessageToFrontend(const String& message)
+{
+ if (!m_frontendPage)
+ return false;
+
+ Frame* frame = m_frontendPage->mainFrame();
+ if (!frame)
+ return false;
+
+ ScriptController* scriptController = frame->script();
+ if (!scriptController)
+ return false;
+
+ String dispatchToFrontend("WebInspector.dispatchMessageFromBackend(");
+ dispatchToFrontend += message;
+ dispatchToFrontend += ");";
+ scriptController->executeScript(dispatchToFrontend);
+ return true;
+}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 50ae8ae..452c79d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,803 @@
+2010-06-14 Jeremy Orlow <jorlow@chromium.org>
+
+ Build fix.
+
+ * src/IDBCallbacksProxy.h:
+
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::sendMessageToFrontend):
+ * src/InspectorClientImpl.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController):
+
+2010-06-13 Tony Chang <tony@chromium.org>
+
+ Build fix, not reviewed.
+
+ fix chromium compile after r61094 (id attribute refactor)
+ https://bugs.webkit.org/show_bug.cgi?id=40553
+
+ * src/ChromeClientImpl.cpp:
+ * src/WebFormControlElement.cpp:
+ (WebKit::WebFormControlElement::nameForAutofill):
+
+2010-06-13 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Centralize the gperf code generation commands into make-hash-tools.pl
+ to avoid redundancy across multiple build systems.
+ Do this in preparation of refactoring the usage of these generated
+ sources to fix the debug linking error on Linux with gcc >= 4.4.0.
+
+ webkit.org/b/29244
+
+ * src/WebEntities.cpp:
+
+2010-06-11 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Rename the rest of the *Tokenizer classes to *DocumentParser
+ https://bugs.webkit.org/show_bug.cgi?id=40507
+
+ * src/WebEntities.cpp:
+ - Fix a comment to match new class names.
+
+2010-06-12 Evan Stade <estade@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Menu key should act on current selection even if it is not editable
+ https://bugs.webkit.org/show_bug.cgi?id=40348
+
+ Allow the menu key to act on non-editable selections.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+
+2010-06-11 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Notify the WebView when the AutoFill popup hides.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40459
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::selectionCleared):
+
+2010-06-11 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Roll chromium DEPS 49376:49521
+ https://bugs.webkit.org/show_bug.cgi?id=40488
+
+ * DEPS:
+
+2010-06-10 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Implement more of IndexedDB's Indexes and ObjectStores
+ https://bugs.webkit.org/show_bug.cgi?id=40424
+
+ Add plumbing for both of these classes.
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::name):
+ (WebKit::WebIDBDatabase::description):
+ (WebKit::WebIDBDatabase::version):
+ (WebKit::WebIDBDatabase::objectStores):
+ (WebKit::WebIDBDatabase::objectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::indexNames):
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::index):
+ (WebKit::WebIDBObjectStore::removeIndex):
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::name):
+ (WebCore::IDBDatabaseProxy::description):
+ (WebCore::IDBDatabaseProxy::version):
+ (WebCore::IDBDatabaseProxy::objectStores):
+ (WebCore::IDBDatabaseProxy::objectStore):
+ (WebCore::IDBDatabaseProxy::removeObjectStore):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::indexNames):
+ (WebCore::IDBObjectStoreProxy::createIndex):
+ (WebCore::IDBObjectStoreProxy::index):
+ (WebCore::IDBObjectStoreProxy::removeIndex):
+ * src/IDBObjectStoreProxy.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl):
+ (WebKit::WebIDBDatabaseImpl::name):
+ (WebKit::WebIDBDatabaseImpl::description):
+ (WebKit::WebIDBDatabaseImpl::version):
+ (WebKit::WebIDBDatabaseImpl::objectStores):
+ (WebKit::WebIDBDatabaseImpl::createObjectStore):
+ (WebKit::WebIDBDatabaseImpl::objectStore):
+ (WebKit::WebIDBDatabaseImpl::removeObjectStore):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::WebIDBObjectStoreImpl):
+ (WebKit::WebIDBObjectStoreImpl::name):
+ (WebKit::WebIDBObjectStoreImpl::keyPath):
+ (WebKit::WebIDBObjectStoreImpl::indexNames):
+ (WebKit::WebIDBObjectStoreImpl::createIndex):
+ (WebKit::WebIDBObjectStoreImpl::index):
+ (WebKit::WebIDBObjectStoreImpl::removeIndex):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-06-11 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Enable serialization/deserialization of the frontend state
+ https://bugs.webkit.org/show_bug.cgi?id=40228
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-10 Søren Gjesse <sgjesse@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ V8: Chromium test expectations not matching improved V8 JavaScript stepping
+ https://bugs.webkit.org/show_bug.cgi?id=40419
+
+ Update test expetations to match chaged V8 break locations.
+
+ * src/js/Tests.js:
+
+2010-06-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Port performSearch from InjectedScript to InspectorDOMAgent.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40422
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-11 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Adding a build dependency to the gles2 C library to the webkit_unit_tests
+ project to allow it to link when WebCore is compiled with the ACCELERATED_COMPOSITING
+ flag.
+ https://bugs.webkit.org/show_bug.cgi?id=40341
+
+ * WebKit.gyp:
+
+2010-06-10 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Support plugin tests
+ https://bugs.webkit.org/show_bug.cgi?id=40413
+
+ * DEPS:
+ Bump the Chromium revision to r49376 to have a npapi_layout_test_plugin
+ change and Linux <progress> resources.
+ Add third_party/mesa because app/ depends on them
+ since r49332.
+ * WebKit.gyp:
+ Copy a plugin binary for DRT to recognize it.
+
+2010-06-10 James Hawkins <jhawkins@chromium.org>
+
+ Not reviwed.
+
+ Build fix for Chromium Mac Release.
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::getSuggestion):
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionChanged):
+ (WebKit::AutoFillPopupMenuClient::itemIsSeparator):
+
+2010-06-09 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add the ability to specify a separator in
+ AutoFillPopupMenuClient.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40397
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didAcceptAutoFillSuggestion):
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::getSuggestionsCount):
+ (WebKit::AutoFillPopupMenuClient::getSuggestion):
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionChanged):
+ (WebKit::AutoFillPopupMenuClient::itemIsSeparator):
+ (WebKit::AutoFillPopupMenuClient::initialize):
+ (WebKit::AutoFillPopupMenuClient::setSuggestions):
+ * src/AutoFillPopupMenuClient.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutoFillSuggestions):
+ * src/WebViewImpl.h:
+
+2010-06-10 Dmitry Titov <dimich@chromium.org>
+
+ Not reviewed, Chromium build fix from Abhishek Arya.
+
+ * src/WebImageCG.cpp:
+ (WebKit::WebImage::WebImage):
+ (WebKit::WebImage::operator=):
+
+2010-06-10 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add null pointer checks for nativeImageForCurrentFrame
+ function calls.
+ https://bugs.webkit.org/show_bug.cgi?id=39797
+
+ * src/WebImageCG.cpp:
+ (WebKit::WebImage::WebImage):
+ (WebKit::WebImage::operator=):
+
+2010-06-10 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: to reduce the front end start up time don't push script
+ sources to frontend if debugger is always enabled, instead request
+ script content lazily at the moment it should be displyed. It is critical for
+ always enabled debugger because in that case lots of script may have
+ already been parsed when the front end is opening and pushing all
+ of them at once may slow things down(even though the script sources will never
+ be used if scripts panel isn't open).
+ https://bugs.webkit.org/show_bug.cgi?id=40364
+
+ * src/js/DevTools.js:
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+ (.devtools.InspectorBackendImpl.prototype.getScriptSource):
+
+2010-06-10 Mike Belshe <mbelshe@google.com>
+
+ Reviewed by David Levin
+
+ Track whether a resource is loaded via a proxy.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40312
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::wasFetchedViaProxy):
+ (WebKit::WebURLResponse::setWasFetchedViaProxy):
+
+2010-06-10 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] Adding the ANGLE project to the DEPS file as it's required
+ by the gpu-accelerated compositor.
+ https://bugs.webkit.org/show_bug.cgi?id=40379
+
+ * DEPS:
+
+2010-06-09 Bo Liu <boliu@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Pass <video> full screen calls to Chromium port client
+ https://bugs.webkit.org/show_bug.cgi?id=40317
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::supportsFullscreen):
+ (WebKit::WebViewClient::enterFullscreenForNode):
+ (WebKit::WebViewClient::exitFullscreenForNode):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::supportsFullscreenForNode):
+ (WebKit::ChromeClientImpl::enterFullscreenForNode):
+ (WebKit::ChromeClientImpl::exitFullscreenForNode):
+ * src/ChromeClientImpl.h:
+
+2010-06-09 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Rename FloatArray to Float32Array
+ https://bugs.webkit.org/show_bug.cgi?id=40323
+
+ Used do-webcore-rename to perform renaming. Manually undid
+ incorrect changes to WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp,
+ WebCore/manual-tests/resources/ArrayParameterTestApplet.java and
+ ArrayParameterTestApplet.class. Updated LayoutTests. Built and ran
+ all layout tests on Safari; built Chromium and ran selected WebGL
+ tests.
+
+ * src/GraphicsContext3D.cpp:
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * src/InspectorClientImpl.cpp:
+ * src/InspectorClientImpl.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController):
+
+2010-06-09 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: retreive debugger script source synchronously when
+ frontend is attached. We need this to be able to stop on top-level
+ breakpoints.
+ https://bugs.webkit.org/show_bug.cgi?id=40289
+
+ * WebKit.gypi:
+ * src/DebuggerAgent.h:
+ * src/DebuggerAgentImpl.cpp:
+ * src/DebuggerAgentImpl.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy):
+ * src/js/DebuggerScript.js:
+ * src/js/DevTools.js:
+ (WebInspector.loaded):
+ * src/js/DevToolsHostStub.js:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::sendMessageToFrontend):
+ * src/InspectorClientImpl.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController):
+
+2010-06-09 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: update stack trace after script source editing
+ https://bugs.webkit.org/show_bug.cgi?id=40357
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.editScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber):
+ (devtools.DebuggerAgent.prototype.editScriptSource.requestBacktrace):
+ (devtools.DebuggerAgent.prototype.editScriptSource.handleBacktraceResponse):
+ (devtools.DebuggerAgent.prototype.editScriptSource.reportDidCommitEditing):
+ (devtools.DebuggerAgent.prototype.editScriptSource):
+ (devtools.DebuggerAgent.prototype.requestBacktrace_):
+ (devtools.DebuggerAgent.prototype.handleDebuggerOutput_):
+ (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_):
+ (devtools.DebuggerAgent.prototype.updateCallFramesFromBacktraceResponse_):
+ * src/js/InspectorControllerImpl.js:
+ (.devtools.InspectorBackendImpl.prototype.editScriptSource):
+
+2010-06-08 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] compile linux chromium in WebKit/out instead of WebKit/WebKit/chromium/out
+ https://bugs.webkit.org/show_bug.cgi?id=40285
+
+ Take 2 at landing this patch, this time rolling DEPS just a bit
+ further to pick up some chromium fixes.
+
+ * DEPS
+ * gyp_webkit:
+
+2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60878.
+ http://trac.webkit.org/changeset/60878
+ https://bugs.webkit.org/show_bug.cgi?id=40349
+
+ broke linux build (Requested by tony^work on #webkit).
+
+ * DEPS:
+ * gyp_webkit:
+
+2010-06-08 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] compile linux chromium in WebKit/out instead of WebKit/WebKit/chromium/out
+ https://bugs.webkit.org/show_bug.cgi?id=40285
+
+ * gyp_webkit:
+
+2010-06-08 Tony Chang <tony@chromium.org>
+
+ Not reviewed, build fix.
+
+ [chromium] fix linux compile
+ https://bugs.webkit.org/show_bug.cgi?id=40343
+
+ * DEPS:
+
+2010-06-08 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: extend ScriptDebugServer to support script source editing
+ https://bugs.webkit.org/show_bug.cgi?id=40297
+
+ * src/js/DebuggerAgent.js:
+ (devtools.ScriptInfo.prototype.worldType):
+ * src/js/DebuggerScript.js:
+ (debuggerScriptConstructor.DebuggerScript.editScriptSource):
+ * src/js/DevTools.js:
+ (WebInspector.loaded):
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setEditingBehavior):
+2010-06-07 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] roll chromium DEPS
+ https://bugs.webkit.org/show_bug.cgi?id=40277
+
+ * DEPS:
+
+2010-06-07 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Refactor FormData and Blob for better support of Blobs synthesized by BlobBuilder.
+ https://bugs.webkit.org/show_bug.cgi?id=39083
+
+ Replace FormDataList::Item list with BlobItemList to get it compiled
+ with the refactoring in FormDataList.
+
+ * src/WebSearchableFormData.cpp:
+ (WebCore::HasSuitableTextElement):
+
+2010-06-07 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [indexedDB] It is impossible to create object stores
+ https://bugs.webkit.org/show_bug.cgi?id=40054
+
+ * WebKit.gyp:
+ * public/WebIDBCallbacks.h:
+ (WebKit::WebIDBCallbacks::onSuccess):
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ * public/WebIDBObjectStore.h: Added.
+ (WebKit::WebIDBObjectStore::~WebIDBObjectStore):
+ (WebKit::WebIDBObjectStore::name):
+ (WebKit::WebIDBObjectStore::keyPath):
+ * src/IDBCallbacksProxy.cpp:
+ (WebCore::IDBCallbacksProxy::onSuccess):
+ * src/IDBCallbacksProxy.h:
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::createObjectStore):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBObjectStoreProxy.cpp: Added.
+ (WebCore::IDBObjectStoreProxy::create):
+ (WebCore::IDBObjectStoreProxy::IDBObjectStoreProxy):
+ (WebCore::IDBObjectStoreProxy::~IDBObjectStoreProxy):
+ (WebCore::IDBObjectStoreProxy::name):
+ (WebCore::IDBObjectStoreProxy::keyPath):
+ (WebCore::IDBObjectStoreProxy::indexNames):
+ (WebCore::IDBObjectStoreProxy::createIndex):
+ (WebCore::IDBObjectStoreProxy::index):
+ (WebCore::IDBObjectStoreProxy::removeIndex):
+ * src/IDBObjectStoreProxy.h: Added.
+ * src/IndexedDatabaseProxy.cpp:
+ (WebCore::IndexedDatabaseProxy::open):
+ * src/WebIDBCallbacksImpl.cpp:
+ (WebCore::WebIDBCallbacksImpl::onSuccess):
+ * src/WebIDBCallbacksImpl.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::createObjectStore):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp: Added.
+ (WebKit::WebIDBObjectStoreImpl::WebIDBObjectStoreImpl):
+ (WebKit::WebIDBObjectStoreImpl::~WebIDBObjectStoreImpl):
+ (WebKit::WebIDBObjectStoreImpl::name):
+ (WebKit::WebIDBObjectStoreImpl::keyPath):
+ * src/WebIDBObjectStoreImpl.h: Added.
+ * src/WebIndexedDatabaseImpl.cpp:
+ (WebKit::WebIndexedDatabaseImpl::open):
+
+2010-06-07 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: should be possible to distinguish extension scripts from main world scripts
+ https://bugs.webkit.org/show_bug.cgi?id=40220
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.initUI):
+ (devtools.DebuggerAgent.prototype.addScriptInfo_):
+ (devtools.DebuggerAgent.prototype.formatCallFrame_):
+ (devtools.ScriptInfo.prototype.worldType):
+ * src/js/DebuggerScript.js:
+ (debuggerScriptConstructor.DebuggerScript.getScripts): use only context id without context type
+ when filtering scripts so that extension scripts are also included.
+ (debuggerScriptConstructor.DebuggerScript._formatScript):
+ * src/js/devTools.css:
+
+2010-06-04 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Accessibility focus change notifications are now sent from
+ ChromeClientImpl::focusedNodeChanged().
+ https://bugs.webkit.org/show_bug.cgi?id=39792
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focus):
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+
+2010-06-04 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Adding support for the left and right Windows keys to the
+ NativeWebKeyboardEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=39752
+
+ * src/gtk/WebInputEventFactory.cpp:
+ (WebKit::gdkEventToWindowsKeyCode):
+
+2010-06-04 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Create resource for DebuggerScript.js.
+ https://bugs.webkit.org/show_bug.cgi?id=40122
+
+ * WebKit.grd:
+ * public/WebDevToolsAgentClient.h:
+ (WebKit::WebDevToolsAgentClient::debuggerScriptSource):
+
+2010-05-26 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Jian Li.
+
+ [Chromium] Dragging over an element with scrollbars should scroll the element when dragging near edges
+ https://bugs.webkit.org/show_bug.cgi?id=39725
+
+ Added WebViewImpl::scrollForDragging() to handle scroll-on-drag.
+ Note that this change handes both source and destination cases.
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::dragSourceMovedTo):
+ (WebKit::WebViewImpl::dragTargetDragEnterOrOver):
+ (WebKit::WebViewImpl::scrollForDragging):
+ * src/WebViewImpl.h:
+
+2010-06-03 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: show "Object" as description for values with anonymous constructor
+ https://bugs.webkit.org/show_bug.cgi?id=40121
+
+ * src/js/DevTools.js: don't call DebuggerAgent methods if ScriptDebugServer is used.
+
+2010-06-03 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Checking out lighttpd
+ https://bugs.webkit.org/show_bug.cgi?id=39948
+
+ - Add lighttpd only on Windows. It is used by new-run-webkit-tests.
+ - Add libvpx.
+ - Remove pthreads-win32 from DEPS.
+ It has not been used since Chromium r28642.
+ - Update Chromium revision to use Windows resource query code and
+ webkit_glue dependency fix.
+
+ * DEPS:
+
+2010-06-02 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] refactor WebKit.gyp's DRT section so the conditions are less messy
+ https://bugs.webkit.org/show_bug.cgi?id=40104
+
+ * WebKit.gyp:
+
+2010-06-02 Tony Chang <tony@chromium.org>
+
+ Not reviewed, build fix in downstream chromium.
+
+ Fix the path to repack.py so it works in a chromium checkout too.
+
+ * WebKit.gyp:
+
+2010-06-02 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] generate DumpRenderTree.pak on DRT linux
+ https://bugs.webkit.org/show_bug.cgi?id=40098
+
+ * WebKit.gyp:
+
+2010-06-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60592.
+ http://trac.webkit.org/changeset/60592
+ https://bugs.webkit.org/show_bug.cgi?id=40099
+
+ broke the build, need to coordiate updating DEPS (Requested by
+ tony^work on #webkit).
+
+ * DEPS:
+ * public/WebMediaPlayer.h:
+
+2010-06-02 Victoria Kirst <vrk@google.com>
+
+ Reviewed by David Levin.
+
+ Modifying the WebMediaPlayer interface to be compatible with
+ a change in chrome.
+ This is a part 2 of 3 one-sided changes to chrome and WebKit. Chrome
+ has been updated, so this commit should NOT break chromium anymore.
+ https://bugs.webkit.org/show_bug.cgi?id=39445
+
+ * DEPS: Updated to a newer chrome revision number.
+ * public/WebMediaPlayer.h: Changed buffered() to be non-const.
+
+2010-06-02 Peter Kasting <pkasting@google.com>
+
+ Unreviewed, emergency fix for test crashes (verbal r+ beforehand from
+ John Gregg).
+
+ Temporarily make notificationObjectDestroyed() a no-op to avoid an
+ ASSERT failure.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40097
+
+ * src/NotificationPresenterImpl.cpp:
+ (WebKit::NotificationPresenterImpl::notificationObjectDestroyed):
+
+2010-06-02 Sterling Swigart <sswigart@google.com>
+
+ Reviewed by David Levin.
+
+ Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
+ https://bugs.webkit.org/show_bug.cgi?id=39906
+
+ * features.gypi:
+
+2010-06-01 James Hawkins <jhawkins@chromium.org>
+
+ UNREVIEWED: build fix.
+
+ Implement the added virtual methods from PopupMenuClient to
+ TestPopupMenuClient.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestPopupMenuClient::selectionChanged):
+ (WebKit::TestPopupMenuClient::selectionCleared):
+
+2010-05-24 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Implement new PopupMenuClient methods selectionChanged()
+ and selectionCleared(). Expose placeHolder methods and isAutoFilled()
+ in WebInputElement.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39639
+
+ * public/WebInputElement.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didSelectAutoFillSuggestion):
+ (WebKit::WebViewClient::didClearAutoFillSelection):
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::selectionChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionCleared):
+ (WebKit::AutoFillPopupMenuClient::popupDidHide):
+ * src/AutoFillPopupMenuClient.h:
+ * src/SuggestionsPopupMenuClient.h:
+ (WebKit::SuggestionsPopupMenuClient::selectionChanged):
+ (WebKit::SuggestionsPopupMenuClient::selectionCleared):
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::setPlaceholder):
+ (WebKit::WebInputElement::placeholder):
+ (WebKit::WebInputElement::isAutofilled):
+
+2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60483.
+ http://trac.webkit.org/changeset/60483
+ https://bugs.webkit.org/show_bug.cgi?id=40013
+
+ Breaks Mac and Linux builds (Requested by antonm on #webkit).
+
+ * DEPS:
+
+2010-06-01 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ IndexedDB cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=40007
+
+ Remove the exception code paramter (that hasn't been used for a while).
+ Add asserts to default implementations.
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::name):
+ (WebKit::WebIDBDatabase::description):
+ (WebKit::WebIDBDatabase::version):
+ (WebKit::WebIDBDatabase::objectStores):
+ * public/WebIndexedDatabase.h:
+ (WebKit::WebIndexedDatabase::open):
+ * src/WebIndexedDatabaseImpl.cpp:
+ (WebKit::WebIndexedDatabaseImpl::open):
+ * src/WebIndexedDatabaseImpl.h:
+
+2010-06-01 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Rolling Chromium revision to bring recent changes to V8.
+
+ * DEPS:
+
+2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60470.
+ http://trac.webkit.org/changeset/60470
+ https://bugs.webkit.org/show_bug.cgi?id=39990
+
+ Need to rollout until bot can be updated (Requested by jorlow
+ on #webkit).
+
+ * DEPS:
+
2010-05-31 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index c633a79..973e78d 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,9 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '47248',
-
- 'pthreads-win32_rev': '26716',
+ 'chromium_rev': '49521',
}
deps = {
@@ -82,7 +80,7 @@ deps = {
'googleurl':
From('chromium_deps', 'src/googleurl'),
- # webkit dependencis
+ # webkit dependencies
'webkit': Var('chromium_svn')+'/webkit@'+Var('chromium_rev'),
'app':
@@ -91,10 +89,18 @@ deps = {
Var('chromium_svn')+'/gpu@'+Var('chromium_rev'),
'media':
Var('chromium_svn')+'/media@'+Var('chromium_rev'),
+ 'third_party/angle': # needed by the gpu process
+ From('chromium_deps', 'src/third_party/angle'),
'third_party/glew': # webgl related
Var('chromium_svn')+'/third_party/glew@'+Var('chromium_rev'),
'third_party/ffmpeg': # needed by webkit/media
- Var('chromium_svn')+'/third_party/ffmpeg@'+Var('chromium_rev'),
+ From('chromium_deps', 'src/third_party/ffmpeg'),
+ 'third_party/libvpx/include':
+ From('chromium_deps', 'src/third_party/libvpx/include'),
+ 'third_party/libvpx/lib':
+ From('chromium_deps', 'src/third_party/libvpx/lib'),
+ 'third_party/mesa':
+ Var('chromium_svn')+'/third_party/mesa@'+Var('chromium_rev'),
'third_party/yasm': # needed by ffmpeg
Var('chromium_svn')+'/third_party/yasm@'+Var('chromium_rev'),
'third_party/openmax': # needed by webkit/media
@@ -147,8 +153,8 @@ deps = {
'third_party/zlib':
Var('chromium_svn')+'/third_party/zlib@'+Var('chromium_rev'),
- 'third_party/ffmpeg/source/patched-ffmpeg-mt':
- From('chromium_deps', 'src/third_party/ffmpeg/source/patched-ffmpeg-mt'),
+ 'third_party/mozilla':
+ Var('chromium_svn')+'/third_party/mozilla@'+Var('chromium_rev'),
}
deps_os = {
@@ -159,9 +165,8 @@ deps_os = {
From('chromium_deps', 'src/third_party/python_24'),
'third_party/ffmpeg/binaries/chromium/win/ia32':
From('chromium_deps', 'src/third_party/ffmpeg/binaries/chromium/win/ia32'),
- 'third_party/pthreads-win32':
- 'http://src.chromium.org/svn/trunk/deps/third_party/pthreads-win32@'+Var('pthreads-win32_rev'),
- # base.gypi depends on nss on Windows
+ 'third_party/lighttpd':
+ From('chromium_deps', 'src/third_party/lighttpd'),
'third_party/nss':
From('chromium_deps', 'src/third_party/nss'),
'third_party/wtl':
@@ -171,6 +176,8 @@ deps_os = {
# needed by ffmpeg
'third_party/yasm/source/patched-yasm':
From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
+ 'third_party/nss':
+ From('chromium_deps', 'src/third_party/nss'),
},
'unix': {
# Linux, actually.
diff --git a/WebKit/chromium/WebKit.grd b/WebKit/chromium/WebKit.grd
index a0783d7..1f80034 100644
--- a/WebKit/chromium/WebKit.grd
+++ b/WebKit/chromium/WebKit.grd
@@ -9,6 +9,7 @@
</outputs>
<release seq="1">
<includes>
+ <include name="IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS" file="src\js\DebuggerScript.js" type="BINDATA"/>
<include name="IDR_DEVTOOLS_INJECT_DISPATCH_JS" file="src\js\InjectDispatch.js" type="BINDATA"/>
<include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/>
</includes>
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 937f4b3..83ae631 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -140,6 +140,7 @@
'public/WebIDBDatabase.h',
'public/WebIDBDatabaseError.h',
'public/WebIDBIndex.h',
+ 'public/WebIDBObjectStore.h',
'public/WebIndexedDatabase.h',
'public/WebInputElement.h',
'public/WebInputEvent.h',
@@ -269,6 +270,8 @@
'src/IDBDatabaseProxy.h',
'src/IDBIndexProxy.cpp',
'src/IDBIndexProxy.h',
+ 'src/IDBObjectStoreProxy.cpp',
+ 'src/IDBObjectStoreProxy.h',
'src/IndexedDatabaseProxy.cpp',
'src/IndexedDatabaseProxy.h',
'src/InspectorClientImpl.cpp',
@@ -358,6 +361,8 @@
'src/WebIDBDatabaseImpl.h',
'src/WebIDBIndexImpl.cpp',
'src/WebIDBIndexImpl.h',
+ 'src/WebIDBObjectStoreImpl.cpp',
+ 'src/WebIDBObjectStoreImpl.h',
'src/WebImageCG.cpp',
'src/WebImageDecoder.cpp',
'src/WebImageSkia.cpp',
@@ -518,6 +523,7 @@
'<(chromium_src_dir)/testing/gtest.gyp:gtest',
'<(chromium_src_dir)/base/base.gyp:base',
'<(chromium_src_dir)/base/base.gyp:base_i18n',
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
],
'include_dirs': [
'public',
@@ -570,7 +576,9 @@
'webkit',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
],
'include_dirs': [
'.',
@@ -600,23 +608,20 @@
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': ['<(ahem_path)'],
+ }, {
+ # This should really be done in the 'npapi_layout_test_plugin'
+ # target, but the current VS generator handles 'copies'
+ # settings as AdditionalDependencies, which means that
+ # when it's over there, it tries to do the copy *before*
+ # the file is built, instead of after. We work around this
+ # by attaching the copy here, since it depends on that
+ # target.
+ 'destination': '<(PRODUCT_DIR)/plugins',
+ 'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'],
}],
- }],
- ['OS=="mac"', {
- 'dependencies': ['LayoutTestHelper'],
-
- 'mac_bundle_resources': [
- '<(ahem_path)',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
+ },{ # OS!="win"
+ 'sources/': [
+ ['exclude', 'Win\\.cpp$'],
],
'actions': [
{
@@ -624,6 +629,7 @@
'variables': {
'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py',
'pak_inputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
@@ -640,31 +646,49 @@
},
], # actions
}],
- ['OS=="linux"', {
+ ['OS=="mac"', {
+ 'dependencies': ['LayoutTestHelper'],
+
+ 'mac_bundle_resources': [
+ '<(ahem_path)',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
+ '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
+ ],
+ 'copies': [{
+ 'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
+ 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
+ }],
+ },{ # OS!="mac"
+ 'sources/': [
+ # .mm is already excluded by common.gypi
+ ['exclude', 'Mac\\.cpp$'],
+ ]
+ }],
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(ahem_path)',
'../../WebKitTools/DumpRenderTree/chromium/fonts.conf',
- ],
+ '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
+ ]
+ }, {
+ 'destination': '<(PRODUCT_DIR)/plugins',
+ 'files': ['<(PRODUCT_DIR)/libnpapi_layout_test_plugin.so'],
}],
- }],
- ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
+ },{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"
'sources/': [
['exclude', '(Gtk|Linux)\\.cpp$']
]
}],
- ['OS!="win"', {
- 'sources/': [
- ['exclude', 'Win\\.cpp$'],
- ]
- }],
- ['OS!="mac"', {
- 'sources/': [
- # .mm is already excluded by common.gypi
- ['exclude', 'Mac\\.cpp$'],
- ]
- }],
],
},
], # targets
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index a9df3f5..69b1479 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -35,7 +35,6 @@
'devtools_js_files': [
'src/js/InspectorControllerImpl.js',
'src/js/DebuggerAgent.js',
- 'src/js/DebuggerScript.js',
'src/js/ProfilerAgent.js',
'src/js/ProfilerProcessor.js',
'src/js/HeapProfilerPanel.js',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index c7d40cf..9a23949 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -51,6 +51,7 @@
'ENABLE_FILTERS=1',
'ENABLE_GEOLOCATION=1',
'ENABLE_ICONDATABASE=0',
+ 'ENABLE_IMAGE_RESIZER=0',
'ENABLE_INDEXED_DATABASE=1',
'ENABLE_JAVASCRIPT_DEBUGGER=1',
'ENABLE_JSC_MULTIPLE_THREADS=0',
diff --git a/WebKit/chromium/gyp_webkit b/WebKit/chromium/gyp_webkit
index 1ca6133..b7d2308 100755
--- a/WebKit/chromium/gyp_webkit
+++ b/WebKit/chromium/gyp_webkit
@@ -78,7 +78,11 @@ if __name__ == '__main__':
# On linux, we want gyp to output a makefile (default is scons).
if sys.platform == 'linux2':
- args.extend(['-fmake'])
+ args.extend(['-fmake',
+ '--suffix=.chromium',
+ '--toplevel-dir=../..',
+ # auto_regeneration doesn't work with toplevel-dir
+ '-Gauto_regeneration=0'])
# Other command args:
args.extend([
@@ -90,7 +94,7 @@ if __name__ == '__main__':
# gyp hack: otherwise gyp assumes its in chromium's src/ dir.
'--depth=./',
- # gyp files to execute.
+ # gyp file to execute.
'WebKit.gyp'])
print 'Updating webkit projects from gyp files...'
diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h
index 0f7421d..622f788 100644
--- a/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -55,6 +55,7 @@ public:
virtual WebCString injectedScriptSource() { return WebCString(); }
virtual WebCString injectedScriptDispatcherSource() { return WebCString(); }
+ virtual WebCString debuggerScriptSource() { return WebCString(); }
class WebKitClientMessageLoop {
public:
diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h
index bba7c74..0e28961 100644
--- a/WebKit/chromium/public/WebIDBCallbacks.h
+++ b/WebKit/chromium/public/WebIDBCallbacks.h
@@ -33,6 +33,7 @@ namespace WebKit {
class WebIDBDatabase;
class WebIDBDatabaseError;
class WebIDBIndex;
+class WebIDBObjectStore;
class WebSerializedScriptValue;
class WebIDBCallbacks {
@@ -45,6 +46,7 @@ public:
virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null".
virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBIndex*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); }
};
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index 0f65c6f..b0d6086 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -31,15 +31,49 @@
namespace WebKit {
+class WebFrame;
+class WebIDBCallbacks;
+class WebIDBObjectStore;
+
// See comment in WebIndexedDatabase for a high level overview of these classes.
class WebIDBDatabase {
public:
virtual ~WebIDBDatabase() { }
- virtual WebString name() { return WebString(); }
- virtual WebString description() { return WebString(); }
- virtual WebString version() { return WebString(); }
- virtual WebDOMStringList objectStores() { return WebDOMStringList(); }
+ virtual WebString name() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString description() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString version() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebDOMStringList objectStores() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebDOMStringList();
+ }
+ virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+ // Transfers ownership of the WebIDBObjectStore to the caller.
+ virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h
new file mode 100755
index 0000000..fead881
--- /dev/null
+++ b/WebKit/chromium/public/WebIDBObjectStore.h
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ *
+ * 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 WebIDBObjectStore_h
+#define WebIDBObjectStore_h
+
+#include "WebCommon.h"
+#include "WebDOMStringList.h"
+#include "WebIDBCallbacks.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+// See comment in WebIndexedDatabase for a high level overview these classes.
+class WebIDBObjectStore {
+public:
+ virtual ~WebIDBObjectStore() { }
+
+ virtual WebString name() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebString keyPath() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebString();
+ }
+ virtual WebDOMStringList indexNames() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return WebDOMStringList();
+ }
+ void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+ // Transfers ownership of the WebIDBIndex to the caller.
+ WebIDBIndex* index(const WebString& name)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ void removeIndex(const WebString& name, WebIDBCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+ // FIXME: finish.
+};
+
+} // namespace WebKit
+
+#endif // WebIDBObjectStore_h
diff --git a/WebKit/chromium/public/WebIndexedDatabase.h b/WebKit/chromium/public/WebIndexedDatabase.h
index 8e4bf5b..5517a0c 100644
--- a/WebKit/chromium/public/WebIndexedDatabase.h
+++ b/WebKit/chromium/public/WebIndexedDatabase.h
@@ -51,16 +51,16 @@ public:
virtual ~WebIndexedDatabase() { }
// The WebKit implementation of open ignores the WebFrame* parameter.
- virtual void open(const WebString& name, const WebString& description,
- WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, int& exceptionCode)
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame)
{
- open(name, description, false, callbacks, origin, webFrame, exceptionCode);
+ int exceptionCode;
+ open(name, description, callbacks, origin, webFrame, exceptionCode);
}
// FIXME: Delete soon. Compatability hack.
- virtual void open(const WebString& name, const WebString& description, bool modifyDatabase,
+ virtual void open(const WebString& name, const WebString& description,
WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, int& exceptionCode)
{
- open(name, description, callbacks, origin, webFrame, exceptionCode);
+ open(name, description, callbacks, origin, webFrame);
}
};
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 0de96a7..95f8aa7 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -86,8 +86,11 @@ namespace WebKit {
WEBKIT_API bool isActivatedSubmit() const;
WEBKIT_API void setActivatedSubmit(bool);
WEBKIT_API int size() const;
- WEBKIT_API void setValue(const WebString& value);
+ WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value() const;
+ WEBKIT_API void setPlaceholder(const WebString&);
+ WEBKIT_API WebString placeholder() const;
+ WEBKIT_API bool isAutofilled() const;
WEBKIT_API void setAutofilled(bool);
WEBKIT_API void dispatchFormControlChangeEvent();
WEBKIT_API void setSelectionRange(int, int);
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index b3c084c..4462394 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -131,6 +131,10 @@ public:
WEBKIT_API bool wasNpnNegotiated() const;
WEBKIT_API void setWasNpnNegotiated(bool);
+ // Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc).
+ WEBKIT_API bool wasFetchedViaProxy() const;
+ WEBKIT_API void setWasFetchedViaProxy(bool);
+
// Flag whether this request is part of a multipart response.
WEBKIT_API bool isMultipartPayload() const;
WEBKIT_API void setIsMultipartPayload(bool);
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 56ea68d..9054d8c 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -169,6 +169,11 @@ public:
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperation operation) = 0;
+ // Notifies the WebView that a drag is going on.
+ virtual void dragSourceMovedTo(
+ const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperation operation) = 0;
+
// Notfies the WebView that the system drag and drop operation has ended.
virtual void dragSourceSystemDragEnded() = 0;
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index e0fe71d..31ef028 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -202,6 +202,9 @@ public:
virtual bool runModalBeforeUnloadDialog(
WebFrame*, const WebString& message) { return true; }
+ virtual bool supportsFullscreen() { return false; }
+ virtual void enterFullscreenForNode(const WebNode&) { }
+ virtual void exitFullscreenForNode(const WebNode&) { }
// UI ------------------------------------------------------------------
@@ -273,7 +276,7 @@ public:
virtual void didUpdateInspectorSetting(const WebString& key, const WebString& value) { }
- // Autofill ------------------------------------------------------------
+ // AutoFill ------------------------------------------------------------
// Queries the browser for suggestions to be shown for the form text
// field named |name|. |value| is the text entered by the user so
@@ -282,18 +285,33 @@ public:
const WebString& name,
const WebString& value) { }
- // Instructs the browser to remove the autofill entry specified from
+ // Instructs the browser to remove the Autocomplete entry specified from
// its DB.
+ // FIXME: This method should be named removeAutocompleteSugestion.
virtual void removeAutofillSuggestions(const WebString& name,
const WebString& value) { }
- // Informs the browser that the user has selected an AutoFill suggestion
- // for a WebNode. |name| and |label| form a key into the set of AutoFill
- // profiles.
+ // Informs the browser that the user has accepted an AutoFill suggestion for
+ // a WebNode. |name| and |label| form a key into the set of AutoFill
+ // profiles. |index| is an index of the selected suggestion in the list of
+ // suggestions provided by the client
virtual void didAcceptAutoFillSuggestion(const WebNode&,
const WebString& name,
+ const WebString& label,
+ 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) { }
+ // Informs the browser that the user has cleared the selection from the
+ // AutoFill suggestions dropdown. This happens when a user uses the arrow
+ // keys to navigate outside the range of possible selections.
+ virtual void didClearAutoFillSelection(const WebNode&) { }
+
// Geolocation ---------------------------------------------------------
// Access the embedder API for geolocation services.
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 4f8793a..8084aad 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -44,14 +44,25 @@ namespace WebKit {
unsigned AutoFillPopupMenuClient::getSuggestionsCount() const
{
- return m_names.size();
+ return m_names.size() + ((m_separatorIndex == -1) ? 0 : 1);
}
WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const
{
+ if (listIndex == static_cast<unsigned>(m_separatorIndex))
+ return WebString();
+
+ if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+ --listIndex;
+
// FIXME: Modify the PopupMenu to add the label in gray right-justified.
ASSERT(listIndex >= 0 && listIndex < m_names.size());
- return m_names[listIndex] + String(" (") + m_labels[listIndex] + String(")");
+
+ WebString suggestion = m_names[listIndex];
+ if (m_labels[listIndex].isEmpty())
+ return suggestion;
+
+ return suggestion + String(" (") + m_labels[listIndex] + String(")");
}
void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
@@ -64,37 +75,85 @@ void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
{
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+ --listIndex;
+
ASSERT(listIndex >= 0 && listIndex < m_names.size());
+ webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
+ m_names[listIndex],
+ m_labels[listIndex],
+ listIndex);
+}
+
+void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
+{
WebViewImpl* webView = getWebView();
if (!webView)
return;
- webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
+ if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+ --listIndex;
+
+ ASSERT(listIndex >= 0 && listIndex < m_names.size());
+
+ webView->client()->didSelectAutoFillSuggestion(WebNode(getTextField()),
m_names[listIndex],
m_labels[listIndex]);
}
+void AutoFillPopupMenuClient::selectionCleared()
+{
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ webView->suggestionsPopupDidHide();
+ webView->client()->didClearAutoFillSelection(WebNode(getTextField()));
+}
+
+void AutoFillPopupMenuClient::popupDidHide()
+{
+ // FIXME: Refactor this method, as selectionCleared() and popupDidHide()
+ // share the exact same functionality.
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ webView->client()->didClearAutoFillSelection(WebNode(getTextField()));
+}
+
+bool AutoFillPopupMenuClient::itemIsSeparator(unsigned listIndex) const
+{
+ return (m_separatorIndex != -1 && static_cast<unsigned>(m_separatorIndex) == listIndex);
+}
+
void AutoFillPopupMenuClient::initialize(
HTMLInputElement* textField,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- int defaultSuggestionIndex)
+ int separatorIndex)
{
ASSERT(names.size() == labels.size());
- ASSERT(defaultSuggestionIndex < static_cast<int>(names.size()));
+ ASSERT(separatorIndex < static_cast<int>(names.size()));
// The suggestions must be set before initializing the
// SuggestionsPopupMenuClient.
- setSuggestions(names, labels);
+ setSuggestions(names, labels, separatorIndex);
- SuggestionsPopupMenuClient::initialize(textField, defaultSuggestionIndex);
+ SuggestionsPopupMenuClient::initialize(textField, -1);
}
void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
- const WebVector<WebString>& labels)
+ const WebVector<WebString>& labels,
+ int separatorIndex)
{
ASSERT(names.size() == labels.size());
+ ASSERT(separatorIndex < static_cast<int>(names.size()));
m_names.clear();
m_labels.clear();
@@ -103,6 +162,8 @@ void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
m_labels.append(labels[i]);
}
+ m_separatorIndex = separatorIndex;
+
// Try to preserve selection if possible.
if (getSelectedIndex() >= static_cast<int>(names.size()))
setSelectedIndex(-1);
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h
index 568ce4d..488bdb1 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.h
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h
@@ -52,18 +52,26 @@ public:
// WebCore::PopupMenuClient implementation:
virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
+ virtual void selectionChanged(unsigned listIndex, bool fireEvents = true);
+ virtual void selectionCleared();
+ virtual void popupDidHide();
+ virtual bool itemIsSeparator(unsigned listIndex) const;
void initialize(WebCore::HTMLInputElement*,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- int defaultSuggestionIndex);
+ int separatorIndex);
void setSuggestions(const WebVector<WebString>& names,
- const WebVector<WebString>& labels);
+ const WebVector<WebString>& labels,
+ int separatorIndex);
private:
Vector<WebCore::String> m_names;
Vector<WebCore::String> m_labels;
+
+ // The index of the separator. -1 if there is no separator.
+ int m_separatorIndex;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index d54f328..559a62b 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -48,6 +48,7 @@
#include "WebGeolocationService.h"
#include "GeolocationServiceChromium.h"
#include "GraphicsLayer.h"
+#include "HTMLNames.h"
#include "HitTestResult.h"
#include "IntRect.h"
#include "Node.h"
@@ -159,35 +160,8 @@ float ChromeClientImpl::scaleFactor()
void ChromeClientImpl::focus()
{
- if (!m_webView->client())
- return;
-
- m_webView->client()->didFocus();
-
- // If accessibility is enabled, we should notify assistive technology that
- // the active AccessibilityObject changed.
- const Frame* frame = m_webView->focusedWebCoreFrame();
- if (!frame)
- return;
-
- Document* doc = frame->document();
-
- if (doc && doc->axObjectCache()->accessibilityEnabled()) {
- Node* focusedNode = m_webView->focusedWebCoreNode();
-
- if (!focusedNode) {
- // Could not retrieve focused Node.
- return;
- }
-
- // Retrieve the focused AccessibilityObject.
- AccessibilityObject* focusedAccObj =
- doc->axObjectCache()->getOrCreate(focusedNode->renderer());
-
- // Alert assistive technology that focus changed.
- if (focusedAccObj)
- m_webView->client()->focusAccessibilityObject(WebAccessibilityObject(focusedAccObj));
- }
+ if (m_webView->client())
+ m_webView->client()->didFocus();
}
void ChromeClientImpl::unfocus()
@@ -217,17 +191,37 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
{
m_webView->client()->focusedNodeChanged(WebNode(node));
- WebURL focus_url;
+ WebURL focusURL;
if (node && node->isLink()) {
// This HitTestResult hack is the easiest way to get a link URL out of a
// WebCore::Node.
- HitTestResult hit_test(IntPoint(0, 0));
+ HitTestResult hitTest(IntPoint(0, 0));
// This cast must be valid because of the isLink() check.
- hit_test.setURLElement(reinterpret_cast<Element*>(node));
- if (hit_test.isLiveLink())
- focus_url = hit_test.absoluteLinkURL();
+ hitTest.setURLElement(static_cast<Element*>(node));
+ if (hitTest.isLiveLink())
+ focusURL = hitTest.absoluteLinkURL();
+ }
+ m_webView->client()->setKeyboardFocusURL(focusURL);
+
+ if (!node)
+ return;
+
+ // If accessibility is enabled, we should notify assistive technology that
+ // the active AccessibilityObject changed.
+ Document* document = node->document();
+ if (!document) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+ if (document && document->axObjectCache()->accessibilityEnabled()) {
+ // Retrieve the focused AccessibilityObject.
+ AccessibilityObject* focusedAccObj =
+ document->axObjectCache()->getOrCreate(node->renderer());
+
+ // Alert assistive technology that focus changed.
+ if (focusedAccObj)
+ m_webView->client()->focusAccessibilityObject(WebAccessibilityObject(focusedAccObj));
}
- m_webView->client()->setKeyboardFocusURL(focus_url);
}
Page* ChromeClientImpl::createWindow(
@@ -736,4 +730,23 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
}
#endif
+bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
+{
+ if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
+ return m_webView->client()->supportsFullscreen();
+ return false;
+}
+
+void ChromeClientImpl::enterFullscreenForNode(WebCore::Node* node)
+{
+ if (m_webView->client())
+ m_webView->client()->enterFullscreenForNode(WebNode(node));
+}
+
+void ChromeClientImpl::exitFullscreenForNode(WebCore::Node* node)
+{
+ if (m_webView->client())
+ m_webView->client()->exitFullscreenForNode(WebNode(node));
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 3b5ebd5..84355c3 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -146,6 +146,10 @@ public:
// to do an eager layout before the drawing.
virtual void scheduleCompositingLayerSync();
#endif
+ virtual bool supportsFullscreenForNode(const WebCore::Node*);
+ virtual void enterFullscreenForNode(WebCore::Node*);
+ virtual void exitFullscreenForNode(WebCore::Node*);
+
// ChromeClientChromium methods:
virtual void popupOpened(WebCore::PopupContainer* popupContainer,
const WebCore::IntRect& bounds,
diff --git a/WebKit/chromium/src/DebuggerAgent.h b/WebKit/chromium/src/DebuggerAgent.h
index 7f3dbbb..17cde11 100644
--- a/WebKit/chromium/src/DebuggerAgent.h
+++ b/WebKit/chromium/src/DebuggerAgent.h
@@ -40,10 +40,7 @@ namespace WebKit {
METHOD0(getContextId) \
\
/* Request v8 to process all debug commands in the queue. */ \
- METHOD0(processDebugCommands) \
- \
- /* Push DebuggerScript.js content to the agent. */ \
- METHOD1(setDebuggerScriptSource, String)
+ METHOD0(processDebugCommands)
DEFINE_RPC_CLASS(DebuggerAgent, DEBUGGER_AGENT_STRUCT)
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp
index 673482a..dde9e1d 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.cpp
+++ b/WebKit/chromium/src/DebuggerAgentImpl.cpp
@@ -79,11 +79,6 @@ void DebuggerAgentImpl::processDebugCommands()
v8::Debug::ProcessDebugMessages();
}
-void DebuggerAgentImpl::setDebuggerScriptSource(const String& source)
-{
- WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(source);
-}
-
void DebuggerAgentImpl::debuggerOutput(const String& command)
{
m_delegate->debuggerOutput(command);
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.h b/WebKit/chromium/src/DebuggerAgentImpl.h
index bd9ddf6..0e6e6af 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.h
+++ b/WebKit/chromium/src/DebuggerAgentImpl.h
@@ -60,7 +60,6 @@ public:
// DebuggerAgent implementation.
virtual void getContextId();
virtual void processDebugCommands();
- virtual void setDebuggerScriptSource(const String&);
void debuggerOutput(const WebCore::String& out);
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 7c5635b..0681675 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -41,7 +41,7 @@
#include "ImageData.h"
#include "WebGLBuffer.h"
#include "Int8Array.h"
-#include "FloatArray.h"
+#include "Float32Array.h"
#include "WebGLFramebuffer.h"
#include "Int32Array.h"
#include "WebGLProgram.h"
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 3e5f00a..42be08d 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -35,6 +35,7 @@
#include "WebIDBDatabaseImpl.h"
#include "WebIDBDatabaseError.h"
#include "WebIDBIndexImpl.h"
+#include "WebIDBObjectStoreImpl.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -79,6 +80,12 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex)
m_callbacks.clear();
}
+void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStore> idbObjectStore)
+{
+ m_callbacks->onSuccess(new WebKit::WebIDBObjectStoreImpl(idbObjectStore));
+ m_callbacks.clear();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue)
{
m_callbacks->onSuccess(WebKit::WebSerializedScriptValue(serializedScriptValue));
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h
index d98e2ed..8f2da28 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -30,6 +30,7 @@
#define IDBCallbacksProxy_h
#include "IDBCallbacks.h"
+#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -43,6 +44,7 @@ namespace WebCore {
class IDBDatabaseError;
class IDBDatabase;
+class IDBObjectStore;
class SerializedScriptValue;
class IDBCallbacksProxy : public IDBCallbacks {
@@ -54,6 +56,7 @@ public:
virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBDatabase>);
virtual void onSuccess(PassRefPtr<IDBIndex>);
+ virtual void onSuccess(PassRefPtr<IDBObjectStore>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
private:
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index deb2f99..9d009c0 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -27,8 +27,13 @@
#include "IDBDatabaseProxy.h"
#include "DOMStringList.h"
+#include "IDBCallbacks.h"
+#include "IDBObjectStoreProxy.h"
+#include "WebFrameImpl.h"
+#include "WebIDBCallbacksImpl.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
+#include "WebIDBObjectStore.h"
#if ENABLE(INDEXED_DATABASE)
@@ -48,26 +53,44 @@ IDBDatabaseProxy::~IDBDatabaseProxy()
{
}
-String IDBDatabaseProxy::name()
+String IDBDatabaseProxy::name() const
{
return m_webIDBDatabase->name();
}
-String IDBDatabaseProxy::description()
+String IDBDatabaseProxy::description() const
{
return m_webIDBDatabase->description();
}
-String IDBDatabaseProxy::version()
+String IDBDatabaseProxy::version() const
{
return m_webIDBDatabase->version();
}
-PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores()
+PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores() const
{
return m_webIDBDatabase->objectStores();
}
+void IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBDatabase->createObjectStore(name, keyPath, autoIncrement, new WebIDBCallbacksImpl(callbacks));
+}
+
+PassRefPtr<IDBObjectStore> IDBDatabaseProxy::objectStore(const String& name, unsigned short mode)
+{
+ WebKit::WebIDBObjectStore* objectStore = m_webIDBDatabase->objectStore(name, mode);
+ if (!objectStore)
+ return 0;
+ return IDBObjectStoreProxy::create(objectStore);
+}
+
+void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBDatabase->removeObjectStore(name, new WebIDBCallbacksImpl(callbacks));
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index e5e5125..36588f0 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -42,12 +42,16 @@ public:
static PassRefPtr<IDBDatabase> create(PassOwnPtr<WebKit::WebIDBDatabase>);
virtual ~IDBDatabaseProxy();
- virtual String name();
- virtual String description();
- virtual String version();
- virtual PassRefPtr<DOMStringList> objectStores();
+ virtual String name() const;
+ virtual String description() const;
+ virtual String version() const;
+ virtual PassRefPtr<DOMStringList> objectStores() const;
- // FIXME: Add other methods.
+ // FIXME: Add transaction and setVersion.
+
+ virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
+ virtual PassRefPtr<IDBObjectStore> objectStore(const String& name, unsigned short mode);
+ virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
private:
IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase>);
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
new file mode 100755
index 0000000..5942e2a
--- /dev/null
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "IDBObjectStoreProxy.h"
+
+#include "DOMStringList.h"
+#include "IDBCallbacks.h"
+#include "IDBIndexProxy.h"
+#include "WebIDBCallbacksImpl.h"
+#include "WebIDBIndex.h"
+#include "WebIDBObjectStore.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBObjectStore> IDBObjectStoreProxy::create(PassOwnPtr<WebKit::WebIDBObjectStore> objectStore)
+{
+ return adoptRef(new IDBObjectStoreProxy(objectStore));
+}
+
+IDBObjectStoreProxy::IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore> objectStore)
+ : m_webIDBObjectStore(objectStore)
+{
+}
+
+IDBObjectStoreProxy::~IDBObjectStoreProxy()
+{
+}
+
+String IDBObjectStoreProxy::name() const
+{
+ return m_webIDBObjectStore->name();
+}
+
+String IDBObjectStoreProxy::keyPath() const
+{
+ return m_webIDBObjectStore->keyPath();
+}
+
+PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const
+{
+ return m_webIDBObjectStore->indexNames();
+}
+
+void IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBObjectStore->createIndex(name, keyPath, unique, new WebIDBCallbacksImpl(callbacks));
+}
+
+PassRefPtr<IDBIndex> IDBObjectStoreProxy::index(const String& name)
+{
+ WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name);
+ if (!index)
+ return 0;
+ return IDBIndexProxy::create(index);
+}
+
+void IDBObjectStoreProxy::removeIndex(const String& name, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBObjectStore->removeIndex(name, new WebIDBCallbacksImpl(callbacks));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h
new file mode 100755
index 0000000..78983cb
--- /dev/null
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.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.
+ *
+ * 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 IDBObjectStoreProxy_h
+#define IDBObjectStoreProxy_h
+
+#include "IDBObjectStore.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebKit { class WebIDBObjectStore; }
+
+namespace WebCore {
+
+class DOMStringList;
+class IDBIndex;
+
+class IDBObjectStoreProxy : public IDBObjectStore {
+public:
+ static PassRefPtr<IDBObjectStore> create(PassOwnPtr<WebKit::WebIDBObjectStore>);
+ virtual ~IDBObjectStoreProxy();
+
+ virtual String name() const;
+ virtual String keyPath() const;
+ virtual PassRefPtr<DOMStringList> indexNames() const;
+
+ virtual void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>);
+ virtual PassRefPtr<IDBIndex> index(const String& name);
+ virtual void removeIndex(const String& name, PassRefPtr<IDBCallbacks>);
+
+private:
+ IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore>);
+
+ OwnPtr<WebKit::WebIDBObjectStore> m_webIDBObjectStore;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBObjectStoreProxy_h
+
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IndexedDatabaseProxy.cpp
index 2572877..bee99b2 100644
--- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IndexedDatabaseProxy.cpp
@@ -57,12 +57,10 @@ IndexedDatabaseProxy::~IndexedDatabaseProxy()
{
}
-void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, ExceptionCode& ec)
+void IndexedDatabaseProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame)
{
- if (!frame || !frame->document())
- return;
WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
- m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, ec);
+ m_webIndexedDatabase->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.h b/WebKit/chromium/src/IndexedDatabaseProxy.h
index 206099c..53097f0 100644
--- a/WebKit/chromium/src/IndexedDatabaseProxy.h
+++ b/WebKit/chromium/src/IndexedDatabaseProxy.h
@@ -42,7 +42,7 @@ public:
static PassRefPtr<IndexedDatabase> create();
virtual ~IndexedDatabaseProxy();
- virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, ExceptionCode&);
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
private:
IndexedDatabaseProxy();
diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp
index 22b515f..91d10d5 100644
--- a/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -35,6 +35,8 @@
#include "FloatRect.h"
#include "NotImplemented.h"
#include "Page.h"
+#include "WebDevToolsAgentImpl.h"
+#include "WebDevToolsMessageData.h"
#include "WebRect.h"
#include "WebURL.h"
#include "WebURLRequest.h"
@@ -102,4 +104,20 @@ void InspectorClientImpl::storeSetting(const String& key, const String& value)
m_inspectedWebView->setInspectorSetting(key, value);
}
+bool InspectorClientImpl::sendMessageToFrontend(const WebCore::String& message)
+{
+ WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
+ if (!devToolsAgent)
+ return false;
+
+ WebVector<WebString> arguments(size_t(1));
+ arguments[0] = message;
+ WebDevToolsMessageData data;
+ data.className = "ToolsAgentDelegate";
+ data.methodName = "dispatchOnClient";
+ data.arguments.swap(arguments);
+ devToolsAgent->sendRpcMessage(data);
+ return true;
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/InspectorClientImpl.h b/WebKit/chromium/src/InspectorClientImpl.h
index 7447d0c..f4994e3 100644
--- a/WebKit/chromium/src/InspectorClientImpl.h
+++ b/WebKit/chromium/src/InspectorClientImpl.h
@@ -36,6 +36,8 @@
#include <wtf/OwnPtr.h>
namespace WebKit {
+
+class WebDevToolsAgentClient;
class WebViewImpl;
class InspectorClientImpl : public WebCore::InspectorClient {
@@ -46,15 +48,14 @@ public:
// InspectorClient methods:
virtual void inspectorDestroyed();
virtual void openInspectorFrontend(WebCore::InspectorController*);
+
virtual void highlight(WebCore::Node*);
virtual void hideHighlight();
- virtual void populateSetting(
- const WebCore::String& key,
- WebCore::String* value);
- virtual void storeSetting(
- const WebCore::String& key,
- const WebCore::String& value);
+ virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
+ virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+
+ virtual bool sendMessageToFrontend(const WebCore::String&);
private:
// The WebViewImpl of the page being inspected; gets passed to the constructor
diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp
index dca1856..c928c91 100644
--- a/WebKit/chromium/src/NotificationPresenterImpl.cpp
+++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp
@@ -88,7 +88,10 @@ void NotificationPresenterImpl::cancel(Notification* notification)
void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notification)
{
- m_presenter->objectDestroyed(PassRefPtr<Notification>(notification));
+ // TODO(pkasting): We cannot ref an object that's being destroyed. Either
+ // this function needs to be called earlier than in ~Notification(), or it
+ // needs to not ref this object.
+ //m_presenter->objectDestroyed(PassRefPtr<Notification>(notification));
}
NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& sourceURL)
diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.h b/WebKit/chromium/src/SuggestionsPopupMenuClient.h
index 77b3890..7717593 100644
--- a/WebKit/chromium/src/SuggestionsPopupMenuClient.h
+++ b/WebKit/chromium/src/SuggestionsPopupMenuClient.h
@@ -61,6 +61,8 @@ public:
// WebCore::PopupMenuClient methods:
virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
+ virtual void selectionChanged(unsigned, bool) {}
+ virtual void selectionCleared() {}
virtual WebCore::String itemText(unsigned listIndex) const;
virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); }
virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); }
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 8dde31f..c4bbbfa 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -462,6 +462,11 @@ void WebDevToolsAgentImpl::createInspectorFrontendProxy()
m_utilityContext = v8::Context::New();
compileUtilityScripts();
initDevToolsAgentHost();
+#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
+ WebCString debuggerScriptJs = m_client->debuggerScriptSource();
+ WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(
+ WebCore::String(debuggerScriptJs.data(), debuggerScriptJs.length()));
+#endif
}
void WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController()
@@ -470,8 +475,7 @@ void WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController()
ScriptState* state = ScriptState::forContext(
v8::Local<v8::Context>::New(m_utilityContext));
InspectorController* ic = inspectorController();
- ic->setFrontend(new InspectorFrontend(
- ScriptObject(state, m_utilityContext->Global())));
+ ic->connectFrontend(ScriptObject(state, m_utilityContext->Global()));
}
void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled)
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
index b9143d9..2b8ae3c 100644
--- a/WebKit/chromium/src/WebEntities.cpp
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -42,12 +42,12 @@
using namespace WebCore;
namespace {
-// Note that this file is also included by HTMLTokenizer.cpp so we are getting
+// Note that this file is also included by HTMLDocumentParser.cpp so we are getting
// two copies of the data in memory. We can fix this by changing the script
// that generated the array to create a static const that is its length, but
// this is low priority since the data is less than 4K. We use anonymous
// namespace to prevent name collisions.
-#include "HTMLEntityNames.c" // NOLINT
+#include "HTMLEntityNames.cpp" // NOLINT
}
namespace WebKit {
diff --git a/WebKit/chromium/src/WebFormControlElement.cpp b/WebKit/chromium/src/WebFormControlElement.cpp
index 007673e..a75fe5c 100644
--- a/WebKit/chromium/src/WebFormControlElement.cpp
+++ b/WebKit/chromium/src/WebFormControlElement.cpp
@@ -59,7 +59,7 @@ WebString WebFormControlElement::nameForAutofill() const
String trimmedName = name.stripWhiteSpace();
if (!trimmedName.isEmpty())
return trimmedName;
- name = constUnwrap<HTMLFormControlElement>()->getAttribute(HTMLNames::idAttr);
+ name = constUnwrap<HTMLFormControlElement>()->getIdAttribute();
trimmedName = name.stripWhiteSpace();
if (!trimmedName.isEmpty())
return trimmedName;
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index ea1c0b1..891e3b3 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -30,10 +30,12 @@
#include "IDBDatabaseError.h"
#include "IDBDatabaseProxy.h"
#include "IDBIndexProxy.h"
+#include "IDBObjectStoreProxy.h"
#include "WebIDBCallbacks.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
#include "WebIDBIndex.h"
+#include "WebIDBObjectStore.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -73,6 +75,12 @@ void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance)
m_callbacks.clear();
}
+void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBObjectStore* webKitInstance)
+{
+ m_callbacks->onSuccess(IDBObjectStoreProxy::create(webKitInstance));
+ m_callbacks.clear();
+}
+
void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue)
{
m_callbacks->onSuccess(serializedScriptValue);
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.h b/WebKit/chromium/src/WebIDBCallbacksImpl.h
index 8e5ada7..519f692 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.h
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.h
@@ -45,6 +45,7 @@ public:
virtual void onSuccess(); // For "null".
virtual void onSuccess(WebKit::WebIDBDatabase*);
virtual void onSuccess(WebKit::WebIDBIndex*);
+ virtual void onSuccess(WebKit::WebIDBObjectStore*);
virtual void onSuccess(const WebKit::WebSerializedScriptValue&);
private:
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index 3a00ccb..e2f771a 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -27,7 +27,10 @@
#include "WebIDBDatabaseImpl.h"
#include "DOMStringList.h"
+#include "IDBCallbacksProxy.h"
#include "IDBDatabase.h"
+#include "WebIDBCallbacks.h"
+#include "WebIDBObjectStoreImpl.h"
#if ENABLE(INDEXED_DATABASE)
@@ -35,8 +38,8 @@ using namespace WebCore;
namespace WebKit {
-WebIDBDatabaseImpl::WebIDBDatabaseImpl(PassRefPtr<IDBDatabase> idbDatabase)
- : m_idbDatabase(idbDatabase)
+WebIDBDatabaseImpl::WebIDBDatabaseImpl(PassRefPtr<IDBDatabase> database)
+ : m_database(database)
{
}
@@ -44,24 +47,42 @@ WebIDBDatabaseImpl::~WebIDBDatabaseImpl()
{
}
-WebString WebIDBDatabaseImpl::name()
+WebString WebIDBDatabaseImpl::name() const
{
- return m_idbDatabase->name();
+ return m_database->name();
}
-WebString WebIDBDatabaseImpl::description()
+WebString WebIDBDatabaseImpl::description() const
{
- return m_idbDatabase->description();
+ return m_database->description();
}
-WebString WebIDBDatabaseImpl::version()
+WebString WebIDBDatabaseImpl::version() const
{
- return m_idbDatabase->version();
+ return m_database->version();
}
-WebDOMStringList WebIDBDatabaseImpl::objectStores()
+WebDOMStringList WebIDBDatabaseImpl::objectStores() const
{
- return m_idbDatabase->objectStores();
+ return m_database->objectStores();
+}
+
+void WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks)
+{
+ m_database->createObjectStore(name, keyPath, autoIncrement, IDBCallbacksProxy::create(callbacks));
+}
+
+WebIDBObjectStore* WebIDBDatabaseImpl::objectStore(const WebString& name, unsigned short mode)
+{
+ RefPtr<IDBObjectStore> objectStore = m_database->objectStore(name, mode);
+ if (!objectStore)
+ return 0;
+ return new WebIDBObjectStoreImpl(objectStore);
+}
+
+void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks)
+{
+ m_database->removeObjectStore(name, IDBCallbacksProxy::create(callbacks));
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index f99a759..c83d8d7 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -35,19 +35,25 @@ namespace WebCore { class IDBDatabase; }
namespace WebKit {
+class WebIDBObjectStore;
+
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBDatabaseImpl : public WebIDBDatabase {
public:
- WebIDBDatabaseImpl(WTF::PassRefPtr<WebCore::IDBDatabase> idbDatabase);
+ WebIDBDatabaseImpl(WTF::PassRefPtr<WebCore::IDBDatabase> database);
virtual ~WebIDBDatabaseImpl();
- virtual WebString name();
- virtual WebString description();
- virtual WebString version();
- virtual WebDOMStringList objectStores();
+ virtual WebString name() const;
+ virtual WebString description() const;
+ virtual WebString version() const;
+ virtual WebDOMStringList objectStores() const;
+
+ virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks);
+ virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode);
+ virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks);
private:
- WTF::RefPtr<WebCore::IDBDatabase> m_idbDatabase;
+ WTF::RefPtr<WebCore::IDBDatabase> m_database;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
new file mode 100755
index 0000000..a41010a
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebIDBObjectStoreImpl.h"
+
+#include "DOMStringList.h"
+#include "IDBCallbacksProxy.h"
+#include "IDBObjectStore.h"
+#include "WebIDBIndexImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIDBObjectStoreImpl::WebIDBObjectStoreImpl(PassRefPtr<IDBObjectStore> objectStore)
+ : m_objectStore(objectStore)
+{
+}
+
+WebIDBObjectStoreImpl::~WebIDBObjectStoreImpl()
+{
+}
+
+WebString WebIDBObjectStoreImpl::name() const
+{
+ return m_objectStore->name();
+}
+
+WebString WebIDBObjectStoreImpl::keyPath() const
+{
+ return m_objectStore->keyPath();
+}
+
+WebDOMStringList WebIDBObjectStoreImpl::indexNames() const
+{
+ return m_objectStore->indexNames();
+}
+
+void WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks)
+{
+ m_objectStore->createIndex(name, keyPath, unique, IDBCallbacksProxy::create(callbacks));
+}
+
+WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name)
+{
+ RefPtr<IDBIndex> index = m_objectStore->index(name);
+ if (!index)
+ return 0;
+ return new WebIDBIndexImpl(index);
+}
+
+void WebIDBObjectStoreImpl::removeIndex(const WebString& name, WebIDBCallbacks* callbacks)
+{
+ m_objectStore->removeIndex(name, IDBCallbacksProxy::create(callbacks));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
new file mode 100755
index 0000000..f59840f
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 WebIDBObjectStoreImpl_h
+#define WebIDBObjectStoreImpl_h
+
+#include "WebCommon.h"
+#include "WebIDBObjectStore.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore { class IDBObjectStore; }
+
+namespace WebKit {
+
+class WebIDBIndex;
+
+// See comment in WebIndexedObjectStore for a high level overview these classes.
+class WebIDBObjectStoreImpl : public WebIDBObjectStore {
+public:
+ WebIDBObjectStoreImpl(WTF::PassRefPtr<WebCore::IDBObjectStore> objectStore);
+ virtual ~WebIDBObjectStoreImpl();
+
+ virtual WebString name() const;
+ virtual WebString keyPath() const;
+ virtual WebDOMStringList indexNames() const;
+
+ virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks);
+ virtual WebIDBIndex* index(const WebString& name);
+ virtual void removeIndex(const WebString& name, WebIDBCallbacks* callbacks);
+
+ private:
+ WTF::RefPtr<WebCore::IDBObjectStore> m_objectStore;
+};
+
+} // namespace WebKit
+
+#endif // WebIDBObjectStoreImpl_h
diff --git a/WebKit/chromium/src/WebImageCG.cpp b/WebKit/chromium/src/WebImageCG.cpp
index 60b2449..045c8be 100644
--- a/WebKit/chromium/src/WebImageCG.cpp
+++ b/WebKit/chromium/src/WebImageCG.cpp
@@ -89,14 +89,16 @@ WebSize WebImage::size() const
WebImage::WebImage(const PassRefPtr<Image>& image)
: m_imageRef(0)
{
- if (image.get())
- assign(image->nativeImageForCurrentFrame());
+ NativeImagePtr p;
+ if (image.get() && (p = image->nativeImageForCurrentFrame()))
+ assign(p);
}
WebImage& WebImage::operator=(const PassRefPtr<Image>& image)
{
- if (image.get())
- assign(image->nativeImageForCurrentFrame());
+ NativeImagePtr p;
+ if (image.get() && (p = image->nativeImageForCurrentFrame()))
+ assign(p);
else
reset();
return *this;
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
index 00122ad..27a6247 100644
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.cpp
@@ -57,9 +57,9 @@ WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl()
{
}
-void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, int& exceptionCode)
+void WebIndexedDatabaseImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*)
{
- m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, exceptionCode);
+ m_indexedDatabase->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebIndexedDatabaseImpl.h b/WebKit/chromium/src/WebIndexedDatabaseImpl.h
index 072a92b..76781e5 100644
--- a/WebKit/chromium/src/WebIndexedDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIndexedDatabaseImpl.h
@@ -41,7 +41,7 @@ public:
WebIndexedDatabaseImpl();
virtual ~WebIndexedDatabaseImpl();
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, int& exceptionCode);
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*);
private:
WTF::RefPtr<WebCore::IndexedDatabase> m_indexedDatabase;
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 68bb91e..18bafd6 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -85,6 +85,21 @@ WebString WebInputElement::value() const
return constUnwrap<HTMLInputElement>()->value();
}
+void WebInputElement::setPlaceholder(const WebString& value)
+{
+ unwrap<HTMLInputElement>()->setPlaceholder(value);
+}
+
+WebString WebInputElement::placeholder() const
+{
+ return constUnwrap<HTMLInputElement>()->placeholder();
+}
+
+bool WebInputElement::isAutofilled() const
+{
+ return constUnwrap<HTMLInputElement>()->isAutofilled();
+}
+
void WebInputElement::setAutofilled(bool autoFilled)
{
unwrap<HTMLInputElement>()->setAutofilled(autoFilled);
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 5807a79..d099048 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -60,6 +60,7 @@
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "Page.h"
+#include "RenderBox.h"
#include "ScrollView.h"
#include "WheelEvent.h"
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 601a497..14ece13 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -187,8 +187,8 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
if (!formElement->appendFormData(dataList, false))
continue;
- const Vector<FormDataList::Item>& itemList = dataList.list();
- if (isTextElement && !itemList.isEmpty()) {
+ const BlobItemList& items = dataList.items();
+ if (isTextElement && !items.isEmpty()) {
if (textElement) {
// The auto-complete bar only knows how to fill in one value.
// This form has multiple fields; don't treat it as searchable.
@@ -196,20 +196,22 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
}
textElement = static_cast<HTMLInputElement*>(formElement);
}
- for (Vector<FormDataList::Item>::const_iterator j(itemList.begin()); j != itemList.end(); ++j) {
+ for (BlobItemList::const_iterator j(items.begin()); j != items.end(); ++j) {
+ const StringBlobItem* item = (*j)->toStringBlobItem();
+ ASSERT(item);
// Handle ISINDEX / <input name=isindex> specially, but only if it's
// the first entry.
- if (!encodedString->isEmpty() || j->data() != "isindex") {
+ if (!encodedString->isEmpty() || item->cstr() != "isindex") {
if (!encodedString->isEmpty())
encodedString->append('&');
- FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
encodedString->append('=');
}
++j;
if (formElement == textElement)
encodedString->append("{searchTerms}", 13);
else
- FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
}
}
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 946782b..7e89a77 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -271,7 +271,7 @@ void WebSettingsImpl::setShowDebugBorders(bool show)
void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior)
{
- m_settings->setEditingBehavior(static_cast<WebCore::EditingBehavior>(behavior));
+ m_settings->setEditingBehaviorType(static_cast<WebCore::EditingBehaviorType>(behavior));
}
void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled)
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index 1aba54e..d5ba707 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -287,6 +287,16 @@ void WebURLResponse::setWasNpnNegotiated(bool value)
m_private->m_resourceResponse->setWasNpnNegotiated(value);
}
+bool WebURLResponse::wasFetchedViaProxy() const
+{
+ return m_private->m_resourceResponse->wasFetchedViaProxy();
+}
+
+void WebURLResponse::setWasFetchedViaProxy(bool value)
+{
+ m_private->m_resourceResponse->setWasFetchedViaProxy(value);
+}
+
bool WebURLResponse::isMultipartPayload() const
{
return m_private->m_resourceResponse->isMultipartPayload();
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index a38995e..5adc35c 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -681,7 +681,7 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
Node* focusedNode = focusedFrame->document()->focusedNode();
Position start = mainFrameImpl->selection()->selection().start();
- if (focusedFrame->editor() && focusedFrame->editor()->canEdit() && start.node()) {
+ if (start.node()) {
RenderObject* renderer = start.node()->renderer();
if (!renderer)
return false;
@@ -827,6 +827,45 @@ bool WebViewImpl::mapKeyCodeForScroll(int keyCode,
return true;
}
+// Computes the distance from a point outside a rect to the nearest edge of the rect.
+static IntSize distanceToRect(const IntPoint& point, const IntRect& rect)
+{
+ int dx = 0, dy = 0;
+ if (point.x() < rect.x())
+ dx = point.x() - rect.x();
+ else if (rect.right() < point.x())
+ dx = point.x() - rect.right();
+ if (point.y() < rect.y())
+ dy = point.y() - rect.y();
+ else if (rect.bottom() < point.y())
+ dy = point.y() - rect.bottom();
+ return IntSize(dx, dy);
+}
+
+void WebViewImpl::scrollForDragging(const WebPoint& clientPoint)
+{
+ // This margin approximates Safari behavior, derived from an observation.
+ static const int scrollMargin = 30;
+
+ FrameView* view = mainFrameImpl()->frameView();
+ if (!view)
+ return;
+
+ IntRect bounds(0, 0, view->visibleWidth(), view->visibleHeight());
+ bounds.setY(bounds.y() + scrollMargin);
+ bounds.setHeight(bounds.height() - scrollMargin * 2);
+ bounds.setX(bounds.x() + scrollMargin);
+ bounds.setWidth(bounds.width() - scrollMargin * 2);
+
+ IntPoint point = clientPoint;
+ if (bounds.contains(point))
+ return;
+
+ IntSize toScroll = distanceToRect(point, bounds);
+ if (!toScroll.isZero())
+ view->scrollBy(toScroll);
+}
+
void WebViewImpl::hideSelectPopup()
{
if (m_selectPopup.get())
@@ -1539,6 +1578,14 @@ void WebViewImpl::dragSourceEndedAt(
static_cast<DragOperation>(operation));
}
+void WebViewImpl::dragSourceMovedTo(
+ const WebPoint& clientPoint,
+ const WebPoint& screenPoint,
+ WebDragOperation operation)
+{
+ scrollForDragging(clientPoint);
+}
+
void WebViewImpl::dragSourceSystemDragEnded()
{
// It's possible for us to get this callback while not doing a drag if
@@ -1659,6 +1706,9 @@ WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo
} else
m_dragOperation = static_cast<WebDragOperation>(effect);
+ if (dragAction == DragOver)
+ scrollForDragging(clientPoint);
+
return m_dragOperation;
}
@@ -1736,10 +1786,10 @@ void WebViewImpl::applyAutoFillSuggestions(
const WebNode& node,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- int defaultSuggestionIndex)
+ int separatorIndex)
{
ASSERT(names.size() == labels.size());
- ASSERT(defaultSuggestionIndex < static_cast<int>(names.size()));
+ ASSERT(separatorIndex < static_cast<int>(names.size()));
if (names.isEmpty()) {
hideSuggestionsPopup();
@@ -1764,7 +1814,7 @@ void WebViewImpl::applyAutoFillSuggestions(
m_autoFillPopupClient.set(new AutoFillPopupMenuClient);
m_autoFillPopupClient->initialize(inputElem, names, labels,
- defaultSuggestionIndex);
+ separatorIndex);
if (m_suggestionsPopupClient != m_autoFillPopupClient.get()) {
hideSuggestionsPopup();
@@ -1781,7 +1831,7 @@ void WebViewImpl::applyAutoFillSuggestions(
m_suggestionsPopup = m_autoFillPopup.get();
if (m_suggestionsPopupShowing) {
- m_autoFillPopupClient->setSuggestions(names, labels);
+ m_autoFillPopupClient->setSuggestions(names, labels, separatorIndex);
refreshSuggestionsPopup();
} else {
m_suggestionsPopup->show(focusedNode->getRect(),
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index b2fc680..8b15f8a 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -132,6 +132,10 @@ public:
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperation operation);
+ virtual void dragSourceMovedTo(
+ const WebPoint& clientPoint,
+ const WebPoint& screenPoint,
+ WebDragOperation operation);
virtual void dragSourceSystemDragEnded();
virtual WebDragOperation dragTargetDragEnter(
const WebDragData& dragData, int identity,
@@ -162,7 +166,7 @@ public:
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- int defaultSuggestionIndex);
+ int separatorIndex);
virtual void applyAutocompleteSuggestions(
const WebNode&,
const WebVector<WebString>& suggestions,
@@ -347,6 +351,8 @@ private:
// Returns true if the view was scrolled.
bool scrollViewWithKeyboard(int keyCode, int modifiers);
+ void scrollForDragging(const WebPoint&);
+
void hideSelectPopup();
// Converts |pos| from window coordinates to contents coordinates and gets
diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
index f4db5ee..dc46b07 100644
--- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
@@ -151,6 +151,60 @@ static int gdkEventToWindowsKeyCode(const GdkEventKey* event)
GDK_period, // 0x3C: GDK_period
GDK_slash, // 0x3D: GDK_slash
0, // 0x3E: GDK_Shift_R
+ 0, // 0x3F:
+ 0, // 0x40:
+ 0, // 0x41:
+ 0, // 0x42:
+ 0, // 0x43:
+ 0, // 0x44:
+ 0, // 0x45:
+ 0, // 0x46:
+ 0, // 0x47:
+ 0, // 0x48:
+ 0, // 0x49:
+ 0, // 0x4A:
+ 0, // 0x4B:
+ 0, // 0x4C:
+ 0, // 0x4D:
+ 0, // 0x4E:
+ 0, // 0x4F:
+ 0, // 0x50:
+ 0, // 0x51:
+ 0, // 0x52:
+ 0, // 0x53:
+ 0, // 0x54:
+ 0, // 0x55:
+ 0, // 0x56:
+ 0, // 0x57:
+ 0, // 0x58:
+ 0, // 0x59:
+ 0, // 0x5A:
+ 0, // 0x5B:
+ 0, // 0x5C:
+ 0, // 0x5D:
+ 0, // 0x5E:
+ 0, // 0x5F:
+ 0, // 0x60:
+ 0, // 0x61:
+ 0, // 0x62:
+ 0, // 0x63:
+ 0, // 0x64:
+ 0, // 0x65:
+ 0, // 0x66:
+ 0, // 0x67:
+ 0, // 0x68:
+ 0, // 0x69:
+ 0, // 0x6A:
+ 0, // 0x6B:
+ 0, // 0x6C:
+ 0, // 0x6D:
+ 0, // 0x6E:
+ 0, // 0x6F:
+ 0, // 0x70:
+ 0, // 0x71:
+ 0, // 0x72:
+ GDK_Super_L, // 0x73: GDK_Super_L
+ GDK_Super_R, // 0x74: GDK_Super_R
};
// |windowsKeyCode| has to include a valid virtual-key code even when we
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index 67e54aa..8d2457f 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -181,7 +181,7 @@ devtools.DebuggerAgent.prototype.initUI = function()
// pending addition into the UI.
for (var scriptId in this.parsedScripts_) {
var script = this.parsedScripts_[scriptId];
- WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1);
+ WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1, script.worldType());
this.restoreBreakpoints_(scriptId, script.getUrl());
}
return;
@@ -307,7 +307,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, enable
/**
- * Changes given line of the script.
+ * Changes given line of the script.
*/
devtools.DebuggerAgent.prototype.editScriptSource = function(sourceId, newContent, callback)
{
@@ -319,12 +319,31 @@ devtools.DebuggerAgent.prototype.editScriptSource = function(sourceId, newConten
var cmd = new devtools.DebugCommand("changelive", commandArguments);
devtools.DebuggerAgent.sendCommand_(cmd);
this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
- if (!msg.isSuccess())
- WebInspector.log("Unable to modify source code within given scope. Only function bodies are editable at the moment.", WebInspector.ConsoleMessage.MessageLevel.Warning);
- this.resolveScriptSource(sourceId, callback);
- if (WebInspector.panels.scripts.paused)
- this.requestBacktrace_();
+ if (!msg.isSuccess()) {
+ callback(false, "Unable to modify source code within given scope. Only function bodies are editable at the moment.", null);
+ return;
+ }
+
+ this.resolveScriptSource(sourceId, requestBacktrace.bind(this));
}.bind(this);
+
+
+ function requestBacktrace(newScriptSource) {
+ if (WebInspector.panels.scripts.paused)
+ this.requestBacktrace_(handleBacktraceResponse.bind(this, newScriptSource));
+ else
+ reportDidCommitEditing(newScriptSource);
+ }
+
+ function handleBacktraceResponse(newScriptSource, msg) {
+ this.updateCallFramesFromBacktraceResponse_(msg);
+ reportDidCommitEditing(newScriptSource, this.callFrames_);
+ }
+
+ function reportDidCommitEditing(newScriptSource, callFrames) {
+ callback(true, newScriptSource, callFrames);
+ }
+
RemoteDebuggerAgent.processDebugCommands();
};
@@ -679,12 +698,14 @@ devtools.DebuggerAgent.prototype.requestClearBreakpoint_ = function(breakpointId
/**
* Sends "backtrace" request to v8.
*/
-devtools.DebuggerAgent.prototype.requestBacktrace_ = function()
+devtools.DebuggerAgent.prototype.requestBacktrace_ = function(opt_customHandler)
{
var cmd = new devtools.DebugCommand("backtrace", {
"compactFormat":true
});
devtools.DebuggerAgent.sendCommand_(cmd);
+ var responseHandler = opt_customHandler ? opt_customHandler : this.handleBacktraceResponse_.bind(this);
+ this.requestSeqToCallback_[cmd.getSequenceNumber()] = responseHandler;
};
@@ -800,7 +821,7 @@ devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output)
else if (msg.getCommand() === "clearbreakpoint")
this.handleClearBreakpointResponse_(msg);
else if (msg.getCommand() === "backtrace")
- this.handleBacktraceResponse_(msg);
+ this.invokeCallbackForResponse_(msg);
else if (msg.getCommand() === "lookup")
this.invokeCallbackForResponse_(msg);
else if (msg.getCommand() === "evaluate")
@@ -948,17 +969,17 @@ devtools.DebuggerAgent.prototype.handleAfterCompileEvent_ = function(msg)
devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg)
{
var context = msg.lookup(script.context.ref);
- var contextType;
// Find the type from context data. The context data has the format
// "type,id".
var comma = context.data.indexOf(",");
if (comma < 0)
- return
- contextType = context.data.substring(0, comma);
- this.parsedScripts_[script.id] = new devtools.ScriptInfo(script.id, script.name, script.lineOffset, contextType);
+ return;
+ var contextType = context.data.substring(0, comma);
+ var info = new devtools.ScriptInfo(script.id, script.name, script.lineOffset, contextType);
+ this.parsedScripts_[script.id] = info;
if (this.scriptsPanelInitialized_) {
// Only report script as parsed after scripts panel has been shown.
- WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1);
+ WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1, info.worldType());
this.restoreBreakpoints_(script.id, script.name);
}
};
@@ -991,13 +1012,20 @@ devtools.DebuggerAgent.prototype.handleBacktraceResponse_ = function(msg)
*/
devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_ = function(msg)
{
+ this.updateCallFramesFromBacktraceResponse_(msg);
+ WebInspector.pausedScript(this.callFrames_);
+ this.showPendingExceptionMessage_();
+ InspectorFrontendHost.bringToFront();
+};
+
+
+devtools.DebuggerAgent.prototype.updateCallFramesFromBacktraceResponse_ = function(msg)
+{
var frames = msg.getBody().frames;
this.callFrames_ = [];
for (var i = 0; i < frames.length; ++i)
this.callFrames_.push(this.formatCallFrame_(frames[i]));
- WebInspector.pausedScript(this.callFrames_);
- this.showPendingExceptionMessage_();
- InspectorFrontendHost.bringToFront();
+ return this.callFrames_;
};
@@ -1044,7 +1072,7 @@ devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame)
var existingScript = this.parsedScripts_[sourceId];
if (!existingScript) {
this.parsedScripts_[sourceId] = new devtools.ScriptInfo(sourceId, null /* name */, 0 /* line */, "unknown" /* type */, true /* unresolved */);
- WebInspector.parsedScriptSource(sourceId, null, null, 0);
+ WebInspector.parsedScriptSource(sourceId, null, null, 0, WebInspector.Script.WorldType.MAIN_WORLD);
}
var funcName = func.name || func.inferredName || "(anonymous function)";
@@ -1257,6 +1285,14 @@ devtools.ScriptInfo.prototype.isUnresolved = function()
};
+devtools.ScriptInfo.prototype.worldType = function()
+{
+ if (this.contextType_ === "injected")
+ return WebInspector.Script.WorldType.EXTENSIONS_WORLD;
+ return WebInspector.Script.WorldType.MAIN_WORLD;
+};
+
+
/**
* @param {number} line 0-based line number in the script.
* @return {?devtools.BreakpointInfo} Information on a breakpoint at the
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 7e5b430..3ff3eb7 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-function debuggerScriptConstructor() {
+(function () {
var DebuggerScript = {};
DebuggerScript._breakpoints = {};
@@ -39,6 +39,11 @@ DebuggerScript.PauseOnExceptionsState = {
PauseOnUncaughtExceptions: 2
};
+DebuggerScript.ScriptWorldType = {
+ MainWorld : 0,
+ ExtensionsWorld : 1
+};
+
DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions;
Debug.clearBreakOnException();
Debug.clearBreakOnUncaughtException();
@@ -50,11 +55,21 @@ DebuggerScript.getAfterCompileScript = function(eventData)
DebuggerScript.getScripts = function(contextData)
{
- var scripts = Debug.scripts();
var result = [];
+
+ if (!contextData)
+ return result;
+ var comma = contextData.indexOf(",");
+ if (comma === -1)
+ return result;
+ // Context data is a string in the following format:
+ // ("page"|"injected")","<page id>
+ var idSuffix = contextData.substring(comma); // including the comma
+
+ var scripts = Debug.scripts();
for (var i = 0; i < scripts.length; ++i) {
var script = scripts[i];
- if (contextData === script.context_data)
+ if (script.context_data && script.context_data.lastIndexOf(idSuffix) != -1)
result.push(DebuggerScript._formatScript(script));
}
return result;
@@ -62,13 +77,16 @@ DebuggerScript.getScripts = function(contextData)
DebuggerScript._formatScript = function(script)
{
+ var scriptWorldType = DebuggerScript.ScriptWorldType.MainWorld;
+ if (script.context_data && script.context_data.indexOf("injected") == 0)
+ scriptWorldType = DebuggerScript.ScriptWorldType.ExtensionsWorld;
return {
id: script.id,
name: script.name,
source: script.source,
lineOffset: script.line_offset,
lineCount: script.lineCount(),
- contextData: script.context_data
+ scriptWorldType: scriptWorldType
};
}
@@ -152,6 +170,24 @@ DebuggerScript.stepOutOfFunction = function(execState)
execState.prepareStep(Debug.StepAction.StepOut, 1);
}
+DebuggerScript.editScriptSource = function(scriptId, newSource)
+{
+ var scripts = Debug.scripts();
+ var scriptToEdit = null;
+ for (var i = 0; i < scripts.length; i++) {
+ if (scripts[i].id == scriptId) {
+ scriptToEdit = scripts[i];
+ break;
+ }
+ }
+ if (!scriptToEdit)
+ throw("Script not found");
+
+ var changeLog = [];
+ Debug.LiveEdit.SetScriptSource(scriptToEdit, newSource, changeLog);
+ return scriptToEdit.source;
+}
+
DebuggerScript.clearBreakpoints = function(execState, args)
{
for (var key in DebuggerScript._breakpoints) {
@@ -239,4 +275,4 @@ DebuggerScript._v8ToWebkitLineNumber = function(line)
return DebuggerScript;
-}
+})();
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 6e9c090..398d358 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -183,8 +183,8 @@ WebInspector.loaded = function()
Preferences.heapProfilerPresent = true;
Preferences.debuggerAlwaysEnabled = true;
Preferences.profilerAlwaysEnabled = true;
- RemoteDebuggerAgent.setDebuggerScriptSource("(" + debuggerScriptConstructor + ")();");
-
+ Preferences.canEditScriptSource = true;
+
oldLoaded.call(this);
InspectorFrontendHost.loaded();
@@ -210,42 +210,6 @@ document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
if (!window.v8ScriptDebugServerEnabled) {
-/**
- * This override is necessary for adding script source asynchronously.
- * @override
- */
-WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded = function()
-{
- if (!this._frameNeedsSetup)
- return;
-
- this.attach();
-
- if (this.script.source)
- this.didResolveScriptSource_();
- else {
- var self = this;
- devtools.tools.getDebuggerAgent().resolveScriptSource(
- this.script.sourceID,
- function(source) {
- self.script.source = source || WebInspector.UIString("<source is not available>");
- self.didResolveScriptSource_();
- });
- }
-};
-
-
-/**
- * Performs source frame setup when script source is aready resolved.
- */
-WebInspector.ScriptView.prototype.didResolveScriptSource_ = function()
-{
- this.sourceFrame.setContent("text/javascript", this._prependWhitespace(this.script.source));
- this._sourceFrameSetup = true;
- delete this._frameNeedsSetup;
-};
-
-
(function()
{
var oldShow = WebInspector.ScriptsPanel.prototype.show;
@@ -296,6 +260,21 @@ InjectedScriptAccess.prototype.getCompletions = function(expressionString, inclu
};
})();
+// Highlight extension content scripts in the scripts list.
+(function () {
+ var original = WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu;
+ WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu = function(script)
+ {
+ var result = original.apply(this, arguments);
+ var debuggerAgent = devtools.tools.getDebuggerAgent();
+ var type = debuggerAgent.getScriptContextType(script.sourceID);
+ var option = script.filesSelectOption;
+ if (type === "injected" && option)
+ option.addStyleClass("injected");
+ return result;
+ };
+})();
+
}
@@ -349,22 +328,6 @@ WebInspector.UIString = function(string)
})();
-// Highlight extension content scripts in the scripts list.
-(function () {
- var original = WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu;
- WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu = function(script)
- {
- var result = original.apply(this, arguments);
- var debuggerAgent = devtools.tools.getDebuggerAgent();
- var type = debuggerAgent.getScriptContextType(script.sourceID);
- var option = script.filesSelectOption;
- if (type === "injected" && option)
- option.addStyleClass("injected");
- return result;
- };
-})();
-
-
/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
(function()
{
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index cae4a1e..da5929a 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -55,10 +55,6 @@ RemoteDebuggerAgentStub.prototype.processDebugCommands = function()
};
-RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource = function(source)
-{
-};
-
/**
* @constructor
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index 86f885a..327ca8f 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -61,13 +61,16 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("getResourceContent");
this.installInspectorControllerDelegate_("highlightDOMNode");
this.installInspectorControllerDelegate_("hideDOMNodeHighlight");
+ this.installInspectorControllerDelegate_("performSearch");
this.installInspectorControllerDelegate_("releaseWrapperObjectGroup");
this.installInspectorControllerDelegate_("removeAllScriptsToEvaluateOnLoad");
this.installInspectorControllerDelegate_("reloadPage");
this.installInspectorControllerDelegate_("removeAttribute");
this.installInspectorControllerDelegate_("removeDOMStorageItem");
this.installInspectorControllerDelegate_("removeNode");
- this.installInspectorControllerDelegate_("saveFrontendSettings");
+ this.installInspectorControllerDelegate_("saveApplicationSettings");
+ this.installInspectorControllerDelegate_("saveSessionSettings");
+ this.installInspectorControllerDelegate_("searchCanceled");
this.installInspectorControllerDelegate_("setAttribute");
this.installInspectorControllerDelegate_("setDOMStorageItem");
this.installInspectorControllerDelegate_("setInjectedScriptSource");
@@ -93,6 +96,8 @@ devtools.InspectorBackendImpl = function()
if (window.v8ScriptDebugServerEnabled) {
this.installInspectorControllerDelegate_("disableDebugger");
+ this.installInspectorControllerDelegate_("editScriptSource");
+ this.installInspectorControllerDelegate_("getScriptSource");
this.installInspectorControllerDelegate_("enableDebugger");
this.installInspectorControllerDelegate_("setBreakpoint");
this.installInspectorControllerDelegate_("removeBreakpoint");
@@ -143,12 +148,22 @@ devtools.InspectorBackendImpl.prototype.removeBreakpoint = function(sourceID, li
devtools.InspectorBackendImpl.prototype.editScriptSource = function(callID, sourceID, newContent)
{
- devtools.tools.getDebuggerAgent().editScriptSource(sourceID, newContent, function(newFullBody) {
- WebInspector.didEditScriptSource(callID, newFullBody);
+ devtools.tools.getDebuggerAgent().editScriptSource(sourceID, newContent, function(success, newBodyOrErrorMessage, callFrames) {
+ WebInspector.didEditScriptSource(callID, success, newBodyOrErrorMessage, callFrames);
});
};
+devtools.InspectorBackendImpl.prototype.getScriptSource = function(callID, sourceID)
+{
+ devtools.tools.getDebuggerAgent().resolveScriptSource(
+ sourceID,
+ function(source) {
+ WebInspector.didGetScriptSource(callID, source);
+ });
+};
+
+
devtools.InspectorBackendImpl.prototype.activateBreakpoints = function()
{
devtools.tools.getDebuggerAgent().setBreakpointsActivated(true);
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 758b8c0..fa910ab 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -1279,8 +1279,8 @@ TestSuite.prototype.testStepIn = function()
},
{
functionsOnStack: ["fact","d","a","(anonymous function)"],
- lineNumber: 15,
- lineText: " return r;"
+ lineNumber: 10,
+ lineText: " var r = 1;"
},
function() {
test.releaseControl();
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index 2cb4ab3..0e6d284 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -1,7 +1,3 @@
-#scripts-files option.injected {
- color: rgb(70, 134, 240);
-}
-
.data-grid table {
line-height: 120%;
}
diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp
index c98ea74..2756f9d 100644
--- a/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -59,6 +59,8 @@ public:
{
m_selectIndex = listIndex;
}
+ virtual void selectionChanged(unsigned, bool) {}
+ virtual void selectionCleared() {}
virtual String itemText(unsigned listIndex) const
{
diff --git a/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp b/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
index 8892d7f..2fa860a 100644
--- a/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
@@ -58,4 +58,11 @@ void InspectorClientEfl::storeSetting(const String&, const String&)
notImplemented();
}
+bool InspectorClientEfl::sendMessageToFrontend(const String&)
+{
+ notImpelemented();
+ return false;
+}
+
+
}
diff --git a/WebKit/efl/WebCoreSupport/InspectorClientEfl.h b/WebKit/efl/WebCoreSupport/InspectorClientEfl.h
index 30c9caf..1ca646d 100644
--- a/WebKit/efl/WebCoreSupport/InspectorClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/InspectorClientEfl.h
@@ -50,6 +50,8 @@ public:
virtual void populateSetting(const String& key, String* value);
virtual void storeSetting(const String& key, const String& value);
+
+ virtual bool sendMessageToFrontend(const String&);
};
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index ec1727d..d1652dc 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,243 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::releaseFrontendPage):
+ (WebKit::InspectorClient::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-06-10 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Reduce FrameView.h includes to speed up build times
+ https://bugs.webkit.org/show_bug.cgi?id=40408
+
+ * webkit/webkitwebinspector.cpp:
+ - Include RenderLayer.h
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::InspectorClient):
+ (WebKit::InspectorClient::openInspectorFrontend):
+ (WebKit::InspectorFrontendClient::InspectorFrontendClient):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::releaseFrontendPage):
+ (WebKit::InspectorClient::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-06-08 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Unit testing for WebKitDOMNode hierarchy walk
+ https://bugs.webkit.org/show_bug.cgi?id=40171
+
+ Add some DOM node unit testing.
+
+ * tests/testdomnode.c: Added.
+ (finish_loading):
+ (dom_node_fixture_setup):
+ (dom_node_fixture_teardown):
+ (test_dom_node_hierarchy_navigation):
+ (main):
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * webkit/webkitprivate.cpp:
+ (WebKit::core):
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2010-06-08 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Add inner-node property to WebKitHitTestResult
+ https://bugs.webkit.org/show_bug.cgi?id=40131
+
+ Add a 'inner-node' property to WebKitHitTestResult, carrying the
+ DOM node where the hit test happened.
+
+ * tests/testhittestresult.c:
+ (load_status_cb):
+ * webkit/webkithittestresult.cpp:
+ (webkit_hit_test_result_get_property):
+ (webkit_hit_test_result_set_property):
+ (webkit_hit_test_result_class_init):
+ * webkit/webkitprivate.cpp:
+ (WebKit::kit):
+
+2010-06-07 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] gtk_widget_get_window should replace widget->window
+ https://bugs.webkit.org/show_bug.cgi?id=40180
+
+ Replace uses of widget->window with gtk_widget_get_window.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::invalidateContentsAndWindow): Replace widget->window uses.
+ (WebKit::ChromeClient::scroll): Ditto.
+ (WebKit::widgetScreenPosition): Ditto.
+ * WebCoreSupport/DragClientGtk.cpp: Move gtk_widget_get_window define to GtkVersioning.h.
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_popup_menu_handler): Replace widget->window uses.
+ (webkit_web_view_button_press_event): Ditto.
+
+2010-06-04 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Drag gesture can take mouse grab indefinitely
+ https://bugs.webkit.org/show_bug.cgi?id=32840
+
+ Initiate drag events with the current GTK+ event instead of synthesizing
+ an event. Something about synthesized events is causing a drag freeze in
+ certain situations.
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::DragClient::startDrag): Start the drag with the current GTK+ event.
+
+2010-06-03 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60632.
+ http://trac.webkit.org/changeset/60632
+ https://bugs.webkit.org/show_bug.cgi?id=40143
+
+ This change broke the 64-bit bots. (Requested by mrobinson on
+ #webkit).
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::DragClient::DragClient):
+ (WebKit::DragClient::startDrag):
+ * WebCoreSupport/DragClientGtk.h:
+
+2010-06-03 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Drag gesture can take mouse grab indefinitely
+ https://bugs.webkit.org/show_bug.cgi?id=32840
+
+ Start GTK+ drags with the previous mouse button down event instead of
+ synthesizing the event. The synthesized event was not completely valid
+ and froze some drags indefinitely.
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::buttonPressEvent): Added.
+ (WebKit::DragClient::DragClient):
+ Connect to the 'button-press-event' signal of the WebView.
+ (WebKit::DragClient::startDrag):
+ Instead of synthesizing a button press event use the last real one.
+ * WebCoreSupport/DragClientGtk.h:
+ (WebKit::DragClient::setLastButtonPressEvent): Added.
+
+2010-06-01 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Memory Leak: The main resource of page is not free.
+ https://bugs.webkit.org/show_bug.cgi?id=39973
+
+ Fix refcount tracking of the main resource. Patch by Genhua Liu.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidFinishLoading):
+
+2010-06-01 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Fix-up for previous leak fix, the identifier was not always duped.
+
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_add_resource):
+
+2010-06-01 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Plug a small leak.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::assignIdentifierToInitialRequest):
+
+2010-06-01 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Double clicks cause three button press events
+ https://bugs.webkit.org/show_bug.cgi?id=38853
+
+ Handle click counting much like the Windows port. GTK+ only
+ counts triple-clicks natively, so use GTK+ double-click settings
+ to count clicks with even larger click counts. Also filter the
+ extra GDK_BUTTON_PRESS before GDK_{2,3}BUTTON_PRESS events using
+ gdk_event_peek().
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event): Count clicks manually. Filter extra events.
+
+2010-05-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Missing links to documentation of general functions
+ https://bugs.webkit.org/show_bug.cgi?id=39964
+
+ Add global functions section, and move those functions that are
+ currently in WebKitWebView's source file to the bottom, along with
+ the description.
+
+ * docs/webkitgtk-docs.sgml:
+ * docs/webkitgtk-sections.txt:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_dom_document):
+ (webkit_get_default_session):
+
2010-05-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 8a1d48b..5759601 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -336,7 +336,7 @@ void ChromeClient::invalidateWindow(const IntRect&, bool)
void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
{
GdkRectangle rect = updateRect;
- GdkWindow* window = GTK_WIDGET(m_webView)->window;
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(m_webView));
if (window) {
gdk_window_invalidate_rect(window, &rect, FALSE);
@@ -353,7 +353,7 @@ void ChromeClient::invalidateContentsForSlowScroll(const IntRect& updateRect, bo
void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, const IntRect& clipRect)
{
- GdkWindow* window = GTK_WIDGET(m_webView)->window;
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(m_webView));
if (!window)
return;
@@ -391,7 +391,7 @@ static IntPoint widgetScreenPosition(GtkWidget* widget)
IntPoint result(widgetX, widgetY);
int originX, originY;
- gdk_window_get_origin(window->window, &originX, &originY);
+ gdk_window_get_origin(gtk_widget_get_window(window), &originX, &originY);
result.move(originX, originY);
return result;
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index c1e8e74..6c395c7 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -26,17 +26,15 @@
#include "DragController.h"
#include "Element.h"
#include "Frame.h"
+#include "GOwnPtrGtk.h"
#include "GRefPtrGtk.h"
+#include "GtkVersioning.h"
#include "NotImplemented.h"
#include "PasteboardHelper.h"
#include "RenderObject.h"
#include "webkitprivate.h"
#include "webkitwebview.h"
-
#include <gtk/gtk.h>
-#if !GTK_CHECK_VERSION(2, 14, 0)
-#define gtk_widget_get_window(widget) (widget)->window
-#endif
using namespace WebCore;
@@ -75,22 +73,16 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin,
WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
RefPtr<DataObjectGtk> dataObject = clipboardGtk->dataObject();
-
GRefPtr<GtkTargetList> targetList(clipboardGtk->helper()->targetListForDataObject(dataObject.get()));
- GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
- // This will be decremented by gdk_event_free() below.
- event->button.window = static_cast<GdkWindow*>(g_object_ref(gtk_widget_get_window(GTK_WIDGET(m_webView))));
- event->button.time = GDK_CURRENT_TIME;
+ GOwnPtr<GdkEvent> currentEvent(gtk_get_current_event());
- GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, event);
+ GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get());
webView->priv->draggingDataObjects.set(context, dataObject);
if (image)
gtk_drag_set_icon_pixbuf(context, image, eventPos.x() - dragImageOrigin.x(), eventPos.y() - dragImageOrigin.y());
else
gtk_drag_set_icon_default(context);
-
- gdk_event_free(event);
}
DragImageRef DragClient::createDragImageForLink(KURL&, const String&, Frame*)
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index fd2d7ed..021374c 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -235,7 +235,8 @@ void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader,
void FrameLoaderClient::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const ResourceRequest& request)
{
- webkit_web_view_add_resource(getViewFromFrame(m_frame), toString(identifier),
+ GOwnPtr<gchar> identifierString(toString(identifier));
+ webkit_web_view_add_resource(getViewFromFrame(m_frame), identifierString.get(),
WEBKIT_WEB_RESOURCE(g_object_new(WEBKIT_TYPE_WEB_RESOURCE, "uri", request.url().string().utf8().data(), 0)));
}
@@ -930,7 +931,7 @@ void FrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader* loader
return;
if (!coreResource)
- coreResource = loader->mainResource().releaseRef();
+ coreResource = loader->mainResource();
webkit_web_resource_init_with_core_resource(webResource, coreResource.get());
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index 317a058..5e69c31 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -19,6 +19,7 @@
#include "config.h"
#include "InspectorClientGtk.h"
+#include "Frame.h"
#include "webkitwebview.h"
#include "webkitwebinspector.h"
#include "webkitprivate.h"
@@ -38,8 +39,18 @@ static void notifyWebViewDestroyed(WebKitWebView* webView, InspectorFrontendClie
InspectorClient::InspectorClient(WebKitWebView* webView)
: m_inspectedWebView(webView)
+ , m_frontendPage(0)
+ , m_frontendClient(0)
{}
+InspectorClient::~InspectorClient()
+{
+ if (m_frontendClient) {
+ m_frontendClient->disconnectInspectorClient();
+ m_frontendClient = 0;
+ }
+}
+
void InspectorClient::inspectorDestroyed()
{
delete this;
@@ -80,8 +91,14 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
gtk_widget_show(GTK_WIDGET(inspectorWebView));
- Page* inspectorPage = core(inspectorWebView);
- inspectorPage->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClient(m_inspectedWebView, inspectorWebView, webInspector, inspectorPage));
+ m_frontendPage = core(inspectorWebView);
+ m_frontendClient = new InspectorFrontendClient(m_inspectedWebView, inspectorWebView, webInspector, m_frontendPage, this);
+ m_frontendPage->inspectorController()->setInspectorFrontendClient(m_frontendClient);
+}
+
+void InspectorClient::releaseFrontendPage()
+{
+ m_frontendPage = 0;
}
void InspectorClient::highlight(Node* node)
@@ -104,14 +121,34 @@ void InspectorClient::storeSetting(const String& key, const String& value)
notImplemented();
}
+bool InspectorClient::sendMessageToFrontend(const String& message)
+{
+ if (!m_frontendPage)
+ return false;
+
+ Frame* frame = m_frontendPage->mainFrame();
+ if (!frame)
+ return false;
+
+ ScriptController* scriptController = frame->script();
+ if (!scriptController)
+ return false;
+
+ String dispatchToFrontend("WebInspector.dispatchMessageToFrontend(");
+ dispatchToFrontend += message;
+ dispatchToFrontend += ");";
+ scriptController->executeScript(dispatchToFrontend);
+ return true;
+}
bool destroyed = TRUE;
-InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, Page* inspectorPage)
+InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, Page* inspectorPage, InspectorClient* inspectorClient)
: InspectorFrontendClientLocal(core(inspectedWebView)->inspectorController(), inspectorPage)
, m_inspectorWebView(inspectorWebView)
, m_inspectedWebView(inspectedWebView)
, m_webInspector(webInspector)
+ , m_inspectorClient(inspectorClient)
{
g_signal_connect(m_inspectorWebView, "destroy",
G_CALLBACK(notifyWebViewDestroyed), (gpointer)this);
@@ -119,6 +156,10 @@ InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView
InspectorFrontendClient::~InspectorFrontendClient()
{
+ if (m_inspectorClient) {
+ m_inspectorClient->disconnectFrontendClient();
+ m_inspectorClient = 0;
+ }
ASSERT(!m_webInspector);
}
@@ -138,6 +179,9 @@ void InspectorFrontendClient::destroyInspectorWindow()
g_signal_emit_by_name(webInspector, "close-window", &handled);
ASSERT(handled);
+ if (m_inspectorClient)
+ m_inspectorClient->releaseFrontendPage();
+
/* we should now dispose our own reference */
g_object_unref(webInspector);
}
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
index cdb5375..fc9b6d8 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
@@ -42,9 +42,14 @@ namespace WebCore {
namespace WebKit {
+ class InspectorFrontendClient;
+
class InspectorClient : public WebCore::InspectorClient {
public:
InspectorClient(WebKitWebView* webView);
+ ~InspectorClient();
+
+ void disconnectFrontendClient() { m_frontendClient = 0; }
virtual void inspectorDestroyed();
@@ -56,13 +61,21 @@ namespace WebKit {
virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+ virtual bool sendMessageToFrontend(const WebCore::String&);
+
+ void releaseFrontendPage();
+
private:
WebKitWebView* m_inspectedWebView;
+ WebCore::Page* m_frontendPage;
+ InspectorFrontendClient* m_frontendClient;
};
class InspectorFrontendClient : public WebCore::InspectorFrontendClientLocal {
public:
- InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, WebCore::Page* inspectorPage);
+ InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, WebCore::Page* inspectorPage, InspectorClient* inspectorClient);
+
+ void disconnectInspectorClient() { m_inspectorClient = 0; }
void destroyInspectorWindow();
@@ -86,6 +99,7 @@ namespace WebKit {
WebKitWebView* m_inspectorWebView;
WebKitWebView* m_inspectedWebView;
WebKitWebInspector* m_webInspector;
+ InspectorClient* m_inspectorClient;
};
}
diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml
index 6201ca5..c6539af 100644
--- a/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -10,6 +10,11 @@
</bookinfo>
<chapter>
+ <title>Global functions</title>
+ <xi:include href="xml/webkit.xml"/>
+ </chapter>
+
+ <chapter>
<title>Class Overview</title>
<xi:include href="xml/webkitwebview.xml"/>
<xi:include href="xml/webkitwebframe.xml"/>
@@ -30,7 +35,6 @@
<xi:include href="xml/webkitsoupauthdialog.xml"/>
<xi:include href="xml/webkitsecurityorigin.xml"/>
<xi:include href="xml/webkitwebwindowfeatures.xml"/>
- <xi:include href="xml/webkitcachemodel.xml"/>
</chapter>
<chapter>
diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt
index 864b991..0083146 100644
--- a/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -528,6 +528,7 @@ WebKitWebWindowFeaturesPrivate
<SECTION>
<FILE>webkit</FILE>
+<TITLE>Global functions</TITLE>
webkit_init
webkit_get_default_session
webkit_get_default_web_database_quota
@@ -535,6 +536,11 @@ webkit_get_web_database_directory_path
webkit_remove_all_web_databases
webkit_set_default_web_database_quota
webkit_set_web_database_directory_path
+<SUBSECTION CacheModel>
+WebKitCacheModel
+webkit_get_cache_model
+webkit_set_cache_model
+</SUBSECTION>
</SECTION>
<SECTION>
@@ -605,10 +611,3 @@ webkit_major_version
webkit_micro_version
webkit_minor_version
</SECTION>
-
-<SECTION>
-<FILE>webkitcachemodel</FILE>
-WebKitCacheModel
-webkit_get_cache_model
-webkit_set_cache_model
-</SECTION>
diff --git a/WebKit/gtk/tests/testdomnode.c b/WebKit/gtk/tests/testdomnode.c
new file mode 100644
index 0000000..1050587
--- /dev/null
+++ b/WebKit/gtk/tests/testdomnode.c
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+
+#include "test_utils.h"
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gtk/gtk.h>
+#include <webkit/webkit.h>
+
+#if GLIB_CHECK_VERSION(2, 16, 0) && GTK_CHECK_VERSION(2, 14, 0)
+
+#define HTML_DOCUMENT_HIERARCHY_NAVIGATION "<html><head><title>This is the title</title></head><body><p>1</p><p>2</p><p>3</p></body></html>"
+
+typedef struct {
+ GtkWidget* webView;
+ GMainLoop* loop;
+} DomNodeFixture;
+
+static gboolean finish_loading(DomNodeFixture* fixture)
+{
+ if (g_main_loop_is_running(fixture->loop))
+ g_main_loop_quit(fixture->loop);
+
+ return FALSE;
+}
+
+static void dom_node_fixture_setup(DomNodeFixture* fixture, gconstpointer data)
+{
+ fixture->loop = g_main_loop_new(NULL, TRUE);
+ fixture->webView = webkit_web_view_new();
+ g_object_ref_sink(fixture->webView);
+
+ if (data != NULL)
+ webkit_web_view_load_string(WEBKIT_WEB_VIEW(fixture->webView), (const char*)data, NULL, NULL, NULL);
+
+ g_idle_add((GSourceFunc)finish_loading, fixture);
+ g_main_loop_run(fixture->loop);
+}
+
+static void dom_node_fixture_teardown(DomNodeFixture* fixture, gconstpointer data)
+{
+ g_object_unref(fixture->webView);
+ g_main_loop_unref(fixture->loop);
+}
+
+static void test_dom_node_hierarchy_navigation(DomNodeFixture* fixture, gconstpointer data)
+{
+ WebKitDOMDocument* document;
+ WebKitDOMHTMLHeadElement* head;
+ WebKitDOMHTMLBodyElement* body;
+ WebKitDOMNodeList* list;
+ WebKitDOMNode* ptr;
+ gulong i, length;
+
+ document = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(fixture->webView));
+ g_assert(document);
+ g_assert(WEBKIT_DOM_IS_DOCUMENT(document));
+ head = webkit_dom_document_get_head(document);
+ g_assert(head);
+ g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(head));
+
+ /* Title, head's child */
+ g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(head)));
+ list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(head));
+ g_assert_cmpint(webkit_dom_node_list_get_length(list), ==, 1);
+ ptr = webkit_dom_node_list_item(list, 0);
+ g_assert(ptr);
+ g_assert(WEBKIT_DOM_IS_HTML_TITLE_ELEMENT(ptr));
+
+ /* Body, Head sibling */
+ ptr = webkit_dom_node_get_next_sibling(WEBKIT_DOM_NODE(head));
+ g_assert(ptr);
+ body = WEBKIT_DOM_HTML_BODY_ELEMENT(ptr);
+ g_assert(WEBKIT_DOM_IS_HTML_BODY_ELEMENT(body));
+
+ /* There is no third sibling */
+ ptr = webkit_dom_node_get_next_sibling(ptr);
+ g_assert(ptr == NULL);
+
+ /* Body's previous sibling is Head */
+ ptr = webkit_dom_node_get_previous_sibling(WEBKIT_DOM_NODE(body));
+ g_assert(ptr);
+ g_assert(WEBKIT_DOM_IS_HTML_HEAD_ELEMENT(ptr));
+
+ /* Body has 3 children */
+ g_assert(webkit_dom_node_has_child_nodes(WEBKIT_DOM_NODE(body)));
+ list = webkit_dom_node_get_child_nodes(WEBKIT_DOM_NODE(body));
+ length = webkit_dom_node_list_get_length(list);
+ g_assert_cmpint(length, ==, 3);
+
+ /* The three of them are P tags */
+ for (i = 0; i < length; i++) {
+ ptr = webkit_dom_node_list_item(list, i);
+ g_assert(ptr);
+ g_assert(WEBKIT_DOM_IS_HTML_PARAGRAPH_ELEMENT(ptr));
+ }
+
+ /* Go backwards */
+ for (i = 0; ptr; ptr = webkit_dom_node_get_previous_sibling(ptr), i++)
+ /* Nothing */;
+
+ g_assert_cmpint(i, ==, 3);
+}
+
+int main(int argc, char** argv)
+{
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+
+ gtk_test_init(&argc, &argv, NULL);
+
+ g_test_bug_base("https://bugs.webkit.org/");
+
+ g_test_add("/webkit/domnode/test_hierarchy_navigation",
+ DomNodeFixture, HTML_DOCUMENT_HIERARCHY_NAVIGATION,
+ dom_node_fixture_setup,
+ test_dom_node_hierarchy_navigation,
+ dom_node_fixture_teardown);
+
+ return g_test_run();
+}
+
+#else
+int main(int argc, char** argv)
+{
+ g_critical("You will need at least glib-2.16.0 and gtk-2.14.0 to run the unit tests. Doing nothing now.");
+ return 0;
+}
+
+#endif
diff --git a/WebKit/gtk/tests/testhittestresult.c b/WebKit/gtk/tests/testhittestresult.c
index defda7a..89fe95c 100644
--- a/WebKit/gtk/tests/testhittestresult.c
+++ b/WebKit/gtk/tests/testhittestresult.c
@@ -82,6 +82,8 @@ load_status_cb(WebKitWebView* webView,
WebKitHitTestResult* result;
guint context;
GdkEventButton event;
+ WebKitDOMNode* node;
+
event.type = GDK_BUTTON_PRESS;
/* Close enough to 0,0 */
event.x = 5;
@@ -89,8 +91,28 @@ load_status_cb(WebKitWebView* webView,
result = webkit_web_view_get_hit_test_result(webView, &event);
g_assert(result);
+
g_object_get(result, "context", &context, NULL);
g_assert(context & info->flag);
+
+ g_object_get(result, "inner-node", &node, NULL);
+ g_assert(node);
+ g_assert(WEBKIT_DOM_IS_NODE(node));
+ /* We can only test these node types at the moment. In the
+ * input case there seems to be an extra layer with a DIV on
+ * top of the input, which gets assigned to the inner-node.
+ * tag */
+ if (info->flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT)
+ g_assert(WEBKIT_DOM_IS_HTML_HTML_ELEMENT(node));
+ else if (info->flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE)
+ g_assert(WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT(node));
+ else if (info->flag == WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
+ /* The hit test will give us the inner text node, we want
+ * the A tag */
+ WebKitDOMNode* parent = webkit_dom_node_get_parent_node(node);
+ g_assert(WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT(parent));
+ }
+
g_object_unref(result);
g_main_loop_quit(loop);
}
diff --git a/WebKit/gtk/webkit/webkithittestresult.cpp b/WebKit/gtk/webkit/webkithittestresult.cpp
index 1f8dce6..862d94a 100644
--- a/WebKit/gtk/webkit/webkithittestresult.cpp
+++ b/WebKit/gtk/webkit/webkithittestresult.cpp
@@ -22,6 +22,7 @@
#include "webkithittestresult.h"
#include "GOwnPtr.h"
+#include "WebKitDOMNode.h"
#include "webkitenumtypes.h"
#include "webkitprivate.h"
#include <wtf/text/CString.h>
@@ -43,6 +44,7 @@ struct _WebKitHitTestResultPrivate {
char* linkURI;
char* imageURI;
char* mediaURI;
+ WebKitDOMNode* innerNode;
};
#define WEBKIT_HIT_TEST_RESULT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResultPrivate))
@@ -53,7 +55,8 @@ enum {
PROP_CONTEXT,
PROP_LINK_URI,
PROP_IMAGE_URI,
- PROP_MEDIA_URI
+ PROP_MEDIA_URI,
+ PROP_INNER_NODE
};
static void webkit_hit_test_result_finalize(GObject* object)
@@ -86,6 +89,9 @@ static void webkit_hit_test_result_get_property(GObject* object, guint propertyI
case PROP_MEDIA_URI:
g_value_set_string(value, priv->mediaURI);
break;
+ case PROP_INNER_NODE:
+ g_value_set_object(value, priv->innerNode);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyID, pspec);
}
@@ -112,6 +118,9 @@ static void webkit_hit_test_result_set_property(GObject* object, guint propertyI
g_free (priv->mediaURI);
priv->mediaURI = g_value_dup_string(value);
break;
+ case PROP_INNER_NODE:
+ priv->innerNode = static_cast<WebKitDOMNode*>(g_value_get_object(value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyID, pspec);
}
@@ -184,6 +193,28 @@ static void webkit_hit_test_result_class_init(WebKitHitTestResultClass* webHitTe
NULL,
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));
+ /**
+ * WebKitHitTestResult:inner-node:
+ *
+ * The DOM node at the coordinates where the hit test
+ * happened. Keep in mind that the node might not be
+ * representative of the information given in the context
+ * property, since WebKit uses a series of heuristics to figure
+ * out that information. One common example is inner-node having
+ * the text node inside the anchor (<a>) tag; WebKit knows the
+ * whole context and will put WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK
+ * in the 'context' property, but the user might be confused by
+ * the lack of any link tag in 'inner-node'.
+ *
+ * Since: 1.3.2
+ */
+ g_object_class_install_property(objectClass, PROP_INNER_NODE,
+ g_param_spec_object("inner-node",
+ _("Inner node"),
+ _("The inner DOM node associated with the hit test result."),
+ WEBKIT_TYPE_DOM_NODE,
+ static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
g_type_class_add_private(webHitTestResultClass, sizeof(WebKitHitTestResultPrivate));
}
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index d274708..41de76e 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -41,6 +41,7 @@
#include "ResourceResponse.h"
#include "SecurityOrigin.h"
#include "TextEncodingRegistry.h"
+#include "WebKitDOMBinding.h"
#include "webkitnetworkresponse.h"
#include "webkitsoupauthdialog.h"
#include <libintl.h>
@@ -129,9 +130,9 @@ WebCore::ResourceResponse core(WebKitNetworkResponse* response)
return ResourceResponse();
}
-WebCore::EditingBehavior core(WebKitEditingBehavior type)
+WebCore::EditingBehaviorType core(WebKitEditingBehavior type)
{
- return (WebCore::EditingBehavior)type;
+ return (WebCore::EditingBehaviorType)type;
}
WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
@@ -140,6 +141,7 @@ WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
GOwnPtr<char> linkURI(0);
GOwnPtr<char> imageURI(0);
GOwnPtr<char> mediaURI(0);
+ WebKitDOMNode* node = 0;
if (!result.absoluteLinkURL().isEmpty()) {
context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK;
@@ -162,12 +164,16 @@ WebKitHitTestResult* kit(const WebCore::HitTestResult& result)
if (result.isContentEditable())
context |= WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+ if (result.innerNonSharedNode())
+ node = static_cast<WebKitDOMNode*>(kit(result.innerNonSharedNode()));
+
return WEBKIT_HIT_TEST_RESULT(g_object_new(WEBKIT_TYPE_HIT_TEST_RESULT,
- "link-uri", linkURI.get(),
- "image-uri", imageURI.get(),
- "media-uri", mediaURI.get(),
- "context", context,
- NULL));
+ "link-uri", linkURI.get(),
+ "image-uri", imageURI.get(),
+ "media-uri", mediaURI.get(),
+ "context", context,
+ "inner-node", node,
+ NULL));
}
PasteboardHelperGtk* pasteboardHelperInstance()
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 057b0e5..44ffc1e 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -95,7 +95,7 @@ namespace WebKit {
WebCore::ResourceResponse core(WebKitNetworkResponse* response);
- WebCore::EditingBehavior core(WebKitEditingBehavior type);
+ WebCore::EditingBehaviorType core(WebKitEditingBehavior type);
WebKitSecurityOrigin* kit(WebCore::SecurityOrigin*);
WebCore::SecurityOrigin* core(WebKitSecurityOrigin*);
@@ -241,7 +241,7 @@ extern "C" {
webkit_web_view_request_download(WebKitWebView* web_view, WebKitNetworkRequest* request, const WebCore::ResourceResponse& response = WebCore::ResourceResponse(), WebCore::ResourceHandle* handle = 0);
void
- webkit_web_view_add_resource(WebKitWebView*, char*, WebKitWebResource*);
+ webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
WebKitWebResource*
webkit_web_view_get_resource(WebKitWebView*, char*);
diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp
index 820b20f..2dc9315 100644
--- a/WebKit/gtk/webkit/webkitwebinspector.cpp
+++ b/WebKit/gtk/webkit/webkitwebinspector.cpp
@@ -30,6 +30,7 @@
#include "InspectorClientGtk.h"
#include "IntPoint.h"
#include "Page.h"
+#include "RenderLayer.h"
#include "RenderView.h"
#include "webkitmarshal.h"
#include "webkitprivate.h"
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 2c95558..6744732 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -63,6 +63,7 @@
#include "FrameView.h"
#include <glib/gi18n-lib.h>
#include <GOwnPtr.h>
+#include <GOwnPtrGtk.h>
#include "GraphicsContext.h"
#include "GtkVersioning.h"
#include "HitTestRequest.h"
@@ -370,7 +371,7 @@ static gboolean webkit_web_view_popup_menu_handler(GtkWidget* widget)
}
int x, y;
- gdk_window_get_origin(GTK_WIDGET(view->hostWindow()->platformPageClient())->window, &x, &y);
+ gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(view->hostWindow()->platformPageClient())), &x, &y);
// FIXME: The IntSize(0, -1) is a hack to get the hit-testing to result in the selected element.
// Ideally we'd have the position of a context menu event be separate from its target node.
@@ -588,11 +589,52 @@ static gboolean webkit_web_view_key_release_event(GtkWidget* widget, GdkEventKey
static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventButton* event)
{
+ // Eventually it may make sense for these to be per-view and per-device,
+ // but at this time the implementation matches the Windows port.
+ static int currentClickCount = 1;
+ static IntPoint previousPoint;
+ static guint previousButton;
+ static guint32 previousTime;
+
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
// FIXME: need to keep track of subframe focus for key events
gtk_widget_grab_focus(widget);
+ // For double and triple clicks GDK sends both a normal button press event
+ // and a specific type (like GDK_2BUTTON_PRESS). If we detect a special press
+ // coming up, ignore this event as it certainly generated the double or triple
+ // click. The consequence of not eating this event is two DOM button press events
+ // are generated.
+ GOwnPtr<GdkEvent> nextEvent(gdk_event_peek());
+ if (nextEvent && (nextEvent->any.type == GDK_2BUTTON_PRESS || nextEvent->any.type == GDK_3BUTTON_PRESS))
+ return TRUE;
+
+ gint doubleClickDistance = 250;
+ gint doubleClickTime = 5;
+ GtkSettings* settings = gtk_settings_get_for_screen(gdk_drawable_get_screen(gtk_widget_get_window(widget)));
+ g_object_get(settings,
+ "gtk-double-click-distance", &doubleClickDistance,
+ "gtk-double-click-time", &doubleClickTime, NULL);
+
+ // GTK+ only counts up to triple clicks, but WebCore wants to know about
+ // quadruple clicks, quintuple clicks, ad infinitum. Here, we replicate the
+ // GDK logic for counting clicks.
+ if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
+ || ((abs(event->x - previousPoint.x()) < doubleClickDistance)
+ && (abs(event->y - previousPoint.y()) < doubleClickDistance)
+ && (event->time - previousTime < static_cast<guint>(doubleClickTime))
+ && (event->button == previousButton)))
+ currentClickCount++;
+ else
+ currentClickCount = 1;
+
+ PlatformMouseEvent platformEvent(event);
+ platformEvent.setClickCount(currentClickCount);
+ previousPoint = platformEvent.pos();
+ previousButton = event->button;
+ previousTime = event->time;
+
if (event->button == 3)
return webkit_web_view_forward_context_menu_event(webView, PlatformMouseEvent(event));
@@ -600,7 +642,8 @@ static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventBu
if (!frame->view())
return FALSE;
- gboolean result = frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(event));
+
+ gboolean result = frame->eventHandler()->handleMousePressEvent(platformEvent);
#if PLATFORM(X11)
/* Copy selection to the X11 selection clipboard */
@@ -2695,7 +2738,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows);
settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
- settings->setEditingBehavior(core(editingBehavior));
+ settings->setEditingBehaviorType(core(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
settings->setAllowFileAccessFromFileURLs(enableFileAccessFromFileURI);
settings->setDOMPasteAllowed(enableDOMPaste);
@@ -2796,7 +2839,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->setEditingBehavior(core(static_cast<WebKitEditingBehavior>(g_value_get_enum(&value))));
+ settings->setEditingBehaviorType(core(static_cast<WebKitEditingBehavior>(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"))
@@ -3892,24 +3935,6 @@ void webkit_web_view_set_full_content_zoom(WebKitWebView* webView, gboolean zoom
}
/**
- * 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: the default #SoupSession
- *
- * Since: 1.1.1
- */
-SoupSession* webkit_get_default_session ()
-{
- webkit_init();
- return ResourceHandle::defaultSession();
-}
-
-/**
* webkit_web_view_get_load_status:
* @web_view: a #WebKitWebView
*
@@ -4152,7 +4177,7 @@ gboolean webkit_web_view_get_view_source_mode (WebKitWebView* webView)
}
// Internal subresource management
-void webkit_web_view_add_resource(WebKitWebView* webView, char* identifier, WebKitWebResource* webResource)
+void webkit_web_view_add_resource(WebKitWebView* webView, const char* identifier, WebKitWebResource* webResource)
{
WebKitWebViewPrivate* priv = webView->priv;
@@ -4162,7 +4187,7 @@ void webkit_web_view_add_resource(WebKitWebView* webView, char* identifier, WebK
return;
}
- g_hash_table_insert(priv->subResources, identifier, webResource);
+ g_hash_table_insert(priv->subResources, g_strdup(identifier), webResource);
}
WebKitWebResource* webkit_web_view_get_resource(WebKitWebView* webView, char* identifier)
@@ -4295,6 +4320,57 @@ G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView)
}
/**
+ * webkit_web_view_get_dom_document:
+ * @webView: a #WebKitWebView
+ *
+ * Returns: the #WebKitDOMDocument currently loaded in the @webView
+ *
+ * Since: 1.3.1
+ **/
+WebKitDOMDocument*
+webkit_web_view_get_dom_document(WebKitWebView* webView)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
+
+ Frame* coreFrame = core(webView)->mainFrame();
+ if (!coreFrame)
+ return 0;
+
+ Document* doc = coreFrame->document();
+ if (!doc)
+ return 0;
+
+ return static_cast<WebKitDOMDocument*>(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: 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
*
@@ -4375,26 +4451,3 @@ WebKitCacheModel webkit_get_cache_model()
return cacheModel;
}
-/**
- * webkit_web_view_get_dom_document:
- * @webView: a #WebKitWebView
- *
- * Returns: the #WebKitDOMDocument currently loaded in the @webView
- *
- * Since: 1.3.1
- **/
-WebKitDOMDocument*
-webkit_web_view_get_dom_document(WebKitWebView* webView)
-{
- g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
-
- Frame* coreFrame = core(webView)->mainFrame();
- if (!coreFrame)
- return 0;
-
- Document* doc = coreFrame->document();
- if (!doc)
- return 0;
-
- return static_cast<WebKitDOMDocument*>(kit(doc));
-}
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index 35ad98a..d71c5e4 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,45 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientHaiku.cpp:
+ (WebCore::InspectorClientHaiku::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientHaiku.h:
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/InspectorClientHaiku.cpp:
+ * WebCoreSupport/InspectorClientHaiku.h:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientHaiku.cpp:
+ (WebCore::InspectorClientHaiku::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientHaiku.h:
+
2010-05-31 Lyon Chen <liachen@rim.com>
Reviewed by Kent Tamura.
diff --git a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp
index 59232e9..883fcd3 100644
--- a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.cpp
@@ -67,5 +67,11 @@ void InspectorClientHaiku::storeSetting(const String& key, const String& value)
notImplemented();
}
+bool InspectorClientHaiku::sendMessageToFrontend(const String&)
+{
+ notImplemented();
+ return false;
+}
+
} // namespace WebCore
diff --git a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h
index d427670..3828d04 100644
--- a/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/InspectorClientHaiku.h
@@ -49,6 +49,8 @@ namespace WebCore {
virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+
+ virtual bool sendMessageToFrontend(const WebCore::String&);
};
} // namespace WebCore
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 7d88fed..c6151ad 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,187 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+
+2010-06-10 David Hyatt <hyatt@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40441, back out the original fix for 29601, since it has broken continuous
+ wheel delta values.
+
+ * WebView/WebDynamicScrollBarsView.mm:
+ (-[WebDynamicScrollBarsView scrollWheel:]):
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+
+2010-06-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/8072136> REGRESSION (r56051): Inspect Element context menu does nothing in applications linked against 10.4 SDK
+
+ * WebCoreSupport/WebContextMenuClient.mm:
+ (fixMenusReceivedFromOldClients): Fix up the tag on the Inspect Element menu item. This ensures that even if the
+ context menu layout doesn't match our expectations that the menu item will continue to trigger the web inspector.
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * WebView/WebFrame.mm:
+ (core):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-06 MORITA Hajime <morrita@google.com>
+
+ Unreviewd, follow up to r60820
+
+ https://bugs.webkit.org/show_bug.cgi?id=40219
+ [Mac] ENABLE_METER_TAG should be enabled
+
+ Added ENABLE_METER_TAG.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-06 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 40214 - Clean up error construction / throwing in JSC.
+
+ The one egregious insanity here is that creating an error requires
+ a VM-entry-esqe-host call (the string argument is wrapped as a JS
+ object & pushed on the RegisterFile, then unwrapped back to a
+ UString). Changing this also means you only require a global
+ object, not an ExecState, to create an error.
+
+ The methods to create error objects are also parameterized
+ requiring a switch on the type, which can be made cleaner and
+ faster by moving to a separate method per error type. Code to add
+ divot information to error had been duplicated, and is coalesced
+ back into a single function.
+
+ Convenience methods added to create & throw type & syntax error
+ with a default error message, since this is a common case.
+
+ Also, errors are currently thrown either using
+ "throwError(exec, error)" or "exec->setException(error)" - unify
+ on the former, since this is more commonly used. Add
+ "throwVMError(exec, error)" equivalents, as a convenience for
+ cases where the result was being wrapped in "JSValue::encode(...)".
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
+ * Plugins/Hosted/ProxyInstance.mm:
+ (WebKit::ProxyInstance::invokeMethod):
+
+2010-06-02 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 40094 - The return type of NativeFunction should be EncodedJSValue
+ On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::invoke):
+
+2010-06-02 Sterling Swigart <sswigart@google.com>
+
+ Reviewed by David Levin.
+
+ Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
+ https://bugs.webkit.org/show_bug.cgi?id=39906
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-06-01 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Add a preference for paginating during layout (the new model for computing page breaks).
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences paginateDuringLayoutEnabled]):
+ (-[WebPreferences setPaginateDuringLayoutEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-06-01 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40025
+ <rdar://problem/8046273> All Flash content crashes after installing CS5 Design Premium.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView supportsSnapshotting]): Do not support snapshotting Flash 10.1 if
+ the version is less than 10.1.53.60.
+
+2010-06-01 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39434
+ REGRESSION (r59811): Geolocation callbacks cannot be created
+
+ Removing unused WebGeolocationMock.
+
+ * WebCoreSupport/WebGeolocationMock.mm: Removed.
+ * WebCoreSupport/WebGeolocationMockPrivate.h: Removed.
+ * WebKit.exp:
+
2010-05-30 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index c64d94c..5b52793 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -55,9 +55,11 @@ ENABLE_FILE_READER = ENABLE_FILE_READER;
ENABLE_FILE_WRITER = ;
ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
+ENABLE_IMAGE_RESIZER = ;
ENABLE_INDEXED_DATABASE = ;
ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
ENABLE_MATHML = ;
+ENABLE_METER_TAG = ENABLE_METER_TAG;
ENABLE_NOTIFICATIONS = ;
ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
@@ -79,4 +81,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB_SLICE) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_READER) $(ENABLE_FILE_WRITER) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 62c0f38..7391c1e 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -47,6 +47,7 @@ namespace JSC {
class Instance;
class RootObject;
}
+ class ArgList;
}
@class WebHostedNetscapePluginView;
@class WebFrame;
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index 8b0a2bf..9c90dae 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -901,7 +901,7 @@ bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& me
JSLock lock(SilenceAssertionsOnly);
JSValue function = object->get(exec, methodName);
CallData callData;
- CallType callType = function.getCallData(callData);
+ CallType callType = getCallData(function, callData);
if (callType == CallTypeNone)
return false;
@@ -1659,7 +1659,7 @@ void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec
{
JSLock lock(SilenceAssertionsOnly);
- throwError(exec, GeneralError, stringToUString(globalExceptionString()));
+ throwError(exec, createError(exec, stringToUString(globalExceptionString())));
}
globalExceptionString() = String();
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index b9a674d..b3799ca 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -199,7 +199,7 @@ JSValue ProxyInstance::getMethod(JSC::ExecState* exec, const JSC::Identifier& pr
JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod)
{
if (!asObject(runtimeMethod)->inherits(&ProxyRuntimeMethod::s_info))
- return throwError(exec, TypeError, "Attempt to invoke non-plug-in method on plug-in object.");
+ return throwError(exec, createTypeError(exec, "Attempt to invoke non-plug-in method on plug-in object."));
const MethodList& methodList = *runtimeMethod->methods();
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index acd5152..a75251e 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -584,8 +584,14 @@ String WebHaltablePlugin::pluginName() const
// Flash has a bogus Info.plist entry for CFBundleVersionString, so use CFBundleShortVersionString.
NSString *versionString = [pluginBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
- // Flash 10.1d51 has a crashing bug if sent a drawRect event when using the CA rendering model: <rdar://problem/7739922>
- return ![versionString isEqual:@"10.1.51.95"];
+
+ static const NSString *flash10dotOnePrefix = @"10.1";
+ if (![versionString hasPrefix:flash10dotOnePrefix])
+ return YES;
+
+ // Some prerelease versions of Flash 10.1 crash when sent a drawRect event using the CA drawing model: <rdar://problem/7739922>
+ static const CFStringRef knownGoodFlash10dot1Release = CFSTR("10.1.53.60");
+ return CFStringCompare((CFStringRef)versionString, knownGoodFlash10dot1Release, kCFCompareNumerically) != kCFCompareLessThan;
}
- (BOOL)hasBeenHalted
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
index 639f3c1..e4e069a 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
@@ -213,6 +213,8 @@ static void fixMenusReceivedFromOldClients(NSMutableArray *newMenuItems, NSMutab
modernTag = WebMenuItemTagLeftToRight;
else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]])
modernTag = WebMenuItemTagRightToLeft;
+ else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagInspectElement]])
+ modernTag = WebMenuItemTagInspectElement;
else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]])
modernTag = WebMenuItemTagCorrectSpellingAutomatically;
else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]])
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
deleted file mode 100644
index 1bdb616..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "WebGeolocationMockPrivate.h"
-
-#import <WebCore/GeolocationServiceMock.h>
-#import <WebCore/Geoposition.h>
-#import <WebCore/PositionError.h>
-#import <wtf/CurrentTime.h>
-
-
-using namespace WebCore;
-using namespace WTF;
-
-@implementation WebGeolocationMock
-
-+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy
-{
-#if ENABLE(GEOLOCATION)
- RefPtr<Coordinates> coordinates = Coordinates::create(latitude,
- longitude,
- false, 0.0, // altitude
- accuracy,
- false, 0.0, // altitudeAccuracy
- false, 0.0, // heading
- false, 0.0); // speed
- RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0);
- GeolocationServiceMock::setPosition(position.release());
-#endif
-}
-
-+ (void)setError:(int)code:(NSString *)message
-{
-#if ENABLE(GEOLOCATION)
- PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
- RefPtr<PositionError> error = PositionError::create(codeEnum, message);
- GeolocationServiceMock::setError(error.release());
-#endif
-}
-
-@end
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h b/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h
deleted file mode 100644
index 28895f2..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocationMockPrivate.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface WebGeolocationMock : NSObject {
-}
-
-+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy;
-+ (void)setError:(int)code:(NSString *)message;
-@end
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
index ee81b25..bd52954 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h
@@ -42,6 +42,12 @@ class WebNodeHighlighter;
class WebView;
#endif
+namespace WebCore {
+
+class Page;
+
+}
+
class WebInspectorClient : public WebCore::InspectorClient {
public:
WebInspectorClient(WebView *);
@@ -56,26 +62,32 @@ public:
virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+ virtual bool sendMessageToFrontend(const WebCore::String&);
+
+ void releaseFrontendPage();
+
private:
WebView *m_webView;
RetainPtr<WebNodeHighlighter> m_highlighter;
+ WebCore::Page* m_frontendPage;
};
+
class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal {
public:
WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*);
virtual void frontendLoaded();
-
+
virtual WebCore::String localizedStringsURL();
virtual WebCore::String hiddenPanels();
-
+
virtual void bringToFront();
virtual void closeWindow();
-
+
virtual void attachWindow();
virtual void detachWindow();
-
+
virtual void setAttachedWindowHeight(unsigned height);
virtual void inspectedURLChanged(const WebCore::String& newURL);
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index 661b0d2..d59109e 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -50,6 +50,7 @@ using namespace WebCore;
WebView *_inspectedWebView;
WebView *_webView;
WebInspectorFrontendClient* _frontendClient;
+ WebInspectorClient* _inspectorClient;
BOOL _attachedToInspectedWebView;
BOOL _shouldAttach;
BOOL _visible;
@@ -61,6 +62,7 @@ using namespace WebCore;
- (void)detach;
- (BOOL)attached;
- (void)setFrontendClient:(WebInspectorFrontendClient*)frontendClient;
+- (void)setInspectorClient:(WebInspectorClient*)inspectorClient;
- (void)setAttachedWindowHeight:(unsigned)height;
- (void)destroyInspectorView;
@end
@@ -83,6 +85,7 @@ using namespace WebCore;
WebInspectorClient::WebInspectorClient(WebView *webView)
: m_webView(webView)
, m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView])
+, m_frontendPage(0)
{
}
@@ -94,9 +97,9 @@ void WebInspectorClient::inspectorDestroyed()
void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController)
{
RetainPtr<WebInspectorWindowController> windowController(AdoptNS, [[WebInspectorWindowController alloc] initWithInspectedWebView:m_webView]);
- Page* frontendPage = core([windowController.get() webView]);
-
- frontendPage->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, frontendPage));
+ [windowController.get() setInspectorClient:this];
+ m_frontendPage = core([windowController.get() webView]);
+ m_frontendPage->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_webView, windowController.get(), inspectorController, m_frontendPage));
}
void WebInspectorClient::highlight(Node* node)
@@ -407,6 +410,11 @@ void WebInspectorFrontendClient::updateWindowTitle() const
_frontendClient = frontendClient;
}
+- (void)setInspectorClient:(WebInspectorClient*)inspectorClient
+{
+ _inspectorClient = inspectorClient;
+}
+
- (void)setAttachedWindowHeight:(unsigned)height
{
if (!_attachedToInspectedWebView)
@@ -439,6 +447,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
if (Page* inspectedPage = [_inspectedWebView page])
inspectedPage->inspectorController()->disconnectFrontend();
+ _inspectorClient->releaseFrontendPage();
+
[_webView close];
}
diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp
index d14d805..b2ddb18 100644
--- a/WebKit/mac/WebKit.exp
+++ b/WebKit/mac/WebKit.exp
@@ -12,7 +12,6 @@
.objc_class_name_WebFormDelegate
.objc_class_name_WebFrame
.objc_class_name_WebFrameView
-.objc_class_name_WebGeolocationMock
.objc_class_name_WebGeolocationPosition
.objc_class_name_WebHTMLRepresentation
.objc_class_name_WebHTMLView
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index 2041ac0..86090be 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -470,10 +470,8 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
{
float deltaX;
float deltaY;
- float wheelTicksX;
- float wheelTicksY;
BOOL isContinuous;
- WKGetWheelEventDeltas(event, &deltaX, &deltaY, &wheelTicksX, &wheelTicksY, &isContinuous);
+ WKGetWheelEventDeltas(event, &deltaX, &deltaY, &isContinuous);
BOOL isLatchingEvent = WKIsLatchingWheelEvent(event);
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 999f177..7c59615 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -196,7 +196,7 @@ EditableLinkBehavior core(WebKitEditableLinkBehavior editableLinkBehavior)
return EditableLinkDefaultBehavior;
}
-WebCore::EditingBehavior core(WebKitEditingBehavior behavior)
+WebCore::EditingBehaviorType core(WebKitEditingBehavior behavior)
{
switch (behavior) {
case WebKitEditingMacBehavior:
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 9b2248a..586b4c3 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -71,7 +71,7 @@ WebView *kit(WebCore::Page*);
WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior);
WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior);
-WebCore::EditingBehavior core(WebKitEditingBehavior);
+WebCore::EditingBehaviorType core(WebKitEditingBehavior);
WebView *getWebView(WebFrame *webFrame);
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index ba4df8f..c38b395 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -94,6 +94,7 @@
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
#define WebKitHTML5ParserEnabledPreferenceKey @"WebKitHTML5ParserEnabled"
+#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index ac98282..36aef1f 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -1248,6 +1248,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:flag forKey:WebKitHTML5ParserEnabledPreferenceKey];
}
+- (BOOL)paginateDuringLayoutEnabled
+{
+ return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
+}
+
+- (void)setPaginateDuringLayoutEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
+}
+
- (WebKitEditingBehavior)editingBehavior
{
return static_cast<WebKitEditingBehavior>([self _integerValueForKey:WebKitEditingBehaviorPreferenceKey]);
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 0031860..c9a89ee 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -178,6 +178,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)html5ParserEnabled;
- (void)setHTML5ParserEnabled:(BOOL)flag;
+- (BOOL)paginateDuringLayoutEnabled;
+- (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
+
- (BOOL)usesProxiedOpenPanel;
- (void)setUsesProxiedOpenPanel:(BOOL)enabled;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 97c799b..0023509 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1369,7 +1369,7 @@ static bool fastDocumentTeardownEnabled()
settings->setTextAreasAreResizable([preferences textAreasAreResizable]);
settings->setShrinksStandaloneImagesToFit([preferences shrinksStandaloneImagesToFit]);
settings->setEditableLinkBehavior(core([preferences editableLinkBehavior]));
- settings->setEditingBehavior(core([preferences editingBehavior]));
+ settings->setEditingBehaviorType(core([preferences editingBehavior]));
settings->setTextDirectionSubmenuInclusionBehavior(core([preferences textDirectionSubmenuInclusionBehavior]));
settings->setDOMPasteAllowed([preferences isDOMPasteAllowed]);
settings->setUsesPageCache([self usesPageCache]);
@@ -1408,6 +1408,7 @@ static bool fastDocumentTeardownEnabled()
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
settings->setHTML5ParserEnabled([preferences html5ParserEnabled]);
+ settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
}
static inline IMP getMethod(id o, SEL s)
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 7a28f83..3eba058 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -48,6 +48,7 @@
#include "PlatformWheelEvent.h"
#include "PrintContext.h"
#include "PutPropertySlot.h"
+#include "RenderLayer.h"
#include "RenderTreeAsText.h"
#include "RenderView.h"
#include "ResourceRequest.h"
@@ -475,7 +476,12 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
JSC::JSLock lock(JSC::SilenceAssertionsOnly);
JSDOMWindow* window = toJSDOMWindow(d->frame, mainThreadNormalWorld());
- JSC::Bindings::RootObject* root = d->frame->script()->bindingRootObject();
+ JSC::Bindings::RootObject* root;
+ if (ownership == QScriptEngine::QtOwnership)
+ root = d->frame->script()->cacheableBindingRootObject();
+ else
+ root = d->frame->script()->bindingRootObject();
+
if (!window) {
qDebug() << "Warning: couldn't get window object";
return;
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index 06e6cfa..0147f92 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -555,3 +555,8 @@ QWebPagePrivate* QWebHistoryPrivate::page()
{
return QWebFramePrivate::kit(lst->page()->mainFrame())->page()->handle();
}
+
+WebCore::HistoryItem* QWebHistoryItemPrivate::core(QWebHistoryItem* q)
+{
+ return q->d->item;
+}
diff --git a/WebKit/qt/Api/qwebhistory.h b/WebKit/qt/Api/qwebhistory.h
index cce4553..3456784 100644
--- a/WebKit/qt/Api/qwebhistory.h
+++ b/WebKit/qt/Api/qwebhistory.h
@@ -61,6 +61,7 @@ private:
friend class QWebPage;
friend class WebCore::FrameLoaderClientQt;
friend class QWebHistoryItemPrivate;
+ friend class DumpRenderTreeSupportQt;
//friend QDataStream & operator<<(QDataStream& out,const QWebHistoryItem& hist);
//friend QDataStream & operator>>(QDataStream& in,QWebHistoryItem& hist);
QExplicitlySharedDataPointer<QWebHistoryItemPrivate> d;
diff --git a/WebKit/qt/Api/qwebhistory_p.h b/WebKit/qt/Api/qwebhistory_p.h
index a6682cd..c9ff91b 100644
--- a/WebKit/qt/Api/qwebhistory_p.h
+++ b/WebKit/qt/Api/qwebhistory_p.h
@@ -45,6 +45,8 @@ public:
item->deref();
}
+ static WebCore::HistoryItem* core(QWebHistoryItem* q);
+
WebCore::HistoryItem* item;
};
diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h
index 7d024ae..bac618c 100644
--- a/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -58,20 +58,43 @@ Q_SIGNALS:
void didHide();
};
+class QWebNotificationData
+{
+public:
+ virtual const QString title() const = 0;
+ virtual const QString message() const = 0;
+ virtual const QByteArray iconData() const = 0;
+};
+
+class QWebNotificationPresenter : public QObject
+{
+ Q_OBJECT
+public:
+ QWebNotificationPresenter() {}
+ virtual ~QWebNotificationPresenter() {}
+
+ virtual void showNotification(const QWebNotificationData*) = 0;
+
+Q_SIGNALS:
+ void notificationClosed();
+};
+
class QWebKitPlatformPlugin
{
public:
- inline ~QWebKitPlatformPlugin() {}
+ virtual ~QWebKitPlatformPlugin() {}
enum Extension {
- MultipleSelections
+ MultipleSelections,
+ Notifications
};
- virtual QWebSelectMethod* createSelectInputMethod() const = 0;
virtual bool supportsExtension(Extension extension) const = 0;
+ virtual QWebSelectMethod* createSelectInputMethod() const = 0;
+ virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
};
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.0");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.2");
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 0e9d92f..d49ac14 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -267,6 +267,9 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
JSC::initializeThreading();
WTF::initializeMainThread();
WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData);
+#if QT_VERSION < QT_VERSION_CHECK(4, 7, 0)
+ WebCore::Font::setCodePath(WebCore::Font::Complex);
+#endif
chromeClient = new ChromeClientQt(q);
contextMenuClient = new ContextMenuClientQt();
@@ -299,7 +302,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
PageGroup::setShouldTrackVisitedLinks(true);
#if ENABLE(NOTIFICATIONS)
- notificationPresenterClient = new NotificationPresenterClientQt(q);
+ NotificationPresenterClientQt::notificationPresenter()->addClient();
#endif
}
@@ -315,7 +318,7 @@ QWebPagePrivate::~QWebPagePrivate()
delete page;
#if ENABLE(NOTIFICATIONS)
- delete notificationPresenterClient;
+ NotificationPresenterClientQt::notificationPresenter()->removeClient();
#endif
}
@@ -1008,7 +1011,7 @@ void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1021,7 +1024,7 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1051,7 +1054,7 @@ void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1065,7 +1068,7 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1075,7 +1078,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1087,7 +1090,7 @@ void QWebPagePrivate::dropEvent(QDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
dropActionToDragOp(Qt::DropAction(ev->dropAction())));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1203,6 +1206,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
ev->accept();
}
+#ifndef QT_NO_PROPERTIES
void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
{
if (event->propertyName() == "_q_viewMode") {
@@ -1257,6 +1261,7 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev
}
#endif
}
+#endif
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
@@ -1931,6 +1936,30 @@ bool QWebPage::shouldInterruptJavaScript()
}
/*!
+ \fn bool QWebPage::allowGeolocationRequest()
+ \since 4.7
+
+ This function is called whenever a JavaScript program running inside \a frame tries to access user location through navigator.geolocation.
+
+ If the user wants to allow access to location then it should return true; otherwise false.
+
+ The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.
+
+ \warning Because of binary compatibility constraints, this function is not virtual. If you want to
+ provide your own implementation in a QWebPage subclass, reimplement the allowGeolocationRequest()
+ slot in your subclass instead. QtWebKit will dynamically detect the slot and call it.
+*/
+bool QWebPage::allowGeolocationRequest(QWebFrame *frame)
+{
+#ifdef QT_NO_MESSAGEBOX
+ return false;
+#else
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ return QMessageBox::Yes == QMessageBox::information(parent, tr("Location Request by- %1").arg(frame->url().host()), tr("The page wants to access your location information. Do you want to allow the request?"), QMessageBox::Yes, QMessageBox::No);
+#endif
+}
+
+/*!
This function is called whenever WebKit wants to create a new window of the given \a type, for
example when a JavaScript program requests to open a document in a new window.
@@ -2641,9 +2670,11 @@ bool QWebPage::event(QEvent *ev)
d->touchEvent(static_cast<QTouchEvent*>(ev));
break;
#endif
+#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange:
d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
break;
+#endif
default:
return QObject::event(ev);
}
@@ -3095,6 +3126,14 @@ bool QWebPage::findText(const QString &subString, FindFlags options)
} else
return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0);
} else {
+ if (subString.isEmpty()) {
+ d->page->mainFrame()->selection()->clear();
+ Frame* frame = d->page->mainFrame()->tree()->firstChild();
+ while (frame) {
+ frame->selection()->clear();
+ frame = frame->tree()->traverseNextWithWrap(false);
+ }
+ }
::FindDirection direction = ::FindDirectionForward;
if (options & FindBackward)
direction = ::FindDirectionBackward;
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index a4b555a..721f4a8 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -307,6 +307,7 @@ public:
public Q_SLOTS:
bool shouldInterruptJavaScript();
+ bool allowGeolocationRequest(QWebFrame *frame);
Q_SIGNALS:
void loadStarted();
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 7414716..272f96b 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -44,7 +44,6 @@ namespace WebCore {
class EditorClientQt;
class Element;
class InspectorController;
- class NotificationPresenterClientQt;
class Node;
class Page;
class Frame;
@@ -113,7 +112,9 @@ public:
void inputMethodEvent(QInputMethodEvent*);
+#ifndef QT_NO_PROPERTIES
void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
+#endif
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
@@ -191,8 +192,6 @@ public:
bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
Qt::DropAction m_lastDropAction;
- WebCore::NotificationPresenterClientQt* notificationPresenterClient;
-
QString viewMode;
static bool drtRun;
diff --git a/WebKit/qt/Api/qwebpluginfactory.cpp b/WebKit/qt/Api/qwebpluginfactory.cpp
index f715430..b9180be 100644
--- a/WebKit/qt/Api/qwebpluginfactory.cpp
+++ b/WebKit/qt/Api/qwebpluginfactory.cpp
@@ -63,7 +63,7 @@
/*!
\class QWebPluginFactory::Plugin
\since 4.4
- \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
+ \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
\inmodule QtWebKit
*/
@@ -147,7 +147,7 @@ QWebPluginFactory::~QWebPluginFactory()
supported plugins the factory can create.
\note Currently, this function is only called when JavaScript programs
- access the global \c plugins or \c mimetypes objects.
+ access the global \c plugins or \c mimetypes objects.
*/
/*!
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index a649658..4881bac 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -184,9 +184,10 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
- value = attributes.value(QWebSettings::DOMPasteAllowed,
- global->attributes.value(QWebSettings::DOMPasteAllowed));
+ value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
+ global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
+ settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
@@ -235,10 +236,6 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
settings->setAllowFileAccessFromFileURLs(value);
- value = attributes.value(QWebSettings::JavaScriptCanAccessClipboard,
- global->attributes.value(QWebSettings::JavaScriptCanAccessClipboard));
- settings->setJavaScriptCanAccessClipboard(value);
-
value = attributes.value(QWebSettings::XSSAuditingEnabled,
global->attributes.value(QWebSettings::XSSAuditingEnabled));
settings->setXSSAuditorEnabled(value);
@@ -249,6 +246,10 @@ void QWebSettingsPrivate::apply()
settings->setTiledBackingStoreEnabled(value);
#endif
+ value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled,
+ global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled));
+ settings->setNeedsSiteSpecificQuirks(value);
+
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -376,8 +377,6 @@ QWebSettings* QWebSettings::globalSettings()
recording visited pages in the history and storing web page icons. This is disabled by default.
\value JavascriptCanOpenWindows Specifies whether JavaScript programs
can open new windows. This is disabled by default.
- \value DOMPasteAllowed Specifies whether JavaScript programs can
- read clipboard contents.
\value JavascriptCanAccessClipboard Specifies whether JavaScript programs
can read or write to the clipboard. This is disabled by default.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
@@ -433,6 +432,8 @@ QWebSettings* QWebSettings::globalSettings()
and at other times scrolling the page itself. For this reason iframes and framesets are
barely usable on touch devices. This will flatten all the frames to become one scrollable page.
This is disabled by default.
+ \value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is
+ enabled by default.
*/
/*!
@@ -469,6 +470,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::WebGLEnabled, false);
d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
+ d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
}
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index 040f9b4..c063bcd 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -55,7 +55,7 @@ public:
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
- DOMPasteAllowed,
+ JavascriptCanAccessClipboard,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
ZoomTextOnly,
@@ -68,14 +68,14 @@ public:
#endif
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
- JavaScriptCanAccessClipboard,
XSSAuditingEnabled,
AcceleratedCompositingEnabled,
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
FrameFlatteningEnabled,
- WebGLEnabled
+ WebGLEnabled,
+ SiteSpecificQuirksEnabled
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 14548d9..f83d64d 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,689 @@
+2010-06-13 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Platform plugin support for Notifications UI
+ https://bugs.webkit.org/show_bug.cgi?id=40005
+
+ Add an interface to the platform plugin to display notifications.
+ Implemented the notification in the example platform plugin.
+ This interface is enabled by default, but could be turned off with
+ a build flag. The platform plugin should control its own lifecycle,
+ so now the close timer applies only when using the QSystemTrayIcon.
+ That's because QSystemTrayIcon does not inform its caller when it
+ is closed.
+
+ Changed the way NotificationPresenterClientQt is deleted because it
+ is being accessed when GC is deleting the Notification objects.
+ NotificationPresenterClientQt is now detaching itself from the
+ Notifications before it is deleted.
+
+ * Api/qwebkitplatformplugin.h:
+ (QWebNotificationPresenter::QWebNotificationPresenter):
+ (QWebNotificationPresenter::~QWebNotificationPresenter):
+ (QWebKitPlatformPlugin::):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationIconWrapper::NotificationIconWrapper):
+ (WebCore::NotificationIconWrapper::title):
+ (WebCore::NotificationIconWrapper::message):
+ (WebCore::NotificationIconWrapper::iconData):
+ (WebCore::NotificationPresenterClientQt::~NotificationPresenterClientQt):
+ (WebCore::NotificationIconWrapper::notificationClosed):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::cancel):
+ (WebCore::NotificationPresenterClientQt::notificationForWrapper):
+ (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue):
+ (WebCore::NotificationPresenterClientQt::detachNotification):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ * WebCoreSupport/QtPlatformPlugin.cpp:
+ (WebCore::QtPlatformPlugin::createNotificationPresenter):
+ * WebCoreSupport/QtPlatformPlugin.h:
+ * examples/platformplugin/WebNotificationPresenter.cpp: Added.
+ (WebNotificationWidget::WebNotificationWidget):
+ (WebNotificationWidget::~WebNotificationWidget):
+ (WebNotificationWidget::showNotification):
+ (WebNotificationWidget::event):
+ * examples/platformplugin/WebNotificationPresenter.h: Added.
+ (WebNotificationPresenter::WebNotificationPresenter):
+ (WebNotificationPresenter::~WebNotificationPresenter):
+ (WebNotificationPresenter::showNotification):
+ * examples/platformplugin/WebPlugin.cpp:
+ (WebPlugin::supportsExtension):
+ * examples/platformplugin/WebPlugin.h:
+ (WebPlugin::createNotificationPresenter):
+ * examples/platformplugin/platformplugin.pro:
+ * examples/platformplugin/qwebkitplatformplugin.h:
+ (QWebNotificationPresenter::QWebNotificationPresenter):
+ (QWebNotificationPresenter::~QWebNotificationPresenter):
+ (QWebKitPlatformPlugin::):
+
+2010-06-14 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] navigator.geolocation support for Qt port
+ https://bugs.webkit.org/show_bug.cgi?id=39724
+
+ Implement ChromeClientQt::requestGeolocationPermissionForFrame() which delegates call to QWebPage::allowGeolocationRequest
+ Layout and unit test cases for the are also added.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::allowGeolocationRequest):
+ * Api/qwebpage.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (JSTestPage::shouldInterruptJavaScript):
+ (JSTestPage::allowGeolocationRequest):
+ (JSTestPage::setGeolocationPermission):
+ (tst_QWebPage::geolocationRequestJS):
+
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::InspectorClientQt):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorClientQt::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-06-13 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ Reviewed by George Staikos.
+
+ Fix the QtWebKit which doesn't recognize the MIME type of HTML/TEXT in uppercase
+ https://bugs.webkit.org/show_bug.cgi?id=39492
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::canShowMIMEType):
+
+2010-06-08 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Add support for callShouldCloseOnWebView() to DRT
+ https://bugs.webkit.org/show_bug.cgi?id=40330
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::shouldClose):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2010-06-12 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added an attribute to enable/disable site specific quirks mode in WebKit.
+ The attribute is enabled by default.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40073
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h:
+
+2010-06-12 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix tst_qwebframe regression from http://trac.webkit.org/changeset/61062
+
+ Only use cacheableBindingRootObject() if the object has QtOwnership.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40527
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::addToJavaScriptWindowObject):
+
+2010-06-13 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ FrameLoader::clear() clears JS objects that cached pages later rely on
+
+ https://bugs.webkit.org/show_bug.cgi?id=37725
+ https://bugs.webkit.org/show_bug.cgi?id=31626
+
+ Fix the following tests for Qt:
+
+ fast/events/pageshow-pagehide-on-back-cached.html
+ fast/events/pageshow-pagehide-on-back-cached-with-frames.html
+ fast/loader/input-element-page-cache-crash.html
+ fast/dom/Window/timer-resume-on-navigation-back.html
+ loader/go-back-to-different-window-size.html
+ fast/dom/javascript-url-crash-function.html
+ fast/dom/location-new-window-no-crash.html
+ http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
+
+ which currently fail because the page's Qt-bindings runtime objects are
+ cleared when navigating away from the page containing them.
+
+ Track Qt-bindings objects in a separate ScriptController::cacheableRootBindingObject().
+ RuntimeObjects tracked by this root object will not get invalidated on page navigations,
+ so they will still be available when the pages containing them are retrieved from the
+ b/f cache.
+
+ This means the Qt bindings objects will only get cleared on Frame::pageDestroyed().
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::addToJavaScriptWindowObject):
+
+2010-06-12 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add documentation to the QtWebkit bridge
+ https://bugs.webkit.org/show_bug.cgi?id=35861
+
+ The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation
+ change. The new patch amends that, with the correct snippets and grammar fixes.
+
+ * docs/qtwebkit-bridge.qdoc:
+ * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp:
+ (wrapInFunction):
+
+2010-06-12 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Back-forward list dumping is incorrect
+
+ https://bugs.webkit.org/show_bug.cgi?id=36392
+
+ Support dumping child history items in DRT.
+
+ Unskip:
+
+ fast/loader/frame-src-change-added-to-history.html
+ fast/loader/frame-src-change-not-added-to-history.html
+ fast/loader/frame-location-change-not-added-to-history.html
+
+ * Api/qwebhistory.cpp:
+ (QWebHistoryItemPrivate::core):
+ * Api/qwebhistory.h:
+ * Api/qwebhistory_p.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::isTargetItem):
+ (DumpRenderTreeSupportQt::historyItemTarget):
+ (DumpRenderTreeSupportQt::getChildHistoryItems):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2010-06-11 Jesus Sanchez-Palencia <jesus@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Typo error in QWebPluginFactory Documentation
+ https://bugs.webkit.org/show_bug.cgi?id=40490
+
+ * Api/qwebpluginfactory.cpp:
+
+2010-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by nobody, build fix.
+
+ [Qt] Second fix attempt for the build break introduced by r61002.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2010-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by nobody, build fix.
+
+ [Qt] Fix build break introduced by r61002.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Implement the simple text code path.
+ https://bugs.webkit.org/show_bug.cgi?id=40077
+
+ Remove the FONT_FAST_PATH macro and use the Qt's
+ fast text implementation instead of the one of WebKit.
+
+ The Qt::TextBypassShaping flag is used to tell Qt to
+ only use the glyph advances.
+
+ Qt 4.7 is needed to get this flag thus the complex path is always
+ used if QtWebKit is compiled against an earlier version.
+
+ Contrary to the WebKit's implementation, the complex code path
+ is taken if the text is RightToLeft, justified or is formatted
+ with non-zero letter or word spacing.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2010-06-10 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Support for loading notification icons
+ https://bugs.webkit.org/show_bug.cgi?id=40004
+
+ Take into use the icon that was loaded for the notification.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::show):
+
+2010-06-10 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Memory leak in qwebpage unit test cases
+ https://bugs.webkit.org/show_bug.cgi?id=40405
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
+2010-06-10 Raine Makelainen <raine.makelainen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Impossible to set input method hints based HTML5 input types
+ https://bugs.webkit.org/show_bug.cgi?id=40107
+
+ EditorClientQt to set input method hints for "number", "tel",
+ "email", and "url" HTML input elements.
+
+ Tests for HTML input elements and input method hints added for
+ QGraphicsWebView and QWebView.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+ * tests/qgraphicswebview/resources/input_types.html: Added.
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (GraphicsWebView::GraphicsWebView):
+ (GraphicsWebView::fireMouseClick):
+ (tst_QGraphicsWebView::focusInputTypes):
+ * tests/qgraphicswebview/tst_qgraphicswebview.qrc: Added.
+ * tests/qwebview/resources/input_types.html: Added.
+ * tests/qwebview/tst_qwebview.cpp:
+ (WebView::fireMouseClick):
+ (tst_QWebView::focusInputTypes):
+ * tests/qwebview/tst_qwebview.qrc:
+
+2010-06-10 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Reduce FrameView.h includes to speed up build times
+ https://bugs.webkit.org/show_bug.cgi?id=40408
+
+ * Api/qwebframe.cpp:
+ - Include RenderLayer.h since it's used in this file.
+
+2010-06-10 Andy Shaw <andy.shaw@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
+ https://bugs.webkit.org/show_bug.cgi?id=40401
+
+ The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
+ of accept().
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+
+2010-06-09 Pierre Rossi <pierre.rossi@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QWebPage::findText() does not clear selection when passed empty string
+ https://bugs.webkit.org/show_bug.cgi?id=31779
+
+ * Api/qwebpage.cpp:
+ (QWebPage::findText):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::findText):
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] PageClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40257
+
+ * WebCoreSupport/PageClientQt.h:
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] InspectorClientQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40255
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] FrameLoaderClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40251
+
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendSubmitEvent):
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] EditorClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40249
+
+ * WebCoreSupport/EditorClientQt.h:
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] EditCommandQt.cpp/h have coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40248
+
+ * WebCoreSupport/EditCommandQt.cpp:
+ (EditCommandQt::EditCommandQt):
+ (EditCommandQt::~EditCommandQt):
+ (EditCommandQt::redo):
+ (EditCommandQt::undo):
+ * WebCoreSupport/EditCommandQt.h:
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] DumpRenderTreeSupportQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40247
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::firstRectForCharacterRange):
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] DragClientQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40246
+
+ * WebCoreSupport/DragClientQt.cpp:
+ (WebCore::DragClientQt::startDrag):
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] ContextMenuClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40242
+
+ * WebCoreSupport/ContextMenuClientQt.h:
+
+2010-06-09 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] ChromeClientQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40240
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::pageRect):
+ (WebCore::ChromeClientQt::createWindow):
+ (WebCore::ChromeClientQt::runJavaScriptAlert):
+ (WebCore::ChromeClientQt::runJavaScriptConfirm):
+ (WebCore::ChromeClientQt::runJavaScriptPrompt):
+ (WebCore::ChromeClientQt::print):
+ (WebCore::ChromeClientQt::attachRootGraphicsLayer):
+ (WebCore::ChromeClientQt::visibleRectForTiledBackingStore):
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::InspectorClientQt):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::InspectorClientQt):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorClientQt::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setEditingBehavior):
+
+2010-06-07 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by David Levin.
+
+ [Qt] NotificationPresenterClientQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40256
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::show):
+
+2010-06-06 Antonio Gomes <tonikitoo@webkit.org>, Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Christiansen, Eric Seidel.
+
+ [Qt] Expose the editing behavior setting in DRT to test all editing code paths
+ https://bugs.webkit.org/show_bug.cgi?id=39680
+
+ Make setEditingBehavior() a no-operation if the editingBehavior
+ argument is not recognized to avoid using an uninitialized variable.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setEditingBehavior):
+
+2010-06-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with recent new exports.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-06-03 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Don't send notifications event after the page was navigated away
+ https://bugs.webkit.org/show_bug.cgi?id=40127
+
+ Added a check before sending events to the notification and before logging.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::cancel):
+ (WebCore::NotificationPresenterClientQt::sendEvent):
+
+2010-06-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [Qt] Fix compilation with QT_NO_PROPERTIES
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * Api/qwebpage.cpp:
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+
+2010-06-02 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Shared platform plugin
+ https://bugs.webkit.org/show_bug.cgi?id=39968
+
+ Allow several instances of class QtPlatformPlugin to share the QWebKitPlatformPlugin
+ object provided by a plugin.
+
+ Updated plugin interface version number due to ABI breaking change.
+
+ * Api/qwebkitplatformplugin.h:
+ (QWebKitPlatformPlugin::~QWebKitPlatformPlugin):
+ * WebCoreSupport/QtPlatformPlugin.cpp:
+ (WebCore::QtPlatformPlugin::load):
+ (WebCore::QtPlatformPlugin::~QtPlatformPlugin):
+ (WebCore::QtPlatformPlugin::plugin):
+ * WebCoreSupport/QtPlatformPlugin.h:
+ * examples/platformplugin/qwebkitplatformplugin.h:
+ (QWebKitPlatformPlugin::~QWebKitPlatformPlugin):
+
+2010-06-02 Raine Makelainen <raine.makelainen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] On Maemo6 platform auto upper case and predictive text input method hints are not disabled for password field.
+ https://bugs.webkit.org/show_bug.cgi?id=40062
+
+ Introducing Q_WS_MAEMO_6 for Maemo6 specific code. Enabling code that sets input
+ method hints Qt::ImhNoAutoUppercase and Qt::ImhNoPredictiveText true for Maemo6.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+
+2010-06-01 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix the lifecycle of notification objects
+ https://bugs.webkit.org/show_bug.cgi?id=40003
+
+ Notification objects are not tightly related to the page that created them,
+ and should be decoupled from the page.
+ Create one NotificationPresenter that handles all notifications.
+ Add ref/deref to the notification objects when they are added/removed from
+ the queue of active notifications. The same technique is used for XMLHttpRequest.
+ Instead of deleting all notifications associated with a page when the page is navigated,
+ delete them on a timer, using the same timeout that QSystemTrayIcon is using.
+ Break up the show() method into smaller methods.
+ Use OwnPtr instead of raw pointer for QSystemTrayIcon.
+ Move creating the QIcon to just before showing it in the QSyetemTrayIcon.
+
+ No new tests as this is just a refactoring. Existing notifications test cover the code.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ (QWebPagePrivate::~QWebPagePrivate):
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::notificationPresenter):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setNotificationsReceiver):
+ (DumpRenderTreeSupportQt::allowNotificationForOrigin):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::notificationPresenter):
+ (WebCore::NotificationIconWrapper::NotificationIconWrapper):
+ (WebCore::NotificationIconWrapper::~NotificationIconWrapper):
+ (WebCore::NotificationIconWrapper::close):
+ (WebCore::NotificationPresenterClientQt::NotificationPresenterClientQt):
+ (WebCore::NotificationPresenterClientQt::removeClient):
+ (WebCore::NotificationPresenterClientQt::show):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::cancel):
+ (WebCore::NotificationPresenterClientQt::notificationObjectDestroyed):
+ (WebCore::NotificationPresenterClientQt::requestPermission):
+ (WebCore::NotificationPresenterClientQt::sendEvent):
+ (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue):
+ (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
+ (WebCore::NotificationPresenterClientQt::dumpShowText):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (WebCore::NotificationPresenterClientQt::addClient):
+
+2010-06-01 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add documentation to the QtWebkit bridge
+ https://bugs.webkit.org/show_bug.cgi?id=35861
+
+ This patch includes comprehensive qdoc documentation for the QtWebkit bridge.
+
+ * docs/qtwebkit-bridge.qdoc: Added.
+ * docs/qtwebkit.qdoc:
+ * docs/webkitsnippets/doc_src_qtscript.qdoc: Added.
+ * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: Added.
+ (wrapInFunction):
+
+2010-06-01 Raine Makelainen <raine.makelainen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt]: REGRESSION(r58703): QWebSettings::JavascriptCanAccessClipboard has wrong case in "Javascript" part.
+ https://bugs.webkit.org/show_bug.cgi?id=39878
+
+ QWebSettings::JavaScriptCanAccessClipboard reverted back to
+ QWebSettings::JavascriptCanAccessClipboard. QWebSettings::DOMPasteAllowed enum removed.
+
+ Value of QWebSettings::JavascriptCanAccessClipboard to setDOMPasteAllowed and
+ setJavaScriptCanAccessClipboard of WebCore::Settings.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-06-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Rename versioning .pri file to what Qt's mkspecs/features/qt.pri expects.
+
+ * qt_webkit_version.pri: Renamed from WebKit/qt/qtwebkit_version.pri.
+
2010-05-31 Lyon Chen <liachen@rim.com>
Reviewed by Kent Tamura.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index bcb07ee..98ffd8a 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -29,19 +29,20 @@
#include "config.h"
#include "ChromeClientQt.h"
+#include "DatabaseTracker.h"
#include "FileChooser.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameLoaderClientQt.h"
#include "FrameView.h"
+#include "Geolocation.h"
#include "HitTestResult.h"
#include "Icon.h"
-#include "NotificationPresenterClientQt.h"
#include "NotImplemented.h"
+#include "NotificationPresenterClientQt.h"
#include "ScrollbarTheme.h"
#include "WindowFeatures.h"
-#include "DatabaseTracker.h"
#if defined(Q_WS_MAEMO_5)
#include "QtMaemoWebPopup.h"
#else
@@ -50,18 +51,18 @@
#include "QWebPageClient.h"
#include "SecurityOrigin.h"
-#include <qdebug.h>
-#include <qeventloop.h>
-#include <qtextdocument.h>
-#include <qtooltip.h>
-
+#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
-#include "qwebframe_p.h"
#include "qwebsecurityorigin.h"
#include "qwebsecurityorigin_p.h"
#include "qwebview.h"
+#include <qdebug.h>
+#include <qeventloop.h>
+#include <qtextdocument.h>
+#include <qtooltip.h>
+
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerQt.h"
#endif
@@ -106,7 +107,7 @@ FloatRect ChromeClientQt::pageRect()
{
if (!m_webPage)
return FloatRect();
- return FloatRect(QRectF(QPointF(0,0), m_webPage->viewportSize()));
+ return FloatRect(QRectF(QPointF(0, 0), m_webPage->viewportSize()));
}
@@ -163,7 +164,7 @@ void ChromeClientQt::focusedNodeChanged(WebCore::Node*)
Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
{
- QWebPage *newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow);
+ QWebPage* newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow);
if (!newPage)
return 0;
@@ -290,21 +291,21 @@ void ChromeClientQt::closeWindowSoon()
void ChromeClientQt::runJavaScriptAlert(Frame* f, const String& msg)
{
QString x = msg;
- FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
+ FrameLoaderClientQt* fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
m_webPage->javaScriptAlert(fl->webFrame(), x);
}
bool ChromeClientQt::runJavaScriptConfirm(Frame* f, const String& msg)
{
QString x = msg;
- FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
+ FrameLoaderClientQt* fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
return m_webPage->javaScriptConfirm(fl->webFrame(), x);
}
bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const String& defaultValue, String& result)
{
QString x = result;
- FrameLoaderClientQt *fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
+ FrameLoaderClientQt* fl = static_cast<FrameLoaderClientQt*>(f->loader()->client());
bool rc = m_webPage->javaScriptPrompt(fl->webFrame(), (QString)message, (QString)defaultValue, &x);
// Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
@@ -459,7 +460,7 @@ void ChromeClientQt::setToolTip(const String &tip, TextDirection)
#endif
}
-void ChromeClientQt::print(Frame *frame)
+void ChromeClientQt::print(Frame* frame)
{
emit m_webPage->printRequested(QWebFramePrivate::kit(frame));
}
@@ -487,7 +488,7 @@ void ChromeClientQt::reachedMaxAppCacheSize(int64_t)
#if ENABLE(NOTIFICATIONS)
NotificationPresenter* ChromeClientQt::notificationPresenter() const
{
- return m_webPage->d->notificationPresenterClient;
+ return NotificationPresenterClientQt::notificationPresenter();
}
#endif
@@ -534,15 +535,17 @@ bool ChromeClientQt::setCursor(PlatformCursorHandle)
return false;
}
-void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
+void ChromeClientQt::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
- // See the comment in WebCore/page/ChromeClient.h
- notImplemented();
+ bool allow = false;
+ QWebFrame* webFrame = QWebFramePrivate::kit(frame);
+ QMetaObject::invokeMethod(m_webPage, "allowGeolocationRequest", Qt::DirectConnection, Q_RETURN_ARG(bool, allow), Q_ARG(QWebFrame*, webFrame));
+ geolocation->setIsAllowed(allow);
}
#if USE(ACCELERATED_COMPOSITING)
void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
-{
+{
if (platformPageClient())
platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0);
}
@@ -567,10 +570,10 @@ bool ChromeClientQt::allowsAcceleratedCompositing() const
}
#endif
-
+
#if ENABLE(TILED_BACKING_STORE)
IntRect ChromeClientQt::visibleRectForTiledBackingStore() const
-{
+{
if (!platformPageClient() || !m_webPage)
return IntRect();
diff --git a/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h b/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
index 8440ff5..1b4475f 100644
--- a/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
@@ -31,23 +31,22 @@
#include <RefCounted.h>
namespace WebCore {
- class ContextMenu;
-
- class ContextMenuClientQt : public ContextMenuClient
- {
- public:
- virtual void contextMenuDestroyed();
-
- virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*);
- virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
-
- virtual void downloadURL(const KURL& url);
- virtual void lookUpInDictionary(Frame*);
- virtual void speak(const String&);
- virtual bool isSpeaking();
- virtual void stopSpeaking();
- virtual void searchWithGoogle(const Frame*);
- };
+class ContextMenu;
+
+class ContextMenuClientQt : public ContextMenuClient {
+public:
+ virtual void contextMenuDestroyed();
+
+ virtual PlatformMenuDescription getCustomMenuFromDefaultItems(ContextMenu*);
+ virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
+
+ virtual void downloadURL(const KURL& url);
+ virtual void lookUpInDictionary(Frame*);
+ virtual void speak(const String&);
+ virtual bool isSpeaking();
+ virtual void stopSpeaking();
+ virtual void searchWithGoogle(const Frame*);
+};
}
#endif
diff --git a/WebKit/qt/WebCoreSupport/DragClientQt.cpp b/WebKit/qt/WebCoreSupport/DragClientQt.cpp
index e48c3e3..52229dc 100644
--- a/WebKit/qt/WebCoreSupport/DragClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DragClientQt.cpp
@@ -93,7 +93,7 @@ void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Cli
static_cast<ClipboardQt*>(clipboard)->invalidateWritableData();
QWidget* view = m_webPage->view();
if (view) {
- QDrag *drag = new QDrag(view);
+ QDrag* drag = new QDrag(view);
if (clipboardData && clipboardData->hasImage())
drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData()));
DragOperation dragOperationMask = clipboard->sourceOperation();
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 0b2e9a5..c92e43f 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -35,12 +35,17 @@
#include "FrameLoaderClientQt.h"
#include "FrameView.h"
#include "GCController.h"
+#include "Geolocation.h"
+#include "GeolocationServiceMock.h"
+#include "Geoposition.h"
+#include "HistoryItem.h"
#include "HTMLInputElement.h"
#include "InspectorController.h"
#include "NotificationPresenterClientQt.h"
#include "Page.h"
#include "PageGroup.h"
#include "PluginDatabase.h"
+#include "PositionError.h"
#include "PrintContext.h"
#include "RenderListItem.h"
#include "RenderTreeAsText.h"
@@ -51,10 +56,13 @@
#endif
#include "TextIterator.h"
#include "WorkerThread.h"
+#include <wtf/CurrentTime.h>
#include "qwebelement.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
+#include "qwebhistory.h"
+#include "qwebhistory_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
@@ -437,7 +445,7 @@ QVariantList DumpRenderTreeSupportQt::firstRectForCharacterRange(QWebPage* page,
WebCore::Frame* frame = page->handle()->page->focusController()->focusedOrMainFrame();
QVariantList rect;
- if ((location + length < location) && (location + length != 0))
+ if ((location + length < location) && (location + length))
length = 0;
Element* selectionRoot = frame->selection()->rootEditableElement();
@@ -476,18 +484,22 @@ bool DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(QWebFrame*
void DumpRenderTreeSupportQt::setEditingBehavior(QWebPage* page, const QString& editingBehavior)
{
- WebCore::EditingBehavior coreEditingBehavior;
+ WebCore::EditingBehaviorType coreEditingBehavior;
if (editingBehavior == "win")
coreEditingBehavior = EditingWindowsBehavior;
else if (editingBehavior == "mac")
coreEditingBehavior = EditingMacBehavior;
+ else {
+ ASSERT_NOT_REACHED();
+ return;
+ }
Page* corePage = QWebPagePrivate::core(page);
if (!corePage)
return;
- corePage->settings()->setEditingBehavior(coreEditingBehavior);
+ corePage->settings()->setEditingBehaviorType(coreEditingBehavior);
}
void DumpRenderTreeSupportQt::dumpFrameLoader(bool b)
@@ -537,17 +549,33 @@ void DumpRenderTreeSupportQt::dumpNotification(bool b)
#endif
}
-void DumpRenderTreeSupportQt::setNotificationsReceiver(QWebPage* page, QObject* receiver)
+void DumpRenderTreeSupportQt::setNotificationsReceiver(QObject* receiver)
{
#if ENABLE(NOTIFICATIONS)
- page->d->notificationPresenterClient->setReceiver(receiver);
+ NotificationPresenterClientQt::notificationPresenter()->setReceiver(receiver);
#endif
}
-void DumpRenderTreeSupportQt::allowNotificationForOrigin(QWebPage* page, const QString& origin)
+void DumpRenderTreeSupportQt::allowNotificationForOrigin(const QString& origin)
{
#if ENABLE(NOTIFICATIONS)
- page->d->notificationPresenterClient->allowNotificationForOrigin(origin);
+ NotificationPresenterClientQt::notificationPresenter()->allowNotificationForOrigin(origin);
+#endif
+}
+
+void DumpRenderTreeSupportQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
+{
+#if ENABLE(GEOLOCATION)
+ RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, false, 0, accuracy, true, 0, false, 0, false, 0), currentTime() * 1000.0);
+ GeolocationServiceMock::setPosition(geoposition);
+#endif
+}
+
+void DumpRenderTreeSupportQt::setMockGeolocationError(int errorCode, const QString& message)
+{
+#if ENABLE(GEOLOCATION)
+ RefPtr<PositionError> positionError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message);
+ GeolocationServiceMock::setError(positionError);
#endif
}
@@ -561,6 +589,41 @@ void DumpRenderTreeSupportQt::setRequestPermissionFunction(RequestPermissionFunc
requestPermissionFunction = f;
}
+bool DumpRenderTreeSupportQt::isTargetItem(const QWebHistoryItem& historyItem)
+{
+ QWebHistoryItem it = historyItem;
+ if (QWebHistoryItemPrivate::core(&it)->isTargetItem())
+ return true;
+ return false;
+}
+
+QString DumpRenderTreeSupportQt::historyItemTarget(const QWebHistoryItem& historyItem)
+{
+ QWebHistoryItem it = historyItem;
+ return (QWebHistoryItemPrivate::core(&it)->target());
+}
+
+QList<QWebHistoryItem> DumpRenderTreeSupportQt::getChildHistoryItems(const QWebHistoryItem& historyItem)
+{
+ QWebHistoryItem it = historyItem;
+ HistoryItem* item = QWebHistoryItemPrivate::core(&it);
+ const WebCore::HistoryItemVector& children = item->children();
+
+ unsigned size = children.size();
+ QList<QWebHistoryItem> kids;
+ for (unsigned i = 0; i < size; ++i) {
+ QWebHistoryItem kid(new QWebHistoryItemPrivate(children[i].get()));
+ kids.prepend(kid);
+ }
+ return kids;
+}
+
+bool DumpRenderTreeSupportQt::shouldClose(QWebFrame* frame)
+{
+ WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
+ return coreFrame->shouldClose();
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 0d348cf..e3408e3 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -29,6 +29,7 @@
class QWebElement;
class QWebFrame;
class QWebPage;
+class QWebHistoryItem;
enum NotificationPermission {
NotificationAllowed,
@@ -37,7 +38,7 @@ enum NotificationPermission {
};
typedef void (CheckPermissionFunctionType) (QObject* receiver, const QUrl&, NotificationPermission&);
-typedef void (RequestPermissionFunctionType) (QObject* receiver, QWebPage* page, const QString&);
+typedef void (RequestPermissionFunctionType) (QObject* receiver, const QString&);
extern CheckPermissionFunctionType* checkPermissionFunction;
extern RequestPermissionFunctionType* requestPermissionFunction;
@@ -96,6 +97,9 @@ public:
static void removeWhiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
static void resetOriginAccessWhiteLists();
+ static void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
+ static void setMockGeolocationError(int errorCode, const QString& message);
+
static int workerThreadCount();
static QString markerTextForListItem(const QWebElement& listItem);
@@ -114,10 +118,16 @@ public:
static void dumpNotification(bool b);
// These functions should eventually turn into public API
// and the "receiver" concept would go away
- static void setNotificationsReceiver(QWebPage* page, QObject* receiver);
- static void allowNotificationForOrigin(QWebPage* page, const QString& origin);
+ static void setNotificationsReceiver(QObject* receiver);
+ static void allowNotificationForOrigin(const QString& origin);
static void setCheckPermissionFunction(CheckPermissionFunctionType*);
static void setRequestPermissionFunction(RequestPermissionFunctionType*);
+
+ static QList<QWebHistoryItem> getChildHistoryItems(const QWebHistoryItem& historyItem);
+ static bool isTargetItem(const QWebHistoryItem& historyItem);
+ static QString historyItemTarget(const QWebHistoryItem& historyItem);
+
+ static bool shouldClose(QWebFrame* frame);
};
#endif
diff --git a/WebKit/qt/WebCoreSupport/EditCommandQt.cpp b/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
index 756ba4c..9c4ff87 100644
--- a/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
@@ -27,30 +27,31 @@ EditCommandQt::EditCommandQt(WTF::RefPtr<EditCommand> cmd, QUndoCommand *parent)
#ifndef QT_NO_UNDOCOMMAND
QUndoCommand(parent),
#endif
- _cmd(cmd), _first(true)
+ m_cmd(cmd), m_first(true)
{
}
-EditCommandQt::~EditCommandQt() {
+EditCommandQt::~EditCommandQt()
+{
}
-void EditCommandQt::redo() {
- if (_first) {
- _first = false;
+void EditCommandQt::redo()
+{
+ if (m_first) {
+ m_first = false;
return;
}
- if (_cmd) {
- _cmd->reapply();
- }
+ if (m_cmd)
+ m_cmd->reapply();
}
-void EditCommandQt::undo() {
- if (_cmd) {
- _cmd->unapply();
- }
+void EditCommandQt::undo()
+{
+ if (m_cmd)
+ m_cmd->unapply();
}
diff --git a/WebKit/qt/WebCoreSupport/EditCommandQt.h b/WebKit/qt/WebCoreSupport/EditCommandQt.h
index ae6ea51..e03b9b2 100644
--- a/WebKit/qt/WebCoreSupport/EditCommandQt.h
+++ b/WebKit/qt/WebCoreSupport/EditCommandQt.h
@@ -17,16 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef EDITCOMMANDQT_H
-#define EDITCOMMANDQT_H
+#ifndef EditCommandQt_h
+#define EditCommandQt_h
-#include <qglobal.h>
-QT_BEGIN_NAMESPACE
-class QUndoCommand;
-QT_END_NAMESPACE
-
-#include <QUndoCommand>
#include <EditCommand.h>
+#include <QUndoCommand>
+#include <qglobal.h>
class EditCommandQt
#ifndef QT_NO_UNDOCOMMAND
@@ -41,8 +37,8 @@ class EditCommandQt
void undo();
private:
- WTF::RefPtr<WebCore::EditCommand> _cmd;
- bool _first;
+ WTF::RefPtr<WebCore::EditCommand> m_cmd;
+ bool m_first;
};
#endif
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 0f54e21..93e5745 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -592,25 +592,33 @@ void EditorClientQt::setInputMethodState(bool active)
QWebPageClient* webPageClient = m_page->d->client;
if (webPageClient) {
#if QT_VERSION >= 0x040600
- bool isPasswordField = false;
- if (!active) {
- // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
- // for password fields. The Qt platform is responsible for determining which widget
- // will receive input method events for password fields.
- Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
- if (frame && frame->document() && frame->document()->focusedNode()) {
- if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
- active = isPasswordField = inputElement->isPasswordField();
- }
+ HTMLInputElement* inputElement = 0;
+ Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
+ if (frame && frame->document() && frame->document()->focusedNode())
+ if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag))
+ inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
+
+ if (inputElement) {
+ if (!active) {
+ // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
+ // for password fields. The Qt platform is responsible for determining which widget
+ // will receive input method events for password fields.
+ active = inputElement->isPasswordField();
+ webPageClient->setInputMethodHint(Qt::ImhHiddenText, active);
+ } else {
+ // Set input method hints for "number", "tel", "email", and "url" input elements.
+ webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField());
+ webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField());
+ webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField());
+ webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField());
}
}
- webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
+
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
// disables auto-uppercase and predictive text for mobile devices
webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
-#endif // Q_WS_MAEMO_5 || Q_OS_SYMBIAN
+#endif // Q_WS_MAEMO_5 || Q_WS_MAEMO_6 || Q_OS_SYMBIAN
#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.h b/WebKit/qt/WebCoreSupport/EditorClientQt.h
index 811298b..a5f6b23 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -27,8 +27,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef EditorClientQt_H
-#define EditorClientQt_H
+#ifndef EditorClientQt_h
+#define EditorClientQt_h
#include "EditorClient.h"
#include "RefCounted.h"
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 3cf19a6..e86a84a 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -51,7 +51,6 @@
#include "HTMLFormElement.h"
#include "HTMLPlugInElement.h"
#include "HTTPParsers.h"
-#include "NotificationPresenterClientQt.h"
#include "NotImplemented.h"
#include "QNetworkReplyHandler.h"
#include "ResourceHandleInternal.h"
@@ -543,14 +542,16 @@ void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
bool FrameLoaderClientQt::canShowMIMEType(const String& MIMEType) const
{
- if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType))
+ String type = MIMEType;
+ type.makeLower();
+ if (MIMETypeRegistry::isSupportedImageMIMEType(type))
return true;
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType))
+ if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
return true;
if (m_frame && m_frame->settings() && m_frame->settings()->arePluginsEnabled()
- && PluginDatabase::installedPlugins()->isMIMETypeRegistered(MIMEType))
+ && PluginDatabase::installedPlugins()->isMIMETypeRegistered(type))
return true;
return false;
@@ -641,9 +642,6 @@ void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* w
if (m_webFrame) {
emit m_webFrame->javaScriptWindowObjectCleared();
-#if ENABLE(NOTIFICATIONS)
- m_webFrame->page()->d->notificationPresenterClient->clearNotificationsList();
-#endif
}
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 9aa9344..d858589 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -27,210 +27,210 @@
* (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 FrameLoaderClientQt_H
-#define FrameLoaderClientQt_H
+#ifndef FrameLoaderClientQt_h
+#define FrameLoaderClientQt_h
-#include <qobject.h>
-#include <QUrl>
-#include "FrameLoaderClient.h"
-#include "KURL.h"
#include "Frame.h"
#include "FrameLoader.h"
+#include "FrameLoaderClient.h"
+#include "KURL.h"
+#include "PluginView.h"
#include "RefCounted.h"
#include "ResourceResponse.h"
-#include "PluginView.h"
+#include <QUrl>
+#include <qobject.h>
class QWebFrame;
namespace WebCore {
- class AuthenticationChallenge;
- class DocumentLoader;
- class Element;
- class FormState;
- class NavigationAction;
- class String;
- class ResourceLoader;
-
- struct LoadErrorResetToken;
-
- class FrameLoaderClientQt : public QObject, public FrameLoaderClient {
- Q_OBJECT
-
- friend class ::QWebFrame;
- void callPolicyFunction(FramePolicyFunction function, PolicyAction action);
- void callErrorPageExtension(const ResourceError&);
- signals:
- void loadStarted();
- void loadProgress(int d);
- void loadFinished(bool);
- void titleChanged(const QString& title);
-
- public:
- FrameLoaderClientQt();
- ~FrameLoaderClientQt();
- virtual void frameLoaderDestroyed();
-
- void setFrame(QWebFrame* webFrame, Frame* frame);
- QWebFrame* webFrame() const;
-
- virtual bool hasWebView() const; // mainly for assertions
-
- virtual void makeRepresentation(DocumentLoader*);
- virtual void forceLayout();
- virtual void forceLayoutForNonHTML();
-
- virtual void setCopiesOnScroll();
-
- virtual void detachedFromParent2();
- virtual void detachedFromParent3();
-
- virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&);
-
- virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long, WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
- virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier);
- virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
- virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
- virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceResponse&);
- virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long, int);
- virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long);
- virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceError&);
- virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int);
-
- virtual void dispatchDidHandleOnloadEvents();
- virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
- virtual void dispatchDidCancelClientRedirect();
- virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
- virtual void dispatchDidChangeLocationWithinPage();
- virtual void dispatchDidPushStateWithinPage();
- virtual void dispatchDidReplaceStateWithinPage();
- virtual void dispatchDidPopStateWithinPage();
- virtual void dispatchWillClose();
- virtual void dispatchDidReceiveIcon();
- virtual void dispatchDidStartProvisionalLoad();
- virtual void dispatchDidReceiveTitle(const String& title);
- virtual void dispatchDidChangeIcons();
- virtual void dispatchDidCommitLoad();
- virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
- virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
- virtual void dispatchDidFinishDocumentLoad();
- virtual void dispatchDidFinishLoad();
- virtual void dispatchDidFirstLayout();
- virtual void dispatchDidFirstVisuallyNonEmptyLayout();
-
- virtual WebCore::Frame* dispatchCreatePage();
- virtual void dispatchShow();
-
- virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String&, const WebCore::ResourceRequest&);
- virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<FormState>, const WebCore::String&);
- virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<FormState>);
- virtual void cancelPolicyCheck();
-
- virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
-
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
- virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
-
- virtual void dispatchDidLoadMainResource(DocumentLoader*);
- virtual void revertToProvisionalState(DocumentLoader*);
- virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
-
- virtual void postProgressStartedNotification();
- virtual void postProgressEstimateChangedNotification();
- virtual void postProgressFinishedNotification();
-
- virtual void setMainFrameDocumentReady(bool);
-
- virtual void startDownload(const WebCore::ResourceRequest&);
-
- virtual void willChangeTitle(DocumentLoader*);
- virtual void didChangeTitle(DocumentLoader*);
-
- virtual void committedLoad(WebCore::DocumentLoader*, const char*, int);
- virtual void finishedLoading(DocumentLoader*);
-
- virtual void updateGlobalHistory();
- virtual void updateGlobalHistoryRedirectLinks();
- virtual bool shouldGoToHistoryItem(HistoryItem*) const;
- virtual void dispatchDidAddBackForwardItem(HistoryItem*) const;
- virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const;
- virtual void dispatchDidChangeBackForwardIndex() const;
- virtual void didDisplayInsecureContent();
- virtual void didRunInsecureContent(SecurityOrigin*);
-
- virtual ResourceError cancelledError(const ResourceRequest&);
- virtual ResourceError blockedError(const ResourceRequest&);
- virtual ResourceError cannotShowURLError(const ResourceRequest&);
- virtual ResourceError interruptForPolicyChangeError(const ResourceRequest&);
-
- virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&);
- virtual ResourceError fileDoesNotExistError(const ResourceResponse&);
- virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&);
-
- virtual bool shouldFallBack(const ResourceError&);
-
- virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
- virtual bool canShowMIMEType(const String& MIMEType) const;
- virtual bool representationExistsForURLScheme(const String& URLScheme) const;
- virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const;
-
- virtual void frameLoadCompleted();
- virtual void saveViewStateToItem(WebCore::HistoryItem*);
- virtual void restoreViewState();
- virtual void provisionalLoadStarted();
- virtual void didFinishLoad();
- virtual void prepareForDataSourceReplacement();
-
- virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
- virtual void setTitle(const String& title, const KURL&);
-
- virtual String userAgent(const WebCore::KURL&);
-
- virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
- virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
- virtual void transitionToCommittedForNewPage();
-
- virtual bool canCachePage() const;
- virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
-
- virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
- const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ;
- virtual void didTransferChildFrameToNewDocument();
- virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
- virtual void redirectDataToPlugin(Widget* pluginWidget);
-
- virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
-
- virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
- virtual String overrideMediaType() const;
-
- virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
- virtual void documentElementAvailable();
- virtual void didPerformFirstNavigation() const;
-
- virtual void registerForIconNotification(bool);
+class AuthenticationChallenge;
+class DocumentLoader;
+class Element;
+class FormState;
+class NavigationAction;
+class String;
+class ResourceLoader;
+
+struct LoadErrorResetToken;
+
+class FrameLoaderClientQt : public QObject, public FrameLoaderClient {
+ Q_OBJECT
+
+ friend class ::QWebFrame;
+ void callPolicyFunction(FramePolicyFunction function, PolicyAction action);
+ void callErrorPageExtension(const ResourceError&);
+signals:
+ void loadStarted();
+ void loadProgress(int d);
+ void loadFinished(bool);
+ void titleChanged(const QString& title);
+
+public:
+ FrameLoaderClientQt();
+ ~FrameLoaderClientQt();
+ virtual void frameLoaderDestroyed();
+
+ void setFrame(QWebFrame* webFrame, Frame* frame);
+ QWebFrame* webFrame() const;
+
+ virtual bool hasWebView() const; // mainly for assertions
+
+ virtual void makeRepresentation(DocumentLoader*);
+ virtual void forceLayout();
+ virtual void forceLayoutForNonHTML();
+
+ virtual void setCopiesOnScroll();
+
+ virtual void detachedFromParent2();
+ virtual void detachedFromParent3();
+
+ virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&);
+
+ virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long, WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+ virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier);
+ virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
+ virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&);
+ virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceResponse&);
+ virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long, int);
+ virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long);
+ virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceError&);
+ virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int);
+
+ virtual void dispatchDidHandleOnloadEvents();
+ virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
+ virtual void dispatchDidCancelClientRedirect();
+ virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
+ virtual void dispatchDidChangeLocationWithinPage();
+ virtual void dispatchDidPushStateWithinPage();
+ virtual void dispatchDidReplaceStateWithinPage();
+ virtual void dispatchDidPopStateWithinPage();
+ virtual void dispatchWillClose();
+ virtual void dispatchDidReceiveIcon();
+ virtual void dispatchDidStartProvisionalLoad();
+ virtual void dispatchDidReceiveTitle(const String& title);
+ virtual void dispatchDidChangeIcons();
+ virtual void dispatchDidCommitLoad();
+ virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
+ virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
+ virtual void dispatchDidFinishDocumentLoad();
+ virtual void dispatchDidFinishLoad();
+ virtual void dispatchDidFirstLayout();
+ virtual void dispatchDidFirstVisuallyNonEmptyLayout();
+
+ virtual WebCore::Frame* dispatchCreatePage();
+ virtual void dispatchShow();
+
+ virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String&, const WebCore::ResourceRequest&);
+ virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<FormState>, const WebCore::String&);
+ virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<FormState>);
+ virtual void cancelPolicyCheck();
+
+ virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+
+ virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
+ virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
+
+ virtual void dispatchDidLoadMainResource(DocumentLoader*);
+ virtual void revertToProvisionalState(DocumentLoader*);
+ virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
+
+ virtual void postProgressStartedNotification();
+ virtual void postProgressEstimateChangedNotification();
+ virtual void postProgressFinishedNotification();
+
+ virtual void setMainFrameDocumentReady(bool);
+
+ virtual void startDownload(const WebCore::ResourceRequest&);
+
+ virtual void willChangeTitle(DocumentLoader*);
+ virtual void didChangeTitle(DocumentLoader*);
+
+ virtual void committedLoad(WebCore::DocumentLoader*, const char*, int);
+ virtual void finishedLoading(DocumentLoader*);
+
+ virtual void updateGlobalHistory();
+ virtual void updateGlobalHistoryRedirectLinks();
+ virtual bool shouldGoToHistoryItem(HistoryItem*) const;
+ virtual void dispatchDidAddBackForwardItem(HistoryItem*) const;
+ virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const;
+ virtual void dispatchDidChangeBackForwardIndex() const;
+ virtual void didDisplayInsecureContent();
+ virtual void didRunInsecureContent(SecurityOrigin*);
+
+ virtual ResourceError cancelledError(const ResourceRequest&);
+ virtual ResourceError blockedError(const ResourceRequest&);
+ virtual ResourceError cannotShowURLError(const ResourceRequest&);
+ virtual ResourceError interruptForPolicyChangeError(const ResourceRequest&);
+
+ virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&);
+ virtual ResourceError fileDoesNotExistError(const ResourceResponse&);
+ virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&);
+
+ virtual bool shouldFallBack(const ResourceError&);
+
+ virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
+ virtual bool canShowMIMEType(const String& MIMEType) const;
+ virtual bool representationExistsForURLScheme(const String& URLScheme) const;
+ virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const;
+
+ virtual void frameLoadCompleted();
+ virtual void saveViewStateToItem(WebCore::HistoryItem*);
+ virtual void restoreViewState();
+ virtual void provisionalLoadStarted();
+ virtual void didFinishLoad();
+ virtual void prepareForDataSourceReplacement();
+
+ virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+ virtual void setTitle(const String& title, const KURL&);
+
+ virtual String userAgent(const WebCore::KURL&);
+
+ virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
+ virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
+ virtual void transitionToCommittedForNewPage();
+
+ virtual bool canCachePage() const;
+ virtual void download(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+
+ virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+ const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
+ virtual void didTransferChildFrameToNewDocument();
+ virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
+ virtual void redirectDataToPlugin(Widget* pluginWidget);
+
+ virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
+
+ virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
+ virtual String overrideMediaType() const;
+
+ virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
+ virtual void documentElementAvailable();
+ virtual void didPerformFirstNavigation() const;
+
+ virtual void registerForIconNotification(bool);
- QString chooseFile(const QString& oldFile);
+ QString chooseFile(const QString& oldFile);
- static bool dumpFrameLoaderCallbacks;
- static bool dumpResourceLoadCallbacks;
- static QString dumpResourceLoadCallbacksPath;
- static bool sendRequestReturnsNullOnRedirect;
- static bool sendRequestReturnsNull;
- static QStringList sendRequestClearHeaders;
+ static bool dumpFrameLoaderCallbacks;
+ static bool dumpResourceLoadCallbacks;
+ static QString dumpResourceLoadCallbacksPath;
+ static bool sendRequestReturnsNullOnRedirect;
+ static bool sendRequestReturnsNull;
+ static QStringList sendRequestClearHeaders;
- private:
- Frame *m_frame;
- QWebFrame *m_webFrame;
- ResourceResponse m_response;
- bool m_firstData;
+private:
+ Frame *m_frame;
+ QWebFrame *m_webFrame;
+ ResourceResponse m_response;
+ bool m_firstData;
- // Plugin view to redirect data to
- WebCore::PluginView* m_pluginView;
- bool m_hasSentResponseToPlugin;
+ // Plugin view to redirect data to
+ WebCore::PluginView* m_pluginView;
+ bool m_hasSentResponseToPlugin;
- ResourceError m_loadError;
- };
+ ResourceError m_loadError;
+};
}
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 725c5fb..fde0556 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -31,19 +31,19 @@
#include "config.h"
#include "InspectorClientQt.h"
+#include "Frame.h"
+#include "InspectorController.h"
+#include "NotImplemented.h"
+#include "Page.h"
+#include "PlatformString.h"
+#include "ScriptController.h"
#include "qwebinspector.h"
#include "qwebinspector_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
#include "qwebview.h"
-
-#include <QtCore/QSettings>
#include <QtCore/QCoreApplication>
-
-#include "InspectorController.h"
-#include "NotImplemented.h"
-#include "Page.h"
-#include "PlatformString.h"
+#include <QtCore/QSettings>
namespace WebCore {
@@ -74,6 +74,7 @@ public:
InspectorClientQt::InspectorClientQt(QWebPage* page)
: m_inspectedWebPage(page)
+ , m_frontendWebPage(0)
{}
void InspectorClientQt::inspectorDestroyed()
@@ -93,14 +94,23 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*)
// Web inspector. This is used for SDK purposes. Please keep this hook
// around and don't remove it.
// https://bugs.webkit.org/show_bug.cgi?id=35340
- QUrl inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
+ QUrl inspectorUrl;
+#ifndef QT_NO_PROPERTIES
+ inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
+#endif
if (!inspectorUrl.isValid())
inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html");
inspectorView->page()->mainFrame()->load(inspectorUrl);
m_inspectedWebPage->d->inspectorFrontend = inspectorView;
inspector->d->setFrontend(inspectorView);
- inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView));
+ inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView, this));
+ m_frontendWebPage = inspectorPage;
+}
+
+void InspectorClientQt::releaseFrontendPage()
+{
+ m_frontendWebPage = 0;
}
void InspectorClientQt::highlight(Node*)
@@ -157,6 +167,30 @@ void InspectorClientQt::storeSetting(const String& key, const String& setting)
#endif // QT_NO_SETTINGS
}
+bool InspectorClientQt::sendMessageToFrontend(const String& message)
+{
+ if (!m_frontendWebPage)
+ return false;
+
+ Page* frontendPage = QWebPagePrivate::core(m_frontendWebPage);
+ if (!frontendPage)
+ return false;
+
+ Frame* frame = frontendPage->mainFrame();
+ if (!frame)
+ return false;
+
+ ScriptController* scriptController = frame->script();
+ if (!scriptController)
+ return false;
+
+ String dispatchToFrontend("WebInspector.dispatchMessageToFrontend(");
+ dispatchToFrontend += message;
+ dispatchToFrontend += ");";
+ scriptController->executeScript(dispatchToFrontend);
+ return true;
+}
+
static String variantToSetting(const QVariant& qvariant)
{
String retVal;
@@ -180,11 +214,12 @@ static QVariant settingToVariant(const String& setting)
return retVal;
}
-InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView)
+InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView, InspectorClientQt* inspectorClient)
: InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page)
, m_inspectedWebPage(inspectedWebPage)
, m_inspectorView(inspectorView)
, m_destroyingInspectorView(false)
+ , m_inspectorClient(inspectorClient)
{
}
@@ -222,6 +257,8 @@ void InspectorFrontendClientQt::closeWindow()
#if ENABLE(INSPECTOR)
m_inspectedWebPage->d->inspectorController()->disconnectFrontend();
#endif
+ m_inspectorClient->releaseFrontendPage();
+
// Clear pointer before deleting WebView to avoid recursive calls to its destructor.
delete m_inspectorView.release();
}
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/WebKit/qt/WebCoreSupport/InspectorClientQt.h
index 4beadab..c996f55 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.h
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.h
@@ -58,13 +58,18 @@ public:
virtual void populateSetting(const String& key, String* value);
virtual void storeSetting(const String& key, const String& value);
+ virtual bool sendMessageToFrontend(const String&);
+
+ void releaseFrontendPage();
+
private:
QWebPage* m_inspectedWebPage;
+ QWebPage* m_frontendWebPage;
};
class InspectorFrontendClientQt : public InspectorFrontendClientLocal {
public:
- InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView);
+ InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView, InspectorClientQt* inspectorClient);
virtual void frontendLoaded();
@@ -88,6 +93,7 @@ private:
OwnPtr<QWebView> m_inspectorView;
QString m_inspectedURL;
bool m_destroyingInspectorView;
+ InspectorClientQt* m_inspectorClient;
};
}
diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index f76868d..8bde5c4 100644
--- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -32,106 +32,209 @@
#include "config.h"
#include "NotificationPresenterClientQt.h"
-#include "DumpRenderTreeSupportQt.h"
#include "Document.h"
+#include "DumpRenderTreeSupportQt.h"
#include "EventNames.h"
#include "KURL.h"
+#include "QtPlatformPlugin.h"
#include "SecurityOrigin.h"
-#include "qwebframe.h"
#include "qwebkitglobal.h"
-#include "qwebpage.h"
#include <QtGui>
-
#if ENABLE(NOTIFICATIONS)
-using namespace WebCore;
+namespace WebCore {
+
+const double notificationTimeout = 10.0;
bool NotificationPresenterClientQt::dumpNotification = false;
+NotificationPresenterClientQt* s_notificationPresenter = 0;
+
+NotificationPresenterClientQt* NotificationPresenterClientQt::notificationPresenter()
+{
+ if (s_notificationPresenter)
+ return s_notificationPresenter;
+
+ s_notificationPresenter = new NotificationPresenterClientQt();
+ return s_notificationPresenter;
+}
+
NotificationIconWrapper::NotificationIconWrapper()
+ : m_closeTimer(this, &NotificationIconWrapper::close)
{
#ifndef QT_NO_SYSTEMTRAYICON
m_notificationIcon = 0;
#endif
+ m_presenter = 0;
}
NotificationIconWrapper::~NotificationIconWrapper()
{
-#ifndef QT_NO_SYSTEMTRAYICON
- delete m_notificationIcon;
-#endif
}
-NotificationPresenterClientQt::NotificationPresenterClientQt(QWebPage* page) : m_page(page)
+void NotificationIconWrapper::close(Timer<NotificationIconWrapper>*)
{
+ NotificationPresenterClientQt::notificationPresenter()->cancel(this);
}
-bool NotificationPresenterClientQt::show(Notification* notification)
+const QString NotificationIconWrapper::title() const
{
- QHash <Notification*, NotificationIconWrapper*>::Iterator end = m_notifications.end();
- QHash <Notification*, NotificationIconWrapper*>::Iterator iter = m_notifications.begin();
+ Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
+ if (notification)
+ return notification->contents().title();
+ return QString();
+}
- if (!notification->replaceId().isEmpty()) {
- while (iter != end) {
- Notification* existingNotification = iter.key();
- if (existingNotification->replaceId() == notification->replaceId() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host())
- break;
- iter++;
- }
- } else
- iter = end;
+const QString NotificationIconWrapper::message() const
+{
+ Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
+ if (notification)
+ return notification->contents().body();
+ return QString();
+}
- if (dumpNotification) {
- if (iter != end) {
- Notification* oldNotification = iter.key();
- printf("REPLACING NOTIFICATION %s\n", oldNotification->isHTML() ? QString(oldNotification->url().string()).toUtf8().constData() : QString(oldNotification->contents().title()).toUtf8().constData());
- }
- if (notification->isHTML())
- printf("DESKTOP NOTIFICATION: contents at %s\n", QString(notification->url().string()).toUtf8().constData());
- else {
- printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
- notification->dir() == "rtl" ? "(RTL)" : "",
- QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(),
- QString(notification->contents().body()).toUtf8().constData());
- }
+const QByteArray NotificationIconWrapper::iconData() const
+{
+ Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
+ QByteArray iconData;
+ if (notification) {
+ if (notification->iconData())
+ iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
}
+ return iconData;
+}
- if (iter != end) {
- sendEvent(iter.key(), eventNames().closeEvent);
- delete m_notifications.take(iter.key());
+NotificationPresenterClientQt::NotificationPresenterClientQt() : m_clientCount(0)
+{
+}
+
+NotificationPresenterClientQt::~NotificationPresenterClientQt()
+{
+ while (!m_notifications.isEmpty()) {
+ NotificationsQueue::Iterator iter = m_notifications.begin();
+ detachNotification(iter.key());
}
+}
+
+void NotificationPresenterClientQt::removeClient()
+{
+ m_clientCount--;
+ if (!m_clientCount) {
+ s_notificationPresenter = 0;
+ delete this;
+ }
+}
+
+void NotificationIconWrapper::notificationClosed()
+{
+ NotificationPresenterClientQt::notificationPresenter()->cancel(this);
+}
+
+bool NotificationPresenterClientQt::show(Notification* notification)
+{
+ // FIXME: workers based notifications are not supported yet.
+ if (notification->scriptExecutionContext()->isWorkerContext())
+ return false;
+ notification->setPendingActivity(notification);
+ if (!notification->replaceId().isEmpty())
+ removeReplacedNotificationFromQueue(notification);
+ if (dumpNotification)
+ dumpShowText(notification);
+ QByteArray iconData;
+ if (notification->iconData())
+ iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
+ displayNotification(notification, iconData);
+ notification->releaseIconData();
+ return true;
+}
+
+void NotificationPresenterClientQt::displayNotification(Notification* notification, const QByteArray& bytes)
+{
NotificationIconWrapper* wrapper = new NotificationIconWrapper();
m_notifications.insert(notification, wrapper);
+ QString title;
+ QString message;
+ // FIXME: download & display HTML notifications
+ if (notification->isHTML())
+ message = notification->url().string();
+ else {
+ title = notification->contents().title();
+ message = notification->contents().body();
+ }
+
+ if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))
+ wrapper->m_presenter = m_platformPlugin.createNotificationPresenter();
+
+ if (!wrapper->m_presenter) {
+#ifndef QT_NO_SYSTEMTRAYICON
+ wrapper->m_closeTimer.startOneShot(notificationTimeout);
+ QPixmap pixmap;
+ if (bytes.length() && pixmap.loadFromData(bytes)) {
+ QIcon icon(pixmap);
+ wrapper->m_notificationIcon = new QSystemTrayIcon(icon);
+ } else
+ wrapper->m_notificationIcon = new QSystemTrayIcon();
+#endif
+ }
+
sendEvent(notification, "display");
+ // Make sure the notification was not cancelled during handling the display event
+ if (m_notifications.find(notification) == m_notifications.end())
+ return;
+
+ if (wrapper->m_presenter) {
+ wrapper->connect(wrapper->m_presenter.get(), SIGNAL(notificationClosed()), wrapper, SLOT(notificationClosed()), Qt::QueuedConnection);
+ wrapper->m_presenter->showNotification(wrapper);
+ return;
+ }
+
#ifndef QT_NO_SYSTEMTRAYICON
- wrapper->m_notificationIcon = new QSystemTrayIcon;
wrapper->m_notificationIcon->show();
wrapper->m_notificationIcon->showMessage(notification->contents().title(), notification->contents().body());
#endif
- return true;
}
void NotificationPresenterClientQt::cancel(Notification* notification)
-{
- if (dumpNotification) {
+{
+ if (dumpNotification && notification->scriptExecutionContext()) {
if (notification->isHTML())
printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
else
printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title()).toUtf8().constData());
}
- QHash <Notification*, NotificationIconWrapper*>::Iterator iter = m_notifications.find(notification);
- if (iter != m_notifications.end())
- sendEvent(iter.key(), eventNames().closeEvent);
+ NotificationsQueue::Iterator iter = m_notifications.find(notification);
+ if (iter != m_notifications.end()) {
+ sendEvent(notification, eventNames().closeEvent);
+ detachNotification(notification);
+ }
+}
+
+void NotificationPresenterClientQt::cancel(NotificationIconWrapper* wrapper)
+{
+ Notification* notification = notificationForWrapper(wrapper);
+ if (notification)
+ cancel(notification);
+}
+
+Notification* NotificationPresenterClientQt::notificationForWrapper(const NotificationIconWrapper* wrapper) const
+{
+ NotificationsQueue::ConstIterator end = m_notifications.end();
+ NotificationsQueue::ConstIterator iter = m_notifications.begin();
+ while (iter != end && iter.value() != wrapper)
+ iter++;
+ if (iter != end)
+ return iter.key();
+ return 0;
}
void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* notification)
{
// Called from ~Notification(), Remove the entry from the notifications list and delete the icon.
- QHash <Notification*, NotificationIconWrapper*>::Iterator iter = m_notifications.find(notification);
+ NotificationsQueue::Iterator iter = m_notifications.find(notification);
if (iter != m_notifications.end())
delete m_notifications.take(notification);
}
@@ -139,7 +242,7 @@ void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* no
void NotificationPresenterClientQt::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback)
{
if (dumpNotification)
- printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", QString(origin->toString()).toUtf8().constData());
+ printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", QString(origin->toString()).toUtf8().constData());
QString originString = origin->toString();
QHash<QString, QList<RefPtr<VoidCallback> > >::iterator iter = m_pendingPermissionRequests.find(originString);
@@ -151,7 +254,7 @@ void NotificationPresenterClientQt::requestPermission(SecurityOrigin* origin, Pa
callbacks.append(cb);
m_pendingPermissionRequests.insert(originString, callbacks);
if (requestPermissionFunction)
- requestPermissionFunction(m_receiver, m_page, originString);
+ requestPermissionFunction(m_receiver, originString);
}
}
@@ -184,19 +287,59 @@ void NotificationPresenterClientQt::allowNotificationForOrigin(const QString& or
}
}
-void NotificationPresenterClientQt::clearNotificationsList()
+void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
{
- m_pendingPermissionRequests.clear();
- while (!m_notifications.isEmpty()) {
- QHash <Notification*, NotificationIconWrapper*>::Iterator iter = m_notifications.begin();
- delete m_notifications.take(iter.key());
+ if (notification->scriptExecutionContext())
+ notification->dispatchEvent(Event::create(eventName, false, true));
+}
+
+void NotificationPresenterClientQt::removeReplacedNotificationFromQueue(Notification* notification)
+{
+ Notification* oldNotification = 0;
+ NotificationsQueue::Iterator end = m_notifications.end();
+ NotificationsQueue::Iterator iter = m_notifications.begin();
+
+ while (iter != end) {
+ Notification* existingNotification = iter.key();
+ if (existingNotification->replaceId() == notification->replaceId() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
+ oldNotification = iter.key();
+ break;
+ }
+ iter++;
+ }
+
+ if (oldNotification) {
+ if (dumpNotification)
+ dumpReplacedIdText(oldNotification);
+ sendEvent(oldNotification, eventNames().closeEvent);
+ detachNotification(oldNotification);
}
}
-void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
+void NotificationPresenterClientQt::detachNotification(Notification* notification)
{
- RefPtr<Event> event = Event::create(eventName, false, true);
- notification->dispatchEvent(event.release());
+ delete m_notifications.take(notification);
+ notification->detachPresenter();
+ notification->unsetPendingActivity(notification);
}
+void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
+{
+ if (notification)
+ printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title()).toUtf8().constData());
+}
+
+void NotificationPresenterClientQt::dumpShowText(Notification* notification)
+{
+ if (notification->isHTML())
+ printf("DESKTOP NOTIFICATION: contents at %s\n", QString(notification->url().string()).toUtf8().constData());
+ else {
+ printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
+ notification->dir() == "rtl" ? "(RTL)" : "",
+ QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(),
+ QString(notification->contents().body()).toUtf8().constData());
+ }
+}
+
+}
#endif // ENABLE(NOTIFICATIONS)
diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
index c949513..1630cd9 100644
--- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
+++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
@@ -34,30 +34,51 @@
#include "Notification.h"
#include "NotificationPresenter.h"
+#include "QtPlatformPlugin.h"
+#include "Timer.h"
+
+#include "qwebkitplatformplugin.h"
#include <QMultiHash>
#include <QSystemTrayIcon>
-
-#if ENABLE(NOTIFICATIONS)
-class QWebPage;
-
namespace WebCore {
+
class Document;
class KURL;
-struct NotificationIconWrapper {
+class NotificationIconWrapper : public QObject, public QWebNotificationData {
+ Q_OBJECT
+public:
NotificationIconWrapper();
~NotificationIconWrapper();
+
+ void close();
+ void close(Timer<NotificationIconWrapper>*);
+ const QString title() const;
+ const QString message() const;
+ const QByteArray iconData() const;
+
+public Q_SLOTS:
+ void notificationClosed();
+
+public:
#ifndef QT_NO_SYSTEMTRAYICON
- QSystemTrayIcon* m_notificationIcon;
+ OwnPtr<QSystemTrayIcon> m_notificationIcon;
#endif
+
+ OwnPtr<QWebNotificationPresenter> m_presenter;
+ Timer<NotificationIconWrapper> m_closeTimer;
};
+#if ENABLE(NOTIFICATIONS)
+
+typedef QHash <Notification*, NotificationIconWrapper*> NotificationsQueue;
+
class NotificationPresenterClientQt : public NotificationPresenter {
public:
- NotificationPresenterClientQt(QWebPage*);
- ~NotificationPresenterClientQt() {}
+ NotificationPresenterClientQt();
+ ~NotificationPresenterClientQt();
/* WebCore::NotificationPresenter interface */
virtual bool show(Notification*);
@@ -66,22 +87,37 @@ public:
virtual void requestPermission(SecurityOrigin*, PassRefPtr<VoidCallback>);
virtual NotificationPresenter::Permission checkPermission(const KURL&);
+ void cancel(NotificationIconWrapper*);
+
void allowNotificationForOrigin(const QString& origin);
- void clearNotificationsList();
static bool dumpNotification;
void setReceiver(QObject* receiver) { m_receiver = receiver; }
+ void addClient() { m_clientCount++; }
+ void removeClient();
+ static NotificationPresenterClientQt* notificationPresenter();
+
+ Notification* notificationForWrapper(const NotificationIconWrapper*) const;
+
private:
void sendEvent(Notification*, const AtomicString& eventName);
- QWebPage* m_page;
- QMultiHash<QString, QList<RefPtr<VoidCallback> > > m_pendingPermissionRequests;
- QHash <Notification*, NotificationIconWrapper*> m_notifications;
+ void displayNotification(Notification*, const QByteArray&);
+ void removeReplacedNotificationFromQueue(Notification*);
+ void detachNotification(Notification*);
+ void dumpReplacedIdText(Notification*);
+ void dumpShowText(Notification*);
+
+ int m_clientCount;
+ QHash<QString, QList<RefPtr<VoidCallback> > > m_pendingPermissionRequests;
+ NotificationsQueue m_notifications;
QObject* m_receiver;
+ QtPlatformPlugin m_platformPlugin;
};
-}
#endif
-#endif
+}
+
+#endif
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
index 6dab4e1..818c67a 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.h
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -24,12 +24,12 @@
#include "FrameView.h"
#include "GraphicsContext.h"
#include "IntRect.h"
+#include "QWebPageClient.h"
+#include "TiledBackingStore.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
-#include "QWebPageClient.h"
-#include "TiledBackingStore.h"
#include <QtCore/qmetaobject.h>
#include <QtCore/qsharedpointer.h>
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
index a097bf7..5e7e6d1 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -85,45 +85,62 @@ void SelectInputMethodWrapper::didHide()
// QtPlatformPlugin
-static QWebKitPlatformPlugin* getPluginObject()
+bool QtPlatformPlugin::load(const QString& file)
+{
+ m_loader.setFileName(file);
+ if (!m_loader.load())
+ return false;
+
+ QObject* obj = m_loader.instance();
+ if (obj) {
+ m_plugin = qobject_cast<QWebKitPlatformPlugin*>(obj);
+ if (m_plugin)
+ return true;
+ }
+
+ m_loader.unload();
+ return false;
+}
+
+bool QtPlatformPlugin::load()
{
const QLatin1String suffix("/webkit/");
const QStringList paths = QCoreApplication::libraryPaths();
- QObject* obj = 0;
- for (int i = 0; !obj && i < paths.count(); ++i) {
+
+ for (int i = 0; i < paths.count(); ++i) {
const QDir dir(paths[i] + suffix);
if (!dir.exists())
continue;
const QStringList files = dir.entryList(QDir::Files);
- for (int i = 0; i < files.count(); ++i) {
- QPluginLoader pluginLoader(dir.absoluteFilePath(files.at(i)));
- if (!pluginLoader.load())
- continue;
- obj = pluginLoader.instance();
- if (obj) {
- QWebKitPlatformPlugin* result = qobject_cast<QWebKitPlatformPlugin*>(obj);
- if (result)
- return result;
- delete obj;
- }
- pluginLoader.unload();
+ for (int j = 0; j < files.count(); ++j) {
+ if (load(dir.absoluteFilePath(files.at(j))))
+ return true;
}
}
- return 0;
+ return false;
}
QtPlatformPlugin::~QtPlatformPlugin()
{
- delete m_plugin;
+ m_loader.unload();
}
QWebKitPlatformPlugin* QtPlatformPlugin::plugin()
{
if (m_loaded)
return m_plugin;
-
m_loaded = true;
- m_plugin = getPluginObject();
+
+ // Plugin path is stored in a static variable to avoid searching for the plugin
+ // more then once.
+ static QString pluginPath;
+
+ if (pluginPath.isNull()) {
+ if (load())
+ pluginPath = m_loader.fileName();
+ } else
+ load(pluginPath);
+
return m_plugin;
}
@@ -140,4 +157,13 @@ QtAbstractWebPopup* QtPlatformPlugin::createSelectInputMethod()
return new SelectInputMethodWrapper(selector);
}
+
+QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter()
+{
+ QWebKitPlatformPlugin* p = plugin();
+ if (!p)
+ return 0;
+ return p->createNotificationPresenter();
+}
+
}
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
index 9b73079..ff10d58 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
@@ -23,9 +23,11 @@
#include "QtAbstractWebPopup.h"
#include <QObject>
+#include <QPluginLoader>
class QWebSelectMethod;
class QWebKitPlatformPlugin;
+class QWebNotificationPresenter;
namespace WebCore {
@@ -51,12 +53,16 @@ public:
~QtPlatformPlugin();
QtAbstractWebPopup* createSelectInputMethod();
+ QWebNotificationPresenter* createNotificationPresenter();
+
+ QWebKitPlatformPlugin* plugin();
private:
bool m_loaded;
QWebKitPlatformPlugin* m_plugin;
-
- QWebKitPlatformPlugin* plugin();
+ QPluginLoader m_loader;
+ bool load();
+ bool load(const QString& file);
};
}
diff --git a/WebKit/qt/docs/qtwebkit-bridge.qdoc b/WebKit/qt/docs/qtwebkit-bridge.qdoc
new file mode 100644
index 0000000..fa93293
--- /dev/null
+++ b/WebKit/qt/docs/qtwebkit-bridge.qdoc
@@ -0,0 +1,427 @@
+/*!
+ \inmodule QtWebKit
+ \page qtwebkit-bridge.html
+ \title The QtWebKit Bridge
+ \contentspage QtWebKit
+ \section1 Overview
+ \section2 The technology
+
+ The QtWebKit bridge is a mechanism that extends WebKit's JavaScript environment to access native
+ objects that are represented as \l{QObject}s. It takes advantage of the \l{QObject} introspection,
+ a part of the \l{Qt Object Model}, which makes it easy to integrate with the dynamic JavaScript environment,
+ for example \l{QObject} properties map directly to JavaScript properties.
+
+ For example, both JavaScript and QObjects have properties: a construct that represent a getter/setter
+ pair under one name.
+
+ \section2 Use Cases
+
+ There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Clients.
+
+ \section3 Web Content in a Native Application
+
+ This is a common use case in classic Qt application, and a design pattern used by several modern
+ applications. For example, an application that contains a media-player, playlist manager, and music store.
+ The playlist manager is usually best authored as a classic desktop application,
+ with the native-looking robust \l{QWidget}s helping with producing that application.
+ The media-player control, which usually looks custom, can be written using \l{The Graphics View framework}
+ or with in a declarative way with \l{QtDeclarative}. The music store, which shows dynamic content
+ from the internet and gets modified rapidly, is best authored in HTML and maintained on the server.
+
+ With the QtWebKit bridge, that music store component can interact with native parts of the application,
+ for example, if a file needs to be saved to a specific location.
+
+ \section3 Thin Client
+
+ Another use case is using Qt as a native backend to a full web application,
+ referred to here as a thin client. In this use-case, the entire UI is driven by
+ HTML, JavaScript and CSS, and native Qt-based components are used to allow that application
+ access to native features not usually exposed to the web, or to enable helper components that
+ are best written with C++.
+
+ An example for such a client is a UI for a video-on-demand service on a TV. The entire content and
+ UI can be kept on the server, served dynamically through HTTP and rendered with WebKit, with additional
+ native components for accessing hardware-specific features like extracting the list of images
+ out of the video.
+
+ \section2 Difference from Other Bridge Technologies
+
+ Of course QtWebKit is not the only bridge technology out there. NPAPI, for example,
+ is a long-time standard or web-native bridging. Due to Qt's meta-object system, full applications
+ built partially with web-technologies are much easier to develop. NPAPI, however, is more geared
+ towards cross-browser plugins, due to it being an accepted standard.
+
+ When developing a plugin for a browser, NPAPI is recommended. When developing a full application
+ that utilizes HTML-rendering, the QtWebKit bridge is recommended.
+
+ \section2 Relationship with QtScript
+
+ The QtWebKit bridge is similar to \l{QtScript}, especially to some of the features described in the
+ \l{Making Applications Scriptable} page. However, as of Qt 4.7, full QtScript API is not supported for web applications.
+ That is planned as an enhancement for future versions. You might notice that some of the features
+ described here are an exact copy of the ones described in the \l{Making Applications Scriptable} page. That is because
+ the QtWebKit bridge is a subset of that functionality, and this page tries to capture the full
+ capabilities available through the QtWebKit bridge specifically.
+
+ \section1 Accessing QObjects
+
+ \section2 Creating the link via QWebFrame
+
+ By default, no QObjects are accessible through the web environment, for security reasons.
+ To enable web content access for a native QObject, the application must explicitly grant it access,
+ using the following call:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 0
+
+ See \l{QWebFrame::addToJavaScriptWindowObject()} for more information.
+
+ \section2 Using Signals and Slots
+
+ The QtWebKit bridge adapts Qt's central \l{Signals and Slots} feature for
+ scripting. There are three principal ways to use signals and slots
+ with the QtWebKit bridge:
+
+ \list
+ \i \bold{Hybrid C++/script}: C++ application code connects a
+ signal to a script function. For example, the script function can be
+ a function that the user has typed in, or one that you have read from a
+ file. This approach is useful if you have a QObject but don't want
+ to expose the object itself to the scripting environment; you just
+ want a script to be able to define how a signal should be reacted
+ to, and leave it up to the C++ side of your application to establish
+ the connection.
+
+ \i \bold{Hybrid script/C++}: A script can connect signals and slots
+ to establish connections between pre-defined objects that the
+ application exposes to the scripting environment. In this scenario,
+ the slots themselves are still written in C++, but the definition of
+ the connections is fully dynamic (script-defined).
+
+ \i \bold{Purely script-defined}: A script can both define signal
+ handler functions (effectively "slots written in JavaScript"),
+ \e{and} set up the connections that utilize those handlers. For
+ example, a script can define a function that will handle the
+ QLineEdit::returnPressed() signal, and then connect that signal to the
+ script function.
+ \endlist
+
+ Note that QtScript functions such as qScriptConnect are unavilable in the web environment.
+
+ \section3 Signal to Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 6
+
+ In this form of connection, the argument to \c{connect()} is the
+ function to connect to the signal.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 7
+
+ The argument can be a JavaScript function, as in the above
+ example, or it can be a QObject slot, as in
+ the following example:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 8
+
+ When the argument is a QObject slot, the argument types of the
+ signal and slot do not necessarily have to be compatible;
+ If necessary, the QtWebKit bridge will, perform conversion of the signal
+ arguments to match the argument types of the slot.
+
+ To disconnect from a signal, you invoke the signal's
+ \c{disconnect()} function, passing the function to disconnect
+ as argument:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 9
+
+ When a script function is invoked in response to a signal, the
+ \c this object will be the Global Object.
+
+ \section3 Signal to Member Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10
+
+ In this form of the \c{connect()} function, the first argument
+ is the object that will be bound to the variable, \c this, when
+ the function specified using the second argument is invoked.
+
+ If you have a push button in a form, you typically want to do
+ something involving the form in response to the button's
+ \c{clicked} signal; passing the form as the \c this object
+ makes sense in such a case.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 11
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 12
+
+ \section3 Signal to Named Member Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 14
+
+ This form of the \c{connect()} function requires that the first argument is
+ the object that will be bound to the variable \c{this} when a function is
+ invoked in response to the signal. The second argument specifies the
+ name of a function that is connected to the signal, and this refers to a
+ member function of the object passed as the first argument (thisObject
+ in the above scheme).
+
+ Note that the function is resolved when the connection is made, not
+ when the signal is emitted.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 15
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 17
+
+ \section3 Error Handling
+
+ When \c{connect()} or \c{disconnect()} succeeds, the function will
+ return \c{undefined}; otherwise, it will throw a script exception.
+ You can obtain an error message from the resulting \c{Error} object.
+ Example:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 18
+
+ \section3 Emitting Signals from Scripts
+
+ To emit a signal from script code, you simply invoke the signal
+ function, passing the relevant arguments:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 19
+
+ It is currently not possible to define a new signal in a script;
+ i.e., all signals must be defined by C++ classes.
+
+ \section3 Overloaded Signals and Slots
+
+ When a signal or slot is overloaded, the QtWebKit bridge will attempt to
+ pick the right overload based on the actual types of the QScriptValue arguments
+ involved in the function invocation. For example, if your class has slots
+ \c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following
+ script code will behave reasonably:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 20
+
+ You can specify a particular overload by using array-style property access
+ with the \l{QMetaObject::normalizedSignature()}{normalized signature} of
+ the C++ function as the property name:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 21
+
+ If the overloads have different number of arguments, the QtWebKit bridge will
+ pick the overload with the argument count that best matches the
+ actual number of arguments passed to the slot.
+
+ For overloaded signals, JavaScript will throw an error if you try to connect
+ to the signal by name; you have to refer to the signal with the full
+ normalized signature of the particular overload you want to connect to.
+
+ \section3 Invokable Methods
+
+ Both slots and signals are invokable from script by default. In addition, it's also
+ possible to define a method that's invokable from script without it being a signal or a slot.
+ This is especially useful for functions with return types, as slots normally do not return anything
+ (it would be meaningless to return values from a slot, as the connected signals don't handle the returned data).
+ To make a non-slot method invokable, simply add the Q_INVOKABLE macro before its definition:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 22
+
+ \section2 Accessing Properties
+
+ The properties of the QObject are available as properties
+ of the corresponding JavaScript object. When you manipulate
+ a property in script code, the C++ get/set method for that
+ property will automatically be invoked. For example, if your
+ C++ class has a property declared as follows:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 23
+
+ then script code can do things like the following:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 24
+
+ \section2 Accessing Child QObjects
+
+ Every named child of the QObject (that is, for which
+ QObject::objectName() is not an empty string) is by default available as
+ a property of the JavaScript wrapper object. For example,
+ if you have a QDialog with a child widget whose \c{objectName} property is
+ \c{"okButton"}, you can access this object in script code through
+ the expression
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 25
+
+ Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
+ the name in script code to, for example, rename an object:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 26
+
+ \section2 Data types
+
+ When calling slots, receiving signals or accessing properties, usually some payload is involved.
+ For example, a property "text" might return a \l{QString} parameter.
+ The QtWebKit bridge does the job of converting between a given JavaScript data-type, and the
+ expected or given Qt type. Each Qt type has a coresponding set of rules of how JavaScript treats it.
+
+ The data type conversions are also applicable for the data returned from non-void invokable methods.
+
+ \section3 Numbers
+
+ All Qt numeric data types are converted to or from a JavaScript number. These include int, short, float,
+ double, and the porable Qt types (qreal, qint etc). A special case is \l{QChar};
+ If a slot expects a QChar, the QtWebKit bridge would use the unicode value in case of a number,
+ or the first character in a string.
+
+ Note that non-standard (typedefed) number types are not automatically converted to
+ or from a JavaScript number - it's advised to use standard number types for signal, slots
+ and properties.
+
+ When a non-number is passed as an argument to a method or property that expects a number,
+ the appropriate JavaScript conversion function (parseInt / parseFloat) would be used.
+
+ \section3 Strings
+
+ When JavaScript accesses methods or properties that expect a \l{QString}, the QtWebKit bridge
+ will automatically convert the value to a string (if it is not already a string), using the
+ built-in JavaScript toString method.
+
+ When a QString is passed to JavaScript from a signal or a property, The QtWebKit bridge will
+ convert it into a JavaScript string.
+
+ \section3 Date & Time
+
+ Both \l{QDate}, \l{QTime} and \l{QDateTime} are automatically translated to or from the JavaScript
+ Date object. If a number were passed as an argument to a method that expects one of the date/time
+ types, the QtWebKit bridge would treat it as a timestamp. If a sting is passed, QtWebKit would
+ try different Qt date parsing functions to find the right one.
+
+ \section3 Regular Expressions
+
+ The QtWebKit bridge would automatically convert JavaScript RegEx object to a \l{QRegExp}.
+ If a string is passed to a method expecting a \l{QRegExp}, the string would be converted
+ to that \l{QRegExp}.
+
+ \section3 Lists
+
+ The QtWebKit bridge treats several types of lists in a special way: \l{QVariantList}, \l{QStringList},
+ \l{QObjectList} and \l{QList}<int>. When a slot or property expects one of those list types,
+ the QtWebKit bridge would try to convert a JavaScript array into that type, converting each of
+ the array's elements to the single-element type of the list.
+
+ The most useful type of list is perhaps \l{QVariantList}, which can be converted to from any
+ JavaScript array.
+
+ \section3 Compound (JSON) objects
+
+ JavaScript compound objects, also known as JSON objects, are variables that hold a list
+ of key-value pairs, where all the keys are strings and the values can have any type.
+ This translates very well to \l{QVariantMap}, which is nothing more than a \l{QMap} of \l{QString}
+ to \l{QVariant}.
+
+ The seamless conversion between JSON objects and \l{QVariantMap} allows for a very convenient
+ way of passing arbitrary structured data between C++ and the JavaScript environment. The native \l{QObject} has
+ to make sure that compound values are converted to \l{QVariantMap}s and \l{QVariantList}s, and JavaScript is
+ guaranteed to receive them in a meaningful way.
+
+ Note that types that are not supported by JSON, such as JavaScript functions and getters/setters,
+ are not converted.
+
+ \section3 QVariants
+
+ When a slot or property accepts a \l{QVariant}, the QtWebKit bridge would create a \l{QVariant} that best
+ matches the argument passed by JavaScript. A string, for example, would become a \l{QVariant} holding a \l{QString},
+ a normal JSON object would become a \l{QVariantMap}, and a JavaScript array would become a \l{QVariantList}.
+
+ Using \l{QVariant}s generously in C++ in that way makes C++ programming feel a bit more like JavaScript programming,
+ as it adds another level of indirection. Passing \l{QVariant}s around like this q is very flexible, as the program can figure out
+ the type of argument in runtime just like JavaScript would do, but it also takes away from the type-safety and robust
+ nature of C++. It's recommended to use \l{QVariant}s only for convenience high-level functions, and to keep most of your
+ \l{QObject}s somewhat type-safe.
+
+ \section3 QObjects
+
+ A pointer to a \l{QObject} or a \l{QWidget} can be passed as payload in signals, slots and properties. That object
+ can then be used like an object that's exposed directly; i.e. its slots can be invoked, its signals connected to etc.
+ However, this functionality is fairly limited - the type used has to be \l{QObject}* or \l{QWidget}*. If the type
+ specified is a pointer to a non-\l{QWidget} subclass of \l{QObject}, the QtWebKit bridge would not recognize it to be
+ a \l{QObject}.
+
+ In general its advised to use care when passing \l{QObject}s as arguments, as those objects don't become owned by
+ the JavaScript engine; That means that the application developer has to be extra careful not to try to access
+ \l{QObject}s that have already been deleted by the native environment.
+
+ \section3 Pixmaps and Images
+
+ \since 4.7
+
+ The QtWebKit bridge handles \l{QPixmap}s and \l{QImage}s in a special way. Since QtWebKit stores \l{QPixmap}s to
+ represent HTML images, \l{QPixmap}s coming from the native environment can be used directly inside WebKit.
+ A \l{QImage} or a \l{QPixmap} coming from the Qt environment would convert to an intermediate JavaScript object,
+ that can be represented like this:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 1
+
+ The JavaScript environment can then use the pixmap it gets from Qt and display it inside the HTML environment,
+ by assigning it to an existing <img /> element using assignToHTMLImageElement. It can also use the toDataURL() function,
+ which allows using the pixmap as the src attribute of an image or as a background-image url. Note that the toDataURL()
+ function is costly and should be used with caution.
+
+ Example code:
+
+ C++:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 2
+
+ HTML:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 3
+
+ When a Qt object expects a \l{QImage} or a \l{QPixmap} as input, and the argument passed is an HTML image element,
+ the QtWebKit bridge would convert the pixmap assigned to that image element into a \l{QPixmap} or a \l{QImage}.
+
+ \since 4.7
+
+ \section3 QWebElement
+
+ A signal, slot or property that expects or returns a \l{QWebElement} can work seamlessly with JavaScript references
+ to DOM elements. The JavaScript environment can select DOM elements, keep them in variables, then pass them to Qt as
+ a \l{QWebElement}, and receive them back. Example:
+
+ C++:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 4
+
+ HTML:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 5
+
+ This is specifically useful to create custom renderers or extensions to the web environment. Instead of forcing Qt
+ to select the element, the web environment already selects the element and then send the selected element directly to Qt.
+
+ Note that \l{QWebElement}s are not thread safe - an object handling them has to live in the UI thread.
+
+ \section1 Architecture issues
+
+ \section2 Limiting the Scope of the Hybrid Layer
+
+ When using QtWebKit's hybrid features, it is a common pitfall to make the API exposed to JavaScript very rich and
+ use all its features. This, however, leads to complexity and can create bugs that are hard to trace.
+ Instead, it is advisable to keep the hybrid layer small and manageable: create a gate only when
+ there's an actual need for it, i.e. there's a new native enabler that requires a direct interface
+ to the application layer. Sometimes new functionality is better handled internally in the native layer
+ or in the web layer; simplicity is your friend.
+
+ This usually becomes more apparent when the hybrid layer can create or destroy objects, or uses
+ signals slots or properties with a \l{QObject}* argument. It is advised to be very careful and to treat
+ an exposed \l{QObject} as a system - with careful attention to memory management and object ownership.
+
+ \section2 Internet Security
+
+ When exposing native object to an open web environment, it is importwhichant to understand the security
+ implications. Think whether the exposed object enables the web environment access to things that
+ shouldn't be open, and whether the web content loaded by that web page comes from a trusted. In general, when
+ exposing native QObjects that give the web environment access to private information or to functionality
+ that's potentially harmful to the client, such exposure should be balanced by limiting the web page's
+ access to trusted URLs only with HTTPS, and by utilizing other measures as part of a security strategy.
+
+
+
+*/
diff --git a/WebKit/qt/docs/qtwebkit.qdoc b/WebKit/qt/docs/qtwebkit.qdoc
index c6dd550..d3f5502 100644
--- a/WebKit/qt/docs/qtwebkit.qdoc
+++ b/WebKit/qt/docs/qtwebkit.qdoc
@@ -20,8 +20,9 @@
scripted with JavaScript.
A bridge between the JavaScript execution environment and the Qt object
- model makes it possible for custom QObjects to be scripted. Integration
- with the Qt networking module enables Web pages to be transparently loaded
+ model makes it possible for custom QObjects to be scripted. For detailed
+ documentation see \l{The QtWebkit Bridge}.
+ Integration with the Qt networking module enables Web pages to be transparently loaded
from Web servers, the local file system or even the Qt resource system.
In addition to providing pure rendering features, HTML documents can be
diff --git a/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp b/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
new file mode 100644
index 0000000..62eeeca
--- /dev/null
+++ b/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
@@ -0,0 +1,177 @@
+
+void wrapInFunction()
+{
+
+ //! [0]
+ // ...
+ QWebFrame *frame = myWebPage->mainFrame();
+ frame->addToJavaScriptWindowObject("someNameForMyObject", myObject);
+ // ...
+ //! [0]
+#if 0
+ //! [1]
+ {
+ width: ...,
+ height: ...,
+ toDataURL: function() { ... },
+ assignToHTMLImageElement: function(element) { ... }
+ }
+ //! [1]
+#endif
+ //! [2]
+ class MyObject : QObject {
+ Q_OBJECT
+ Q_PROPERTY(QPixmap myPixmap READ getPixmap)
+
+ public:
+ QPixmap getPixmap() const;
+ };
+
+ /* ... */
+
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+
+ //! [2]
+#if 0
+ //! [3]
+ <html>
+ <head>
+ <script>
+ function loadImage() {
+ myObject.myPixmap.assignToHTMLImageElement(document.getElementById("imageElement"));
+ }
+ </script>
+ </head>
+ <body onload="loadImage()">
+ <img id="imageElement" width="300" height="200" />
+ </body>
+ </html>
+ //! [3]
+#endif
+ //! [4]
+ class MyObject : QObject {
+ Q_OBJECT
+
+ public slots:
+ void doSomethingWithWebElement(const QWebElement&);
+ };
+
+ /* ... */
+
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+
+ //! [4]
+#if 0
+ //! [5]
+ <html>
+ <head>
+ <script>
+ function runExample() {
+ myObject.doSomethingWithWebElement(document.getElementById("someElement"));
+ }
+ </script>
+ </head>
+ <body onload="runExample()">
+ <span id="someElement">Text</span>
+ </body>
+ </html>
+ //! [5]
+ //! [6]
+ connect(function);
+ //! [6]
+ //! [7]
+ function myInterestingScriptFunction() { ... }
+ ...
+ myQObject.somethingChanged.connect(myInterestingScriptFunction);
+ //! [7]
+ //! [8]
+ myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+ //! [8]
+ //! [9]
+ myQObject.somethingChanged.disconnect(myInterestingFunction);
+ myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+ //! [9]
+ //! [10]
+ connect(thisObject, function)
+ //! [10]
+ //! [11]
+ var obj = { x: 123 };
+ var fun = function() { print(this.x); };
+ myQObject.somethingChanged.connect(obj, fun);
+ //! [11]
+ //! [12]
+ myQObject.somethingChanged.disconnect(obj, fun);
+ //! [12]
+ //! [13]
+ connect(function);
+ //! [13]
+ //! [14]
+ connect(thisObject, functionName)
+ //! [14]
+ //! [15]
+ var obj = { x: 123, fun: function() { print(this.x); } };
+ myQObject.somethingChanged.connect(obj, "fun");
+ //! [15]
+ //! [16]
+ connect(function);
+ //! [16]
+ //! [17]
+ myQObject.somethingChanged.disconnect(obj, "fun");
+ //! [17]
+ //! [18]
+ try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+ } catch (e) {
+ print(e);
+ }
+ //! [18]
+ //! [19]
+ myQObject.somethingChanged("hello");
+ //! [19]
+ //! [20]
+ myQObject.myOverloadedSlot(10); // will call the int overload
+ myQObject.myOverloadedSlot("10"); // will call the QString overload
+ //! [20]
+ //! [21]
+ myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+ myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+ //! [21]
+ //! [22]
+ class MyObject : public QObject
+ {
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+ };
+ //! [22]
+ //! [23]
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+ //! [23]
+ //! [24]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [24]
+ //! [25]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [25]
+ //! [26]
+ myDialog.okButton
+ myDialog.okButton.objectName = "cancelButton";
+ // from now on, myDialog.cancelButton references the button
+ //! [26]
+#endif
+}
+
diff --git a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
new file mode 100644
index 0000000..c992236
--- /dev/null
+++ b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "WebNotificationPresenter.h"
+
+WebNotificationWidget::WebNotificationWidget()
+ : QWidget()
+{
+}
+
+WebNotificationWidget::~WebNotificationWidget()
+{
+}
+
+void WebNotificationWidget::showNotification(const QWebNotificationData* data)
+{
+ QPixmap mask;
+ QPainter painter(&mask);
+ painter.fillRect(0, 0, 300, 100, Qt::lightGray);
+ QBitmap bitmap(mask);
+ setMask(bitmap);
+ QGridLayout* layout = new QGridLayout(this);
+ layout->addWidget(new QLabel(data->title()), 0, 0, 1, 5);
+ int messagePosition = 0;
+ QPixmap pixmap;
+ if (data->iconData().length() && pixmap.loadFromData(data->iconData())) {
+ QLabel* label = new QLabel;
+ label->setPixmap(pixmap);
+ layout->addWidget(label, 1, 0, 1, 1);
+ messagePosition++;
+ }
+ QLabel* messageLabel = new QLabel(data->message());
+ messageLabel->setMask(bitmap);
+ messageLabel->setWordWrap(true);
+ layout->addWidget(messageLabel, 1, messagePosition, 1, 5 - messagePosition);
+ setLayout(layout);
+ setFixedSize(300, 100);
+ show();
+}
+
+bool WebNotificationWidget::event(QEvent* ev)
+{
+ if (ev->type() == QEvent::MouseButtonRelease || ev->type() == QEvent::Close) {
+ emit notificationClosed();
+ return true;
+ }
+ return QWidget::event(ev);
+}
+
diff --git a/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h
new file mode 100644
index 0000000..a2563b2
--- /dev/null
+++ b/WebKit/qt/examples/platformplugin/WebNotificationPresenter.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WebNotificationPresenter_h
+#define WebNotificationPresenter_h
+
+#include "qwebkitplatformplugin.h"
+#include <QtGui>
+
+class WebNotificationWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ WebNotificationWidget();
+ virtual ~WebNotificationWidget();
+
+ void showNotification(const QWebNotificationData*);
+ bool event(QEvent*);
+
+Q_SIGNALS:
+ void notificationClosed();
+};
+
+class WebNotificationPresenter : public QWebNotificationPresenter
+{
+ Q_OBJECT
+public:
+ WebNotificationPresenter()
+ : QWebNotificationPresenter()
+ {
+ m_widget = new WebNotificationWidget();
+ connect(m_widget, SIGNAL(notificationClosed()), this, SIGNAL(notificationClosed()));
+ }
+ virtual ~WebNotificationPresenter() { m_widget->close(); delete m_widget; }
+
+ void showNotification(const QWebNotificationData* data) { m_widget->showNotification(data); }
+
+private:
+ WebNotificationWidget* m_widget;
+};
+
+#endif // WebNotificationsUi_h
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
index 79e583d..1f3877c 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.cpp
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
@@ -210,7 +210,15 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data)
bool WebPlugin::supportsExtension(Extension extension) const
{
- return extension == MultipleSelections;
+ if (extension == MultipleSelections)
+ return true;
+ if (extension == Notifications)
+#if ENABLE_NOTIFICATIONS
+ return true;
+#else
+ return false;
+#endif
+ return false;
}
Q_EXPORT_PLUGIN2(qwebselectim, WebPlugin)
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.h b/WebKit/qt/examples/platformplugin/WebPlugin.h
index a46a07b..9a99d0b 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.h
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.h
@@ -21,6 +21,7 @@
#define WEBPLUGIN_H
#include "qwebkitplatformplugin.h"
+#include "WebNotificationPresenter.h"
#include <QDialog>
@@ -88,8 +89,9 @@ class WebPlugin : public QObject, public QWebKitPlatformPlugin
public:
virtual QWebSelectMethod* createSelectInputMethod() const { return new WebPopup(); }
virtual bool supportsExtension(Extension extension) const;
+ virtual QWebNotificationPresenter* createNotificationPresenter() const {
+ return new WebNotificationPresenter();
+ }
};
-
-
#endif // WEBPLUGIN_H
diff --git a/WebKit/qt/examples/platformplugin/platformplugin.pro b/WebKit/qt/examples/platformplugin/platformplugin.pro
index c5c665b..9275665 100644
--- a/WebKit/qt/examples/platformplugin/platformplugin.pro
+++ b/WebKit/qt/examples/platformplugin/platformplugin.pro
@@ -6,8 +6,12 @@ CONFIG += plugin
DESTDIR = $$[QT_INSTALL_PLUGINS]/webkit
SOURCES += \
- WebPlugin.cpp
+ WebPlugin.cpp \
+ WebNotificationPresenter.cpp
HEADERS += \
WebPlugin.h \
- qwebkitplatformplugin.h
+ qwebkitplatformplugin.h \
+ WebNotificationPresenter.h
+
+!contains(DEFINES, ENABLE_NOTIFICATIONS=.): DEFINES += ENABLE_NOTIFICATIONS=1
diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index 7d024ae..bac618c 100644
--- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -58,20 +58,43 @@ Q_SIGNALS:
void didHide();
};
+class QWebNotificationData
+{
+public:
+ virtual const QString title() const = 0;
+ virtual const QString message() const = 0;
+ virtual const QByteArray iconData() const = 0;
+};
+
+class QWebNotificationPresenter : public QObject
+{
+ Q_OBJECT
+public:
+ QWebNotificationPresenter() {}
+ virtual ~QWebNotificationPresenter() {}
+
+ virtual void showNotification(const QWebNotificationData*) = 0;
+
+Q_SIGNALS:
+ void notificationClosed();
+};
+
class QWebKitPlatformPlugin
{
public:
- inline ~QWebKitPlatformPlugin() {}
+ virtual ~QWebKitPlatformPlugin() {}
enum Extension {
- MultipleSelections
+ MultipleSelections,
+ Notifications
};
- virtual QWebSelectMethod* createSelectInputMethod() const = 0;
virtual bool supportsExtension(Extension extension) const = 0;
+ virtual QWebSelectMethod* createSelectInputMethod() const = 0;
+ virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
};
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.0");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.2");
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/qtwebkit_version.pri b/WebKit/qt/qt_webkit_version.pri
index 1656f2d..1656f2d 100644
--- a/WebKit/qt/qtwebkit_version.pri
+++ b/WebKit/qt/qt_webkit_version.pri
diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def
index 203261a..93fd33c 100644
--- a/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -770,3 +770,9 @@ EXPORTS
_ZN23DumpRenderTreeSupportQt39setWillSendRequestReturnsNullOnRedirectEb @769 NONAME
_ZN23DumpRenderTreeSupportQt40garbageCollectorCollectOnAlternateThreadEb @770 NONAME
_ZN23DumpRenderTreeSupportQt40setDomainRelaxationForbiddenForURLSchemeEbRK7QString @771 NONAME
+ _ZN23DumpRenderTreeSupportQt18setEditingBehaviorEP8QWebPageRK7QString @ 772 NONAME
+ _ZN23DumpRenderTreeSupportQt24setNotificationsReceiverEP7QObject @ 773 NONAME
+ _ZN23DumpRenderTreeSupportQt26allowNotificationForOriginERK7QString @ 774 NONAME
+ _ZN23DumpRenderTreeSupportQt26setCheckPermissionFunctionEPFvP7QObjectRK4QUrlR22NotificationPermissionE @ 775 NONAME
+ _ZN23DumpRenderTreeSupportQt28setRequestPermissionFunctionEPFvP7QObjectRK7QStringE @ 776 NONAME
+ _ZN23DumpRenderTreeSupportQt31removeWhiteListAccessFromOriginERK7QStringS2_S2_b @ 777 NONAME
diff --git a/WebKit/qt/tests/qgraphicswebview/resources/input_types.html b/WebKit/qt/tests/qgraphicswebview/resources/input_types.html
new file mode 100644
index 0000000..18ab314
--- /dev/null
+++ b/WebKit/qt/tests/qgraphicswebview/resources/input_types.html
@@ -0,0 +1,8 @@
+<html><body>
+<input type='text' maxlength='20' style='position: absolute; left: 10px; top: 0px; height: 50px; width: 100px;'/><br>
+<input type='password' style='position: absolute; left: 10px; top: 50px; height: 50px; width: 100px;'/><br>
+<input type='tel' style='position: absolute; left: 10px; top: 100px; height: 50px; width: 100px;'/><br>
+<input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
+<input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
+<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
+</body></html> \ No newline at end of file
diff --git a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index ebe847d..e06524d 100644
--- a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -19,6 +19,7 @@
#include "../util.h"
#include <QtTest/QtTest>
+#include <QGraphicsSceneMouseEvent>
#include <QGraphicsView>
#include <qgraphicswebview.h>
#include <qwebpage.h>
@@ -32,6 +33,7 @@ private slots:
void qgraphicswebview();
void crashOnViewlessWebPages();
void microFocusCoordinates();
+ void focusInputTypes();
};
void tst_QGraphicsWebView::qgraphicswebview()
@@ -75,6 +77,29 @@ private slots:
}
};
+class GraphicsWebView : public QGraphicsWebView
+{
+ Q_OBJECT
+
+public:
+ GraphicsWebView(QGraphicsItem* parent = 0): QGraphicsWebView(parent)
+ {
+ }
+
+ void fireMouseClick(QPointF point) {
+ QGraphicsSceneMouseEvent presEv(QEvent::GraphicsSceneMousePress);
+ presEv.setPos(point);
+ presEv.setButton(Qt::LeftButton);
+ presEv.setButtons(Qt::LeftButton);
+ QGraphicsSceneMouseEvent relEv(QEvent::GraphicsSceneMouseRelease);
+ relEv.setPos(point);
+ relEv.setButton(Qt::LeftButton);
+ relEv.setButtons(Qt::LeftButton);
+ QGraphicsWebView::sceneEvent(&presEv);
+ QGraphicsWebView::sceneEvent(&relEv);
+ }
+};
+
void tst_QGraphicsWebView::crashOnViewlessWebPages()
{
QGraphicsScene scene;
@@ -140,6 +165,57 @@ void tst_QGraphicsWebView::microFocusCoordinates()
delete view;
}
+void tst_QGraphicsWebView::focusInputTypes()
+{
+ QWebPage* page = new QWebPage;
+ GraphicsWebView* webView = new GraphicsWebView;
+ webView->setPage( page );
+ QGraphicsView* view = new QGraphicsView;
+ QGraphicsScene* scene = new QGraphicsScene(view);
+ view->setScene(scene);
+ scene->addItem(webView);
+ view->setGeometry(QRect(0,0,500,500));
+ QCoreApplication::processEvents();
+ QUrl url("qrc:///resources/input_types.html");
+ page->mainFrame()->load(url);
+ page->mainFrame()->setFocus();
+
+ QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+
+ // 'text' type
+ webView->fireMouseClick(QPointF(20.0, 10.0));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+#else
+ QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+#endif
+
+ // 'password' field
+ webView->fireMouseClick(QPointF(20.0, 60.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText);
+
+ // 'tel' field
+ webView->fireMouseClick(QPointF(20.0, 110.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly);
+
+ // 'number' field
+ webView->fireMouseClick(QPointF(20.0, 160.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly);
+
+ // 'email' field
+ webView->fireMouseClick(QPointF(20.0, 210.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly);
+
+ // 'url' field
+ webView->fireMouseClick(QPointF(20.0, 260.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly);
+
+ delete webView;
+ delete view;
+}
+
+
QTEST_MAIN(tst_QGraphicsWebView)
diff --git a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
new file mode 100644
index 0000000..c91bb9c
--- /dev/null
+++ b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>resources/input_types.html</file>
+</qresource>
+</RCC>
+
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 630ccce..5e6f4e6 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -77,6 +77,7 @@ private slots:
void acceptNavigationRequest();
void infiniteLoopJS();
+ void geolocationRequestJS();
void loadFinished();
void acceptNavigationRequestWithNewWindow();
void userStyleSheet();
@@ -123,6 +124,7 @@ private slots:
void testJSPrompt();
void showModalDialog();
void testStopScheduledPageRefresh();
+ void findText();
private:
QWebView* m_view;
@@ -213,16 +215,52 @@ public:
public slots:
bool shouldInterruptJavaScript() {
- return true;
+ return true;
+ }
+ bool allowGeolocationRequest(QWebFrame *frame)
+ {
+ return m_allowGeolocation;
+ }
+
+public:
+ void setGeolocationPermission(bool allow)
+ {
+ m_allowGeolocation = allow;
}
+
+private:
+ bool m_allowGeolocation;
};
void tst_QWebPage::infiniteLoopJS()
{
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
- m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());
+ m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
m_view->page()->mainFrame()->evaluateJavaScript("var run = true;var a = 1;while(run){a++;}");
+ delete newPage;
+}
+
+void tst_QWebPage::geolocationRequestJS()
+{
+ JSTestPage* newPage = new JSTestPage(m_view);
+ newPage->setGeolocationPermission(false);
+ m_view->setPage(newPage);
+ m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
+ m_view->page()->mainFrame()->evaluateJavaScript("var errorCode = 0; function error(err) { errorCode = err.code; } function success(pos) { } navigator.geolocation.getCurrentPosition(success, error)");
+ QTest::qWait(2000);
+ QVariant empty = m_view->page()->mainFrame()->evaluateJavaScript("errorCode");
+
+ QVERIFY(empty.type() == QVariant::Double && empty.toInt() != 0);
+
+ newPage->setGeolocationPermission(true);
+ m_view->page()->mainFrame()->evaluateJavaScript("errorCode = 0; navigator.geolocation.getCurrentPosition(success, error);");
+ empty = m_view->page()->mainFrame()->evaluateJavaScript("errorCode");
+
+ //http://dev.w3.org/geo/api/spec-source.html#position
+ //PositionError: const unsigned short PERMISSION_DENIED = 1;
+ QVERIFY(empty.type() == QVariant::Double && empty.toInt() != 1);
+ delete newPage;
}
void tst_QWebPage::loadFinished()
@@ -2116,5 +2154,21 @@ void tst_QWebPage::testStopScheduledPageRefresh()
QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank"));
}
+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());
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ QStringList words = (QStringList() << "foo" << "bar");
+ foreach (QString subString, words) {
+ m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
+ QCOMPARE(m_page->selectedText(), subString);
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ }
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/WebKit/qt/tests/qwebview/resources/input_types.html b/WebKit/qt/tests/qwebview/resources/input_types.html
new file mode 100644
index 0000000..18ab314
--- /dev/null
+++ b/WebKit/qt/tests/qwebview/resources/input_types.html
@@ -0,0 +1,8 @@
+<html><body>
+<input type='text' maxlength='20' style='position: absolute; left: 10px; top: 0px; height: 50px; width: 100px;'/><br>
+<input type='password' style='position: absolute; left: 10px; top: 50px; height: 50px; width: 100px;'/><br>
+<input type='tel' style='position: absolute; left: 10px; top: 100px; height: 50px; width: 100px;'/><br>
+<input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
+<input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
+<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
+</body></html> \ No newline at end of file
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 100399e..835ad82 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -30,8 +30,6 @@
#include <qwebkitversion.h>
#include <qwebframe.h>
-#include <QDebug>
-
class tst_QWebView : public QObject
{
Q_OBJECT
@@ -49,10 +47,25 @@ private slots:
void reusePage_data();
void reusePage();
void microFocusCoordinates();
+ void focusInputTypes();
void crashTests();
};
+class WebView : public QWebView
+{
+ Q_OBJECT
+
+public:
+ void fireMouseClick(QPoint point) {
+ QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QWebView::mousePressEvent(&presEv);
+ QWebView::mousePressEvent(&relEv);
+ }
+
+};
+
// This will be called before the first test function is executed.
// It is only called once.
void tst_QWebView::initTestCase()
@@ -230,6 +243,52 @@ void tst_QWebView::microFocusCoordinates()
QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-50)), currentMicroFocus.toRect());
}
+void tst_QWebView::focusInputTypes()
+{
+ QWebPage* page = new QWebPage;
+ WebView* webView = new WebView;
+ webView->setPage( page );
+
+ QCoreApplication::processEvents();
+ QUrl url("qrc:///resources/input_types.html");
+ page->mainFrame()->load(url);
+ page->mainFrame()->setFocus();
+
+ QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+
+ // 'text' type
+ webView->fireMouseClick(QPoint(20, 10));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+#else
+ QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+#endif
+
+ // 'password' field
+ webView->fireMouseClick(QPoint(20, 60));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText);
+
+ // 'tel' field
+ webView->fireMouseClick(QPoint(20, 110));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly);
+
+ // 'number' field
+ webView->fireMouseClick(QPoint(20, 160));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly);
+
+ // 'email' field
+ webView->fireMouseClick(QPoint(20, 210));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly);
+
+ // 'url' field
+ webView->fireMouseClick(QPoint(20, 260));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly);
+
+ delete webView;
+
+}
+
QTEST_MAIN(tst_QWebView)
#include "tst_qwebview.moc"
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/WebKit/qt/tests/qwebview/tst_qwebview.qrc
index 5abc64c..8710a9a 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.qrc
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.qrc
@@ -2,6 +2,7 @@
<qresource>
<file>resources/index.html</file>
<file>resources/frame_a.html</file>
+ <file>resources/input_types.html</file>
</qresource>
</RCC>
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 2979556..85f67b6 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,99 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::~WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-06-10 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Reduce FrameView.h includes to speed up build times
+ https://bugs.webkit.org/show_bug.cgi?id=40408
+
+ Another fix for Windows.
+
+ * WebView.cpp:
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::~WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ * WebCoreSupport/WebInspectorClient.h:
+ (WebInspectorClient::frontendClosing):
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::~WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-06-08 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Ojan Vafai and Darin Adler.
+
+ Refactor platform dependent editing behavior code out of Settings
+ https://bugs.webkit.org/show_bug.cgi?id=39854
+
+ EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to
+ EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly.
+
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-06-04 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ WebFrame::paintDocumentRectToContextAtPoint doesn't paint scrollbars
+ https://bugs.webkit.org/show_bug.cgi?id=40034
+ <rdar://problem/7799848>
+
+ * WebFrame.cpp:
+ (WebFrame::paintScrollViewRectToContextAtPoint): Renamed from paintDocumentRectToContextAtPoint.
+ Call paint() instead of paintContents(). Also move the dirtyRect to counteract the moving that happens in paint().
+
+ Just renaming changes:
+ * Interfaces/IWebFramePrivate.idl:
+ * Interfaces/IWebViewPrivate.idl:
+ * WebFrame.h:
+ * WebView.cpp:
+ (WebView::paintScrollViewRectToContextAtPoint):
+ * WebView.h:
+
+ * Interfaces/WebKit.idl: Touched for rebuild.
+
2010-05-30 Daniel Bates <dbates@rim.com>
Unreviewed, attempt to fix the build after http://trac.webkit.org/changeset/60418.
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index 80a3e24..1b7209d 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -111,5 +111,5 @@ interface IWebFramePrivate : IUnknown
HRESULT layerTreeAsText([out, retval] BSTR* result);
- HRESULT paintDocumentRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
+ HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
}
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 1bf21d5..352ae7e 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -234,7 +234,7 @@ interface IWebViewPrivate : IUnknown
HRESULT nextDisplayIsSynchronous();
- HRESULT paintDocumentRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE dc);
+ HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE dc);
[local] HRESULT reportException([in] JSContextRef context, [in] JSValueRef exception);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 98f5da8..d25cdfe 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -300,4 +300,3 @@ library WebKit
[default] interface IWebUserContentURLPattern;
}
}
-
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 3c263e5..34fb827 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -69,6 +69,7 @@ static CFBundleRef getWebKitBundle()
WebInspectorClient::WebInspectorClient(WebView* webView)
: m_inspectedWebView(webView)
+ , m_frontendPage(0)
{
ASSERT(m_inspectedWebView);
m_inspectedWebView->viewWindow((OLE_HANDLE*)&m_inspectedWebViewHwnd);
@@ -76,6 +77,7 @@ WebInspectorClient::WebInspectorClient(WebView* webView)
WebInspectorClient::~WebInspectorClient()
{
+ m_frontendPage = 0;
}
void WebInspectorClient::inspectorDestroyed()
@@ -172,8 +174,9 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon
if (FAILED(frontendWebView->topLevelFrame()->loadRequest(request.get())))
return;
- Page* page = core(frontendWebView.get());
- page->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_inspectedWebView, m_inspectedWebViewHwnd, frontendHwnd, frontendWebView, frontendWebViewHwnd, this));
+ m_frontendPage = core(frontendWebView.get());
+ WebInspectorFrontendClient* frontendClient = new WebInspectorFrontendClient(m_inspectedWebView, m_inspectedWebViewHwnd, frontendHwnd, frontendWebView, frontendWebViewHwnd, this);
+ m_frontendPage->inspectorController()->setInspectorFrontendClient(frontendClient);
m_frontendHwnd = frontendHwnd;
}
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h
index 64773a5..17a8d99 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h
@@ -37,6 +37,12 @@
#include <wtf/OwnPtr.h>
#include <windows.h>
+namespace WebCore {
+
+class Page;
+
+}
+
class WebNodeHighlight;
class WebView;
@@ -55,13 +61,21 @@ public:
virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+ virtual bool sendMessageToFrontend(const WebCore::String&);
+
void updateHighlight();
- void frontendClosing() { m_frontendHwnd = 0; }
+ void frontendClosing()
+ {
+ m_frontendHwnd = 0;
+ releaseFrontendPage();
+ }
+ void releaseFrontendPage();
private:
~WebInspectorClient();
WebView* m_inspectedWebView;
+ WebCore::Page* m_frontendPage;
HWND m_inspectedWebViewHwnd;
HWND m_frontendHwnd;
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 22bd339..75a9c8d 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -359,7 +359,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContextAtPoint(
+HRESULT STDMETHODCALLTYPE WebFrame::paintScrollViewRectToContextAtPoint(
/* [in] */ RECT rect,
/* [in] */ POINT pt,
/* [in] */ OLE_HANDLE deviceContext)
@@ -380,9 +380,8 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContextAtPoint(
gc.setShouldIncludeChildWindows(true);
gc.save();
IntRect dirtyRect(rect);
- gc.translate(-pt.x, -pt.y);
- gc.clip(dirtyRect);
- view->paintContents(&gc, rect);
+ dirtyRect.move(-pt.x, -pt.y);
+ view->paint(&gc, dirtyRect);
gc.restore();
return S_OK;
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index b556192..d839f17 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -245,7 +245,7 @@ public:
/* [in] */ RECT rect,
/* [in] */ OLE_HANDLE deviceContext);
- virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContextAtPoint(
+ virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(
/* [in] */ RECT rect,
/* [in] */ POINT pt,
/* [in] */ OLE_HANDLE deviceContext);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 525108f..a85cc92 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -110,6 +110,7 @@
#include <WebCore/PluginView.h>
#include <WebCore/PopupMenu.h>
#include <WebCore/ProgressTracker.h>
+#include <WebCore/RenderLayer.h>
#include <WebCore/RenderTheme.h>
#include <WebCore/RenderView.h>
#include <WebCore/RenderWidget.h>
@@ -4654,7 +4655,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
hr = preferences->editingBehavior(&editingBehavior);
if (FAILED(hr))
return hr;
- settings->setEditingBehavior((EditingBehavior)editingBehavior);
+ settings->setEditingBehaviorType((EditingBehaviorType)editingBehavior);
hr = preferences->usesPageCache(&enabled);
if (FAILED(hr))
@@ -5676,7 +5677,7 @@ HRESULT STDMETHODCALLTYPE WebView::paintDocumentRectToContext(
return m_mainFrame->paintDocumentRectToContext(rect, deviceContext);
}
-HRESULT STDMETHODCALLTYPE WebView::paintDocumentRectToContextAtPoint(
+HRESULT STDMETHODCALLTYPE WebView::paintScrollViewRectToContextAtPoint(
/* [in] */ RECT rect,
/* [in] */ POINT pt,
/* [in] */ OLE_HANDLE deviceContext)
@@ -5687,7 +5688,7 @@ HRESULT STDMETHODCALLTYPE WebView::paintDocumentRectToContextAtPoint(
if (!m_mainFrame)
return E_FAIL;
- return m_mainFrame->paintDocumentRectToContextAtPoint(rect, pt, deviceContext);
+ return m_mainFrame->paintScrollViewRectToContextAtPoint(rect, pt, deviceContext);
}
HRESULT STDMETHODCALLTYPE WebView::reportException(
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index d44e6c6..514f376 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -697,7 +697,7 @@ public:
/* [in] */ RECT rect,
/* [in] */ OLE_HANDLE dc);
- virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContextAtPoint(
+ virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(
/* [in] */ RECT rect,
/* [in] */ POINT pt,
/* [in] */ OLE_HANDLE dc);
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index ab25102..aefe2a1 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,45 @@
+2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebKitSupport/InspectorClientWx.cpp:
+ (WebCore::InspectorClientWx::sendMessageToFrontend):
+ * WebKitSupport/InspectorClientWx.h:
+
+2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r60889.
+ http://trac.webkit.org/changeset/60889
+ https://bugs.webkit.org/show_bug.cgi?id=40365
+
+ gtk bot has some kind of memory corruption (Requested by
+ loislo on #webkit).
+
+ * WebKitSupport/InspectorClientWx.cpp:
+ * WebKitSupport/InspectorClientWx.h:
+
+2010-06-07 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
+ data from inspected page to WebInspector as JSON string via http. The native
+ serialization to JSON string is supported by InspectorValue's classes. This patch
+ has the implementation of sendMessageToFrontend function. WebKit version of it still
+ uses ScriptFunctionCall and will be switched to another transport a little bit later.
+ https://bugs.webkit.org/show_bug.cgi?id=40134
+
+ * WebKitSupport/InspectorClientWx.cpp:
+ (WebCore::InspectorClientWx::sendMessageToFrontend):
+ * WebKitSupport/InspectorClientWx.h:
+
2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for Windows after recent changes.
diff --git a/WebKit/wx/WebKitSupport/InspectorClientWx.cpp b/WebKit/wx/WebKitSupport/InspectorClientWx.cpp
index 5dc9ac7..c949d77 100644
--- a/WebKit/wx/WebKitSupport/InspectorClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/InspectorClientWx.cpp
@@ -72,4 +72,10 @@ void InspectorClientWx::storeSetting(const String& key, const String& setting)
notImplemented();
}
+bool InspectorClientWx::sendMessageToFrontend(const String&)
+{
+ notImplemented();
+ return false;
+}
+
};
diff --git a/WebKit/wx/WebKitSupport/InspectorClientWx.h b/WebKit/wx/WebKitSupport/InspectorClientWx.h
index 7675dc1..698a0f5 100644
--- a/WebKit/wx/WebKitSupport/InspectorClientWx.h
+++ b/WebKit/wx/WebKitSupport/InspectorClientWx.h
@@ -48,6 +48,8 @@ public:
virtual void populateSetting(const String& key, String* value);
virtual void storeSetting(const String& key, const String& value);
+
+ virtual bool sendMessageToFrontend(const String&);
};
} // namespace WebCore