summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/ChangeLog116
-rw-r--r--WebKit/English.lproj/Localizable.stringsbin52026 -> 52026 bytes
-rw-r--r--WebKit/StringsNotToBeLocalized.txt8
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj8
-rw-r--r--WebKit/chromium/ChangeLog727
-rw-r--r--WebKit/chromium/DEPS6
-rw-r--r--WebKit/chromium/WebKit.gyp2
-rw-r--r--WebKit/chromium/WebKit.gypi5
-rwxr-xr-x[-rw-r--r--]WebKit/chromium/gyp_webkit14
-rw-r--r--WebKit/chromium/public/WebCommonWorkerClient.h5
-rw-r--r--WebKit/chromium/public/WebFileSystem.h73
-rw-r--r--WebKit/chromium/public/WebFormElement.h2
-rw-r--r--WebKit/chromium/public/WebFrameClient.h15
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h3
-rw-r--r--WebKit/chromium/public/WebInputElement.h6
-rw-r--r--WebKit/chromium/public/WebKitClient.h10
-rw-r--r--WebKit/chromium/public/WebNode.h5
-rw-r--r--WebKit/chromium/public/WebNotification.h3
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h3
-rw-r--r--WebKit/chromium/public/WebSecurityPolicy.h9
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebStorageNamespace.h6
-rw-r--r--WebKit/chromium/public/WebThemeEngine.h (renamed from WebKit/chromium/public/win/WebThemeEngine.h)51
-rw-r--r--WebKit/chromium/public/WebURLRequest.h4
-rw-r--r--WebKit/chromium/public/WebView.h14
-rw-r--r--WebKit/chromium/public/WebViewClient.h8
-rw-r--r--WebKit/chromium/public/WebWidget.h4
-rw-r--r--WebKit/chromium/public/WebWindowFeatures.h104
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp15
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp60
-rw-r--r--WebKit/chromium/src/ChromiumThreading.cpp8
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp25
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp43
-rw-r--r--WebKit/chromium/src/SharedWorkerRepository.cpp1
-rw-r--r--WebKit/chromium/src/StorageAreaProxy.cpp8
-rw-r--r--WebKit/chromium/src/StorageEventDispatcherImpl.cpp4
-rw-r--r--WebKit/chromium/src/SuggestionsPopupMenuClient.cpp6
-rw-r--r--WebKit/chromium/src/WebElement.cpp2
-rw-r--r--WebKit/chromium/src/WebFormElement.cpp12
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp23
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h2
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp18
-rw-r--r--WebKit/chromium/src/WebKit.cpp1
-rw-r--r--WebKit/chromium/src/WebNode.cpp5
-rw-r--r--WebKit/chromium/src/WebNotification.cpp10
-rw-r--r--WebKit/chromium/src/WebPasswordFormData.cpp5
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp6
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.h2
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp16
-rw-r--r--WebKit/chromium/src/WebSecurityPolicy.cpp32
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--WebKit/chromium/src/WebStorageNamespaceImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp81
-rw-r--r--WebKit/chromium/src/WebViewImpl.h16
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp43
-rw-r--r--WebKit/chromium/src/WebWorkerBase.h10
-rw-r--r--WebKit/chromium/src/WebWorkerClientImpl.h1
-rw-r--r--WebKit/chromium/src/js/DebuggerAgent.js63
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js39
-rw-r--r--WebKit/chromium/src/js/DevTools.js87
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentChromium.pngbin4253 -> 4272 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentChromium2.pngbin4376 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentHoverChromium2.pngbin4126 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentSelectedChromium2.pngbin4099 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBackgroundChromium.pngbin4070 -> 4116 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBackgroundChromium2.pngbin4118 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.pngbin4070 -> 4120 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarButtonsChromium.pngbin4258 -> 4313 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarMenuButtonChromium.pngbin4391 -> 4654 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.pngbin4639 -> 0 bytes
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js9
-rwxr-xr-xWebKit/chromium/src/js/devTools.css50
-rw-r--r--WebKit/chromium/tests/DragImageTest.cpp22
-rw-r--r--WebKit/efl/DefaultTheme/default.edc76
-rw-r--r--WebKit/efl/DefaultTheme/widget/button/button.edc176
-rw-r--r--WebKit/efl/DefaultTheme/widget/check/check.edc181
-rw-r--r--WebKit/efl/DefaultTheme/widget/combo/combo.edc306
-rw-r--r--WebKit/efl/DefaultTheme/widget/entry/entry.edc167
-rw-r--r--WebKit/efl/DefaultTheme/widget/file/file.edc148
-rw-r--r--WebKit/efl/DefaultTheme/widget/radio/radio.edc181
-rw-r--r--WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar.edc317
-rw-r--r--WebKit/efl/DefaultTheme/widget/search/cancel/search_cancel.edc131
-rw-r--r--WebKit/efl/DefaultTheme/widget/search/decoration/search_decoration.edc132
-rw-r--r--WebKit/efl/DefaultTheme/widget/search/field/search_field.edc151
-rw-r--r--WebKit/efl/EWebLauncher/main.c108
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp86
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.h21
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp8
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h1
-rw-r--r--WebKit/efl/ewebkit.pc.in12
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp49
-rw-r--r--WebKit/efl/ewk/ewk_main.cpp3
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp4
-rw-r--r--WebKit/gtk/ChangeLog248
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.cpp49
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.h6
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp13
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h2
-rw-r--r--WebKit/gtk/tests/testatkroles.c45
-rw-r--r--WebKit/gtk/tests/testdomdocument.c232
-rw-r--r--WebKit/gtk/webkit/webkit.h1
-rw-r--r--WebKit/gtk/webkit/webkitnetworkrequest.cpp3
-rw-r--r--WebKit/gtk/webkit/webkitnetworkresponse.cpp4
-rw-r--r--WebKit/gtk/webkit/webkitprivate.cpp41
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h11
-rw-r--r--WebKit/gtk/webkit/webkitwebsettings.cpp25
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp160
-rw-r--r--WebKit/gtk/webkit/webkitwebview.h4
-rw-r--r--WebKit/haiku/ChangeLog12
-rw-r--r--WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h1
-rw-r--r--WebKit/mac/Carbon/CarbonWindowAdapter.mm2
-rw-r--r--WebKit/mac/ChangeLog543
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/History/WebBackForwardList.mm2
-rw-r--r--WebKit/mac/History/WebHistoryItem.mm2
-rw-r--r--WebKit/mac/MigrateHeaders.make1
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h2
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm4
-rw-r--r--WebKit/mac/Misc/WebElementDictionary.mm2
-rw-r--r--WebKit/mac/Misc/WebIconDatabase.mm8
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm2
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginStream.h4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm12
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm4
-rw-r--r--WebKit/mac/Plugins/WebBasePluginPackage.mm6
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h10
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm6
-rw-r--r--WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h12
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginPackage.h4
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginPackage.mm6
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.h28
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm98
-rw-r--r--WebKit/mac/Plugins/WebPluginDatabase.mm6
-rw-r--r--WebKit/mac/Plugins/npapi.mm24
-rw-r--r--WebKit/mac/Storage/WebDatabaseManager.mm20
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm16
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm2
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h8
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm51
-rw-r--r--WebKit/mac/WebView/WebArchive.mm2
-rw-r--r--WebKit/mac/WebView/WebClipView.h1
-rw-r--r--WebKit/mac/WebView/WebClipView.mm (renamed from WebKit/mac/WebView/WebClipView.m)42
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm2
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.h4
-rw-r--r--WebKit/mac/WebView/WebDelegateImplementationCaching.mm12
-rw-r--r--WebKit/mac/WebView/WebFrameView.mm3
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm72
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm15
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebResource.mm2
-rw-r--r--WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h10
-rw-r--r--WebKit/mac/WebView/WebTextIterator.mm4
-rw-r--r--WebKit/mac/WebView/WebView.mm83
-rw-r--r--WebKit/mac/WebView/WebViewData.mm2
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h2
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp12
-rw-r--r--WebKit/qt/Api/qwebelement.cpp2
-rw-r--r--WebKit/qt/Api/qwebkitversion.h2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp545
-rw-r--r--WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp48
-rw-r--r--WebKit/qt/Api/qwebsettings.h10
-rw-r--r--WebKit/qt/ChangeLog531
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp6
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp144
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h3
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp17
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorClientQt.cpp5
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.cpp106
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h67
-rw-r--r--WebKit/qt/qtwebkit_version.pri4
-rw-r--r--WebKit/qt/symbian/bwins/QtWebKitu.def27
-rw-r--r--WebKit/qt/symbian/eabi/QtWebKitu.def36
-rw-r--r--WebKit/qt/tests/benchmarks/loading/loading.pro1
-rw-r--r--WebKit/qt/tests/benchmarks/painting/painting.pro3
-rw-r--r--WebKit/qt/tests/hybridPixmap/widget.ui12
-rw-r--r--WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro3
-rw-r--r--WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp35
-rw-r--r--WebKit/qt/tests/qwebelement/qwebelement.pro3
-rw-r--r--WebKit/qt/tests/qwebframe/qwebframe.pro3
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp31
-rw-r--r--WebKit/qt/tests/qwebhistory/qwebhistory.pro3
-rw-r--r--WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro3
-rw-r--r--WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp8
-rw-r--r--WebKit/qt/tests/qwebinspector/qwebinspector.pro1
-rw-r--r--WebKit/qt/tests/qwebpage/qwebpage.pro3
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp107
-rw-r--r--WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro1
-rw-r--r--WebKit/qt/tests/qwebview/qwebview.pro4
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp26
-rw-r--r--WebKit/qt/tests/tests.pri3
-rw-r--r--WebKit/win/ChangeLog266
-rw-r--r--WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate2.idl1
-rw-r--r--WebKit/win/Interfaces/IWebPreferencesPrivate.idl3
-rwxr-xr-xWebKit/win/Interfaces/IWebUIDelegatePrivate.idl1
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl2
-rw-r--r--WebKit/win/Interfaces/WebKit.idl1
-rw-r--r--WebKit/win/WebCoreSupport/EmbeddedWidget.cpp6
-rw-r--r--WebKit/win/WebCoreSupport/EmbeddedWidget.h2
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp17
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.h1
-rw-r--r--WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp2
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.cpp22
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.h1
-rw-r--r--WebKit/win/WebFrame.cpp12
-rw-r--r--WebKit/win/WebFrame.h2
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj12
-rw-r--r--WebKit/win/WebKitClassFactory.cpp4
-rw-r--r--WebKit/win/WebPreferenceKeysPrivate.h2
-rw-r--r--WebKit/win/WebPreferences.cpp15
-rw-r--r--WebKit/win/WebPreferences.h6
-rw-r--r--WebKit/win/WebView.cpp97
-rw-r--r--WebKit/win/WebView.h13
-rw-r--r--WebKit/wx/ChangeLog66
-rw-r--r--WebKit/wx/WebFrame.cpp6
-rw-r--r--WebKit/wx/WebFrame.h2
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.h1
-rw-r--r--WebKit/wx/WebView.cpp89
-rw-r--r--WebKit/wx/WebView.h7
-rw-r--r--WebKit/wx/wscript12
225 files changed, 7336 insertions, 1366 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3ba6146..978e85e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,119 @@
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1)
+ https://bugs.webkit.org/show_bug.cgi?id=38427
+
+ * WebKit.xcodeproj/project.pbxproj: Renamed WebClipView.m to WebClipView.mm and changed it to
+ Objective-C++.
+
+2010-05-03 Darin Adler <darin@apple.com>
+
+ * English.lproj/Localizable.strings: Regenerated.
+ * StringsNotToBeLocalized.txt: Updated for recent changes.
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * efl/WebCoreSupport/FrameLoaderClientEfl.h:
+ (WebCore::FrameLoaderClientEfl::dispatchWillSendSubmitEvent):
+
+2010-04-22 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Implement findThemePath to locate the correct theme file instead of
+ relying on a hardcoded location.
+ http://webkit.org/b/37996
+
+ * efl/EWebLauncher/main.c:
+ (findThemePath): Fix to locate the correct theme files.
+ (main): Use findThemePath() instead of a hardcoded one.
+
+2010-04-22 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Update efl/ewebkit.pc.in to match the variable substitution syntax
+ of CMake.
+ http://webkit.org/b/37999
+
+ * efl/ewebkit.pc.in: Updated.
+
+2010-04-22 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Update EWebKit (EFL port) to match recent API changes.
+ http://webkit.org/b/37997
+
+ * efl/ewk/ewk_frame.cpp:
+ (ewk_frame_zoom_set): Change to use WebCore::ZoomMode.
+ (ewk_frame_zoom_text_only_set): Change to use WebCore::ZoomMode.
+ (_ewk_frame_handle_key_scrolling): s/WebCore::VK_/VK_/g
+ (ewk_frame_plugin_create): Disable temporarily PluginView-related
+ code until a proper plugin implementation is made.
+ * efl/ewk/ewk_view.cpp: Fix typo in _parent_sc declaration.
+ (ewk_view_selection_get): Fix a reference to WebCore::CString to
+ WTF::CString.
+
+2010-04-22 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Update EFL port files to match recent API changes.
+ http://webkit.org/b/37876
+
+ * efl/WebCoreSupport/ChromeClientEfl.cpp:
+ (kit): Added.
+ (WebCore::ChromeClientEfl::ChromeClientEfl): Coding style fix.
+ (WebCore::ChromeClientEfl::runBeforeUnloadConfirmPanel): Coding
+ style fix.
+ (WebCore::ChromeClientEfl::mouseDidMoveOverElement): Coding style fix.
+ (WebCore::ChromeClientEfl::runOpenPanel): Implemented.
+ (WebCore::ChromeClientEfl::cancelGeolocationPermissionRequestForFrame): Stubbed.
+ (WebCore::ChromeClientEfl::cancelGeolocationPermissionForFrame): Stubbed.
+ (WebCore::ChromeClientEfl::invalidateContents): Stubbed.
+ (WebCore::ChromeClientEfl::invalidateWindow): Stubbed.
+ (WebCore::ChromeClientEfl::invalidateContentsAndWindow): Implemented.
+ (WebCore::ChromeClientEfl::invalidateContentsForSlowScroll): Implemented.
+ (WebCore::ChromeClientEfl::scroll): Updated.
+ (WebCore::ChromeClientEfl::iconForFiles): Stubbed.
+ (WebCore::ChromeClientEfl::chooseIconForFiles): Stubbed.
+ * efl/WebCoreSupport/ChromeClientEfl.h: Add new method prototypes.
+ * efl/WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::committedLoad): Call setEncoding()
+ from FrameLoader::writer.
+ (WebCore::FrameLoaderClientEfl::finishedLoading): Ditto.
+ (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading): Ditto.
+ (WebCore::FrameLoaderClientEfl::setMainDocumentError): Ditto.
+
+2010-04-21 Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add missing EFL WebKit/efl theme files.
+ http://webkit.org/b/37854
+
+ * efl/DefaultTheme/default.edc: Added.
+ * efl/DefaultTheme/widget/button/button.edc: Added.
+ * efl/DefaultTheme/widget/check/check.edc: Added.
+ * efl/DefaultTheme/widget/combo/combo.edc: Added.
+ * efl/DefaultTheme/widget/entry/entry.edc: Added.
+ * efl/DefaultTheme/widget/file/file.edc: Added.
+ * efl/DefaultTheme/widget/radio/radio.edc: Added.
+ * efl/DefaultTheme/widget/scrollbar/scrollbar.edc: Added.
+ * efl/DefaultTheme/widget/search/cancel/search_cancel.edc: Added.
+ * efl/DefaultTheme/widget/search/decoration/search_decoration.edc: Added.
+ * efl/DefaultTheme/widget/search/field/search_field.edc: Added.
+
2010-04-21 Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
Reviewed by Adam Roben.
diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings
index 8301e28..615dc9a 100644
--- a/WebKit/English.lproj/Localizable.strings
+++ b/WebKit/English.lproj/Localizable.strings
Binary files differ
diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt
index 74c90ca..9fbaa7f 100644
--- a/WebKit/StringsNotToBeLocalized.txt
+++ b/WebKit/StringsNotToBeLocalized.txt
@@ -26,7 +26,6 @@
"%@, %@"
"%@-%d"
"%@/%s"
-"%@/.tmp%d"
"%@/Library/Preferences/%@"
"%@:%u"
"%@://%@"
@@ -52,7 +51,6 @@
"-createPluginMIMETypesPreferences"
"-khtml-text-decorations-in-effect"
"."
-"._"
".download"
".html"
".jpg"
@@ -263,6 +261,7 @@
"NP_GetEntryPoints"
"NP_Initialize"
"NP_Shutdown"
+"NSAlert"
"NSAllowContinuousSpellChecking"
"NSAllowsBaseWritingDirectionKeyBindings"
"NSApplicationIcon"
@@ -305,6 +304,7 @@
"Software\\Synaptics\\SynTPEnh\\UltraNavPS2"
"Software\\Synaptics\\SynTPEnh\\UltraNavUSB"
"StatusDisplay"
+"TSUpdateCheck"
"TimeRemainingDisplay"
"Times"
"ToggleBold"
@@ -485,6 +485,7 @@
"WebURLProtectionSpace"
"WebURLResponse"
"WebURLsWithTitlesPboardType"
+"WebUserContentURLPattern"
"WebView"
"WebViewDidBeginEditingNotification"
"WebViewDidChangeNotification"
@@ -498,6 +499,7 @@
"Windows 98"
"Windows 98; Win 9x 4.90"
"Windows NT %d.%d"
+"WmvPlugin"
"XSL"
"XXXXXX-"
"\"@?"
@@ -689,7 +691,6 @@
"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
"nameFieldLabel"
"net.hmdt-web.Shiira"
-"nullplugin"
"oleacc.dll"
"opacity"
"org.xlife.NewsFire"
@@ -729,7 +730,6 @@
"text/x-vcalendar"
"text/x-vcard"
"text/x-vcf"
-"tiff"
"transform"
"treatsFilePackagesAsDirectories"
"txt"
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index e6bbab5..d80e3aa 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -269,7 +269,7 @@
939810E30824BF01008DF038 /* WebImageRendererFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */; };
939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */; };
939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5F7174D02885C5B018635CA /* WebViewFactory.mm */; };
- 939810EB0824BF01008DF038 /* WebClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.m */; };
+ 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 933D659A03413FF2008635CE /* WebClipView.mm */; };
939810ED0824BF01008DF038 /* WebDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39446071020F50ED0ECA1767 /* WebDataSource.mm */; };
939810EF0824BF01008DF038 /* WebDefaultContextMenuDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5152FADE033FC50400CA2ACD /* WebDefaultContextMenuDelegate.mm */; };
939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */; };
@@ -576,7 +576,7 @@
93185DB506679F42005D5E7E /* WebHTMLViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLViewInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = IDNScriptWhiteList.txt; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
933D659903413FF2008635CE /* WebClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebClipView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 933D659A03413FF2008635CE /* WebClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebClipView.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ 933D659A03413FF2008635CE /* WebClipView.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 4; path = WebClipView.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9345D17C0365BF35008635CE /* English */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = wrapper.nib; name = English; path = Panels/English.lproj/WebAuthenticationPanel.nib; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9345D4EA0365C5B2008635CE /* WebJavaScriptTextInputPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebJavaScriptTextInputPanel.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebJavaScriptTextInputPanel.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -1101,7 +1101,7 @@
8373435A0624EE0D00F3B289 /* WebArchive.h */,
8373435B0624EE0D00F3B289 /* WebArchive.mm */,
933D659903413FF2008635CE /* WebClipView.h */,
- 933D659A03413FF2008635CE /* WebClipView.m */,
+ 933D659A03413FF2008635CE /* WebClipView.mm */,
39446070020F50ED0ECA1767 /* WebDataSource.h */,
39446071020F50ED0ECA1767 /* WebDataSource.mm */,
658A40950A14853B005E6987 /* WebDataSourceInternal.h */,
@@ -1790,7 +1790,7 @@
939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */,
5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */,
14D825300AF955090004F057 /* WebChromeClient.mm in Sources */,
- 939810EB0824BF01008DF038 /* WebClipView.m in Sources */,
+ 939810EB0824BF01008DF038 /* WebClipView.mm in Sources */,
065AD5A40B0C32C7005A2B1D /* WebContextMenuClient.mm in Sources */,
939810BF0824BF01008DF038 /* WebCoreStatistics.mm in Sources */,
511F3FD50CECC88F00852565 /* WebDatabaseManager.mm in Sources */,
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ed43fff..68129b0 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,730 @@
+2010-05-06 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Add support for resources on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=38637
+
+ * DEPS: Check out tools/data_pack.
+
+2010-05-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Chromium Dev Tools: Large toolbar icons flash when dev
+ tools is opened in docked mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38631
+
+ * src/js/DevTools.js:
+ (devtools.domContentLoaded):
+
+2010-05-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ drop support for sessionStorage in sandbox iframes
+ https://bugs.webkit.org/show_bug.cgi?id=38151
+
+ Update client of sessionStorage to handle exceptions.
+
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::storageEvent):
+
+2010-05-05 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] clear out deprecated methods that are no longer used
+ https://bugs.webkit.org/show_bug.cgi?id=38610
+
+ * public/WebFormElement.h:
+ * public/WebInputElement.h:
+ * public/WebKitClient.h:
+ * public/WebView.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createPopupMenu):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened):
+ * src/WebFormElement.cpp:
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::setSelectionRange):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::hideSuggestionsPopup):
+ * src/WebViewImpl.h:
+
+2010-05-05 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [chromium] Add quota parameter to WebStorageNamespace::createSessionStorageNamespace
+ https://bugs.webkit.org/show_bug.cgi?id=38589
+
+ * public/WebStorageNamespace.h:
+ (WebKit::WebStorageNamespace::createSessionStorageNamespace):
+ * src/WebStorageNamespaceImpl.cpp:
+ (WebKit::WebStorageNamespace::createSessionStorageNamespace):
+
+2010-05-05 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Update the plugin container's setFocus implementation to pass the new
+ boolean argument to the next layer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37961
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setFocus):
+ * src/WebPluginContainerImpl.h:
+
+2010-05-04 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Provide an API for querying whether a WebWidget is using gpu accelerated compositing.
+ Also changed: isAcceleratedCompositing to: isAcceleratedCompositingActive.
+ https://bugs.webkit.org/show_bug.cgi?id=38220
+
+ * public/WebWidget.h:
+ * src/WebPopupMenuImpl.h:
+ (WebKit::WebPopupMenuImpl::isAcceleratedCompositingActive):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::paint):
+ (WebKit::WebViewImpl::isAcceleratedCompositingActive):
+ (WebKit::WebViewImpl::setRootGraphicsLayer):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ (WebKit::WebViewImpl::updateRootLayerContents):
+ * src/WebViewImpl.h:
+
+2010-04-29 John Gregg <johnnyg@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ notifications should have dir and replaceId attributes
+ https://bugs.webkit.org/show_bug.cgi?id=38336
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dir):
+ (WebKit::WebNotification::replaceId):
+
+2010-05-04 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Make the select popup not close on right/middle clicks.
+ https://bugs.webkit.org/show_bug.cgi?id=38473
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard):
+ * src/WebSettingsImpl.h:
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::willSendSubmitEvent): New empty method
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchWillSendSubmitEvent): Delegate to client
+ * src/FrameLoaderClientImpl.h:
+
+2010-05-02 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ Define two new ResourceRequestBase TargetTypes for worker and shared worker
+ main resources. Use the new target types where appropiate. Add logic to marshal
+ the target type specified by requests initiated on a background worker thread.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38295
+
+ * src/SharedWorkerRepository.cpp: use TargetIsSharedWorker
+ (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
+
+2010-05-02 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Include WebWindowFeatures in call to WebViewClient::createView.
+ https://bugs.webkit.org/show_bug.cgi?id=38301
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-05-01 Evan Stade <estade@chromium.org>
+
+ Reviewed by David Levin
+
+ [chromium] Skia needs to fade DragImages
+ https://bugs.webkit.org/show_bug.cgi?id=38008
+
+ * tests/DragImageTest.cpp:
+ (DragImageTest.CreateDragImage): test that the drag image is a deep copy
+
+2010-04-30 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add WebFileSystem interface and hook up with all FileSystem methods.
+ https://bugs.webkit.org/show_bug.cgi?id=38228
+
+ * WebKit.gyp:
+ * public/WebFileSystem.h: Added.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::fileSystem):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::fileExists):
+ (WebCore::ChromiumBridge::deleteFile):
+ (WebCore::ChromiumBridge::deleteEmptyDirectory):
+ (WebCore::ChromiumBridge::getFileSize):
+ (WebCore::ChromiumBridge::getFileModificationTime):
+ (WebCore::ChromiumBridge::directoryName):
+ (WebCore::ChromiumBridge::pathByAppendingComponent):
+ (WebCore::ChromiumBridge::makeAllDirectories):
+ (WebCore::ChromiumBridge::getAbsolutePath):
+ (WebCore::ChromiumBridge::isDirectory):
+ (WebCore::ChromiumBridge::filePathToURL):
+ (WebCore::ChromiumBridge::openFile):
+ (WebCore::ChromiumBridge::closeFile):
+ (WebCore::ChromiumBridge::seekFile):
+ (WebCore::ChromiumBridge::truncateFile):
+ (WebCore::ChromiumBridge::readFromFile):
+ (WebCore::ChromiumBridge::writeToFile):
+
+2010-04-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Change StorageEvent.uri to StorageEvent.url to match the spec
+ https://bugs.webkit.org/show_bug.cgi?id=38331
+
+ Get rid of a stale FIXME and combine 2 lines that needn't be split.
+
+ * src/StorageEventDispatcherImpl.cpp:
+ (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent):
+
+2010-04-29 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Consider implementing addOriginAccessWhitelistEntry method
+ http://trac.webkit.org/changeset/57537 introduced a new method
+ to manage whitelisting of origins.
+ Expose this method in Chromium's bridge.
+ https://bugs.webkit.org/show_bug.cgi?id=37578
+
+ * public/WebSecurityPolicy.h: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method
+ * src/WebSecurityPolicy.cpp: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method
+
+2010-04-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r58498.
+ http://trac.webkit.org/changeset/58498
+ https://bugs.webkit.org/show_bug.cgi?id=38332
+
+ "Broke a bunch of tests on Chromium canaries" (Requested by
+ dglazkov on #webkit).
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-29 Adam Langley <agl@chromium.org>
+
+ Unreviewed, DEPS roll.
+
+ WebKit's r58517 needs OTS's r30 which was rolled into Chromium in
+ r45932.
+
+ * DEPS:
+ Use Chromium r45932.
+
+2010-04-29 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Include WindowFeatures in call to WebViewClient::createView.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38301
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-29 Garret Kelly <gdk@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Expose the RuntimeFeature for touch events through the
+ WebRuntimeFeatures mechanism.
+ https://bugs.webkit.org/show_bug.cgi?id=37486
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableTouch):
+ (WebKit::WebRuntimeFeatures::isTouchEnabled):
+
+2010-04-29 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove the unnecessary texImage2D function with Image as input in GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=38235
+
+ * src/GraphicsContext3D.cpp: Remove tex*image implementation with Image input.
+
+2010-04-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Allow editing script resources when resource tracking is enabled.
+
+ http://bugs.webkit.org/show_bug.cgi?id=38269
+
+ * src/js/DebuggerAgent.js:
+ * src/js/InspectorControllerImpl.js:
+ (.devtools.InspectorBackendImpl.prototype.setBreakpoint):
+ (.devtools.InspectorBackendImpl.prototype.editScriptSource):
+
+2010-04-28 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] callOnMainThread should equate to MessageLoop::PostTask
+ https://bugs.webkit.org/show_bug.cgi?id=38276
+
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::callOnMainThread):
+ * src/ChromiumThreading.cpp:
+ (WTF::ChromiumThreading::callOnMainThread):
+
+2010-04-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Make WebThemeEngine::paint take a const ref of ExtraParams
+ https://bugs.webkit.org/show_bug.cgi?id=38242
+
+ * public/WebThemeEngine.h:
+ (WebKit::WebThemeEngine::paint):
+
+2010-04-28 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fixed passing breakpoints to V8.
+ https://bugs.webkit.org/show_bug.cgi?id=38266
+
+ * src/js/InspectorControllerImpl.js:
+ (.devtools.InspectorBackendImpl.prototype.setBreakpoint):
+
+2010-04-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Support pause on exceptions in v8 implementation of ScriptDebugServer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38205
+
+ * src/js/DebuggerScript.js:
+ (debuggerScriptConstructor.DebuggerScript.getScripts):
+ (debuggerScriptConstructor.DebuggerScript.pauseOnExceptionsState):
+ (debuggerScriptConstructor.DebuggerScript.setPauseOnExceptionsState):
+ (debuggerScriptConstructor.DebuggerScript._v8ToWebkitLineNumber):
+ (debuggerScriptConstructor):
+
+2010-04-27 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Fix bug that prevents autosave of forms without action attribute
+ https://bugs.webkit.org/show_bug.cgi?id=38014
+ Change is in the Chromium WebKit API so it can't be tested with a JS-based layout test.
+ It needs a native unit test, which would go in the Chromium repo, not WebKit.
+
+ * src/WebPasswordFormData.cpp:
+ (WebKit::WebPasswordFormData::WebPasswordFormData): Set correct URL if action is NULL
+
+2010-04-27 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ [Chromium] Add two things to the webkit API to support appcaches in workers.
+ 1) WebURLRequest TargetTypes for worker and shared worker main resources.
+ 2) Factory method on class WebCommonWorkerClient to
+ createApplicationCacheHost() for the associated worker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38147
+
+ * public/WebCommonWorkerClient.h: add the factory method
+ * public/WebURLRequest.h: add the TargetTypes
+ * src/WebWorkerBase.cpp: call the embedder's factory when needed
+ (WebKit::WebWorkerBase::didCreateDataSource)
+ (WebKit::WebWorkerBase::createApplicationCacheHost)
+ * src/WebWorkerBase.h: ditto
+ * src/WebWorkerClientImpl.h: add a stub impl of the factory method
+ (WebKit::WebWorkerClientImpl::createApplicationCacheHost):
+
+2010-04-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [DRT/Chromium] Enable Windows project generation
+ https://bugs.webkit.org/show_bug.cgi?id=38103
+
+ - Avoid platform.system(), which causes a crash with python.exe in
+ depot_tools. Use sys.platform instead.
+ - Process DumpRenderTree.gyp on all platforms.
+
+ * gyp_webkit:
+
+2010-04-27 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Makes clicking a select element close its associated popup if
+ it is open.
+ https://bugs.webkit.org/show_bug.cgi?id=38105
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+
+2010-04-27 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Merged the WebView public method to close suggestion popups
+ into a single method to close all popups (select and suggestions).
+ That ensures select popups are closed when the browser window is moved
+ or resized.
+ https://bugs.webkit.org/show_bug.cgi?id=37837
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::hidePopups):
+ (WebKit::WebViewImpl::hideSuggestionsPopup):
+ * src/WebViewImpl.h:
+
+2010-04-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Remove unnecessary header now that Chrome is updated
+ https://bugs.webkit.org/show_bug.cgi?id=38211
+
+ * public/win/WebThemeEngine.h: Removed.
+
+2010-04-27 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add some notifications and an accessor to WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=37625
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didFirstLayout):
+ (WebKit::WebFrameClient::didFirstVisuallyNonEmptyLayout):
+ * public/WebNode.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidFirstLayout):
+ (WebKit::FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout):
+ * src/WebElement.cpp:
+ * src/WebNode.cpp:
+ (WebKit::WebNode::hasNonEmptyBoundingBox):
+
+2010-04-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Remove deprecated form of didChangeLocationWithinPage
+ https://bugs.webkit.org/show_bug.cgi?id=38178
+
+ * public/WebFrameClient.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
+
+2010-04-27 Evan Martin <evan@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] bold bengali text not rendered properly on Linux
+ Roll forward Chrome DEPS so we get new Skia API.
+
+ * DEPS: update Chrome to r45696.
+
+2010-04-27 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Restore breakpoints associated with script's URL once
+ script is parsed.
+ https://bugs.webkit.org/show_bug.cgi?id=38132
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.initUI):
+ (devtools.DebuggerAgent.prototype.addBreakpoint):
+ (devtools.DebuggerAgent.prototype.addScriptInfo_):
+ (devtools.DebuggerAgent.prototype.restoreBreakpoints_):
+ (devtools.BreakpointInfo):
+ (devtools.BreakpointInfo.prototype.enabled):
+ (devtools.BreakpointInfo.prototype.condition):
+
+2010-04-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chrome Dev Tools: Further beautify themes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38187
+
+ * src/js/DevTools.js:
+ (WebInspector.setToolbarColors):
+ * src/js/devTools.css:
+ (body.platform-windows #toolbar, body.platform-windows.inactive #toolbar):
+
+2010-04-26 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Prepare to making WebThemeEngine cross-platform
+ https://bugs.webkit.org/show_bug.cgi?id=38077
+
+ * WebKit.gyp:
+ * public/WebThemeEngine.h: Added.
+ * public/win/WebThemeEngine.h:
+
+2010-04-26 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Crash after calling window.print() on a window object that has been closed.
+ https://bugs.webkit.org/show_bug.cgi?id=38148
+
+ It is unfortunately not possible to write a layout test for this as the
+ crash occurs in an API that is only called by Chrome while showing a
+ print dialog.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop):
+ (WebKit::WebView::didExitModalLoop):
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * src/WebKit.cpp:
+ (WebKit::initialize): Add call to initializeMainThread.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl): Ditto.
+
+2010-04-26 Roman Gershman <romange@google.com>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Font size in suggestions popup menu should be correlated with the font size of its text field.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37977
+
+ * src/SuggestionsPopupMenuClient.cpp:
+ (WebKit::SuggestionsPopupMenuClient::initialize):
+
+2010-04-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chromium Dev Tools: brush up images.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38124
+
+ * WebKit.gypi:
+ * src/js/DevTools.js:
+ (WebInspector.setToolbarColors):
+ * src/js/Images/segmentChromium.png:
+ * src/js/Images/segmentChromium2.png: Removed.
+ * src/js/Images/segmentHoverChromium2.png: Removed.
+ * src/js/Images/segmentSelectedChromium2.png: Removed.
+ * src/js/Images/statusbarBackgroundChromium.png:
+ * src/js/Images/statusbarBackgroundChromium2.png: Removed.
+ * src/js/Images/statusbarBottomBackgroundChromium.png:
+ * src/js/Images/statusbarButtonsChromium.png:
+ * src/js/Images/statusbarMenuButtonChromium.png:
+ * src/js/Images/statusbarMenuButtonChromium2.png: Removed.
+ * src/js/devTools.css:
+ (.section > .header):
+ (.console-group-messages .section > .header):
+ (#resources-filter):
+ (.crumbs .crumb):
+ (.crumbs .crumb.end):
+ (.crumbs .crumb.selected):
+ (.crumbs .crumb.selected:hover):
+ (.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover):
+ (.crumbs .crumb:hover):
+ (.crumbs .crumb.dimmed:hover):
+ (.crumbs .crumb.end:hover):
+ (body.drawer-visible #main-status-bar):
+ (.status-bar):
+ (button.status-bar-item):
+ (select.status-bar-item:active):
+ (#drawer):
+ (select.status-bar-item):
+
+2010-04-23 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add isGLES2Compliant to GraphicsContext3D: make the method const.
+ https://bugs.webkit.org/show_bug.cgi?id=37872
+
+ * src/GraphicsContext3D.cpp: Make isGLES2Compliant() const.
+ (WebCore::GraphicsContext3DInternal::isGLES2Compliant):
+ (WebCore::GraphicsContext3D::isGLES2Compliant):
+
+2010-04-23 Rafael Weinstein <rafaelw@grafaelw.sfo.corp.google.com>
+
+ Reviewed by Darin Fisher.
+
+ This patch adds a WebWindowFeatures binding struct for the
+ chromium client in anticipation of a follow-on patch which will
+ pass it to WebViewClient::createWindow.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38013
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h: Added.
+ (WebKit::WebWindowFeatures::WebWindowFeatures):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-22 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add isGLES2Compliant to GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=37872
+
+ * public/WebGraphicsContext3D.h: Add isGLES2Compliant().
+ * src/GraphicsContext3D.cpp: Ditto.
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto.
+ (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2Compliant):
+ * src/WebGraphicsContext3DDefaultImpl.h: Ditto.
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didChangeIcons):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons):
+ * src/FrameLoaderClientImpl.h:
+
+2010-04-22 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Emulate GL_IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for glGet
+ https://bugs.webkit.org/show_bug.cgi?id=37281
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Emulate two enums.
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ * src/WebSettingsImpl.h:
+
+2010-04-22 Tony Chang <tony@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [chromium] roll chromium deps to pick up some windows build fixes
+ https://bugs.webkit.org/show_bug.cgi?id=37972
+
+ * DEPS:
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard):
+ * src/WebSettingsImpl.h:
+
+2010-04-21 Tony Chang <tony@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [chromium] gyp_webkit should be executable
+ https://bugs.webkit.org/show_bug.cgi?id=37971
+
+ * gyp_webkit: Added property svn:executable.
+
+2010-04-21 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Don't notify the WebView that a popup was
+ opened when the popup is handled externally, as the popup
+ is in that case transparent to the WebView.
+ The notification was causing an ASSERT on Mac (where
+ the popup is handled externally) as there would be no
+ notification that the popup was closed.
+ https://bugs.webkit.org/show_bug.cgi?id=37825
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened):
+
2010-04-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r58028.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index c6d71ab..07401d7 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '44453',
+ 'chromium_rev': '45932',
'pthreads-win32_rev': '26716',
}
@@ -44,6 +44,8 @@ deps = {
# build tools
'build':
Var('chromium_svn')+'/build@'+Var('chromium_rev'),
+ 'tools/data_pack':
+ Var('chromium_svn')+'/tools/data_pack@'+Var('chromium_rev'),
'tools/gyp':
From('chromium_deps', 'src/tools/gyp'),
@@ -173,6 +175,8 @@ deps_os = {
Var('chromium_svn')+'/third_party/harfbuzz@'+Var('chromium_rev'),
'tools/xdisplaycheck':
Var('chromium_svn')+'/tools/xdisplaycheck@'+Var('chromium_rev'),
+ 'tools/data_pack':
+ Var('chromium_svn')+'/tools/data_pack@'+Var('chromium_rev'),
'third_party/yasm/source/patched-yasm':
From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
},
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 53581bc..b3a926e 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -121,6 +121,7 @@
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
'public/WebFileInfo.h',
+ 'public/WebFileSystem.h',
'public/WebFindOptions.h',
'public/WebFrame.h',
'public/WebFrameClient.h',
@@ -201,6 +202,7 @@
'public/WebTextAffinity.h',
'public/WebTextCaseSensitivity.h',
'public/WebTextDirection.h',
+ 'public/WebThemeEngine.h',
'public/WebURL.h',
'public/WebURLError.h',
'public/WebURLLoader.h',
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 37faa99..a9df3f5 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -48,19 +48,14 @@
],
'devtools_image_files': [
'src/js/Images/segmentChromium.png',
- 'src/js/Images/segmentChromium2.png',
'src/js/Images/segmentHoverChromium.png',
- 'src/js/Images/segmentHoverChromium2.png',
'src/js/Images/segmentHoverEndChromium.png',
'src/js/Images/segmentSelectedChromium.png',
- 'src/js/Images/segmentSelectedChromium2.png',
'src/js/Images/segmentSelectedEndChromium.png',
'src/js/Images/statusbarBackgroundChromium.png',
- 'src/js/Images/statusbarBackgroundChromium2.png',
'src/js/Images/statusbarBottomBackgroundChromium.png',
'src/js/Images/statusbarButtonsChromium.png',
'src/js/Images/statusbarMenuButtonChromium.png',
- 'src/js/Images/statusbarMenuButtonChromium2.png',
'src/js/Images/statusbarMenuButtonSelectedChromium.png',
],
},
diff --git a/WebKit/chromium/gyp_webkit b/WebKit/chromium/gyp_webkit
index db1aa7a..812ed27 100644..100755
--- a/WebKit/chromium/gyp_webkit
+++ b/WebKit/chromium/gyp_webkit
@@ -1,4 +1,4 @@
-#
+#!/usr/bin/env python
# Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,6 @@
import glob
import os
-import platform
import shlex
import sys
@@ -78,7 +77,7 @@ if __name__ == '__main__':
args.extend(['-I' + i for i in additional_include_files(args)])
# On linux, we want gyp to output a makefile (default is scons).
- if platform.system() == 'Linux':
+ if sys.platform == 'linux2':
args.extend(['-fmake'])
# Other command args:
@@ -91,12 +90,9 @@ if __name__ == '__main__':
# gyp hack: otherwise gyp assumes its in chromium's src/ dir.
'--depth=./',
- # gyp file to execute.
- 'WebKit.gyp'])
-
- # Generate DRT build files on the platforms that support it.
- if platform.system() in ('Darwin', 'Linux'):
- args.append('../../WebKitTools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp')
+ # gyp files to execute.
+ 'WebKit.gyp',
+ '../../WebKitTools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp'])
print 'Updating webkit projects from gyp files...'
sys.stdout.flush()
diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h
index f4df16d..13603cb 100644
--- a/WebKit/chromium/public/WebCommonWorkerClient.h
+++ b/WebKit/chromium/public/WebCommonWorkerClient.h
@@ -33,6 +33,8 @@
namespace WebKit {
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
class WebNotificationPresenter;
class WebString;
class WebWorker;
@@ -74,6 +76,9 @@ public:
// they are created via the WebSharedWorkerRepository.
virtual WebWorker* createWorker(WebWorkerClient* client) = 0;
+ // Called on the main webkit thread in the worker process during initialization.
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) = 0;
+
protected:
~WebCommonWorkerClient() { }
};
diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h
new file mode 100644
index 0000000..fc6e6dd
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystem.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFileSystem_h
+#define WebFileSystem_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+
+class WebFileSystem {
+public:
+#ifdef WIN32
+ typedef HANDLE FileHandle;
+#else
+ typedef int FileHandle;
+#endif
+
+ virtual bool fileExists(const WebString& path) { return false; }
+ virtual bool deleteFile(const WebString& path) { return false; }
+ virtual bool deleteEmptyDirectory(const WebString& path) { return false; }
+ virtual bool getFileSize(const WebString& path, long long& result) { return false; }
+ virtual bool getFileModificationTime(const WebString& path, double& result) { return false; }
+ virtual WebString directoryName(const WebString& path) { return WebString(); }
+ virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); }
+ virtual bool makeAllDirectories(const WebString& path) { return false; }
+ virtual WebString getAbsolutePath(const WebString& path) { return WebString(); }
+ virtual bool isDirectory(const WebString& path) { return false; }
+ virtual WebURL filePathToURL(const WebString& path) { return WebURL(); }
+ virtual FileHandle openFile(const WebString& path, int mode) { return FileHandle(); }
+ // Should set the FileHandle to a invalid value if the file is closed successfully.
+ virtual void closeFile(FileHandle&) { }
+ virtual long long seekFile(FileHandle, long long offset, int origin) { return 0; }
+ virtual bool truncateFile(FileHandle, long long offset) { return false; }
+ virtual int readFromFile(FileHandle, char* data, int length) { return 0; }
+ virtual int writeToFile(FileHandle, const char* data, int length) { return 0; }
+
+protected:
+ ~WebFileSystem() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 8cb4e47..6a0b24e 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -66,8 +66,6 @@ namespace WebKit {
WEBKIT_API void submit();
// FIXME: Deprecate and replace with WebVector<WebElement>.
WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&);
- // DEPRECATED: Replaced by getFormControlElements.
- WEBKIT_API void getInputElements(WebVector<WebInputElement>&) const;
WEBKIT_API void getFormControlElements(WebVector<WebFormControlElement>&) const;
#if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 315cf87..2b7ee0d 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -138,6 +138,10 @@ public:
// Navigational notifications ------------------------------------------
+ // A form submission has been requested, but the page's submit event handler
+ // hasn't yet had a chance to run (and possibly alter/interrupt the submit.)
+ virtual void willSendSubmitEvent(WebFrame*, const WebFormElement&) { }
+
// A form submission is about to occur.
virtual void willSubmitForm(WebFrame*, const WebFormElement&) { }
@@ -192,6 +196,9 @@ public:
// The page title is available.
virtual void didReceiveTitle(WebFrame*, const WebString& title) { }
+ // The icons for the page have changed.
+ virtual void didChangeIcons(WebFrame*) { }
+
// The frame's document finished loading.
virtual void didFinishDocumentLoad(WebFrame*) { }
@@ -211,8 +218,6 @@ public:
// The navigation resulted in scrolling the page to a named anchor instead
// of downloading a new document.
- // FIXME: The isNewNavigation parameter is DEPRECATED.
- virtual void didChangeLocationWithinPage(WebFrame*, bool isNewNavigation) { }
virtual void didChangeLocationWithinPage(WebFrame*) { }
// Called upon update to scroll position, document state, and other
@@ -292,6 +297,12 @@ public:
// Geometry notifications ----------------------------------------------
+ // The frame's document finished the initial layout of a page.
+ virtual void didFirstLayout(WebFrame*) { }
+
+ // The frame's document finished the initial non-empty layout of a page.
+ virtual void didFirstVisuallyNonEmptyLayout(WebFrame*) { }
+
// The size of the content area changed.
virtual void didChangeContentsSize(WebFrame*, const WebSize&) { }
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index 3418ef9..dc4f534 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -99,6 +99,9 @@ public:
// Resizes the region into which this WebGraphicsContext3D is drawing.
virtual void reshape(int width, int height) = 0;
+ // Query whether it is built on top of compliant GLES2 implementation.
+ virtual bool isGLES2Compliant() = 0;
+
// Helper for software compositing path. Reads back the frame buffer into
// the memory region pointed to by "pixels" with size "bufferSize". It is
// expected that the storage for "pixels" covers (4 * width * height) bytes.
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 0fec63f..a7a71b0 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -90,12 +90,6 @@ namespace WebKit {
WEBKIT_API void setAutofilled(bool);
WEBKIT_API void dispatchFormControlChangeEvent();
WEBKIT_API void setSelectionRange(int, int);
- // DEPRECATED: The following two methods have been moved to WebFormControlElement.
- WEBKIT_API WebString name() const;
- // Returns the name that should be used for the specified |element| when
- // storing AutoFill data. This is either the field name or its id, an
- // empty string if it has no name and no id.
- WEBKIT_API WebString nameForAutofill() const;
#if WEBKIT_IMPLEMENTATION
WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 38b131d..97d25a8 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -49,6 +49,7 @@ class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
class WebClipboard;
class WebCookieJar;
+class WebFileSystem;
class WebGLES2Context;
class WebGraphicsContext3D;
class WebIndexedDatabase;
@@ -70,6 +71,9 @@ public:
// Must return non-null.
virtual WebMimeRegistry* mimeRegistry() { return 0; }
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
// May return null if sandbox support is not necessary
virtual WebSandboxSupport* sandboxSupport() { return 0; }
@@ -85,10 +89,6 @@ public:
// Return a LocalStorage namespace that corresponds to the following path.
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
- // Return a new SessionStorage namespace.
- // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this.
- virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
-
// Called when storage events fire.
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
@@ -263,7 +263,7 @@ public:
virtual void stopSharedTimer() { }
// Callable from a background WebKit thread.
- virtual void callOnMainThread(void (*func)()) { }
+ virtual void callOnMainThread(void (*func)(void*), void* context) { }
// WebGL --------------------------------------------------------------
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index 5a87da0..792ede5 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -101,6 +101,11 @@ public:
WEBKIT_API void simulateClick();
WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const;
+ // Returns true if the node has a non-empty bounding box in layout.
+ // This does not 100% guarantee the user can see it, but is pretty close.
+ // Note: This method only works properly after layout has occurred.
+ WEBKIT_API bool hasNonEmptyBoundingBox() const;
+
// Deprecated. Use to() instead.
template<typename T> T toElement()
{
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index 9d64e2a..ab747e3 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -75,6 +75,9 @@ public:
WEBKIT_API WebString title() const;
WEBKIT_API WebString body() const;
+ WEBKIT_API WebString dir() const;
+ WEBKIT_API WebString replaceId() const;
+
// Called to indicate the notification has been displayed.
WEBKIT_API void dispatchDisplayEvent();
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 40a5952..03ff681 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -74,6 +74,9 @@ public:
WEBKIT_API static void enablePushState(bool);
WEBKIT_API static bool isPushStateEnabled(bool);
+ WEBKIT_API static void enableTouch(bool);
+ WEBKIT_API static bool isTouchEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h
index 815f471..ac0031d 100644
--- a/WebKit/chromium/public/WebSecurityPolicy.h
+++ b/WebKit/chromium/public/WebSecurityPolicy.h
@@ -55,9 +55,18 @@ public:
WEBKIT_API static void registerURLSchemeAsSecure(const WebString&);
// Support for whitelisting access to origins beyond the same-origin policy.
+ WEBKIT_API static void addOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void removeOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void resetOriginAccessWhitelists();
+ // DEPRECATED: Phase on of renaming to addOriginAccessWhitelistEntry.
WEBKIT_API static void whiteListAccessFromOrigin(
const WebURL& sourceOrigin, const WebString& destinationProtocol,
const WebString& destinationHost, bool allowDestinationSubdomains);
+ // DEPRECATED: Phase on of renaming to resetOriginAccessWhitelists..
WEBKIT_API static void resetOriginAccessWhiteLists();
// Returns whether the url should be allowed to see the referrer
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 6339ded..356d9fa 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -72,6 +72,7 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool) = 0;
virtual void setUsesPageCache(bool) = 0;
virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
+ virtual void setJavaScriptCanAccessClipboard(bool) = 0;
virtual void setXSSAuditorEnabled(bool) = 0;
virtual void setLocalStorageEnabled(bool) = 0;
virtual void setEditableLinkBehaviorNeverLive() = 0;
diff --git a/WebKit/chromium/public/WebStorageNamespace.h b/WebKit/chromium/public/WebStorageNamespace.h
index da92a77..4b648d4 100644
--- a/WebKit/chromium/public/WebStorageNamespace.h
+++ b/WebKit/chromium/public/WebStorageNamespace.h
@@ -48,7 +48,11 @@ public:
// If path is empty, data will not persist. You should call delete on the returned
// object when you're finished.
WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
- WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace();
+ WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
+ WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace()
+ {
+ return createSessionStorageNamespace(noQuota);
+ }
static const unsigned noQuota = UINT_MAX;
diff --git a/WebKit/chromium/public/win/WebThemeEngine.h b/WebKit/chromium/public/WebThemeEngine.h
index b563608..1fccb0e 100644
--- a/WebKit/chromium/public/win/WebThemeEngine.h
+++ b/WebKit/chromium/public/WebThemeEngine.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * 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
@@ -31,21 +31,23 @@
#ifndef WebThemeEngine_h
#define WebThemeEngine_h
-#include "../WebCanvas.h"
-#include "../WebColor.h"
+#include "WebCanvas.h"
+#include "WebColor.h"
namespace WebKit {
struct WebRect;
+struct WebSize;
+class WebThemeEngine {
+public:
+#ifdef WIN32
// The part and state parameters correspond to values defined by the
// Windows Theme API (see
// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ).
// The classicState parameter corresponds to the uState
// parameter of the Windows DrawFrameControl() function.
// See the definitions in <vsstyle.h> and <winuser.h>.
-class WebThemeEngine {
-public:
virtual void paintButton(
WebCanvas*, int part, int state, int classicState,
const WebRect&) = 0;
@@ -73,6 +75,45 @@ public:
virtual void paintTrackbar(
WebCanvas*, int part, int state, int classicState,
const WebRect&) = 0;
+#endif
+
+ // WebThemeEngine was originally used only on Windows, hence its platform-
+ // specific parameters. This is new cross-platform theming API, and we'll
+ // switch the code to using these APIs on all platforms instead.
+ enum Part {
+ PartScrollbarDownArrow,
+ PartScrollbarLeftArrow,
+ PartScrollbarRightArrow,
+ PartScrollbarUpArrow,
+ PartScrollbarHorizontalThumb,
+ PartScrollbarVerticalThumb,
+ PartScrollbarHoriztonalTrack,
+ PartScrollbarVerticalTrack,
+ };
+
+ enum State {
+ StateDisabled,
+ StateHot,
+ StateHover,
+ StateNormal,
+ StatePressed,
+ };
+
+ struct ScrollbarTrackExtraParams {
+ int alignX;
+ int alignY;
+ };
+
+ union ExtraParams {
+ ScrollbarTrackExtraParams scrollbarTrack;
+ };
+
+ // Gets the size of the given theme component. For variable sized items
+ // like vertical scrollbar tracks, the width will be the required width of
+ // the track while the height will be the minimum height.
+ virtual void getSize(Part, WebSize*) {}
+ virtual void paint(
+ WebCanvas*, Part, State, const WebRect&, const ExtraParams&) {}
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
index 41443b4..408aad7 100644
--- a/WebKit/chromium/public/WebURLRequest.h
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -67,7 +67,9 @@ public:
TargetIsFontResource = 5,
TargetIsImage = 6,
TargetIsObject = 7,
- TargetIsMedia = 8
+ TargetIsMedia = 8,
+ TargetIsWorker = 9,
+ TargetIsSharedWorker = 10
};
~WebURLRequest() { reset(); }
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 5a043f2..9ed98c6 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -225,13 +225,6 @@ public:
// AutoFill / Autocomplete ---------------------------------------------
- // DEPRECATED: WebView::applyAutocompleteSuggestions is the new way to
- // access this.
- virtual void applyAutofillSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex) = 0;
-
// Notifies the WebView that AutoFill suggestions are available for a node.
virtual void applyAutoFillSuggestions(
const WebNode&,
@@ -246,11 +239,8 @@ public:
const WebVector<WebString>& suggestions,
int defaultSuggestionIndex) = 0;
- // DEPRECATED: WebView::hideSuggestionsPopup is the new way to access this.
- virtual void hideAutofillPopup() = 0;
-
- // Hides the suggestions popup if any are showing.
- virtual void hideSuggestionsPopup() = 0;
+ // Hides any popup (suggestions, selects...) that might be showing.
+ virtual void hidePopups() = 0;
// Context menu --------------------------------------------------------
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index c2a96dc..98e0485 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -60,6 +60,7 @@ struct WebConsoleMessage;
struct WebContextMenuData;
struct WebPoint;
struct WebPopupMenuInfo;
+struct WebWindowFeatures;
// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient.
// Virtual inheritance allows an implementation of WebWidgetClient to be
@@ -71,16 +72,13 @@ public:
// Create a new related WebView. This method must clone its session storage
// so any subsequent calls to createSessionStorageNamespace conform to the
// WebStorage specification.
- virtual WebView* createView(WebFrame* creator) { return 0; }
+ virtual WebView* createView(WebFrame* creator,
+ const WebWindowFeatures& features) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
// responsible for rendering the contents of the popup menu.
virtual WebWidget* createPopupMenu(WebPopupType) { return 0; }
virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
- // Deprecated methods.
- virtual WebWidget* createPopupMenu() { return 0; }
- virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
-
// Create a session storage namespace object associated with this WebView.
virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index 9dfeefc..b1feee9 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -90,6 +90,10 @@ public:
// Changes the text direction of the selected input node.
virtual void setTextDirection(WebTextDirection) = 0;
+ // Returns true if the WebWidget uses GPU accelerated compositing
+ // to render its contents.
+ virtual bool isAcceleratedCompositingActive() const = 0;
+
protected:
~WebWidget() { }
};
diff --git a/WebKit/chromium/public/WebWindowFeatures.h b/WebKit/chromium/public/WebWindowFeatures.h
new file mode 100644
index 0000000..2e7278a
--- /dev/null
+++ b/WebKit/chromium/public/WebWindowFeatures.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebWindowFeatures_h
+#define WebWindowFeatures_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "WindowFeatures.h"
+#endif
+
+namespace WebKit {
+
+struct WebWindowFeatures {
+ float x;
+ bool xSet;
+ float y;
+ bool ySet;
+ float width;
+ bool widthSet;
+ float height;
+ bool heightSet;
+
+ bool menuBarVisible;
+ bool statusBarVisible;
+ bool toolBarVisible;
+ bool locationBarVisible;
+ bool scrollbarsVisible;
+ bool resizable;
+
+ bool fullscreen;
+ bool dialog;
+ WebVector<WebString> additionalFeatures;
+
+ WebWindowFeatures()
+ : xSet(false)
+ , ySet(false)
+ , widthSet(false)
+ , heightSet(false)
+ , menuBarVisible(true)
+ , statusBarVisible(true)
+ , toolBarVisible(true)
+ , locationBarVisible(true)
+ , scrollbarsVisible(true)
+ , resizable(true)
+ , fullscreen(false)
+ , dialog(false)
+ {
+ }
+
+
+#if WEBKIT_IMPLEMENTATION
+ WebWindowFeatures(const WebCore::WindowFeatures& f)
+ : xSet(f.xSet)
+ , ySet(f.ySet)
+ , widthSet(f.widthSet)
+ , heightSet(f.heightSet)
+ , menuBarVisible(f.menuBarVisible)
+ , statusBarVisible(f.statusBarVisible)
+ , toolBarVisible(f.toolBarVisible)
+ , locationBarVisible(f.locationBarVisible)
+ , scrollbarsVisible(f.scrollbarsVisible)
+ , resizable(f.resizable)
+ , fullscreen(f.fullscreen)
+ , dialog(f.dialog)
+ , additionalFeatures(f.additionalFeatures)
+ {
+ }
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index c7acab5..74f0bd8 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -74,6 +74,7 @@
#include "WebURLRequest.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include "WebWindowFeatures.h"
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
@@ -233,7 +234,7 @@ Page* ChromeClientImpl::createWindow(
return 0;
WebViewImpl* newView = static_cast<WebViewImpl*>(
- m_webView->client()->createView(WebFrameImpl::fromFrame(frame)));
+ m_webView->client()->createView(WebFrameImpl::fromFrame(frame), features));
if (!newView)
return 0;
@@ -622,15 +623,11 @@ void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
} else {
webwidget = m_webView->client()->createPopupMenu(
convertPopupType(popupContainer->popupType()));
- // Try the deprecated methods.
- // FIXME: Remove the deprecated methods once the Chromium side use the
- // new method.
- if (!webwidget)
- webwidget = m_webView->client()->createPopupMenu();
- if (!webwidget)
- webwidget = m_webView->client()->createPopupMenu(false);
+ // We only notify when the WebView has to handle the popup, as when
+ // the popup is handled externally, the fact that a popup is showing is
+ // transparent to the WebView.
+ m_webView->popupOpened(popupContainer);
}
- m_webView->popupOpened(popupContainer);
static_cast<WebPopupMenuImpl*>(webwidget)->Init(popupContainer, bounds);
}
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index cffd166..a0e8d3b 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -40,6 +40,7 @@
#include "WebCookieJar.h"
#include "WebCursorInfo.h"
#include "WebData.h"
+#include "WebFileSystem.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebImage.h"
@@ -270,63 +271,118 @@ void ChromiumBridge::prefetchDNS(const String& hostname)
bool ChromiumBridge::fileExists(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->fileExists(path);
return webKitClient()->fileExists(path);
}
bool ChromiumBridge::deleteFile(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->deleteFile(path);
return webKitClient()->deleteFile(path);
}
bool ChromiumBridge::deleteEmptyDirectory(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->deleteEmptyDirectory(path);
return webKitClient()->deleteEmptyDirectory(path);
}
bool ChromiumBridge::getFileSize(const String& path, long long& result)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->getFileSize(path, result);
return webKitClient()->getFileSize(path, result);
}
bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result)
{
double modificationTime;
- if (!webKitClient()->getFileModificationTime(path, modificationTime))
- return false;
+ if (webKitClient()->fileSystem()) {
+ if (!webKitClient()->fileSystem()->getFileModificationTime(path, modificationTime))
+ return false;
+ } else {
+ if (!webKitClient()->getFileModificationTime(path, modificationTime))
+ return false;
+ }
result = static_cast<time_t>(modificationTime);
return true;
}
String ChromiumBridge::directoryName(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->directoryName(path);
return webKitClient()->directoryName(path);
}
String ChromiumBridge::pathByAppendingComponent(const String& path, const String& component)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->pathByAppendingComponent(path, component);
return webKitClient()->pathByAppendingComponent(path, component);
}
bool ChromiumBridge::makeAllDirectories(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->makeAllDirectories(path);
return webKitClient()->makeAllDirectories(path);
}
String ChromiumBridge::getAbsolutePath(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->getAbsolutePath(path);
return webKitClient()->getAbsolutePath(path);
}
bool ChromiumBridge::isDirectory(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->isDirectory(path);
return webKitClient()->isDirectory(path);
}
KURL ChromiumBridge::filePathToURL(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->filePathToURL(path);
return webKitClient()->filePathToURL(path);
}
+PlatformFileHandle ChromiumBridge::openFile(const String& path, FileOpenMode mode)
+{
+ return webKitClient()->fileSystem()->openFile(path, mode);
+}
+
+void ChromiumBridge::closeFile(PlatformFileHandle& handle)
+{
+ webKitClient()->fileSystem()->closeFile(handle);
+}
+
+long long ChromiumBridge::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
+{
+ return webKitClient()->fileSystem()->seekFile(handle, offset, origin);
+}
+
+bool ChromiumBridge::truncateFile(PlatformFileHandle handle, long long offset)
+{
+ return webKitClient()->fileSystem()->truncateFile(handle, offset);
+}
+
+int ChromiumBridge::readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ return webKitClient()->fileSystem()->readFromFile(handle, data, length);
+}
+
+int ChromiumBridge::writeToFile(PlatformFileHandle handle, const char* data, int length)
+{
+ return webKitClient()->fileSystem()->writeToFile(handle, data, length);
+}
+
// Font -----------------------------------------------------------------------
#if OS(WINDOWS)
diff --git a/WebKit/chromium/src/ChromiumThreading.cpp b/WebKit/chromium/src/ChromiumThreading.cpp
index 902a433..c6fefac 100644
--- a/WebKit/chromium/src/ChromiumThreading.cpp
+++ b/WebKit/chromium/src/ChromiumThreading.cpp
@@ -38,13 +38,9 @@
namespace WTF {
-void ChromiumThreading::initializeMainThread()
+void ChromiumThreading::callOnMainThread(void (*func)(void*), void* context)
{
-}
-
-void ChromiumThreading::scheduleDispatchFunctionsOnMainThread()
-{
- WebKit::webKitClient()->callOnMainThread(&WTF::dispatchFunctionsFromMainThread);
+ WebKit::webKitClient()->callOnMainThread(func, context);
}
} // namespace WTF
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 135392b..17d9416 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -628,14 +628,9 @@ void FrameLoaderClientImpl::dispatchDidNavigateWithinPage()
bool isNewNavigation;
webView->didCommitLoad(&isNewNavigation);
- if (m_webFrame->client()) {
+ if (m_webFrame->client())
m_webFrame->client()->didNavigateWithinPage(m_webFrame, isNewNavigation);
- // FIXME: Remove this notification once it is no longer consumed downstream.
- if (isHashChange)
- m_webFrame->client()->didChangeLocationWithinPage(m_webFrame, isNewNavigation);
- }
-
// Generate didStopLoading if loader is completed.
if (webView->client() && loaderCompleted)
webView->client()->didStopLoading();
@@ -726,6 +721,12 @@ void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title)
m_webFrame->client()->didReceiveTitle(m_webFrame, title);
}
+void FrameLoaderClientImpl::dispatchDidChangeIcons()
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->didChangeIcons(m_webFrame);
+}
+
void FrameLoaderClientImpl::dispatchDidCommitLoad()
{
WebViewImpl* webview = m_webFrame->viewImpl();
@@ -788,12 +789,14 @@ void FrameLoaderClientImpl::dispatchDidFinishLoad()
void FrameLoaderClientImpl::dispatchDidFirstLayout()
{
+ if (m_webFrame->client())
+ m_webFrame->client()->didFirstLayout(m_webFrame);
}
void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout()
{
- // FIXME: called when webkit finished layout of a page that was visually non-empty.
- // All resources have not necessarily finished loading.
+ if (m_webFrame->client())
+ m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame);
}
Frame* FrameLoaderClientImpl::dispatchCreatePage()
@@ -949,6 +952,12 @@ void FrameLoaderClientImpl::dispatchUnableToImplementPolicy(const ResourceError&
m_webFrame->client()->unableToImplementPolicyWithError(m_webFrame, error);
}
+void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(form));
+}
+
void FrameLoaderClientImpl::dispatchWillSubmitForm(FramePolicyFunction function,
PassRefPtr<FormState> formState)
{
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 1cbc1de..c163f62 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -102,6 +102,7 @@ public:
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
virtual void dispatchDidReceiveTitle(const WebCore::String& title);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&);
virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
@@ -116,6 +117,7 @@ public:
virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state);
virtual void cancelPolicyCheck();
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*);
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 0f9c959..e51f433 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -111,6 +111,8 @@ public:
void beginPaint(WebGLRenderingContext* context);
void endPaint();
+ bool isGLES2Compliant() const;
+
//----------------------------------------------------------------------
// Entry points for WebGL.
//
@@ -617,6 +619,11 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
DELEGATE_TO_IMPL_1R(sizeInBytes, int, int)
+bool GraphicsContext3DInternal::isGLES2Compliant() const
+{
+ return m_impl->isGLES2Compliant();
+}
+
DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
DELEGATE_TO_IMPL_2_X12(attachShader, WebGLProgram*, WebGLShader*)
@@ -1202,41 +1209,10 @@ DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
- bool flipY, bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texImage2D(target, level, internalFormat,
- image->width(), image->height(), 0,
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float)
DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int)
-
DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-int GraphicsContext3D::texSubImage2D(unsigned target,
- unsigned level,
- unsigned xoffset,
- unsigned yoffset,
- Image* image,
- bool flipY,
- bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texSubImage2D(target, level, xoffset, yoffset,
- image->width(), image->height(),
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_2(uniform1f, long, float)
DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int)
DELEGATE_TO_INTERNAL_2(uniform1i, long, int)
@@ -1291,6 +1267,11 @@ DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned)
DELEGATE_TO_INTERNAL_1(synthesizeGLError, unsigned long)
+bool GraphicsContext3D::isGLES2Compliant() const
+{
+ return m_internal->isGLES2Compliant();
+}
+
} // namespace WebCore
#endif // ENABLE(3D_CANVAS)
diff --git a/WebKit/chromium/src/SharedWorkerRepository.cpp b/WebKit/chromium/src/SharedWorkerRepository.cpp
index f0a8ec8..a2b513f 100644
--- a/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -70,6 +70,7 @@ public:
, m_name(name)
, m_webWorker(webWorker)
, m_port(port)
+ , m_scriptLoader(ResourceRequestBase::TargetIsSharedWorker)
, m_loading(false)
{
}
diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp
index 0e44250..5311b65 100644
--- a/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -125,8 +125,12 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
frames.append(frame);
}
- for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
+ for (unsigned i = 0; i < frames.size(); ++i) {
+ ExceptionCode ec = 0;
+ Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
+ if (!ec)
+ frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
+ }
} else {
// Send events to every page.
const HashSet<Page*>& pages = page->group().pages();
diff --git a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
index ae25d44..631753b 100644
--- a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
+++ b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
@@ -71,13 +71,11 @@ void StorageEventDispatcherImpl::dispatchStorageEvent(const String& key, const S
}
}
- // FIXME: Figure out how to pass in the document URI.
for (unsigned i = 0; i < frames.size(); ++i) {
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->localStorage(ec);
if (!ec)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue,
- url, storage));
+ frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
}
}
diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
index aaf9036..dd7d9b8 100644
--- a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
+++ b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
@@ -156,11 +156,9 @@ void SuggestionsPopupMenuClient::initialize(HTMLInputElement* textField,
FontDescription fontDescription;
RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
fontDescription);
+ RenderStyle* style = m_textField->computedStyle();
+ fontDescription.setComputedSize(style->fontDescription().computedSize());
- // Use a smaller font size to match IE/Firefox.
- // FIXME: http://crbug.com/7376 use the system size instead of a
- // fixed font size value.
- fontDescription.setComputedSize(12.0);
Font font(fontDescription, 0, 0);
font.update(textField->document()->styleSelector()->fontSelector());
// The direction of text in popup menu is set the same as the direction of
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 3ed16e6..25a396e 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -32,6 +32,8 @@
#include "WebElement.h"
#include "Element.h"
+#include "RenderBoxModelObject.h"
+#include "RenderObject.h"
#include <wtf/PassRefPtr.h>
using namespace WebCore;
diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp
index 610c36d..7952479 100644
--- a/WebKit/chromium/src/WebFormElement.cpp
+++ b/WebKit/chromium/src/WebFormElement.cpp
@@ -78,18 +78,6 @@ void WebFormElement::getNamedElements(const WebString& name,
result.assign(tempVector);
}
-void WebFormElement::getInputElements(WebVector<WebInputElement>& result) const
-{
- const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
- Vector<RefPtr<HTMLInputElement> > tempVector;
- for (size_t i = 0; i < form->formElements.size(); i++) {
- if (form->formElements[i]->hasLocalName(HTMLNames::inputTag))
- tempVector.append(static_cast<HTMLInputElement*>(
- form->formElements[i]));
- }
- result.assign(tempVector);
-}
-
void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const
{
const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 2ff1c11..52bc645 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -464,6 +464,11 @@ int WebGraphicsContext3DDefaultImpl::sizeInBytes(int type)
return 0;
}
+bool WebGraphicsContext3DDefaultImpl::isGLES2Compliant()
+{
+ return false;
+}
+
static int createTextureObject(GLenum target)
{
GLuint texture = 0;
@@ -1050,7 +1055,23 @@ void WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv(unsign
glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, value);
}
-DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, unsigned long, int*)
+void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* value)
+{
+ // Need to emulate IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for GL. Any valid
+ // combination should work, but GL_RGB/GL_UNSIGNED_BYTE might be the most
+ // useful for desktop WebGL users.
+ makeContextCurrent();
+ switch (pname) {
+ case 0x8B9B: // IMPLEMENTATION_COLOR_READ_FORMAT
+ *value = GL_RGB;
+ break;
+ case 0x8B9A: // IMPLEMENTATION_COLOR_READ_TYPE
+ *value = GL_UNSIGNED_BYTE;
+ break;
+ default:
+ glGetIntegerv(pname, value);
+ }
+}
DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, unsigned long, int*)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index cc283e3..2518a37 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -75,6 +75,8 @@ public:
virtual int sizeInBytes(int type);
+ virtual bool isGLES2Compliant();
+
virtual void reshape(int width, int height);
virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize);
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 1eab91f..2f65ad2 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -94,24 +94,6 @@ void WebInputElement::setSelectionRange(int start, int end)
{
unwrap<HTMLInputElement>()->setSelectionRange(start, end);
}
-
-WebString WebInputElement::name() const
-{
- return constUnwrap<HTMLInputElement>()->name();
-}
-
-WebString WebInputElement::nameForAutofill() const
-{
- String name = constUnwrap<HTMLInputElement>()->name();
- String trimmedName = name.stripWhiteSpace();
- if (!trimmedName.isEmpty())
- return trimmedName;
- name = constUnwrap<HTMLInputElement>()->getAttribute(HTMLNames::idAttr);
- trimmedName = name.stripWhiteSpace();
- if (!trimmedName.isEmpty())
- return trimmedName;
- return String();
-}
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index a8e1851..8346ef8 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -56,6 +56,7 @@ void initialize(WebKitClient* webKitClient)
s_webKitClient = webKitClient;
WTF::initializeThreading();
+ WTF::initializeMainThread();
WebCore::AtomicString::init();
// Chromium sets the minimum interval timeout to 4ms, overriding the
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index e050c79..90bbb34 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -178,6 +178,11 @@ WebNodeList WebNode::getElementsByTagName(const WebString& tag) const
return WebNodeList(m_private->getElementsByTagName(tag));
}
+bool WebNode::hasNonEmptyBoundingBox() const
+{
+ return m_private->hasNonEmptyBoundingBox();
+}
+
WebNode::WebNode(const PassRefPtr<Node>& node)
: m_private(node)
{
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 5200d17..5ae1557 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -94,6 +94,16 @@ WebString WebNotification::body() const
return m_private->contents().body();
}
+WebString WebNotification::dir() const
+{
+ return m_private->dir();
+}
+
+WebString WebNotification::replaceId() const
+{
+ return m_private->replaceId();
+}
+
void WebNotification::dispatchDisplayEvent()
{
RefPtr<Event> event = Event::create("display", false, true);
diff --git a/WebKit/chromium/src/WebPasswordFormData.cpp b/WebKit/chromium/src/WebPasswordFormData.cpp
index 64b1754..eb230d5 100644
--- a/WebKit/chromium/src/WebPasswordFormData.cpp
+++ b/WebKit/chromium/src/WebPasswordFormData.cpp
@@ -162,7 +162,10 @@ WebPasswordFormData::WebPasswordFormData(const WebFormElement& webForm)
KURL fullOrigin(ParsedURLString, form->document()->documentURI());
// Calculate the canonical action URL
- KURL fullAction = frame->loader()->completeURL(form->action());
+ String action = form->action();
+ if (action.isNull())
+ action = ""; // missing 'action' attribute implies current URL
+ KURL fullAction = frame->loader()->completeURL(action);
if (!fullAction.isValid())
return;
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 2cdf255..b207a25 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -128,10 +128,10 @@ void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/);
}
-void WebPluginContainerImpl::setFocus()
+void WebPluginContainerImpl::setFocus(bool focused)
{
- Widget::setFocus();
- m_webPlugin->updateFocus(true);
+ Widget::setFocus(focused);
+ m_webPlugin->updateFocus(focused);
}
void WebPluginContainerImpl::show()
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h
index 3160394..4163ee5 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -67,7 +67,7 @@ public:
virtual void setFrameRect(const WebCore::IntRect&);
virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
virtual void invalidateRect(const WebCore::IntRect&);
- virtual void setFocus();
+ virtual void setFocus(bool);
virtual void show();
virtual void hide();
virtual void handleEvent(WebCore::Event*);
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 7390394..ca50b81 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -75,6 +75,7 @@ public:
int targetStart, int targetEnd, const WebString& text);
virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
virtual void setTextDirection(WebTextDirection direction);
+ virtual bool isAcceleratedCompositingActive() const { return false; }
// WebPopupMenuImpl
void Init(WebCore::FramelessScrollView* widget,
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 464834d..8e73d6f 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -210,4 +210,20 @@ bool WebRuntimeFeatures::isPushStateEnabled(bool enable)
return RuntimeEnabledFeatures::pushStateEnabled();
}
+void WebRuntimeFeatures::enableTouch(bool enable)
+{
+#if ENABLE(TOUCH_EVENTS)
+ RuntimeEnabledFeatures::setTouchEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isTouchEnabled()
+{
+#if ENABLE(TOUCH_EVENTS)
+ return RuntimeEnabledFeatures::touchEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp
index 24ef7d1..cb7ded0 100644
--- a/WebKit/chromium/src/WebSecurityPolicy.cpp
+++ b/WebKit/chromium/src/WebSecurityPolicy.cpp
@@ -56,7 +56,8 @@ void WebSecurityPolicy::registerURLSchemeAsSecure(const WebString& scheme)
SecurityOrigin::registerURLSchemeAsSecure(scheme);
}
-void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
+void WebSecurityPolicy::addOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin,
const WebString& destinationProtocol,
const WebString& destinationHost,
bool allowDestinationSubdomains)
@@ -66,11 +67,38 @@ void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
destinationHost, allowDestinationSubdomains);
}
-void WebSecurityPolicy::resetOriginAccessWhiteLists()
+void WebSecurityPolicy::removeOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin,
+ const WebString& destinationProtocol,
+ const WebString& destinationHost,
+ bool allowDestinationSubdomains)
+{
+ SecurityOrigin::removeOriginAccessWhitelistEntry(
+ *SecurityOrigin::create(sourceOrigin), destinationProtocol,
+ destinationHost, allowDestinationSubdomains);
+}
+
+void WebSecurityPolicy::resetOriginAccessWhitelists()
{
SecurityOrigin::resetOriginAccessWhitelists();
}
+// To be removed when Chromium's test_shell has proper references.
+void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
+ const WebString& destinationProtocol,
+ const WebString& destinationHost,
+ bool allowDestinationSubdomains)
+{
+ addOriginAccessWhitelistEntry(sourceOrigin,
+ destinationProtocol, destinationHost,
+ allowDestinationSubdomains);
+}
+
+void WebSecurityPolicy::resetOriginAccessWhiteLists()
+{
+ resetOriginAccessWhitelists();
+}
+
bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer)
{
return SecurityOrigin::shouldHideReferrer(url, referrer);
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 9e0fa91..3adf3ac 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -200,6 +200,11 @@ void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled)
m_settings->setDownloadableBinaryFontsEnabled(enabled);
}
+void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled)
+{
+ m_settings->setJavaScriptCanAccessClipboard(enabled);
+}
+
void WebSettingsImpl::setXSSAuditorEnabled(bool enabled)
{
m_settings->setXSSAuditorEnabled(enabled);
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 7a809c7..54c660b 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -74,6 +74,7 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool);
virtual void setUsesPageCache(bool);
virtual void setDownloadableBinaryFontsEnabled(bool);
+ virtual void setJavaScriptCanAccessClipboard(bool);
virtual void setXSSAuditorEnabled(bool);
virtual void setLocalStorageEnabled(bool);
virtual void setEditableLinkBehaviorNeverLive();
diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
index 66be027..5fc6e16 100644
--- a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
+++ b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
@@ -45,9 +45,9 @@ WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebS
return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::localStorageNamespace(path, quota));
}
-WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace()
+WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace(unsigned quota)
{
- return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(noQuota));
+ return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(quota));
}
WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace)
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 671a8c9..81a4ff3 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -183,7 +183,9 @@ void WebView::willEnterModalLoop()
PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
ASSERT(pageGroup);
- ASSERT(!pageGroup->pages().isEmpty());
+
+ if (pageGroup->pages().isEmpty())
+ return;
// Pick any page in the page group since we are deferring all pages.
pageGroupLoadDeferrer = new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true);
@@ -191,9 +193,6 @@ void WebView::willEnterModalLoop()
void WebView::didExitModalLoop()
{
- // The embedder must have called willEnterNestedEventLoop.
- ASSERT(pageGroupLoadDeferrer);
-
delete pageGroupLoadDeferrer;
pageGroupLoadDeferrer = 0;
}
@@ -243,13 +242,14 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_haveMouseCapture(false)
#if USE(ACCELERATED_COMPOSITING)
, m_layerRenderer(0)
- , m_isAcceleratedCompositing(false)
+ , m_isAcceleratedCompositingActive(false)
#endif
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
// initialized because CollatorICU requires it.
WTF::initializeThreading();
+ WTF::initializeMainThread();
// set to impossible point so we always get the first mouse pos
m_lastMousePosition = WebPoint(-1, -1);
@@ -326,9 +326,15 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
- // If there is a select popup opened, close it as the user is clicking on
- // the page (outside of the popup).
- hideSelectPopup();
+ // If there is a select popup open, close it as the user is clicking on
+ // the page (outside of the popup). We also save it so we can prevent a
+ // click on the select element from immediately reopening the popup.
+ RefPtr<WebCore::PopupContainer> selectPopup;
+ if (event.button == WebMouseEvent::ButtonLeft) {
+ selectPopup = m_selectPopup;
+ hideSelectPopup();
+ ASSERT(!m_selectPopup);
+ }
m_lastMouseDownPoint = WebPoint(event.x, event.y);
m_haveMouseCapture = true;
@@ -362,6 +368,13 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
static_cast<EditorClientImpl*>(m_page->editorClient())->
showFormAutofillForNode(clickedNode.get());
}
+ if (m_selectPopup && m_selectPopup == selectPopup) {
+ // That click triggered a select popup which is the same as the one that
+ // was showing before the click. It means the user clicked the select
+ // while the popup was showing, and as a result we first closed then
+ // immediately reopened the select popup. It needs to be closed.
+ hideSelectPopup();
+ }
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Windows, we handle it on mouse up, not down.
@@ -849,6 +862,14 @@ void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
}
}
+void WebViewImpl::hideSuggestionsPopup()
+{
+ if (m_suggestionsPopupShowing) {
+ m_suggestionsPopup->hidePopup();
+ m_suggestionsPopupShowing = false;
+ }
+}
+
Frame* WebViewImpl::focusedWebCoreFrame()
{
return m_page.get() ? m_page->focusController()->focusedOrMainFrame() : 0;
@@ -931,7 +952,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
{
#if USE(ACCELERATED_COMPOSITING)
- if (!isAcceleratedCompositing()) {
+ if (!isAcceleratedCompositingActive()) {
#endif
WebFrameImpl* webframe = mainFrameImpl();
if (webframe)
@@ -1267,6 +1288,15 @@ void WebViewImpl::setTextDirection(WebTextDirection direction)
}
}
+bool WebViewImpl::isAcceleratedCompositingActive() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ return m_isAcceleratedCompositingActive;
+#else
+ return false;
+#endif
+}
+
// WebView --------------------------------------------------------------------
WebSettings* WebViewImpl::settings()
@@ -1667,14 +1697,6 @@ WebAccessibilityObject WebViewImpl::accessibilityObject()
document->axObjectCache()->getOrCreate(document->renderer()));
}
-void WebViewImpl::applyAutofillSuggestions(
- const WebNode& node,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex)
-{
- applyAutocompleteSuggestions(node, suggestions, defaultSuggestionIndex);
-}
-
void WebViewImpl::applyAutoFillSuggestions(
const WebNode& node,
const WebVector<WebString>& names,
@@ -1789,19 +1811,12 @@ void WebViewImpl::applyAutocompleteSuggestions(
}
}
-void WebViewImpl::hideAutofillPopup()
+void WebViewImpl::hidePopups()
{
+ hideSelectPopup();
hideSuggestionsPopup();
}
-void WebViewImpl::hideSuggestionsPopup()
-{
- if (m_suggestionsPopupShowing) {
- m_suggestionsPopup->hidePopup();
- m_suggestionsPopupShowing = false;
- }
-}
-
void WebViewImpl::performCustomContextMenuAction(unsigned action)
{
if (!m_page)
@@ -2038,29 +2053,29 @@ bool WebViewImpl::tabsToLinks() const
#if USE(ACCELERATED_COMPOSITING)
void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
{
- setAcceleratedCompositing(layer ? true : false);
+ setIsAcceleratedCompositingActive(layer ? true : false);
if (m_layerRenderer)
m_layerRenderer->setRootLayer(layer);
}
-void WebViewImpl::setAcceleratedCompositing(bool accelerated)
+void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
{
- if (m_isAcceleratedCompositing == accelerated)
+ if (m_isAcceleratedCompositingActive == active)
return;
- if (accelerated) {
+ if (active) {
m_layerRenderer = LayerRendererChromium::create();
if (m_layerRenderer)
- m_isAcceleratedCompositing = true;
+ m_isAcceleratedCompositingActive = true;
} else {
m_layerRenderer = 0;
- m_isAcceleratedCompositing = false;
+ m_isAcceleratedCompositingActive = false;
}
}
void WebViewImpl::updateRootLayerContents(const WebRect& rect)
{
- if (!isAcceleratedCompositing())
+ if (!isAcceleratedCompositingActive())
return;
WebFrameImpl* webframe = mainFrameImpl();
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index ba2dc25..0bed223 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -100,6 +100,7 @@ public:
virtual bool queryCompositionStatus(bool* enabled,
WebRect* caretRect);
virtual void setTextDirection(WebTextDirection direction);
+ virtual bool isAcceleratedCompositingActive() const;
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
@@ -156,10 +157,6 @@ public:
virtual WebDevToolsAgent* devToolsAgent();
virtual void setDevToolsAgent(WebDevToolsAgent*);
virtual WebAccessibilityObject accessibilityObject();
- virtual void applyAutofillSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex);
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
@@ -169,8 +166,7 @@ public:
const WebNode&,
const WebVector<WebString>& suggestions,
int defaultSuggestionIndex);
- virtual void hideAutofillPopup();
- virtual void hideSuggestionsPopup();
+ virtual void hidePopups();
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor);
@@ -299,6 +295,8 @@ public:
void popupOpened(WebCore::PopupContainer* popupContainer);
void popupClosed(WebCore::PopupContainer* popupContainer);
+ void hideSuggestionsPopup();
+
// HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can
// fix WebKit to pass enough information up into ChromeClient::show() so we
// can decide if the window.open event was caused by a middle-mouse click
@@ -343,7 +341,6 @@ private:
// Returns true if the view was scrolled.
bool scrollViewWithKeyboard(int keyCode, int modifiers);
- // Hides the select popup if one is opened.
void hideSelectPopup();
// Converts |pos| from window coordinates to contents coordinates and gets
@@ -358,8 +355,7 @@ private:
DragAction);
#if USE(ACCELERATED_COMPOSITING)
- void setAcceleratedCompositing(bool);
- bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; }
+ void setIsAcceleratedCompositingActive(bool);
void updateRootLayerContents(const WebRect&);
#endif
@@ -495,7 +491,7 @@ private:
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer;
- bool m_isAcceleratedCompositing;
+ bool m_isAcceleratedCompositingActive;
#endif
static const WebInputEvent* m_currentInputEvent;
};
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index da51414..8e26560 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -51,30 +51,6 @@ namespace WebKit {
#if ENABLE(WORKERS)
-// Dummy WebViewDelegate - we only need it in Worker process to load a
-// 'shadow page' which will initialize WebCore loader.
-class WorkerWebFrameClient : public WebFrameClient {
-public:
- // Tell the loader to load the data into the 'shadow page' synchronously,
- // so we can grab the resulting Document right after load.
- virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds)
- {
- static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
- }
-
- // Lazy allocate and leak this instance.
- static WorkerWebFrameClient* sharedInstance()
- {
- static WorkerWebFrameClient client;
- return &client;
- }
-
-private:
- WorkerWebFrameClient()
- {
- }
-};
-
// This function is called on the main thread to force to initialize some static
// values used in WebKit before any worker thread is started. This is because in
// our worker processs, we do not run any WebKit code in main thread and thus
@@ -103,6 +79,9 @@ WebWorkerBase::WebWorkerBase()
WebWorkerBase::~WebWorkerBase()
{
ASSERT(m_webView);
+ WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame());
+ if (webFrame)
+ webFrame->setClient(0);
m_webView->close();
}
@@ -122,7 +101,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url)
// infrastructure.
ASSERT(!m_webView);
m_webView = WebView::create(0);
- m_webView->initializeMainFrame(WorkerWebFrameClient::sharedInstance());
+ m_webView->initializeMainFrame(this);
WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame());
@@ -151,6 +130,20 @@ void WebWorkerBase::invokeTaskMethod(void* param)
delete task;
}
+void WebWorkerBase::didCreateDataSource(WebFrame*, WebDataSource* ds)
+{
+ // Tell the loader to load the data into the 'shadow page' synchronously,
+ // so we can grab the resulting Document right after load.
+ static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
+}
+
+WebApplicationCacheHost* WebWorkerBase::createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient* appcacheHostClient)
+{
+ if (commonClient())
+ return commonClient()->createApplicationCacheHost(appcacheHostClient);
+ return 0;
+}
+
// WorkerObjectProxy -----------------------------------------------------------
void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message,
diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h
index 1252770..a470ee4 100644
--- a/WebKit/chromium/src/WebWorkerBase.h
+++ b/WebKit/chromium/src/WebWorkerBase.h
@@ -34,6 +34,7 @@
#if ENABLE(WORKERS)
#include "ScriptExecutionContext.h"
+#include "WebFrameClient.h"
#include "WorkerLoaderProxy.h"
#include "WorkerObjectProxy.h"
#include <wtf/PassOwnPtr.h>
@@ -44,6 +45,8 @@ class WorkerThread;
}
namespace WebKit {
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
class WebCommonWorkerClient;
class WebSecurityOrigin;
class WebString;
@@ -56,7 +59,8 @@ class WebWorkerClient;
// code used by both implementation classes, including implementations of the
// WorkerObjectProxy and WorkerLoaderProxy interfaces.
class WebWorkerBase : public WebCore::WorkerObjectProxy
- , public WebCore::WorkerLoaderProxy {
+ , public WebCore::WorkerLoaderProxy
+ , public WebFrameClient {
public:
WebWorkerBase();
virtual ~WebWorkerBase();
@@ -80,6 +84,10 @@ public:
virtual void postTaskForModeToWorkerContext(
PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WebCore::String& mode);
+ // WebFrameClient methods to support resource loading thru the 'shadow page'.
+ virtual void didCreateDataSource(WebFrame*, WebDataSource*);
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*);
+
// Executes the given task on the main thread.
static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h
index 4bdc332..907499a 100644
--- a/WebKit/chromium/src/WebWorkerClientImpl.h
+++ b/WebKit/chromium/src/WebWorkerClientImpl.h
@@ -94,6 +94,7 @@ public:
// FIXME: Notifications not yet supported in workers.
return 0;
}
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) { return 0; }
private:
virtual ~WebWorkerClientImpl();
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index 8230616..67e54aa 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -182,6 +182,7 @@ devtools.DebuggerAgent.prototype.initUI = function()
for (var scriptId in this.parsedScripts_) {
var script = this.parsedScripts_[scriptId];
WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1);
+ this.restoreBreakpoints_(scriptId, script.getUrl());
}
return;
}
@@ -245,7 +246,7 @@ devtools.DebuggerAgent.prototype.pauseExecution = function()
* @param {number} line Number of the line for the breakpoint.
* @param {?string} condition The breakpoint condition.
*/
-devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condition)
+devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, enabled, condition)
{
var script = this.parsedScripts_[sourceId];
if (!script)
@@ -263,7 +264,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
this.urlToBreakpoints_[script.getUrl()] = breakpoints;
}
- var breakpointInfo = new devtools.BreakpointInfo(line);
+ var breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
breakpoints[line] = breakpointInfo;
commandArguments = {
@@ -278,7 +279,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
if (breakpointInfo)
return;
- breakpointInfo = new devtools.BreakpointInfo(line);
+ breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
script.addBreakpointInfo(breakpointInfo);
commandArguments = {
@@ -290,6 +291,9 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
};
}
+ if (!enabled)
+ return;
+
var cmd = new devtools.DebugCommand("setbreakpoint", commandArguments);
this.requestNumberToBreakpointInfo_[cmd.getSequenceNumber()] = breakpointInfo;
@@ -305,18 +309,11 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
/**
* Changes given line of the script.
*/
-devtools.DebuggerAgent.prototype.editScriptLine = function(sourceId, line, newContent, callback)
+devtools.DebuggerAgent.prototype.editScriptSource = function(sourceId, newContent, callback)
{
- var script = this.parsedScripts_[sourceId];
- if (!script || !script.source)
- return;
-
- var lines = script.source.split("\n");
- lines[line] = newContent;
-
var commandArguments = {
"script_id": sourceId,
- "new_source": lines.join("\n")
+ "new_source": newContent
};
var cmd = new devtools.DebugCommand("changelive", commandArguments);
@@ -962,6 +959,7 @@ devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg)
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);
+ this.restoreBreakpoints_(script.id, script.name);
}
};
@@ -1085,6 +1083,23 @@ devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame)
/**
+ * Restores breakpoints associated with the URL of a newly parsed script.
+ * @param {number} sourceID The id of the script.
+ * @param {string} scriptUrl URL of the script.
+ */
+devtools.DebuggerAgent.prototype.restoreBreakpoints_ = function(sourceID, scriptUrl)
+{
+ var breakpoints = this.urlToBreakpoints_[scriptUrl];
+ for (var line in breakpoints) {
+ if (parseInt(line) == line) {
+ var v8Line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(parseInt(line));
+ WebInspector.restoredBreakpoint(sourceID, scriptUrl, v8Line, breakpoints[line].enabled(), breakpoints[line].condition());
+ }
+ }
+};
+
+
+/**
* Collects properties for an object from the debugger response.
* @param {Object} object An object from the debugger protocol response.
* @param {Array.<WebInspector.ObjectPropertyProxy>} result An array to put the
@@ -1279,9 +1294,11 @@ devtools.ScriptInfo.prototype.removeBreakpointInfo = function(breakpoint)
* @param {number} line Breakpoint 0-based line number in the containing script.
* @constructor
*/
-devtools.BreakpointInfo = function(line)
+devtools.BreakpointInfo = function(line, enabled, condition)
{
this.line_ = line;
+ this.enabled_ = enabled;
+ this.condition_ = condition;
this.v8id_ = -1;
this.removed_ = false;
};
@@ -1316,7 +1333,7 @@ devtools.BreakpointInfo.prototype.setV8Id = function(id)
/**
- * Marks this breakpoint as removed from the front-end.
+ * Marks this breakpoint as removed from the front-end.
*/
devtools.BreakpointInfo.prototype.markAsRemoved = function()
{
@@ -1335,6 +1352,24 @@ devtools.BreakpointInfo.prototype.isRemoved = function()
/**
+ * @return {boolean} Whether this breakpoint is enabled.
+ */
+devtools.BreakpointInfo.prototype.enabled = function()
+{
+ return this.enabled_;
+};
+
+
+/**
+ * @return {?string} Breakpoint condition.
+ */
+devtools.BreakpointInfo.prototype.condition = function()
+{
+ return this.condition_;
+};
+
+
+/**
* Call stack frame data.
* @param {string} id CallFrame id.
* @param {string} type CallFrame type.
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 75c5467..7c4d126 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -33,18 +33,29 @@ function debuggerScriptConstructor() {
var DebuggerScript = {};
DebuggerScript._breakpoints = {};
+DebuggerScript.PauseOnExceptionsState = {
+ DontPauseOnExceptions : 0,
+ PauseOnAllExceptions : 1,
+ PauseOnUncaughtExceptions: 2
+};
+
+DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions;
+Debug.clearBreakOnException();
+Debug.clearBreakOnUncaughtException();
DebuggerScript.getAfterCompileScript = function(execState, args)
{
return DebuggerScript._formatScript(args.eventData.script_.script_);
}
-DebuggerScript.getScripts = function(execState, args)
+DebuggerScript.getScripts = function(contextData)
{
var scripts = Debug.scripts();
var result = [];
for (var i = 0; i < scripts.length; ++i) {
- result.push(DebuggerScript._formatScript(scripts[i]));
+ var script = scripts[i];
+ if (contextData === script.context_data)
+ result.push(DebuggerScript._formatScript(script));
}
return result;
}
@@ -92,6 +103,26 @@ DebuggerScript.removeBreakpoint = function(execState, args)
delete DebuggerScript._breakpoints[key];
}
+DebuggerScript.pauseOnExceptionsState = function()
+{
+ return DebuggerScript._pauseOnExceptionsState;
+}
+
+DebuggerScript.setPauseOnExceptionsState = function(newState)
+{
+ DebuggerScript._pauseOnExceptionsState = newState;
+
+ if (DebuggerScript.PauseOnExceptionsState.PauseOnAllExceptions === newState)
+ Debug.setBreakOnException();
+ else
+ Debug.clearBreakOnException();
+
+ if (DebuggerScript.PauseOnExceptionsState.PauseOnUncaughtExceptions === newState)
+ Debug.setBreakOnUncaughtException();
+ else
+ Debug.clearBreakOnUncaughtException();
+}
+
DebuggerScript.currentCallFrame = function(execState, args)
{
var frameCount = execState.frameCount();
@@ -160,7 +191,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var sourceID = script && script.id();
// Get line number.
- var line = DebuggerScript._v8ToWwebkitLineNumber(frameMirror.sourceLine());
+ var line = DebuggerScript._v8ToWebkitLineNumber(frameMirror.sourceLine());
// Get this object.
var thisObject = frameMirror.details_.receiver();
@@ -201,7 +232,7 @@ DebuggerScript._webkitToV8LineNumber = function(line)
return line - 1;
};
-DebuggerScript._v8ToWwebkitLineNumber = function(line)
+DebuggerScript._v8ToWebkitLineNumber = function(line)
{
return line + 1;
};
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index a530fe5..59b88db 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -190,6 +190,23 @@ WebInspector.loaded = function()
InspectorFrontendHost.loaded();
};
+devtools.domContentLoaded = function()
+{
+ var queryParams = window.location.search;
+ if (queryParams) {
+ var params = queryParams.substring(1).split("&");
+ var paramsObject = {};
+ for (var i = 0; i < params.length; ++i) {
+ var pair = params[i].split("=");
+ paramsObject[pair[0]] = pair[1];
+ }
+ WebInspector.setAttachedWindow(paramsObject.docked);
+ if (paramsObject.toolbar_color && paramsObject.text_color)
+ WebInspector.setToolbarColors(paramsObject.toolbar_color, paramsObject.text_color);
+ }
+}
+document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
+
if (!window.v8ScriptDebugServerEnabled) {
@@ -415,78 +432,14 @@ WebInspector.setToolbarColors = function(backgroundColor, color)
document.head.appendChild(WebInspector._themeStyleElement);
}
WebInspector._themeStyleElement.textContent =
- "body #toolbar, body.inactive #toolbar {\
+ "#toolbar {\
background-image: none !important;\
background-color: " + backgroundColor + " !important;\
}\
\
- body .status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png) !important;\
- background-color: " + backgroundColor + " !important;\
- }\
- \
- body button.status-bar-item {\
- background-image: none !important;\
- }\
- \
- button.status-bar-item {\
- background-image: none;\
- border-right: 1px solid " + backgroundColor + ";\
- }\
- \
- .status-bar {\
- background-image: none;\
- color: " + color + ";\
- }\
- \
- body #drawer {\
- background-image: none !important;\
- }\
- \
- #drawer-status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png);\
- background-color: " + backgroundColor + ";\
- }\
- \
- \
- body.drawer-visible #main-status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png) !important;\
- }\
- \
- body .crumbs .crumb, body .crumbs .crumb.end {\
- -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\
- background-color: " + backgroundColor + " !important;\
- }\
- \
- body .crumbs .crumb:hover, body .crumbs .crumb.dimmed:hover {\
- -webkit-border-image: url(Images/segmentHoverChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body .crumbs .crumb.end {\
- -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body .crumbs .crumb.selected:hover, body .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {\
- -webkit-border-image: url(Images/segmentSelectedChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body select.status-bar-item {\
- -webkit-border-image: url(Images/statusbarMenuButtonChromium2.png) 0 17 0 2 !important;\
- background-color: " + backgroundColor + " !important;\
- text-shadow: none !important;\
- }\
- \
- .glyph {\
- background-color: " + color + ";\
- }\
- \
- button.status-bar-item .glyph.shadow {\
- display: none;\
- }\
- \
- .crumbs, .crumbs .crumb:hover, #drawer .scope-bar:not(.console-filter-top) li, .toolbar-label, select.status-bar-item {\
+ .toolbar-label {\
+ color: " + color + " !important;\
text-shadow: none;\
- color: " + color + ";\
}";
}
diff --git a/WebKit/chromium/src/js/Images/segmentChromium.png b/WebKit/chromium/src/js/Images/segmentChromium.png
index 607559b..f4248e1 100755
--- a/WebKit/chromium/src/js/Images/segmentChromium.png
+++ b/WebKit/chromium/src/js/Images/segmentChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentChromium2.png b/WebKit/chromium/src/js/Images/segmentChromium2.png
deleted file mode 100755
index e94f570..0000000
--- a/WebKit/chromium/src/js/Images/segmentChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentHoverChromium2.png b/WebKit/chromium/src/js/Images/segmentHoverChromium2.png
deleted file mode 100755
index 4d4a211..0000000
--- a/WebKit/chromium/src/js/Images/segmentHoverChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png b/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png
deleted file mode 100755
index f2b695b..0000000
--- a/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
index 9d326ac..7a760c1 100755
--- a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png
deleted file mode 100755
index 12d62b1..0000000
--- a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
index 7c7db0a..e3bc944 100755
--- a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png b/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
index 0c6635d..136d5a8 100755
--- a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
index bf26684..5ff61d9 100755
--- a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png
deleted file mode 100755
index 9527ac8..0000000
--- a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index becc076..5c3e8bd 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -128,8 +128,7 @@ if (!window.v8ScriptDebugServerEnabled) {
devtools.InspectorBackendImpl.prototype.setBreakpoint = function(sourceID, line, enabled, condition)
{
this.removeBreakpoint(sourceID, line);
- if (enabled)
- devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, condition);
+ devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, enabled, condition);
};
@@ -139,10 +138,10 @@ devtools.InspectorBackendImpl.prototype.removeBreakpoint = function(sourceID, li
};
-devtools.InspectorBackendImpl.prototype.editScriptLine = function(callID, sourceID, line, newContent)
+devtools.InspectorBackendImpl.prototype.editScriptSource = function(callID, sourceID, newContent)
{
- devtools.tools.getDebuggerAgent().editScriptLine(sourceID, line, newContent, function(newFullBody) {
- WebInspector.didEditScriptLine(callID, newFullBody);
+ devtools.tools.getDebuggerAgent().editScriptSource(sourceID, newContent, function(newFullBody) {
+ WebInspector.didEditScriptSource(callID, newFullBody);
});
};
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index bb33f72..6b4b3e5 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -15,12 +15,8 @@ body.attached #toolbar {
/* Chrome theme overrides */
-body.platform-windows #toolbar {
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(242, 247, 253)), to(rgb(223, 234, 248)));
-}
-
-body.platform-windows.inactive #toolbar {
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(248, 248, 248)), to(rgb(237, 237, 237)));
+body.platform-windows #toolbar, body.platform-windows.inactive #toolbar {
+ background-image: none;
}
body.detached.platform-mac-leopard #toolbar {
@@ -39,6 +35,12 @@ body.detached.platform-mac-snowleopard.inactive #toolbar {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(215, 215, 215)), to(rgb(207, 207, 207))) !important;
}
+body.platform-linux #scripts-files {
+ font-size: 11px;
+ font-weight: normal;
+ line-height: 12px;
+}
+
/* Heap Profiler Styles */
.heap-snapshot-status-bar-item .glyph {
@@ -151,77 +153,79 @@ body.detached.platform-mac-snowleopard.inactive #toolbar {
left: 25%;
}
-body.platform-windows .section > .header {
+.section > .header {
border: 1px solid rgb(92, 116, 157);
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(105, 133, 180)), to(rgb(92, 116, 157)));
}
-body.platform-windows .console-group-messages .section > .header {
+.console-group-messages .section > .header {
padding: 0 8px 0 0;
background-image: none;
border: none;
min-height: 0;
}
-body.platform-windows #resources-filter {
+#resources-filter {
background: -webkit-gradient(linear, left top, left bottom, from(rgb(233, 233, 233)), to(rgb(233, 233, 233)));
}
-body.platform-windows .crumbs .crumb {
+.crumbs .crumb {
-webkit-border-image: url(Images/segmentChromium.png) 0 12 0 2;
+ margin-right: -3px;
+ padding-left: 6px;
}
-body.platform-windows .crumbs .crumb.end {
+.crumbs .crumb.end {
-webkit-border-image: url(Images/segmentEndChromium.png) 0 2 0 2;
}
-body.platform-windows .crumbs .crumb.selected {
+.crumbs .crumb.selected {
-webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
color: white;
text-shadow: rgba(255, 255, 255, 0.5) 0 0px 0;
}
-body.platform-windows .crumbs .crumb.selected:hover {
+.crumbs .crumb.selected:hover {
-webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {
+.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {
-webkit-border-image: url(Images/segmentSelectedEndChromium.png) 0 2 0 2;
}
-body.platform-windows .crumbs .crumb:hover {
+.crumbs .crumb:hover {
-webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.dimmed:hover {
+.crumbs .crumb.dimmed:hover {
-webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.end:hover {
+.crumbs .crumb.end:hover {
-webkit-border-image: url(Images/segmentHoverEndChromium.png) 0 2 0 2;
}
-body.platform-windows body.drawer-visible #main-status-bar {
+body.drawer-visible #main-status-bar {
background-image: url(Images/statusbarResizerVertical.png), url(Images/statusbarBackgroundChromium.png);
}
-body.platform-windows .status-bar {
+.status-bar {
background-image: url(Images/statusbarBackgroundChromium.png);
}
-body.platform-windows button.status-bar-item {
+button.status-bar-item {
background-image: url(Images/statusbarButtonsChromium.png);
}
-body.platform-windows select.status-bar-item:active {
+select.status-bar-item:active {
-webkit-border-image: url(Images/statusbarMenuButtonSelectedChromium.png) 0 17 0 2;
}
-body.platform-windows #drawer {
+#drawer {
background-image: url(Images/statusbarBottomBackgroundChromium.png);
}
-body.platform-windows select.status-bar-item {
+select.status-bar-item {
-webkit-border-image: url(Images/statusbarMenuButtonChromium.png) 0 17 0 2;
}
diff --git a/WebKit/chromium/tests/DragImageTest.cpp b/WebKit/chromium/tests/DragImageTest.cpp
index 6c9718e..7b7d4ee 100644
--- a/WebKit/chromium/tests/DragImageTest.cpp
+++ b/WebKit/chromium/tests/DragImageTest.cpp
@@ -118,19 +118,29 @@ TEST(DragImageTest, NonNullHandling)
EXPECT_EQ(1, size.width());
EXPECT_EQ(1, size.height());
- // This is not implemented, so we don't do any output validation.
dragImage = dissolveDragImageToFraction(dragImage, 0.5);
ASSERT_TRUE(dragImage);
deleteDragImage(dragImage);
}
-TEST(DragImageTest, CreateDragImageReturningNull)
+TEST(DragImageTest, CreateDragImage)
{
- // Tests that the DrageImage implementation doesn't choke on null values
- // of nativeImageForCurrentFrame().
- TestImage testImage((IntSize()));
- EXPECT_FALSE(createDragImageFromImage(&testImage));
+ {
+ // Tests that the DrageImage implementation doesn't choke on null values
+ // of nativeImageForCurrentFrame().
+ TestImage testImage((IntSize()));
+ EXPECT_FALSE(createDragImageFromImage(&testImage));
+ }
+
+ {
+ // Tests that the drag image is a deep copy.
+ TestImage testImage(IntSize(1, 1));
+ DragImageRef dragImage = createDragImageFromImage(&testImage);
+ ASSERT_TRUE(dragImage);
+ SkAutoLockPixels lock1(*dragImage), lock2(*testImage.nativeImageForCurrentFrame());
+ EXPECT_NE(dragImage->getPixels(), testImage.nativeImageForCurrentFrame()->getPixels());
+ }
}
} // anonymous namespace
diff --git a/WebKit/efl/DefaultTheme/default.edc b/WebKit/efl/DefaultTheme/default.edc
new file mode 100644
index 0000000..7e0fe48
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/default.edc
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+color_classes {
+ color_class {
+ name: "webkit/selection/active";
+ color: 255 255 255 255; /* foreground */
+ color2: 32 0 200 255; /* background */
+ }
+ color_class {
+ name: "webkit/selection/inactive";
+ color: 255 255 255 255; /* foreground */
+ color2: 128 0 255 128; /* background */
+ }
+ color_class {
+ name: "webkit/focus_ring";
+ color: 26 182 240 255; /* foreground */
+ /* no background, consider transparent */
+ }
+ color_class {
+ name: "webkit/button/text";
+ color: 32 32 32 255;
+ /* no background, consider transparent */
+ }
+ color_class {
+ name: "webkit/combo/text";
+ color: 32 32 32 255;
+ /* no background, consider transparent */
+ }
+ color_class {
+ name: "webkit/entry/text";
+ color: 32 32 32 255;
+ /* no background, consider transparent */
+ }
+ color_class {
+ name: "webkit/search/text";
+ color: 32 32 32 255;
+ /* no background, consider transparent */
+ }
+}
+
+collections {
+ group { name: "webkit/base";
+ /* specific colors and all, used to listen for color_class changes */
+ }
+
+#include "widget/button/button.edc"
+#include "widget/entry/entry.edc"
+#include "widget/scrollbar/scrollbar.edc"
+#include "widget/radio/radio.edc"
+#include "widget/check/check.edc"
+#include "widget/entry/entry.edc"
+#include "widget/combo/combo.edc"
+#include "widget/file/file.edc"
+#include "widget/search/field/search_field.edc"
+#include "widget/search/cancel/search_cancel.edc"
+#include "widget/search/decoration/search_decoration.edc"
+}
diff --git a/WebKit/efl/DefaultTheme/widget/button/button.edc b/WebKit/efl/DefaultTheme/widget/button/button.edc
new file mode 100644
index 0000000..603daa0
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/button/button.edc
@@ -0,0 +1,176 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+ group {
+ name: "webkit/widget/button";
+
+ images {
+ image: "widget/button/img_button_normal.png" COMP;
+ image: "widget/button/img_button_press.png" COMP;
+ image: "widget/button/img_button_hover.png" COMP;
+ image: "widget/button/img_button_focus.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"button", "default", 0.0);
+ if (get_int(isFocused) == 1) {
+ set_state(PART:"button", "focused", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"button", "pressed", 0.0);
+ }
+ else if (get_int(isHovered) == 1) {
+ set_state(PART:"button", "hovered", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"button", "pressed", 0.0);
+
+ }
+ }
+ else
+ set_state(PART:"button", "disabled", 0.0);
+ }
+ }
+
+ parts {
+
+ part {
+ name: "button";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 25 10;
+ image {
+ normal: "widget/button/img_button_normal.png";
+ border: 6 6 6 6;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/button/img_button_press.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/button/img_button_hover.png";
+ border: 6 6 6 6;
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/button/img_button_focus.png";
+ border: 6 6 6 6;
+ }
+ }
+ }
+
+ part {
+ name: "text_confinement";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 10 5;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -11 -6;
+ }
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "checked";
+ signal: "checked";
+ script {
+ set_int(isChecked, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/DefaultTheme/widget/check/check.edc b/WebKit/efl/DefaultTheme/widget/check/check.edc
new file mode 100644
index 0000000..86490f6
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/check/check.edc
@@ -0,0 +1,181 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+ group {
+
+ name: "webkit/widget/checkbox";
+ min: 14 14;
+
+ images {
+ image: "widget/check/img_check_on.png" COMP;
+ image: "widget/check/img_check_off.png" COMP;
+ image: "widget/check/img_check_off_focus.png" COMP;
+ image: "widget/check/img_check_on_focus.png" COMP;
+ image: "widget/check/img_check_off_hover.png" COMP;
+ image: "widget/check/img_check_on_hover.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"check_button", "default", 0.0);
+ if (get_int(isChecked) == 1) {
+ set_state(PART:"check_button", "enabled_checked", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"check_button", "focus_checked", 0.0);
+ if (get_int(isHovered) == 1 && get_int(isFocused) == 0)
+ set_state(PART:"check_button", "hovered_checked", 0.0);
+ }
+ else {
+ if (get_int(isFocused) == 1)
+ set_state(PART:"check_button", "focused", 0.0);
+ if (get_int(isHovered) == 1 && get_int(isFocused) == 0)
+ set_state(PART:"check_button", "hovered", 0.0);
+ }
+ }
+ else {
+ set_state(PART:"check_button", "disabled", 0.0);
+ if (get_int(isChecked) == 1)
+ set_state(PART:"check_button", "disabled_checked", 0.0);
+ }
+ }
+ }
+
+ parts {
+ part {
+ name: "check_button";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 14 14;
+ max: 14 14;
+ image {
+ normal: "widget/check/img_check_off.png";
+ }
+ }
+ description {
+ state: "enabled_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_on.png";
+ }
+ }
+ description {
+ state: "disabled_checked" 0.0;
+ inherit: "enabled_checked" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_on_hover.png";
+ }
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_off_hover.png";
+ }
+ }
+ description {
+ state: "focus_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_on_focus.png";
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/check/img_check_off_focus.png";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "checked";
+ signal: "checked";
+ script {
+ set_int(isChecked, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/DefaultTheme/widget/combo/combo.edc b/WebKit/efl/DefaultTheme/widget/combo/combo.edc
new file mode 100644
index 0000000..9c436cc
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/combo/combo.edc
@@ -0,0 +1,306 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "webkit/widget/combo";
+
+ images {
+ image: "widget/combo/combo_normal.png" COMP;
+ image: "widget/combo/combo_normal_button.png" COMP;
+ image: "widget/combo/combo_hover.png" COMP;
+ image: "widget/combo/combo_hover_button.png" COMP;
+ image: "widget/combo/combo_focus.png" COMP;
+ image: "widget/combo/combo_focus_button.png" COMP;
+ image: "widget/combo/combo_press.png" COMP;
+ image: "widget/combo/combo_press_button.png" COMP;
+ image: "widget/combo/icon.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"combo", "default", 0.0);
+ set_state(PART:"combo_button", "default", 0.0);
+ set_state(PART:"combo_button_icon", "default", 0.0);
+ if (get_int(isFocused) == 1) {
+ set_state(PART:"combo", "focused", 0.0);
+ set_state(PART:"combo_button", "focused", 0.0);
+ if (get_int(isPressed) == 1) {
+ set_state(PART:"combo", "pressed", 0.0);
+ set_state(PART:"combo_button", "pressed", 0.0);
+ }
+ }
+ else if (get_int(isHovered) == 1) {
+ set_state(PART:"combo", "hovered", 0.0);
+ set_state(PART:"combo_button", "hovered", 0.0);
+ if (get_int(isPressed) == 1) {
+ set_state(PART:"combo", "pressed", 0.0);
+ set_state(PART:"combo_button", "pressed", 0.0);
+ }
+ }
+ }
+ else {
+ set_state(PART:"combo", "disabled", 0.0);
+ set_state(PART:"combo_button", "disabled", 0.0);
+ set_state(PART:"combo_button_icon", "disabled", 0.0);
+ }
+ }
+ }
+
+ parts {
+ part {
+ name: "clipper";
+ type: RECT;
+ description {
+ min: 35 27;
+ state: "default" 0.0;
+ }
+ }
+
+ part {
+ name: "combo_clipper";
+ type: RECT;
+ clip_to: "clipper";
+ description {
+ state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2 {
+ to: "clipper";
+ offset: -32 -1;
+ }
+ }
+ }
+
+ part {
+ name: "combo";
+ type: IMAGE;
+ clip_to: "combo_clipper";
+ description {
+ state: "default" 0.0;
+ min: 36 20;
+ image {
+ normal: "widget/combo/combo_normal.png";
+ border: 7 7 7 7;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/combo/combo_hover.png";
+ border: 7 7 7 7;
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/combo/combo_focus.png";
+ border: 7 7 7 7;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/combo/combo_press.png";
+ border: 7 7 7 7;
+ }
+ }
+ }
+
+ part {
+ name: "bt_combo_clipper";
+ type: RECT;
+ clip_to: "clipper";
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "combo_clipper";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to: "clipper";
+ relative: 1.0 1.0;
+ }
+ }
+ }
+
+ part {
+ name: "combo_button";
+ type: IMAGE;
+ clip_to: "bt_combo_clipper";
+ description {
+ state: "default" 0.0;
+ min: 18 20; // 3 + 5 + image width (10), 5 + 5 + image height (10)
+ rel1.to: "bt_combo_clipper";
+ image {
+ normal: "widget/combo/combo_normal_button.png";
+ border: 3 5 5 5;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ rel1.to: "bt_combo_clipper";
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "bt_combo_clipper";
+ image {
+ normal: "widget/combo/combo_hover_button.png";
+ border: 3 5 5 5;
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "bt_combo_clipper";
+ image {
+ normal: "widget/combo/combo_focus_button.png";
+ border: 6 7 7 7;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ rel1.to: "bt_combo_clipper";
+ image {
+ normal: "widget/combo/combo_press_button.png";
+ border: 6 8 8 8;
+ }
+ }
+ }
+
+
+ part {
+ name: "combo_button_icon";
+ type: IMAGE;
+ clip_to: "bt_combo_clipper";
+ description {
+ state: "default" 0.0;
+ min: 17 13;
+ max: 17 13;
+ color: 255 255 255 150;
+ rel1 {
+ to: "bt_combo_clipper";
+ relative: 0.5 0.5;
+ offset: 0 1;
+ }
+ rel2 {
+ to: "bt_combo_clipper";
+ relative: 0.5 0.5;
+ }
+ fixed: 1 1;
+ image {
+ normal: "widget/combo/icon.png";
+ border: 5 5 0 0;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 50;
+ image {
+ normal: "widget/combo/icon.png";
+ border: 5 5 0 0;
+ }
+ }
+ }
+
+ part {
+ name: "text_confinement";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1 {
+ to: "combo_clipper";
+ offset: 10 5;
+ }
+ rel2 {
+ to: "combo_clipper";
+ offset: -6 -6;
+ }
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/entry/entry.edc b/WebKit/efl/DefaultTheme/widget/entry/entry.edc
new file mode 100644
index 0000000..613ee59
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/entry/entry.edc
@@ -0,0 +1,167 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+ group {
+ name: "webkit/widget/entry";
+
+ images {
+ image: "widget/entry/img_normal.png" COMP;
+ image: "widget/entry/img_focused.png" COMP;
+ image: "widget/entry/img_hovered.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"entry", "default", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"entry", "pressed", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"entry", "focused", 0.0);
+ if (get_int(isHovered) == 1 && get_int(isFocused) == 0)
+ set_state(PART:"entry", "hovered", 0.0);
+ }
+ else
+ set_state(PART:"entry", "disabled", 0.0);
+ }
+
+ }
+
+ parts {
+ part {
+ name: "entry";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 14 14;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ image {
+ normal: "widget/entry/img_normal.png";
+ border: 7 7 7 7;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/entry/img_focused.png";
+ border: 7 7 7 7;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "focused" 0.0;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "focused" 0.0;
+ image {
+ normal: "widget/entry/img_hovered.png";
+ border: 7 7 7 7;
+ }
+ }
+ }
+
+ part {
+ name: "text_confinement";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1.offset: 4 6; // <- 6 because of the blink cursor
+ rel2.offset: -4 -5; // <- due to the image
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "checked";
+ signal: "checked";
+ script {
+ set_int(isChecked, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/DefaultTheme/widget/file/file.edc b/WebKit/efl/DefaultTheme/widget/file/file.edc
new file mode 100644
index 0000000..40afcc7
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/file/file.edc
@@ -0,0 +1,148 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "webkit/widget/file";
+
+ images {
+ image: "widget/file/file_normal.png" COMP;
+ image: "widget/file/file_hover.png" COMP;
+ image: "widget/file/file_focus.png" COMP;
+ image: "widget/file/file_press.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"file", "default", 0.0);
+ if (get_int(isFocused) == 1) {
+ set_state(PART:"file", "focused", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"file", "pressed", 0.0);
+ }
+ else if (get_int(isHovered) == 1) {
+ set_state(PART:"file", "hovered", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"file", "pressed", 0.0);
+
+ }
+ }
+ else
+ set_state(PART:"file", "disabled", 0.0);
+ }
+ }
+
+ parts {
+ part {
+ name: "file";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ image {
+ normal: "widget/file/file_normal.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/file/file_hover.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/file/file_focus.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/file/file_press.png";
+ border: 8 8 8 8;
+ }
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/DefaultTheme/widget/radio/radio.edc b/WebKit/efl/DefaultTheme/widget/radio/radio.edc
new file mode 100644
index 0000000..38a6da9
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/radio/radio.edc
@@ -0,0 +1,181 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+ group {
+ name: "webkit/widget/radio";
+ min: 16 16;
+
+ images {
+ image: "widget/radio/img_radio_on.png" COMP;
+ image: "widget/radio/img_radio_off.png" COMP;
+ image: "widget/radio/img_radio_on_focus.png" COMP;
+ image: "widget/radio/img_radio_off_focus.png" COMP;
+ image: "widget/radio/img_radio_on_hover.png" COMP;
+ image: "widget/radio/img_radio_off_hover.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"radio_button", "default", 0.0);
+ if (get_int(isChecked) == 1) {
+ set_state(PART:"radio_button", "enabled_checked", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"radio_button", "focus_checked", 0.0);
+ if (get_int(isHovered) == 1 && get_int(isFocused) == 0)
+ set_state(PART:"radio_button", "hovered_checked", 0.0);
+ }
+ else {
+ if (get_int(isFocused) == 1)
+ set_state(PART:"radio_button", "focused", 0.0);
+ if (get_int(isHovered) == 1 && get_int(isFocused) == 0)
+ set_state(PART:"radio_button", "hovered", 0.0);
+ }
+ }
+ else {
+ set_state(PART:"radio_button", "disabled", 0.0);
+ if (get_int(isChecked) == 1)
+ set_state(PART:"radio_button", "disabled_checked", 0.0);
+ }
+ }
+ }
+
+ parts {
+ part {
+ name: "radio_button";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 16 16;
+ max: 16 16;
+ image {
+ normal: "widget/radio/img_radio_off.png";
+ }
+ }
+ description {
+ state: "enabled_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_on.png";
+ }
+ }
+ description {
+ state: "disabled_checked" 0.0;
+ inherit: "enabled_checked" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_on_hover.png";
+ }
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_off_hover.png";
+ }
+ }
+ description {
+ state: "focus_checked" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_on_focus.png";
+ }
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/img_radio_off_focus.png";
+ }
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "checked";
+ signal: "checked";
+ script {
+ set_int(isChecked, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar.edc b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar.edc
new file mode 100644
index 0000000..4f59784
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/scrollbar/scrollbar.edc
@@ -0,0 +1,317 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "scrollbar.vertical";
+
+ min: 10 0; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow usign edje's rel1/rel2
+ */
+
+ images {
+ image: "widget/scrollbar/scrollbar_v.png" COMP;
+ image: "widget/scrollbar/scrollbar_knob_v.png" COMP;
+ }
+
+ script {
+ public hide_timer;
+
+ public hide_timer_cb(val) {
+ run_program(PROGRAM:"hide");
+ return 0;
+ }
+
+ public hide_timer_stop() {
+ new id = get_int(hide_timer);
+ if (id <= 0)
+ return;
+
+ cancel_timer(id);
+ set_int(hide_timer, 0);
+ }
+
+ public hide_timer_start() {
+ set_int(hide_timer, timer(1.0, "hide_timer_cb", 0));
+ }
+
+ public message(Msg_Type:type, id, ...) {
+ if ((id == 0) && (type == MSG_FLOAT_SET)) {
+ new Float:vy, Float:sy;
+
+ vy = getfarg(2);
+ sy = getfarg(3);
+
+ if (vy >= 0.0) {
+ set_drag_size(PART:"img.knob", 1.0, sy);
+ set_drag(PART:"img.knob", 0.0, vy);
+ run_program(PROGRAM:"show");
+ } else
+ run_program(PROGRAM:"hide");
+
+ hide_timer_stop();
+ hide_timer_start();
+ }
+ }
+
+ public update_drag_pos() {
+ new Float:x, Float:y;
+ get_drag(PART:"img.knob", x, y);
+ send_message(MSG_FLOAT, 1, y);
+ }
+ }
+
+ parts {
+ part {
+ name: "rect.base";
+ type: RECT;
+ description {
+ min: 10 0;
+ max: 10 999999;
+ state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "rect.clipper";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description {
+ state: "hidden" 0.0;
+ color: 255 255 255 128;
+ }
+ }
+
+ part {
+ name: "img.scrollbar";
+ type: IMAGE;
+ mouse_events: 0;
+ clip_to: "rect.clipper";
+ description {
+ state: "default" 0.0;
+ image {
+ normal: "widget/scrollbar/scrollbar_v.png";
+ border: 0 0 6 6;
+ }
+ }
+ }
+
+ part {
+ name: "img.knob";
+ type: IMAGE;
+ mouse_events: 1;
+ clip_to: "rect.clipper";
+ dragable {
+ x: 0 0 0;
+ y: 1 1 0;
+ confine: "rect.base";
+ }
+ description {
+ state: "default" 0.0;
+ min: 10 10;
+ max: 10 999999;
+ image {
+ normal: "widget/scrollbar/scrollbar_knob_v.png";
+ border: 0 0 6 6;
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "load";
+ signal: "load";
+ action: STATE_SET "hidden" 0.0;
+ target: "rect.clipper";
+ }
+ program {
+ name: "hide";
+ action: STATE_SET "hidden" 0.0;
+ transition: ACCELERATE 0.5;
+ target: "rect.clipper";
+ }
+
+ program {
+ name: "show";
+ action: STATE_SET "default" 0.0;
+ target: "rect.clipper";
+ }
+
+ program {
+ name: "dragged";
+ signal: "drag";
+ source: "img.knob";
+ script {
+ update_drag_pos();
+ }
+ }
+ }
+}
+
+group {
+ name: "scrollbar.horizontal";
+
+ min: 0 10; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow usign edje's rel1/rel2
+ */
+
+ images {
+ image: "widget/scrollbar/scrollbar_h.png" COMP;
+ image: "widget/scrollbar/scrollbar_knob_h.png" COMP;
+ }
+
+ script {
+ public hide_timer;
+
+ public hide_timer_cb(val) {
+ run_program(PROGRAM:"hide");
+ return 0;
+ }
+
+ public hide_timer_stop() {
+ new id = get_int(hide_timer);
+ if (id <= 0)
+ return;
+
+ cancel_timer(id);
+ set_int(hide_timer, 0);
+ }
+
+ public hide_timer_start() {
+ set_int(hide_timer, timer(1.0, "hide_timer_cb", 0));
+ }
+
+ public message(Msg_Type:type, id, ...) {
+ if ((id == 0) && (type == MSG_FLOAT_SET)) {
+ new Float:vx, Float:sx;
+
+ vx = getfarg(2);
+ sx = getfarg(3);
+
+ if (vx >= 0.0) {
+ set_drag_size(PART:"img.knob", sx, 1.0);
+ set_drag(PART:"img.knob", vx, 0.0);
+ run_program(PROGRAM:"show");
+ } else
+ run_program(PROGRAM:"hide");
+
+ hide_timer_stop();
+ hide_timer_start();
+ }
+ }
+
+ public update_drag_pos() {
+ new Float:x, Float:y;
+ get_drag(PART:"img.knob", x, y);
+ send_message(MSG_FLOAT, 1, x);
+ }
+ }
+
+ parts {
+ part {
+ name: "rect.base";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ min: 0 10;
+ max: 999999 10;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "rect.clipper";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description {
+ state: "hidden" 0.0;
+ color: 255 255 255 128;
+ }
+ }
+
+ part {
+ name: "img.scrollbar";
+ type: IMAGE;
+ mouse_events: 0;
+ clip_to: "rect.clipper";
+ description {
+ state: "default" 0.0;
+ image {
+ normal: "widget/scrollbar/scrollbar_h.png";
+ border: 6 6 0 0;
+ }
+ }
+ }
+
+ part {
+ name: "img.knob";
+ type: IMAGE;
+ mouse_events: 1;
+ clip_to: "rect.clipper";
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "rect.base";
+ }
+ description {
+ state: "default" 0.0;
+ min: 10 10;
+ image {
+ normal: "widget/scrollbar/scrollbar_knob_h.png";
+ border: 6 6 0 0;
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "load";
+ signal: "load";
+ action: STATE_SET "hidden" 0.0;
+ target: "rect.clipper";
+ }
+ program {
+ name: "hide";
+ action: STATE_SET "hidden" 0.0;
+ transition: ACCELERATE 0.5;
+ target: "rect.clipper";
+ }
+
+ program {
+ name: "show";
+ action: STATE_SET "default" 0.0;
+ target: "rect.clipper";
+ }
+
+ program {
+ name: "dragged";
+ signal: "drag";
+ source: "img.knob";
+ script {
+ update_drag_pos();
+ }
+ }
+ }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/search/cancel/search_cancel.edc b/WebKit/efl/DefaultTheme/widget/search/cancel/search_cancel.edc
new file mode 100644
index 0000000..d4a1a20
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/search/cancel/search_cancel.edc
@@ -0,0 +1,131 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "webkit/widget/search/cancel_button";
+ alias: "webkit/widget/search/results_button"; // TODO
+
+ images {
+ image: "widget/search/cancel/cancel_normal_button2.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"cancel_button", "default", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"cancel_button", "focused", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"cancel_button", "pressed", 0.0);
+ if (get_int(isHovered) == 1)
+ set_state(PART:"cancel_button", "hovered", 0.0);
+ }
+ else
+ set_state(PART:"cancel_button", "disabled", 0.0);
+ }
+ }
+
+ parts {
+ part {
+ name: "cancel_button";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 21 20;
+ rel1.offset: 0 -6;
+ rel2.offset: -1 0;
+ image {
+ normal: "widget/search/cancel/cancel_normal_button2.png";
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/search/decoration/search_decoration.edc b/WebKit/efl/DefaultTheme/widget/search/decoration/search_decoration.edc
new file mode 100644
index 0000000..4159138
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/search/decoration/search_decoration.edc
@@ -0,0 +1,132 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "webkit/widget/search/decoration";
+ alias: "webkit/widget/search/results_decoration"; //TODO
+
+ images {
+ image: "widget/search/decoration/decoration_normal_button.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"decoration", "default", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"decoration", "focused", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"decoration", "pressed", 0.0);
+ if (get_int(isHovered) == 1)
+ set_state(PART:"decoration", "hovered", 0.0);
+ }
+ else
+ set_state(PART:"decoration", "disabled", 0.0);
+ }
+ }
+
+ parts {
+ part {
+ name: "decoration";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 20 20;
+ rel1.offset: 0 -4;
+ rel2.offset: -1 0;
+ image {
+ normal: "widget/search/decoration/decoration_normal_button.png";
+ border: 0 0 8 8;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/search/field/search_field.edc b/WebKit/efl/DefaultTheme/widget/search/field/search_field.edc
new file mode 100644
index 0000000..e9be229
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/search/field/search_field.edc
@@ -0,0 +1,151 @@
+/*
+ Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+ Copyright (C) 2009,2010 ProFUSION embedded systems
+ Copyright (C) 2009,2010 Samsung Electronics
+
+ This file 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 file 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.
+*/
+
+group {
+ name: "webkit/widget/search/field";
+
+ images {
+ image: "widget/search/field/field_normal.png" COMP;
+ image: "widget/search/field/field_focused.png" COMP;
+ image: "widget/search/field/field_hovered.png" COMP;
+ }
+
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
+ public isHovered;
+
+ public show() {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"search_field", "default", 0.0);
+ if (get_int(isFocused) == 1)
+ set_state(PART:"search_field", "focused", 0.0);
+ if (get_int(isPressed) == 1)
+ set_state(PART:"search_field", "pressed", 0.0);
+ if (get_int(isFocused) == 0 && get_int(isHovered) == 1)
+ set_state(PART:"search_field", "hovered", 0.0);
+ }
+ else
+ set_state(PART:"search_field", "disabled", 0.0);
+ }
+ }
+
+ parts {
+ part {
+ name: "search_field";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 89 20;
+ image {
+ normal: "widget/search/field/field_normal.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 150;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/search/field/field_focused.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "hovered" 0.0;
+ inherit: "focused" 0.0;
+ image {
+ normal: "widget/search/field/field_hovered.png";
+ border: 8 8 8 8;
+ }
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "focused" 0.0;
+ }
+ }
+
+ part {
+ name: "text_confinement";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1.offset: 4 6; // <- 6 because of the blink cursor
+ rel2.offset: -4 -5; // <- due to the image
+ }
+ }
+
+ }
+
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
+ }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
+ }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
+ set_int(isHovered, 1);
+ show();
+ }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ set_int(isHovered, 0);
+ show();
+ }
+ }
+ }
+ }
diff --git a/WebKit/efl/EWebLauncher/main.c b/WebKit/efl/EWebLauncher/main.c
index 6a9e4fb..b0c64bf 100644
--- a/WebKit/efl/EWebLauncher/main.c
+++ b/WebKit/efl/EWebLauncher/main.c
@@ -31,7 +31,6 @@
#include <ctype.h>
#include <Ecore.h>
-#include <Ecore_Data.h>
#include <Ecore_Evas.h>
#include <Ecore_File.h>
#include <Ecore_Getopt.h>
@@ -42,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@@ -54,8 +54,6 @@
printf(format, ##args); \
} while (0)
-#define REL_THEME_PATH "../../../WebKit/efl/DefaultTheme/default.edj"
-
#define MIN_ZOOM_LEVEL 0
#define DEFAULT_ZOOM_LEVEL 5
#define MAX_ZOOM_LEVEL 13
@@ -136,11 +134,11 @@ typedef struct _ELauncher {
const char *userAgent;
} ELauncher;
-void browserDestroy(Ecore_Evas *ee);
-void closeWindow(Ecore_Evas *ee);
-int browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, unsigned char isFullscreen);
+static void browserDestroy(Ecore_Evas *ee);
+static void closeWindow(Ecore_Evas *ee);
+static int browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, unsigned char isFullscreen);
-void
+static void
print_history(Eina_List *list)
{
Eina_List *l;
@@ -173,7 +171,7 @@ print_history(Eina_List *list)
}
}
-void
+static void
zoom_level_set(Evas_Object *webview, int level)
{
float factor = ((float) zoomLevels[level]) / 100.0;
@@ -185,53 +183,6 @@ zoom_level_set(Evas_Object *webview, int level)
ewk_view_zoom_animated_set(webview, factor, 0.5, cx, cy);
}
-char*
-join_path(const char *base, const char *path)
-{
- char separator[] = "/";
-
- char tmp[PATH_MAX + 1];
- char result[PATH_MAX + 1];
- result[0] = tmp[0] = '\0';
-
- char *str = strdup(path);
-
- char *token = NULL;
- token = strtok(str, separator);
- int count = 0;
- do {
- if (!strcmp(token, ".."))
- count++;
- else
- strcat(tmp, token);
- token = strtok(NULL, separator);
- if (!token)
- break;
- if (tmp[0])
- strcat(tmp, separator);
- } while (EINA_TRUE);
-
- free(str);
- str = strdup(base);
-
- char *base_ptr;
- while (count--) {
- base_ptr = strrchr(str, separator[0]);
- if (!base_ptr) {
- free(str);
- return NULL; // couldn't resolve path
- }
- *base_ptr = '\0';
- }
-
- strcat(result, str);
- strcat(result, separator);
- strcat(result, tmp);
- free(str);
-
- return strdup(result);
-}
-
static void
on_ecore_evas_resize(Ecore_Evas *ee)
{
@@ -394,7 +345,7 @@ on_tooltip_text_set(void* user_data, Evas_Object* webview, void* event_info)
info("%s\n", text);
}
-void
+static void
on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info)
{
Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down*) event_info;
@@ -402,19 +353,19 @@ on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info)
evas_object_focus_set(webview, !evas_object_focus_get(webview));
}
-void
+static void
on_focus_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
info("the webview lost keyboard focus\n");
}
-void
+static void
on_focus_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
info("the webview gained keyboard focus\n");
}
-void
+static void
on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Coord w, h;
@@ -422,7 +373,7 @@ on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
ewk_view_fixed_layout_size_set(obj, w, h);
}
-void
+static void
on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
@@ -530,7 +481,7 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
}
-void
+static void
on_browser_del(void *data, Evas *evas, Evas_Object *browser, void *event)
{
ELauncher *app = (ELauncher*) data;
@@ -542,13 +493,13 @@ on_browser_del(void *data, Evas *evas, Evas_Object *browser, void *event)
evas_object_event_callback_del(app->browser, EVAS_CALLBACK_DEL, on_browser_del);
}
-void
+static void
on_closeWindow(Ecore_Evas *ee)
{
browserDestroy(ee);
}
-int
+static int
quit(Eina_Bool success, const char *msg)
{
edje_shutdown();
@@ -565,7 +516,7 @@ quit(Eina_Bool success, const char *msg)
return EXIT_SUCCESS;
}
-int
+static int
browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Rectangle geometry, const char *engine, unsigned char isFullscreen)
{
if ((geometry.w <= 0) && (geometry.h <= 0)) {
@@ -653,7 +604,7 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re
return 1;
}
-void
+static void
browserDestroy(Ecore_Evas *ee)
{
ecore_evas_free(ee);
@@ -661,7 +612,7 @@ browserDestroy(Ecore_Evas *ee)
ecore_main_loop_quit();
}
-void
+static void
closeWindow(Ecore_Evas *ee)
{
Eina_List *l;
@@ -690,6 +641,29 @@ main_signal_exit(void *data, int ev_type, void *ev)
return 1;
}
+static char *
+findThemePath(void)
+{
+ const char **itr, *locations[] = {
+ "./default.edj",
+ "./WebKit/efl/DefaultTheme/default.edj",
+ "../WebKit/efl/DefaultTheme/default.edj",
+ DATA_DIR"/themes/default.edj",
+ NULL
+ };
+
+ for (itr = locations; *itr; itr++) {
+ struct stat st;
+ if (!stat(*itr, &st)) {
+ char path[PATH_MAX];
+ if (realpath(*itr, path))
+ return strdup(path);
+ }
+ }
+
+ return NULL;
+}
+
int
main(int argc, char *argv[])
{
@@ -750,7 +724,7 @@ main(int argc, char *argv[])
if (sudoWorkaround)
strcat(getenv("HOME"), "blah");
- themePath = join_path(argv[0], REL_THEME_PATH);
+ themePath = findThemePath();
ewk_init();
tmp = getenv("TMPDIR");
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 1174f83..31b53c8 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -49,7 +49,7 @@
using namespace WebCore;
-static inline Evas_Object* kit(WebCore::Frame* frame)
+static inline Evas_Object* kit(Frame* frame)
{
if (!frame)
return 0;
@@ -60,7 +60,7 @@ static inline Evas_Object* kit(WebCore::Frame* frame)
namespace WebCore {
-ChromeClientEfl::ChromeClientEfl(Evas_Object *view)
+ChromeClientEfl::ChromeClientEfl(Evas_Object* view)
: m_view(view)
{
}
@@ -213,7 +213,7 @@ bool ChromeClientEfl::canRunBeforeUnloadConfirmPanel()
return true;
}
-bool ChromeClientEfl::runBeforeUnloadConfirmPanel(const String& message, WebCore::Frame* frame)
+bool ChromeClientEfl::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
{
return runJavaScriptConfirm(frame, message);
}
@@ -274,31 +274,11 @@ IntRect ChromeClientEfl::windowResizerRect() const
return IntRect();
}
-void ChromeClientEfl::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly)
-{
- Evas_Coord x, y, w, h;
-
- if (!contentChanged)
- return;
-
- x = windowRect.x();
- y = windowRect.y();
- w = windowRect.width();
- h = windowRect.height();
- ewk_view_repaint(m_view, x, y, w, h);
-}
-
void ChromeClientEfl::contentsSizeChanged(Frame* frame, const IntSize& size) const
{
ewk_frame_contents_size_changed(kit(frame), size.width(), size.height());
}
-bool ChromeClientEfl::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect& clipRect, bool canBlit, bool isMainFrame)
-{
- ewk_view_scroll(m_view, delta.width(), delta.height(), scrollViewRect.x(), scrollViewRect.y(), scrollViewRect.width(), scrollViewRect.height(), clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height(), isMainFrame);
- return canBlit;
-}
-
IntRect ChromeClientEfl::windowToScreen(const IntRect& rect) const
{
notImplemented();
@@ -327,7 +307,7 @@ void ChromeClientEfl::mouseDidMoveOverElement(const HitTestResult& hit, unsigned
if (isLink) {
KURL url = hit.absoluteLinkURL();
if (!url.isEmpty() && url != m_hoveredLinkURL) {
- const char *link[2];
+ const char* link[2];
TextDirection dir;
CString urlStr = url.prettyURL().utf8();
CString titleStr = hit.title(dir).utf8();
@@ -370,7 +350,7 @@ void ChromeClientEfl::exceededDatabaseQuota(Frame* frame, const String& database
ewk_view_exceeded_database_quota(m_view, kit(frame), databaseName.utf8().data());
}
-void ChromeClientEfl::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser)
+void ChromeClientEfl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
{
notImplemented();
}
@@ -392,4 +372,60 @@ void ChromeClientEfl::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
notImplemented();
}
+void ChromeClientEfl::cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::cancelGeolocationPermissionForFrame(Frame*, Geolocation*)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::invalidateContents(const IntRect& updateRect, bool immediate)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::invalidateWindow(const IntRect& updateRect, bool immediate)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+{
+ Evas_Coord x, y, w, h;
+
+ x = updateRect.x();
+ y = updateRect.y();
+ w = updateRect.width();
+ h = updateRect.height();
+ ewk_view_repaint(m_view, x, y, w, h);
+}
+
+void ChromeClientEfl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
+{
+ invalidateContentsAndWindow(updateRect, immediate);
+}
+
+void ChromeClientEfl::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
+{
+ ewk_view_scroll(m_view, scrollDelta.width(), scrollDelta.height(), rectToScroll.x(), rectToScroll.y(), rectToScroll.width(), rectToScroll.height(), clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height(), EINA_TRUE);
+}
+
+void ChromeClientEfl::cancelGeolocationPermissionRequestForFrame(Frame*)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::iconForFiles(const Vector<String, 0u>&, PassRefPtr<FileChooser>)
+{
+ notImplemented();
+}
+
+void ChromeClientEfl::chooseIconForFiles(const Vector<String>&, FileChooser*)
+{
+ notImplemented();
+}
+
}
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 0e17806..8df8483 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -31,7 +31,7 @@ namespace WebCore {
class ChromeClientEfl : public ChromeClient {
public:
- explicit ChromeClientEfl(Evas_Object *view);
+ explicit ChromeClientEfl(Evas_Object* view);
virtual ~ChromeClientEfl();
virtual void chromeDestroyed();
@@ -49,7 +49,7 @@ public:
virtual bool canTakeFocus(FocusDirection);
virtual void takeFocus(FocusDirection);
- virtual void focusedNodeChanged(WebCore::Node*);
+ virtual void focusedNodeChanged(Node*);
virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
virtual void show();
@@ -88,9 +88,7 @@ public:
virtual IntRect windowResizerRect() const;
- virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
virtual void contentsSizeChanged(Frame*, const IntSize&) const;
- virtual bool scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect, bool canBlit, bool isMainFrame);
virtual IntPoint screenToWindow(const IntPoint&) const;
virtual IntRect windowToScreen(const IntRect&) const;
virtual PlatformPageClient platformPageClient() const;
@@ -111,6 +109,7 @@ public:
#endif
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+ virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
virtual void formStateDidChange(const Node*);
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
@@ -120,8 +119,18 @@ public:
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
-
- Evas_Object *m_view;
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
+ virtual void cancelGeolocationPermissionForFrame(Frame*, Geolocation*);
+
+ virtual void invalidateContents(const IntRect&, bool);
+ virtual void invalidateWindow(const IntRect&, bool);
+ virtual void invalidateContentsAndWindow(const IntRect&, bool);
+ virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
+ virtual void scroll(const IntSize&, const IntRect&, const IntRect&);
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*);
+ virtual void iconForFiles(const Vector<String, 0u>&, PassRefPtr<FileChooser>);
+
+ Evas_Object* m_view;
KURL m_hoveredLinkURL;
};
}
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 8a7fd2d..2358fab 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -188,7 +188,7 @@ void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* dat
FrameLoader* fl = loader->frameLoader();
if (m_firstData) {
- fl->setEncoding(m_response.textEncodingName(), false);
+ fl->writer()->setEncoding(m_response.textEncodingName(), false);
m_firstData = false;
}
fl->addData(data, length);
@@ -666,7 +666,7 @@ void FrameLoaderClientEfl::finishedLoading(DocumentLoader* loader)
if (!m_pluginView) {
if (m_firstData) {
FrameLoader* fl = loader->frameLoader();
- fl->setEncoding(m_response.textEncodingName(), false);
+ fl->writer()->setEncoding(m_response.textEncodingName(), false);
m_firstData = false;
}
} else {
@@ -711,7 +711,7 @@ void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsign
{
if (m_firstData) {
FrameLoader* fl = loader->frameLoader();
- fl->setEncoding(m_response.textEncodingName(), false);
+ fl->writer()->setEncoding(m_response.textEncodingName(), false);
m_firstData = false;
}
@@ -829,7 +829,7 @@ void FrameLoaderClientEfl::setMainDocumentError(DocumentLoader* loader, const Re
{
if (!m_pluginView) {
if (m_firstData) {
- loader->frameLoader()->setEncoding(m_response.textEncodingName(), false);
+ loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false);
m_firstData = false;
}
} else {
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 47b5621..581ec85 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -121,6 +121,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void dispatchUnableToImplementPolicy(const ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, WTF::PassRefPtr<FormState>);
virtual void dispatchDidLoadMainResource(DocumentLoader*);
diff --git a/WebKit/efl/ewebkit.pc.in b/WebKit/efl/ewebkit.pc.in
index 24f66e8..f58e5bf 100644
--- a/WebKit/efl/ewebkit.pc.in
+++ b/WebKit/efl/ewebkit.pc.in
@@ -1,11 +1,11 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
Name: WebKit-EFL
Description: Web content engine for EFL applications
-Version: @VERSION@
+Version: @PROJECT_VERSION@
Requires: cairo evas ecore
-Libs: -L${libdir} -lewebkit
+Libs: -L${libdir} -lewebkit @EXTRA_EWEBKIT_LINK@
Cflags: -I${includedir}/EWebKit
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 73d1d29..5e93a05 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -988,7 +988,12 @@ Eina_Bool ewk_frame_zoom_set(Evas_Object* o, float zoom)
{
EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
- sd->frame->setZoomFactor(zoom, sd->zoom_text_only);
+ WebCore::ZoomMode zoomMode;
+ if (sd->zoom_text_only)
+ zoomMode = WebCore::ZoomTextOnly;
+ else
+ zoomMode = WebCore::ZoomPage;
+ sd->frame->setZoomFactor(zoom, zoomMode);
return EINA_TRUE;
}
@@ -1022,7 +1027,12 @@ Eina_Bool ewk_frame_zoom_text_only_set(Evas_Object* o, Eina_Bool setting)
return EINA_TRUE;
sd->zoom_text_only = setting;
- sd->frame->setZoomFactor(sd->frame->zoomFactor(), setting);
+ WebCore::ZoomMode zoomMode;
+ if (sd->zoom_text_only)
+ zoomMode = WebCore::ZoomTextOnly;
+ else
+ zoomMode = WebCore::ZoomPage;
+ sd->frame->setZoomFactor(sd->frame->zoomFactor(), zoomMode);
return EINA_TRUE;
}
@@ -1424,45 +1434,45 @@ static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, c
int keyCode = event.windowsVirtualKeyCode();
switch (keyCode) {
- case WebCore::VK_SPACE:
+ case VK_SPACE:
granularity = WebCore::ScrollByPage;
if (event.shiftKey())
direction = WebCore::ScrollUp;
else
direction = WebCore::ScrollDown;
break;
- case WebCore::VK_NEXT:
+ case VK_NEXT:
granularity = WebCore::ScrollByPage;
direction = WebCore::ScrollDown;
break;
- case WebCore::VK_PRIOR:
+ case VK_PRIOR:
granularity = WebCore::ScrollByPage;
direction = WebCore::ScrollUp;
break;
- case WebCore::VK_HOME:
+ case VK_HOME:
granularity = WebCore::ScrollByDocument;
direction = WebCore::ScrollUp;
break;
- case WebCore::VK_END:
+ case VK_END:
granularity = WebCore::ScrollByDocument;
direction = WebCore::ScrollDown;
break;
- case WebCore::VK_LEFT:
+ case VK_LEFT:
granularity = WebCore::ScrollByLine;
direction = WebCore::ScrollLeft;
break;
- case WebCore::VK_RIGHT:
+ case VK_RIGHT:
granularity = WebCore::ScrollByLine;
direction = WebCore::ScrollRight;
break;
- case WebCore::VK_UP:
+ case VK_UP:
direction = WebCore::ScrollUp;
if (event.ctrlKey())
granularity = WebCore::ScrollByDocument;
else
granularity = WebCore::ScrollByLine;
break;
- case WebCore::VK_DOWN:
+ case VK_DOWN:
direction = WebCore::ScrollDown;
if (event.ctrlKey())
granularity = WebCore::ScrollByDocument;
@@ -1823,22 +1833,5 @@ void ewk_frame_force_layout(Evas_Object* o)
WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues, const WebCore::String& mimeType, bool loadManually)
{
- DBG("o=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
- o, pluginSize.width(), pluginSize.height(), element,
- url.prettyURL().utf8().data(), mimeType.utf8().data());
-
- EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
-
- // TODO: emit signal and ask webkit users if something else should be done.
- // like creating another x window (see gtk, it allows users to create
- // GtkPluginWidget.
-
- WTF::RefPtr<WebCore::PluginView> pluginView = WebCore::PluginView::create
- (sd->frame, pluginSize, element, url, paramNames, paramValues,
- mimeType, loadManually);
-
- if (pluginView->status() == WebCore::PluginStatusLoadedSuccessfully)
- return pluginView;
-
return 0;
}
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp
index 2c69b36..ee9a656 100644
--- a/WebKit/efl/ewk/ewk_main.cpp
+++ b/WebKit/efl/ewk/ewk_main.cpp
@@ -24,9 +24,9 @@
#include "EWebKit.h"
#include "Logging.h"
#include "PageCache.h"
-#include "PageGroup.h"
#include "ewk_private.h"
#include "runtime/InitializeThreading.h"
+#include "wtf/Threading.h"
#include <Ecore.h>
#include <Ecore_Evas.h>
@@ -103,6 +103,7 @@ int ewk_init(void)
#endif
JSC::initializeThreading();
+ WTF::initializeMainThread();
WebCore::InitializeLoggingChannelsIfNecessary();
// Page cache capacity (in pages). Comment from Mac port:
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index eeb6535..d981459 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -494,7 +494,7 @@ static WTF::PassRefPtr<WebCore::Frame> _ewk_view_core_frame_new(Ewk_View_Smart_D
return WebCore::Frame::create(priv->page, owner, flc);
}
-static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_0;
+static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_NULL;
static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
{
@@ -1392,7 +1392,7 @@ char* ewk_view_selection_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
- WebCore::CString s = priv->page->focusController()->focusedOrMainFrame()->selectedText().utf8();
+ WTF::CString s = priv->page->focusController()->focusedOrMainFrame()->selectedText().utf8();
if (s.isNull())
return 0;
return strdup(s.data());
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 0affc25..24c7023 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,251 @@
+2010-05-06 Martin Robinson <mrobinson@webkit.org>
+
+ Reviewed by Xan Lopez.
+
+ Remove use of GOwnPtr to hold GObject types.
+ https://bugs.webkit.org/show_bug.cgi?id=38669
+
+ Change use of GOwnPtr to GRefPtr to types which are natively reference-counted.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchWillSendRequest): Change GOwnPtr to GRefPtr in some places.
+ (WebKit::FrameLoaderClient::dispatchDecidePolicyForMIMEType): Ditto.
+ * webkit/webkitnetworkrequest.cpp:
+ (webkit_network_request_new_with_core_request): Ditto.
+ * webkit/webkitnetworkresponse.cpp:
+ (webkit_network_response_new_with_core_response): Ditto.
+ * webkit/webkitprivate.cpp: Remove GOwnPtr reference counting template specialization.
+ * webkit/webkitprivate.h: Ditto.
+
+2010-05-06 Martin Robinson <mrobinson@webkit.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Enable DOM clipboard and drag-and-drop access
+ https://bugs.webkit.org/show_bug.cgi?id=30623
+
+ Convert dragging portion of drag-and-drop to use DataObjectGtk.
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::DragClient::willPerformDragDestinationAction): Remove the notImplemented. It is implemented, it's just a no-op.
+ (WebKit::DragClient::startDrag): Start the drag context via the ClipboardGtk and PasteboardHelper now.
+ * WebCoreSupport/DragClientGtk.h: Small style fix.
+ * webkit/webkitprivate.h: Add a HashMap of contexts and DataObjects here to to represent all current drag operations.
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_dispose): Clear all data objects during disposal.
+ (webkit_web_view_drag_end): When a drag is over, just remove it from the map.
+ (webkit_web_view_drag_data_get): To get the drag data, just grab it from the DataObject.
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+ (WebKit::FrameLoaderClient::dispatchWillSendSubmitEvent):
+
+2010-05-01 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Test webkit_dom_document_get_links.
+
+ * tests/testdomdocument.c:
+ (test_dom_document_get_links):
+ (main):
+
+2010-04-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Test webkit_dom_document_get_element_by_id;
+
+ * tests/testdomdocument.c:
+ (test_dom_document_get_element_by_id):
+ (main):
+
+2010-04-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Test webkit_dom_document_get_elements_by_class_name.
+
+ * tests/testdomdocument.c:
+ (test_dom_document_get_elements_by_class_name):
+ (main):
+
+2010-04-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Test webkit_dom_document_get_elements_by_tag_name.
+
+ * tests/testdomdocument.c:
+ (test_dom_document_get_elements_by_tag_name):
+ (main):
+
+2010-04-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Move WebKitDOMDocument unit tests to their own file.
+
+ * tests/testdomdocument.c: Added.
+ (finish_loading):
+ (dom_document_fixture_setup):
+ (dom_document_fixture_teardown):
+ (test_dom_document_title):
+ (main):
+ * tests/testwebview.c:
+
+2010-04-29 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Include <webkit/webkitdom.h> in the main webkit.h header.
+
+ * webkit/webkit.h:
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init): Add call to initializeMainThread.
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidChangeIcons):
+ * WebCoreSupport/FrameLoaderClientGtk.h:
+
+2010-04-22 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] GObject DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=33590
+
+ Add webkit_web_view_get_document to retrieve the WebKitDOMDocument
+ from a WebKitWebView, and a very simple test for it.
+
+ * tests/testwebview.c:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_document):
+ * webkit/webkitwebview.h:
+
+2010-04-22 Diego Escalante Urrelo <descalante@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Evaluate and create tests for all the AtkRole's implemented by
+ WebKitGtk
+ https://bugs.webkit.org/show_bug.cgi?id=34449
+
+ Expand testatkroles to test ATK_ROLE_COMBO_BOX.
+
+ * tests/testatkroles.c:
+ (test_webkit_atk_get_role_combobox):
+ (main):
+
+2010-04-22 Diego Escalante Urrelo <descalante@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] Evaluate and create tests for all the AtkRole's implemented by
+ WebKitGtk
+ https://bugs.webkit.org/show_bug.cgi?id=34449
+
+ Expand testatkroles to test ATK_ROLE_SEPARATOR.
+
+ * tests/testatkroles.c:
+ (test_webkit_atk_get_role_separator):
+ (main):
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
2010-04-21 Jakub Wieczorek <jwieczorek@webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index f4b0df1..900fb61 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -1,4 +1,6 @@
/*
+ * Copyright (C) Igalia S.L.
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -17,11 +19,16 @@
#include "config.h"
#include "DragClientGtk.h"
+#include "ClipboardGtk.h"
+#include "DataObjectGtk.h"
#include "Document.h"
#include "Element.h"
#include "Frame.h"
+#include "GRefPtrGtk.h"
#include "NotImplemented.h"
+#include "PasteboardHelper.h"
#include "RenderObject.h"
+#include "webkitprivate.h"
#include "webkitwebview.h"
#include <gtk/gtk.h>
@@ -41,7 +48,6 @@ DragClient::DragClient(WebKitWebView* webView)
void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*)
{
- notImplemented();
}
void DragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint& startPos, Clipboard*)
@@ -61,50 +67,29 @@ DragSourceAction DragClient::dragSourceActionMaskForPoint(const IntPoint&)
return DragSourceActionAny;
}
-void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame* frame, bool linkDrag)
+void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard* clipboard, Frame* frame, bool linkDrag)
{
- Element* targetElement = frame->document()->elementFromPoint(m_startPos.x(), m_startPos.y());
- bool imageDrag = false;
-
- if (targetElement)
- imageDrag = targetElement->renderer()->isImage();
-
- GdkAtom textHtml = gdk_atom_intern_static_string("text/html");
- GdkAtom netscapeUrl = gdk_atom_intern_static_string("_NETSCAPE_URL");
-
- GtkTargetList* targetList = gtk_target_list_new(NULL, 0);
- gtk_target_list_add(targetList, textHtml, 0, WEBKIT_WEB_VIEW_TARGET_INFO_HTML);
- gtk_target_list_add_text_targets(targetList, WEBKIT_WEB_VIEW_TARGET_INFO_TEXT);
-
- if (linkDrag || imageDrag) {
- gtk_target_list_add(targetList, netscapeUrl, 0, WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL);
- gtk_target_list_add_uri_targets(targetList, WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST);
- }
-
- if (imageDrag)
- gtk_target_list_add_image_targets(targetList, WEBKIT_WEB_VIEW_TARGET_INFO_IMAGE, false);
+ ClipboardGtk* clipboardGtk = reinterpret_cast<ClipboardGtk*>(clipboard);
GdkDragAction dragAction = GDK_ACTION_COPY;
- if (linkDrag) {
- dragAction = GDK_ACTION_LINK;
- if (imageDrag)
- dragAction = (GdkDragAction)(dragAction | GDK_ACTION_COPY);
- }
+ if (linkDrag)
+ dragAction = (GdkDragAction) (dragAction | GDK_ACTION_LINK);
+ 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);
reinterpret_cast<GdkEventButton*>(event)->window = gtk_widget_get_window(GTK_WIDGET(m_webView));
reinterpret_cast<GdkEventButton*>(event)->time = GDK_CURRENT_TIME;
- GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView),
- targetList, dragAction, 1, event);
- g_object_ref(context);
+ GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragAction, 1, event);
+ 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);
-
- gtk_target_list_unref(targetList);
}
DragImageRef DragClient::createDragImageForLink(KURL&, const String&, Frame*)
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.h b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
index 97ea72a..6604940 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
@@ -51,9 +51,9 @@ namespace WebKit {
virtual void dragControllerDestroyed();
- private:
- WebKitWebView* m_webView;
- WebCore::IntPoint m_startPos;
+ private:
+ WebKitWebView* m_webView;
+ WebCore::IntPoint m_startPos;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 27ff3c8..fd2d7ed 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -200,19 +200,19 @@ static char* toString(unsigned long identifier)
void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
- GOwnPtr<WebKitNetworkResponse> networkResponse(0);
+ GRefPtr<WebKitNetworkResponse> networkResponse(0);
// We are adding one more resource to the load, or maybe we are
// just redirecting a load.
if (redirectResponse.isNull())
static_cast<WebKit::DocumentLoader*>(loader)->increaseLoadCount(identifier);
else
- networkResponse.set(webkit_network_response_new_with_core_response(redirectResponse));
+ networkResponse = adoptGRef(webkit_network_response_new_with_core_response(redirectResponse));
WebKitWebView* webView = getViewFromFrame(m_frame);
GOwnPtr<gchar> identifierString(toString(identifier));
WebKitWebResource* webResource = webkit_web_view_get_resource(webView, identifierString.get());
- GOwnPtr<WebKitNetworkRequest> networkRequest(webkit_network_request_new_with_core_request(request));
+ GRefPtr<WebKitNetworkRequest> networkRequest(adoptGRef(webkit_network_request_new_with_core_request(request)));
if (!redirectResponse.isNull()) {
// This is a redirect, so we need to update the WebResource's knowledge
@@ -312,7 +312,7 @@ void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction poli
if (isHandled)
return;
- GOwnPtr<WebKitNetworkResponse> networkResponse(webkit_web_frame_get_network_response(m_frame));
+ GRefPtr<WebKitNetworkResponse> networkResponse(adoptGRef(webkit_web_frame_get_network_response(m_frame)));
if (networkResponse) {
ResourceResponse response = core(networkResponse.get());
if (response.isAttachment()) {
@@ -753,6 +753,11 @@ void FrameLoaderClient::dispatchDidReceiveTitle(const String& title)
}
}
+void FrameLoaderClient::dispatchDidChangeIcons()
+{
+ notImplemented();
+}
+
void FrameLoaderClient::dispatchDidCommitLoad()
{
if (m_loadingErrorPage)
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
index 3819b9f..2eeeb35 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
@@ -82,6 +82,7 @@ namespace WebKit {
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
virtual void dispatchDidReceiveTitle(const WebCore::String&);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&);
virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
@@ -100,6 +101,7 @@ namespace WebKit {
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, WTF::PassRefPtr<WebCore::FormState>);
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
diff --git a/WebKit/gtk/tests/testatkroles.c b/WebKit/gtk/tests/testatkroles.c
index d3ade6e..5fd08b0 100644
--- a/WebKit/gtk/tests/testatkroles.c
+++ b/WebKit/gtk/tests/testatkroles.c
@@ -34,6 +34,8 @@
#define HTML_PARAGRAPH "<html><body><p>This is a test.</p></body></html>"
#define HTML_SECTION "<html><body><div>This is a test.</div></body></html>"
#define HTML_TABLE "<html><body><table border='1'><tr><td>This is</td><td>a test.</td></tr></table></body></html>"
+#define HTML_SEPARATOR "<html><body><hr/></body></html>"
+#define HTML_COMBOBOX "<html><body><select size='1'><option>one</option><option>two</option><option>three</option></select></body></html>"
/* Form roles */
#define HTML_FORM "<html><body><form>This is a test.</form></body></html>"
#define HTML_CHECK_BOX "<html><body><input type='checkbox' />This is a test.</body></html>"
@@ -175,6 +177,37 @@ static void test_webkit_atk_get_role_table(AtkRolesFixture* fixture, gconstpoint
get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_TABLE);
}
+static void test_webkit_atk_get_role_separator(AtkRolesFixture *fixture, gconstpointer data)
+{
+ get_child_and_test_role(fixture->documentFrame, 0, ATK_ROLE_SEPARATOR);
+}
+
+static void test_webkit_atk_get_role_combobox(AtkRolesFixture *fixture, gconstpointer data)
+{
+ AtkObject* comboboxMenu;
+
+ // This is an extraneous object of ATK_ROLE_PANEL which we should get rid of.
+ fixture->obj = atk_object_ref_accessible_child(fixture->documentFrame, 0);
+ g_assert(fixture->obj);
+
+ fixture->obj = atk_object_ref_accessible_child(fixture->obj, 0);
+ g_assert(fixture->obj);
+ fixture->role = atk_object_get_role(fixture->obj);
+ g_assert(fixture->role == ATK_ROLE_COMBO_BOX);
+
+ comboboxMenu = atk_object_ref_accessible_child(fixture->obj, 0);
+ g_assert(comboboxMenu);
+ fixture->role = atk_object_get_role(comboboxMenu);
+ g_assert(fixture->role == ATK_ROLE_MENU);
+
+ get_child_and_test_role(comboboxMenu, 0, ATK_ROLE_MENU_ITEM);
+ get_child_and_test_role(comboboxMenu, 1, ATK_ROLE_MENU_ITEM);
+ get_child_and_test_role(comboboxMenu, 2, ATK_ROLE_MENU_ITEM);
+
+ g_object_unref(fixture->obj);
+ g_object_unref(comboboxMenu);
+}
+
/* Form roles */
static void test_webkit_atk_get_role_form(AtkRolesFixture *fixture, gconstpointer data)
{
@@ -322,6 +355,18 @@ int main(int argc, char** argv)
test_webkit_atk_get_role_table,
atk_roles_fixture_teardown);
+ g_test_add("/webkit/atk/test_webkit_atk_get_role_separator",
+ AtkRolesFixture, HTML_SEPARATOR,
+ atk_roles_fixture_setup,
+ test_webkit_atk_get_role_separator,
+ atk_roles_fixture_teardown);
+
+ g_test_add("/webkit/atk/test_webkit_atk_get_role_combobox",
+ AtkRolesFixture, HTML_COMBOBOX,
+ atk_roles_fixture_setup,
+ test_webkit_atk_get_role_combobox,
+ atk_roles_fixture_teardown);
+
/* Form roles */
g_test_add("/webkit/atk/test_webkit_atk_get_role_form",
AtkRolesFixture, HTML_FORM,
diff --git a/WebKit/gtk/tests/testdomdocument.c b/WebKit/gtk/tests/testdomdocument.c
new file mode 100644
index 0000000..4c677ea
--- /dev/null
+++ b/WebKit/gtk/tests/testdomdocument.c
@@ -0,0 +1,232 @@
+/*
+ * 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_TITLE "<html><head><title>This is the title</title></head><body></body></html>"
+#define HTML_DOCUMENT_ELEMENTS "<html><body><ul><li>1</li><li>2</li><li>3</li></ul></body></html>"
+#define HTML_DOCUMENT_ELEMENTS_CLASS "<html><body><div class=\"test\"></div><div class=\"strange\"></div><div class=\"test\"></div></body></html>"
+#define HTML_DOCUMENT_ELEMENTS_ID "<html><body><div id=\"testok\"></div><div id=\"testbad\">first</div><div id=\"testbad\">second</div></body></html>"
+#define HTML_DOCUMENT_LINKS "<html><body><a href=\"about:blank\">blank</a><a href=\"http://www.google.com\">google</a><a href=\"http://www.webkit.org\">webkit</a></body></html>"
+
+typedef struct {
+ GtkWidget* webView;
+ GMainLoop* loop;
+} DomDocumentFixture;
+
+static gboolean finish_loading(DomDocumentFixture* fixture)
+{
+ if (g_main_loop_is_running(fixture->loop))
+ g_main_loop_quit(fixture->loop);
+
+ return FALSE;
+}
+
+static void dom_document_fixture_setup(DomDocumentFixture* 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_document_fixture_teardown(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_object_unref(fixture->webView);
+ g_main_loop_unref(fixture->loop);
+}
+
+static void test_dom_document_title(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_assert(fixture);
+ WebKitWebView* view = (WebKitWebView*)fixture->webView;
+ g_assert(view);
+ WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+ g_assert(document);
+ gchar* title = webkit_dom_document_get_title(document);
+ g_assert(title);
+ g_assert_cmpstr(title, ==, "This is the title");
+ g_free(title);
+ webkit_dom_document_set_title(document, (gchar*)"This is the second title");
+ title = webkit_dom_document_get_title(document);
+ g_assert(title);
+ g_assert_cmpstr(title, ==, "This is the second title");
+ g_free(title);
+}
+
+static void test_dom_document_get_elements_by_tag_name(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_assert(fixture);
+ WebKitWebView* view = (WebKitWebView*)fixture->webView;
+ g_assert(view);
+ WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+ g_assert(document);
+ WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_tag_name(document, (gchar*)"li");
+ g_assert(list);
+ gulong length = webkit_dom_node_list_get_length(list);
+ g_assert_cmpint(length, ==, 3);
+
+ guint i;
+
+ for (i = 0; i < length; i++) {
+ WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
+ g_assert(item);
+ WebKitDOMElement* element = (WebKitDOMElement*)item;
+ g_assert(element);
+ g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, "LI");
+ WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
+ char* n = g_strdup_printf("%d", i+1);
+ g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, n);
+ g_free(n);
+ }
+}
+
+static void test_dom_document_get_elements_by_class_name(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_assert(fixture);
+ WebKitWebView* view = (WebKitWebView*)fixture->webView;
+ g_assert(view);
+ WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+ g_assert(document);
+ WebKitDOMNodeList* list = webkit_dom_document_get_elements_by_class_name(document, (gchar*)"test");
+ g_assert(list);
+ gulong length = webkit_dom_node_list_get_length(list);
+ g_assert_cmpint(length, ==, 2);
+
+ guint i;
+
+ for (i = 0; i < length; i++) {
+ WebKitDOMNode* item = webkit_dom_node_list_item(list, i);
+ g_assert(item);
+ WebKitDOMElement* element = (WebKitDOMElement*)item;
+ g_assert(element);
+ g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, "DIV");
+ }
+}
+
+static void test_dom_document_get_element_by_id(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_assert(fixture);
+ WebKitWebView* view = (WebKitWebView*)fixture->webView;
+ g_assert(view);
+ WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+ g_assert(document);
+ WebKitDOMElement* element = webkit_dom_document_get_element_by_id(document, (gchar*)"testok");
+ g_assert(element);
+ element = webkit_dom_document_get_element_by_id(document, (gchar*)"this-id-does-not-exist");
+ g_assert(element == 0);
+ /* The DOM spec says the return value is undefined when there's
+ * more than one element with the same id; in our case the first
+ * one will be returned */
+ element = webkit_dom_document_get_element_by_id(document, (gchar*)"testbad");
+ g_assert(element);
+ WebKitDOMHTMLElement* htmlElement = (WebKitDOMHTMLElement*)element;
+ g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, (gchar*)"first");
+}
+
+static void test_dom_document_get_links(DomDocumentFixture* fixture, gconstpointer data)
+{
+ g_assert(fixture);
+ WebKitWebView* view = (WebKitWebView*)fixture->webView;
+ g_assert(view);
+ WebKitDOMDocument* document = webkit_web_view_get_dom_document(view);
+ g_assert(document);
+ WebKitDOMHTMLCollection *collection = webkit_dom_document_get_links(document);
+ g_assert(collection);
+ gulong length = webkit_dom_html_collection_get_length(collection);
+ g_assert_cmpint(length, ==, 3);
+
+ guint i;
+
+ for (i = 0; i < length; i++) {
+ static const char* names[] = { "blank", "google", "webkit" };
+ static const char* uris[] = { "about:blank", "http://www.google.com/", "http://www.webkit.org/" };
+ WebKitDOMNode *node = webkit_dom_html_collection_item(collection, i);
+ g_assert(node);
+ WebKitDOMElement* element = (WebKitDOMElement*)node;
+ g_assert_cmpstr(webkit_dom_element_get_tag_name(element), ==, "A");
+ WebKitDOMHTMLElement *htmlElement = (WebKitDOMHTMLElement*)element;
+ g_assert_cmpstr(webkit_dom_html_element_get_inner_text(htmlElement), ==, names[i]);
+ WebKitDOMHTMLAnchorElement *anchor = (WebKitDOMHTMLAnchorElement*)element;
+ g_assert_cmpstr(webkit_dom_html_anchor_element_get_href(anchor), ==, uris[i]);
+ }
+}
+
+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/domdocument/test_title",
+ DomDocumentFixture, HTML_DOCUMENT_TITLE,
+ dom_document_fixture_setup,
+ test_dom_document_title,
+ dom_document_fixture_teardown);
+
+ g_test_add("/webkit/domdocument/test_get_elements_by_tag_name",
+ DomDocumentFixture, HTML_DOCUMENT_ELEMENTS,
+ dom_document_fixture_setup,
+ test_dom_document_get_elements_by_tag_name,
+ dom_document_fixture_teardown);
+
+ g_test_add("/webkit/domdocument/test_get_elements_by_class_name",
+ DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_CLASS,
+ dom_document_fixture_setup,
+ test_dom_document_get_elements_by_class_name,
+ dom_document_fixture_teardown);
+
+ g_test_add("/webkit/domdocument/test_get_element_by_id",
+ DomDocumentFixture, HTML_DOCUMENT_ELEMENTS_ID,
+ dom_document_fixture_setup,
+ test_dom_document_get_element_by_id,
+ dom_document_fixture_teardown);
+
+ g_test_add("/webkit/domdocument/test_get_links",
+ DomDocumentFixture, HTML_DOCUMENT_LINKS,
+ dom_document_fixture_setup,
+ test_dom_document_get_links,
+ dom_document_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/webkit/webkit.h b/WebKit/gtk/webkit/webkit.h
index 17b197b..fc71c2c 100644
--- a/WebKit/gtk/webkit/webkit.h
+++ b/WebKit/gtk/webkit/webkit.h
@@ -23,6 +23,7 @@
#include <webkit/webkitversion.h>
#include <webkit/webkitdefines.h>
+#include <webkit/webkitdom.h>
#include <webkit/webkitdownload.h>
#include <webkit/webkitgeolocationpolicydecision.h>
#include <webkit/webkithittestresult.h>
diff --git a/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
index 78044aa..c72abbd 100644
--- a/WebKit/gtk/webkit/webkitnetworkrequest.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
@@ -21,7 +21,6 @@
#include "config.h"
#include "webkitnetworkrequest.h"
-#include "GOwnPtr.h"
#include "ResourceRequest.h"
#include "webkitprivate.h"
#include <wtf/text/CString.h>
@@ -165,7 +164,7 @@ static void webkit_network_request_init(WebKitNetworkRequest* request)
// for internal use only
WebKitNetworkRequest* webkit_network_request_new_with_core_request(const WebCore::ResourceRequest& resourceRequest)
{
- GOwnPtr<SoupMessage> soupMessage(resourceRequest.toSoupMessage());
+ GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceRequest.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
index 33bcd28..6745b94 100644
--- a/WebKit/gtk/webkit/webkitnetworkresponse.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
@@ -22,7 +22,7 @@
#include "config.h"
#include "webkitnetworkresponse.h"
-#include "GOwnPtr.h"
+#include "GRefPtr.h"
#include "ResourceResponse.h"
#include "webkitprivate.h"
@@ -161,7 +161,7 @@ static void webkit_network_response_init(WebKitNetworkResponse* response)
// for internal use only
WebKitNetworkResponse* webkit_network_response_new_with_core_response(const WebCore::ResourceResponse& resourceResponse)
{
- GOwnPtr<SoupMessage> soupMessage(resourceResponse.toSoupMessage());
+ GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceResponse.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 971922f..d274708 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -19,9 +19,8 @@
*/
#include "config.h"
-
-#include "webkitsoupauthdialog.h"
#include "webkitprivate.h"
+
#include "ApplicationCacheStorage.h"
#include "Chrome.h"
#include "ChromeClientGtk.h"
@@ -31,7 +30,6 @@
#include "GtkVersioning.h"
#include "HitTestResult.h"
#include "IconDatabase.h"
-#include <libintl.h>
#include "Logging.h"
#include "PageCache.h"
#include "PageGroup.h"
@@ -41,11 +39,14 @@
#include "ResourceHandleClient.h"
#include "ResourceHandleInternal.h"
#include "ResourceResponse.h"
-#include <runtime/InitializeThreading.h>
#include "SecurityOrigin.h"
-#include <stdlib.h>
#include "TextEncodingRegistry.h"
#include "webkitnetworkresponse.h"
+#include "webkitsoupauthdialog.h"
+#include <libintl.h>
+#include <runtime/InitializeThreading.h>
+#include <stdlib.h>
+#include <wtf/Threading.h>
#if ENABLE(DATABASE)
#include "DatabaseTracker.h"
@@ -177,34 +178,6 @@ PasteboardHelperGtk* pasteboardHelperInstance()
} /** end namespace WebKit */
-namespace WTF {
-
-template <> void freeOwnedGPtr<SoupMessage>(SoupMessage* soupMessage)
-{
- if (soupMessage)
- g_object_unref(soupMessage);
-}
-
-template <> void freeOwnedGPtr<WebKitNetworkRequest>(WebKitNetworkRequest* request)
-{
- if (request)
- g_object_unref(request);
-}
-
-template <> void freeOwnedGPtr<WebKitNetworkResponse>(WebKitNetworkResponse* response)
-{
- if (response)
- g_object_unref(response);
-}
-
-template <> void freeOwnedGPtr<WebKitWebResource>(WebKitWebResource* resource)
-{
- if (resource)
- g_object_unref(resource);
-}
-
-}
-
static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMessage* message, gpointer userData)
{
gpointer messageData = g_object_get_data(G_OBJECT(message), "resourceHandle");
@@ -246,6 +219,8 @@ void webkit_init()
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
JSC::initializeThreading();
+ WTF::initializeMainThread();
+
WebCore::InitializeLoggingChannelsIfNecessary();
// We make sure the text codecs have been initialized, because
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 2642d50..057b0e5 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -2,6 +2,7 @@
* Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
* Copyright (C) 2008 Jan Michael C. Alonzo
* Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2010 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -46,6 +47,7 @@
#include "ArchiveResource.h"
#include "BackForwardList.h"
+#include "DataObjectGtk.h"
#include <enchant.h>
#include "GOwnPtr.h"
#include "Geolocation.h"
@@ -149,6 +151,8 @@ extern "C" {
char* mainResourceIdentifier;
GHashTable* subResources;
char* tooltipText;
+
+ HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
};
#define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
@@ -377,11 +381,4 @@ extern "C" {
webkit_web_frame_layout(WebKitWebFrame* frame);
}
-namespace WTF {
- template <> void freeOwnedGPtr<SoupMessage>(SoupMessage*);
- template <> void freeOwnedGPtr<WebKitNetworkRequest>(WebKitNetworkRequest*);
- template <> void freeOwnedGPtr<WebKitNetworkResponse>(WebKitNetworkResponse*);
- template <> void freeOwnedGPtr<WebKitWebResource>(WebKitWebResource*);
-}
-
#endif
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 5d2d658..d61f3ff 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -96,6 +96,7 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_spatial_navigation;
gchar* user_agent;
gboolean javascript_can_open_windows_automatically;
+ gboolean javascript_can_access_clipboard;
gboolean enable_offline_web_application_cache;
WebKitEditingBehavior editing_behavior;
gboolean enable_universal_access_from_file_uris;
@@ -145,6 +146,7 @@ enum {
PROP_ENABLE_SPATIAL_NAVIGATION,
PROP_USER_AGENT,
PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY,
+ PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD,
PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE,
PROP_EDITING_BEHAVIOR,
PROP_ENABLE_UNIVERSAL_ACCESS_FROM_FILE_URIS,
@@ -623,6 +625,22 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
_("Whether JavaScript can open windows automatically"),
FALSE,
flags));
+
+ /**
+ * WebKitWebSettings:javascript-can-access-clipboard
+ *
+ * Whether JavaScript can access Clipboard.
+ *
+ * Since: 1.3.0
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD,
+ g_param_spec_boolean("javascript-can-access-clipboard",
+ _("JavaScript can access Clipboard"),
+ _("Whether JavaScript can access Clipboard"),
+ FALSE,
+ flags));
+
/**
* WebKitWebSettings:enable-offline-web-application-cache
*
@@ -1023,6 +1041,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY:
priv->javascript_can_open_windows_automatically = g_value_get_boolean(value);
break;
+ case PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD:
+ priv->javascript_can_access_clipboard = g_value_get_boolean(value);
+ break;
case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
priv->enable_offline_web_application_cache = g_value_get_boolean(value);
break;
@@ -1161,6 +1182,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY:
g_value_set_boolean(value, priv->javascript_can_open_windows_automatically);
break;
+ case PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD:
+ g_value_set_boolean(value, priv->javascript_can_access_clipboard);
+ break;
case PROP_ENABLE_OFFLINE_WEB_APPLICATION_CACHE:
g_value_set_boolean(value, priv->enable_offline_web_application_cache);
break;
@@ -1255,6 +1279,7 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"enable-spatial-navigation", priv->enable_spatial_navigation,
"user-agent", webkit_web_settings_get_user_agent(web_settings),
"javascript-can-open-windows-automatically", priv->javascript_can_open_windows_automatically,
+ "javascript-can-access-clipboard", priv->javascript_can_access_clipboard,
"enable-offline-web-application-cache", priv->enable_offline_web_application_cache,
"editing-behavior", priv->editing_behavior,
"enable-universal-access-from-file-uris", priv->enable_universal_access_from_file_uris,
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 22f6d04..10a082c 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -81,6 +81,7 @@
#include "ResourceHandle.h"
#include "ScriptValue.h"
#include "Scrollbar.h"
+#include "webkit/WebKitDOMDocumentPrivate.h"
#include <wtf/text/CString.h>
#include <gdk/gdkkeysyms.h>
@@ -1123,6 +1124,8 @@ static void webkit_web_view_dispose(GObject* object)
priv->subResources = NULL;
}
+ priv->draggingDataObjects.clear();
+
G_OBJECT_CLASS(webkit_web_view_parent_class)->dispose(object);
}
@@ -1233,126 +1236,26 @@ static void webkit_web_view_screen_changed(GtkWidget* widget, GdkScreen* previou
static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
{
- g_object_unref(context);
-}
-
-struct DNDContentsRequest
-{
- gint info;
- GtkSelectionData* dnd_selection_data;
-
- gboolean is_url_label_request;
- gchar* url;
-};
-
-void clipboard_contents_received(GtkClipboard* clipboard, GtkSelectionData* selection_data, gpointer data)
-{
- DNDContentsRequest* contents_request = reinterpret_cast<DNDContentsRequest*>(data);
-
- if (contents_request->is_url_label_request) {
- // We have received contents of the label clipboard. Use them to form
- // required structures. When formed, enhance the dnd's selection data
- // with them and return.
-
- // If the label is empty, use the url itself.
- gchar* url_label = reinterpret_cast<gchar*>(gtk_selection_data_get_text(selection_data));
- if (!url_label)
- url_label = g_strdup(contents_request->url);
-
- gchar* data = 0;
- switch (contents_request->info) {
- case WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST:
- data = g_strdup_printf("%s\r\n%s\r\n", contents_request->url, url_label);
- break;
- case WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL:
- data = g_strdup_printf("%s\n%s", contents_request->url, url_label);
- break;
- }
-
- if (data) {
- gtk_selection_data_set(contents_request->dnd_selection_data,
- contents_request->dnd_selection_data->target, 8,
- reinterpret_cast<const guchar*>(data), strlen(data));
- g_free(data);
- }
-
- g_free(url_label);
- g_free(contents_request->url);
- g_free(contents_request);
+ WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(WEBKIT_WEB_VIEW(widget));
+ // This might happen if a drag is still in progress after a WebKitWebView
+ // is diposed and before it is finalized.
+ if (!priv->draggingDataObjects.contains(context))
return;
- }
- switch (contents_request->info) {
- case WEBKIT_WEB_VIEW_TARGET_INFO_HTML:
- case WEBKIT_WEB_VIEW_TARGET_INFO_TEXT:
- {
- gchar* data = reinterpret_cast<gchar*>(gtk_selection_data_get_text(selection_data));
- if (data) {
- gtk_selection_data_set(contents_request->dnd_selection_data,
- contents_request->dnd_selection_data->target, 8,
- reinterpret_cast<const guchar*>(data),
- strlen(data));
- g_free(data);
- }
- break;
- }
- case WEBKIT_WEB_VIEW_TARGET_INFO_IMAGE:
- {
- GdkPixbuf* pixbuf = gtk_selection_data_get_pixbuf(selection_data);
- if (pixbuf) {
- gtk_selection_data_set_pixbuf(contents_request->dnd_selection_data, pixbuf);
- g_object_unref(pixbuf);
- }
- break;
- }
- case WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST:
- case WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL:
- // URL's label is stored in another clipboard, so we store URL into
- // contents request, mark the latter as an url label request
- // and request for contents of the label clipboard.
- contents_request->is_url_label_request = TRUE;
- contents_request->url = reinterpret_cast<gchar*>(gtk_selection_data_get_text(selection_data));
-
- gtk_clipboard_request_contents(gtk_clipboard_get(gdk_atom_intern_static_string("WebKitClipboardUrlLabel")),
- selection_data->target, clipboard_contents_received, contents_request);
- break;
- }
+ priv->draggingDataObjects.remove(context);
}
-static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* context, GtkSelectionData* selection_data, guint info, guint time_)
-{
- GdkAtom selection_atom = GDK_NONE;
- GdkAtom target_atom = selection_data->target;
-
- switch (info) {
- case WEBKIT_WEB_VIEW_TARGET_INFO_HTML:
- selection_atom = gdk_atom_intern_static_string("WebKitClipboardHtml");
- // HTML markup data is set as text, therefor, we need a text-like target atom
- target_atom = gdk_atom_intern_static_string("UTF8_STRING");
- break;
- case WEBKIT_WEB_VIEW_TARGET_INFO_TEXT:
- selection_atom = gdk_atom_intern_static_string("WebKitClipboardText");
- break;
- case WEBKIT_WEB_VIEW_TARGET_INFO_IMAGE:
- selection_atom = gdk_atom_intern_static_string("WebKitClipboardImage");
- break;
- case WEBKIT_WEB_VIEW_TARGET_INFO_URI_LIST:
- case WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL:
- selection_atom = gdk_atom_intern_static_string("WebKitClipboardUrl");
- // We require URL and label, which are both stored in text format
- // and are needed to be retrieved as such.
- target_atom = gdk_atom_intern_static_string("UTF8_STRING");
- break;
- }
+static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* context, GtkSelectionData* selectionData, guint info, guint)
+{
+ WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(WEBKIT_WEB_VIEW(widget));
- DNDContentsRequest* contents_request = g_new(DNDContentsRequest, 1);
- contents_request->info = info;
- contents_request->is_url_label_request = FALSE;
- contents_request->dnd_selection_data = selection_data;
+ // This might happen if a drag is still in progress after a WebKitWebView
+ // is diposed and before it is finalized.
+ if (!priv->draggingDataObjects.contains(context))
+ return;
- gtk_clipboard_request_contents(gtk_clipboard_get(selection_atom), target_atom,
- clipboard_contents_received, contents_request);
+ pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects.get(context).get());
}
#if GTK_CHECK_VERSION(2, 12, 0)
@@ -2695,7 +2598,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
gboolean autoLoadImages, autoShrinkImages, printBackgrounds,
enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage,
- enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows, enableOfflineWebAppCache,
+ enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows,
+ javaScriptCanAccessClipboard, enableOfflineWebAppCache,
enableUniversalAccessFromFileURI, enableFileAccessFromFileURI,
enableDOMPaste, tabKeyCyclesThroughElements,
enableSiteSpecificQuirks, usePageCache, enableJavaApplet;
@@ -2725,6 +2629,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
"enable-xss-auditor", &enableXSSAuditor,
"enable-spatial-navigation", &enableSpatialNavigation,
"javascript-can-open-windows-automatically", &javascriptCanOpenWindows,
+ "javascript-can-access-clipboard", &javaScriptCanAccessClipboard,
"enable-offline-web-application-cache", &enableOfflineWebAppCache,
"editing-behavior", &editingBehavior,
"enable-universal-access-from-file-uris", &enableUniversalAccessFromFileURI,
@@ -2760,6 +2665,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setXSSAuditorEnabled(enableXSSAuditor);
settings->setSpatialNavigationEnabled(enableSpatialNavigation);
settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows);
+ settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
settings->setEditingBehavior(core(editingBehavior));
settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
@@ -2857,6 +2763,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setSpatialNavigationEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("javascript-can-open-windows-automatically"))
settings->setJavaScriptCanOpenWindowsAutomatically(g_value_get_boolean(&value));
+ else if (name == g_intern_string("javascript-can-access-clipboard"))
+ settings->setJavaScriptCanAccessClipboard(g_value_get_boolean(&value));
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"))
@@ -4431,3 +4339,27 @@ WebKitCacheModel webkit_get_cache_model()
webkit_init();
return cacheModel;
}
+
+/**
+ * webkit_web_view_get_dom_document:
+ * @webView: a #WebKitWebView
+ *
+ * Returns: the #WebKitDOMDocument currently loaded in the @webView
+ *
+ * Since: 1.3.0
+ **/
+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/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h
index e69de0a..865ae9d 100644
--- a/WebKit/gtk/webkit/webkitwebview.h
+++ b/WebKit/gtk/webkit/webkitwebview.h
@@ -27,6 +27,7 @@
#include <JavaScriptCore/JSBase.h>
#include <webkit/webkitdefines.h>
+#include <webkit/webkitdom.h>
#include <webkit/webkitwebbackforwardlist.h>
#include <webkit/webkitwebframe.h>
#include <webkit/webkitwebhistoryitem.h>
@@ -381,6 +382,9 @@ webkit_set_cache_model (WebKitCacheModel cache_mode
WEBKIT_API WebKitCacheModel
webkit_get_cache_model (void);
+WEBKIT_API WebKitDOMDocument *
+webkit_web_view_get_dom_document (WebKitWebView *webView);
+
G_END_DECLS
#endif
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index f09c456..c821f12 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,15 @@
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebCoreSupport/FrameLoaderClientHaiku.h:
+ (WebCore::FrameLoaderClientHaiku::dispatchWillSendSubmitEvent):
+
2010-04-20 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
index cf2fb06..073c0c3 100644
--- a/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
@@ -112,6 +112,7 @@ namespace WebCore {
virtual void dispatchShow();
virtual void cancelPolicyCheck();
+ virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
virtual void dispatchDidLoadMainResource(DocumentLoader*);
diff --git a/WebKit/mac/Carbon/CarbonWindowAdapter.mm b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
index ba1da71..c57bc37 100644
--- a/WebKit/mac/Carbon/CarbonWindowAdapter.mm
+++ b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
@@ -74,6 +74,7 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
#import "WebKitLogging.h"
#import "WebNSObjectExtras.h"
@@ -269,6 +270,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index e45527f..d7aa5bf 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,546 @@
+2010-05-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and Dan Bernstein..
+
+ REGRESSION (r51617): when plugins are disabled, plugins show up as garbage characters
+ https://bugs.webkit.org/show_bug.cgi?id=38698
+ <rdar://problem/7942075>
+
+ When the plug-in database is initialized, we will register all the MIME types it supports with the global
+ WebView dictionary. When plug-ins are disabled for a single web view, the MIME types still need to be
+ in the global mapping (because other web views might still have plug-ins enabled).
+
+ Prior to r51617 we would always look at the plug-in database to determine that the MIME type belongs to a
+ plug-in, but now we won't even touch the plug-in database when plug-ins are disabled.
+
+ In order to fix this, a new set of registered MIME types that are known to be plug-ins is added. When
+ +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:] is called and allowingPlugins is FALSE
+ we check if the MIME type is a known plug-in MIME type and return false in that case.
+
+ * Plugins/WebPluginDatabase.mm:
+ (-[WebPluginDatabase refresh]):
+ (-[WebPluginDatabase _removePlugin:]):
+ * WebView/WebView.mm:
+ (knownPluginMIMETypes):
+ (+[WebView _registerPluginMIMEType:]):
+ (+[WebView _unregisterPluginMIMEType:]):
+ (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
+ * WebView/WebViewInternal.h:
+
+2010-05-06 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7951285> REGRESSION (r58847): Composited iframe content obscures Safari's application chrome
+
+ Fixed this other regression from r58847. The regression was caused by overriding -visibleRect to
+ return the WebClipView’s full bounds. AppKit uses -visibleRect to determine the geometry
+ of the surface for the child WebFrameView. The fix is to restrict the special behavior of
+ -[WebClipView visibleRect] to when AppKit is consulting it for the purpose of invalidating
+ areas while scrolling.
+
+ * WebView/WebClipView.h:
+ * WebView/WebClipView.mm:
+ (-[WebClipView visibleRect]): If the WebClipView is not scrolling, always return
+ [super visibleRect].
+ (-[WebClipView _immediateScrollToPoint:]): Override this internal NSClipView method
+ to set a flag telling -visibleRect that the view is scrolling.
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack): Ensure that screen updates, disabled by AppKit
+ when it thinks an upcoming window flush will re-enable them, are enabled here in
+ case the -setNeedsDisplayInRect: override has prevented the window from needing to be
+ flushed.
+
+2010-05-06 Steve Block <steveblock@google.com>
+
+ Reviewed by Eric Seidel.
+
+ MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
+ https://bugs.webkit.org/show_bug.cgi?id=38544
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixed a crash when closing Top Sites after r58847.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView webFrame]): Null-check _private.
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Fixed test crashes after r58847.
+
+ * WebView/WebHTMLView.mm:
+ (setNeedsDisplayInRect): Null-check the frame.
+
+2010-05-05 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7932072> Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1)
+ https://bugs.webkit.org/show_bug.cgi?id=38427
+
+ * WebView/WebClipView.m: Renamed to WebClipView.mm.
+ * WebView/WebClipView.mm:
+ (-[WebClipView visibleRect]): Added this override, which for instances used for WebFrameViews in
+ composited layers, returns the clip view’s entire bounds. This prevents drawing from being clipped to
+ AppKit’s idea of what part of the view would be visible if it was drawn as part of the view hierarchy.
+ Since it is drawn into a compositing layer, that’s irrelevant, and we should not be clipping.
+ * WebView/WebHTMLView.mm:
+ (setCursor): Style tweak.
+ (setNeedsDisplayInRect): Added. Replaces the default implementation of -[NSView setNeedsDisplayInRect:],
+ so that if the receiver is a descendant of a WebFrameView that draws into a composited layer, the invalidation
+ is routed back through the WebCore FrameView, which propagates it to the layer.
+ (+[WebHTMLViewPrivate initialize]): Swizzle the setNeedsDisplayInRect: override in.
+ (-[WebHTMLView visibleRect]): Removed whitespace.
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack): If we bailed out on syncing, due to pending layout, do an eager layout
+ in preparation for the displaying of compositing layers.
+
+2010-05-05 John Sullivan <sullivan@apple.com>
+
+ <rdar://problem/7942606> Output appears in Console when exiting Safari with multiple windows opened
+
+ Reviewed by Mark Rowe.
+
+ * WebView/WebView.mm:
+ (+[WebView closeAllWebViews]):
+ Make copy of allWebViewsSet to avoid mutating it while iterating through it.
+
+2010-05-04 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Improve check for drawing into the window that was added in r58623
+ https://bugs.webkit.org/show_bug.cgi?id=38562
+
+ Rather than assuming that any non-bitmap context is the window's context,
+ compare the current graphics context with -[NSWindow graphicsContext] to
+ determine that we're drawing into the window.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+
+2010-05-04 Ada Chan <adachan@apple.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38555
+
+ Small code refactoring: move the logic to figure out the path to the
+ databases directory to another method.
+
+ * Storage/WebDatabaseManager.mm:
+ (databasesDirectoryPath):
+ (WebKitInitializeDatabasesIfNecessary):
+
+2010-05-04 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Mike Thole.
+
+ Fix for <rdar://problem/7818509> Crash occurs when exiting Safari
+
+ We can avoid this crash if we call [self _removeFromAllWebViewsSet]
+ even in the case when we are doing a fastDocumentTeardown. This is
+ a much safer approach.
+ * WebView/WebView.mm:
+ (-[WebView _close]):
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences javaScriptCanAccessClipboard]):
+ (-[WebPreferences setJavaScriptCanAccessClipboard:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient::dispatchWillSendSubmitEvent):
+
+2010-04-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/7477071> REGRESSION: Bad flicker when wheel-scrolling Google Maps, iPad gallery and other sites
+
+ Sites that frequently toggle content in and out of compositing layers (like http://www.tumblr.com/boothed)
+ can cause flickering because of unsychronized compositing layer and view-based updates. There were two
+ underlying issues:
+
+ 1. On SnowLeopard, AppKit can throttle window updates, thus breaking an assumption that
+ NSView drawing will happen on the runloop cycle after a repaint. This provided a window
+ for the layerSyncRunLoopObserver to fire and commit layer changes too early.
+
+ Fix this by having the layerSyncRunLoopObserver in WebView check to see if a display is pending,
+ and not commit layer changes in that case. We'll commit layer changes later when we
+ finally draw.
+
+ 2. The change in r49269 was wrong; it was attempting to fix an issue that was actually caused
+ by -drawRects: coming in for page snapshots. The correct approach is to avoid hitting the
+ synchronization and update disabling code in WebHTMLView for draws that are not to the screen.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebView.mm:
+ (layerSyncRunLoopObserverCallBack):
+ (-[WebView _scheduleCompositingLayerSync]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Part of the previous part (forgot to save).
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView stopTimers]):
+ (-[WebNetscapePluginView startTimers]):
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
+ (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+ (-[WebNetscapePluginView unscheduleTimer:]):
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+ (-[WebNetscapePluginView setVariable:forURL:value:length:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Use C99 integer types in more places.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (getNPRect):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix Tiger build.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::startStream):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Another 32-bit build fix.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix 32-bit build (again).
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ (-[WebNetscapeContainerCheckContextInfo checkRequestID]):
+ (-[WebNetscapeContainerCheckContextInfo callback]):
+ * Plugins/WebNetscapePluginPackage.h:
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Fix 32-bit build.
+
+ * Plugins/WebNetscapeContainerCheckContextInfo.h:
+ * Plugins/WebNetscapeContainerCheckContextInfo.mm:
+ (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
+ * Plugins/WebNetscapeContainerCheckPrivate.h:
+ * Plugins/WebNetscapePluginPackage.mm:
+ (functionPointerForTVector):
+ * Plugins/WebNetscapePluginView.mm:
+ (PluginTimer::PluginTimer):
+ (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
+ (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
+
+2010-04-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Next step towards fixing
+
+ https://bugs.webkit.org/show_bug.cgi?id=20784
+ move npapi.h to C99 integer types
+
+ Use the C99 types everywhere. The "old" types are still around but will be removed
+ in a subsequent commit.
+
+ * Plugins/WebBaseNetscapePluginStream.h:
+ * Plugins/WebBaseNetscapePluginStream.mm:
+ (WebNetscapePluginStream::deliverData):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+ (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
+ * Plugins/npapi.mm:
+ (NPN_MemAlloc):
+ (NPN_MemFlush):
+ (NPN_PostURLNotify):
+ (NPN_PostURL):
+ (NPN_Write):
+ (NPN_ScheduleTimer):
+ (NPN_UnscheduleTimer):
+ (NPN_GetValueForURL):
+ (NPN_SetValueForURL):
+ (NPN_GetAuthenticationInfo):
+ (WKN_CheckIfAllowedToLoadURL):
+ (WKN_CancelCheckIfAllowedToLoadURL):
+
+2010-04-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ First part of
+ https://bugs.webkit.org/show_bug.cgi?id=20784
+ move npapi.h to C99 integer types.
+
+ * MigrateHeaders.make:
+
+2010-04-28 Mike Thole <mthole@apple.com>
+
+ Reviewed by David Kilzer.
+
+ Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space
+ can be inspected before attempting to authenticate against it
+ https://bugs.webkit.org/show_bug.cgi?id=38271
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
+ Added. If the resource load delegate implements the callback, use its answer. If it does
+ not, then only send authentication challenges for pre-10.6 protection spaces, which matches
+ CFNetwork's default behavior.
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallResourceLoadDelegateReturningBoolean): Added case for passing three objects.
+ * WebView/WebResourceLoadDelegatePrivate.h:
+ Added private SPI definition: webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:
+ * WebView/WebView.mm:
+ (-[WebView _cacheResourceLoadDelegateImplementations]):
+
+2010-04-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7918719> ASSERT(isMainThread()) from Font::setShouldUseSmoothing()
+
+ Ensure that the WebView +initialize method initializes threading, so that things are correctly
+ initialized when the first call into the WebKit framework is via a WebView class method.
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]):
+
+2010-04-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION: Autoscroll does not work in Mail messages
+ https://bugs.webkit.org/show_bug.cgi?id=38267
+ rdar://problem/7559799
+
+ The machinery to make autoscrolling work on Mac OS X when a WebView is embedded in another
+ view had gotten broken in multiple ways. For some reason, a combination of bugs made it
+ partly work until around r48064. This brings it back.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::scrollRectIntoView): When converting coordinates, use the document view
+ rather than the WebView itself. This logic may not be correct for the case where
+ usesDocumentViews is NO, but that is currently an experimental mode and can be fixed later.
+
+2010-04-27 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler and Eric Seidel.
+
+ Add layoutTestController.setPrinting()
+ https://bugs.webkit.org/show_bug.cgi?id=37203
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame renderTreeAsExternalRepresentationForPrinting:]):
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ Calls initializeMainThreadToProcessMainThread since there is no way to ensure
+ that the initialize method will be called on the main thread.
+
+ * Carbon/CarbonWindowAdapter.mm:
+ (+[CarbonWindowAdapter initialize]): Add call to initializeMainThreadToProcessMainThread.
+ * History/WebBackForwardList.mm:
+ (+[WebBackForwardList initialize]): Ditto.
+ * History/WebHistoryItem.mm:
+ (+[WebHistoryItem initialize]): Ditto.
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initialize]): Ditto.
+ * Misc/WebIconDatabase.mm:
+ (+[WebIconDatabase initialize]): Ditto.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (+[WebHostedNetscapePluginView initialize]): Ditto.
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (+[WebBaseNetscapePluginView initialize]): Ditto.
+ * Plugins/WebBasePluginPackage.mm:
+ (+[WebBasePluginPackage initialize]): Ditto.
+ * Plugins/WebNetscapePluginView.mm:
+ (+[WebNetscapePluginView initialize]): Ditto.
+ * WebCoreSupport/WebEditorClient.mm:
+ (+[WebEditCommand initialize]): Ditto.
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (+[WebFramePolicyListener initialize]): Ditto.
+ * WebView/WebArchive.mm:
+ (+[WebArchivePrivate initialize]): Ditto.
+ * WebView/WebDataSource.mm:
+ (+[WebDataSourcePrivate initialize]): Ditto.
+ * WebView/WebHTMLView.mm:
+ (+[WebHTMLViewPrivate initialize]): Ditto.
+ (+[WebHTMLView initialize]): Ditto.
+ * WebView/WebResource.mm:
+ (+[WebResourcePrivate initialize]): Ditto.
+ * WebView/WebTextIterator.mm:
+ (+[WebTextIteratorPrivate initialize]): Ditto.
+ * WebView/WebView.mm:
+ * WebView/WebViewData.mm: Ditto.
+ (+[WebViewPrivate initialize]): Ditto.
+
+2010-04-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7903728> REGRESSION (r51617): WebView fails to load plug-in MIME types
+ https://bugs.webkit.org/show_bug.cgi?id=38085
+
+ WebView was calling -_webView in a few places where it should have just used itself. It never
+ makes sense for WebView to call -_webView on itself, and these calls look like they were copied
+ from similar code in WebHTMLView, WebFrameView and WebDataSource, where -_webView has a different,
+ useful meaning.
+
+ * WebView/WebView.mm:
+ (-[WebView drawSingleRect:]): Replaced [self _webView] with self.
+ (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Replaced [[self _webView] preferences]
+ with _private->preferences.
+ (-[WebView _canShowMIMEType:]): Ditto.
+
+2010-04-23 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/7894489> When printing Flash, send a drawRect event, rather than NPPrint
+
+ When printing Flash plug-ins in 32-bit, send a drawRect event with a CGContextRef, rather than calling
+ NPPrint with a GWorldPtr, since Flash prefers the CGContext path.
+
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView drawRect:]):
+
+2010-04-22 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/38029> +[WebTextIteratorPrivate initialize] is missing call to JSC::initializeThreading()
+
+ Reviewed by Timothy Hatcher.
+
+ Every other Objective-C class that calls
+ WebCoreObjCFinalizeOnMainThread(self) in +initialize also calls
+ JSC::initializeThreading(). The WebTextIteratorPrivate class
+ was the only one missing this call.
+
+ * WebView/WebTextIterator.mm:
+ (+[WebTextIteratorPrivate initialize]): Added call to
+ JSC::initializeThreading().
+
+2010-04-22 Alexey Proskuryakov <ap@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ <rdar://problem/7805969> REGRESSION: iTunes unable to play trailers
+
+ Undo the changes made for https://bugs.webkit.org/show_bug.cgi?id=35215 (<rdar://problem/7673157>)
+ for now. Clients rely on the old behavior, so a fix that changes it will need to account for
+ those.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createPlugin): Pass pluginURL
+ instead of baseURL again.
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidChangeIcons):
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences javaScriptCanAccessClipboard]):
+ (-[WebPreferences setJavaScriptCanAccessClipboard:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-04-21 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37964
+ Fix a typo in comments - Korean encoding name is windows-949, not windows-939
+
+ * WebView/WebPreferences.mm: (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]):
+
2010-04-21 Mark Rowe <mrowe@apple.com>
Tiger build fix.
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index 6aeb263..cc5943e 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 533;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/History/WebBackForwardList.mm b/WebKit/mac/History/WebBackForwardList.mm
index f206fda..6d9e998 100644
--- a/WebKit/mac/History/WebBackForwardList.mm
+++ b/WebKit/mac/History/WebBackForwardList.mm
@@ -49,6 +49,7 @@
#import <wtf/Assertions.h>
#import <wtf/RetainPtr.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -100,6 +101,7 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/History/WebHistoryItem.mm b/WebKit/mac/History/WebHistoryItem.mm
index 91bc610..48baa7c 100644
--- a/WebKit/mac/History/WebHistoryItem.mm
+++ b/WebKit/mac/History/WebHistoryItem.mm
@@ -53,6 +53,7 @@
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
// Private keys used in the WebHistoryItem's dictionary representation.
// see 3245793 for explanation of "lastVisitedDate"
@@ -95,6 +96,7 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 061169e..96c0a71 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -185,6 +185,7 @@ all : \
$(PUBLIC_HEADERS_DIR)/npapi.h \
$(PUBLIC_HEADERS_DIR)/npfunctions.h \
$(PUBLIC_HEADERS_DIR)/npruntime.h \
+ $(PUBLIC_HEADERS_DIR)/nptypes.h \
#
ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index d205083..a11c064 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -83,7 +83,7 @@
@end
@interface WebFrame (WebKitDebug)
-- (NSString *)renderTreeAsExternalRepresentation;
+- (NSString *)renderTreeAsExternalRepresentationForPrinting:(BOOL)forPrinting;
- (NSString *)counterValueForElement:(DOMElement*)element;
- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 1351fe5..c3fc23e 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -255,9 +255,9 @@ using namespace WebCore;
@implementation WebFrame (WebKitDebug)
-- (NSString *)renderTreeAsExternalRepresentation
+- (NSString *)renderTreeAsExternalRepresentationForPrinting:(BOOL)forPrinting
{
- return externalRepresentation(_private->coreFrame);
+ return externalRepresentation(_private->coreFrame, forPrinting ? RenderAsTextPrintingMode : RenderAsTextBehaviorNormal);
}
- (NSString *)counterValueForElement:(DOMElement*)element
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index 7779392..6b2eb3d 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -43,6 +43,7 @@
#import <WebKit/DOMCore.h>
#import <WebKit/DOMExtensions.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -64,6 +65,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/Misc/WebIconDatabase.mm b/WebKit/mac/Misc/WebIconDatabase.mm
index 0ded0d5..f53bffa 100644
--- a/WebKit/mac/Misc/WebIconDatabase.mm
+++ b/WebKit/mac/Misc/WebIconDatabase.mm
@@ -42,6 +42,8 @@
#import <WebCore/IntSize.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/ThreadCheck.h>
+#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -88,6 +90,12 @@ static WebIconDatabaseClient* defaultClient()
@implementation WebIconDatabase
++ (void)initialize
+{
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
+}
+
+ (WebIconDatabase *)sharedIconDatabase
{
static WebIconDatabase *database = nil;
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index cd3724e..9da1b53 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -46,6 +46,7 @@
#import <WebCore/runtime_root.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
using namespace WebCore;
using namespace WebKit;
@@ -60,6 +61,7 @@ extern "C" {
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
index a28793a..8fbe262 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
@@ -104,8 +104,8 @@ private:
RetainPtr<NSString> m_mimeType;
NPP m_plugin;
- uint16 m_transferMode;
- int32 m_offset;
+ uint16_t m_transferMode;
+ int32_t m_offset;
NPStream m_stream;
RetainPtr<NSString> m_path;
int m_fileDescriptor;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
index 232a6c4..7322d31 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
@@ -220,8 +220,8 @@ void WebNetscapePluginStream::startStream(NSURL *url, long long expectedContentL
m_stream.url = strdup([m_responseURL.get() _web_URLCString]);
m_stream.ndata = this;
- m_stream.end = expectedContentLength > 0 ? (uint32)expectedContentLength : 0;
- m_stream.lastmodified = (uint32)[lastModifiedDate timeIntervalSince1970];
+ m_stream.end = expectedContentLength > 0 ? (uint32_t)expectedContentLength : 0;
+ m_stream.lastmodified = (uint32_t)[lastModifiedDate timeIntervalSince1970];
m_stream.notifyData = m_notifyData;
if (headers) {
@@ -507,12 +507,12 @@ void WebNetscapePluginStream::deliverData()
RefPtr<WebNetscapePluginStream> protect(this);
- int32 totalBytes = [m_deliveryData.get() length];
- int32 totalBytesDelivered = 0;
+ int32_t totalBytes = [m_deliveryData.get() length];
+ int32_t totalBytesDelivered = 0;
while (totalBytesDelivered < totalBytes) {
PluginStopDeferrer deferrer(m_pluginView.get());
- int32 deliveryBytes = m_pluginFuncs->writeready(m_plugin, &m_stream);
+ int32_t deliveryBytes = m_pluginFuncs->writeready(m_plugin, &m_stream);
LOG(Plugins, "NPP_WriteReady responseURL=%@ bytes=%d", m_responseURL.get(), deliveryBytes);
if (m_isTerminated)
@@ -533,7 +533,7 @@ void WebNetscapePluginStream::deliverData()
cancelLoadAndDestroyStreamWithError(pluginCancelledConnectionError());
return;
}
- deliveryBytes = min<int32>(deliveryBytes, [subdata length]);
+ deliveryBytes = min<int32_t>(deliveryBytes, [subdata length]);
m_offset += deliveryBytes;
totalBytesDelivered += deliveryBytes;
LOG(Plugins, "NPP_Write responseURL=%@ bytes=%d total-delivered=%d/%d", m_responseURL.get(), deliveryBytes, m_offset, m_stream.end);
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index eec80f8..acd5152 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -41,7 +41,6 @@
#import "WebView.h"
#import "WebViewInternal.h"
-#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/AuthenticationMac.h>
#import <WebCore/BitmapImage.h>
#import <WebCore/Credential.h>
@@ -56,9 +55,11 @@
#import <WebCore/ProtectionSpace.h>
#import <WebCore/RenderView.h>
#import <WebCore/RenderWidget.h>
+#import <WebCore/WebCoreObjCExtras.h>
#import <WebKit/DOMPrivate.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
#import <wtf/text/CString.h>
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
@@ -115,6 +116,7 @@ String WebHaltablePlugin::pluginName() const
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/Plugins/WebBasePluginPackage.mm b/WebKit/mac/Plugins/WebBasePluginPackage.mm
index 1bddbcf..f186b81 100644
--- a/WebKit/mac/Plugins/WebBasePluginPackage.mm
+++ b/WebKit/mac/Plugins/WebBasePluginPackage.mm
@@ -28,13 +28,14 @@
#import <WebKit/WebBasePluginPackage.h>
+#import <WebCore/WebCoreObjCExtras.h>
#import <WebKit/WebKitNSStringExtras.h>
-#import <WebKit/WebNetscapePluginPackage.h>
#import <WebKit/WebNSObjectExtras.h>
+#import <WebKit/WebNetscapePluginPackage.h>
#import <WebKit/WebPluginPackage.h>
-#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
#import <wtf/Vector.h>
#import <WebKitSystemInterface.h>
@@ -63,6 +64,7 @@
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
index e9b14a7..dcd4dd4 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.h
@@ -31,14 +31,14 @@
#if ENABLE(NETSCAPE_PLUGIN_API)
@interface WebNetscapeContainerCheckContextInfo : NSObject {
- uint32 _checkRequestID;
- void (*_callback)(NPP npp, uint32, NPBool, void *);
+ uint32_t _checkRequestID;
+ void (*_callback)(NPP npp, uint32_t, NPBool, void *);
void *_context;
}
-- (id)initWithCheckRequestID:(uint32)checkRequestID callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
-- (uint32)checkRequestID;
-- (void (*)(NPP npp, uint32, NPBool, void*))callback;
+- (id)initWithCheckRequestID:(uint32_t)checkRequestID callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
+- (uint32_t)checkRequestID;
+- (void (*)(NPP npp, uint32_t, NPBool, void*))callback;
- (void*)context;
@end
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
index 34a0ec1..8991c95 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckContextInfo.mm
@@ -29,7 +29,7 @@
@implementation WebNetscapeContainerCheckContextInfo
-- (id)initWithCheckRequestID:(uint32)checkRequestID callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context
+- (id)initWithCheckRequestID:(uint32_t)checkRequestID callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context
{
self = [super init];
if (!self)
@@ -41,12 +41,12 @@
return self;
}
-- (uint32)checkRequestID
+- (uint32_t)checkRequestID
{
return _checkRequestID;
}
-- (void (*)(NPP npp, uint32, NPBool, void*))callback
+- (void (*)(NPP npp, uint32_t, NPBool, void*))callback
{
return _callback;
}
diff --git a/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
index dfde2f7..799680b 100644
--- a/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
+++ b/WebKit/mac/Plugins/WebNetscapeContainerCheckPrivate.h
@@ -40,17 +40,17 @@ extern "C" {
#define WKNVBrowserContainerCheckFuncsVersionHasGetLocation 2
-typedef uint32 (*WKN_CheckIfAllowedToLoadURLProcPtr)(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool allowed, void* context), void* context);
-typedef void (*WKN_CancelCheckIfAllowedToLoadURLProcPtr)(NPP npp, uint32);
+typedef uint32_t (*WKN_CheckIfAllowedToLoadURLProcPtr)(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool allowed, void* context), void* context);
+typedef void (*WKN_CancelCheckIfAllowedToLoadURLProcPtr)(NPP npp, uint32_t);
typedef char* (*WKN_ResolveURLProcPtr)(NPP npp, const char* url, const char* target);
-uint32 WKN_CheckIfAllowedToLoadURL(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool allowed, void* context), void* context);
-void WKN_CancelCheckIfAllowedToLoadURL(NPP npp, uint32);
+uint32_t WKN_CheckIfAllowedToLoadURL(NPP npp, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool allowed, void* context), void* context);
+void WKN_CancelCheckIfAllowedToLoadURL(NPP npp, uint32_t);
char* WKN_ResolveURL(NPP npp, const char* url, const char* target);
typedef struct _WKNBrowserContainerCheckFuncs {
- uint16 size;
- uint16 version;
+ uint16_t size;
+ uint16_t version;
WKN_CheckIfAllowedToLoadURLProcPtr checkIfAllowedToLoadURL;
WKN_CancelCheckIfAllowedToLoadURLProcPtr cancelCheckIfAllowedToLoadURL;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginPackage.h b/WebKit/mac/Plugins/WebNetscapePluginPackage.h
index 010956d..1d4c893 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginPackage.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginPackage.h
@@ -47,8 +47,8 @@ typedef enum {
NPPluginFuncs pluginFuncs;
NPNetscapeFuncs browserFuncs;
- uint16 pluginSize;
- uint16 pluginVersion;
+ uint16_t pluginSize;
+ uint16_t pluginVersion;
ResFileRefNum resourceRef;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
index 5c10d95..5651e7e 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
@@ -697,11 +697,11 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
FunctionPointer functionPointerForTVector(TransitionVector tvp)
{
- const uint32 temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};
- uint32 *newGlue = NULL;
+ const uint32_t temp[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420};
+ uint32_t *newGlue = NULL;
if (tvp != NULL) {
- newGlue = (uint32 *)malloc(sizeof(temp));
+ newGlue = (uint32_t *)malloc(sizeof(temp));
if (newGlue != NULL) {
unsigned i;
for (i = 0; i < 6; i++) newGlue[i] = temp[i];
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index 5bc4467..b2debfa 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -89,13 +89,13 @@ typedef union PluginPort {
BOOL inSetWindow;
BOOL shouldStopSoon;
- uint32 currentTimerID;
- HashMap<uint32, PluginTimer*>* timers;
+ uint32_t currentTimerID;
+ HashMap<uint32_t, PluginTimer*>* timers;
unsigned pluginFunctionCallDepth;
- int32 specifiedHeight;
- int32 specifiedWidth;
+ int32_t specifiedHeight;
+ int32_t specifiedWidth;
HashSet<RefPtr<WebNetscapePluginStream> > streams;
RetainPtr<NSMutableDictionary> _pendingFrameLoads;
@@ -104,7 +104,7 @@ typedef union PluginPort {
BOOL _isSilverlight;
NSMutableDictionary *_containerChecksInProgress;
- uint32 _currentContainerCheckRequestID;
+ uint32_t _currentContainerCheckRequestID;
}
+ (WebNetscapePluginView *)currentPluginView;
@@ -146,8 +146,8 @@ typedef union PluginPort {
- (void)handleMouseEntered:(NSEvent *)event;
- (void)handleMouseExited:(NSEvent *)event;
-- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
-- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID;
+- (uint32_t)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
+- (void)cancelCheckIfAllowedToLoadURL:(uint32_t)checkID;
@end
@@ -172,14 +172,14 @@ typedef union PluginPort {
- (void)forceRedraw;
- (NPError)getVariable:(NPNVariable)variable value:(void *)value;
- (NPError)setVariable:(NPPVariable)variable value:(void *)value;
-- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
-- (void)unscheduleTimer:(uint32)timerID;
+- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc;
+- (void)unscheduleTimer:(uint32_t)timerID;
- (NPError)popUpContextMenu:(NPMenu *)menu;
-- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32*)length;
-- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32)length;
-- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32)port scheme:(const char*)scheme realm:(const char*)realm
- username:(char**)username usernameLength:(uint32*)usernameLength
- password:(char**)password passwordLength:(uint32*)passwordLength;
+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length;
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length;
+- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol host:(const char*)host port:(int32_t)port scheme:(const char*)scheme realm:(const char*)realm
+ username:(char**)username usernameLength:(uint32_t*)usernameLength
+ password:(char**)password passwordLength:(uint32_t*)passwordLength;
- (char*)resolveURL:(const char*)url forTarget:(const char*)target;
@end
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 388b84b..ebc3f85 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -30,13 +30,13 @@
#import "WebNetscapePluginView.h"
+#import "WebBaseNetscapePluginStream.h"
#import "WebDataSourceInternal.h"
#import "WebDefaultUIDelegate.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
-#import "WebNetscapeContainerCheckPrivate.h"
#import "WebKitNSStringExtras.h"
#import "WebKitSystemInterface.h"
#import "WebNSDataExtras.h"
@@ -45,18 +45,16 @@
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
#import "WebNSViewExtras.h"
-#import "WebNetscapePluginPackage.h"
-#import "WebBaseNetscapePluginStream.h"
-#import "WebPluginContainerCheck.h"
#import "WebNetscapeContainerCheckContextInfo.h"
+#import "WebNetscapeContainerCheckPrivate.h"
#import "WebNetscapePluginEventHandler.h"
-#import "WebPreferences.h"
+#import "WebNetscapePluginPackage.h"
+#import "WebPluginContainerCheck.h"
#import "WebPluginRequest.h"
-#import "WebViewInternal.h"
+#import "WebPreferences.h"
#import "WebUIDelegatePrivate.h"
+#import "WebViewInternal.h"
#import <Carbon/Carbon.h>
-#import <runtime/JSLock.h>
-#import <WebCore/npruntime_impl.h>
#import <WebCore/CookieJar.h>
#import <WebCore/DocumentLoader.h>
#import <WebCore/Element.h>
@@ -71,12 +69,15 @@
#import <WebCore/SoftLinking.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/WebCoreURLResponse.h>
+#import <WebCore/npruntime_impl.h>
#import <WebKit/DOMPrivate.h>
#import <WebKit/WebUIDelegate.h>
+#import <objc/objc-runtime.h>
#import <runtime/InitializeThreading.h>
+#import <runtime/JSLock.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
#import <wtf/text/CString.h>
-#import <objc/objc-runtime.h>
#define LoginWindowDidSwitchFromUserNotification @"WebLoginWindowDidSwitchFromUserNotification"
#define LoginWindowDidSwitchToUserNotification @"WebLoginWindowDidSwitchToUserNotification"
@@ -112,9 +113,9 @@ static const double ThrottledTimerInterval = 0.25;
class PluginTimer : public TimerBase {
public:
- typedef void (*TimerFunc)(NPP npp, uint32 timerID);
+ typedef void (*TimerFunc)(NPP npp, uint32_t timerID);
- PluginTimer(NPP npp, uint32 timerID, uint32 interval, NPBool repeat, TimerFunc timerFunc)
+ PluginTimer(NPP npp, uint32_t timerID, uint32_t interval, NPBool repeat, TimerFunc timerFunc)
: m_npp(npp)
, m_timerID(timerID)
, m_interval(interval)
@@ -147,8 +148,8 @@ private:
}
NPP m_npp;
- uint32 m_timerID;
- uint32 m_interval;
+ uint32_t m_timerID;
+ uint32_t m_interval;
NPBool m_repeat;
TimerFunc m_timerFunc;
};
@@ -188,6 +189,7 @@ typedef struct {
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -252,20 +254,20 @@ static UInt32 getQDPixelFormatForBitmapContext(CGContextRef context)
static inline void getNPRect(const CGRect& cgr, NPRect& npr)
{
- npr.top = static_cast<uint16>(cgr.origin.y);
- npr.left = static_cast<uint16>(cgr.origin.x);
- npr.bottom = static_cast<uint16>(CGRectGetMaxY(cgr));
- npr.right = static_cast<uint16>(CGRectGetMaxX(cgr));
+ npr.top = static_cast<uint16_t>(cgr.origin.y);
+ npr.left = static_cast<uint16_t>(cgr.origin.x);
+ npr.bottom = static_cast<uint16_t>(CGRectGetMaxY(cgr));
+ npr.right = static_cast<uint16_t>(CGRectGetMaxX(cgr));
}
#endif
static inline void getNPRect(const NSRect& nr, NPRect& npr)
{
- npr.top = static_cast<uint16>(nr.origin.y);
- npr.left = static_cast<uint16>(nr.origin.x);
- npr.bottom = static_cast<uint16>(NSMaxY(nr));
- npr.right = static_cast<uint16>(NSMaxX(nr));
+ npr.top = static_cast<uint16_t>(nr.origin.y);
+ npr.left = static_cast<uint16_t>(nr.origin.x);
+ npr.bottom = static_cast<uint16_t>(NSMaxY(nr));
+ npr.right = static_cast<uint16_t>(NSMaxX(nr));
}
- (PortState)saveAndSetNewPortStateForUpdate:(BOOL)forUpdate
@@ -304,10 +306,10 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
#endif
window.type = NPWindowTypeWindow;
- window.x = (int32)boundsInWindow.origin.x;
- window.y = (int32)boundsInWindow.origin.y;
- window.width = static_cast<uint32>(NSWidth(boundsInWindow));
- window.height = static_cast<uint32>(NSHeight(boundsInWindow));
+ window.x = (int32_t)boundsInWindow.origin.x;
+ window.y = (int32_t)boundsInWindow.origin.y;
+ window.width = static_cast<uint32_t>(NSWidth(boundsInWindow));
+ window.height = static_cast<uint32_t>(NSHeight(boundsInWindow));
// "Clip-out" the plug-in when:
// 1) it's not really in a window or off-screen or has no height or width.
@@ -353,8 +355,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
CGrafPtr port = GetWindowPort(windowRef);
GetPortBounds(port, &portBounds);
nPort.qdPort.port = port;
- nPort.qdPort.portx = (int32)-boundsInWindow.origin.x;
- nPort.qdPort.porty = (int32)-boundsInWindow.origin.y;
+ nPort.qdPort.portx = (int32_t)-boundsInWindow.origin.x;
+ nPort.qdPort.porty = (int32_t)-boundsInWindow.origin.y;
window.window = &nPort;
PortState_QD *qdPortState = (PortState_QD*)malloc(sizeof(PortState_QD));
@@ -417,8 +419,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
origin.x = offscreenBounds.left - origin.x * (axisFlip.x - origin.x);
origin.y = offscreenBounds.bottom + origin.y * (axisFlip.y - origin.y);
- nPort.qdPort.portx = static_cast<int32>(-boundsInWindow.origin.x + origin.x);
- nPort.qdPort.porty = static_cast<int32>(-boundsInWindow.origin.y - origin.y);
+ nPort.qdPort.portx = static_cast<int32_t>(-boundsInWindow.origin.x + origin.x);
+ nPort.qdPort.porty = static_cast<int32_t>(-boundsInWindow.origin.y - origin.y);
window.x = 0;
window.y = 0;
window.window = &nPort;
@@ -697,8 +699,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
- HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
- for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
+ HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
+ for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
timer->stop();
}
@@ -715,8 +717,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!timers)
return;
- HashMap<uint32, PluginTimer*>::const_iterator end = timers->end();
- for (HashMap<uint32, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
+ HashMap<uint32_t, PluginTimer*>::const_iterator end = timers->end();
+ for (HashMap<uint32_t, PluginTimer*>::const_iterator it = timers->begin(); it != end; ++it) {
PluginTimer* timer = it->second;
ASSERT(!timer->isActive());
timer->start(_isCompletelyObscured);
@@ -1235,9 +1237,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
}
-- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString
- callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc
- context:(void*)context
+- (uint32_t)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString
+ callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool allowed, void* context))callbackFunc
+ context:(void*)context
{
if (!_containerChecksInProgress)
_containerChecksInProgress = [[NSMutableDictionary alloc] init];
@@ -1266,7 +1268,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
- (void)_containerCheckResult:(PolicyAction)policy contextInfo:(id)contextInfo
{
ASSERT([contextInfo isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
- void (*pluginCallback)(NPP npp, uint32, NPBool, void*) = [contextInfo callback];
+ void (*pluginCallback)(NPP npp, uint32_t, NPBool, void*) = [contextInfo callback];
if (!pluginCallback) {
ASSERT_NOT_REACHED();
@@ -1276,7 +1278,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
pluginCallback([self plugin], [contextInfo checkRequestID], (policy == PolicyUse), [contextInfo context]);
}
-- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID
+- (void)cancelCheckIfAllowedToLoadURL:(uint32_t)checkID
{
WebPluginContainerCheck *check = (WebPluginContainerCheck *)[_containerChecksInProgress objectForKey:[NSNumber numberWithInt:checkID]];
@@ -1402,7 +1404,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!_isStarted)
return;
- if ([NSGraphicsContext currentContextDrawingToScreen])
+ if ([NSGraphicsContext currentContextDrawingToScreen] || _isFlash)
[self sendDrawRectEvent:rect];
else {
NSBitmapImageRep *printedPluginBitmap = [self _printedPluginBitmap];
@@ -2131,15 +2133,15 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
}
}
-- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc
+- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc
{
if (!timerFunc)
return 0;
if (!timers)
- timers = new HashMap<uint32, PluginTimer*>;
+ timers = new HashMap<uint32_t, PluginTimer*>;
- uint32 timerID;
+ uint32_t timerID;
do {
timerID = ++currentTimerID;
@@ -2154,7 +2156,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return timerID;
}
-- (void)unscheduleTimer:(uint32)timerID
+- (void)unscheduleTimer:(uint32_t)timerID
{
if (!timers)
return;
@@ -2175,7 +2177,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_NO_ERROR;
}
-- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32*)length
+- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url value:(char**)value length:(uint32_t*)length
{
switch (variable) {
case NPNURLVCookie: {
@@ -2227,7 +2229,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_GENERIC_ERROR;
}
-- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32)length
+- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url value:(const char*)value length:(uint32_t)length
{
switch (variable) {
case NPNURLVCookie: {
@@ -2253,9 +2255,9 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
return NPERR_GENERIC_ERROR;
}
-- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr host:(const char*)hostStr port:(int32)port scheme:(const char*)schemeStr realm:(const char*)realmStr
- username:(char**)usernameStr usernameLength:(uint32*)usernameLength
- password:(char**)passwordStr passwordLength:(uint32*)passwordLength
+- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr host:(const char*)hostStr port:(int32_t)port scheme:(const char*)schemeStr realm:(const char*)realmStr
+ username:(char**)usernameStr usernameLength:(uint32_t*)usernameLength
+ password:(char**)passwordStr passwordLength:(uint32_t*)passwordLength
{
if (!protocolStr || !hostStr || !schemeStr || !realmStr || !usernameStr || !usernameLength || !passwordStr || !passwordLength)
return NPERR_GENERIC_ERROR;
diff --git a/WebKit/mac/Plugins/WebPluginDatabase.mm b/WebKit/mac/Plugins/WebPluginDatabase.mm
index 1856fe1..34f5e0f 100644
--- a/WebKit/mac/Plugins/WebPluginDatabase.mm
+++ b/WebKit/mac/Plugins/WebPluginDatabase.mm
@@ -35,13 +35,13 @@
#import "WebFrameViewInternal.h"
#import "WebHTMLRepresentation.h"
#import "WebHTMLView.h"
-#import "WebHTMLView.h"
#import "WebKitLogging.h"
#import "WebNSFileManagerExtras.h"
#import "WebNetscapePluginPackage.h"
#import "WebPluginController.h"
#import "WebPluginPackage.h"
#import "WebViewPrivate.h"
+#import "WebViewInternal.h"
#import <WebKitSystemInterface.h>
#import <wtf/Assertions.h>
@@ -296,7 +296,7 @@ static NSArray *additionalWebPlugInPaths;
continue;
if (self == sharedDatabase)
- [WebView registerViewClass:[WebHTMLView class] representationClass:[WebHTMLRepresentation class] forMIMEType:MIMEType];
+ [WebView _registerPluginMIMEType:MIMEType];
}
[MIMETypes release];
@@ -415,7 +415,7 @@ static NSArray *additionalWebPlugInPaths;
while ((MIMEType = [MIMETypeEnumerator nextObject])) {
if ([registeredMIMETypes containsObject:MIMEType]) {
if (self == sharedDatabase)
- [WebView _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
+ [WebView _unregisterPluginMIMEType:MIMEType];
[registeredMIMETypes removeObject:MIMEType];
}
}
diff --git a/WebKit/mac/Plugins/npapi.mm b/WebKit/mac/Plugins/npapi.mm
index 51c37ae..8b1cfd6 100644
--- a/WebKit/mac/Plugins/npapi.mm
+++ b/WebKit/mac/Plugins/npapi.mm
@@ -39,7 +39,7 @@ WebNetscapePluginView *pluginViewForInstance(NPP instance);
// general plug-in to browser functions
-void* NPN_MemAlloc(uint32 size)
+void* NPN_MemAlloc(uint32_t size)
{
return malloc(size);
}
@@ -49,7 +49,7 @@ void NPN_MemFree(void* ptr)
free(ptr);
}
-uint32 NPN_MemFlush(uint32 size)
+uint32_t NPN_MemFlush(uint32_t size)
{
LOG(Plugins, "NPN_MemFlush");
return size;
@@ -89,12 +89,12 @@ NPError NPN_GetURL(NPP instance, const char* URL, const char* target)
return [pluginViewForInstance(instance) getURL:URL target:target];
}
-NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData)
+NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData)
{
return [pluginViewForInstance(instance) postURLNotify:URL target:target len:len buf:buf file:file notifyData:notifyData];
}
-NPError NPN_PostURL(NPP instance, const char* URL, const char* target, uint32 len, const char* buf, NPBool file)
+NPError NPN_PostURL(NPP instance, const char* URL, const char* target, uint32_t len, const char* buf, NPBool file)
{
return [pluginViewForInstance(instance) postURL:URL target:target len:len buf:buf file:file];
}
@@ -104,7 +104,7 @@ NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStrea
return [pluginViewForInstance(instance) newStream:type target:target stream:stream];
}
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
{
return [pluginViewForInstance(instance) write:stream len:len buffer:buffer];
}
@@ -176,12 +176,12 @@ void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userDa
PluginMainThreadScheduler::scheduler().scheduleCall(instance, func, userData);
}
-uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID))
+uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID))
{
return [pluginViewForInstance(instance) scheduleTimerWithInterval:interval repeat:repeat timerFunc:timerFunc];
}
-void NPN_UnscheduleTimer(NPP instance, uint32 timerID)
+void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
{
[pluginViewForInstance(instance) unscheduleTimer:timerID];
}
@@ -191,17 +191,17 @@ NPError NPN_PopUpContextMenu(NPP instance, NPMenu *menu)
return [pluginViewForInstance(instance) popUpContextMenu:menu];
}
-NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32* len)
+NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len)
{
return [pluginViewForInstance(instance) getVariable:variable forURL:url value:value length:len];
}
-NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32 len)
+NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32_t len)
{
return [pluginViewForInstance(instance) setVariable:variable forURL:url value:value length:len];
}
-NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32 port, const char* scheme, const char *realm, char** username, uint32* ulen, char** password, uint32* plen)
+NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen)
{
return [pluginViewForInstance(instance) getAuthenticationInfoWithProtocol:protocol
host:host
@@ -217,12 +217,12 @@ NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordina
return [pluginViewForInstance(instance) convertFromX:sourceX andY:sourceY space:sourceSpace toX:destX andY:destY space:destSpace];
}
-uint32 WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool, void*), void* context)
+uint32_t WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool, void*), void* context)
{
return [pluginViewForInstance(instance) checkIfAllowedToLoadURL:url frame:frame callbackFunc:callbackFunc context:context];
}
-void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32 checkID)
+void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32_t checkID)
{
[pluginViewForInstance(instance) cancelCheckIfAllowedToLoadURL:checkID];
}
diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm
index 2c58889..782f422 100644
--- a/WebKit/mac/Storage/WebDatabaseManager.mm
+++ b/WebKit/mac/Storage/WebDatabaseManager.mm
@@ -49,6 +49,8 @@ NSString *WebDatabaseDidModifyOriginNotification = @"WebDatabaseDidModifyOriginN
NSString *WebDatabaseDidModifyDatabaseNotification = @"WebDatabaseDidModifyDatabaseNotification";
NSString *WebDatabaseIdentifierKey = @"WebDatabaseIdentifierKey";
+static NSString *databasesDirectoryPath();
+
@implementation WebDatabaseManager
+ (WebDatabaseManager *) sharedWebDatabaseManager
@@ -119,6 +121,16 @@ NSString *WebDatabaseIdentifierKey = @"WebDatabaseIdentifierKey";
@end
+static NSString *databasesDirectoryPath()
+{
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSString *databasesDirectory = [defaults objectForKey:WebDatabaseDirectoryDefaultsKey];
+ if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
+ databasesDirectory = @"~/Library/WebKit/Databases";
+
+ return [databasesDirectory stringByStandardizingPath];
+}
+
void WebKitInitializeDatabasesIfNecessary()
{
static BOOL initialized = NO;
@@ -126,13 +138,7 @@ void WebKitInitializeDatabasesIfNecessary()
return;
// Set the database root path in WebCore
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
- NSString *databasesDirectory = [defaults objectForKey:WebDatabaseDirectoryDefaultsKey];
- if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
- databasesDirectory = @"~/Library/WebKit/Databases";
-
- DatabaseTracker::tracker().setDatabaseDirectoryPath([databasesDirectory stringByStandardizingPath]);
+ DatabaseTracker::tracker().setDatabaseDirectoryPath(databasesDirectoryPath());
// Set the DatabaseTrackerClient
DatabaseTracker::tracker().setClient(WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient());
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index d27a19c..4e65751 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -54,15 +54,14 @@
#import <WebCore/Frame.h>
#import <WebCore/FrameLoadRequest.h>
#import <WebCore/Geolocation.h>
-#import <WebCore/HitTestResult.h>
#import <WebCore/HTMLNames.h>
+#import <WebCore/HitTestResult.h>
#import <WebCore/Icon.h>
#import <WebCore/IntRect.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformScreen.h>
#import <WebCore/PlatformString.h>
#import <WebCore/ResourceRequest.h>
-#import <WebCore/ScrollView.h>
#import <WebCore/Widget.h>
#import <WebCore/WindowFeatures.h>
#import <wtf/PassRefPtr.h>
@@ -499,17 +498,18 @@ void WebChromeClient::contentsSizeChanged(Frame*, const IntSize&) const
{
}
-void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scrollView) const
+void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView*) const
{
- // FIXME: This scrolling behavior should be under the control of the embedding client (rather than something
- // we just do ourselves).
-
+ // FIXME: This scrolling behavior should be under the control of the embedding client,
+ // perhaps in a delegate method, rather than something WebKit does unconditionally.
+ NSView *coordinateView = [m_webView _usesDocumentViews]
+ ? [[[m_webView mainFrame] frameView] documentView] : m_webView;
NSRect rect = r;
for (NSView *view = m_webView; view; view = [view superview]) {
if ([view isKindOfClass:[NSClipView class]]) {
NSClipView *clipView = (NSClipView *)view;
NSView *documentView = [clipView documentView];
- [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]];
+ [documentView scrollRectToVisible:[documentView convertRect:rect fromView:coordinateView]];
}
}
}
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 1e03d88..ec9024a 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -62,6 +62,7 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
+#import <wtf/Threading.h>
using namespace WebCore;
using namespace WTF;
@@ -94,6 +95,7 @@ static WebViewInsertAction kit(EditorInsertAction coreAction)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index d497513..60b1fbf 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -42,6 +42,7 @@ namespace WebCore {
class AuthenticationChallenge;
class CachedFrame;
class HistoryItem;
+ class ProtectionSpace;
class String;
class ResourceLoader;
class ResourceRequest;
@@ -79,6 +80,9 @@ private:
virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier);
virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&);
+#endif
virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&);
virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived);
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
@@ -99,6 +103,7 @@ private:
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
virtual void dispatchDidReceiveTitle(const WebCore::String& title);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&);
virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
@@ -120,6 +125,7 @@ private:
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
@@ -204,7 +210,7 @@ private:
virtual void registerForIconNotification(bool listen);
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
virtual jobject javaApplet(NSView*);
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 0088eae..cf4b03c 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -50,16 +50,16 @@
#import "WebFrameViewInternal.h"
#import "WebHTMLRepresentationPrivate.h"
#import "WebHTMLViewInternal.h"
-#import "WebHistoryItemInternal.h"
#import "WebHistoryInternal.h"
+#import "WebHistoryItemInternal.h"
#import "WebIconDatabaseInternal.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
-#import "WebNavigationData.h"
#import "WebNSURLExtras.h"
-#import "WebNetscapePluginView.h"
+#import "WebNavigationData.h"
#import "WebNetscapePluginPackage.h"
+#import "WebNetscapePluginView.h"
#import "WebPanelAuthenticationHandler.h"
#import "WebPluginController.h"
#import "WebPluginPackage.h"
@@ -73,7 +73,6 @@
#import "WebUIDelegate.h"
#import "WebUIDelegatePrivate.h"
#import "WebViewInternal.h"
-#import <WebKitSystemInterface.h>
#import <WebCore/AuthenticationMac.h>
#import <WebCore/BlockExceptions.h>
#import <WebCore/CachedFrame.h>
@@ -89,10 +88,10 @@
#import <WebCore/FrameTree.h>
#import <WebCore/FrameView.h>
#import <WebCore/HTMLAppletElement.h>
-#import <WebCore/HTMLHeadElement.h>
#import <WebCore/HTMLFormElement.h>
#import <WebCore/HTMLFrameElement.h>
#import <WebCore/HTMLFrameOwnerElement.h>
+#import <WebCore/HTMLHeadElement.h>
#import <WebCore/HTMLNames.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/HistoryItem.h>
@@ -115,10 +114,12 @@
#import <WebCore/Widget.h>
#import <WebKit/DOMElement.h>
#import <WebKit/DOMHTMLFormElement.h>
+#import <WebKitSystemInterface.h>
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
+#import <wtf/Threading.h>
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#import "WebJavaPlugIn.h"
#endif
@@ -131,7 +132,7 @@ using namespace WebCore;
using namespace HTMLNames;
using namespace std;
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
@interface NSView (WebJavaPluginDetails)
- (jobject)pollForAppletInWindow:(NSWindow *)window;
@end
@@ -413,6 +414,27 @@ void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoa
[[WebPanelAuthenticationHandler sharedHandler] startAuthentication:webChallenge window:window];
}
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader* loader, unsigned long identifier, const ProtectionSpace& protectionSpace)
+{
+ WebView *webView = getWebView(m_webFrame.get());
+ WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+
+ NSURLProtectionSpace *webProtectionSpace = mac(protectionSpace);
+
+ if (implementations->canAuthenticateAgainstProtectionSpaceFunc) {
+ if (id resource = [webView _objectForIdentifier:identifier]) {
+ return CallResourceLoadDelegateReturningBoolean(NO, implementations->canAuthenticateAgainstProtectionSpaceFunc, webView, @selector(webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:), resource, webProtectionSpace, dataSource(loader));
+ }
+ }
+
+ // If our resource load delegate doesn't handle the question, then only send authentication
+ // challenges for pre-10.6 protection spaces. This is the same as the default implementation
+ // in CFNetwork.
+ return (protectionSpace.authenticationScheme() < ProtectionSpaceAuthenticationSchemeClientCertificateRequested);
+}
+#endif
+
void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge&challenge)
{
WebView *webView = getWebView(m_webFrame.get());
@@ -593,6 +615,11 @@ void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title)
CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title, m_webFrame.get());
}
+void WebFrameLoaderClient::dispatchDidChangeIcons()
+{
+ // FIXME: Implement this to allow container to update favicon.
+}
+
void WebFrameLoaderClient::dispatchDidCommitLoad()
{
// Tell the client we've committed this URL.
@@ -1531,7 +1558,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
[NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey,
[NSNumber numberWithBool:!loadManually], WebPlugInShouldLoadMainResourceKey,
kit(element), WebPlugInContainingElementKey,
- baseURL, WebPlugInBaseURLKey,
+ // FIXME: We should be passing base URL, see <https://bugs.webkit.org/show_bug.cgi?id=35215>.
+ pluginURL, WebPlugInBaseURLKey, // pluginURL might be nil, so add it last
nil];
NSView *view = CallUIDelegate(webView, selector, arguments);
@@ -1647,7 +1675,7 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL,
const Vector<String>& paramNames, const Vector<String>& paramValues)
{
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *view = nil;
@@ -1708,7 +1736,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
return adoptRef(new PluginWidget);
#else
return 0;
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
}
String WebFrameLoaderClient::overrideMediaType() const
@@ -1767,7 +1795,7 @@ void WebFrameLoaderClient::didPerformFirstNavigation() const
[preferences setCacheModel:WebCacheModelDocumentBrowser];
}
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
jobject WebFrameLoaderClient::javaApplet(NSView* view)
{
if ([view respondsToSelector:@selector(webPlugInGetApplet)])
@@ -1786,6 +1814,7 @@ jobject WebFrameLoaderClient::javaApplet(NSView* view)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebArchive.mm b/WebKit/mac/WebView/WebArchive.mm
index 86e29c8..f07b51b 100644
--- a/WebKit/mac/WebView/WebArchive.mm
+++ b/WebKit/mac/WebView/WebArchive.mm
@@ -38,6 +38,7 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -66,6 +67,7 @@ static NSString * const WebSubframeArchivesKey = @"WebSubframeArchives";
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebClipView.h b/WebKit/mac/WebView/WebClipView.h
index 76cc50c..968d2de 100644
--- a/WebKit/mac/WebView/WebClipView.h
+++ b/WebKit/mac/WebView/WebClipView.h
@@ -31,6 +31,7 @@
@interface WebClipView : NSClipView
{
BOOL _haveAdditionalClip;
+ BOOL _isScrolling;
NSRect _additionalClip;
}
diff --git a/WebKit/mac/WebView/WebClipView.m b/WebKit/mac/WebView/WebClipView.mm
index b551145..ced5d8d 100644
--- a/WebKit/mac/WebView/WebClipView.m
+++ b/WebKit/mac/WebView/WebClipView.mm
@@ -28,10 +28,10 @@
#import "WebClipView.h"
-#import <WebKit/WebHTMLView.h>
-#import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebViewPrivate.h>
-#import <wtf/Assertions.h>
+#import "WebFrameInternal.h"
+#import "WebFrameView.h"
+#import "WebViewPrivate.h"
+#import <WebCore/FrameView.h>
// WebClipView's entire reason for existing is to set the clip used by focus ring redrawing.
// There's no easy way to prevent the focus ring from drawing outside the passed-in clip rectangle
@@ -41,10 +41,16 @@
// FIXME: Change terminology from "additional clip" to "focus ring clip".
+using namespace WebCore;
+
@interface NSView (WebViewMethod)
- (WebView *)_webView;
@end
+@interface NSClipView (WebNSClipViewDetails)
+- (void)_immediateScrollToPoint:(NSPoint)newOrigin;
+@end
+
@implementation WebClipView
- (id)initWithFrame:(NSRect)frame
@@ -67,6 +73,34 @@
return self;
}
+#if USE(ACCELERATED_COMPOSITING)
+- (NSRect)visibleRect
+{
+ if (!_isScrolling)
+ return [super visibleRect];
+
+ WebFrameView *webFrameView = (WebFrameView *)[[self superview] superview];
+ if (![webFrameView isKindOfClass:[WebFrameView class]])
+ return [super visibleRect];
+
+ if (Frame* coreFrame = core([webFrameView webFrame])) {
+ if (FrameView* frameView = coreFrame->view()) {
+ if (frameView->isEnclosedInCompositingLayer())
+ return [self bounds];
+ }
+ }
+
+ return [super visibleRect];
+}
+
+- (void)_immediateScrollToPoint:(NSPoint)newOrigin
+{
+ _isScrolling = YES;
+ [super _immediateScrollToPoint:newOrigin];
+ _isScrolling = NO;
+}
+#endif
+
- (void)resetAdditionalClip
{
ASSERT(_haveAdditionalClip);
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index d9622b3..b16aaa8 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -60,6 +60,7 @@
#import <WebKit/DOMPrivate.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -79,6 +80,7 @@ using namespace WebCore;
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
index 3ad064c..2aadc83 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.h
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -35,6 +35,9 @@
struct WebResourceDelegateImplementationCache {
IMP didCancelAuthenticationChallengeFunc;
IMP didReceiveAuthenticationChallengeFunc;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ IMP canAuthenticateAgainstProtectionSpaceFunc;
+#endif
IMP identifierForRequestFunc;
IMP willSendRequestFunc;
IMP didReceiveResponseFunc;
@@ -130,6 +133,7 @@ id CallResourceLoadDelegate(IMP, WebView *, SEL, id, NSInteger, id);
id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id);
+BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id);
id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id);
diff --git a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
index 54c4c33..d00d60b 100644
--- a/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
+++ b/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -547,6 +547,18 @@ BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, W
return result;
}
+BOOL CallResourceLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector, id object1, id object2, id object3)
+{
+ if (!self->_private->catchesDelegateExceptions)
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2, object3);
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *, id, id, id)>(objc_msgSend)(self->_private->resourceProgressDelegate, selector, self, object1, object2, object3);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
id CallScriptDebugDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2, NSInteger integer, id object3)
{
return CallDelegate(implementation, self, self->_private->scriptDebugDelegate, selector, object1, object2, integer, object3);
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index 9ded8e1..e76e3ca 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -372,7 +372,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
- (WebFrame *)webFrame
{
- return _private->webFrame;
+ // This method can be called beneath -[NSView dealloc] after _private has been cleared.
+ return _private ? _private->webFrame : nil;
}
- (void)setAllowsScrolling:(BOOL)flag
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index daeeb10..83d2e7b 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -118,6 +118,7 @@
#import <dlfcn.h>
#import <limits>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
#if USE(ACCELERATED_COMPOSITING)
#import <QuartzCore/QuartzCore.h>
@@ -179,7 +180,7 @@ static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point)
static IMP oldSetCursorForMouseLocationIMP;
// Overriding an internal method is a hack; <rdar://problem/7662987> tracks finding a better solution.
-static void setCursor(NSWindow* self, SEL cmd, NSPoint point)
+static void setCursor(NSWindow *self, SEL cmd, NSPoint point)
{
if (needsCursorRectsSupportAtPoint(self, point))
oldSetCursorForMouseLocationIMP(self, cmd, point);
@@ -221,6 +222,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
- (void)_recursive:(BOOL)recurse displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)context topView:(BOOL)topView;
- (NSRect)_dirtyRect;
- (void)_setDrawsOwnDescendants:(BOOL)drawsOwnDescendants;
+- (BOOL)_drawnByAncestor;
- (void)_propagateDirtyRectsToOpaqueAncestors;
- (void)_windowChangedKeyState;
#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
@@ -228,6 +230,42 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
#endif
@end
+#if USE(ACCELERATED_COMPOSITING)
+static IMP oldSetNeedsDisplayInRectIMP;
+
+static void setNeedsDisplayInRect(NSView *self, SEL cmd, NSRect invalidRect)
+{
+ if (![self _drawnByAncestor]) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ static Class webFrameViewClass = [WebFrameView class];
+ WebFrameView *enclosingWebFrameView = (WebFrameView *)self;
+ while (enclosingWebFrameView && ![enclosingWebFrameView isKindOfClass:webFrameViewClass])
+ enclosingWebFrameView = (WebFrameView *)[enclosingWebFrameView superview];
+
+ if (!enclosingWebFrameView) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ Frame* coreFrame = core([enclosingWebFrameView webFrame]);
+ FrameView* frameView = coreFrame ? coreFrame->view() : 0;
+ if (!frameView || !frameView->isEnclosedInCompositingLayer()) {
+ oldSetNeedsDisplayInRectIMP(self, cmd, invalidRect);
+ return;
+ }
+
+ NSRect invalidRectInWebFrameViewCoordinates = [enclosingWebFrameView convertRect:invalidRect fromView:self];
+ IntRect invalidRectInFrameViewCoordinates(invalidRectInWebFrameViewCoordinates);
+ if (![enclosingWebFrameView isFlipped])
+ invalidRectInFrameViewCoordinates.setY(frameView->frameRect().size().height() - invalidRectInFrameViewCoordinates.bottom());
+
+ frameView->invalidateRect(invalidRectInFrameViewCoordinates);
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
@interface NSApplication (WebNSApplicationDetails)
- (void)speakString:(NSString *)string;
@end
@@ -490,6 +528,7 @@ static NSCellStateValue kit(TriState state)
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -501,7 +540,17 @@ static NSCellStateValue kit(TriState state)
oldSetCursorForMouseLocationIMP = method_setImplementation(setCursorMethod, (IMP)setCursor);
ASSERT(oldSetCursorForMouseLocationIMP);
}
-#else
+
+#if USE(ACCELERATED_COMPOSITING)
+ if (!oldSetNeedsDisplayInRectIMP) {
+ Method setNeedsDisplayInRectMethod = class_getInstanceMethod([NSView class], @selector(setNeedsDisplayInRect:));
+ ASSERT(setNeedsDisplayInRectMethod);
+ oldSetNeedsDisplayInRectIMP = method_setImplementation(setNeedsDisplayInRectMethod, (IMP)setNeedsDisplayInRect);
+ ASSERT(oldSetNeedsDisplayInRectIMP);
+ }
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#else // defined(BUILDING_ON_TIGER)
if (!oldSetCursorIMP) {
Method setCursorMethod = class_getInstanceMethod([NSCursor class], @selector(set));
ASSERT(setCursorMethod);
@@ -2317,6 +2366,7 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension
[NSApp registerServicesMenuSendTypes:[[self class] _selectionPasteboardTypes]
returnTypes:[[self class] _insertablePasteboardTypes]];
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
@@ -3308,16 +3358,14 @@ WEBCORE_COMMAND(yankAndSelect)
if (subviewsWereSetAside)
[self _setAsideSubviews];
-
+
#if USE(ACCELERATED_COMPOSITING)
- if ([webView _needsOneShotDrawingSynchronization]) {
- // Disable screen updates so that any layer changes committed here
- // don't show up on the screen before the window flush at the end
- // of the current window display, but only if a window flush is actually
- // going to happen.
- NSWindow *window = [self window];
- if ([window viewsNeedDisplay])
- [window disableScreenUpdatesUntilFlush];
+ // Only do the synchronization dance if we're drawing into the window, otherwise
+ // we risk disabling screen updates when no flush is pending.
+ if ([NSGraphicsContext currentContext] == [[self window] graphicsContext] && [webView _needsOneShotDrawingSynchronization]) {
+ // Disable screen updates to minimize the chances of the race between the CA
+ // display link and AppKit drawing causing flashes.
+ [[self window] disableScreenUpdatesUntilFlush];
// Make sure any layer changes that happened as a result of layout
// via -viewWillDraw are committed.
@@ -3332,7 +3380,7 @@ WEBCORE_COMMAND(yankAndSelect)
{
if (!([[self superview] isKindOfClass:[WebClipView class]]))
return [super visibleRect];
-
+
WebClipView *clipView = (WebClipView *)[self superview];
BOOL hasAdditionalClip = [clipView hasAdditionalClip];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index e74d0e5..f4ae333 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -84,6 +84,7 @@
#define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown"
#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled"
#define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
+#define WebKitJavaScriptCanAccessClipboardPreferenceKey @"WebKitJavaScriptCanAccessClipboard"
#define WebKitXSSAuditorEnabledPreferenceKey @"WebKitXSSAuditorEnabled"
#define WebKitAcceleratedCompositingEnabledPreferenceKey @"WebKitAcceleratedCompositingEnabled"
#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 84a6e9e..9de8495 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -350,6 +350,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitLocalFileContentSniffingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitOfflineWebApplicationCacheEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitZoomsTextOnlyPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitJavaScriptCanAccessClipboardPreferenceKey,
[NSNumber numberWithBool:YES], WebKitXSSAuditorEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitAcceleratedCompositingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitShowDebugBordersPreferenceKey,
@@ -831,6 +832,16 @@ static WebCacheModel cacheModelForMainBundle(void)
[self _setBoolValue:flag forKey:WebKitZoomsTextOnlyPreferenceKey];
}
+- (BOOL)javaScriptCanAccessClipboard
+{
+ return [self _boolValueForKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
+}
+
+- (void)setJavaScriptCanAccessClipboard:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitJavaScriptCanAccessClipboardPreferenceKey];
+}
+
- (BOOL)isXSSAuditorEnabled
{
return [self _boolValueForKey:WebKitXSSAuditorEnabledPreferenceKey];
@@ -1097,8 +1108,8 @@ static WebCacheModel cacheModelForMainBundle(void)
{
NSString *systemEncodingName = (NSString *)CFStringConvertEncodingToIANACharSetName([self _systemCFStringEncoding]);
- // CFStringConvertEncodingToIANACharSetName() returns cp949 for kTextEncodingDOSKorean AKA "extended EUC-KR" AKA windows-939.
- // ICU uses this name for a different encoding, so we need to change the name to a value that actually gives us windows-939.
+ // CFStringConvertEncodingToIANACharSetName() returns cp949 for kTextEncodingDOSKorean AKA "extended EUC-KR" AKA windows-949.
+ // ICU uses this name for a different encoding, so we need to change the name to a value that actually gives us windows-949.
// In addition, this value must match what is used in Safari, see <rdar://problem/5579292>.
// On some OS versions, the result is CP949 (uppercase).
if ([systemEncodingName _webkit_isCaseInsensitiveEqualToString:@"cp949"])
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 0b5f969..ee785e9 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -107,6 +107,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)zoomsTextOnly;
- (void)setZoomsTextOnly:(BOOL)zoomsTextOnly;
+- (BOOL)javaScriptCanAccessClipboard;
+- (void)setJavaScriptCanAccessClipboard:(BOOL)flag;
+
- (BOOL)isXSSAuditorEnabled;
- (void)setXSSAuditorEnabled:(BOOL)flag;
diff --git a/WebKit/mac/WebView/WebResource.mm b/WebKit/mac/WebView/WebResource.mm
index 735e213..73c0118 100644
--- a/WebKit/mac/WebView/WebResource.mm
+++ b/WebKit/mac/WebView/WebResource.mm
@@ -43,6 +43,7 @@
#import <WebCore/ThreadCheck.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/WebCoreURLResponse.h>
+#import <wtf/Threading.h>
using namespace WebCore;
@@ -65,6 +66,7 @@ static NSString * const WebResourceResponseKey = @"WebResourceResponse"
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h b/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
index 6dc3f2d..45d9c09 100644
--- a/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebResourceLoadDelegatePrivate.h
@@ -43,6 +43,16 @@
- (void)webView:(WebView *)webView didLoadResourceFromMemoryCache:(NSURLRequest *)request response:(NSURLResponse *)response length:(WebNSInteger)length fromDataSource:(WebDataSource *)dataSource;
- (BOOL)webView:(WebView *)webView resource:(id)identifier shouldUseCredentialStorageForDataSource:(WebDataSource *)dataSource;
+#if WEBKIT_VERSION_MAX_ALLOWED > WEBKIT_VERSION_4_0
+/*!
+ @method webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:
+ @abstract Inspect an NSURLProtectionSpace before an authentication attempt is made. Only used on Snow Leopard or newer.
+ @param protectionSpace an NSURLProtectionSpace that will be used to generate an authentication challenge
+ @result Return YES if the resource load delegate is prepared to respond to an authentication challenge generated with protectionSpace, NO otherwise
+ */
+- (BOOL)webView:(WebView *)sender resource:(id)identifier canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace forDataSource:(WebDataSource *)dataSource;
+#endif
+
@end
#undef WebNSInteger
diff --git a/WebKit/mac/WebView/WebTextIterator.mm b/WebKit/mac/WebView/WebTextIterator.mm
index 457bece..6029faa 100644
--- a/WebKit/mac/WebView/WebTextIterator.mm
+++ b/WebKit/mac/WebView/WebTextIterator.mm
@@ -31,6 +31,8 @@
#import <JavaScriptCore/Vector.h>
#import <WebCore/TextIterator.h>
#import <WebCore/WebCoreObjCExtras.h>
+#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
using namespace JSC;
using namespace WebCore;
@@ -45,6 +47,8 @@ using namespace WebCore;
+ (void)initialize
{
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index b1b5c38..2442846 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -166,6 +166,7 @@
#import <wtf/RefCountedLeakCounter.h>
#import <wtf/RefPtr.h>
#import <wtf/StdLibExtras.h>
+#import <wtf/Threading.h>
#if ENABLE(DASHBOARD_SUPPORT)
#import <WebKit/WebDashboardRegion.h>
@@ -188,6 +189,7 @@
@interface NSWindow (WebNSWindowDetails)
- (id)_oldFirstResponderBeforeBecoming;
+- (void)_enableScreenUpdatesIfNeeded;
@end
using namespace WebCore;
@@ -758,10 +760,9 @@ static bool shouldEnableLoadDeferring()
@try {
[[self mainFrame] _drawRect:rect contentsOnly:NO];
- WebView *webView = [self _webView];
- [[webView _UIDelegateForwarder] webView:webView didDrawRect:rect];
+ [[self _UIDelegateForwarder] webView:self didDrawRect:rect];
- if (WebNodeHighlight *currentHighlight = [webView currentNodeHighlight])
+ if (WebNodeHighlight *currentHighlight = [self currentNodeHighlight])
[currentHighlight setNeedsUpdateInTargetViewRect:rect];
[NSGraphicsContext restoreGraphicsState];
@@ -860,6 +861,25 @@ static bool shouldEnableLoadDeferring()
return uniqueExtensions;
}
+static NSMutableSet *knownPluginMIMETypes()
+{
+ static NSMutableSet *mimeTypes = [[NSMutableSet alloc] init];
+
+ return mimeTypes;
+}
+
++ (void)_registerPluginMIMEType:(NSString *)MIMEType
+{
+ [WebView registerViewClass:[WebHTMLView class] representationClass:[WebHTMLRepresentation class] forMIMEType:MIMEType];
+ [knownPluginMIMETypes() addObject:MIMEType];
+}
+
++ (void)_unregisterPluginMIMEType:(NSString *)MIMEType
+{
+ [self _unregisterViewClassAndRepresentationClassForMIMEType:MIMEType];
+ [knownPluginMIMETypes() removeObject:MIMEType];
+}
+
+ (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins
{
MIMEType = [MIMEType lowercaseString];
@@ -880,11 +900,20 @@ static bool shouldEnableLoadDeferring()
}
if (viewClass && repClass) {
- // Special-case WebHTMLView for text types that shouldn't be shown.
- if (viewClass == [WebHTMLView class] &&
- repClass == [WebHTMLRepresentation class] &&
- [[WebHTMLView unsupportedTextMIMETypes] containsObject:MIMEType]) {
- return NO;
+ if (viewClass == [WebHTMLView class] && repClass == [WebHTMLRepresentation class]) {
+ // Special-case WebHTMLView for text types that shouldn't be shown.
+ if ([[WebHTMLView unsupportedTextMIMETypes] containsObject:MIMEType])
+ return NO;
+
+ // If the MIME type is a known plug-in we might not want to load it.
+ if (!allowPlugins && [knownPluginMIMETypes() containsObject:MIMEType]) {
+ BOOL isSupportedByWebKit = [[WebHTMLView supportedNonImageMIMETypes] containsObject:MIMEType] ||
+ [[WebHTMLView supportedMIMETypes] containsObject:MIMEType];
+
+ // If this is a known plug-in MIME type and WebKit can't show it natively, we don't want to show it.
+ if (!isSupportedByWebKit)
+ return NO;
+ }
}
if (vClass)
*vClass = viewClass;
@@ -898,7 +927,7 @@ static bool shouldEnableLoadDeferring()
- (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType
{
- if ([[self class] _viewClass:vClass andRepresentationClass:rClass forMIMEType:MIMEType allowingPlugins:[[[self _webView] preferences] arePlugInsEnabled]])
+ if ([[self class] _viewClass:vClass andRepresentationClass:rClass forMIMEType:MIMEType allowingPlugins:[_private->preferences arePlugInsEnabled]])
return YES;
if (_private->pluginDatabase) {
@@ -935,7 +964,9 @@ static bool shouldEnableLoadDeferring()
DOMWindow::dispatchAllPendingUnloadEvents();
// This will close the WebViews in a random order. Change this if close order is important.
- NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
+ // Make a new set to avoid mutating the set we are enumerating.
+ NSSet *webViewsToClose = [NSSet setWithSet:(NSSet *)allWebViewsSet];
+ NSEnumerator *enumerator = [webViewsToClose objectEnumerator];
while (WebView *webView = [enumerator nextObject])
[webView close];
}
@@ -1013,6 +1044,7 @@ static bool fastDocumentTeardownEnabled()
return;
_private->closed = YES;
+ [self _removeFromAllWebViewsSet];
[self _closingEventHandling];
@@ -1034,7 +1066,6 @@ static bool fastDocumentTeardownEnabled()
if (Frame* mainFrame = [self _mainCoreFrame])
mainFrame->loader()->detachFromParent();
- [self _removeFromAllWebViewsSet];
[self setHostWindow:nil];
[self setDownloadDelegate:nil];
@@ -1345,6 +1376,7 @@ static bool fastDocumentTeardownEnabled()
settings->setLocalFileContentSniffingEnabled([preferences localFileContentSniffingEnabled]);
settings->setOfflineWebApplicationCacheEnabled([preferences offlineWebApplicationCacheEnabled]);
settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage);
+ settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
@@ -1379,6 +1411,9 @@ static inline IMP getMethod(id o, SEL s)
cache->didFinishLoadingFromDataSourceFunc = getMethod(delegate, @selector(webView:resource:didFinishLoadingFromDataSource:));
cache->didLoadResourceFromMemoryCacheFunc = getMethod(delegate, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:));
cache->didReceiveAuthenticationChallengeFunc = getMethod(delegate, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:));
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ cache->canAuthenticateAgainstProtectionSpaceFunc = getMethod(delegate, @selector(webView:resource:canAuthenticateAgainstProtectionSpace:forDataSource:));
+#endif
cache->didReceiveContentLengthFunc = getMethod(delegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:));
cache->didReceiveResponseFunc = getMethod(delegate, @selector(webView:resource:didReceiveResponse:fromDataSource:));
cache->identifierForRequestFunc = getMethod(delegate, @selector(webView:identifierForInitialRequest:fromDataSource:));
@@ -2460,6 +2495,8 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
initialized = YES;
InitWebCoreSystemInterface();
+ JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate) name:NSApplicationWillTerminateNotification object:NSApp];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesChangedNotification:) name:WebPreferencesChangedNotification object:nil];
@@ -2504,7 +2541,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
- (BOOL)_canShowMIMEType:(NSString *)MIMEType
{
- return [[self class] _canShowMIMEType:MIMEType allowingPlugins:[[[self _webView] preferences] arePlugInsEnabled]];
+ return [[self class] _canShowMIMEType:MIMEType allowingPlugins:[_private->preferences arePlugInsEnabled]];
}
- (WebBasePluginPackage *)_pluginForMIMEType:(NSString *)MIMEType
@@ -5604,9 +5641,27 @@ static WebFrameView *containingFrameView(NSView *view)
static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActivity, void* info)
{
- WebView* webView = reinterpret_cast<WebView*>(info);
- if ([webView _syncCompositingChanges])
+ WebView *webView = reinterpret_cast<WebView*>(info);
+ NSWindow *window = [webView window];
+
+ // An NSWindow may not display in the next runloop cycle after dirtying due to delayed window display logic,
+ // in which case this observer can fire first. So if the window is due for a display, don't commit
+ // layer changes, otherwise they'll show on screen before the view drawing.
+ if ([window viewsNeedDisplay])
+ return;
+
+ if ([webView _syncCompositingChanges]) {
[webView _clearLayerSyncLoopObserver];
+ // AppKit may have disabled screen updates, thinking an upcoming window flush will re-enable them.
+ // In case setNeedsDisplayInRect() has prevented the window from needing to be flushed, re-enable screen
+ // updates here.
+ if (![window isFlushWindowDisabled])
+ [window _enableScreenUpdatesIfNeeded];
+ } else {
+ // Since the WebView does not need display, -viewWillDraw will not be called. Perform pending layout now,
+ // so that the layers draw with up-to-date layout.
+ [webView _viewWillDrawInternal];
+ }
}
- (void)_scheduleCompositingLayerSync
diff --git a/WebKit/mac/WebView/WebViewData.mm b/WebKit/mac/WebView/WebViewData.mm
index bf81dad..06da58f 100644
--- a/WebKit/mac/WebView/WebViewData.mm
+++ b/WebKit/mac/WebView/WebViewData.mm
@@ -34,6 +34,7 @@
#import <WebCore/WebCoreObjCExtras.h>
#import <objc/objc-auto.h>
#import <runtime/InitializeThreading.h>
+#import <wtf/Threading.h>
BOOL applicationIsTerminating = NO;
int pluginDatabaseClientCount = 0;
@@ -43,6 +44,7 @@ int pluginDatabaseClientCount = 0;
+ (void)initialize
{
JSC::initializeThreading();
+ WTF::initializeMainThreadToProcessMainThread();
#ifndef BUILDING_ON_TIGER
WebCoreObjCFinalizeOnMainThread(self);
#endif
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index a2ce646..4643573 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -117,6 +117,8 @@ namespace WebCore {
- (void)_didStartProvisionalLoadForFrame:(WebFrame *)frame;
+ (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins;
- (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType;
++ (void)_registerPluginMIMEType:(NSString *)MIMEType;
++ (void)_unregisterPluginMIMEType:(NSString *)MIMEType;
+ (BOOL)_canShowMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins;
- (BOOL)_canShowMIMEType:(NSString *)MIMEType;
+ (NSString *)_MIMETypeForFile:(NSString *)path;
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index c865c4d..821e699 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -292,6 +292,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
if (overlay)
overlay->update(QRectF(dirtyRect));
#if USE(ACCELERATED_COMPOSITING)
+ updateCompositingScrollPosition();
syncLayers();
#endif
}
@@ -649,10 +650,13 @@ QVariant QGraphicsWebView::itemChange(GraphicsItemChange change, const QVariant&
// fire 'CursorChange'.
case ItemCursorChange:
return value;
- case ItemCursorHasChanged:
- QEvent event(QEvent::CursorChange);
- QApplication::sendEvent(this, &event);
- return value;
+ case ItemCursorHasChanged: {
+ QEvent event(QEvent::CursorChange);
+ QApplication::sendEvent(this, &event);
+ return value;
+ }
+ default:
+ break;
}
return QGraphicsWidget::itemChange(change, value);
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index 8af7203..551346b 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -821,7 +821,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
int propID = cssPropertyID(name);
- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element);
+ RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element, true);
if (!propID || !style)
return QString();
diff --git a/WebKit/qt/Api/qwebkitversion.h b/WebKit/qt/Api/qwebkitversion.h
index f0fbef0..de79dd1 100644
--- a/WebKit/qt/Api/qwebkitversion.h
+++ b/WebKit/qt/Api/qwebkitversion.h
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <QtCore/qstring.h>
#ifndef qwebkitversion_h
#define qwebkitversion_h
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 0e11c15..c9fc210 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -81,8 +81,9 @@
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
#include "NotificationPresenterClientQt.h"
-#include "QWebPageClient.h"
+#include "PageClientQt.h"
#include "WorkerThread.h"
+#include "wtf/Threading.h"
#include <QApplication>
#include <QBasicTimer>
@@ -120,126 +121,8 @@
using namespace WebCore;
-void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode)
-{
- QWebPagePrivate::priv(page)->viewMode = mode;
- WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame());
- WebCore::FrameView* view = frame->view();
- frame->document()->updateStyleSelector();
- view->forceLayout();
-}
-
bool QWebPagePrivate::drtRun = false;
-class QWebPageWidgetClient : public QWebPageClient {
-public:
- QWebPageWidgetClient(QWidget* view)
- : view(view)
- {
- Q_ASSERT(view);
- }
-
- virtual bool isQWidgetClient() const { return true; }
-
- virtual void scroll(int dx, int dy, const QRect&);
- virtual void update(const QRect& dirtyRect);
- virtual void setInputMethodEnabled(bool enable);
- virtual bool inputMethodEnabled() const;
-#if QT_VERSION >= 0x040600
- virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
-#endif
-
-#ifndef QT_NO_CURSOR
- virtual QCursor cursor() const;
- virtual void updateCursor(const QCursor& cursor);
-#endif
-
- virtual QPalette palette() const;
- virtual int screenNumber() const;
- virtual QWidget* ownerWidget() const;
- virtual QRect geometryRelativeToOwnerWidget() const;
-
- virtual QObject* pluginParent() const;
-
- virtual QStyle* style() const;
-
- QWidget* view;
-};
-
-void QWebPageWidgetClient::scroll(int dx, int dy, const QRect& rectToScroll)
-{
- view->scroll(qreal(dx), qreal(dy), rectToScroll);
-}
-
-void QWebPageWidgetClient::update(const QRect & dirtyRect)
-{
- view->update(dirtyRect);
-}
-
-void QWebPageWidgetClient::setInputMethodEnabled(bool enable)
-{
- view->setAttribute(Qt::WA_InputMethodEnabled, enable);
-}
-
-bool QWebPageWidgetClient::inputMethodEnabled() const
-{
- return view->testAttribute(Qt::WA_InputMethodEnabled);
-}
-
-#if QT_VERSION >= 0x040600
-void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
-{
- if (enable)
- view->setInputMethodHints(view->inputMethodHints() | hint);
- else
- view->setInputMethodHints(view->inputMethodHints() & ~hint);
-}
-#endif
-#ifndef QT_NO_CURSOR
-QCursor QWebPageWidgetClient::cursor() const
-{
- return view->cursor();
-}
-
-void QWebPageWidgetClient::updateCursor(const QCursor& cursor)
-{
- view->setCursor(cursor);
-}
-#endif
-
-QPalette QWebPageWidgetClient::palette() const
-{
- return view->palette();
-}
-
-int QWebPageWidgetClient::screenNumber() const
-{
-#if defined(Q_WS_X11)
- return view->x11Info().screen();
-#endif
- return 0;
-}
-
-QWidget* QWebPageWidgetClient::ownerWidget() const
-{
- return view;
-}
-
-QRect QWebPageWidgetClient::geometryRelativeToOwnerWidget() const
-{
- return view->geometry();
-}
-
-QObject* QWebPageWidgetClient::pluginParent() const
-{
- return view;
-}
-
-QStyle* QWebPageWidgetClient::style() const
-{
- return view->style();
-}
-
// Lookup table mapping QWebPage::WebActions to the associated Editor commands
static const char* editorCommandWebActions[] =
{
@@ -382,6 +265,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
{
WebCore::InitializeLoggingChannelsIfNecessary();
JSC::initializeThreading();
+ WTF::initializeMainThread();
WebCore::SecurityOrigin::setLocalLoadPolicy(WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData);
chromeClient = new ChromeClientQt(q);
@@ -406,7 +290,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
#ifndef QT_NO_CONTEXTMENU
currentContextMenu = 0;
#endif
- smartInsertDeleteEnabled = false;
+ smartInsertDeleteEnabled = true;
selectTrailingWhitespaceEnabled = false;
history.d = new QWebHistoryPrivate(page->backForwardList());
@@ -1054,10 +938,6 @@ void QWebPagePrivate::keyPressEvent(QKeyEvent *ev)
handled = frame->eventHandler()->keyEvent(ev);
if (!handled) {
handled = true;
- QFont defaultFont;
- if (client)
- defaultFont = client->ownerWidget()->font();
- QFontMetrics fm(defaultFont);
if (!handleScrolling(ev, frame)) {
switch (ev->key()) {
case Qt::Key_Back:
@@ -1248,6 +1128,9 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
{
WebCore::Frame *frame = page->focusController()->focusedOrMainFrame();
WebCore::Editor *editor = frame->editor();
+#if QT_VERSION >= 0x040600
+ QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant());
+#endif
if (!editor->canEdit()) {
ev->ignore();
@@ -1264,6 +1147,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
renderTextControl = toRenderTextControl(renderer);
Vector<CompositionUnderline> underlines;
+ bool hasSelection = false;
for (int i = 0; i < ev->attributes().size(); ++i) {
const QInputMethodEvent::Attribute& a = ev->attributes().at(i);
@@ -1287,10 +1171,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
}
#if QT_VERSION >= 0x040600
case QInputMethodEvent::Selection: {
- if (renderTextControl) {
- renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length)));
- renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length)));
- }
+ selection = a;
+ hasSelection = true;
break;
}
#endif
@@ -1299,13 +1181,48 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
if (!ev->commitString().isEmpty())
editor->confirmComposition(ev->commitString());
- else if (!ev->preeditString().isEmpty()) {
+ else {
+ // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition
+ // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text
+ // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text
+ // 4. otherwise event is updating supplied pre-edit text
QString preedit = ev->preeditString();
- editor->setComposition(preedit, underlines, preedit.length(), 0);
+#if QT_VERSION >= 0x040600
+ if (hasSelection) {
+ QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
+ if (preedit.isEmpty() && selection.start + selection.length > 0)
+ preedit = text;
+ editor->setComposition(preedit, underlines,
+ (selection.length < 0) ? selection.start + selection.length : selection.start,
+ (selection.length < 0) ? selection.start : selection.start + selection.length);
+ } else
+#endif
+ editor->setComposition(preedit, underlines, preedit.length(), 0);
}
+
ev->accept();
}
+void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
+{
+ if (event->propertyName() == "_q_viewMode") {
+ QString mode = q->property("_q_viewMode").toString();
+ if (mode != viewMode) {
+ viewMode = mode;
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ WebCore::FrameView* view = frame->view();
+ frame->document()->updateStyleSelector();
+ view->layout();
+ }
+ } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") {
+ int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt();
+ q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
+ } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
+ double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
+ q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
+ }
+}
+
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
@@ -1437,7 +1354,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
// We can't access absoluteCaretBounds() while the view needs to layout.
return QVariant();
}
- return QVariant(frame->selection()->absoluteCaretBounds());
+ return QVariant(view->contentsToWindow(frame->selection()->absoluteCaretBounds()));
}
case Qt::ImFont: {
if (renderTextControl) {
@@ -1854,12 +1771,12 @@ void QWebPage::setView(QWidget* view)
if (d->client) {
if (d->client->isQWidgetClient())
- static_cast<QWebPageWidgetClient*>(d->client)->view = view;
+ static_cast<PageClientQWidget*>(d->client)->view = view;
return;
}
if (view)
- d->client = new QWebPageWidgetClient(view);
+ d->client = new PageClientQWidget(view);
}
/*!
@@ -1993,9 +1910,9 @@ QWebPage *QWebPage::createWindow(WebWindowType type)
}
/*!
- This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin".
- The \a classid, \a url, \a paramNames and \a paramValues correspond to the HTML object element attributes and
- child elements to configure the embeddable object.
+ This function is called whenever WebKit encounters a HTML object element with type "application/x-qt-plugin". It is
+ called regardless of the value of QWebSettings::PluginsEnabled. The \a classid, \a url, \a paramNames and \a paramValues
+ correspond to the HTML object element attributes and child elements to configure the embeddable object.
*/
QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
{
@@ -2153,7 +2070,6 @@ void QWebPage::setViewportSize(const QSize &size) const
if (frame->d->frame && frame->d->frame->view()) {
WebCore::FrameView* view = frame->d->frame->view();
view->setFrameRect(QRect(QPoint(0, 0), size));
- view->forceLayout();
view->adjustViewSize();
}
}
@@ -2190,10 +2106,10 @@ void QWebPage::setPreferredContentsSize(const QSize &size) const
if (size.isValid()) {
view->setUseFixedLayout(true);
view->setFixedLayoutSize(size);
- view->forceLayout();
+ view->layout();
} else if (view->useFixedLayout()) {
view->setUseFixedLayout(false);
- view->forceLayout();
+ view->layout();
}
}
}
@@ -2654,6 +2570,9 @@ bool QWebPage::event(QEvent *ev)
d->touchEvent(static_cast<QTouchEvent*>(ev));
break;
#endif
+ case QEvent::DynamicPropertyChange:
+ d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
+ break;
default:
return QObject::event(ev);
}
@@ -3137,233 +3056,255 @@ QWebPluginFactory *QWebPage::pluginFactory() const
\o %AppVersion% expands to QCoreApplication::applicationName()/QCoreApplication::applicationVersion() if they're set; otherwise defaulting to Qt and the current Qt version.
\endlist
*/
-QString QWebPage::userAgentForUrl(const QUrl& url) const
+QString QWebPage::userAgentForUrl(const QUrl&) const
{
- Q_UNUSED(url)
- QString ua = QLatin1String("Mozilla/5.0 ("
+ // splitting the string in three and user QStringBuilder is better than using QString::arg()
+ static QString firstPart;
+ static QString secondPart;
+ static QString thirdPart;
+
+ if (firstPart.isNull() || secondPart.isNull() || thirdPart.isNull()) {
+ QString firstPartTemp;
+ firstPartTemp.reserve(150);
+ firstPartTemp += QString::fromLatin1("Mozilla/5.0 ("
// Platform
#ifdef Q_WS_MAC
- "Macintosh"
+ "Macintosh"
#elif defined Q_WS_QWS
- "QtEmbedded"
+ "QtEmbedded"
#elif defined Q_WS_WIN
- "Windows"
+ "Windows"
#elif defined Q_WS_X11
- "X11"
+ "X11"
#elif defined Q_OS_SYMBIAN
- "SymbianOS"
+ "SymbianOS"
#else
- "Unknown"
+ "Unknown"
#endif
- // Placeholder for Platform Version
- "%1; "
+ );
- // Placeholder for security strength (N or U)
- "%2; "
+ firstPartTemp += QString::fromLatin1("; ");
+
+ // SSL support
+#if !defined(QT_NO_OPENSSL)
+ // we could check QSslSocket::supportsSsl() here, but this makes
+ // OpenSSL, certificates etc being loaded in all cases were QWebPage
+ // is used. This loading is not needed for non-https.
+ firstPartTemp += QString::fromLatin1("U; ");
+ // this may lead to a false positive: We indicate SSL since it is
+ // compiled in even though supportsSsl() might return false
+#else
+ firstPartTemp += QString::fromLatin1("N; ");
+#endif
- // Subplatform"
+ // Operating system
#ifdef Q_OS_AIX
- "AIX"
+ firstPartTemp += QString::fromLatin1("AIX");
#elif defined Q_OS_WIN32
- "%3"
+
+ switch (QSysInfo::WindowsVersion) {
+ case QSysInfo::WV_32s:
+ firstPartTemp += QString::fromLatin1("Windows 3.1");
+ break;
+ case QSysInfo::WV_95:
+ firstPartTemp += QString::fromLatin1("Windows 95");
+ break;
+ case QSysInfo::WV_98:
+ firstPartTemp += QString::fromLatin1("Windows 98");
+ break;
+ case QSysInfo::WV_Me:
+ firstPartTemp += QString::fromLatin1("Windows 98; Win 9x 4.90");
+ break;
+ case QSysInfo::WV_NT:
+ firstPartTemp += QString::fromLatin1("WinNT4.0");
+ break;
+ case QSysInfo::WV_2000:
+ firstPartTemp += QString::fromLatin1("Windows NT 5.0");
+ break;
+ case QSysInfo::WV_XP:
+ firstPartTemp += QString::fromLatin1("Windows NT 5.1");
+ break;
+ case QSysInfo::WV_2003:
+ firstPartTemp += QString::fromLatin1("Windows NT 5.2");
+ break;
+ case QSysInfo::WV_VISTA:
+ firstPartTemp += QString::fromLatin1("Windows NT 6.0");
+ break;
+ case QSysInfo::WV_WINDOWS7:
+ firstPartTemp += QString::fromLatin1("Windows NT 6.1");
+ break;
+ case QSysInfo::WV_CE:
+ firstPartTemp += QString::fromLatin1("Windows CE");
+ break;
+ case QSysInfo::WV_CENET:
+ firstPartTemp += QString::fromLatin1("Windows CE .NET");
+ break;
+ case QSysInfo::WV_CE_5:
+ firstPartTemp += QString::fromLatin1("Windows CE 5.x");
+ break;
+ case QSysInfo::WV_CE_6:
+ firstPartTemp += QString::fromLatin1("Windows CE 6.x");
+ break;
+ }
+
#elif defined Q_OS_DARWIN
#ifdef __i386__ || __x86_64__
- "Intel Mac OS X"
+ firstPartTemp += QString::fromLatin1("Intel Mac OS X");
#else
- "PPC Mac OS X"
+ firstPartTemp += QString::fromLatin1("PPC Mac OS X");
#endif
#elif defined Q_OS_BSDI
- "BSD"
+ firstPartTemp += QString::fromLatin1("BSD");
#elif defined Q_OS_BSD4
- "BSD Four"
+ firstPartTemp += QString::fromLatin1("BSD Four");
#elif defined Q_OS_CYGWIN
- "Cygwin"
+ firstPartTemp += QString::fromLatin1("Cygwin");
#elif defined Q_OS_DGUX
- "DG/UX"
+ firstPartTemp += QString::fromLatin1("DG/UX");
#elif defined Q_OS_DYNIX
- "DYNIX/ptx"
+ firstPartTemp += QString::fromLatin1("DYNIX/ptx");
#elif defined Q_OS_FREEBSD
- "FreeBSD"
+ firstPartTemp += QString::fromLatin1("FreeBSD");
#elif defined Q_OS_HPUX
- "HP-UX"
+ firstPartTemp += QString::fromLatin1("HP-UX");
#elif defined Q_OS_HURD
- "GNU Hurd"
+ firstPartTemp += QString::fromLatin1("GNU Hurd");
#elif defined Q_OS_IRIX
- "SGI Irix"
+ firstPartTemp += QString::fromLatin1("SGI Irix");
#elif defined Q_OS_LINUX
- "Linux"
+
+#if defined(__x86_64__)
+ firstPartTemp += QString::fromLatin1("Linux x86_64");
+#elif defined(__i386__)
+ firstPartTemp += QString::fromLatin1("Linux i686");
+#else
+ firstPartTemp += QString::fromLatin1("Linux");
+#endif
+
#elif defined Q_OS_LYNX
- "LynxOS"
+ firstPartTemp += QString::fromLatin1("LynxOS");
#elif defined Q_OS_NETBSD
- "NetBSD"
+ firstPartTemp += QString::fromLatin1("NetBSD");
#elif defined Q_OS_OS2
- "OS/2"
+ firstPartTemp += QString::fromLatin1("OS/2");
#elif defined Q_OS_OPENBSD
- "OpenBSD"
+ firstPartTemp += QString::fromLatin1("OpenBSD");
#elif defined Q_OS_OS2EMX
- "OS/2"
+ firstPartTemp += QString::fromLatin1("OS/2");
#elif defined Q_OS_OSF
- "HP Tru64 UNIX"
+ firstPartTemp += QString::fromLatin1("HP Tru64 UNIX");
#elif defined Q_OS_QNX6
- "QNX RTP Six"
+ firstPartTemp += QString::fromLatin1("QNX RTP Six");
#elif defined Q_OS_QNX
- "QNX"
+ firstPartTemp += QString::fromLatin1("QNX");
#elif defined Q_OS_RELIANT
- "Reliant UNIX"
+ firstPartTemp += QString::fromLatin1("Reliant UNIX");
#elif defined Q_OS_SCO
- "SCO OpenServer"
+ firstPartTemp += QString::fromLatin1("SCO OpenServer");
#elif defined Q_OS_SOLARIS
- "Sun Solaris"
+ firstPartTemp += QString::fromLatin1("Sun Solaris");
#elif defined Q_OS_ULTRIX
- "DEC Ultrix"
-#elif defined Q_WS_S60
- "Series60"
-#elif defined Q_OS_UNIX
- "UNIX BSD/SYSV system"
-#elif defined Q_OS_UNIXWARE
- "UnixWare Seven, Open UNIX Eight"
-#else
- "Unknown"
-#endif
- // Placeholder for SubPlatform Version
- "%4; ");
-
- // Platform Version
- QString osVer;
-#ifdef Q_OS_SYMBIAN
- QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
- switch (symbianVersion) {
- case QSysInfo::SV_9_2:
- osVer = "/9.2";
- break;
- case QSysInfo::SV_9_3:
- osVer = "/9.3";
- break;
- case QSysInfo::SV_9_4:
- osVer = "/9.4";
- break;
- default:
- osVer = "Unknown";
- }
-#endif
- ua = ua.arg(osVer);
-
- QChar securityStrength(QLatin1Char('N'));
-#if !defined(QT_NO_OPENSSL)
- // we could check QSslSocket::supportsSsl() here, but this makes
- // OpenSSL, certificates etc being loaded in all cases were QWebPage
- // is used. This loading is not needed for non-https.
- securityStrength = QLatin1Char('U');
- // this may lead to a false positive: We indicate SSL since it is
- // compiled in even though supportsSsl() might return false
-#endif
- ua = ua.arg(securityStrength);
-
-#if defined Q_OS_WIN32
- QString ver;
- switch (QSysInfo::WindowsVersion) {
- case QSysInfo::WV_32s:
- ver = "Windows 3.1";
- break;
- case QSysInfo::WV_95:
- ver = "Windows 95";
- break;
- case QSysInfo::WV_98:
- ver = "Windows 98";
- break;
- case QSysInfo::WV_Me:
- ver = "Windows 98; Win 9x 4.90";
- break;
- case QSysInfo::WV_NT:
- ver = "WinNT4.0";
+ firstPartTemp += QString::fromLatin1("DEC Ultrix");
+#elif defined Q_OS_SYMBIAN
+ firstPartTemp += QString::fromLatin1("SymbianOS");
+ QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
+ switch (symbianVersion) {
+ case QSysInfo::SV_9_2:
+ firstPartTemp += QString::fromLatin1("/9.2");
break;
- case QSysInfo::WV_2000:
- ver = "Windows NT 5.0";
+ case QSysInfo::SV_9_3:
+ firstPartTemp += QString::fromLatin1("/9.3");
break;
- case QSysInfo::WV_XP:
- ver = "Windows NT 5.1";
+ case QSysInfo::SV_9_4:
+ firstPartTemp += QString::fromLatin1("/9.4");
break;
- case QSysInfo::WV_2003:
- ver = "Windows NT 5.2";
+ default:
+ firstPartTemp += QString::fromLatin1("/Unknown");
+ }
+
+#if defined Q_WS_S60
+ firstPartTemp += QLatin1Char(' ');
+ firstPartTemp += QString::fromLatin1("Series60");
+ QSysInfo::S60Version s60Version = QSysInfo::s60Version();
+ switch (s60Version) {
+ case QSysInfo::SV_S60_3_1:
+ firstPartTemp += QString::fromLatin1("/3.1");
break;
- case QSysInfo::WV_VISTA:
- ver = "Windows NT 6.0";
+ case QSysInfo::SV_S60_3_2:
+ firstPartTemp += QString::fromLatin1("/3.2");
break;
-#if QT_VERSION > 0x040500
- case QSysInfo::WV_WINDOWS7:
- ver = "Windows NT 6.1";
+ case QSysInfo::SV_S60_5_0:
+ firstPartTemp += QString::fromLatin1("/5.0");
break;
+ default:
+ firstPartTemp += QString::fromLatin1("/Unknown");
+ }
#endif
- case QSysInfo::WV_CE:
- ver = "Windows CE";
- break;
- case QSysInfo::WV_CENET:
- ver = "Windows CE .NET";
- break;
- case QSysInfo::WV_CE_5:
- ver = "Windows CE 5.x";
- break;
- case QSysInfo::WV_CE_6:
- ver = "Windows CE 6.x";
- break;
- }
- ua = QString(ua).arg(ver);
+
+#elif defined Q_OS_UNIX
+ firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system");
+#elif defined Q_OS_UNIXWARE
+ firstPartTemp += QString::fromLatin1("UnixWare Seven, Open UNIX Eight");
+#else
+ firstPartTemp += QString::fromLatin1("Unknown");
#endif
- // SubPlatform Version
- QString subPlatformVer;
-#ifdef Q_OS_SYMBIAN
- QSysInfo::S60Version s60Version = QSysInfo::s60Version();
- switch (s60Version) {
- case QSysInfo::SV_S60_3_1:
- subPlatformVer = "/3.1";
- break;
- case QSysInfo::SV_S60_3_2:
- subPlatformVer = "/3.2";
- break;
- case QSysInfo::SV_S60_5_0:
- subPlatformVer = "/5.0";
- break;
- default:
- subPlatformVer = " Unknown";
- }
+ // language is the split
+ firstPartTemp += QString::fromLatin1("; ");
+ firstPartTemp.squeeze();
+ firstPart = firstPartTemp;
+
+ QString secondPartTemp;
+ secondPartTemp.reserve(150);
+ secondPartTemp += QString::fromLatin1(") ");
+
+ // webkit/qt version
+ secondPartTemp += QString::fromLatin1("AppleWebKit/");
+ secondPartTemp += qWebKitVersion();
+ secondPartTemp += QString::fromLatin1(" (KHTML, like Gecko) ");
+
+
+ // Application name split the third part
+ secondPartTemp.squeeze();
+ secondPart = secondPartTemp;
+
+ QString thirdPartTemp;
+ thirdPartTemp.reserve(150);
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+ thirdPartTemp + QLatin1String(" Mobile Safari/");
+#else
+ thirdPartTemp += QLatin1String(" Safari/");
#endif
- ua = ua.arg(subPlatformVer);
+ thirdPartTemp += qWebKitVersion();
+ thirdPartTemp.squeeze();
+ thirdPart = thirdPartTemp;
+ Q_ASSERT(!firstPart.isNull());
+ Q_ASSERT(!secondPart.isNull());
+ Q_ASSERT(!thirdPart.isNull());
+ }
// Language
- QLocale locale;
+ QString languageName;
if (d->client && d->client->ownerWidget())
- locale = d->client->ownerWidget()->locale();
- QString name = locale.name();
- name[2] = QLatin1Char('-');
- ua.append(name);
- ua.append(QLatin1String(") "));
-
- // webkit/qt version
- ua.append(QString(QLatin1String("AppleWebKit/%1 (KHTML, like Gecko) "))
- .arg(QString(qWebKitVersion())));
+ languageName = d->client->ownerWidget()->locale().name();
+ else
+ languageName = QLocale().name();
+ languageName[2] = QLatin1Char('-');
// Application name/version
QString appName = QCoreApplication::applicationName();
if (!appName.isEmpty()) {
- ua.append(appName);
QString appVer = QCoreApplication::applicationVersion();
if (!appVer.isEmpty())
- ua.append(QLatin1Char('/') + appVer);
+ appName.append(QLatin1Char('/') + appVer);
} else {
// Qt version
- ua.append(QLatin1String("Qt/"));
- ua.append(QLatin1String(qVersion()));
+ appName = QString::fromLatin1("Qt/") + QString::fromLatin1(qVersion());
}
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- ua.append(QString(QLatin1String(" Mobile Safari/%1")).arg(qWebKitVersion()));
-#else
- ua.append(QString(QLatin1String(" Safari/%1")).arg(qWebKitVersion()));
-#endif
- return ua;
+ return firstPart + languageName + secondPart + appName + thirdPart;
}
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index f40053b..7414716 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -113,6 +113,8 @@ public:
void inputMethodEvent(QInputMethodEvent*);
+ void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
+
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
void handleClipboard(QEvent*, Qt::MouseButton);
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index 1dff037..99fd812 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -48,9 +48,7 @@
#include <QUrl>
#include <QFileInfo>
-#if ENABLE(QT_BEARER)
#include "NetworkStateNotifier.h"
-#endif
void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
{
@@ -74,7 +72,6 @@ public:
QString localStoragePath;
QString offlineWebApplicationCachePath;
qint64 offlineStorageDefaultQuota;
- QUrl inspectorLocation;
void apply();
WebCore::Settings* settings;
@@ -187,8 +184,8 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
- value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
- global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
+ value = attributes.value(QWebSettings::DOMPasteAllowed,
+ global->attributes.value(QWebSettings::DOMPasteAllowed));
settings->setDOMPasteAllowed(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
@@ -238,6 +235,10 @@ 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);
@@ -298,7 +299,9 @@ QWebSettings* QWebSettings::globalSettings()
Support for browser plugins can enabled by setting the
\l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
this attribute is enabled for all pages by setting it on the
- \l{globalSettings()}{global settings object}.
+ \l{globalSettings()}{global settings object}. QtWebKit will always ignore this setting
+ \when processing Qt plugins. The decision to allow a Qt plugin is made by the client
+ \in its reimplementation of QWebPage::createPlugin.
\section1 Web Application Support
@@ -367,13 +370,14 @@ QWebSettings* QWebSettings::globalSettings()
programs.
\value JavaEnabled Enables or disables Java applets.
Currently Java applets are not supported.
- \value PluginsEnabled Enables or disables plugins in Web pages.
+ \value PluginsEnabled Enables or disables plugins in Web pages. Qt plugins
+ with a mimetype such as "application/x-qt-plugin" are not affected by this setting.
\value PrivateBrowsingEnabled Private browsing prevents WebKit from
recording visited pages in the history and storing web page icons.
\value JavascriptCanOpenWindows Specifies whether JavaScript programs
can open new windows.
- \value JavascriptCanAccessClipboard Specifies whether JavaScript programs
- can read or write to the clipboard.
+ \value DOMPasteAllowed Specifies whether JavaScript programs can
+ read clipboard contents.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
Currently this enables the "Inspect" element in the context menu as
well as the use of QWebInspector which controls the WebKit WebInspector
@@ -401,6 +405,7 @@ QWebSettings* QWebSettings::globalSettings()
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
\value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls.
+ \value JavaScriptCanAccessClipboard Specifies whether JavaScript can access the clipboard.
\value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
\value AcceleratedCompositingEnabled This feature, when used in conjunction with
QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and
@@ -998,31 +1003,6 @@ void QWebSettings::setLocalStoragePath(const QString& path)
}
/*!
- \since 4.7
-
- Specifies the \a location of a frontend to load with each web page when using Web Inspector.
-
- \sa inspectorUrl()
-*/
-void QWebSettings::setInspectorUrl(const QUrl& location)
-{
- d->inspectorLocation = location;
- d->apply();
-}
-
-/*!
- \since 4.7
-
- Returns the location of the Web Inspector frontend.
-
- \sa setInspectorUrl()
-*/
-QUrl QWebSettings::inspectorUrl() const
-{
- return d->inspectorLocation;
-}
-
-/*!
\since 4.6
\relates QWebSettings
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index bd728d8..7355e33 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -55,7 +55,7 @@ public:
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
- JavascriptCanAccessClipboard,
+ DOMPasteAllowed,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
ZoomTextOnly,
@@ -68,13 +68,14 @@ public:
#endif
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
+ JavaScriptCanAccessClipboard,
XSSAuditingEnabled,
AcceleratedCompositingEnabled,
- WebGLEnabled,
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
- FrameFlatteningEnabled
+ FrameFlatteningEnabled,
+ WebGLEnabled
};
enum WebGraphic {
MissingImageGraphic,
@@ -137,9 +138,6 @@ public:
void setLocalStoragePath(const QString& path);
QString localStoragePath() const;
- void setInspectorUrl(const QUrl &location);
- QUrl inspectorUrl() const;
-
static void clearMemoryCaches();
static void enablePersistentStorage(const QString& path = QString());
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 54f5f65..0ed6300 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,534 @@
+2010-05-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with absent exports.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-05-06 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Patch to fix compilation warnings for QGraphicsWebView
+ https://bugs.webkit.org/show_bug.cgi?id=37428
+
+ Patch by Alexis Menard <alexis.menard@nokia.com>
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::itemChange):
+
+2010-05-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Replace public inspector url with private property for QtLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=35340
+
+ Replace the public API with a private dynamic property until this feature
+ is ready.
+
+ * Api/qwebsettings.cpp:
+ * Api/qwebsettings.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ * symbian/bwins/QtWebKitu.def:
+ * symbian/eabi/QtWebKitu.def:
+
+2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Rename the property from wrt_viewMode to _q_viewMode.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::viewModes):
+
+2010-05-04 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ [Qt] Preserve binary compatibility with qtwebkit-2.0 branch
+
+ Moved the WebGL attribute in QWebSettings to the end of the enum,
+ to ensure that the numeric values of the enum values following it
+ are the same as in the release branch.
+
+ * Api/qwebsettings.h:
+
+2010-05-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Expose HTMLTokenizer yielding parameters
+ https://bugs.webkit.org/show_bug.cgi?id=37023
+
+ Enables to set TimeDelay and ChunkSize for
+ HTMLTokenizer.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendSubmitEvent):
+
+2010-05-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Prune dead code in QWebPage
+
+ * Api/qwebpage.cpp:
+
+2010-05-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * Api/qwebsettings.cpp:
+
+2010-04-29 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QtWebKit versioning added
+ https://bugs.webkit.org/show_bug.cgi?id=37207
+
+ QtWebkit releases separated from Qt release cycle.
+
+ * qtwebkit_version.pri: Added.
+
+2010-05-02 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage::userAgentForUrl is terrible API
+ https://bugs.webkit.org/show_bug.cgi?id=33875
+
+ Simplify the creation of the user agent string to avoid some
+ overhead for each loaded url.
+
+ The static part of the user agent is cached so it only have
+ to be made once.
+ This creation has been made in order to simplify the code.
+
+ The two variable: application name and current language are
+ set dynamically when needed.
+ The default locale is non longer created if the widget locale
+ is used.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::userAgentApplicationName):
+ (tst_QWebPage::userAgentLocaleChange):
+
+2010-05-02 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsLayer: animation incorrect when scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=38371
+
+ This is a regression introduced with the invalidate-on-scroll code path, that uses QGraphicsWebViewPrivate::update()
+ instead of QGraphicsWebViewPrivate::scroll(). The patch makes sure that the scrolling position is correct on
+ each content update - this shouldn't have a performance impact - the only overhead is an additional value-test on each update.
+
+ Tested by http://www.the-art-of-web.com/css/css-animation/
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::update):
+
+2010-05-01 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add smart paste support
+
+ https://bugs.webkit.org/show_bug.cgi?id=38136
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate): Enable smart paste support by default.
+
+2010-04-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Reinstate qt_drt_ symbol exports as of QtWebKit 4.6 release
+ https://bugs.webkit.org/show_bug.cgi?id=38304
+
+ This change provides backward compatibility with some previously
+ exported private symbols. No new functionality introduced.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (qt_resumeActiveDOMObjects):
+ (qt_suspendActiveDOMObjects):
+ (qt_drt_clearFrameName):
+ (qt_drt_garbageCollector_collect):
+ (qt_drt_garbageCollector_collectOnAlternateThread):
+ (qt_drt_javaScriptObjectsCount):
+ (qt_drt_numberOfActiveAnimations):
+ (qt_drt_overwritePluginDirectories):
+ (qt_drt_pauseAnimation):
+ (qt_drt_pauseTransitionOfProperty):
+ (qt_drt_resetOriginAccessWhiteLists):
+ (qt_drt_run):
+ (qt_drt_setJavaScriptProfilingEnabled):
+ (qt_drt_whiteListAccessFromOrigin):
+ (qt_webpage_groupName):
+ (qt_webpage_setGroupName):
+
+2010-04-29 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Get rid of forceLayout() on FrameView
+ https://bugs.webkit.org/show_bug.cgi?id=38199
+
+ The function FrameView::forceLayout() is missleading
+ because it does not actually force the layout, the call is
+ equivalent to layout().
+
+ This patch replace the call to forceLayout() by layout() in Qt
+ to avoid the misunderstanding/improve readability.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ (QWebPage::setPreferredContentsSize):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setMediaType):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::forceLayout):
+
+2010-04-29 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Remove unnecessary call to FrameView::forceLayout() in setViewportSize()
+ This prevents a double relayout on resize.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38179
+
+ Thanks to Nate Whetsell <nathan.whetsell@gmail.com> for spotting this.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::setViewportSize):
+
+2010-04-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] REGRESSION(r57982): tst_qwebpage::showModalDialog() crashes
+ https://bugs.webkit.org/show_bug.cgi?id=38314
+
+ Make sure that there's always a main frame when returning from createWindow()
+ to the caller in WebCore.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createWindow):
+
+2010-04-28 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, Qt build fix.
+
+ [Qt] Guard the body of the function instead of the function for
+ exported functions.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::webInspectorExecuteScript):
+ (DumpRenderTreeSupportQt::webInspectorClose):
+ (DumpRenderTreeSupportQt::webInspectorShow):
+ (DumpRenderTreeSupportQt::setTimelineProfilingEnabled):
+
+2010-04-28 Antonio Gomes <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] tst_QWebHistoryInterface::visitedLinks() fails
+ https://bugs.webkit.org/show_bug.cgi?id=37323
+
+ Patch fixes styleProperty method of QWebElement to make use of
+ CSSComputedStyleDeclaration::computedStyle 'allowVisitedStyle' parameter
+ and the corresponding failing QWebHistoryInterface::visitedLinks method.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty):
+ * tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp:
+ (tst_QWebHistoryInterface::visitedLinks):
+
+2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Replacing method qt_wrt_setViewMode by wrt_viewMode property.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::wrt_viewModes):
+
+2010-04-28 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] WINS DEF file freeze
+
+ Updated WINSCW def file with added and removed symbols.
+
+ * symbian/bwins/QtWebKitu.def:
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate): Add call to initializeMainThread.
+
+2010-04-26 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the include header <qstring.h> -> <QtCore/qstring.h>
+
+ The module/header.h style inclusion removes the need to have -I$QTDIR/include/depending-module
+ in the include search path for the application.
+
+ * Api/qwebkitversion.h:
+
+2010-04-26 Bruno Schmidt <bruno.schmidt@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Exposing an QVariantMap containing QObjectStar to Javascript
+ causes Segmentation Fault
+ https://bugs.webkit.org/show_bug.cgi?id=34729
+
+ If an QVariantMap containing QObjectStar is added to the to QtWebkit
+ Javascript, it's use causes Segmentation Fault.
+ It happens because, in the case QMetaType::QVariantMap, the "root"
+ object that is inside of a PassRefPtr is passed recursively inside a
+ loop to recover the content of the map, but the PassRefPtr semantics
+ prohibit its use inside a loop, so the "root" object mus be passed
+ using the method "PassRefPtr::get" in order to keep the current
+ reference.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (MyQObject::MyQObject): new property variantMapProperty
+ (MyQObject::variantMapProperty): read variantMapProperty
+ (MyQObject::setVariantMapProperty): write variantMapProperty
+
+2010-04-25 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] layoutTestController.counterValueForElementById crashes for a nonexistent ID
+ https://bugs.webkit.org/show_bug.cgi?id=34573
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::counterValueForElementById):
+
+2010-04-20 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add more support for textInputController
+
+ Add support for selectedRange(), setMarkedText(), insertText(),
+ and firstRectForCharacterRange().
+
+ https://bugs.webkit.org/show_bug.cgi?id=35702
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::selectedRange):
+ (DumpRenderTreeSupportQt::firstRectForCharacterRange):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2010-04-22 John Pavan <john.pavan@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] inputMethodQuery returns coordinates in web page coordinates rather than in item coordinates.
+ https://bugs.webkit.org/show_bug.cgi?id=37163
+
+
+ QWebPage::inputMethodQuery is modified so that it
+ returns coordinates in the widget's coordinate system.
+ Tests are added for QGraphicsWebView and QWebView
+ to verify that this behavior is correct after the webpage
+ has been scrolled.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery):
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (tst_QGraphicsWebView::microFocusCoordinates):
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::microFocusCoordinates):
+
+2010-04-22 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix createPlugin() tests in tst_qwebpage to match behaviour of Qt plugins
+ when PluginsEnabled is false.
+
+ tst_qwebpage should have been updated as part of r56662.
+ (See https://bugs.webkit.org/show_bug.cgi?id=32196)
+
+ Updated documentation of QWebPage::createPlugin and QWebSetting::pluginsEnabled
+ to match the new behaviour.
+
+ * Api/qwebpage.cpp: Update docs.
+ * Api/qwebsettings.cpp: Update docs.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (createPlugin):
+ (tst_QWebPage::createPluginWithPluginsEnabled):
+ (tst_QWebPage::createPluginWithPluginsDisabled):
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidChangeIcons):
+ (WebCore::FrameLoaderClientQt::didChangeTitle):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove translatable strings from the hybridPixmap test.
+ https://bugs.webkit.org/show_bug.cgi?id=37867
+
+ * tests/hybridPixmap/widget.ui:
+
+2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix autotests .qrc file paths when built in Qt.
+
+ Compiling auto-tests from qt/tests/auto/qweb* produced
+ failing tests since these .pro files include the
+ ones in WebKit/qt/tests and the .qrc file was
+ not added to RESOURCES
+
+ * tests/benchmarks/loading/loading.pro:
+ * tests/benchmarks/painting/painting.pro:
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+ * tests/qwebelement/qwebelement.pro:
+ * tests/qwebframe/qwebframe.pro:
+ * tests/qwebhistory/qwebhistory.pro:
+ * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
+ * tests/qwebinspector/qwebinspector.pro:
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebplugindatabase/qwebplugindatabase.pro:
+ * tests/qwebview/qwebview.pro:
+ * tests/tests.pri:
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-04-21 Jesus Sanchez-Palencia <jesus@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add PageClientQWidget implementation based on the old
+ QWebPageWidgetClient to PageClientQt files. Also fix
+ QWebPage::setView() to use PageClientQWidget.
+
+ [Qt] PageClientQt specific implementation for QWidget
+ https://bugs.webkit.org/show_bug.cgi?id=37858
+
+ * Api/qwebpage.cpp:
+ (QWebPage::setView):
+ * WebCoreSupport/PageClientQt.cpp: Added.
+ (WebCore::PageClientQWidget::scroll):
+ (WebCore::PageClientQWidget::update):
+ (WebCore::PageClientQWidget::setInputMethodEnabled):
+ (WebCore::PageClientQWidget::inputMethodEnabled):
+ (WebCore::PageClientQWidget::setInputMethodHint):
+ (WebCore::PageClientQWidget::cursor):
+ (WebCore::PageClientQWidget::updateCursor):
+ (WebCore::PageClientQWidget::palette):
+ (WebCore::PageClientQWidget::screenNumber):
+ (WebCore::PageClientQWidget::ownerWidget):
+ (WebCore::PageClientQWidget::geometryRelativeToOwnerWidget):
+ (WebCore::PageClientQWidget::pluginParent):
+ (WebCore::PageClientQWidget::style):
+ * WebCoreSupport/PageClientQt.h: Added.
+ (WebCore::PageClientQWidget::PageClientQWidget):
+ (WebCore::PageClientQWidget::isQWidgetClient):
+
2010-04-21 Jakub Wieczorek <jwieczorek@webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 5ea072d..cf100f7 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -167,8 +167,12 @@ Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, cons
if (!newPage)
return 0;
+ // A call to QWebPage::mainFrame() implicitly creates the main frame.
+ // Make sure it exists, as WebCore expects it when returning from this call.
+ QWebFrame* mainFrame = newPage->mainFrame();
+
if (!request.isEmpty())
- newPage->mainFrame()->load(request.resourceRequest().url());
+ mainFrame->load(request.resourceRequest().url());
return newPage->d->page;
}
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 3f2e221..935be85 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -44,6 +44,7 @@
#if ENABLE(SVG)
#include "SVGSMILElement.h"
#endif
+#include "TextIterator.h"
#include "WorkerThread.h"
#include "qwebframe.h"
@@ -102,30 +103,36 @@ QString DumpRenderTreeSupportQt::webPageGroupName(QWebPage* page)
return page->handle()->page->groupName();
}
-#if ENABLE(INSPECTOR)
void DumpRenderTreeSupportQt::webInspectorExecuteScript(QWebPage* page, long callId, const QString& script)
{
+#if ENABLE(INSPECTOR)
if (!page->handle()->page->inspectorController())
return;
page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script);
+#endif
}
void DumpRenderTreeSupportQt::webInspectorClose(QWebPage* page)
{
+#if ENABLE(INSPECTOR)
if (!page->handle()->page->inspectorController())
return;
page->handle()->page->inspectorController()->close();
+#endif
}
void DumpRenderTreeSupportQt::webInspectorShow(QWebPage* page)
{
+#if ENABLE(INSPECTOR)
if (!page->handle()->page->inspectorController())
return;
page->handle()->page->inspectorController()->show();
+#endif
}
void DumpRenderTreeSupportQt::setTimelineProfilingEnabled(QWebPage* page, bool enabled)
{
+#if ENABLE(INSPECTOR)
InspectorController* controller = page->handle()->page->inspectorController();
if (!controller)
return;
@@ -133,9 +140,8 @@ void DumpRenderTreeSupportQt::setTimelineProfilingEnabled(QWebPage* page, bool e
controller->startTimelineProfiler();
else
controller->stopTimelineProfiler();
-}
-
#endif
+}
bool DumpRenderTreeSupportQt::hasDocumentElement(QWebFrame* frame)
{
@@ -264,8 +270,8 @@ QString DumpRenderTreeSupportQt::counterValueForElementById(QWebFrame* frame, co
{
Frame* coreFrame = QWebFramePrivate::core(frame);
if (Document* document = coreFrame->document()) {
- Element* element = document->getElementById(id);
- return WebCore::counterValueForElement(element);
+ if (Element* element = document->getElementById(id))
+ return WebCore::counterValueForElement(element);
}
return QString();
}
@@ -341,7 +347,7 @@ void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
coreFrame->document()->updateStyleSelector();
- view->forceLayout();
+ view->layout();
}
void DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled(QWebPage* page, bool enabled)
@@ -370,3 +376,129 @@ QString DumpRenderTreeSupportQt::markerTextForListItem(const QWebElement& listIt
{
return WebCore::markerTextForListItem(listItem.m_element);
}
+
+QVariantList DumpRenderTreeSupportQt::selectedRange(QWebPage* page)
+{
+ WebCore::Frame* frame = page->handle()->page->focusController()->focusedOrMainFrame();
+ QVariantList selectedRange;
+ RefPtr<Range> range = frame->selection()->toNormalizedRange().get();
+
+ Element* selectionRoot = frame->selection()->rootEditableElement();
+ Element* scope = selectionRoot ? selectionRoot : frame->document()->documentElement();
+
+ RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset());
+ ASSERT(testRange->startContainer() == scope);
+ int startPosition = TextIterator::rangeLength(testRange.get());
+
+ ExceptionCode ec;
+ testRange->setEnd(range->endContainer(), range->endOffset(), ec);
+ ASSERT(testRange->startContainer() == scope);
+ int endPosition = TextIterator::rangeLength(testRange.get());
+
+ selectedRange << startPosition << (endPosition - startPosition);
+
+ return selectedRange;
+
+}
+
+QVariantList DumpRenderTreeSupportQt::firstRectForCharacterRange(QWebPage* page, int location, int length)
+{
+ WebCore::Frame* frame = page->handle()->page->focusController()->focusedOrMainFrame();
+ QVariantList rect;
+
+ if ((location + length < location) && (location + length != 0))
+ length = 0;
+
+ Element* selectionRoot = frame->selection()->rootEditableElement();
+ Element* scope = selectionRoot ? selectionRoot : frame->document()->documentElement();
+ RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(scope, location, length);
+
+ if (!range)
+ return QVariantList();
+
+ QRect resultRect = frame->firstRectForRange(range.get());
+ rect << resultRect.x() << resultRect.y() << resultRect.width() << resultRect.height();
+ return rect;
+}
+
+// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
+
+void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
+{
+ DumpRenderTreeSupportQt::resumeActiveDOMObjects(frame);
+}
+
+void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* frame)
+{
+ DumpRenderTreeSupportQt::suspendActiveDOMObjects(frame);
+}
+
+void QWEBKIT_EXPORT qt_drt_clearFrameName(QWebFrame* frame)
+{
+ DumpRenderTreeSupportQt::clearFrameName(frame);
+}
+
+void QWEBKIT_EXPORT qt_drt_garbageCollector_collect()
+{
+ DumpRenderTreeSupportQt::garbageCollectorCollect();
+}
+
+void QWEBKIT_EXPORT qt_drt_garbageCollector_collectOnAlternateThread(bool waitUntilDone)
+{
+ DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(waitUntilDone);
+}
+
+int QWEBKIT_EXPORT qt_drt_javaScriptObjectsCount()
+{
+ return DumpRenderTreeSupportQt::javaScriptObjectsCount();
+}
+
+int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame* frame)
+{
+ return DumpRenderTreeSupportQt::numberOfActiveAnimations(frame);
+}
+
+void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
+{
+ DumpRenderTreeSupportQt::overwritePluginDirectories();
+}
+
+bool QWEBKIT_EXPORT qt_drt_pauseAnimation(QWebFrame* frame, const QString& animationName, double time, const QString& elementId)
+{
+ return DumpRenderTreeSupportQt::pauseAnimation(frame, animationName, time, elementId);
+}
+
+bool QWEBKIT_EXPORT qt_drt_pauseTransitionOfProperty(QWebFrame* frame, const QString& propertyName, double time, const QString &elementId)
+{
+ return DumpRenderTreeSupportQt::pauseTransitionOfProperty(frame, propertyName, time, elementId);
+}
+
+void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists()
+{
+ DumpRenderTreeSupportQt::resetOriginAccessWhiteLists();
+}
+
+void QWEBKIT_EXPORT qt_drt_run(bool b)
+{
+ DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(b);
+}
+
+void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* frame, bool enabled)
+{
+ DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(frame, enabled);
+}
+
+void QWEBKIT_EXPORT qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
+{
+ DumpRenderTreeSupportQt::whiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains);
+}
+
+QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page)
+{
+ return DumpRenderTreeSupportQt::webPageGroupName(page);
+}
+
+void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName)
+{
+ DumpRenderTreeSupportQt::webPageSetGroupName(page, groupName);
+}
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index b92b86a..c0187df 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -24,6 +24,7 @@
#define DumpRenderTreeSupportQt_h
#include "qwebkitglobal.h"
+#include <QVariant>
#include "qwebelement.h"
@@ -42,6 +43,8 @@ public:
static bool isCommandEnabled(QWebPage* page, const QString& name);
static void setSmartInsertDeleteEnabled(QWebPage* page, bool enabled);
static void setSelectTrailingWhitespaceEnabled(QWebPage* page, bool enabled);
+ static QVariantList selectedRange(QWebPage* page);
+ static QVariantList firstRectForCharacterRange(QWebPage* page, int location, int length);
static bool pauseAnimation(QWebFrame*, const QString& name, double time, const QString& elementId);
static bool pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId);
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index f93b1cc..a0b06fb 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -258,7 +258,7 @@ void FrameLoaderClientQt::forceLayout()
{
FrameView* view = m_frame->view();
if (view)
- view->forceLayout(true);
+ view->layout(true);
}
@@ -381,6 +381,19 @@ void FrameLoaderClientQt::dispatchDidReceiveTitle(const String& title)
}
+void FrameLoaderClientQt::dispatchDidChangeIcons()
+{
+ if (dumpFrameLoaderCallbacks)
+ printf("%s - didChangeIcons\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+
+ if (!m_webFrame)
+ return;
+
+ // FIXME: To be notified of changing icon URLS add notification
+ // emit iconsChanged();
+}
+
+
void FrameLoaderClientQt::dispatchDidCommitLoad()
{
if (dumpFrameLoaderCallbacks)
@@ -525,7 +538,7 @@ void FrameLoaderClientQt::willChangeTitle(DocumentLoader*)
}
-void FrameLoaderClientQt::didChangeTitle(DocumentLoader *)
+void FrameLoaderClientQt::didChangeTitle(DocumentLoader*)
{
// no need for, dispatchDidReceiveTitle is the right callback
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 2756871..9c968a0 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -109,6 +109,7 @@ namespace WebCore {
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&);
@@ -127,6 +128,7 @@ namespace WebCore {
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
virtual void dispatchDidLoadMainResource(DocumentLoader*);
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 7fabbda..a3dd9dd 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -88,12 +88,13 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*)
InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
inspectorView->setPage(inspectorPage);
- QUrl inspectorUrl = m_inspectedWebPage->settings()->inspectorUrl();
+ QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector();
+ QUrl inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
if (!inspectorUrl.isValid())
inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html");
inspectorView->page()->mainFrame()->load(inspectorUrl);
m_inspectedWebPage->d->inspectorFrontend = inspectorView;
- m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView);
+ inspector->d->setFrontend(inspectorView);
inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView));
}
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
new file mode 100644
index 0000000..611bab7
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
@@ -0,0 +1,106 @@
+/*
+ * 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 "config.h"
+
+#include "PageClientQt.h"
+
+#if defined(Q_WS_X11)
+#include <QX11Info>
+#endif
+
+namespace WebCore {
+
+void PageClientQWidget::scroll(int dx, int dy, const QRect& rectToScroll)
+{
+ view->scroll(qreal(dx), qreal(dy), rectToScroll);
+}
+
+void PageClientQWidget::update(const QRect & dirtyRect)
+{
+ view->update(dirtyRect);
+}
+
+void PageClientQWidget::setInputMethodEnabled(bool enable)
+{
+ view->setAttribute(Qt::WA_InputMethodEnabled, enable);
+}
+
+bool PageClientQWidget::inputMethodEnabled() const
+{
+ return view->testAttribute(Qt::WA_InputMethodEnabled);
+}
+
+#if QT_VERSION >= 0x040600
+void PageClientQWidget::setInputMethodHint(Qt::InputMethodHint hint, bool enable)
+{
+ if (enable)
+ view->setInputMethodHints(view->inputMethodHints() | hint);
+ else
+ view->setInputMethodHints(view->inputMethodHints() & ~hint);
+}
+#endif
+
+#ifndef QT_NO_CURSOR
+QCursor PageClientQWidget::cursor() const
+{
+ return view->cursor();
+}
+
+void PageClientQWidget::updateCursor(const QCursor& cursor)
+{
+ view->setCursor(cursor);
+}
+#endif
+
+QPalette PageClientQWidget::palette() const
+{
+ return view->palette();
+}
+
+int PageClientQWidget::screenNumber() const
+{
+#if defined(Q_WS_X11)
+ return view->x11Info().screen();
+#endif
+ return 0;
+}
+
+QWidget* PageClientQWidget::ownerWidget() const
+{
+ return view;
+}
+
+QRect PageClientQWidget::geometryRelativeToOwnerWidget() const
+{
+ return view->geometry();
+}
+
+QObject* PageClientQWidget::pluginParent() const
+{
+ return view;
+}
+
+QStyle* PageClientQWidget::style() const
+{
+ return view->style();
+}
+
+}
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
new file mode 100644
index 0000000..3f09564
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -0,0 +1,67 @@
+/*
+ * 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 PageClientQt_h
+#define PageClientQt_h
+
+#include "QWebPageClient.h"
+
+#include <QtGui/qwidget.h>
+
+
+namespace WebCore {
+
+class PageClientQWidget : public QWebPageClient {
+public:
+ PageClientQWidget(QWidget* view)
+ : view(view)
+ {
+ Q_ASSERT(view);
+ }
+
+ virtual bool isQWidgetClient() const { return true; }
+
+ virtual void scroll(int dx, int dy, const QRect&);
+ virtual void update(const QRect& dirtyRect);
+ virtual void setInputMethodEnabled(bool enable);
+ virtual bool inputMethodEnabled() const;
+#if QT_VERSION >= 0x040600
+ virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable);
+#endif
+
+#ifndef QT_NO_CURSOR
+ virtual QCursor cursor() const;
+ virtual void updateCursor(const QCursor& cursor);
+#endif
+
+ virtual QPalette palette() const;
+ virtual int screenNumber() const;
+ virtual QWidget* ownerWidget() const;
+ virtual QRect geometryRelativeToOwnerWidget() const;
+
+ virtual QObject* pluginParent() const;
+
+ virtual QStyle* style() const;
+
+ QWidget* view;
+};
+
+}
+#endif // PageClientQt
diff --git a/WebKit/qt/qtwebkit_version.pri b/WebKit/qt/qtwebkit_version.pri
new file mode 100644
index 0000000..1656f2d
--- /dev/null
+++ b/WebKit/qt/qtwebkit_version.pri
@@ -0,0 +1,4 @@
+QT_WEBKIT_VERSION = 4.8.0
+QT_WEBKIT_MAJOR_VERSION = 4
+QT_WEBKIT_MINOR_VERSION = 8
+QT_WEBKIT_PATCH_VERSION = 0
diff --git a/WebKit/qt/symbian/bwins/QtWebKitu.def b/WebKit/qt/symbian/bwins/QtWebKitu.def
index 086e986..729b97c 100644
--- a/WebKit/qt/symbian/bwins/QtWebKitu.def
+++ b/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -623,5 +623,30 @@ EXPORTS
?qt_networkAccessAllowed@@YAX_N@Z @ 622 NONAME ; void qt_networkAccessAllowed(bool)
?qt_resumeActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 623 NONAME ; void qt_resumeActiveDOMObjects(class QWebFrame *)
?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *)
- ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int)
+ ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ABSENT ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int)
+ ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ; void QWebInspector::closeEvent(class QCloseEvent *)
+ ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ABSENT ; class QUrl QWebSettings::inspectorUrl(void) const
+ ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const
+ ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ; void QWebFrame::pageChanged(void)
+ ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool)
+ ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &)
+ ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ; bool qt_drt_hasDocumentElement(class QWebFrame *)
+ ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ; int qt_drt_numberOfPages(class QWebFrame *, float, float)
+ ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float)
+ ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &)
+ ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &)
+ ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool)
+ ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ; void qt_drt_setMediaType(class QWebFrame *, class QString const &)
+ ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool)
+ ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ; void qt_drt_webinspector_close(class QWebPage *)
+ ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)
+ ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *)
+ ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void)
+ ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
+ ?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &)
+ ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const
+ ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &)
+ ?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ABSENT ; void QWebSettings::setInspectorUrl(class QUrl const &)
+ ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool)
+ ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool)
diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def
index 145fe0b..6ccaaa7 100644
--- a/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -650,7 +650,7 @@ EXPORTS
_ZlsR11QDataStreamRK11QWebHistory @ 649 NONAME
_ZrsR11QDataStreamR11QWebHistory @ 650 NONAME
_Z32qt_drt_whiteListAccessFromOriginRK7QStringS1_S1_b @ 651 NONAME
- _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME
+ _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME ABSENT
_Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME
_ZN11QWebElement17removeAllChildrenEv @ 654 NONAME
_ZN11QWebElement6renderEP8QPainter @ 655 NONAME
@@ -698,25 +698,25 @@ EXPORTS
_ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT
_ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME
_ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME
- _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME
- _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME
- _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME
- _Z24qt_drt_workerThreadCountv @ 703 NONAME
- _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME
- _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME
- _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME
- _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME
- _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME
- _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME
- _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME
- _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME
+ _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME ABSENT
+ _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME ABSENT
+ _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME ABSENT
+ _Z24qt_drt_workerThreadCountv @ 703 NONAME ABSENT
+ _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME ABSENT
+ _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME ABSENT
+ _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME ABSENT
+ _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME ABSENT
+ _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME ABSENT
+ _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME ABSENT
+ _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME ABSENT
+ _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME ABSENT
_ZN9QWebFrame11pageChangedEv @ 712 NONAME
_ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME
- _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME
+ _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT
_ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME
_ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
_ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
- _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME
- _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME
- _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME
- _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME
+ _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT
+ _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME ABSENT
+ _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME ABSENT
+ _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT
diff --git a/WebKit/qt/tests/benchmarks/loading/loading.pro b/WebKit/qt/tests/benchmarks/loading/loading.pro
index 024211f..99c64a5 100644
--- a/WebKit/qt/tests/benchmarks/loading/loading.pro
+++ b/WebKit/qt/tests/benchmarks/loading/loading.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../..
include(../../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/benchmarks/painting/painting.pro b/WebKit/qt/tests/benchmarks/painting/painting.pro
index b4fc56a..99c64a5 100644
--- a/WebKit/qt/tests/benchmarks/painting/painting.pro
+++ b/WebKit/qt/tests/benchmarks/painting/painting.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../..
-include(../../tests.pri) \ No newline at end of file
+include(../../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/hybridPixmap/widget.ui b/WebKit/qt/tests/hybridPixmap/widget.ui
index 4f2b3b8..272d6a7 100644
--- a/WebKit/qt/tests/hybridPixmap/widget.ui
+++ b/WebKit/qt/tests/hybridPixmap/widget.ui
@@ -11,14 +11,14 @@
</rect>
</property>
<property name="windowTitle">
- <string>Widget</string>
+ <string notr="true">Widget</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="WebView" name="webView" native="true">
<property name="url" stdset="0">
<url>
- <string>about:blank</string>
+ <string notr="true">about:blank</string>
</url>
</property>
</widget>
@@ -28,7 +28,7 @@
<item>
<widget class="QLabel" name="lbl1">
<property name="text">
- <string/>
+ <string notr="true"/>
</property>
</widget>
</item>
@@ -47,21 +47,21 @@
</size>
</property>
<property name="text">
- <string>Image from Qt to HTML</string>
+ <string notr="true">Image from Qt to HTML</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl3">
<property name="text">
- <string>Pixmap from Qt to HTML</string>
+ <string notr="true">Pixmap from Qt to HTML</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl4">
<property name="text">
- <string/>
+ <string notr="true"/>
</property>
</widget>
</item>
diff --git a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
+++ b/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 657e09f..14f5820 100644
--- a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -31,6 +31,7 @@ class tst_QGraphicsWebView : public QObject
private slots:
void qgraphicswebview();
void crashOnViewlessWebPages();
+ void microFocusCoordinates();
};
void tst_QGraphicsWebView::qgraphicswebview()
@@ -102,6 +103,40 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
}
+void tst_QGraphicsWebView::microFocusCoordinates()
+{
+ QWebPage* page = new QWebPage;
+ QGraphicsWebView* webView = new QGraphicsWebView;
+ 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));
+
+ page->mainFrame()->setHtml("<html><body>" \
+ "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \
+ "<canvas id='canvas1' width='500' height='500'/>" \
+ "<input type='password'/><br>" \
+ "<canvas id='canvas2' width='500' height='500'/>" \
+ "</body></html>");
+
+ page->mainFrame()->setFocus();
+
+ QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
+ QVERIFY(initialMicroFocus.isValid());
+
+ page->mainFrame()->scroll(0,300);
+
+ QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
+ QVERIFY(currentMicroFocus.isValid());
+
+ QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-300)), currentMicroFocus.toRect());
+
+ delete view;
+}
+
+
QTEST_MAIN(tst_QGraphicsWebView)
#include "tst_qgraphicswebview.moc"
diff --git a/WebKit/qt/tests/qwebelement/qwebelement.pro b/WebKit/qt/tests/qwebelement/qwebelement.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qwebelement/qwebelement.pro
+++ b/WebKit/qt/tests/qwebelement/qwebelement.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebframe/qwebframe.pro b/WebKit/qt/tests/qwebframe/qwebframe.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qwebframe/qwebframe.pro
+++ b/WebKit/qt/tests/qwebframe/qwebframe.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 5f5a2f2..bea7a67 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -57,6 +57,7 @@ class MyQObject : public QObject
Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty)
Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty)
Q_PROPERTY(QVariantList variantListProperty READ variantListProperty WRITE setVariantListProperty)
+ Q_PROPERTY(QVariantMap variantMapProperty READ variantMapProperty WRITE setVariantMapProperty)
Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty)
Q_PROPERTY(QStringList stringListProperty READ stringListProperty WRITE setStringListProperty)
Q_PROPERTY(QByteArray byteArrayProperty READ byteArrayProperty WRITE setByteArrayProperty)
@@ -106,7 +107,12 @@ public:
m_writeOnlyValue(789),
m_readOnlyValue(987),
m_objectStar(0),
- m_qtFunctionInvoked(-1) { }
+ m_qtFunctionInvoked(-1)
+ {
+ m_variantMapValue.insert("a", QVariant(123));
+ m_variantMapValue.insert("b", QVariant(QLatin1String("foo")));
+ m_variantMapValue.insert("c", QVariant::fromValue<QObject*>(this));
+ }
~MyQObject() { }
@@ -131,6 +137,13 @@ public:
m_variantListValue = value;
}
+ QVariantMap variantMapProperty() const {
+ return m_variantMapValue;
+ }
+ void setVariantMapProperty(const QVariantMap &value) {
+ m_variantMapValue = value;
+ }
+
QString stringProperty() const {
return m_stringValue;
}
@@ -483,6 +496,7 @@ private:
int m_intValue;
QVariant m_variantValue;
QVariantList m_variantListValue;
+ QVariantMap m_variantMapValue;
QString m_stringValue;
QStringList m_stringListValue;
QByteArray m_byteArrayValue;
@@ -759,6 +773,21 @@ void tst_QWebFrame::getSetStaticProperty()
{
QString type;
+ QVariant ret = evalJSV("myObject.variantMapProperty", type);
+ QCOMPARE(type, sObject);
+ QCOMPARE(ret.type(), QVariant::Map);
+ QVariantMap vm = ret.value<QVariantMap>();
+ QCOMPARE(vm.size(), 3);
+ QCOMPARE(vm.value("a").toInt(), 123);
+ QCOMPARE(vm.value("b").toString(), QLatin1String("foo"));
+ QCOMPARE(vm.value("c").value<QObject*>(), m_myObject);
+ }
+ QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue);
+ QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue);
+ QCOMPARE(evalJS("myObject.variantMapProperty.c.variantMapProperty.b === 'foo'"), sTrue);
+
+ {
+ QString type;
QVariant ret = evalJSV("myObject.stringListProperty", type);
QCOMPARE(type, sArray);
QCOMPARE(ret.type(), QVariant::List);
diff --git a/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qwebhistory/qwebhistory.pro
+++ b/WebKit/qt/tests/qwebhistory/qwebhistory.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
+++ b/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp b/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
index 435cada..84b12d2 100644
--- a/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
+++ b/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
@@ -23,6 +23,7 @@
#include <qwebpage.h>
#include <qwebview.h>
#include <qwebframe.h>
+#include <qwebelement.h>
#include <qwebhistoryinterface.h>
#include <QDebug>
@@ -85,9 +86,10 @@ public:
void tst_QWebHistoryInterface::visitedLinks()
{
QWebHistoryInterface::setDefaultInterface(new FakeHistoryImplementation);
- m_view->setHtml("<html><body><a href='http://www.trolltech.com'>Trolltech</a></body></html>");
- QCOMPARE(m_page->mainFrame()->evaluateJavaScript("document.querySelectorAll(':visited').length;").toString(),
- QString::fromLatin1("1"));
+ m_view->setHtml("<html><style>:link{color:green}:visited{color:red}</style><body><a href='http://www.trolltech.com' id='vlink'>Trolltech</a></body></html>");
+ QWebElement anchor = m_view->page()->mainFrame()->findFirstElement("a[id=vlink]");
+ QString linkColor = anchor.styleProperty("color", QWebElement::ComputedStyle);
+ QCOMPARE(linkColor, QString::fromLatin1("rgb(255, 0, 0)"));
}
QTEST_MAIN(tst_QWebHistoryInterface)
diff --git a/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/WebKit/qt/tests/qwebinspector/qwebinspector.pro
index ac51929..e915d60 100644
--- a/WebKit/qt/tests/qwebinspector/qwebinspector.pro
+++ b/WebKit/qt/tests/qwebinspector/qwebinspector.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebpage/qwebpage.pro b/WebKit/qt/tests/qwebpage/qwebpage.pro
index d056014..e915d60 100644
--- a/WebKit/qt/tests/qwebpage/qwebpage.pro
+++ b/WebKit/qt/tests/qwebpage/qwebpage.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
-include(../tests.pri) \ No newline at end of file
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index c857b00..795216d 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -24,6 +24,7 @@
#include <QDir>
#include <QGraphicsWidget>
#include <QLineEdit>
+#include <QLocale>
#include <QMenu>
#include <QPushButton>
#include <QtTest/QtTest>
@@ -81,7 +82,8 @@ private slots:
void modified();
void contextMenuCrash();
void database();
- void createPlugin();
+ void createPluginWithPluginsEnabled();
+ void createPluginWithPluginsDisabled();
void destroyPlugin_data();
void destroyPlugin();
void createViewlessPlugin_data();
@@ -106,6 +108,10 @@ private slots:
void errorPageExtension();
void errorPageExtensionInIFrames();
void errorPageExtensionInFrameset();
+ void userAgentApplicationName();
+ void userAgentLocaleChange();
+
+ void viewModes();
void crashTests_LazyInitializationOfMainFrame();
@@ -354,6 +360,21 @@ void tst_QWebPage::userStyleSheet()
QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png"));
}
+void tst_QWebPage::viewModes()
+{
+ m_view->setHtml("<body></body>");
+ m_page->setProperty("_q_viewMode", "minimized");
+
+ QVariant empty = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode)\")");
+ QVERIFY(empty.type() == QVariant::Bool && empty.toBool());
+
+ QVariant minimized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: minimized)\")");
+ QVERIFY(minimized.type() == QVariant::Bool && minimized.toBool());
+
+ QVariant maximized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: maximized)\")");
+ QVERIFY(maximized.type() == QVariant::Bool && !maximized.toBool());
+}
+
void tst_QWebPage::modified()
{
m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>blub"));
@@ -519,27 +540,20 @@ protected:
}
};
-void tst_QWebPage::createPlugin()
+static void createPlugin(QWebView *view)
{
- QSignalSpy loadSpy(m_view, SIGNAL(loadFinished(bool)));
+ QSignalSpy loadSpy(view, SIGNAL(loadFinished(bool)));
- PluginPage* newPage = new PluginPage(m_view);
- m_view->setPage(newPage);
+ PluginPage* newPage = new PluginPage(view);
+ view->setPage(newPage);
- // plugins not enabled by default, so the plugin shouldn't be loaded
- m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
+ // type has to be application/x-qt-plugin
+ view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>"));
QTRY_COMPARE(loadSpy.count(), 1);
QCOMPARE(newPage->calls.count(), 0);
- m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
-
- // type has to be application/x-qt-plugin
- m_view->setHtml(QString("<html><body><object type='application/x-foobarbaz' classid='pushbutton' id='mybutton'/></body></html>"));
+ view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
QTRY_COMPARE(loadSpy.count(), 2);
- QCOMPARE(newPage->calls.count(), 0);
-
- m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
- QTRY_COMPARE(loadSpy.count(), 3);
QCOMPARE(newPage->calls.count(), 1);
{
PluginPage::CallInfo ci = newPage->calls.takeFirst();
@@ -570,11 +584,11 @@ void tst_QWebPage::createPlugin()
QCOMPARE(newPage->mainFrame()->evaluateJavaScript("mybutton.clicked.toString()").toString(),
QString::fromLatin1("function clicked() {\n [native code]\n}"));
- m_view->setHtml(QString("<html><body><table>"
+ view->setHtml(QString("<html><body><table>"
"<tr><object type='application/x-qt-plugin' classid='lineedit' id='myedit'/></tr>"
"<tr><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></tr>"
"</table></body></html>"), QUrl("http://foo.bar.baz"));
- QTRY_COMPARE(loadSpy.count(), 4);
+ QTRY_COMPARE(loadSpy.count(), 3);
QCOMPARE(newPage->calls.count(), 2);
{
PluginPage::CallInfo ci = newPage->calls.takeFirst();
@@ -606,14 +620,22 @@ void tst_QWebPage::createPlugin()
QVERIFY(ci.returnValue != 0);
QVERIFY(ci.returnValue->inherits("QPushButton"));
}
+}
- m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, false);
-
- m_view->setHtml(QString("<html><body><object type='application/x-qt-plugin' classid='pushbutton' id='mybutton'/></body></html>"));
- QTRY_COMPARE(loadSpy.count(), 5);
- QCOMPARE(newPage->calls.count(), 0);
+void tst_QWebPage::createPluginWithPluginsEnabled()
+{
+ m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ createPlugin(m_view);
}
+void tst_QWebPage::createPluginWithPluginsDisabled()
+{
+ // Qt Plugins should be loaded by QtWebKit even when PluginsEnabled is
+ // false. The client decides whether a Qt plugin is enabled or not when
+ // it decides whether or not to instantiate it.
+ m_view->settings()->setAttribute(QWebSettings::PluginsEnabled, false);
+ createPlugin(m_view);
+}
// Standard base class for template PluginTracerPage. In tests it is used as interface.
class PluginCounterPage : public QWebPage {
@@ -1404,11 +1426,16 @@ void tst_QWebPage::inputMethods()
QString selectionValue = variant.value<QString>();
QCOMPARE(selectionValue, QString("eb"));
- //Set selection with negative length
- inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
+ //Cancel current composition first
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
QInputMethodEvent eventSelection2("",inputAttributes);
page->event(&eventSelection2);
+ //Set selection with negative length
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
+ QInputMethodEvent eventSelection3("",inputAttributes);
+ page->event(&eventSelection3);
+
//ImAnchorPosition
variant = page->inputMethodQuery(Qt::ImAnchorPosition);
anchorPosition = variant.toInt();
@@ -1741,6 +1768,38 @@ void tst_QWebPage::errorPageExtensionInFrameset()
m_view->setPage(0);
}
+class FriendlyWebPage : public QWebPage
+{
+public:
+ friend class tst_QWebPage;
+};
+
+void tst_QWebPage::userAgentApplicationName()
+{
+ const QString oldApplicationName = QCoreApplication::applicationName();
+ FriendlyWebPage page;
+
+ const QString applicationNameMarker = QString::fromUtf8("StrangeName\342\210\236");
+ QCoreApplication::setApplicationName(applicationNameMarker);
+ QVERIFY(page.userAgentForUrl(QUrl()).contains(applicationNameMarker));
+
+ QCoreApplication::setApplicationName(oldApplicationName);
+}
+
+void tst_QWebPage::userAgentLocaleChange()
+{
+ FriendlyWebPage page;
+ m_view->setPage(&page);
+
+ const QString markerString = QString::fromLatin1(" nn-NO)");
+
+ if (page.userAgentForUrl(QUrl()).contains(markerString))
+ QSKIP("marker string already present", SkipSingle);
+
+ m_view->setLocale(QLocale(QString::fromLatin1("nn_NO")));
+ QVERIFY(page.userAgentForUrl(QUrl()).contains(markerString));
+}
+
void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
{
{
diff --git a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
index ac51929..e915d60 100644
--- a/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
+++ b/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
@@ -1,2 +1,3 @@
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebview/qwebview.pro b/WebKit/qt/tests/qwebview/qwebview.pro
index 4ca2bf6..e915d60 100644
--- a/WebKit/qt/tests/qwebview/qwebview.pro
+++ b/WebKit/qt/tests/qwebview/qwebview.pro
@@ -1 +1,3 @@
-include(../tests.pri) \ No newline at end of file
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri)
+exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index ebcf4bb..100399e 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -48,6 +48,7 @@ private slots:
void reusePage_data();
void reusePage();
+ void microFocusCoordinates();
void crashTests();
};
@@ -203,6 +204,31 @@ void tst_QWebView::crashTests()
QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed.
}
+void tst_QWebView::microFocusCoordinates()
+{
+ QWebPage* page = new QWebPage;
+ QWebView* webView = new QWebView;
+ webView->setPage( page );
+
+ page->mainFrame()->setHtml("<html><body>" \
+ "<input type='text' id='input1' style='font--family: serif' value='' maxlength='20'/><br>" \
+ "<canvas id='canvas1' width='500' height='500'/>" \
+ "<input type='password'/><br>" \
+ "<canvas id='canvas2' width='500' height='500'/>" \
+ "</body></html>");
+
+ page->mainFrame()->setFocus();
+
+ QVariant initialMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
+ QVERIFY(initialMicroFocus.isValid());
+
+ page->mainFrame()->scroll(0,50);
+
+ QVariant currentMicroFocus = page->inputMethodQuery(Qt::ImMicroFocus);
+ QVERIFY(currentMicroFocus.isValid());
+
+ QCOMPARE(initialMicroFocus.toRect().translated(QPoint(0,-50)), currentMicroFocus.toRect());
+}
QTEST_MAIN(tst_QWebView)
#include "tst_qwebview.moc"
diff --git a/WebKit/qt/tests/tests.pri b/WebKit/qt/tests/tests.pri
index 0bdf6f6..525e662 100644
--- a/WebKit/qt/tests/tests.pri
+++ b/WebKit/qt/tests/tests.pri
@@ -2,14 +2,13 @@ TEMPLATE = app
CONFIG -= app_bundle
VPATH += $$_PRO_FILE_PWD_
+# Add the tst_ prefix, In QTDIR_build it's done by qttest_p4.prf
!CONFIG(QTDIR_build):TARGET = tst_$$TARGET
SOURCES += $${TARGET}.cpp
INCLUDEPATH += \
$$PWD \
$$PWD/../Api
-exists($$_PRO_FILE_PWD_/$${TARGET}.qrc):RESOURCES += $$_PRO_FILE_PWD_/$${TARGET}.qrc
-
include(../../../WebKit.pri)
QT += testlib network
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 287a9be..c342ab0 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,269 @@
+2010-05-06 Adam Roben <aroben@apple.com>
+
+ Bail out of WebView::paint when there's nothing to paint
+
+ Fixes <http://webkit.org/b/38670> <rdar://problem/7947105> REGRESSION
+ (r58067): Crash in WebView::paint when Web Inspector is docked and
+ window is resized so small that WebView disappears
+
+ When the WebView is 0-sized, ensureBackingStore() bails out without
+ creating a bitmap, leaving m_backingStoreBitmap null. Before r58067,
+ m_backingStoreBitmap was an HBITMAP, so we were happily passing along
+ a null HBITMAP to various Windows APIs. These calls would fail but not
+ crash. r58067 changed m_backingStoreBitmap to a RefCountedHBITMAP, and
+ dereferencing a null RefCountedHBITMAP* of course crashes.
+
+ Reviewed by Steve Falkenburg.
+
+ * WebView.cpp:
+ (WebView::paint): Bail if the rect to paint is empty.
+
+2010-05-06 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebFrame::paintDocumentRectToContext paints content at the wrong location
+ https://bugs.webkit.org/show_bug.cgi?id=38651
+
+ * WebFrame.cpp:
+ (WebFrame::paintDocumentRectToContext):
+
+2010-05-05 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Update setFocus for the new boolean argument; no behavioral change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37961
+
+ * WebCoreSupport/EmbeddedWidget.cpp:
+ (EmbeddedWidget::setFocus):
+ * WebCoreSupport/EmbeddedWidget.h:
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::javaScriptCanAccessClipboard):
+ (WebPreferences::setJavaScriptCanAccessClipboard):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebFrame.h:
+
+2010-04-30 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Caret may fail to blink if a focus handler brings up a modal dialog
+ https://bugs.webkit.org/show_bug.cgi?id=38372
+
+ Reviewed by Darin Adler.
+
+ * WebView.cpp:
+ (WebView::handleMouseEvent):
+ If the message is WM_CANCELMODE, which indicates that we our capturing
+ of mouse events has been cancelled, tell the EventHandler.
+ It's possible to re-enter this function if handling a mouse event allows
+ the message loop to run; moved up the call to setMouseActivated(), so
+ that if we do re-enter this function, the later mouse event will not be
+ considered as activating the window.
+ (WebView::WebViewWndProc):
+ Handle WM_CANCELMODE by calling handleMouseEvent().
+
+2010-04-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ First part of
+ https://bugs.webkit.org/show_bug.cgi?id=20784
+ move npapi.h to C99 integer types.
+
+ * WebKit.vcproj/WebKit.vcproj:
+
+2010-04-28 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/7474349>
+
+ Add a synchronous display mechanism for WKCACFLayerRenderer.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * Interfaces/WebKit.idl:
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::updateRootLayerContents):
+ (WebView::nextDisplayIsSynchronous):
+ * WebView.h:
+
+2010-04-28 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ WebView drawing code may access null backing store dirty region
+ https://bugs.webkit.org/show_bug.cgi?id=38245
+ <rdar://problem/7916101> REGRESSION (r58067): All loaded pages fail to display after running iBench HTML test (intermittent)
+
+ * WebView.cpp:
+ (WebView::updateBackingStore): Add null check for m_backingStoreDirtyRegion.
+
+2010-04-27 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7911140> Hitting the "delete" key goes back twice
+
+ Reviewed by Maciej Stachowiak.
+
+ * WebView.cpp:
+ (WebView::keyDown):
+ Return true if we navigated back or forward from the key event to
+ prevent the event from being propagated further.
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * WebKitClassFactory.cpp:
+ (WebKitClassFactory::WebKitClassFactory): Add call to initializeMainThread.
+ * WebView.cpp:
+ (WebView::WebView): Ditto.
+
+2010-04-25 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: inspector client shouldn't check if it can be opened
+ docked if it is already in that state.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37946
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::showWindowWithoutNotifications):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-04-24 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Typo in Geolocation code causes crashes when updates are stopped
+ https://bugs.webkit.org/show_bug.cgi?id=38089
+ <rdar://problem/7904104> Crash closing geolocation tab after allowing to use geolocation
+
+ * WebCoreSupport/WebGeolocationControllerClient.cpp:
+ (WebGeolocationControllerClient::stopUpdating): Call unregister instead of register.
+
+2010-04-23 Andy Estes <aestes@apple.com>
+
+ Rubber stamped by Steve Falkenburg.
+
+ Roll out http://trac.webkit.org/changeset/55385.
+
+ <rdar://problem/7884444>
+
+ * Interfaces/IWebUIDelegatePrivate.idl:
+ * Interfaces/WebKit.idl:
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::createPlugin):
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * Interfaces/IWebFrameLoadDelegatePrivate2.idl:
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::dispatchDidChangeIcons):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebFrame.cpp:
+ (WebFrame::didChangeIcons):
+ * WebFrame.h:
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::javaScriptCanAccessClipboard):
+ (WebPreferences::setJavaScriptCanAccessClipboard):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-04-21 Andy Estes <aestes@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Reference count WebView's backing store bitmap to prevent
+ deleteBackingStore() from freeing the bitmap while it is still being
+ referenced by Core Animation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37954
+
+ * WebView.cpp:
+ (WebView::ensureBackingStore):
+ (WebView::addToDirtyRegion):
+ (WebView::scrollBackingStore):
+ (WebView::updateBackingStore):
+ (WebView::paint):
+ (WebView::backingStore):
+ (releaseBackingStoreCallback): deref m_backingStoreBitmap once Core
+ Animation has dropeed its reference to the memory.
+ (WebView::updateRootLayerContents): ref m_backingStoreBitmap before
+ passing the memory to Core Animation to prevent deleteBackingStore()
+ from freeing it while it is still referenced by CA.
+ * WebView.h: Make m_backingStoreBitmap a RefCountedGDIHandle<HBITMAP>,
+ and make m_backingStoreDirtyRegion a RefCountedGDIHandle<HRGN>.
+
2010-04-20 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate2.idl b/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate2.idl
index 7e07c55..b1eb87a 100644
--- a/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate2.idl
+++ b/WebKit/win/Interfaces/IWebFrameLoadDelegatePrivate2.idl
@@ -52,4 +52,5 @@ interface IWebFrameLoadDelegatePrivate2 : IWebFrameLoadDelegatePrivate
HRESULT didPushStateWithinPageForFrame([in] IWebView* webView, [in] IWebFrame* frame);
HRESULT didReplaceStateWithinPageForFrame([in] IWebView* webView, [in] IWebFrame* frame);
HRESULT didPopStateWithinPageForFrame([in] IWebView* webView, [in] IWebFrame* frame);
+ HRESULT didChangeIcons([in] IWebView* webView, [in] IWebFrame* frame);
}
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index 76ee3fa..2cb4037 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -109,4 +109,7 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setShowRepaintCounter([in] BOOL);
HRESULT showRepaintCounter([out, retval] BOOL*);
+
+ HRESULT javaScriptCanAccessClipboard([out, retval] BOOL *enabled);
+ HRESULT setJavaScriptCanAccessClipboard([in] BOOL enabled);
}
diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
index d9702de..215c427 100755
--- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
+++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
@@ -33,7 +33,6 @@ import "IWebView.idl";
cpp_quote("#define WebEmbeddedViewAttributesKey TEXT(\"WebEmbeddedViewAttributesKey\")")
cpp_quote("#define WebEmbeddedViewBaseURLKey TEXT(\"WebEmbeddedViewBaseURLKey\")")
-cpp_quote("#define WebEmbeddedViewSourceURLKey TEXT(\"WebEmbeddedViewSourceURLKey\")")
cpp_quote("#define WebEmbeddedViewContainingElementKey TEXT(\"WebEmbeddedViewContainingElementKey\")")
cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\")")
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 17378ce..77ef4ac 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -231,4 +231,6 @@ interface IWebViewPrivate : IUnknown
HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme);
HRESULT registerURLSchemeAsSecure([in] BSTR scheme);
+
+ HRESULT nextDisplayIsSynchronous();
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index d25cdfe..98f5da8 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -300,3 +300,4 @@ library WebKit
[default] interface IWebUserContentURLPattern;
}
}
+
diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
index 463a986..371ff3a 100644
--- a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
+++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
@@ -133,12 +133,12 @@ void EmbeddedWidget::frameRectsChanged()
}
}
-void EmbeddedWidget::setFocus()
+void EmbeddedWidget::setFocus(bool focused)
{
- if (m_window)
+ if (m_window && focused)
SetFocus(m_window);
- Widget::setFocus();
+ Widget::setFocus(focused);
}
void EmbeddedWidget::show()
diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.h b/WebKit/win/WebCoreSupport/EmbeddedWidget.h
index 7930e0f..ccd3451 100644
--- a/WebKit/win/WebCoreSupport/EmbeddedWidget.h
+++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.h
@@ -62,7 +62,7 @@ private:
virtual void invalidateRect(const WebCore::IntRect&);
virtual void setFrameRect(const WebCore::IntRect&);
virtual void frameRectsChanged();
- virtual void setFocus();
+ virtual void setFocus(bool);
virtual void show();
virtual void hide();
virtual WebCore::IntRect windowClipRect() const;
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index fc75ea4..48f7f3b 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -372,6 +372,20 @@ void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title)
frameLoadDelegate->didReceiveTitle(webView, BString(title), m_webFrame);
}
+void WebFrameLoaderClient::dispatchDidChangeIcons()
+{
+ WebView* webView = m_webFrame->webView();
+ COMPtr<IWebFrameLoadDelegatePrivate> frameLoadDelegatePriv;
+ if (FAILED(webView->frameLoadDelegatePrivate(&frameLoadDelegatePriv)) || !frameLoadDelegatePriv)
+ return;
+
+ COMPtr<IWebFrameLoadDelegatePrivate2> frameLoadDelegatePriv2(Query, frameLoadDelegatePriv);
+ if (!frameLoadDelegatePriv2)
+ return;
+
+ frameLoadDelegatePriv2->didChangeIcons(webView, m_webFrame);
+}
+
void WebFrameLoaderClient::dispatchDidCommitLoad()
{
WebView* webView = m_webFrame->webView();
@@ -837,8 +851,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize,
HashMap<String, COMVariant> arguments;
arguments.set(WebEmbeddedViewAttributesKey, viewArgumentsBag);
- arguments.set(WebEmbeddedViewSourceURLKey, url.string());
- arguments.set(WebEmbeddedViewBaseURLKey, element->document()->baseURI().string());
+ arguments.set(WebEmbeddedViewBaseURLKey, url.string());
arguments.set(WebEmbeddedViewContainingElementKey, containingElement);
arguments.set(WebEmbeddedViewMIMETypeKey, mimeType);
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index 0d89b2a..97d9a34 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -71,6 +71,7 @@ public:
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
virtual void dispatchDidReceiveTitle(const WebCore::String&);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFinishDocumentLoad();
virtual void dispatchDidFinishLoad();
diff --git a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp
index db5ed90..daacd6c 100644
--- a/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebGeolocationControllerClient.cpp
@@ -55,7 +55,7 @@ void WebGeolocationControllerClient::stopUpdating()
COMPtr<IWebGeolocationProvider> provider;
if (FAILED(m_webView->geolocationProvider(&provider)))
return;
- provider->registerWebView(m_webView.get());
+ provider->unregisterWebView(m_webView.get());
}
GeolocationPosition* WebGeolocationControllerClient::lastPosition()
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 16ad172..3c263e5 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -213,7 +213,6 @@ WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView
, m_frontendHwnd(frontendHwnd)
, m_frontendWebView(frontendWebView)
, m_frontendWebViewHwnd(frontendWebViewHwnd)
- , m_shouldAttachWhenShown(false)
, m_attached(false)
, m_destroyingInspectorView(false)
{
@@ -354,14 +353,19 @@ void WebInspectorFrontendClient::showWindowWithoutNotifications()
ASSERT(m_frontendWebView);
ASSERT(m_inspectedWebViewHwnd);
- // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
- m_shouldAttachWhenShown = shouldAttach != "false";
-
- if (m_shouldAttachWhenShown && !canAttachWindow())
- m_shouldAttachWhenShown = false;
-
- if (!m_shouldAttachWhenShown) {
+ bool shouldAttach = false;
+ if (m_attached)
+ shouldAttach = true;
+ else {
+ // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
+ String shouldAttachPref = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
+ shouldAttach = shouldAttachPref != "false";
+
+ if (shouldAttach && !canAttachWindow())
+ shouldAttach = false;
+ }
+
+ if (!shouldAttach) {
// Put the Inspector's WebView inside our window and show it.
m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd));
SendMessage(m_frontendHwnd, WM_SIZE, 0, 0);
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h
index 455e3a1..64773a5 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h
@@ -112,7 +112,6 @@ private:
COMPtr<WebView> m_frontendWebView;
HWND m_frontendWebViewHwnd;
- bool m_shouldAttachWhenShown;
bool m_attached;
WebCore::String m_inspectedURL;
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 01cc2b1..3d9c8a8 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -346,13 +346,8 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
GraphicsContext gc(dc);
gc.setShouldIncludeChildWindows(true);
gc.save();
- LONG width = rect.right - rect.left;
- LONG height = rect.bottom - rect.top;
- FloatRect dirtyRect;
- dirtyRect.setWidth(width);
- dirtyRect.setHeight(height);
+ IntRect dirtyRect(rect);
gc.clip(dirtyRect);
- gc.translate(-rect.left, -rect.top);
view->paintContents(&gc, rect);
gc.restore();
@@ -1544,6 +1539,11 @@ void WebFrame::didChangeTitle(DocumentLoader*)
notImplemented();
}
+void WebFrame::didChangeIcons(DocumentLoader*)
+{
+ notImplemented();
+}
+
bool WebFrame::canHandleRequest(const ResourceRequest& request) const
{
return WebView::canHandleRequest(request);
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index 0f1e4d8..d053d3b 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -286,11 +286,13 @@ public:
virtual void detachedFromParent2();
virtual void detachedFromParent3();
virtual void cancelPolicyCheck();
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainFrameDocumentReady(bool);
virtual void willChangeTitle(WebCore::DocumentLoader*);
virtual void didChangeTitle(WebCore::DocumentLoader*);
+ virtual void didChangeIcons(WebCore::DocumentLoader*);
virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
virtual bool canShowMIMEType(const WebCore::String& MIMEType) const;
virtual bool representationExistsForURLScheme(const WebCore::String& URLScheme) const;
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 36345ed..76b5e7b 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -88,7 +88,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -165,7 +165,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -242,7 +242,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -319,7 +319,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -398,7 +398,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -475,7 +475,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebLocalizableStrings.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitGraphics.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebKitCOMAPI.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\WebPreferenceKeysPrivate.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npapi.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npfunctions.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\npruntime_internal.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\include\WebCore\nptypes.h&quot; &quot;$(WebKitOutputDir)\include\WebKit&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\..\English.lproj\Localizable.strings&quot; &quot;$(OutDir)\WebKit.resources\en.lproj\&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp
index 8a956e3..0e6a689 100644
--- a/WebKit/win/WebKitClassFactory.cpp
+++ b/WebKit/win/WebKitClassFactory.cpp
@@ -57,10 +57,9 @@
#include "WebUserContentURLPattern.h"
#include "WebView.h"
#include "WebWorkersPrivate.h"
-#pragma warning(push, 0)
#include <JavaScriptCore/InitializeThreading.h>
#include <WebCore/SoftLinking.h>
-#pragma warning(pop)
+#include <wtf/Threading.h>
// WebKitClassFactory ---------------------------------------------------------
#if USE(SAFARI_THEME)
@@ -87,6 +86,7 @@ WebKitClassFactory::WebKitClassFactory(CLSID targetClass)
#endif
JSC::initializeThreading();
+ WTF::initializeMainThread();
gClassCount++;
gClassNameCount.add("WebKitClassFactory");
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index c57934c..c49a96d 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -125,6 +125,8 @@
#define WebKitZoomsTextOnlyPreferenceKey "WebKitZoomsTextOnly"
+#define WebKitJavaScriptCanAccessClipboardPreferenceKey "WebKitJavaScriptCanAccessClipboard"
+
#define WebKitXSSAuditorEnabledPreferenceKey "WebKitXSSAuditorEnabled"
#define WebKitUseHighResolutionTimersPreferenceKey "WebKitUseHighResolutionTimers"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index b5937cb..33e904d 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -206,6 +206,7 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitWebSecurityEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanAccessClipboardPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue);
@@ -809,6 +810,20 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setAllowFileAccessFromFileURLs(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebPreferences::javaScriptCanAccessClipboard(
+ /* [retval][out] */ BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitJavaScriptCanAccessClipboardPreferenceKey));
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setJavaScriptCanAccessClipboard(
+ /* [in] */ BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitJavaScriptCanAccessClipboardPreferenceKey), enabled);
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebPreferences::isXSSAuditorEnabled(
/* [retval][out] */ BOOL* enabled)
{
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index 241178d..cfdefa8 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -368,6 +368,12 @@ public:
virtual HRESULT STDMETHODCALLTYPE setAllowFileAccessFromFileURLs(
/* [in] */ BOOL allowAccess);
+ virtual HRESULT STDMETHODCALLTYPE javaScriptCanAccessClipboard(
+ /* [retval][out] */ BOOL* enabled);
+
+ virtual HRESULT STDMETHODCALLTYPE setJavaScriptCanAccessClipboard(
+ /* [in] */ BOOL enabled);
+
virtual HRESULT STDMETHODCALLTYPE isXSSAuditorEnabled(
/* [retval][out] */ BOOL* enabled);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index da2c436..3a6a51f 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -123,6 +123,7 @@
#include <WebCore/SimpleFontData.h>
#include <WebCore/TypingCommand.h>
#include <WebCore/WindowMessageBroadcaster.h>
+#include <wtf/Threading.h>
#if ENABLE(CLIENT_BASED_GEOLOCATION)
#include <WebCore/GeolocationController.h>
@@ -340,8 +341,10 @@ WebView::WebView()
#if USE(ACCELERATED_COMPOSITING)
, m_isAcceleratedCompositing(false)
#endif
+ , m_nextDisplayIsSynchronous(false)
{
JSC::initializeThreading();
+ WTF::initializeMainThread();
m_backingStoreSize.cx = m_backingStoreSize.cy = 0;
@@ -758,7 +761,7 @@ bool WebView::ensureBackingStore()
BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(m_backingStoreSize));
void* pixels = NULL;
- m_backingStoreBitmap.set(::CreateDIBSection(NULL, &bitmapInfo, DIB_RGB_COLORS, &pixels, NULL, 0));
+ m_backingStoreBitmap = RefCountedHBITMAP::create(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
return true;
}
@@ -782,11 +785,11 @@ void WebView::addToDirtyRegion(HRGN newRegion)
if (m_backingStoreDirtyRegion) {
HRGN combinedRegion = ::CreateRectRgn(0,0,0,0);
- ::CombineRgn(combinedRegion, m_backingStoreDirtyRegion.get(), newRegion, RGN_OR);
+ ::CombineRgn(combinedRegion, m_backingStoreDirtyRegion->handle(), newRegion, RGN_OR);
::DeleteObject(newRegion);
- m_backingStoreDirtyRegion.set(combinedRegion);
+ m_backingStoreDirtyRegion = RefCountedHRGN::create(combinedRegion);
} else
- m_backingStoreDirtyRegion.set(newRegion);
+ m_backingStoreDirtyRegion = RefCountedHRGN::create(newRegion);
#if USE(ACCELERATED_COMPOSITING)
if (m_layerRenderer)
@@ -815,7 +818,7 @@ void WebView::scrollBackingStore(FrameView* frameView, int dx, int dy, const Int
// Collect our device context info and select the bitmap to scroll.
HDC windowDC = ::GetDC(m_viewWindow);
HDC bitmapDC = ::CreateCompatibleDC(windowDC);
- ::SelectObject(bitmapDC, m_backingStoreBitmap.get());
+ ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
// Scroll the bitmap.
RECT scrollRectWin(scrollViewRect);
@@ -892,7 +895,7 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
if (!dc) {
windowDC = ::GetDC(m_viewWindow);
bitmapDC = ::CreateCompatibleDC(windowDC);
- ::SelectObject(bitmapDC, m_backingStoreBitmap.get());
+ ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
}
if (m_backingStoreBitmap && (m_backingStoreDirtyRegion || backingStoreCompletelyDirty)) {
@@ -902,10 +905,10 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
view->layoutIfNeededRecursive();
Vector<IntRect> paintRects;
- if (!backingStoreCompletelyDirty) {
+ if (!backingStoreCompletelyDirty && m_backingStoreDirtyRegion) {
RECT regionBox;
- ::GetRgnBox(m_backingStoreDirtyRegion.get(), &regionBox);
- getUpdateRects(m_backingStoreDirtyRegion.get(), regionBox, paintRects);
+ ::GetRgnBox(m_backingStoreDirtyRegion->handle(), &regionBox);
+ getUpdateRects(m_backingStoreDirtyRegion->handle(), regionBox, paintRects);
} else {
RECT clientRect;
::GetClientRect(m_viewWindow, &clientRect);
@@ -942,8 +945,6 @@ void WebView::paint(HDC dc, LPARAM options)
return;
FrameView* frameView = coreFrame->view();
- m_paintCount++;
-
RECT rcPaint;
HDC hdc;
OwnPtr<HRGN> region;
@@ -968,9 +969,17 @@ void WebView::paint(HDC dc, LPARAM options)
windowsToPaint = PaintWebViewAndChildren;
}
+ if (::IsRectEmpty(&rcPaint)) {
+ if (!dc)
+ EndPaint(m_viewWindow, &ps);
+ return;
+ }
+
+ m_paintCount++;
+
HDC bitmapDC = ::CreateCompatibleDC(hdc);
bool backingStoreCompletelyDirty = ensureBackingStore();
- ::SelectObject(bitmapDC, m_backingStoreBitmap.get());
+ ::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
// Update our backing store if needed.
updateBackingStore(frameView, bitmapDC, backingStoreCompletelyDirty, windowsToPaint);
@@ -1323,12 +1332,19 @@ bool WebView::handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)
static MouseButton globalPrevButton;
static LONG globalPrevMouseDownTime;
+ if (message == WM_CANCELMODE) {
+ m_page->mainFrame()->eventHandler()->lostMouseCapture();
+ return true;
+ }
+
// Create our event.
// On WM_MOUSELEAVE we need to create a mouseout event, so we force the position
// of the event to be at (MINSHORT, MINSHORT).
LPARAM position = (message == WM_MOUSELEAVE) ? ((MINSHORT << 16) | MINSHORT) : lParam;
PlatformMouseEvent mouseEvent(m_viewWindow, message, wParam, position, m_mouseActivated);
-
+
+ setMouseActivated(false);
+
bool insideThreshold = abs(globalPrevPoint.x() - mouseEvent.pos().x()) < ::GetSystemMetrics(SM_CXDOUBLECLK) &&
abs(globalPrevPoint.y() - mouseEvent.pos().y()) < ::GetSystemMetrics(SM_CYDOUBLECLK);
LONG messageTime = ::GetMessageTime();
@@ -1387,7 +1403,6 @@ bool WebView::handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)
::TrackMouseEvent(m_mouseOutTracker.get());
}
}
- setMouseActivated(false);
return handled;
}
@@ -1862,10 +1877,10 @@ bool WebView::keyDown(WPARAM virtualKeyCode, LPARAM keyData, bool systemKeyDown)
// We need to handle back/forward using either Backspace(+Shift) or Ctrl+Left/Right Arrow keys.
if ((virtualKeyCode == VK_BACK && keyEvent.shiftKey()) || (virtualKeyCode == VK_RIGHT && keyEvent.ctrlKey()))
- m_page->goForward();
- else if (virtualKeyCode == VK_BACK || (virtualKeyCode == VK_LEFT && keyEvent.ctrlKey()))
- m_page->goBack();
-
+ return m_page->goForward();
+ if (virtualKeyCode == VK_BACK || (virtualKeyCode == VK_LEFT && keyEvent.ctrlKey()))
+ return m_page->goBack();
+
// Need to scroll the page if the arrow keys, pgup/dn, or home/end are hit.
ScrollDirection direction;
ScrollGranularity granularity;
@@ -2019,6 +2034,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
case WM_MBUTTONUP:
case WM_RBUTTONUP:
case WM_MOUSELEAVE:
+ case WM_CANCELMODE:
if (Frame* coreFrame = core(mainFrameImpl))
if (coreFrame->view()->didFirstLayout())
handled = webView->handleMouseEvent(message, wParam, lParam);
@@ -4657,6 +4673,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setAllowFileAccessFromFileURLs(!!enabled);
+ hr = prefsPrivate->javaScriptCanAccessClipboard(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setJavaScriptCanAccessClipboard(!!enabled);
+
hr = prefsPrivate->isXSSAuditorEnabled(&enabled);
if (FAILED(hr))
return hr;
@@ -5616,7 +5637,7 @@ HRESULT STDMETHODCALLTYPE WebView::backingStore(
{
if (!hBitmap)
return E_POINTER;
- *hBitmap = reinterpret_cast<OLE_HANDLE>(m_backingStoreBitmap.get());
+ *hBitmap = reinterpret_cast<OLE_HANDLE>(m_backingStoreBitmap->handle());
return S_OK;
}
@@ -6116,6 +6137,14 @@ void WebView::setAcceleratedCompositing(bool accelerated)
}
}
+void releaseBackingStoreCallback(void* info, const void* data, size_t size)
+{
+ // Release the backing store bitmap previously retained by updateRootLayerContents().
+ ASSERT(info);
+ if (info)
+ static_cast<RefCountedHBITMAP*>(info)->deref();
+}
+
void WebView::updateRootLayerContents()
{
if (!m_backingStoreBitmap || !m_layerRenderer)
@@ -6123,13 +6152,12 @@ void WebView::updateRootLayerContents()
// Get the backing store into a CGImage
BITMAP bitmap;
- GetObject(m_backingStoreBitmap.get(), sizeof(bitmap), &bitmap);
- int bmSize = bitmap.bmWidthBytes * bitmap.bmHeight;
- RetainPtr<CFDataRef> data(AdoptCF,
- CFDataCreateWithBytesNoCopy(
- 0, static_cast<UInt8*>(bitmap.bmBits),
- bmSize, kCFAllocatorNull));
- RetainPtr<CGDataProviderRef> cgData(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
+ GetObject(m_backingStoreBitmap->handle(), sizeof(bitmap), &bitmap);
+ size_t bmSize = bitmap.bmWidthBytes * bitmap.bmHeight;
+ RetainPtr<CGDataProviderRef> cgData(AdoptCF,
+ CGDataProviderCreateWithData(static_cast<void*>(m_backingStoreBitmap.get()),
+ bitmap.bmBits, bmSize,
+ releaseBackingStoreCallback));
RetainPtr<CGColorSpaceRef> space(AdoptCF, CGColorSpaceCreateDeviceRGB());
RetainPtr<CGImageRef> backingStoreImage(AdoptCF, CGImageCreate(bitmap.bmWidth, bitmap.bmHeight,
8, bitmap.bmBitsPixel,
@@ -6138,8 +6166,17 @@ void WebView::updateRootLayerContents()
cgData.get(), 0, false,
kCGRenderingIntentDefault));
+ // Retain the backing store bitmap so that it is not deleted by deleteBackingStore()
+ // while still in use within CA. When CA is done with the bitmap, it will
+ // call releaseBackingStoreCallback(), which will release the backing store bitmap.
+ m_backingStoreBitmap->ref();
+
// Hand the CGImage to CACF for compositing
- m_layerRenderer->setRootContents(backingStoreImage.get());
+ if (m_nextDisplayIsSynchronous) {
+ m_layerRenderer->setRootContentsAndDisplay(backingStoreImage.get());
+ m_nextDisplayIsSynchronous = false;
+ } else
+ m_layerRenderer->setRootContents(backingStoreImage.get());
// Set the frame and scroll position
Frame* coreFrame = core(m_mainFrame);
@@ -6295,6 +6332,12 @@ HRESULT WebView::registerURLSchemeAsSecure(BSTR scheme)
return S_OK;
}
+HRESULT WebView::nextDisplayIsSynchronous()
+{
+ m_nextDisplayIsSynchronous = true;
+ return S_OK;
+}
+
class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 48f3ef8..7c10039 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -32,12 +32,14 @@
#include "WebPreferences.h"
#include <WebCore/DragActions.h>
#include <WebCore/IntRect.h>
+#include <WebCore/RefCountedGDIHandle.h>
#include <WebCore/Timer.h>
#include <WebCore/WindowMessageListener.h>
#include <WebCore/WKCACFLayer.h>
#include <WebCore/WKCACFLayerRenderer.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
+#include <wtf/RefPtr.h>
class FullscreenVideoController;
class WebBackForwardList;
@@ -45,6 +47,9 @@ class WebFrame;
class WebInspector;
class WebInspectorClient;
+typedef WebCore::RefCountedGDIHandle<HBITMAP> RefCountedHBITMAP;
+typedef WebCore::RefCountedGDIHandle<HRGN> RefCountedHRGN;
+
WebView* kit(WebCore::Page*);
WebCore::Page* core(IWebView*);
@@ -781,6 +786,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme);
virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(BSTR);
+ virtual HRESULT STDMETHODCALLTYPE nextDisplayIsSynchronous();
+
// WebView
bool shouldUseEmbeddedView(const WebCore::String& mimeType) const;
@@ -939,9 +946,9 @@ protected:
WebFrame* m_mainFrame;
WebCore::Page* m_page;
- OwnPtr<HBITMAP> m_backingStoreBitmap;
+ RefPtr<RefCountedHBITMAP> m_backingStoreBitmap;
SIZE m_backingStoreSize;
- OwnPtr<HRGN> m_backingStoreDirtyRegion;
+ RefPtr<RefCountedHRGN> m_backingStoreDirtyRegion;
COMPtr<IWebEditingDelegate> m_editingDelegate;
COMPtr<IWebFrameLoadDelegate> m_frameLoadDelegate;
@@ -1015,6 +1022,8 @@ protected:
OwnPtr<WebCore::WKCACFLayerRenderer> m_layerRenderer;
bool m_isAcceleratedCompositing;
#endif
+
+ bool m_nextDisplayIsSynchronous;
};
#endif
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 6e04904..4f09956 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,69 @@
+2010-05-03 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Build and use Mac's ComplexTextController to support complex text in wx.
+ https://bugs.webkit.org/show_bug.cgi?id=38482
+
+ * WebView.cpp:
+ (wxWebView::Create):
+ * wscript:
+
+2010-05-03 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Provide access to GrantUniversalAccess to allow enabling of XSS support.
+ https://bugs.webkit.org/show_bug.cgi?id=38481
+
+ * WebFrame.cpp:
+ (wxWebFrame::GrantUniversalAccess):
+ * WebFrame.h:
+ * WebView.cpp:
+ (wxWebView::GetParseMode):
+ (wxWebView::GrantUniversalAccess):
+ * WebView.h:
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * WebKitSupport/FrameLoaderClientWx.h:
+ (WebCore::FrameLoaderClientWx::dispatchWillSendSubmitEvent):
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * WebView.cpp:
+ (wxWebView::Create): Add call to initializeMainThread.
+
+2010-04-25 Kevin Watters <kevinwatters@gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Update focus handling code to match current approaches used by other platforms,
+ and fix focus handling for corner cases such as when a mouse down pops up a dialog.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38086
+
+ * WebView.cpp:
+ (wxWebView::Create):
+ (wxWebView::OnTLWActivated):
+ (wxWebView::OnPaint):
+ (wxWebView::OnMouseEvents):
+ (wxWebView::OnSetFocus):
+ (wxWebView::OnKillFocus):
+ * WebView.h:
+
2010-04-20 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index 78427e4..2515de4 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -426,3 +426,9 @@ wxWebKitParseMode wxWebFrame::GetParseMode() const
return NoDocument;
}
+
+void wxWebFrame::GrantUniversalAccess()
+{
+ if (m_impl->frame && m_impl->frame->document())
+ m_impl->frame->document()->securityOrigin()->grantUniversalAccess();
+}
diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h
index 95a0691..fec6257 100644
--- a/WebKit/wx/WebFrame.h
+++ b/WebKit/wx/WebFrame.h
@@ -146,6 +146,8 @@ public:
wxWebKitParseMode GetParseMode() const;
+ void GrantUniversalAccess();
+
private:
float m_textMagnifier;
bool m_isEditable;
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
index e9f566b..95ef2e6 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
@@ -113,6 +113,7 @@ namespace WebCore {
virtual void dispatchShow();
virtual void cancelPolicyCheck();
+ virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
virtual void dispatchDidLoadMainResource(DocumentLoader*);
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 95730b9..cfa402f 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -254,6 +254,13 @@ wxWebViewCachePolicy wxWebView::GetCachePolicy()
return gs_cachePolicy;
}
+#if OS(DARWIN)
+// prototype - function is in WebKitSystemInterface.mm
+extern "C" {
+void InitWebCoreSystemInterface(void);
+}
+#endif
+
BEGIN_EVENT_TABLE(wxWebView, wxWindow)
EVT_PAINT(wxWebView::OnPaint)
EVT_SIZE(wxWebView::OnSize)
@@ -295,6 +302,10 @@ wxWebView::wxWebView(wxWindow* parent, int id, const wxPoint& position,
bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
const wxSize& size, long style, const wxString& name)
{
+#if OS(DARWIN)
+ InitWebCoreSystemInterface();
+#endif
+
if ( (style & wxBORDER_MASK) == 0)
style |= wxBORDER_NONE;
@@ -302,6 +313,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
return false;
WTF::initializeThreading();
+ WTF::initializeMainThread();
// This is necessary because we are using SharedTimerWin.cpp on Windows,
// due to a problem with exceptions getting eaten when using the callback
@@ -340,6 +352,9 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
SetDatabasesEnabled(true);
#endif
+ wxWindow* tlw = wxGetTopLevelParent(this);
+ tlw->Connect(-1, wxEVT_ACTIVATE, wxActivateEventHandler(wxWebView::OnTLWActivated));
+
m_isInitialized = true;
return true;
@@ -359,6 +374,15 @@ wxWebView::~wxWebView()
m_impl->page = 0;
}
+void wxWebView::OnTLWActivated(wxActivateEvent& event)
+{
+ if (m_impl && m_impl->page && m_impl->page->focusController())
+ m_impl->page->focusController()->setActive(event.GetActive());
+
+ event.Skip();
+
+}
+
void wxWebView::Stop()
{
if (m_mainFrame)
@@ -528,13 +552,6 @@ void wxWebView::OnPaint(wxPaintEvent& event)
if (m_beingDestroyed || !m_mainFrame)
return;
- // WebView active state is based on TLW active state.
- wxTopLevelWindow* tlw = dynamic_cast<wxTopLevelWindow*>(wxGetTopLevelParent(this));
- if (tlw && tlw->IsActive())
- m_impl->page->focusController()->setActive(true);
- else {
- m_impl->page->focusController()->setActive(false);
- }
WebCore::Frame* frame = m_mainFrame->GetFrame();
if (!frame || !frame->view())
return;
@@ -620,6 +637,21 @@ void wxWebView::OnMouseEvents(wxMouseEvent& event)
return;
}
+ // If an event, such as a right-click event, leads to a focus change (e.g. it
+ // raises a dialog), WebKit never gets the mouse up event and never relinquishes
+ // mouse capture. This leads to WebKit handling mouse events, such as modifying
+ // the selection, while other controls or top level windows have the focus.
+ // I'm not sure if this is the right place to handle this, but I can't seem to
+ // find a precedent on how to handle this in other ports.
+ if (wxWindow::FindFocus() != this) {
+ while (HasCapture())
+ ReleaseMouse();
+
+ frame->eventHandler()->setMousePressed(false);
+
+ return;
+ }
+
int clickCount = event.ButtonDClick() ? 2 : 1;
if (clickCount == 1 && m_impl->tripleClickTimer.IsRunning()) {
@@ -882,26 +914,35 @@ void wxWebView::OnKeyEvents(wxKeyEvent& event)
void wxWebView::OnSetFocus(wxFocusEvent& event)
{
- WebCore::Frame* frame = 0;
- if (m_mainFrame)
- frame = m_mainFrame->GetFrame();
-
- if (frame) {
- frame->selection()->setFocused(true);
- }
+ if (m_impl && m_impl->page && m_impl->page->focusController()) {
+ m_impl->page->focusController()->setFocused(true);
+ m_impl->page->focusController()->setActive(true);
+ if (!m_impl->page->focusController()->focusedFrame() && m_mainFrame)
+ m_impl->page->focusController()->setFocusedFrame(m_mainFrame->GetFrame());
+ }
+
event.Skip();
}
void wxWebView::OnKillFocus(wxFocusEvent& event)
{
- WebCore::Frame* frame = 0;
- if (m_mainFrame)
- frame = m_mainFrame->GetFrame();
-
- if (frame) {
- frame->selection()->setFocused(false);
+ if (m_impl && m_impl->page && m_impl->page->focusController()) {
+ m_impl->page->focusController()->setFocused(false);
+
+ // We also handle active state in OnTLWActivated, but if a user does not
+ // call event.Skip() in their own EVT_ACTIVATE handler, we won't get those
+ // callbacks. So we handle active state here as well as a fallback.
+ wxTopLevelWindow* tlw = dynamic_cast<wxTopLevelWindow*>(wxGetTopLevelParent(this));
+ if (tlw && tlw->IsActive())
+ m_impl->page->focusController()->setActive(true);
+ else
+ m_impl->page->focusController()->setActive(false);
}
+
+ while (HasCapture())
+ ReleaseMouse();
+
event.Skip();
}
@@ -997,4 +1038,10 @@ wxWebKitParseMode wxWebView::GetParseMode() const
return m_mainFrame->GetParseMode();
return NoDocument;
-} \ No newline at end of file
+}
+
+void wxWebView::GrantUniversalAccess()
+{
+ if (m_mainFrame)
+ m_mainFrame->GrantUniversalAccess();
+}
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index f7b41dc..075deaf 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -214,6 +214,12 @@ public:
wxWebSettings GetWebSettings();
wxWebKitParseMode GetParseMode() const;
+
+ /*
+ This method allows cross site-scripting (XSS) in the WebView.
+ Use with caution!
+ */
+ void GrantUniversalAccess();
protected:
@@ -226,6 +232,7 @@ protected:
void OnKeyEvents(wxKeyEvent& event);
void OnSetFocus(wxFocusEvent& event);
void OnKillFocus(wxFocusEvent& event);
+ void OnTLWActivated(wxActivateEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
diff --git a/WebKit/wx/wscript b/WebKit/wx/wscript
index b5ba580..61fa903 100644
--- a/WebKit/wx/wscript
+++ b/WebKit/wx/wscript
@@ -81,6 +81,13 @@ def pre_build(bld):
bld.env.CXXDEPS_WEBCORE = Utils.h_file(libwebcore)
def build(bld):
+
+ import TaskGen
+
+ if sys.platform.startswith('darwin'):
+ TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cxx']
+ TaskGen.task_gen.mappings['.m'] = TaskGen.task_gen.mappings['.cxx']
+
bld.add_pre_fun(pre_build)
bld.env.LIBDIR = output_dir
@@ -95,6 +102,11 @@ def build(bld):
uselib_local = '',
install_path = output_dir)
+ exts = ['.c', '.cpp']
+ if sys.platform.startswith('darwin'):
+ exts.append('.mm')
+ obj.includes += '../mac/WebCoreSupport ../../WebCore/platform/mac'
+ obj.source = "../mac/WebCoreSupport/WebSystemInterface.m"
obj.find_sources_in_dirs(webkit_dirs)
if building_on_win32: