summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/ChangeLog8
-rw-r--r--WebKit/StringsNotToBeLocalized.txt1
-rw-r--r--WebKit/chromium/ChangeLog404
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/WebKit.gyp19
-rw-r--r--WebKit/chromium/WebKit.gypi3
-rw-r--r--WebKit/chromium/features.gypi5
-rw-r--r--WebKit/chromium/public/WebBindings.h5
-rw-r--r--WebKit/chromium/public/WebClipboard.h8
-rw-r--r--WebKit/chromium/public/WebElement.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h2
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h11
-rw-r--r--WebKit/chromium/public/WebInputElement.h1
-rw-r--r--WebKit/chromium/public/WebNotification.h3
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h6
-rw-r--r--WebKit/chromium/public/WebViewClient.h3
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp7
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.cpp104
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.h70
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp19
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h6
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp8
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.h2
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h1
-rw-r--r--WebKit/chromium/src/LocalFileSystemChromium.cpp69
-rw-r--r--WebKit/chromium/src/WebBindings.cpp27
-rw-r--r--WebKit/chromium/src/WebElement.cpp5
-rw-r--r--WebKit/chromium/src/WebEntities.cpp51
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp9
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.h6
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp7
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h1
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.cpp2
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h1
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp5
-rw-r--r--WebKit/chromium/src/WebNotification.cpp6
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp32
-rw-r--r--WebKit/chromium/src/WebScrollbarImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp12
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp15
-rw-r--r--WebKit/chromium/src/js/DevTools.js37
-rw-r--r--WebKit/chromium/src/js/HeapProfilerPanel.js966
-rw-r--r--WebKit/chromium/src/js/ProfilerAgent.js138
-rw-r--r--WebKit/chromium/src/js/ProfilerProcessor.js543
-rwxr-xr-xWebKit/chromium/src/js/devTools.css112
-rw-r--r--WebKit/chromium/src/win/WebInputEventFactory.cpp10
-rw-r--r--WebKit/efl/CMakeListsEfl.txt11
-rw-r--r--WebKit/efl/ChangeLog147
-rw-r--r--WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp197
-rw-r--r--WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h91
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp62
-rw-r--r--WebKit/efl/ewk/ewk_frame.h1
-rw-r--r--WebKit/efl/ewk/ewk_main.cpp94
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp83
-rw-r--r--WebKit/efl/ewk/ewk_view.h8
-rw-r--r--WebKit/gtk/ChangeLog115
-rw-r--r--WebKit/gtk/NEWS15
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.h7
-rw-r--r--WebKit/gtk/docs/webkitgtk-docs.sgml9
-rw-r--r--WebKit/gtk/po/ChangeLog82
-rw-r--r--WebKit/gtk/po/es.po37
-rw-r--r--WebKit/gtk/po/nb.po1104
-rw-r--r--WebKit/gtk/tests/testcopyandpaste.c5
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp35
-rw-r--r--WebKit/mac/Carbon/HIViewAdapter.m1
-rw-r--r--WebKit/mac/Carbon/HIWebView.mm6
-rw-r--r--WebKit/mac/ChangeLog262
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig3
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/Misc/QuickDrawCompatibility.h96
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm1
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h6
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm71
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h14
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm46
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm20
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.mm1
-rw-r--r--WebKit/mac/WebInspector/WebInspectorFrontend.mm2
-rw-r--r--WebKit/mac/WebView/WebDocumentInternal.h1
-rw-r--r--WebKit/mac/WebView/WebFrame.mm116
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h4
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h13
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm92
-rw-r--r--WebKit/mac/WebView/WebHTMLViewInternal.h2
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm5
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm11
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h6
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h15
-rw-r--r--WebKit/mac/WebView/WebView.mm17
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h1
-rw-r--r--WebKit/qt/Api/qwebelement.cpp2
-rw-r--r--WebKit/qt/Api/qwebframe.cpp2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp37
-rw-r--r--WebKit/qt/Api/qwebpage.h6
-rw-r--r--WebKit/qt/Api/qwebplugindatabase.cpp4
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp9
-rw-r--r--WebKit/qt/Api/qwebview.cpp6
-rw-r--r--WebKit/qt/ChangeLog229
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp16
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp2
-rw-r--r--WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp98
-rw-r--r--WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h60
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp12
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp15
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp110
-rw-r--r--WebKit/win/ChangeLog93
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl5
-rw-r--r--WebKit/win/WebFrame.cpp4
-rw-r--r--WebKit/win/WebView.cpp3
-rw-r--r--WebKit/wince/ChangeLog120
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp91
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h57
-rw-r--r--WebKit/wince/WebCoreSupport/DragClientWinCE.cpp72
-rw-r--r--WebKit/wince/WebCoreSupport/DragClientWinCE.h48
-rw-r--r--WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp315
-rw-r--r--WebKit/wince/WebCoreSupport/EditorClientWinCE.h108
-rw-r--r--WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp84
-rw-r--r--WebKit/wince/WebCoreSupport/InspectorClientWinCE.h59
-rw-r--r--WebKit/wx/ChangeLog56
-rw-r--r--WebKit/wx/WebEdit.cpp33
-rw-r--r--WebKit/wx/WebEdit.h3
-rw-r--r--WebKit/wx/WebFrame.cpp10
-rw-r--r--WebKit/wx/WebFrame.h6
-rw-r--r--WebKit/wx/WebKitSupport/EditorClientWx.cpp19
-rw-r--r--WebKit/wx/WebSettings.h2
-rw-r--r--WebKit/wx/WebView.cpp35
-rw-r--r--WebKit/wx/WebView.h51
-rw-r--r--WebKit/wx/bindings/python/webview.i53
134 files changed, 5357 insertions, 2277 deletions
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9747ffa..898fc8d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add 'application/x-snkp' to StringsNotToBeLocalized.txt.
+
+ * StringsNotToBeLocalized.txt:
+
2010-08-20 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix.
diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt
index d23cafa..bf1e575 100644
--- a/WebKit/StringsNotToBeLocalized.txt
+++ b/WebKit/StringsNotToBeLocalized.txt
@@ -540,6 +540,7 @@
"application/rss+xml"
"application/x-apple-msg-attachment"
"application/x-java-applet"
+"application/x-snkp"
"application/x-webarchive"
"application/xhtml+xml"
"attributeKeys"
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 6b0b3fa..527e8ef 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,407 @@
+2010-09-02 Ilya Sherman <isherman@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Exposing computing an element's inherited language, per the DOM, in the
+ Chromium API -- primarily for use with autofill i18n.
+ https://bugs.webkit.org/show_bug.cgi?id=44803
+
+ * public/WebElement.h:
+ * src/WebElement.cpp:
+ (WebKit::WebElement::computeInheritedLanguage):
+
+2010-09-01 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Remove dependency on JS files for V8 logs processing.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45045
+
+ * WebKit.gyp:
+
+2010-09-01 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, rolling out r66576.
+ http://trac.webkit.org/changeset/66576
+ https://bugs.webkit.org/show_bug.cgi?id=45016
+
+ This change is not needed.
+
+ * public/WebKitClient.h:
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::layout):
+
+2010-08-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Add WebKitClient::callOnMainThreadWithDelay()
+ https://bugs.webkit.org/show_bug.cgi?id=45016
+
+ It is required to remove base/task.h and base/timer.h dependency
+ from DRT/Chromium.
+
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::callOnMainThreadWithDelay): Added.
+
+2010-08-31 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Add LocalFileSystem.requestFileSystem interface to DOMWindow
+ https://bugs.webkit.org/show_bug.cgi?id=44734
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableFileSystem):
+ (WebKit::WebRuntimeFeatures::isFileSystemEnabled):
+
+2010-08-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Implement the rest of IDBCursors + make them persistent
+ https://bugs.webkit.org/show_bug.cgi?id=44546
+
+ * src/IDBCursorBackendProxy.cpp:
+ (WebCore::IDBCursorBackendProxy::value):
+ * src/IDBCursorBackendProxy.h:
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::value):
+
+2010-08-27 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Notifications should support a click event
+ https://bugs.webkit.org/show_bug.cgi?id=44800
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dispatchClickEvent):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Switch the Blob implementation to using the blob data registration model
+ https://bugs.webkit.org/show_bug.cgi?id=44389
+
+ * src/WebSearchableFormData.cpp:
+ (WebCore::HasSuitableTextElement):
+
+2010-08-30 Nat Duca <nduca@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium] Accelerated Compositing: Artifacts/blink when enabling compositor.
+ https://bugs.webkit.org/show_bug.cgi?id=44196
+
+ If accelerated compositing enables after a page loads, the dirtied
+ portion of the screen will be only a subset of the full screen,
+ leading to artefacts. Avoid these artefacts by invalidating the
+ visible content rect on compositor initialization.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2010-08-30 Kinuko Yasuda <kinuko@chromium.osrc>
+
+ Reviewed by Darin Fisher.
+
+ Add DOMFileSystem implementation to support Entry manipulation operations
+ https://bugs.webkit.org/show_bug.cgi?id=44732
+
+ Fixed virtual-path / platform-path conversion timing. (The conversion needs to be done before calling AsyncFileSystem methods to support cross-filesystem operations.)
+
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::move):
+ (WebCore::AsyncFileSystemChromium::copy):
+ (WebCore::AsyncFileSystemChromium::remove):
+ (WebCore::AsyncFileSystemChromium::readMetadata):
+ (WebCore::AsyncFileSystemChromium::createFile):
+ (WebCore::AsyncFileSystemChromium::createDirectory):
+ (WebCore::AsyncFileSystemChromium::fileExists):
+ (WebCore::AsyncFileSystemChromium::directoryExists):
+ (WebCore::AsyncFileSystemChromium::readDirectory):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * src/InspectorFrontendClientImpl.cpp:
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Introduce isValidValue(const String&) of HTMLInputElement and HTMLTextAreaElement
+ https://bugs.webkit.org/show_bug.cgi?id=43537
+
+ * public/WebInputElement.h:
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::isValidValue):
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Remove dependency to base/keyboard_codes.h
+ https://bugs.webkit.org/show_bug.cgi?id=44847
+
+ * DEPS: Roll Chromium revision to 57823 to have a webkit_support change.
+
+2010-08-28 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add webkit_support.gyp:blob to WebKit.gyp
+ https://bugs.webkit.org/show_bug.cgi?id=44829
+
+ Also bump up chromium revision in DEPS in order to pick up
+ the revision that contains blob change.
+
+ * DEPS:
+ * WebKit.gyp:
+
+2010-08-28 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Add AX notification for childrenChanged
+ https://bugs.webkit.org/show_bug.cgi?id=44472
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.h:
+
+2010-08-27 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Add new WebClipboard method for setting generic data in copy/cut handlers.
+ https://bugs.webkit.org/show_bug.cgi?id=42121
+
+ * public/WebClipboard.h:
+ (WebKit::WebClipboard::writeData):
+ (WebKit::WebClipboard::readFilenames):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::clipboardWriteData):
+
+2010-08-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ [chromium] Add chromium-side of AsyncFileSystem implementation
+ https://bugs.webkit.org/show_bug.cgi?id=44434
+
+ * WebKit.gyp:
+ * src/AssertMatchingEnums.cpp: Added assertions.
+ * src/AsyncFileSystemChromium.cpp: Added.
+ * src/AsyncFileSystemChromium.h: Added.
+ * src/LocalFileSystemChromium.cpp: Added.
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
+ * src/WebFileSystemCallbacksImpl.h:
+
+2010-08-27 Michael Nordman <michaeln@google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44133
+ WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob.
+
+ * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB.
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
+ (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):
+
+2010-08-25 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Add setVersion to IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=44630
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ (WebKit::WebIDBDatabase::setVersion):
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::setVersion):
+ * src/IDBDatabaseProxy.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::setVersion):
+ * src/WebIDBDatabaseImpl.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::disconnectFromBackend):
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [DRT/Chromium] Fix inspector test failures
+ https://bugs.webkit.org/show_bug.cgi?id=44748
+
+ * DEPS: Update Chromium revision to 57605 to have a webkit_support change.
+
+2010-08-26 Dumitru Daniliuc <dumi@chromium.org>
+
+ Unreviewed, Chromium build fix.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::markerTextForListItem):
+
+2010-08-26 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add support for markerTextForListItem() to Chromium's LayoutTestController.
+ https://bugs.webkit.org/show_bug.cgi?id=44724
+
+ * public/WebBindings.h:
+ * public/WebFrame.h:
+ * src/WebBindings.cpp:
+ (WebKit::getElementImpl):
+ (WebKit::WebBindings::getElement):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::markerTextForListItem):
+ * src/WebFrameImpl.h:
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+ https://bugs.webkit.org/show_bug.cgi?id=43761
+
+ Removes API support to grab a GLES2Context from within WebCore. The compositor
+ has a special codepath to grab its GLES2Context and no other codepaths
+ need access to a raw context. Accelerated drawing elsewhere will go through
+ GraphicsContext3D.
+
+ * src/ChromeClientImpl.cpp:
+ * src/ChromeClientImpl.h:
+
+2010-08-26 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] WebEntities is broken
+ https://bugs.webkit.org/show_bug.cgi?id=44708
+
+ For serialization purposes, we don't need to convert all entity references.
+ This patch modifies WebEntities::WebEntities to use hard-coded entity lists for both HTML and XML,
+ and deletes populateMapFromXMLEntities and populateMapFromHTMLEntityTable.
+
+ No tests are added since the code is tested in DomSerializerTests
+
+ * src/WebEntities.cpp:
+ (WebKit::):
+ (WebKit::WebEntities::WebEntities):
+
+2010-08-26 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Misc. cleanup split off from bug 32356.
+ https://bugs.webkit.org/show_bug.cgi?id=44696
+
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::setLocation):
+ (WebKit::WebScrollbarImpl::onMouseWheel):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::propagateScroll):
+ * src/win/WebInputEventFactory.cpp:
+ (WebKit::WebInputEventFactory::mouseWheelEvent):
+
+2010-08-26 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Store heap snapshots in InspectorProfilerAgent.
+
+ Change the way heap snapshots are transported to Inspector
+ to be aligned with CPU profiles. As a result, the Heap snapshots
+ view of Profiles panel was upstreamed into WebCore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44531
+
+ * DEPS:
+ * WebKit.gypi:
+ * src/js/DevTools.js:
+ ():
+ * src/js/HeapProfilerPanel.js: Removed.
+ * src/js/ProfilerAgent.js: Removed.
+ * src/js/ProfilerProcessor.js: Removed.
+ * src/js/devTools.css:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * src/InspectorFrontendClientImpl.cpp:
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::disconnectFromBackend):
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [DRT/Chromium] Enable DEVICE_ORIENTATION
+ https://bugs.webkit.org/show_bug.cgi?id=44587
+
+ * features.gypi:
+
+2010-08-25 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: as far as we have 'seq' property in the each inspector message
+ it would be better to remove explicit callId argument from Inspector.idl functions
+ declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=44617
+
+ * src/js/ProfilerAgent.js:
+ (devtools.ProfilerAgent.prototype._getNextLogLines.else.delayedRequest):
+ (devtools.ProfilerAgent.prototype._getNextLogLines):
+
2010-08-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r66074.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index c189f59..6252f08 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': '57298',
+ 'chromium_rev': '57823',
}
deps = {
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 9443d8e..c75cac7 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -49,13 +49,6 @@
# for copying them to resource dir, and for generating 'devtools.html' file.
'devtools_files': [
'<@(devtools_css_files)',
- '../../WebKit/chromium/v8/tools/codemap.js',
- '../../WebKit/chromium/v8/tools/consarray.js',
- '../../WebKit/chromium/v8/tools/csvparser.js',
- '../../WebKit/chromium/v8/tools/logreader.js',
- '../../WebKit/chromium/v8/tools/profile.js',
- '../../WebKit/chromium/v8/tools/profile_view.js',
- '../../WebKit/chromium/v8/tools/splaytree.js',
'<@(devtools_js_files)',
],
},{
@@ -64,13 +57,6 @@
'devtools_files': [
'<@(devtools_css_files)',
- '../../../../v8/tools/codemap.js',
- '../../../../v8/tools/consarray.js',
- '../../../../v8/tools/csvparser.js',
- '../../../../v8/tools/logreader.js',
- '../../../../v8/tools/profile.js',
- '../../../../v8/tools/profile_view.js',
- '../../../../v8/tools/splaytree.js',
'<@(devtools_js_files)',
],
}],
@@ -292,6 +278,8 @@
'src/ApplicationCacheHost.cpp',
'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
+ 'src/AsyncFileSystemChromium.cpp',
+ 'src/AsyncFileSystemChromium.h',
'src/AutoFillPopupMenuClient.cpp',
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
@@ -363,6 +351,7 @@
'src/x11/WebScreenInfoFactory.cpp',
'src/mac/WebInputEventFactory.mm',
'src/mac/WebScreenInfoFactory.mm',
+ 'src/LocalFileSystemChromium.cpp',
'src/LocalizedStrings.cpp',
'src/MediaPlayerPrivateChromium.cpp',
'src/NotificationPresenterImpl.h',
@@ -736,6 +725,7 @@
'<(chromium_src_dir)/base/base.gyp:base_i18n',
'<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
@@ -805,6 +795,7 @@
'webkit',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index b45e3e7..4c6ac37 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -33,9 +33,6 @@
# List of DevTools source files, ordered by dependencies. It is used both
# for copying them to resource dir, and for generating 'devtools.html' file.
'devtools_js_files': [
- 'src/js/ProfilerAgent.js',
- 'src/js/ProfilerProcessor.js',
- 'src/js/HeapProfilerPanel.js',
'src/js/DevTools.js',
'src/js/DevToolsHostStub.js',
'src/js/Tests.js',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 61e5806..df277d6 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -46,7 +46,7 @@
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=0',
- 'ENABLE_DEVICE_ORIENTATION=0',
+ 'ENABLE_DEVICE_ORIENTATION=1',
'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOM_STORAGE=1',
'ENABLE_EVENTSOURCE=1',
@@ -81,12 +81,13 @@
'ENABLE_WEB_SOCKETS=1',
'ENABLE_WEB_TIMING=1',
'ENABLE_WORKERS=1',
+ 'ENABLE_XHR_RESPONSE_BLOB=1',
'ENABLE_XPATH=1',
'ENABLE_XSLT=1',
],
'conditions': [
- ['OS=="win" or OS=="linux"', {
+ ['OS=="win" or OS=="linux" or OS=="mac"', {
'feature_defines': [
'WTF_USE_ACCELERATED_COMPOSITING=1',
'ENABLE_3D_RENDERING=1',
diff --git a/WebKit/chromium/public/WebBindings.h b/WebKit/chromium/public/WebBindings.h
index 0fa3bfd..bca4095 100644
--- a/WebKit/chromium/public/WebBindings.h
+++ b/WebKit/chromium/public/WebBindings.h
@@ -37,6 +37,7 @@
namespace WebKit {
class WebDragData;
+class WebElement;
class WebRange;
// A haphazard collection of functions for dealing with plugins.
@@ -139,6 +140,10 @@ public:
// If so, return that range as a WebRange object.
WEBKIT_API static bool getRange(NPObject* range, WebRange*);
+ // Return true (success) if the given npobj is an element.
+ // If so, return that element as a WebElement object.
+ WEBKIT_API static bool getElement(NPObject* element, WebElement*);
+
// Exceptions -------------------------------------------------------------
typedef void (ExceptionHandler)(void* data, const NPUTF8* message);
diff --git a/WebKit/chromium/public/WebClipboard.h b/WebKit/chromium/public/WebClipboard.h
index 6755d96..861c522 100644
--- a/WebKit/chromium/public/WebClipboard.h
+++ b/WebKit/chromium/public/WebClipboard.h
@@ -71,7 +71,10 @@ public:
const WebURL&, const WebString& title) { }
virtual void writeImage(
const WebImage&, const WebURL&, const WebString& title) { }
- virtual void writeData(const WebDragData&) { }
+ virtual void writeData(
+ const WebString& type,
+ const WebString& data,
+ const WebString& metadata) { }
// The following functions are used for reading platform data for copy and
// paste, drag and drop, and selection copy (on X).
@@ -81,7 +84,8 @@ public:
virtual bool readData(
Buffer, const WebString& type, WebString* data,
WebString* metadata) { return false; }
- virtual WebVector<WebString> readFilenames(Buffer) { return WebVector<WebString>(); }
+ virtual WebVector<WebString> readFilenames(
+ Buffer) { return WebVector<WebString>(); }
protected:
~WebClipboard() {}
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index 16a82d8..5b6fd6a 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -58,6 +58,12 @@ class WebNamedNodeMap;
WEBKIT_API WebNamedNodeMap attributes() const;
WEBKIT_API WebString innerText() const;
+ // Returns the language code specified for this element. This attribute
+ // is inherited, so the returned value is drawn from the closest parent
+ // element that has the lang attribute set, or from the HTTP
+ // "Content-Language" header as a fallback.
+ WEBKIT_API WebString computeInheritedLanguage() const;
+
#if WEBKIT_IMPLEMENTATION
WebElement(const WTF::PassRefPtr<WebCore::Element>&);
WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&);
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index c4fa7ae..d8eca6a 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -518,6 +518,8 @@ public:
// used to support layout tests.
virtual WebString counterValueForElementById(const WebString& id) const = 0;
+ // Calls markerTextForListItem() defined in WebCore/rendering/RenderTreeAsText.h.
+ virtual WebString markerTextForListItem(const WebElement&) const = 0;
// Returns the number of page where the specified element will be put.
// This method is used to support layout tests.
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index 6e494ce..4e5cdcb 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -61,20 +61,15 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebDOMStringList();
}
- virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*)
- {
- WEBKIT_ASSERT_NOT_REACHED();
- }
+ virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBObjectStore to the caller.
virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks)
- {
- WEBKIT_ASSERT_NOT_REACHED();
- }
+ virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBTransaction to the caller.
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
{
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index d8c8ce7..ef3b577 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -99,6 +99,7 @@ namespace WebKit {
WEBKIT_API void setSelectionRange(int, int);
WEBKIT_API int selectionStart();
WEBKIT_API int selectionEnd();
+ WEBKIT_API bool isValidValue(const WebString&) const;
#if WEBKIT_IMPLEMENTATION
WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index 89dff7a..dbbde02 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -97,6 +97,9 @@ public:
// the byUser parameter will be true.
WEBKIT_API void dispatchCloseEvent(bool byUser);
+ // Called to indicate the notification was clicked on.
+ WEBKIT_API void dispatchClickEvent();
+
#if WEBKIT_IMPLEMENTATION
WebNotification(const WTF::PassRefPtr<WebCore::Notification>&);
WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&);
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 9aa1f4f..5537ee2 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -86,6 +86,12 @@ public:
WEBKIT_API static void enableSpeechInput(bool);
WEBKIT_API static bool isSpeechInputEnabled();
+ WEBKIT_API static void enableXHRResponseBlob(bool);
+ WEBKIT_API static bool isXHRResponseBlobEnabled();
+
+ WEBKIT_API static void enableFileSystem(bool);
+ WEBKIT_API static bool isFileSystemEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index c64418b..5c9a79b 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -277,6 +277,9 @@ public:
// Notifies embedder that the state of an accessibility object has changed.
virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }
+
+ // Notifies embedder that the children of an accessibility object has changed.
+ virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { }
// Developer tools -----------------------------------------------------
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index a117fc2..ac3aad3 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -35,6 +35,7 @@
#include "AccessibilityObject.h"
#include "ApplicationCacheHost.h"
+#include "AsyncFileSystem.h"
#include "EditorInsertAction.h"
#include "FontDescription.h"
#include "FontSmoothingMode.h"
@@ -54,6 +55,7 @@
#include "WebClipboard.h"
#include "WebCursorInfo.h"
#include "WebEditingAction.h"
+#include "WebFileSystem.h"
#include "WebFontDescription.h"
#include "WebIDBKey.h"
#include "WebInputElement.h"
@@ -380,3 +382,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInT
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
+
+#if ENABLE(FILE_SYSTEM)
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent);
+#endif
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
new file mode 100644
index 0000000..08fcea6
--- /dev/null
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -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.
+ */
+#include "config.h"
+#include "AsyncFileSystemChromium.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystemCallbacks.h"
+#include "FileSystem.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath)
+ : AsyncFileSystem(rootPath)
+ , m_webFileSystem(WebKit::webKitClient()->fileSystem())
+{
+ ASSERT(m_webFileSystem);
+}
+
+AsyncFileSystemChromium::~AsyncFileSystemChromium()
+{
+}
+
+void AsyncFileSystemChromium::move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->move(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->copy(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->createFile(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->createDirectory(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->fileExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->directoryExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h
new file mode 100644
index 0000000..f46f78c
--- /dev/null
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AsyncFileSystemChromium_h
+#define AsyncFileSystemChromium_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+class WebFileSystem;
+}
+
+namespace WebCore {
+
+class AsyncFileSystemCallbacks;
+
+class AsyncFileSystemChromium : public AsyncFileSystem {
+public:
+ AsyncFileSystemChromium(const String& rootPath);
+ virtual ~AsyncFileSystemChromium();
+
+ virtual void move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+
+private:
+ WebKit::WebFileSystem* m_webFileSystem;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // AsyncFileSystemChromium_h
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 405fbf6..e6f1400 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -712,6 +712,13 @@ void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* ob
m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));
}
+void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj)
+{
+ // Alert assistive technology about the accessibility object children change
+ if (obj)
+ m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj));
+}
+
#if ENABLE(NOTIFICATIONS)
NotificationPresenter* ChromeClientImpl::notificationPresenter() const
{
@@ -744,18 +751,6 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
}
#endif
-#if USE(GLES2_RENDERING)
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context()
-{
- return m_webView->getOnscreenGLES2Context();
-}
-
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOffscreenGLES2Context()
-{
- return m_webView->getOffscreenGLES2Context();
-}
-#endif
-
bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
{
if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 8763def..bff9f90 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -152,11 +152,6 @@ public:
virtual void scheduleCompositingLayerSync();
#endif
-#if USE(GLES2_RENDERING)
- virtual PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
- virtual PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
-#endif
-
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
@@ -167,6 +162,7 @@ public:
bool handleExternally);
virtual void popupClosed(WebCore::PopupContainer* popupContainer);
virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
+ virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);
// ChromeClientImpl:
void setCursor(const WebCursorInfo& cursor);
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 33f405d..911dcf3 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -200,11 +200,11 @@ void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
webKitClient()->clipboard()->writeImage(webImage, sourceURL, title);
}
-void ChromiumBridge::clipboardWriteData(ClipboardData* data)
+void ChromiumBridge::clipboardWriteData(const String& type,
+ const String& data,
+ const String& metadata)
{
- notImplemented();
- WebDragData dragData; // FIXME: Define the conversion from ClipboardData to WebDragData.
- webKitClient()->clipboard()->writeData(dragData);
+ webKitClient()->clipboard()->writeData(type, data, metadata);
}
HashSet<String> ChromiumBridge::clipboardReadAvailableTypes(
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index fff00b7..b4711eb 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -60,10 +60,9 @@ PassRefPtr<IDBKey> IDBCursorBackendProxy::key() const
return m_idbCursor->key();
}
-PassRefPtr<IDBAny> IDBCursorBackendProxy::value() const
+PassRefPtr<SerializedScriptValue> IDBCursorBackendProxy::value() const
{
- RefPtr<SerializedScriptValue> value = PassRefPtr<SerializedScriptValue>(m_idbCursor->value());
- return IDBAny::create(value.get());
+ return m_idbCursor->value();
}
void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks)
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.h b/WebKit/chromium/src/IDBCursorBackendProxy.h
index d8b621a..8af27cf 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -44,7 +44,7 @@ public:
virtual unsigned short direction() const;
virtual PassRefPtr<IDBKey> key() const;
- virtual PassRefPtr<IDBAny> value() const;
+ virtual PassRefPtr<SerializedScriptValue> value() const;
virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>);
virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
virtual void remove(PassRefPtr<IDBCallbacks>);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index 9aa2977..ce5e0a6 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -94,6 +94,11 @@ void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallb
m_webIDBDatabase->removeObjectStore(name, new WebIDBCallbacksImpl(callbacks));
}
+void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks));
+}
+
PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
{
WebKit::WebDOMStringList names(storeNames);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index ed2016a..42a7d7e 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -52,6 +52,7 @@ public:
virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
+ virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
private:
diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp
new file mode 100644
index 0000000..45365ef
--- /dev/null
+++ b/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LocalFileSystem.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "ErrorCallback.h"
+#include "FileSystemCallback.h"
+#include "FileSystemCallbacks.h"
+#include "PlatformString.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebFrameClient.h"
+#include "WebFrameImpl.h"
+
+using namespace WebKit;
+
+namespace WebCore {
+
+PassRefPtr<LocalFileSystem> LocalFileSystem::create(const String& path)
+{
+ return adoptRef(new LocalFileSystem(path));
+}
+
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(context);
+ if (context->isDocument()) {
+ Document* document = static_cast<Document*>(context);
+ WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
+ webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(new FileSystemCallbacks(successCallback, errorCallback, context)));
+ } else {
+ // FIXME: Add implementation for workers.
+ }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp
index 3aaebfd..4bb9022 100644
--- a/WebKit/chromium/src/WebBindings.cpp
+++ b/WebKit/chromium/src/WebBindings.cpp
@@ -43,6 +43,7 @@
#include "Range.h"
#include "V8BindingState.h"
#include "V8DOMWrapper.h"
+#include "V8Element.h"
#include "V8Event.h"
#include "V8Helpers.h"
#include "V8HiddenPropertyName.h"
@@ -53,6 +54,7 @@
#include "bridge/c/c_utility.h"
#endif
#include "WebDragData.h"
+#include "WebElement.h"
#include "WebRange.h"
#if USE(JAVASCRIPTCORE_BINDINGS)
@@ -295,6 +297,21 @@ static bool getRangeImpl(NPObject* npobj, WebRange* range)
return true;
}
+static bool getElementImpl(NPObject* npObj, WebElement* webElement)
+{
+ if (!npObj || (npObj->_class != npScriptObjectClass))
+ return false;
+
+ V8NPObject* v8NPObject = reinterpret_cast<V8NPObject*>(npObj);
+ v8::Handle<v8::Object> v8Object(v8NPObject->v8Object);
+ Element* native = V8Element::toNative(v8Object);
+ if (!native)
+ return false;
+
+ *webElement = WebElement(native);
+ return true;
+}
+
#endif
bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data)
@@ -323,6 +340,16 @@ bool WebBindings::getRange(NPObject* range, WebRange* webrange)
#endif
}
+bool WebBindings::getElement(NPObject* element, WebElement* webElement)
+{
+#if USE(V8)
+ return getElementImpl(element, webElement);
+#else
+ // Not supported on other ports (JSC, etc.).
+ return false;
+#endif
+}
+
void WebBindings::pushExceptionHandler(ExceptionHandler handler, void* data)
{
WebCore::pushExceptionHandler(handler, data);
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index f45cba9..91f310d 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -85,6 +85,11 @@ WebString WebElement::innerText() const
return constUnwrap<Element>()->innerText();
}
+WebString WebElement::computeInheritedLanguage() const
+{
+ return WebString(constUnwrap<Element>()->computeInheritedLanguage());
+}
+
WebElement::WebElement(const PassRefPtr<Element>& elem)
: WebNode(elem)
{
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
index 2e05d52..bfdd9f2 100644
--- a/WebKit/chromium/src/WebEntities.cpp
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -33,7 +33,6 @@
#include <string.h>
-#include "HTMLEntityTable.h"
#include "PlatformString.h"
#include "StringBuilder.h"
#include <wtf/HashMap.h>
@@ -44,49 +43,17 @@ using namespace WebCore;
namespace WebKit {
-namespace {
-
-void populateMapFromXMLEntities(WTF::HashMap<int, WTF::String>& map)
-{
- ASSERT(map.isEmpty());
- map.set(0x003c, "lt");
- map.set(0x003e, "gt");
- map.set(0x0026, "amp");
- map.set(0x0027, "apos");
- map.set(0x0022, "quot");
-}
-
-void populateMapFromHTMLEntityTable(WTF::HashMap<int, WTF::String>& map)
-{
- ASSERT(map.isEmpty());
- const HTMLEntityTableEntry* entry = HTMLEntityTable::firstEntry();
- const HTMLEntityTableEntry* end = HTMLEntityTable::lastEntry() + 1;
- for (; entry != end; ++entry) {
- String entity = entry->entity;
- int value = entry->value;
- ASSERT(value && !entity.isEmpty());
- if (entity[entity.length() - 1] != ';')
- continue; // We want the canonical version that ends in ;
- // For consistency, use the lower case for entities that have both.
- if (map.contains(value) && map.get(value) == entity.lower())
- continue;
- // Don't register &percnt;, &nsup; and &supl; for some unknown reason.
- if (value == '%' || value == 0x2285 || value == 0x00b9)
- continue;
- map.set(value, entity);
- }
- // We add #39 for some unknown reason.
- map.set(0x0027, String("#39"));
-}
-
-}
-
WebEntities::WebEntities(bool xmlEntities)
{
- if (xmlEntities)
- populateMapFromXMLEntities(m_entitiesMap);
- else
- populateMapFromHTMLEntityTable(m_entitiesMap);
+ ASSERT(m_entitiesMap.isEmpty());
+ m_entitiesMap.set(0x003c, "lt");
+ m_entitiesMap.set(0x003e, "gt");
+ m_entitiesMap.set(0x0026, "amp");
+ m_entitiesMap.set(0x0027, "apos");
+ m_entitiesMap.set(0x0022, "quot");
+ // We add #39 for test-compatibility reason.
+ if (!xmlEntities)
+ m_entitiesMap.set(0x0027, String("#39"));
}
String WebEntities::entityNameByCode(int code) const
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index d29f86d..a23add7 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -32,8 +32,9 @@
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystemCallbacks.h"
+#include "AsyncFileSystemChromium.h"
#include "ExceptionCode.h"
-#include "FileSystemCallbacks.h"
#include "WebFileSystemEntry.h"
#include "WebFileInfo.h"
#include "WebString.h"
@@ -43,7 +44,7 @@ using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<FileSystemCallbacksBase> callbacks)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
: m_callbacks(callbacks)
{
}
@@ -71,14 +72,14 @@ void WebFileSystemCallbacksImpl::didReadDirectory(const WebVector<WebFileSystemE
ASSERT(m_callbacks);
for (size_t i = 0; i < entries.size(); ++i)
m_callbacks->didReadDirectoryEntry(entries[i].name, entries[i].isDirectory);
- m_callbacks->didReadDirectoryChunkDone(hasMore);
+ m_callbacks->didReadDirectoryEntries(hasMore);
if (!hasMore)
delete this;
}
void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path)
{
- m_callbacks->didOpenFileSystem(name, path);
+ m_callbacks->didOpenFileSystem(name, new AsyncFileSystemChromium(path));
delete this;
}
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index f3c6bc3..b9c825b 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -37,7 +37,7 @@
#include <wtf/PassOwnPtr.h>
namespace WebCore {
-class FileSystemCallbacksBase;
+class AsyncFileSystemCallbacks;
}
namespace WebKit {
@@ -48,7 +48,7 @@ class WebString;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::FileSystemCallbacksBase>);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>);
virtual ~WebFileSystemCallbacksImpl();
virtual void didSucceed();
@@ -58,7 +58,7 @@ public:
virtual void didFail(WebFileError error);
private:
- OwnPtr<WebCore::FileSystemCallbacksBase> m_callbacks;
+ OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 4375e73..eb0db7e 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -1690,6 +1690,11 @@ WebString WebFrameImpl::counterValueForElementById(const WebString& id) const
return counterValueForElement(element);
}
+WebString WebFrameImpl::markerTextForListItem(const WebElement& webElement) const
+{
+ return WebCore::markerTextForListItem(const_cast<Element*>(webElement.constUnwrap<Element>()));
+}
+
int WebFrameImpl::pageNumberForElementById(const WebString& id,
float pageWidthInPixels,
float pageHeightInPixels) const
@@ -1811,7 +1816,7 @@ void WebFrameImpl::layout()
// layout this frame
FrameView* view = m_frame->view();
if (view)
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
}
void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect)
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 00e8ecb..14217fa 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -176,6 +176,7 @@ public:
virtual WebString contentAsMarkup() const;
virtual WebString renderTreeAsText() const;
virtual WebString counterValueForElementById(const WebString& id) const;
+ virtual WebString markerTextForListItem(const WebElement&) const;
virtual int pageNumberForElementById(const WebString& id,
float pageWidthInPixels,
float pageHeightInPixels) const;
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.cpp b/WebKit/chromium/src/WebIDBCursorImpl.cpp
index 1ade687..b74d680 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -57,7 +57,7 @@ WebIDBKey WebIDBCursorImpl::key() const
WebSerializedScriptValue WebIDBCursorImpl::value() const
{
- return m_idbCursorBackend->value()->serializedScriptValue();
+ return m_idbCursorBackend->value();
}
void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index bd3600f..8870ff9 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -87,6 +87,11 @@ void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, WebIDBCallback
m_databaseBackend->removeObjectStore(name, IDBCallbacksProxy::create(callbacks));
}
+void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks)
+{
+ m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks));
+}
+
WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
{
RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 9ae74e0..e0eaaa5 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -52,6 +52,7 @@ public:
virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks);
virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode);
virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks);
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks);
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout);
private:
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 3b88335..7bf6407 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -140,6 +140,11 @@ int WebInputElement::selectionEnd()
return unwrap<HTMLInputElement>()->selectionEnd();
}
+bool WebInputElement::isValidValue(const WebString& value) const
+{
+ return constUnwrap<HTMLInputElement>()->isValidValue(value);
+}
+
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
{
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 6aa8439..bfc1bec 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -138,6 +138,12 @@ void WebNotification::dispatchCloseEvent(bool /* byUser */)
m_private->dispatchEvent(event.release());
}
+void WebNotification::dispatchClickEvent()
+{
+ RefPtr<Event> event = Event::create(eventNames().clickEvent, false, true);
+ m_private->dispatchEvent(event.release());
+}
+
WebNotification::WebNotification(const WTF::PassRefPtr<Notification>& notification)
: m_private(static_cast<WebNotificationPrivate*>(notification.releaseRef()))
{
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 9e21d58..2279eeb 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -256,4 +256,36 @@ bool WebRuntimeFeatures::isSpeechInputEnabled()
return RuntimeEnabledFeatures::speechInputEnabled();
}
+void WebRuntimeFeatures::enableXHRResponseBlob(bool enable)
+{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ RuntimeEnabledFeatures::setXHRResponseBlobEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isXHRResponseBlobEnabled()
+{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ return RuntimeEnabledFeatures::xhrResponseBlobEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableFileSystem(bool enable)
+{
+#if ENABLE(FILE_SYSTEM)
+ RuntimeEnabledFeatures::setFileSystemEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isFileSystemEnabled()
+{
+#if ENABLE(FILE_SYSTEM)
+ return RuntimeEnabledFeatures::fileSystemEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebScrollbarImpl.cpp b/WebKit/chromium/src/WebScrollbarImpl.cpp
index 8bf5340..c0131cb 100644
--- a/WebKit/chromium/src/WebScrollbarImpl.cpp
+++ b/WebKit/chromium/src/WebScrollbarImpl.cpp
@@ -81,7 +81,7 @@ void WebScrollbarImpl::setLocation(const WebRect& rect)
m_scrollbar->invalidate();
int length = m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar->width() : m_scrollbar->height();
- int pageStep = max(max<int>(length * Scrollbar::minFractionToStepWhenPaging(), length - Scrollbar::maxOverlapBetweenPages()), 1);
+ int pageStep = max(max(static_cast<int>(static_cast<float>(length) * Scrollbar::minFractionToStepWhenPaging()), length - Scrollbar::maxOverlapBetweenPages()), 1);
m_scrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_scrollbar->setEnabled(m_scrollbar->totalSize() > length);
m_scrollbar->setProportion(length, m_scrollbar->totalSize());
@@ -214,7 +214,7 @@ bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event)
if (mousewheel.scrollByPage) {
ASSERT(m_scrollbar->orientation() == VerticalScrollbar);
bool negative = delta < 0;
- delta = max(max<int>(m_scrollbar->visibleSize() * Scrollbar::minFractionToStepWhenPaging(), m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages()), 1);
+ delta = max(max(static_cast<float>(m_scrollbar->visibleSize()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
if (negative)
delta *= -1;
}
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 14ece13..1864514 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -187,7 +187,7 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
if (!formElement->appendFormData(dataList, false))
continue;
- const BlobItemList& items = dataList.items();
+ const Vector<FormDataList::Item>& items = dataList.items();
if (isTextElement && !items.isEmpty()) {
if (textElement) {
// The auto-complete bar only knows how to fill in one value.
@@ -196,22 +196,20 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
}
textElement = static_cast<HTMLInputElement*>(formElement);
}
- for (BlobItemList::const_iterator j(items.begin()); j != items.end(); ++j) {
- const StringBlobItem* item = (*j)->toStringBlobItem();
- ASSERT(item);
+ for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != items.end(); ++j) {
// Handle ISINDEX / <input name=isindex> specially, but only if it's
// the first entry.
- if (!encodedString->isEmpty() || item->cstr() != "isindex") {
+ if (!encodedString->isEmpty() || j->data() != "isindex") {
if (!encodedString->isEmpty())
encodedString->append('&');
- FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
encodedString->append('=');
}
++j;
if (formElement == textElement)
encodedString->append("{searchTerms}", 13);
else
- FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
}
}
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 383b716..4b129d6 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -823,13 +823,10 @@ bool WebViewImpl::propagateScroll(ScrollDirection scrollDirection,
if (!frame)
return false;
- bool scrollHandled =
- frame->eventHandler()->scrollOverflow(scrollDirection,
- scrollGranularity);
+ bool scrollHandled = frame->eventHandler()->scrollOverflow(scrollDirection, scrollGranularity);
Frame* currentFrame = frame;
while (!scrollHandled && currentFrame) {
- scrollHandled = currentFrame->view()->scroll(scrollDirection,
- scrollGranularity);
+ scrollHandled = currentFrame->view()->scroll(scrollDirection, scrollGranularity);
currentFrame = currentFrame->tree()->parent();
}
return scrollHandled;
@@ -2120,9 +2117,13 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (active) {
m_layerRenderer = LayerRendererChromium::create(getOnscreenGLES2Context());
- if (m_layerRenderer->hardwareCompositing())
+ if (m_layerRenderer->hardwareCompositing()) {
m_isAcceleratedCompositingActive = true;
- else {
+
+ // Force a redraw the entire view so that the compositor gets the entire view,
+ // rather than just the currently-dirty subset.
+ m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
+ } else {
m_layerRenderer.clear();
m_isAcceleratedCompositingActive = false;
}
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index e3e0204..f55be4e 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -34,39 +34,10 @@
* DevTools frontend together. It is also responsible for overriding existing
* WebInspector functionality while it is getting upstreamed into WebCore.
*/
-devtools.ToolsAgent = function()
-{
- this.profilerAgent_ = new devtools.ProfilerAgent();
-};
-
-
-/**
- * @return {devtools.ProfilerAgent} Profiler agent instance.
- */
-devtools.ToolsAgent.prototype.getProfilerAgent = function()
-{
- return this.profilerAgent_;
-};
-
-
-
-/**
- * Global instance of the tools agent.
- * @type {devtools.ToolsAgent}
- */
-devtools.tools = null;
-
var context = {}; // Used by WebCore's inspector routines.
-///////////////////////////////////////////////////////////////////////////////
-// Here and below are overrides to existing WebInspector methods only.
-// TODO(pfeldman): Patch WebCore and upstream changes.
-var oldLoaded = WebInspector.loaded;
-WebInspector.loaded = function()
-{
- devtools.tools = new devtools.ToolsAgent();
-
+(function () {
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
Preferences.heapProfilerPresent = true;
@@ -75,9 +46,9 @@ WebInspector.loaded = function()
Preferences.canEditScriptSource = true;
Preferences.onlineDetectionEnabled = false;
Preferences.domBreakpointsEnabled = true;
+})();
- oldLoaded.call(WebInspector);
-}
+var devtools = devtools || {};
devtools.domContentLoaded = function()
{
@@ -88,12 +59,12 @@ devtools.domContentLoaded = function()
document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
+// FIXME: This needs to be upstreamed.
(function InterceptProfilesPanelEvents()
{
var oldShow = WebInspector.ProfilesPanel.prototype.show;
WebInspector.ProfilesPanel.prototype.show = function()
{
- devtools.tools.getProfilerAgent().initializeProfiling();
this.enableToggleButton.visible = false;
oldShow.call(this);
// Show is called on every show event of a panel, so
diff --git a/WebKit/chromium/src/js/HeapProfilerPanel.js b/WebKit/chromium/src/js/HeapProfilerPanel.js
deleted file mode 100644
index bcb008f..0000000
--- a/WebKit/chromium/src/js/HeapProfilerPanel.js
+++ /dev/null
@@ -1,966 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * @fileoverview Heap profiler panel implementation.
- */
-
-WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) {
- snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number);
- snapshot.typeId = WebInspector.HeapSnapshotProfileType.TypeId;
-
- var snapshots = WebInspector.HeapSnapshotProfileType.snapshots;
- snapshots.push(snapshot);
-
- snapshot.listIndex = snapshots.length - 1;
-
- if (WebInspector.CPUProfile)
- this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snapshot);
- else
- this.addProfileHeader(snapshot);
-
- this.dispatchEventToListeners("snapshot added");
-}
-
-
-WebInspector.HeapSnapshotView = function(parent, profile)
-{
- WebInspector.View.call(this);
-
- this.element.addStyleClass("heap-snapshot-view");
-
- this.parent = parent;
- this.parent.addEventListener("snapshot added", this._updateBaseOptions, this);
-
- this.showCountAsPercent = false;
- this.showSizeAsPercent = false;
- this.showCountDeltaAsPercent = false;
- this.showSizeDeltaAsPercent = false;
-
- this.categories = {
- code: new WebInspector.ResourceCategory("code", WebInspector.UIString("Code"), "rgb(255,121,0)"),
- data: new WebInspector.ResourceCategory("data", WebInspector.UIString("Objects"), "rgb(47,102,236)")
- };
-
- var summaryContainer = document.createElement("div");
- summaryContainer.id = "heap-snapshot-summary-container";
-
- this.countsSummaryBar = new WebInspector.SummaryBar(this.categories);
- this.countsSummaryBar.element.className = "heap-snapshot-summary";
- this.countsSummaryBar.calculator = new WebInspector.HeapSummaryCountCalculator();
- var countsLabel = document.createElement("div");
- countsLabel.className = "heap-snapshot-summary-label";
- countsLabel.textContent = WebInspector.UIString("Count");
- this.countsSummaryBar.element.appendChild(countsLabel);
- summaryContainer.appendChild(this.countsSummaryBar.element);
-
- this.sizesSummaryBar = new WebInspector.SummaryBar(this.categories);
- this.sizesSummaryBar.element.className = "heap-snapshot-summary";
- this.sizesSummaryBar.calculator = new WebInspector.HeapSummarySizeCalculator();
- var sizesLabel = document.createElement("label");
- sizesLabel.className = "heap-snapshot-summary-label";
- sizesLabel.textContent = WebInspector.UIString("Size");
- this.sizesSummaryBar.element.appendChild(sizesLabel);
- summaryContainer.appendChild(this.sizesSummaryBar.element);
-
- this.element.appendChild(summaryContainer);
-
- var columns = { "cons": { title: WebInspector.UIString("Constructor"), disclosure: true, sortable: true },
- "count": { title: WebInspector.UIString("Count"), width: "54px", sortable: true },
- "size": { title: WebInspector.UIString("Size"), width: "72px", sort: "descending", sortable: true },
- "countDelta": { title: WebInspector.UIString("\xb1 Count"), width: "72px", sortable: true },
- "sizeDelta": { title: WebInspector.UIString("\xb1 Size"), width: "72px", sortable: true } };
-
- this.dataGrid = new WebInspector.DataGrid(columns);
- this.dataGrid.addEventListener("sorting changed", this._sortData, this);
- this.dataGrid.element.addEventListener("mousedown", this._mouseDownInDataGrid.bind(this), true);
- this.element.appendChild(this.dataGrid.element);
-
- this.profile = profile;
-
- this.baseSelectElement = document.createElement("select");
- this.baseSelectElement.className = "status-bar-item";
- this.baseSelectElement.addEventListener("change", this._changeBase.bind(this), false);
- this._updateBaseOptions();
- if (this.profile.listIndex > 0)
- this.baseSelectElement.selectedIndex = this.profile.listIndex - 1;
- else
- this.baseSelectElement.selectedIndex = this.profile.listIndex;
- this._resetDataGridList();
-
- this.percentButton = new WebInspector.StatusBarButton("", "percent-time-status-bar-item status-bar-item");
- this.percentButton.addEventListener("click", this._percentClicked.bind(this), false);
-
- this.refresh();
-
- this._updatePercentButton();
-};
-
-WebInspector.HeapSnapshotView.prototype = {
-
- get statusBarItems()
- {
- return [this.baseSelectElement, this.percentButton.element];
- },
-
- get profile()
- {
- return this._profile;
- },
-
- set profile(profile)
- {
- this._profile = profile;
- },
-
- show: function(parentElement)
- {
- WebInspector.View.prototype.show.call(this, parentElement);
- this.dataGrid.updateWidths();
- },
-
- hide: function()
- {
- WebInspector.View.prototype.hide.call(this);
- this._currentSearchResultIndex = -1;
- },
-
- resize: function()
- {
- if (this.dataGrid)
- this.dataGrid.updateWidths();
- },
-
- refresh: function()
- {
- this.dataGrid.removeChildren();
-
- var children = this.snapshotDataGridList.children;
- var count = children.length;
- for (var index = 0; index < count; ++index)
- this.dataGrid.appendChild(children[index]);
-
- this._updateSummaryGraph();
- },
-
- refreshShowAsPercents: function()
- {
- this._updatePercentButton();
- this.refreshVisibleData();
- },
-
- _deleteSearchMatchedFlags: function(node)
- {
- delete node._searchMatchedConsColumn;
- delete node._searchMatchedCountColumn;
- delete node._searchMatchedSizeColumn;
- delete node._searchMatchedCountDeltaColumn;
- delete node._searchMatchedSizeDeltaColumn;
- },
-
- searchCanceled: function()
- {
- if (this._searchResults) {
- for (var i = 0; i < this._searchResults.length; ++i) {
- var profileNode = this._searchResults[i].profileNode;
- this._deleteSearchMatchedFlags(profileNode);
- profileNode.refresh();
- }
- }
-
- delete this._searchFinishedCallback;
- this._currentSearchResultIndex = -1;
- this._searchResults = [];
- },
-
- performSearch: function(query, finishedCallback)
- {
- // Call searchCanceled since it will reset everything we need before doing a new search.
- this.searchCanceled();
-
- query = query.trim();
-
- if (!query.length)
- return;
-
- this._searchFinishedCallback = finishedCallback;
-
- var helper = WebInspector.HeapSnapshotView.SearchHelper;
-
- var operationAndNumber = helper.parseOperationAndNumber(query);
- var operation = operationAndNumber[0];
- var queryNumber = operationAndNumber[1];
-
- var percentUnits = helper.percents.test(query);
- var megaBytesUnits = helper.megaBytes.test(query);
- var kiloBytesUnits = helper.kiloBytes.test(query);
- var bytesUnits = helper.bytes.test(query);
-
- var queryNumberBytes = (megaBytesUnits ? (queryNumber * 1024 * 1024) : (kiloBytesUnits ? (queryNumber * 1024) : queryNumber));
-
- function matchesQuery(heapSnapshotDataGridNode)
- {
- WebInspector.HeapSnapshotView.prototype._deleteSearchMatchedFlags(heapSnapshotDataGridNode);
-
- if (percentUnits) {
- heapSnapshotDataGridNode._searchMatchedCountColumn = operation(heapSnapshotDataGridNode.countPercent, queryNumber);
- heapSnapshotDataGridNode._searchMatchedSizeColumn = operation(heapSnapshotDataGridNode.sizePercent, queryNumber);
- heapSnapshotDataGridNode._searchMatchedCountDeltaColumn = operation(heapSnapshotDataGridNode.countDeltaPercent, queryNumber);
- heapSnapshotDataGridNode._searchMatchedSizeDeltaColumn = operation(heapSnapshotDataGridNode.sizeDeltaPercent, queryNumber);
- } else if (megaBytesUnits || kiloBytesUnits || bytesUnits) {
- heapSnapshotDataGridNode._searchMatchedSizeColumn = operation(heapSnapshotDataGridNode.size, queryNumberBytes);
- heapSnapshotDataGridNode._searchMatchedSizeDeltaColumn = operation(heapSnapshotDataGridNode.sizeDelta, queryNumberBytes);
- } else {
- heapSnapshotDataGridNode._searchMatchedCountColumn = operation(heapSnapshotDataGridNode.count, queryNumber);
- heapSnapshotDataGridNode._searchMatchedCountDeltaColumn = operation(heapSnapshotDataGridNode.countDelta, queryNumber);
- }
-
- if (heapSnapshotDataGridNode.constructorName.hasSubstring(query, true))
- heapSnapshotDataGridNode._searchMatchedConsColumn = true;
-
- if (heapSnapshotDataGridNode._searchMatchedConsColumn ||
- heapSnapshotDataGridNode._searchMatchedCountColumn ||
- heapSnapshotDataGridNode._searchMatchedSizeColumn ||
- heapSnapshotDataGridNode._searchMatchedCountDeltaColumn ||
- heapSnapshotDataGridNode._searchMatchedSizeDeltaColumn) {
- heapSnapshotDataGridNode.refresh();
- return true;
- }
-
- return false;
- }
-
- var current = this.snapshotDataGridList.children[0];
- var depth = 0;
- var info = {};
-
- // The second and subsequent levels of heap snapshot nodes represent retainers,
- // so recursive expansion will be infinite, since a graph is being traversed.
- // So default to a recursion cap of 2 levels.
- var maxDepth = 2;
-
- while (current) {
- if (matchesQuery(current))
- this._searchResults.push({ profileNode: current });
- current = current.traverseNextNode(false, null, (depth >= maxDepth), info);
- depth += info.depthChange;
- }
-
- finishedCallback(this, this._searchResults.length);
- },
-
- jumpToFirstSearchResult: WebInspector.CPUProfileView.prototype.jumpToFirstSearchResult,
- jumpToLastSearchResult: WebInspector.CPUProfileView.prototype.jumpToLastSearchResult,
- jumpToNextSearchResult: WebInspector.CPUProfileView.prototype.jumpToNextSearchResult,
- jumpToPreviousSearchResult: WebInspector.CPUProfileView.prototype.jumpToPreviousSearchResult,
- showingFirstSearchResult: WebInspector.CPUProfileView.prototype.showingFirstSearchResult,
- showingLastSearchResult: WebInspector.CPUProfileView.prototype.showingLastSearchResult,
- _jumpToSearchResult: WebInspector.CPUProfileView.prototype._jumpToSearchResult,
-
- refreshVisibleData: function()
- {
- var child = this.dataGrid.children[0];
- while (child) {
- child.refresh();
- child = child.traverseNextNode(false, null, true);
- }
- this._updateSummaryGraph();
- },
-
- _changeBase: function() {
- if (this.baseSnapshot === WebInspector.HeapSnapshotProfileType.snapshots[this.baseSelectElement.selectedIndex])
- return;
-
- this._resetDataGridList();
- this.refresh();
-
- if (!this.currentQuery || !this._searchFinishedCallback || !this._searchResults)
- return;
-
- // The current search needs to be performed again. First negate out previous match
- // count by calling the search finished callback with a negative number of matches.
- // Then perform the search again with the same query and callback.
- this._searchFinishedCallback(this, -this._searchResults.length);
- this.performSearch(this.currentQuery, this._searchFinishedCallback);
- },
-
- _createSnapshotDataGridList: function()
- {
- if (this._snapshotDataGridList)
- delete this._snapshotDataGridList;
-
- this._snapshotDataGridList = new WebInspector.HeapSnapshotDataGridList(this, this.baseSnapshot.entries, this.profile.entries);
- return this._snapshotDataGridList;
- },
-
- _mouseDownInDataGrid: function(event)
- {
- if (event.detail < 2)
- return;
-
- var cell = event.target.enclosingNodeOrSelfWithNodeName("td");
- if (!cell || (!cell.hasStyleClass("count-column") && !cell.hasStyleClass("size-column") && !cell.hasStyleClass("countDelta-column") && !cell.hasStyleClass("sizeDelta-column")))
- return;
-
- if (cell.hasStyleClass("count-column"))
- this.showCountAsPercent = !this.showCountAsPercent;
- else if (cell.hasStyleClass("size-column"))
- this.showSizeAsPercent = !this.showSizeAsPercent;
- else if (cell.hasStyleClass("countDelta-column"))
- this.showCountDeltaAsPercent = !this.showCountDeltaAsPercent;
- else if (cell.hasStyleClass("sizeDelta-column"))
- this.showSizeDeltaAsPercent = !this.showSizeDeltaAsPercent;
-
- this.refreshShowAsPercents();
-
- event.preventDefault();
- event.stopPropagation();
- },
-
- get _isShowingAsPercent()
- {
- return this.showCountAsPercent && this.showSizeAsPercent && this.showCountDeltaAsPercent && this.showSizeDeltaAsPercent;
- },
-
- _percentClicked: function(event)
- {
- var currentState = this._isShowingAsPercent;
- this.showCountAsPercent = !currentState;
- this.showSizeAsPercent = !currentState;
- this.showCountDeltaAsPercent = !currentState;
- this.showSizeDeltaAsPercent = !currentState;
- this.refreshShowAsPercents();
- },
-
- _resetDataGridList: function()
- {
- this.baseSnapshot = WebInspector.HeapSnapshotProfileType.snapshots[this.baseSelectElement.selectedIndex];
- var lastComparator = WebInspector.HeapSnapshotDataGridList.propertyComparator("size", false);
- if (this.snapshotDataGridList)
- lastComparator = this.snapshotDataGridList.lastComparator;
- this.snapshotDataGridList = this._createSnapshotDataGridList();
- this.snapshotDataGridList.sort(lastComparator, true);
- },
-
- _sortData: function()
- {
- var sortAscending = this.dataGrid.sortOrder === "ascending";
- var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier;
- var sortProperty = {
- "cons": ["constructorName", null],
- "count": ["count", null],
- "size": ["size", "count"],
- "countDelta": this.showCountDeltaAsPercent ? ["countDeltaPercent", null] : ["countDelta", null],
- "sizeDelta": this.showSizeDeltaAsPercent ? ["sizeDeltaPercent", "countDeltaPercent"] : ["sizeDelta", "sizeDeltaPercent"]
- }[sortColumnIdentifier];
-
- this.snapshotDataGridList.sort(WebInspector.HeapSnapshotDataGridList.propertyComparator(sortProperty[0], sortProperty[1], sortAscending));
-
- this.refresh();
- },
-
- _updateBaseOptions: function()
- {
- var list = WebInspector.HeapSnapshotProfileType.snapshots;
- // We're assuming that snapshots can only be added.
- if (this.baseSelectElement.length === list.length)
- return;
-
- for (var i = this.baseSelectElement.length, n = list.length; i < n; ++i) {
- var baseOption = document.createElement("option");
- baseOption.label = WebInspector.UIString("Compared to %s", list[i].title);
- this.baseSelectElement.appendChild(baseOption);
- }
- },
-
- _updatePercentButton: function()
- {
- if (this._isShowingAsPercent) {
- this.percentButton.title = WebInspector.UIString("Show absolute counts and sizes.");
- this.percentButton.toggled = true;
- } else {
- this.percentButton.title = WebInspector.UIString("Show counts and sizes as percentages.");
- this.percentButton.toggled = false;
- }
- },
-
- _updateSummaryGraph: function()
- {
- this.countsSummaryBar.calculator.showAsPercent = this._isShowingAsPercent;
- this.countsSummaryBar.update(this.profile.lowlevels);
-
- this.sizesSummaryBar.calculator.showAsPercent = this._isShowingAsPercent;
- this.sizesSummaryBar.update(this.profile.lowlevels);
- }
-};
-
-WebInspector.HeapSnapshotView.prototype.__proto__ = WebInspector.View.prototype;
-
-WebInspector.HeapSnapshotView.SearchHelper = {
- // In comparators, we assume that a value from a node is passed as the first parameter.
- operations: { LESS: function (a, b) { return a !== null && a < b; },
- LESS_OR_EQUAL: function (a, b) { return a !== null && a <= b; },
- EQUAL: function (a, b) { return a !== null && a === b; },
- GREATER_OR_EQUAL: function (a, b) { return a !== null && a >= b; },
- GREATER: function (a, b) { return a !== null && a > b; } },
-
- operationParsers: { LESS: /^<(\d+)/,
- LESS_OR_EQUAL: /^<=(\d+)/,
- GREATER_OR_EQUAL: /^>=(\d+)/,
- GREATER: /^>(\d+)/ },
-
- parseOperationAndNumber: function(query)
- {
- var operations = WebInspector.HeapSnapshotView.SearchHelper.operations;
- var parsers = WebInspector.HeapSnapshotView.SearchHelper.operationParsers;
- for (var operation in parsers) {
- var match = query.match(parsers[operation]);
- if (match !== null)
- return [operations[operation], parseFloat(match[1])];
- }
- return [operations.EQUAL, parseFloat(query)];
- },
-
- percents: /%$/,
-
- megaBytes: /MB$/i,
-
- kiloBytes: /KB$/i,
-
- bytes: /B$/i
-}
-
-WebInspector.HeapSummaryCalculator = function(lowLevelField)
-{
- this.total = 1;
- this.lowLevelField = lowLevelField;
-}
-
-WebInspector.HeapSummaryCalculator.prototype = {
- computeSummaryValues: function(lowLevels)
- {
- var highLevels = {data: 0, code: 0};
- this.total = 0;
- for (var item in lowLevels) {
- var highItem = this._highFromLow(item);
- if (highItem) {
- var value = lowLevels[item][this.lowLevelField];
- highLevels[highItem] += value;
- this.total += value;
- }
- }
- var result = {categoryValues: highLevels};
- if (!this.showAsPercent)
- result.total = this.total;
- return result;
- },
-
- formatValue: function(value)
- {
- if (this.showAsPercent)
- return WebInspector.UIString("%.2f%%", value / this.total * 100.0);
- else
- return this._valueToString(value);
- },
-
- get showAsPercent()
- {
- return this._showAsPercent;
- },
-
- set showAsPercent(x)
- {
- this._showAsPercent = x;
- }
-}
-
-WebInspector.HeapSummaryCountCalculator = function()
-{
- WebInspector.HeapSummaryCalculator.call(this, "count");
-}
-
-WebInspector.HeapSummaryCountCalculator.prototype = {
- _highFromLow: function(type) {
- if (type === "CODE_TYPE" || type === "SHARED_FUNCTION_INFO_TYPE" || type === "SCRIPT_TYPE") return "code";
- if (type === "STRING_TYPE" || type === "HEAP_NUMBER_TYPE" || type.match(/^JS_/)) return "data";
- return null;
- },
-
- _valueToString: function(value) {
- return value.toString();
- }
-}
-
-WebInspector.HeapSummaryCountCalculator.prototype.__proto__ = WebInspector.HeapSummaryCalculator.prototype;
-
-WebInspector.HeapSummarySizeCalculator = function()
-{
- WebInspector.HeapSummaryCalculator.call(this, "size");
-}
-
-WebInspector.HeapSummarySizeCalculator.prototype = {
- _highFromLow: function(type) {
- if (type === "CODE_TYPE" || type === "SHARED_FUNCTION_INFO_TYPE" || type === "SCRIPT_TYPE") return "code";
- if (type === "STRING_TYPE" || type === "HEAP_NUMBER_TYPE" || type.match(/^JS_/) || type.match(/_ARRAY_TYPE$/)) return "data";
- return null;
- },
-
- _valueToString: Number.bytesToString
-}
-
-WebInspector.HeapSummarySizeCalculator.prototype.__proto__ = WebInspector.HeapSummaryCalculator.prototype;
-
-WebInspector.HeapSnapshotSidebarTreeElement = function(snapshot)
-{
- this.profile = snapshot;
-
- WebInspector.SidebarTreeElement.call(this, "heap-snapshot-sidebar-tree-item", "", "", snapshot, false);
-
- this.refreshTitles();
-};
-
-WebInspector.HeapSnapshotSidebarTreeElement.prototype = {
- get mainTitle()
- {
- if (this._mainTitle)
- return this._mainTitle;
- return this.profile.title;
- },
-
- set mainTitle(x)
- {
- this._mainTitle = x;
- this.refreshTitles();
- }
-};
-
-WebInspector.HeapSnapshotSidebarTreeElement.prototype.__proto__ = WebInspector.ProfileSidebarTreeElement.prototype;
-
-WebInspector.HeapSnapshotDataGridNodeWithRetainers = function(owningTree)
-{
- this.tree = owningTree;
-
- WebInspector.DataGridNode.call(this, null, this._hasRetainers);
-
- this.addEventListener("populate", this._populate, this);
-};
-
-WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype = {
- isEmptySet: function(set)
- {
- for (var x in set)
- return false;
- return true;
- },
-
- get _hasRetainers()
- {
- return !this.isEmptySet(this.retainers);
- },
-
- get _parent()
- {
- // For top-level nodes, return owning tree as a parent, not data grid.
- return this.parent !== this.dataGrid ? this.parent : this.tree;
- },
-
- _populate: function(event)
- {
- var self = this;
- this.produceDiff(this.baseRetainers, this.retainers, function(baseItem, snapshotItem) {
- self.appendChild(new WebInspector.HeapSnapshotDataGridRetainerNode(self.snapshotView, baseItem, snapshotItem, self.tree));
- });
-
- if (this._parent) {
- var currentComparator = this._parent.lastComparator;
- if (currentComparator)
- this.sort(currentComparator, true);
- }
-
- this.removeEventListener("populate", this._populate, this);
- },
-
- produceDiff: function(baseEntries, currentEntries, callback)
- {
- for (var item in currentEntries)
- callback(baseEntries[item], currentEntries[item]);
-
- for (item in baseEntries) {
- if (!(item in currentEntries))
- callback(baseEntries[item], null);
- }
- },
-
- sort: function(comparator, force) {
- if (!force && this.lastComparator === comparator)
- return;
-
- this.children.sort(comparator);
- var childCount = this.children.length;
- for (var childIndex = 0; childIndex < childCount; ++childIndex)
- this.children[childIndex]._recalculateSiblings(childIndex);
- for (var i = 0; i < this.children.length; ++i) {
- var child = this.children[i];
- if (!force && (!child.expanded || child.lastComparator === comparator))
- continue;
- child.sort(comparator, force);
- }
- this.lastComparator = comparator;
- },
-
- signForDelta: function(delta) {
- if (delta === 0)
- return "";
- if (delta > 0)
- return "+";
- else
- // Math minus sign, same width as plus.
- return "\u2212";
- },
-
- showDeltaAsPercent: function(value) {
- if (value === Number.POSITIVE_INFINITY)
- return WebInspector.UIString("new");
- else if (value === Number.NEGATIVE_INFINITY)
- return WebInspector.UIString("deleted");
- if (value > 1000.0)
- return WebInspector.UIString("%s >1000%%", this.signForDelta(value));
- return WebInspector.UIString("%s%.2f%%", this.signForDelta(value), Math.abs(value));
- },
-
- getTotalCount: function() {
- if (!this._count) {
- this._count = 0;
- for (var i = 0, n = this.children.length; i < n; ++i)
- this._count += this.children[i].count;
- }
- return this._count;
- },
-
- getTotalSize: function() {
- if (!this._size) {
- this._size = 0;
- for (var i = 0, n = this.children.length; i < n; ++i)
- this._size += this.children[i].size;
- }
- return this._size;
- },
-
- get countPercent()
- {
- return this.count / this._parent.getTotalCount() * 100.0;
- },
-
- get sizePercent()
- {
- return this.size / this._parent.getTotalSize() * 100.0;
- },
-
- get countDeltaPercent()
- {
- if (this.baseCount > 0) {
- if (this.count > 0)
- return this.countDelta / this.baseCount * 100.0;
- else
- return Number.NEGATIVE_INFINITY;
- } else
- return Number.POSITIVE_INFINITY;
- },
-
- get sizeDeltaPercent()
- {
- if (this.baseSize > 0) {
- if (this.size > 0)
- return this.sizeDelta / this.baseSize * 100.0;
- else
- return Number.NEGATIVE_INFINITY;
- } else
- return Number.POSITIVE_INFINITY;
- },
-
- get data()
- {
- var data = {};
-
- data["cons"] = this.constructorName;
-
- if (this.snapshotView.showCountAsPercent)
- data["count"] = WebInspector.UIString("%.2f%%", this.countPercent);
- else
- data["count"] = this.count;
-
- if (this.size !== null) {
- if (this.snapshotView.showSizeAsPercent)
- data["size"] = WebInspector.UIString("%.2f%%", this.sizePercent);
- else
- data["size"] = Number.bytesToString(this.size);
- } else
- data["size"] = "";
-
- if (this.snapshotView.showCountDeltaAsPercent)
- data["countDelta"] = this.showDeltaAsPercent(this.countDeltaPercent);
- else
- data["countDelta"] = WebInspector.UIString("%s%d", this.signForDelta(this.countDelta), Math.abs(this.countDelta));
-
- if (this.sizeDelta !== null) {
- if (this.snapshotView.showSizeDeltaAsPercent)
- data["sizeDelta"] = this.showDeltaAsPercent(this.sizeDeltaPercent);
- else
- data["sizeDelta"] = WebInspector.UIString("%s%s", this.signForDelta(this.sizeDelta), Number.bytesToString(Math.abs(this.sizeDelta)));
- } else
- data["sizeDelta"] = "";
-
- return data;
- },
-
- createCell: function(columnIdentifier)
- {
- var cell = WebInspector.DataGridNode.prototype.createCell.call(this, columnIdentifier);
-
- if ((columnIdentifier === "cons" && this._searchMatchedConsColumn) ||
- (columnIdentifier === "count" && this._searchMatchedCountColumn) ||
- (columnIdentifier === "size" && this._searchMatchedSizeColumn) ||
- (columnIdentifier === "countDelta" && this._searchMatchedCountDeltaColumn) ||
- (columnIdentifier === "sizeDelta" && this._searchMatchedSizeDeltaColumn))
- cell.addStyleClass("highlight");
-
- return cell;
- }
-};
-
-WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.__proto__ = WebInspector.DataGridNode.prototype;
-
-WebInspector.HeapSnapshotDataGridNode = function(snapshotView, baseEntry, snapshotEntry, owningTree)
-{
- this.snapshotView = snapshotView;
-
- if (!snapshotEntry)
- snapshotEntry = { cons: baseEntry.cons, count: 0, size: 0, retainers: {} };
- this.constructorName = snapshotEntry.cons;
- this.count = snapshotEntry.count;
- this.size = snapshotEntry.size;
- this.retainers = snapshotEntry.retainers;
-
- if (!baseEntry)
- baseEntry = { count: 0, size: 0, retainers: {} };
- this.baseCount = baseEntry.count;
- this.countDelta = this.count - this.baseCount;
- this.baseSize = baseEntry.size;
- this.sizeDelta = this.size - this.baseSize;
- this.baseRetainers = baseEntry.retainers;
-
- WebInspector.HeapSnapshotDataGridNodeWithRetainers.call(this, owningTree);
-};
-
-WebInspector.HeapSnapshotDataGridNode.prototype.__proto__ = WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype;
-
-WebInspector.HeapSnapshotDataGridList = function(snapshotView, baseEntries, snapshotEntries)
-{
- this.tree = this;
- this.snapshotView = snapshotView;
- this.children = [];
- this.lastComparator = null;
- this.populateChildren(baseEntries, snapshotEntries);
-};
-
-WebInspector.HeapSnapshotDataGridList.prototype = {
- appendChild: function(child)
- {
- this.insertChild(child, this.children.length);
- },
-
- insertChild: function(child, index)
- {
- this.children.splice(index, 0, child);
- },
-
- removeChildren: function()
- {
- this.children = [];
- },
-
- populateChildren: function(baseEntries, snapshotEntries)
- {
- var self = this;
- this.produceDiff(baseEntries, snapshotEntries, function(baseItem, snapshotItem) {
- self.appendChild(new WebInspector.HeapSnapshotDataGridNode(self.snapshotView, baseItem, snapshotItem, self));
- });
- },
-
- produceDiff: WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.produceDiff,
- sort: WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.sort,
- getTotalCount: WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalCount,
- getTotalSize: WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalSize
-};
-
-WebInspector.HeapSnapshotDataGridList.propertyComparators = [{}, {}];
-
-WebInspector.HeapSnapshotDataGridList.propertyComparator = function(property, property2, isAscending)
-{
- var propertyHash = property + "#" + property2;
- var comparator = this.propertyComparators[(isAscending ? 1 : 0)][propertyHash];
- if (!comparator) {
- comparator = function(lhs, rhs) {
- var l = lhs[property], r = rhs[property];
- if ((l === null || r === null) && property2 !== null)
- l = lhs[property2], r = rhs[property2];
- var result = l < r ? -1 : (l > r ? 1 : 0);
- return isAscending ? result : -result;
- };
- this.propertyComparators[(isAscending ? 1 : 0)][propertyHash] = comparator;
- }
- return comparator;
-};
-
-WebInspector.HeapSnapshotDataGridRetainerNode = function(snapshotView, baseEntry, snapshotEntry, owningTree)
-{
- this.snapshotView = snapshotView;
-
- if (!snapshotEntry)
- snapshotEntry = { cons: baseEntry.cons, count: 0, clusters: {} };
- this.constructorName = snapshotEntry.cons;
- this.count = snapshotEntry.count;
- this.retainers = this._calculateRetainers(this.snapshotView.profile, snapshotEntry.clusters);
-
- if (!baseEntry)
- baseEntry = { count: 0, clusters: {} };
- this.baseCount = baseEntry.count;
- this.countDelta = this.count - this.baseCount;
- this.baseRetainers = this._calculateRetainers(this.snapshotView.baseSnapshot, baseEntry.clusters);
-
- this.size = null;
- this.sizeDelta = null;
-
- WebInspector.HeapSnapshotDataGridNodeWithRetainers.call(this, owningTree);
-}
-
-WebInspector.HeapSnapshotDataGridRetainerNode.prototype = {
- get sizePercent()
- {
- return null;
- },
-
- get sizeDeltaPercent()
- {
- return null;
- },
-
- _calculateRetainers: function(snapshot, clusters) {
- var retainers = {};
- if (this.isEmptySet(clusters)) {
- if (this.constructorName in snapshot.entries)
- return snapshot.entries[this.constructorName].retainers;
- } else {
- // In case when an entry is retained by clusters, we need to gather up the list
- // of retainers by merging retainers of every cluster.
- // E.g. having such a tree:
- // A
- // Object:1 10
- // X 3
- // Y 4
- // Object:2 5
- // X 6
- //
- // will result in a following retainers list: X 9, Y 4.
- for (var clusterName in clusters) {
- if (clusterName in snapshot.clusters) {
- var clusterRetainers = snapshot.clusters[clusterName].retainers;
- for (var clusterRetainer in clusterRetainers) {
- var clusterRetainerEntry = clusterRetainers[clusterRetainer];
- if (!(clusterRetainer in retainers))
- retainers[clusterRetainer] = { cons: clusterRetainerEntry.cons, count: 0, clusters: {} };
- retainers[clusterRetainer].count += clusterRetainerEntry.count;
- for (var clusterRetainerCluster in clusterRetainerEntry.clusters)
- retainers[clusterRetainer].clusters[clusterRetainerCluster] = true;
- }
- }
- }
- }
- return retainers;
- }
-};
-
-WebInspector.HeapSnapshotDataGridRetainerNode.prototype.__proto__ = WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype;
-
-
-WebInspector.HeapSnapshotProfileType = function()
-{
- WebInspector.ProfileType.call(this, WebInspector.HeapSnapshotProfileType.TypeId, WebInspector.UIString("HEAP SNAPSHOTS"));
-}
-
-WebInspector.HeapSnapshotProfileType.TypeId = "HEAP";
-
-WebInspector.HeapSnapshotProfileType.snapshots = [];
-
-WebInspector.HeapSnapshotProfileType.prototype = {
- get buttonTooltip()
- {
- return WebInspector.UIString("Take heap snapshot.");
- },
-
- get buttonStyle()
- {
- return "heap-snapshot-status-bar-item status-bar-item";
- },
-
- buttonClicked: function()
- {
- devtools.tools.getProfilerAgent().startProfiling(devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT);
- },
-
- get welcomeMessage()
- {
- return WebInspector.UIString("Get a heap snapshot by pressing the %s button on the status bar.");
- },
-
- createSidebarTreeElementForProfile: function(profile)
- {
- var element = new WebInspector.HeapSnapshotSidebarTreeElement(profile);
- element.small = false;
- return element;
- },
-
- createView: function(profile)
- {
- return new WebInspector.HeapSnapshotView(WebInspector.panels.profiles, profile);
- }
-}
-
-WebInspector.HeapSnapshotProfileType.prototype.__proto__ = WebInspector.ProfileType.prototype;
-
-
-(function() {
- var originalCreatePanels = WebInspector._createPanels;
- WebInspector._createPanels = function() {
- originalCreatePanels.apply(this, arguments);
- if (WebInspector.panels.profiles)
- WebInspector.panels.profiles.registerProfileType(new WebInspector.HeapSnapshotProfileType());
- }
-})();
diff --git a/WebKit/chromium/src/js/ProfilerAgent.js b/WebKit/chromium/src/js/ProfilerAgent.js
deleted file mode 100644
index 7f74595..0000000
--- a/WebKit/chromium/src/js/ProfilerAgent.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * @fileoverview Provides communication interface to remote v8 profiler.
- */
-
-/**
- * @constructor
- */
-devtools.ProfilerAgent = function()
-{
-
- /**
- * Profiler log position.
- * @type {number}
- */
- this._logPosition = 0;
-
- /**
- * Last requested log position.
- * @type {number}
- */
- this._lastRequestedLogPosition = -1;
-
- /**
- * Profiler processor instance.
- * @type {devtools.profiler.Processor}
- */
- this._profilerProcessor = new devtools.profiler.Processor();
-};
-
-
-/**
- * A copy of enum from include/v8.h
- * @enum {number}
- */
-devtools.ProfilerAgent.ProfilerModules = {
- PROFILER_MODULE_NONE: 0,
- PROFILER_MODULE_CPU: 1,
- PROFILER_MODULE_HEAP_STATS: 1 << 1,
- PROFILER_MODULE_JS_CONSTRUCTORS: 1 << 2,
- PROFILER_MODULE_HEAP_SNAPSHOT: 1 << 16
-};
-
-
-/**
- * Initializes profiling state.
- */
-devtools.ProfilerAgent.prototype.initializeProfiling = function()
-{
- this._getNextLogLines(false);
-};
-
-
-/**
- * Requests the next chunk of log lines.
- * @param {boolean} immediately Do not postpone the request.
- * @private
- */
-devtools.ProfilerAgent.prototype._getNextLogLines = function(immediately)
-{
- if (this._lastRequestedLogPosition == this._logPosition)
- return;
- var pos = this._lastRequestedLogPosition = this._logPosition;
-
- var callId = WebInspector.Callback.wrap(this._didGetProfilerLogLines.bind(this));
- if (immediately)
- InspectorBackend.getProfilerLogLines(callId, pos);
- else {
- function delayedRequest()
- {
- InspectorBackend.getProfilerLogLines(callId, pos);
- }
- setTimeout(delayedRequest, 500);
- }
-};
-
-
-/**
- * Starts profiling.
- * @param {number} modules List of modules to enable.
- */
-devtools.ProfilerAgent.prototype.startProfiling = function(modules)
-{
- if (modules & devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT) {
- InspectorBackend.takeHeapSnapshot();
- // Active modules will not change, instead, a snapshot will be logged.
- this._getNextLogLines();
- }
-};
-
-
-/**
- * Handles a portion of a profiler log retrieved by getLogLines call.
- * @param {number} pos Current position in log.
- * @param {string} log A portion of profiler log.
- */
-devtools.ProfilerAgent.prototype._didGetProfilerLogLines = function(pos, log)
-{
- this._logPosition = pos;
- if (log.length > 0) {
- this._profilerProcessor.processLogChunk(log);
- this._getNextLogLines();
- } else {
- // Allow re-reading from the last position.
- this._lastRequestedLogPosition = this._logPosition - 1;
- }
-};
-
-WebInspector.didGetProfilerLogLines = WebInspector.Callback.processCallback;
diff --git a/WebKit/chromium/src/js/ProfilerProcessor.js b/WebKit/chromium/src/js/ProfilerProcessor.js
deleted file mode 100644
index 61714e8..0000000
--- a/WebKit/chromium/src/js/ProfilerProcessor.js
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * @fileoverview Profiler processor is used to process log file produced
- * by V8 and produce an internal profile representation which is used
- * for building profile views in "Profiles" tab.
- */
-
-
-/**
- * Creates a Profile View builder object compatible with WebKit Profiler UI.
- *
- * @param {number} samplingRate Number of ms between profiler ticks.
- * @constructor
- */
-devtools.profiler.WebKitViewBuilder = function(samplingRate)
-{
- devtools.profiler.ViewBuilder.call(this, samplingRate);
-};
-devtools.profiler.WebKitViewBuilder.prototype.__proto__ = devtools.profiler.ViewBuilder.prototype;
-
-
-/**
- * @override
- */
-devtools.profiler.WebKitViewBuilder.prototype.createViewNode = function(funcName, totalTime, selfTime, head)
-{
- return new devtools.profiler.WebKitViewNode(funcName, totalTime, selfTime, head);
-};
-
-
-/**
- * Constructs a Profile View node object for displaying in WebKit Profiler UI.
- *
- * @param {string} internalFuncName A fully qualified function name.
- * @param {number} totalTime Amount of time that application spent in the
- * corresponding function and its descendants (not that depending on
- * profile they can be either callees or callers.)
- * @param {number} selfTime Amount of time that application spent in the
- * corresponding function only.
- * @param {devtools.profiler.ProfileView.Node} head Profile view head.
- * @constructor
- */
-devtools.profiler.WebKitViewNode = function(internalFuncName, totalTime, selfTime, head)
-{
- devtools.profiler.ProfileView.Node.call(this, internalFuncName, totalTime, selfTime, head);
- this.initFuncInfo_();
- this.callUID = internalFuncName;
-};
-devtools.profiler.WebKitViewNode.prototype.__proto__ = devtools.profiler.ProfileView.Node.prototype;
-
-
-/**
- * RegEx for stripping V8's prefixes of compiled functions.
- */
-devtools.profiler.WebKitViewNode.FUNC_NAME_STRIP_RE = /^(?:LazyCompile|Function|Callback): (.*)$/;
-
-
-/**
- * RegEx for extracting script source URL and line number.
- */
-devtools.profiler.WebKitViewNode.FUNC_NAME_PARSE_RE = /^((?:get | set )?[^ ]+) (.*):(\d+)( \{\d+\})?$/;
-
-
-/**
- * Inits "functionName", "url", and "lineNumber" fields using "internalFuncName"
- * field.
- * @private
- */
-devtools.profiler.WebKitViewNode.prototype.initFuncInfo_ = function()
-{
- var nodeAlias = devtools.profiler.WebKitViewNode;
- this.functionName = this.internalFuncName;
-
- var strippedName = nodeAlias.FUNC_NAME_STRIP_RE.exec(this.functionName);
- if (strippedName)
- this.functionName = strippedName[1];
-
- var parsedName = nodeAlias.FUNC_NAME_PARSE_RE.exec(this.functionName);
- if (parsedName) {
- this.functionName = parsedName[1];
- if (parsedName[4])
- this.functionName += parsedName[4];
- this.url = parsedName[2];
- this.lineNumber = parsedName[3];
- } else {
- this.url = '';
- this.lineNumber = 0;
- }
-};
-
-
-/**
- * Ancestor of a profile object that leaves out only JS-related functions.
- * @constructor
- */
-devtools.profiler.JsProfile = function()
-{
- devtools.profiler.Profile.call(this);
-};
-devtools.profiler.JsProfile.prototype.__proto__ = devtools.profiler.Profile.prototype;
-
-
-/**
- * RegExp that leaves only non-native JS functions.
- * @type {RegExp}
- */
-devtools.profiler.JsProfile.JS_NON_NATIVE_RE = new RegExp(
- "^" +
- "(?:Callback:)|" +
- "(?:Script: (?!native))|" +
- "(?:(?:LazyCompile|Function): [^ ]*(?: (?!native )[^ ]+:\\d+)?$)");
-
-
-/**
- * @override
- */
-devtools.profiler.JsProfile.prototype.skipThisFunction = function(name)
-{
- return !devtools.profiler.JsProfile.JS_NON_NATIVE_RE.test(name);
-};
-
-
-/**
- * Profiler processor. Consumes profiler log and builds profile views.
- * FIXME: change field naming style to use trailing underscore.
- *
- * @param {function(devtools.profiler.ProfileView)} newProfileCallback Callback
- * that receives a new processed profile.
- * @constructor
- */
-devtools.profiler.Processor = function()
-{
- var dispatches = {
- "code-creation": {
- parsers: [null, this.createAddressParser("code"), parseInt, null],
- processor: this.processCodeCreation_, backrefs: true,
- needsProfile: true },
- "code-move": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("code-move-to")],
- processor: this.processCodeMove_, backrefs: true,
- needsProfile: true },
- "code-delete": { parsers: [this.createAddressParser("code")],
- processor: this.processCodeDelete_, backrefs: true,
- needsProfile: true },
- "function-creation": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("function-obj")],
- processor: this.processFunctionCreation_, backrefs: true },
- "function-move": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("code-move-to")],
- processor: this.processFunctionMove_, backrefs: true },
- "function-delete": { parsers: [this.createAddressParser("code")],
- processor: this.processFunctionDelete_, backrefs: true },
- "tick": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("stack"), parseInt, "var-args"],
- processor: this.processTick_, backrefs: true, needProfile: true },
- "profiler": { parsers: [null, "var-args"],
- processor: this.processProfiler_, needsProfile: false },
- "heap-sample-begin": { parsers: [null, null, parseInt],
- processor: this.processHeapSampleBegin_ },
- "heap-sample-stats": { parsers: [null, null, parseInt, parseInt],
- processor: this.processHeapSampleStats_ },
- "heap-sample-item": { parsers: [null, parseInt, parseInt],
- processor: this.processHeapSampleItem_ },
- "heap-js-cons-item": { parsers: [null, parseInt, parseInt],
- processor: this.processHeapJsConsItem_ },
- "heap-js-ret-item": { parsers: [null, "var-args"],
- processor: this.processHeapJsRetItem_ },
- "heap-sample-end": { parsers: [null, null],
- processor: this.processHeapSampleEnd_ },
- // Not used in DevTools Profiler.
- "shared-library": null,
- // Obsolete row types.
- "code-allocate": null,
- "begin-code-region": null,
- "end-code-region": null};
-
- if (devtools.profiler.Profile.VERSION === 2) {
- dispatches["tick"] = { parsers: [this.createAddressParser("code"),
- this.createAddressParser("stack"),
- this.createAddressParser("func"), parseInt, "var-args"],
- processor: this.processTickV2_, backrefs: true };
- }
-
- devtools.profiler.LogReader.call(this, dispatches);
-
- /**
- * Callback that is called when a new profile is encountered in the log.
- * @type {function()}
- */
- this.startedProfileProcessing_ = null;
-
- /**
- * Callback that is called periodically to display processing status.
- * @type {function()}
- */
- this.profileProcessingStatus_ = null;
-
- /**
- * Callback that is called when a profile has been processed and is ready
- * to be shown.
- * @type {function(devtools.profiler.ProfileView)}
- */
- this.finishedProfileProcessing_ = null;
-
- /**
- * The current profile.
- * @type {devtools.profiler.JsProfile}
- */
- this.currentProfile_ = null;
-
- /**
- * Builder of profile views. Created during "profiler,begin" event processing.
- * @type {devtools.profiler.WebKitViewBuilder}
- */
- this.viewBuilder_ = null;
-
- /**
- * Next profile id.
- * @type {number}
- */
- this.profileId_ = 1;
-
- /**
- * Counter for processed ticks.
- * @type {number}
- */
- this.ticksCount_ = 0;
-
- /**
- * Interval id for updating processing status.
- * @type {number}
- */
- this.processingInterval_ = null;
-
- /**
- * The current heap snapshot.
- * @type {string}
- */
- this.currentHeapSnapshot_ = null;
-
- /**
- * Next heap snapshot id.
- * @type {number}
- */
- this.heapSnapshotId_ = 1;
-};
-devtools.profiler.Processor.prototype.__proto__ = devtools.profiler.LogReader.prototype;
-
-
-/**
- * @override
- */
-devtools.profiler.Processor.prototype.printError = function(str)
-{
- WebInspector.log(str);
-};
-
-
-/**
- * @override
- */
-devtools.profiler.Processor.prototype.skipDispatch = function(dispatch)
-{
- return dispatch.needsProfile && this.currentProfile_ === null;
-};
-
-
-/**
- * Sets profile processing callbacks.
- *
- * @param {function()} started Started processing callback.
- * @param {function(devtools.profiler.ProfileView)} finished Finished
- * processing callback.
- */
-devtools.profiler.Processor.prototype.setCallbacks = function(started, processing, finished)
-{
- this.startedProfileProcessing_ = started;
- this.profileProcessingStatus_ = processing;
- this.finishedProfileProcessing_ = finished;
-};
-
-
-/**
- * An address for the fake "(program)" entry. WebKit's visualisation
- * has assumptions on how the top of the call tree should look like,
- * and we need to add a fake entry as the topmost function. This
- * address is chosen because it's the end address of the first memory
- * page, which is never used for code or data, but only as a guard
- * page for catching AV errors.
- *
- * @type {number}
- */
-devtools.profiler.Processor.PROGRAM_ENTRY = 0xffff;
-/**
- * @type {string}
- */
-devtools.profiler.Processor.PROGRAM_ENTRY_STR = "0xffff";
-
-
-/**
- * Sets new profile callback.
- * @param {function(devtools.profiler.ProfileView)} callback Callback function.
- */
-devtools.profiler.Processor.prototype.setNewProfileCallback = function(callback)
-{
- this.newProfileCallback_ = callback;
-};
-
-
-devtools.profiler.Processor.prototype.processProfiler_ = function(state, params)
-{
- switch (state) {
- case "resume":
- if (this.currentProfile_ === null) {
- this.currentProfile_ = new devtools.profiler.JsProfile();
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- this.currentProfile_.addCode("Function", "(program)", devtools.profiler.Processor.PROGRAM_ENTRY, 1);
- if (this.startedProfileProcessing_)
- this.startedProfileProcessing_();
- this.ticksCount_ = 0;
- var self = this;
- if (this.profileProcessingStatus_) {
- this.processingInterval_ = window.setInterval(
- function() { self.profileProcessingStatus_(self.ticksCount_); },
- 1000);
- }
- }
- break;
- case "pause":
- if (this.currentProfile_ !== null) {
- window.clearInterval(this.processingInterval_);
- this.processingInterval_ = null;
- if (this.finishedProfileProcessing_)
- this.finishedProfileProcessing_(this.createProfileForView());
- this.currentProfile_ = null;
- }
- break;
- case "begin":
- var samplingRate = NaN;
- if (params.length > 0)
- samplingRate = parseInt(params[0]);
- if (isNaN(samplingRate))
- samplingRate = 1;
- this.viewBuilder_ = new devtools.profiler.WebKitViewBuilder(samplingRate);
- break;
- // These events are valid but aren't used.
- case "compression":
- case "end": break;
- default:
- throw new Error("unknown profiler state: " + state);
- }
-};
-
-
-devtools.profiler.Processor.prototype.processCodeCreation_ = function(type, start, size, name)
-{
- this.currentProfile_.addCode(this.expandAlias(type), name, start, size);
-};
-
-
-devtools.profiler.Processor.prototype.processCodeMove_ = function(from, to)
-{
- this.currentProfile_.moveCode(from, to);
-};
-
-
-devtools.profiler.Processor.prototype.processCodeDelete_ = function(start)
-{
- this.currentProfile_.deleteCode(start);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionCreation_ = function(functionAddr, codeAddr)
-{
- this.currentProfile_.addCodeAlias(functionAddr, codeAddr);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionMove_ = function(from, to)
-{
- this.currentProfile_.safeMoveDynamicCode(from, to);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionDelete_ = function(start)
-{
- this.currentProfile_.safeDeleteDynamicCode(start);
-};
-
-
-// TODO(mnaganov): Remove after next V8 roll.
-devtools.profiler.Processor.prototype.processTick_ = function(pc, sp, vmState, stack)
-{
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- stack.push(devtools.profiler.Processor.PROGRAM_ENTRY_STR);
- this.currentProfile_.recordTick(this.processStack(pc, stack));
- this.ticksCount_++;
-};
-
-
-devtools.profiler.Processor.prototype.processTickV2_ = function(pc, sp, func, vmState, stack)
-{
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- stack.push(devtools.profiler.Processor.PROGRAM_ENTRY_STR);
-
-
- if (func) {
- var funcEntry = this.currentProfile_.findEntry(func);
- if (!funcEntry || !funcEntry.isJSFunction || !funcEntry.isJSFunction())
- func = 0;
- else {
- var currEntry = this.currentProfile_.findEntry(pc);
- if (!currEntry || !currEntry.isJSFunction || currEntry.isJSFunction()) {
- func = 0;
- }
- }
- }
-
- this.currentProfile_.recordTick(this.processStack(pc, func, stack));
- this.ticksCount_++;
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleBegin_ = function(space, state, ticks)
-{
- if (space !== "Heap") return;
- this.currentHeapSnapshot_ = {
- number: this.heapSnapshotId_++,
- entries: {},
- clusters: {},
- lowlevels: {},
- ticks: ticks
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleStats_ = function(space, state, capacity, used)
-{
- if (space !== "Heap") return;
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleItem_ = function(item, number, size)
-{
- if (!this.currentHeapSnapshot_) return;
- this.currentHeapSnapshot_.lowlevels[item] = {
- type: item, count: number, size: size
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapJsConsItem_ = function(item, number, size)
-{
- if (!this.currentHeapSnapshot_) return;
- this.currentHeapSnapshot_.entries[item] = {
- cons: item, count: number, size: size, retainers: {}
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapJsRetItem_ = function(item, retainersArray)
-{
- if (!this.currentHeapSnapshot_) return;
- var rawRetainers = {};
- for (var i = 0, n = retainersArray.length; i < n; ++i) {
- var entry = retainersArray[i].split(";");
- rawRetainers[entry[0]] = parseInt(entry[1], 10);
- }
-
- function mergeRetainers(entry) {
- for (var rawRetainer in rawRetainers) {
- var consName = rawRetainer.indexOf(":") !== -1 ? rawRetainer.split(":")[0] : rawRetainer;
- if (!(consName in entry.retainers))
- entry.retainers[consName] = { cons: consName, count: 0, clusters: {} };
- var retainer = entry.retainers[consName];
- retainer.count += rawRetainers[rawRetainer];
- if (consName !== rawRetainer)
- retainer.clusters[rawRetainer] = true;
- }
- }
-
- if (item.indexOf(":") !== -1) {
- // Array, Function, or Object instances cluster case.
- if (!(item in this.currentHeapSnapshot_.clusters)) {
- this.currentHeapSnapshot_.clusters[item] = {
- cons: item, retainers: {}
- };
- }
- mergeRetainers(this.currentHeapSnapshot_.clusters[item]);
- item = item.split(":")[0];
- }
- mergeRetainers(this.currentHeapSnapshot_.entries[item]);
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleEnd_ = function(space, state)
-{
- if (space !== "Heap") return;
- var snapshot = this.currentHeapSnapshot_;
- this.currentHeapSnapshot_ = null;
- WebInspector.panels.profiles.addSnapshot(snapshot);
-};
-
-
-/**
- * Creates a profile for further displaying in ProfileView.
- */
-devtools.profiler.Processor.prototype.createProfileForView = function()
-{
- var profile = this.viewBuilder_.buildView(this.currentProfile_.getTopDownProfile());
- profile.uid = this.profileId_++;
- profile.title = UserInitiatedProfileName + "." + profile.uid;
- return profile;
-};
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index dfcaadf..9495fb8 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -37,118 +37,6 @@ body.platform-linux #scripts-files {
line-height: 12px;
}
-/* Heap Profiler Styles */
-
-.heap-snapshot-status-bar-item .glyph {
- -webkit-mask-image: url(Images/focusButtonGlyph.png);
-}
-
-.heap-snapshot-sidebar-tree-item .icon {
- content: url(Images/profileIcon.png);
-}
-
-.heap-snapshot-sidebar-tree-item.small .icon {
- content: url(Images/profileSmallIcon.png);
-}
-
-.heap-snapshot-view {
- display: none;
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-}
-
-.heap-snapshot-view.visible {
- display: block;
-}
-
-.heap-snapshot-view .data-grid {
- border: none;
- max-height: 100%;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 93px;
-}
-
-.heap-snapshot-view .data-grid th.count-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.count-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.size-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.size-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.countDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.countDelta-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.sizeDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.sizeDelta-column {
- text-align: right;
-}
-
-#heap-snapshot-summary-container {
- position: absolute;
- padding-top: 20px;
- bottom: 0;
- left: 0;
- right: 0;
- height: 93px;
- margin-left: -1px;
- border-left: 1px solid rgb(102, 102, 102);
- background-color: rgb(101, 111, 130);
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
- background-repeat: repeat-x;
- background-position: top;
- text-align: center;
- text-shadow: black 0 1px 1px;
- white-space: nowrap;
- color: white;
- -webkit-background-size: 1px 6px;
- -webkit-background-origin: padding;
- -webkit-background-clip: padding;
-}
-
-.heap-snapshot-summary {
- display: inline-block;
- width: 50%;
- min-width: 300px;
- position: relative;
-}
-
-.heap-snapshot-summary canvas.summary-graph {
- width: 225px;
-}
-
-.heap-snapshot-summary-label {
- font-size: 12px;
- font-weight: bold;
- position: absolute;
- top: 1px;
- width: 50%;
- left: 25%;
-}
-
.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)));
diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp
index a5bd935..4d83f22 100644
--- a/WebKit/chromium/src/win/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/win/WebInputEventFactory.cpp
@@ -398,11 +398,11 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message
//
// How many pixels should we scroll per line? Gecko uses the height of the
// current line, which means scroll distance changes as you go through the
- // page or go to different pages. IE 7 is ~50 px/line, although the value
- // seems to vary slightly by page and zoom level. Since IE 7 has a smoothing
- // algorithm on scrolling, it can get away with slightly larger scroll values
- // without feeling jerky. Here we use 100 px per three lines (the default
- // scroll amount is three lines per wheel tick).
+ // page or go to different pages. IE 8 is ~60 px/line, although the value
+ // seems to vary slightly by page and zoom level. Also, IE defaults to
+ // smooth scrolling while Firefox doesn't, so it can get away with somewhat
+ // larger scroll values without feeling as jerky. Here we use 100 px per
+ // three lines (the default scroll amount is three lines per wheel tick).
static const float scrollbarPixelsPerLine = 100.0f / 3.0f;
wheelDelta /= WHEEL_DELTA;
float scrollDelta = wheelDelta;
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index cdb24ff..7b5865b 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -21,12 +21,23 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
${SQLITE_INCLUDE_DIRS}
)
+IF (ENABLE_VIDEO)
+LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/platform/graphics/gstreamer"
+ ${Gstreamer-App_INCLUDE_DIRS}
+ ${Gstreamer-Interfaces_INCLUDE_DIRS}
+ ${Gstreamer-Pbutils_INCLUDE_DIRS}
+ ${Gstreamer-Video_INCLUDE_DIRS}
+)
+ENDIF()
+
LIST(APPEND WebKit_SOURCES
efl/WebCoreSupport/ChromeClientEfl.cpp
efl/WebCoreSupport/ContextMenuClientEfl.cpp
efl/WebCoreSupport/DragClientEfl.cpp
efl/WebCoreSupport/EditorClientEfl.cpp
efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+ efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
efl/WebCoreSupport/InspectorClientEfl.cpp
efl/ewk/ewk_contextmenu.cpp
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index e1ce89a..bafa48d 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,150 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_layout_if_needed_recursive):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_text_matches_mark): Switched to call
+ countMatchesForText() instead of markAllMatchesForText().
+
+2010-08-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed build fix.
+
+ [EFL] Build break for r66456
+ https://bugs.webkit.org/post_bug.cgi
+
+ Replace firstRectsForMarkers with renderedRectsForMarkers.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_text_matches_nth_pos_get):
+
+2010-08-30 Kamil Blank <k.blank@samsung.com>
+
+ Reviewed by Adam Barth.
+
+ [EFL] Added API which returns position of n-th text matches mark
+ https://bugs.webkit.org/show_bug.cgi?id=44258
+
+ * ewk/ewk_frame.cpp:
+ (_ewk_frame_rect_cmp_less_than): Private.
+ (_ewk_frame_rect_is_negative_value): Private.
+ (ewk_frame_text_matches_nth_pos_get): Added. Function returns position of
+ n-th text match in frame.
+ * ewk/ewk_frame.h:
+
+2010-08-30 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Adam Barth.
+
+ [EFL]Url of HistoryItem was broken for special character like korean
+ https://bugs.webkit.org/show_bug.cgi?id=44495
+
+ Remove unnecessary code. This makes a bug with complicated URL.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_view_state_save):
+
+2010-08-30 Mikołaj Małecki <m.malecki@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen
+
+ [EFL] Added initial setting to turn on offline pages.
+ https://bugs.webkit.org/show_bug.cgi?id=44239
+
+ * ewk/ewk_main.cpp: Torn off non-EFL init to _ewk_init_body
+ (ewk_init): Changed non-EFL init to call _ewk_init_body
+ (_ewk_init_body): Moved internal init here and added cache directory path setting.
+ * ewk/ewk_view.cpp: Added new config items: offline_app_cache and cache_directory
+ (_ewk_view_priv_new): creating cache_directory string
+ (_ewk_view_priv_del): deleting cache_directory string
+ (ewk_view_setting_offline_app_cache_get):
+ (ewk_view_setting_offline_app_cache_set):
+ (ewk_view_setting_cache_directory_get):
+ (ewk_view_setting_cache_directory_set):
+ * ewk/ewk_view.h: added offline_app_cache and cache_directory props to ewk API
+
+2010-08-26 Miroslaw Szymanski <miroslaw.s@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Added new callback when view's size is changed to fix issue with changing layout size
+ https://bugs.webkit.org/show_bug.cgi?id=44337
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_smart_calculate):
+
+2010-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add dummy FullScreenVideoControllerEfl to WebKit EFL
+ https://bugs.webkit.org/show_bug.cgi?id=44590
+
+ Add FullScreenVideoControllerEfl to WebCoreSupport. However,
+ this is not implemented yet.
+
+ * CMakeListsEfl.txt:
+ * WebCoreSupport/FullscreenVideoControllerEfl.cpp: Added.
+ (FullscreenVideoController::FullscreenVideoController):
+ (FullscreenVideoController::~FullscreenVideoController):
+ (FullscreenVideoController::setMediaElement):
+ (FullscreenVideoController::showHud):
+ (FullscreenVideoController::hideHud):
+ (FullscreenVideoController::enterFullscreen):
+ (FullscreenVideoController::updateHudPosition):
+ (FullscreenVideoController::exitOnUserRequest):
+ (FullscreenVideoController::exitFullscreen):
+ (FullscreenVideoController::canPlay):
+ (FullscreenVideoController::play):
+ (FullscreenVideoController::pause):
+ (FullscreenVideoController::playStateChanged):
+ (FullscreenVideoController::togglePlay):
+ (FullscreenVideoController::volume):
+ (FullscreenVideoController::muted):
+ (FullscreenVideoController::setVolume):
+ (FullscreenVideoController::volumeChanged):
+ (FullscreenVideoController::muteChanged):
+ (FullscreenVideoController::currentTime):
+ (FullscreenVideoController::setCurrentTime):
+ (FullscreenVideoController::duration):
+ (FullscreenVideoController::percentLoaded):
+ (FullscreenVideoController::beginSeek):
+ (FullscreenVideoController::doSeek):
+ (FullscreenVideoController::endSeek):
+ (timeToString):
+ (FullscreenVideoController::updateHudProgressBar):
+ (FullscreenVideoController::createHud):
+ * WebCoreSupport/FullscreenVideoControllerEfl.h: Added.
+ (FullscreenVideoController::mediaElement):
+
+2010-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add setting API for enabling local storage.
+ https://bugs.webkit.org/show_bug.cgi?id=44319
+
+ Add API for enabling/disabling local storage.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (ewk_view_setting_local_storage_get): Added
+ (ewk_view_setting_local_storage_set): Added
+ * ewk/ewk_view.h:
+
2010-08-25 Jaehun Lim <ljaehun.lim@samsung.com>
Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
new file mode 100644
index 0000000..6e5d599
--- /dev/null
+++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ * Copyright (C) 2010 Samsung Electronics
+ *
+ * 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"
+
+#if ENABLE(VIDEO)
+
+#include "FullscreenVideoControllerEfl.h"
+
+#include "MediaPlayer.h"
+#include "NotImplemented.h"
+
+#include <gst/gst.h>
+
+using namespace std;
+using namespace WebCore;
+
+FullscreenVideoController::FullscreenVideoController()
+ : m_hudTimeoutId(0)
+ , m_progressBarUpdateId(0)
+ , m_seekLock(false)
+ , m_window(0)
+ , m_hudWindow(0)
+{
+}
+
+FullscreenVideoController::~FullscreenVideoController()
+{
+ exitFullscreen();
+}
+
+void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement)
+{
+ if (mediaElement == m_mediaElement)
+ return;
+
+ m_mediaElement = mediaElement;
+ if (!m_mediaElement) {
+ // Can't do full-screen, just get out
+ exitFullscreen();
+ }
+}
+
+void FullscreenVideoController::showHud(bool autoHide)
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::hideHud()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::enterFullscreen()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::updateHudPosition()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::exitOnUserRequest()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::exitFullscreen()
+{
+ notImplemented();
+}
+
+bool FullscreenVideoController::canPlay() const
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::play()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::pause()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::playStateChanged()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::togglePlay()
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::volume() const
+{
+ notImplemented();
+ return 0;
+}
+
+bool FullscreenVideoController::muted() const
+{
+ notImplemented();
+ return false;
+}
+
+void FullscreenVideoController::setVolume(float volume)
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::volumeChanged()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::muteChanged()
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::currentTime() const
+{
+ notImplemented();
+ return 0;
+}
+
+void FullscreenVideoController::setCurrentTime(float value)
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::duration() const
+{
+ notImplemented();
+ return 0;
+}
+
+float FullscreenVideoController::percentLoaded() const
+{
+ notImplemented();
+ return 0;
+}
+
+void FullscreenVideoController::beginSeek()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::doSeek()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::endSeek()
+{
+ notImplemented();
+}
+
+static String timeToString(float time)
+{
+ notImplemented();
+}
+
+bool FullscreenVideoController::updateHudProgressBar()
+{
+ notImplemented();
+ return false;
+}
+
+void FullscreenVideoController::createHud()
+{
+ notImplemented();
+}
+
+#endif
diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h
new file mode 100644
index 0000000..4bbae25
--- /dev/null
+++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ * Copyright (C) 2010 Samsung Electronics
+ *
+ * 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 FullscreenVideoControllerEfl_h
+#define FullscreenVideoControllerEfl_h
+
+#if ENABLE(VIDEO)
+
+#include "GStreamerGWorld.h"
+#include "HTMLMediaElement.h"
+#include <wtf/RefPtr.h>
+
+class FullscreenVideoController : public Noncopyable {
+public:
+ FullscreenVideoController();
+ virtual ~FullscreenVideoController();
+
+ void setMediaElement(WebCore::HTMLMediaElement*);
+ WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
+
+ void enterFullscreen();
+ void exitFullscreen();
+
+ void exitOnUserRequest();
+ void togglePlay();
+ void beginSeek();
+ void doSeek();
+ void endSeek();
+
+ void hideHud();
+ void showHud(bool);
+ bool updateHudProgressBar();
+
+ float volume() const;
+ void setVolume(float);
+ void volumeChanged();
+ void muteChanged();
+
+private:
+ bool canPlay() const;
+ void play();
+ void pause();
+ void playStateChanged();
+
+ bool muted() const;
+
+ float currentTime() const;
+ void setCurrentTime(float);
+
+ float duration() const;
+ float percentLoaded() const;
+
+ void createHud();
+ void updateHudPosition();
+
+ RefPtr<WebCore::HTMLMediaElement> m_mediaElement;
+ RefPtr<WebCore::GStreamerGWorld> m_gstreamerGWorld;
+
+ uint m_hudTimeoutId;
+ uint m_progressBarUpdateId;
+ uint m_progressBarFillUpdateId;
+ uint m_hscaleUpdateId;
+ uint m_volumeUpdateId;
+ bool m_seekLock;
+ PlatformWidget* m_window;
+ PlatformWidget* m_hudWindow;
+ PlatformWidget* m_timeHScale;
+ PlatformWidget* m_timeLabel;
+ PlatformWidget* m_volumeButton;
+};
+
+#endif
+
+#endif // FullscreenVideoControllerEfl_h
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 7a2af5a..a7ce1ff 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -44,14 +44,15 @@
#include "ScriptValue.h"
#include "SharedBuffer.h"
#include "SubstituteData.h"
-#include "ZoomMode.h"
#include "WindowsKeyboardCodes.h"
+#include "ZoomMode.h"
#include "ewk_private.h"
-#include <wtf/text/CString.h>
#include <Eina.h>
#include <Evas.h>
+#include <algorithm>
#include <eina_safety_checks.h>
+#include <wtf/text/CString.h>
static const char EWK_FRAME_TYPE_STR[] = "EWK_Frame";
@@ -771,7 +772,7 @@ unsigned int ewk_frame_text_matches_mark(Evas_Object* o, const char* string, Ein
EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0);
sd->frame->setMarkedTextMatchesAreHighlighted(highlight);
- return sd->frame->markAllMatchesForText(WTF::String::fromUTF8(string), case_sensitive, limit);
+ return sd->frame->countMatchesForText(WTF::String::fromUTF8(string), case_sensitive, limit, true);
}
/**
@@ -820,6 +821,55 @@ Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object* o)
return sd->frame->markedTextMatchesAreHighlighted();
}
+/**
+ * Comparison function used by ewk_frame_text_matches_nth_pos_get
+ */
+static bool _ewk_frame_rect_cmp_less_than(const WebCore::IntRect& i, const WebCore::IntRect& j)
+{
+ return (i.y() < j.y() || (i.y() == j.y() && i.x() < j.x()));
+}
+
+/**
+ * Predicate used by ewk_frame_text_matches_nth_pos_get
+ */
+static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& i)
+{
+ return (i.x() < 0 || i.y() < 0);
+}
+
+/**
+ * Get x, y position of n-th text match in frame
+ *
+ * @param o frame object where matches are highlighted.
+ * @param n index of element
+ * @param x where to return x position. May be @c NULL.
+ * @param y where to return y position. May be @c NULL.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE for failure - when no matches found or
+ * n bigger than search results.
+ */
+Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, int n, int* x, int* y)
+{
+ EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+
+ Vector<WebCore::IntRect> intRects = sd->frame->document()->markers()->renderedRectsForMarkers(WebCore::DocumentMarker::TextMatch);
+
+ /* remove useless values */
+ std::remove_if(intRects.begin(), intRects.end(), _ewk_frame_rect_is_negative_value);
+
+ if (intRects.isEmpty() || n > intRects.size())
+ return EINA_FALSE;
+
+ std::sort(intRects.begin(), intRects.end(), _ewk_frame_rect_cmp_less_than);
+
+ if (x)
+ *x = intRects[n - 1].x();
+ if (y)
+ *y = intRects[n - 1].y();
+ return EINA_TRUE;
+}
+
/**
* Ask frame to stop loading.
*
@@ -1687,12 +1737,6 @@ void ewk_frame_did_perform_first_navigation(Evas_Object *o)
*/
void ewk_frame_view_state_save(Evas_Object *o, WebCore::HistoryItem* item)
{
- const char *title = ewk_frame_title_get(o);
- const char *uri = ewk_frame_uri_get(o);
-
- item->setTitle(WTF::String::fromUTF8(title));
- item->setURLString(WTF::String::fromUTF8(uri));
-
evas_object_smart_callback_call(o, "state,save", 0);
}
diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h
index 1a9fe81..9394446 100644
--- a/WebKit/efl/ewk/ewk_frame.h
+++ b/WebKit/efl/ewk/ewk_frame.h
@@ -160,6 +160,7 @@ EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string
EAPI Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o);
EAPI Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight);
EAPI Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, int n, int *x, int *y);
EAPI Eina_Bool ewk_frame_stop(Evas_Object *o);
EAPI Eina_Bool ewk_frame_reload(Evas_Object *o);
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp
index 1cd5e42..8c27478 100644
--- a/WebKit/efl/ewk/ewk_main.cpp
+++ b/WebKit/efl/ewk/ewk_main.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "ewk_main.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "EWebKit.h"
#include "Logging.h"
#include "PageCache.h"
@@ -36,6 +37,7 @@
#include <Eina.h>
#include <Evas.h>
#include <stdlib.h>
+#include <sys/stat.h>
#if ENABLE(GLIB_SUPPORT)
#include <glib-object.h>
@@ -56,6 +58,8 @@
static int _ewk_init_count = 0;
int _ewk_log_dom = -1;
+static Eina_Bool _ewk_init_body(void);
+
int ewk_init(void)
{
if (_ewk_init_count)
@@ -90,6 +94,44 @@ int ewk_init(void)
goto error_edje;
}
+ _ewk_init_body();
+
+ return ++_ewk_init_count;
+
+error_edje:
+ ecore_evas_shutdown();
+error_ecore_evas:
+ ecore_shutdown();
+error_ecore:
+ evas_shutdown();
+error_evas:
+ eina_log_domain_unregister(_ewk_log_dom);
+ _ewk_log_dom = -1;
+error_log_domain:
+ eina_shutdown();
+error_eina:
+ return 0;
+}
+
+int ewk_shutdown(void)
+{
+ _ewk_init_count--;
+ if (_ewk_init_count)
+ return _ewk_init_count;
+
+ ecore_evas_shutdown();
+ ecore_shutdown();
+ evas_shutdown();
+ eina_log_domain_unregister(_ewk_log_dom);
+ _ewk_log_dom = -1;
+ eina_shutdown();
+
+ return 0;
+}
+
+Eina_Bool _ewk_init_body(void)
+{
+
#if ENABLE(GLIB_SUPPORT)
g_type_init();
@@ -117,8 +159,24 @@ int ewk_init(void)
WebCore::pageCache()->setCapacity(3);
WebCore::PageGroup::setShouldTrackVisitedLinks(true);
- // set default location of web database path
- ewk_settings_web_database_path_set(getenv("HOME"));
+ // set default location of web database path and appcache dir
+ const char* home = getenv("HOME");
+ if (!home) // don't forget about the homeless
+ home = "/tmp"; // this directory must always exist
+
+ // anyway, check it first
+ struct stat state;
+ if (stat(home, &state) == -1) {
+ // Exit now - otherwise you may have some crash later
+ int errnowas = errno;
+ CRITICAL("Can't access HOME dir (or /tmp) - no place to save databases: %s", strerror(errnowas));
+ return EINA_FALSE;
+ }
+
+ WTF::String wkdir = WTF::String(home) + "/.webkit";
+ ewk_settings_web_database_path_set(wkdir.utf8().data());
+
+ WebCore::cacheStorage().setCacheDirectory(wkdir);
// TODO: this should move to WebCore, already reported to webkit-gtk folks:
#ifdef WTF_USE_SOUP
@@ -129,36 +187,6 @@ int ewk_init(void)
}
#endif
- return ++_ewk_init_count;
-
-error_edje:
- ecore_evas_shutdown();
-error_ecore_evas:
- ecore_shutdown();
-error_ecore:
- evas_shutdown();
-error_evas:
- eina_log_domain_unregister(_ewk_log_dom);
- _ewk_log_dom = -1;
-error_log_domain:
- eina_shutdown();
-error_eina:
- return 0;
-}
-
-int ewk_shutdown(void)
-{
- _ewk_init_count--;
- if (_ewk_init_count)
- return _ewk_init_count;
-
- ecore_evas_shutdown();
- ecore_shutdown();
- evas_shutdown();
- eina_log_domain_unregister(_ewk_log_dom);
- _ewk_log_dom = -1;
- eina_shutdown();
-
- return 0;
+ return EINA_TRUE;
}
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 4a100d7..ea54167 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "ewk_view.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "ChromeClientEfl.h"
#include "ContextMenuClientEfl.h"
#include "ContextMenuController.h"
@@ -88,6 +89,7 @@ struct _Ewk_View_Private_Data {
const char* user_stylesheet;
const char* encoding_default;
const char* encoding_custom;
+ const char* cache_directory;
int font_minimum_size;
int font_minimum_logical_size;
int font_default_size;
@@ -108,6 +110,8 @@ struct _Ewk_View_Private_Data {
Eina_Bool private_browsing:1;
Eina_Bool caret_browsing:1;
Eina_Bool spatial_navigation:1;
+ Eina_Bool local_storage:1;
+ Eina_Bool offline_app_cache: 1;
struct {
float w;
float h;
@@ -560,6 +564,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->page_settings->setJavaScriptEnabled(true);
priv->page_settings->setPluginsEnabled(true);
priv->page_settings->setLocalStorageEnabled(true);
+ priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
url = priv->page_settings->userStyleSheetLocation();
priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
@@ -568,6 +573,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
(priv->page_settings->defaultTextEncodingName().utf8().data());
priv->settings.encoding_custom = 0;
+ priv->settings.cache_directory = eina_stringshare_add
+ (WebCore::cacheStorage().cacheDirectory().utf8().data());
+
priv->settings.font_minimum_size = priv->page_settings->minimumFontSize();
priv->settings.font_minimum_logical_size = priv->page_settings->minimumLogicalFontSize();
priv->settings.font_default_size = priv->page_settings->defaultFontSize();
@@ -595,6 +603,8 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable();
priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled();
priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled();
+ priv->settings.local_storage = priv->page_settings->localStorageEnabled();
+ priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting
// Since there's no scale separated from zooming in webkit-efl, this functionality of
// viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -641,6 +651,7 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv)
eina_stringshare_del(priv->settings.user_stylesheet);
eina_stringshare_del(priv->settings.encoding_default);
eina_stringshare_del(priv->settings.encoding_custom);
+ eina_stringshare_del(priv->settings.cache_directory);
eina_stringshare_del(priv->settings.font_standard);
eina_stringshare_del(priv->settings.font_cursive);
eina_stringshare_del(priv->settings.font_monospace);
@@ -794,6 +805,9 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
sd->changed.frame_rect = EINA_TRUE;
sd->view.w = w;
sd->view.h = h;
+
+ // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set).
+ evas_object_smart_callback_call(o, "view,resized", 0);
}
sd->changed.size = EINA_FALSE;
@@ -2385,6 +2399,26 @@ Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object* o, Eina_Bool enable
return EINA_TRUE;
}
+Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.offline_app_cache;
+}
+
+Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.offline_app_cache != enable) {
+ priv->page_settings->setOfflineWebApplicationCacheEnabled(enable);
+ priv->settings.offline_app_cache = enable;
+ }
+ return EINA_TRUE;
+}
+
+
Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
@@ -2465,6 +2499,22 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco
return EINA_TRUE;
}
+const char* ewk_view_setting_cache_directory_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
+ return priv->settings.cache_directory;
+}
+
+Eina_Bool ewk_view_setting_cache_directory_set(Evas_Object* o, const char* path)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ if (eina_stringshare_replace(&priv->settings.cache_directory, path))
+ WebCore::cacheStorage().setCacheDirectory(WTF::String::fromUTF8(path));
+ return EINA_TRUE;
+}
+
int ewk_view_setting_font_minimum_size_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
@@ -2665,6 +2715,37 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab
}
/**
+ * Gets if the local storage is enabled.
+ *
+ * @param o view object to set if local storage is enabled.
+ * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not.
+ */
+Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.local_storage;
+}
+
+/**
+ * Sets the local storage of HTML5.
+ *
+ * @param o view object to set if local storage is enabled.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
+Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.local_storage != enable) {
+ priv->page_settings->setLocalStorageEnabled(enable);
+ priv->settings.local_storage = enable;
+ }
+ return EINA_TRUE;
+}
+
+/**
* Similar to evas_object_smart_data_get(), but does type checking.
*
* @param o view object to query internal data.
@@ -2769,7 +2850,7 @@ void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv)
ERR("no main frame view");
return;
}
- v->layoutIfNeededRecursive();
+ v->updateLayoutAndStyleIfNeededRecursive();
}
void ewk_view_scrolls_process(Ewk_View_Smart_Data* sd)
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 9d5997c..c5d2d45 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -88,6 +88,7 @@ extern "C" {
* - "icon,received", void: main frame received an icon.
* - "viewport,changed", void: Report that viewport has changed.
* - "inputmethods,changed" with a boolean indicating whether it's enabled or not.
+ * - "view,resized", void: view object's size has changed.
*/
typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
@@ -403,6 +404,8 @@ EAPI Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object *o, const cha
EAPI Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object *o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object *o, Eina_Bool enable);
EAPI Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object *o, Eina_Bool enable);
@@ -411,6 +414,8 @@ EAPI const char *ewk_view_setting_encoding_custom_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object *o, const char *encoding);
EAPI const char *ewk_view_setting_encoding_default_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object *o, const char *encoding);
+EAPI const char *ewk_view_setting_cache_directory_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_view_setting_cache_directory_set(Evas_Object *o, const char *path);
EAPI int ewk_view_setting_font_minimum_size_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object *o, int size);
@@ -442,6 +447,9 @@ EAPI Eina_Bool ewk_view_setting_font_sans_serif_set(Evas_Object *o, const cha
EAPI Eina_Bool ewk_view_setting_spatial_navigation_get(Evas_Object* o);
EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o);
+EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable);
+
/* to be used by subclass implementations */
EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 4073840..8098b7f 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,118 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_expose_event):
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * WebCoreSupport/EditorClientGtk.h: Remove GTK+ typedefs.
+ * WebCoreSupport/FullscreenVideoController.h: Ditto.
+
+2010-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ Preparations for the 1.3.4 release.
+
+ * NEWS:
+ * docs/webkitgtk-docs.sgml:
+
+2010-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Minor documentation typo fix.
+
+ * webkit/webkitwebview.cpp:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] gdk_display_get_core_pointer and gdk_device_get_core_pointer
+ are deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=44787
+
+ We have replaced GtkVersioning.cpp with GtkVersioning.c and
+ created a function (getDefaultGDKPointerDevice) to get the pointer
+ of the window with the new APIs. We added that function to DRT and
+ copyandpaste unit test.
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ (WebKit::InspectorFrontendClient::disconnectFromBackend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ (WebKit::InspectorFrontendClient::disconnectFromBackend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] WebKitGTK+ needs proper introspection annotation for most types and methods
+ https://bugs.webkit.org/show_bug.cgi?id=44565
+
+ Add documentation and introspection specific information to a few
+ getter and setter methods.
+
+ * webkit/webkitwebview.cpp:
+
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS
index b99e2a1..402c07c 100644
--- a/WebKit/gtk/NEWS
+++ b/WebKit/gtk/NEWS
@@ -1,4 +1,19 @@
================
+WebKitGTK+ 1.3.4
+================
+
+What's new in WebKitGTK+ 1.3.4?
+
+ - Fixes to compile with latest GTK+ changes.
+ - File reader/writer APIs are now enabled.
+ - The javascript JIT is now enabled by default on ARM.
+ - Clipboard data is no longer lost when the process exists.
+ - Image DnD support.
+ - GSettings support to save/restore Web Inspector settings.
+ - Fullscreen support for HTML5 media player.
+ - Many other bugfixes.
+
+================
WebKitGTK+ 1.3.3
================
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index efb734f..f9ff82e 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -39,8 +39,6 @@
#include <wtf/gobject/GRefPtr.h>
typedef struct _WebKitWebView WebKitWebView;
-typedef struct _GtkWidget GtkWidget;
-typedef char gchar;
namespace WebCore {
class Frame;
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
index 1567d9b..9ff1e6a 100644
--- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
@@ -27,13 +27,6 @@
#include "HTMLMediaElement.h"
#include <wtf/RefPtr.h>
-typedef struct _GtkObject GtkObject;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkAction GtkAction;
-typedef struct _GdkCursor GdkCursor;
-typedef struct _GdkEventConfigure GdkEventConfigure;
-
-
class FullscreenVideoController : public Noncopyable {
public:
FullscreenVideoController();
diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml
index c6539af..0852c7d 100644
--- a/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -114,4 +114,13 @@
<index id="index-1.3.1" role="1.3.1">
<title>Index of new symbols in 1.3.1</title>
</index>
+ <index id="index-1.3.2" role="1.3.2">
+ <title>Index of new symbols in 1.3.2</title>
+ </index>
+ <index id="index-1.3.3" role="1.3.3">
+ <title>Index of new symbols in 1.3.3</title>
+ </index>
+ <index id="index-1.3.4" role="1.3.4">
+ <title>Index of new symbols in 1.3.4</title>
+ </index>
</book>
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index 309ba09..3665005 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,85 @@
+2010-08-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66519.
+ http://trac.webkit.org/changeset/66519
+ https://bugs.webkit.org/show_bug.cgi?id=44973
+
+ Broke GTK+. (Requested by kov on #webkit).
+
+ * cs.po:
+ * de.po:
+ * en_GB.po:
+ * es.po:
+ * et.po:
+ * gl.po:
+ * gu.po:
+ * he.po:
+ * it.po:
+ * lt.po:
+ * lv.po:
+ * nb.po:
+ * nl.po:
+ * pa.po:
+ * pt.po:
+ * pt_BR.po:
+ * ru.po:
+ * sl.po:
+ * sr.po:
+ * sr@latin.po:
+ * sv.po:
+ * uk.po:
+ * vi.po:
+ * zh_CN.po:
+
+2010-08-31 Gustavo Noronha Silva <gns@gnome.org>
+
+ Refreshed all po files with the latest potfile.
+
+ * cs.po:
+ * de.po:
+ * en_GB.po:
+ * es.po:
+ * et.po:
+ * gl.po:
+ * gu.po:
+ * he.po:
+ * it.po:
+ * lt.po:
+ * lv.po:
+ * nb.po:
+ * nl.po:
+ * pa.po:
+ * pt.po:
+ * pt_BR.po:
+ * ru.po:
+ * sl.po:
+ * sr.po:
+ * sr@latin.po:
+ * sv.po:
+ * uk.po:
+ * vi.po:
+ * zh_CN.po:
+
+2010-08-31 Jorge González <aloriel@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Spanish translation for trunk
+ https://bugs.webkit.org/show_bug.cgi?id=44395
+
+ * es.po: Updated.
+
+2010-08-31 Kjartan Maraas <kmaraas@gnome.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ WebKitGTK+ translation needed
+ https://bugzilla.gnome.org/show_bug.cgi?id=610099
+
+ Initial Norwegian (bokmal) translation.
+
+ * nb.po: Added.
+
2010-08-19 Philippe Normand <pnormand@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/po/es.po b/WebKit/gtk/po/es.po
index 433c9de..83ad6bf 100644
--- a/WebKit/gtk/po/es.po
+++ b/WebKit/gtk/po/es.po
@@ -1,15 +1,15 @@
# translation of webkit.po to Español
# This file is put in the public domain.
-# Jorge González <jorgegonz@svn.gnome.org>, 2010.
+# Jorge González González <aloriel@gmail.com>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: webkit\n"
"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-05-01 11:18+0200\n"
-"Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n"
-"Language-Team: Español <gnome-es-list@gnome.org>\n"
+"PO-Revision-Date: 2010-08-22 12:03+0200\n"
+"Last-Translator: Jorge González González <aloriel@gmail.com>\n"
+"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -267,7 +267,7 @@ msgstr "Perfilar el JavaScript ejecutado."
#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
msgid "Enable Timeline profiling"
-msgstr ""
+msgstr "Activar perfilado de tiempo"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
msgid "Profile the WebCore instrumentation."
@@ -512,11 +512,12 @@ msgstr ""
#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
msgid "Enable Caret Browsing"
-msgstr ""
+msgstr "Activar navegación por cursor"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
msgid "Whether to enable accesibility enhanced keyboard navigation"
msgstr ""
+"Indica si activar la mejora de accesibilidad para navegación por teclado"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
msgid "Enable HTML5 Database"
@@ -528,11 +529,11 @@ msgstr "Indica si se debe activar el soporte para la base de datos de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
msgid "Enable HTML5 Local Storage"
-msgstr ""
+msgstr "Activar almacén local de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
+msgstr "Indica si activar el soporte de almacén local de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
msgid "Enable XSS Auditor"
@@ -552,19 +553,19 @@ msgstr ""
#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
msgid "JavaScript can open windows automatically"
-msgstr ""
+msgstr "JavaScript puede abrir ventanas automáticamente"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
msgid "Whether JavaScript can open windows automatically"
-msgstr ""
+msgstr "Indica si JavaScript puede abrir ventanas automáticamente"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
msgid "Enable offline web application cache"
-msgstr ""
+msgstr "Activar la caché de aplicación fuera de línea"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
msgid "Whether to enable offline web application cache"
-msgstr ""
+msgstr "Indica si activar la caché de aplicación web fuera de línea"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
msgid "Editing behavior"
@@ -631,6 +632,8 @@ msgstr "Autoredimensionar ventana"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
+"Redimensionar automáticamente la ventana de nivel superior cuando una página "
+"lo solicita"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
msgid "Enable Java Applet"
@@ -740,7 +743,7 @@ msgstr "Icono de URI"
#: WebKit/gtk/webkit/webkitwebview.cpp:2521
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
+msgstr "El URI para el icono favorito para #WebKitWebView."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
@@ -935,7 +938,7 @@ msgstr "silenciar"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
msgid "unmute"
-msgstr ""
+msgstr "dar voz"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
msgid "play"
@@ -1011,11 +1014,11 @@ msgstr ""
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "begin playback"
-msgstr ""
+msgstr "comenzar la reproducción"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
msgid "pause playback"
-msgstr ""
+msgstr "pausar la reproducción"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
msgid "movie time scrubber"
@@ -1039,7 +1042,7 @@ msgstr ""
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
msgid "number of seconds of movie remaining"
-msgstr ""
+msgstr "número de segundos restantes de la película"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
msgid "current movie status"
diff --git a/WebKit/gtk/po/nb.po b/WebKit/gtk/po/nb.po
new file mode 100644
index 0000000..fdfa753
--- /dev/null
+++ b/WebKit/gtk/po/nb.po
@@ -0,0 +1,1104 @@
+# Norwegian bokmål translation of Epiphany
+# Copyright (C) 2000-2003, 2005 Free Software Foundation, Inc.
+# Ola Sverre Bauge <osb@plover.net>, 2000.
+# Kjartan Maraas <kmaraas@gnome.org>, 2000-2010.
+# Roy-Magne Mo <rmo@sunnmore.net>, 2001.
+# Terance Edward Sola <terance@lyse.net>, 2005.
+# Øivind Hoel <ohoel@cvs.gnome.org>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: epiphany 2.29.x\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
+"POT-Creation-Date: 2010-02-25 15:53-0300\n"
+"PO-Revision-Date: 2010-04-05 14:36+0200\n"
+"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
+"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+msgid "Upload File"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
+msgid "Input _Methods"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
+msgid "LRM _Left-to-right mark"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
+msgid "RLM _Right-to-left mark"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
+msgid "LRE Left-to-right _embedding"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
+msgid "RLE Right-to-left e_mbedding"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
+msgid "LRO Left-to-right _override"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
+msgid "RLO Right-to-left o_verride"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
+msgid "PDF _Pop directional formatting"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
+msgid "ZWS _Zero width space"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
+msgid "ZWJ Zero width _joiner"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
+msgid "ZWNJ Zero width _non-joiner"
+msgstr ""
+
+#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
+msgid "_Insert Unicode Control Character"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:266
+msgid "Network Request"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:267
+msgid "The network request for the URI that should be downloaded"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:281
+msgid "Network Response"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:282
+msgid "The network response for the URI that should be downloaded"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:296
+msgid "Destination URI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:297
+msgid "The destination URI where to save the file"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:311
+msgid "Suggested Filename"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:312
+msgid "The filename suggested as default when saving"
+msgstr ""
+
+# (ugh)
+#: WebKit/gtk/webkit/webkitdownload.cpp:329
+msgid "Progress"
+msgstr "Fremdrift"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:330
+msgid "Determines the current progress of the download"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:343
+msgid "Status"
+msgstr "Status"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:344
+msgid "Determines the current status of the download"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:359
+msgid "Current Size"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:360
+msgid "The length of the data already downloaded"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:374
+msgid "Total Size"
+msgstr "Total størrelse"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:375
+msgid "The total size of the file"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:526
+msgid "User cancelled the download"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
+#, c-format
+msgid "A username and password are being requested by the site %s"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
+msgid "Server message:"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
+msgid "Username:"
+msgstr "Brukernavn:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+msgid "Password:"
+msgstr "Passord:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+msgid "_Remember password"
+msgstr "Husk passo_rd"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+msgid "Name"
+msgstr "Navn"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:299
+msgid "The name of the frame"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:305
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
+#: WebKit/gtk/webkit/webkitwebview.cpp:2318
+msgid "Title"
+msgstr "Tittel"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:306
+msgid "The document title of the frame"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:312
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
+#: WebKit/gtk/webkit/webkitwebview.cpp:2332
+msgid "URI"
+msgstr "URI"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:313
+msgid "The current URI of the contents displayed by the frame"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:344
+msgid "Horizontal Scrollbar Policy"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:345
+msgid ""
+"Determines the current policy for the horizontal scrollbar of the frame."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:362
+msgid "Vertical Scrollbar Policy"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:363
+msgid "Determines the current policy for the vertical scrollbar of the frame."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
+#, fuzzy
+msgid "The title of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+msgid "Alternate Title"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#, fuzzy
+msgid "The alternate title of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#, fuzzy
+msgid "The URI of the history item"
+msgstr "Åpne historikkvinduet"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+msgid "Original URI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#, fuzzy
+msgid "The original URI of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#, fuzzy
+msgid "Last visited Time"
+msgstr "Oftest besøkt"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+msgid "The time at which the history item was last visited"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#, fuzzy
+msgid "Web View"
+msgstr "_Vis"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
+msgid "The Web View that renders the Web Inspector itself"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
+msgid "Inspected URI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
+msgid "The URI that is currently being inspected"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
+msgid "Enable JavaScript profiling"
+msgstr "Aktiver profilering av JavaScript"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+msgid "Profile the executed JavaScript."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#, fuzzy
+msgid "Enable Timeline profiling"
+msgstr "Aktiver myk rulling"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+msgid "Profile the WebCore instrumentation."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+msgid "Reason"
+msgstr "Årsak"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
+msgid "The reason why this navigation is occurring"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
+msgid "The URI that was requested as the target for the navigation"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
+msgid "Button"
+msgstr "Knapp"
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
+msgid "The button used to click"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
+msgid "Modifier state"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
+msgid "A bitmask representing the state of the modifier keys"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
+msgid "Target frame"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
+msgid "The target frame for the navigation"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
+msgid "Default Encoding"
+msgstr "Forvalgt koding"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
+msgid "The default encoding used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
+msgid "Cursive Font Family"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
+msgid "The default Cursive font family used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
+msgid "Default Font Family"
+msgstr "Forvalgt skriftfamilie"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
+msgid "The default font family used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
+msgid "Fantasy Font Family"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
+msgid "The default Fantasy font family used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
+msgid "Monospace Font Family"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
+msgid "The default font family used to display monospace text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
+msgid "Sans Serif Font Family"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
+msgid "The default Sans Serif font family used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
+msgid "Serif Font Family"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
+msgid "The default Serif font family used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
+msgid "Default Font Size"
+msgstr "Forvalgt skriftstørrelse"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
+msgid "The default font size used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
+msgid "Default Monospace Font Size"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
+msgid "The default font size used to display monospace text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
+msgid "Minimum Font Size"
+msgstr "Minste skriftstørrelse"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+msgid "The minimum font size used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#, fuzzy
+msgid "Minimum Logical Font Size"
+msgstr "Minste skriftstørrelse"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
+msgid "The minimum logical font size used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
+msgid "Enforce 96 DPI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
+msgid "Enforce a resolution of 96 DPI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
+msgid "Auto Load Images"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
+msgid "Load images automatically."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
+msgid "Auto Shrink Images"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
+msgid "Automatically shrink standalone images to fit."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
+msgid "Print Backgrounds"
+msgstr "Skriv ut bakgrunn"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#, fuzzy
+msgid "Whether background images should be printed."
+msgstr "Om bakgrunnsbilder skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+msgid "Enable Scripts"
+msgstr "Slå på JavaScript"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+msgid "Enable embedded scripting languages."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+msgid "Enable Plugins"
+msgstr "Aktiver tillegg"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
+msgid "Enable embedded plugin objects."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
+msgid "Resizable Text Areas"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
+msgid "Whether text areas are resizable."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
+#, fuzzy
+msgid "User Stylesheet URI"
+msgstr "Bruk egendefinert _stilark"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
+msgid "The URI of a stylesheet that is applied to every page."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
+msgid "Zoom Stepping Value"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
+msgid "The value by which the zoom level is changed when zooming in or out."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
+msgid "Enable Developer Extras"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
+msgid "Enables special extensions that help developers"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
+msgid "Enable Private Browsing"
+msgstr "Slå på privat nettlesing"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
+msgid "Enables private browsing mode"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
+msgid "Enable Spell Checking"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
+msgid "Enables spell checking while typing"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
+msgid "Languages to use for spell checking"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
+msgid "Comma separated list of languages to use for spell checking"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
+#, fuzzy
+msgid "Enable Caret Browsing"
+msgstr "Aktiver myk rulling"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
+msgid "Whether to enable accesibility enhanced keyboard navigation"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
+msgid "Enable HTML5 Database"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
+msgid "Whether to enable HTML5 database support"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
+msgid "Enable HTML5 Local Storage"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
+msgid "Whether to enable HTML5 Local Storage support"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
+msgid "Enable XSS Auditor"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
+#, fuzzy
+msgid "Whether to enable teh XSS auditor"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+msgid "User Agent"
+msgstr "Brukeragent"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
+msgid "The User-Agent string used by WebKitGtk"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
+msgid "JavaScript can open windows automatically"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
+msgid "Whether JavaScript can open windows automatically"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
+msgid "Enable offline web application cache"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
+msgid "Whether to enable offline web application cache"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
+msgid "Editing behavior"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
+msgid "The behavior mode to use in editing mode"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
+msgid "Enable universal access from file URIs"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
+msgid "Whether to allow universal access from file URIs"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
+msgid "Enable DOM paste"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
+msgid "Whether to enable DOM paste"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
+msgid "Tab key cycles through elements"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
+msgid "Whether the tab key cycles through elements on the page."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
+msgid "Enable Default Context Menu"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
+msgid ""
+"Enables the handling of right-clicks for the creation of the default context "
+"menu"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
+msgid "Enable Site Specific Quirks"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
+msgid "Enables the site-specific compatibility workarounds"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
+msgid "Enable page cache"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
+msgid "Whether the page cache should be used"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
+msgid "Auto Resize Window"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
+msgid "Automatically resize the toplevel window when a page requests it"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
+msgid "Enable Java Applet"
+msgstr "Slå på Java-applet"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
+msgid "Whether Java Applet support through <applet> should be enabled"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2319
+msgid "Returns the @web_view's document title"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2333
+msgid "Returns the current URI of the contents displayed by the @web_view"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2346
+msgid "Copy target list"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2347
+msgid "The list of targets this web view supports for clipboard copying"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2360
+#, fuzzy
+msgid "Paste target list"
+msgstr "Lim inn utklippstavlen"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2361
+msgid "The list of targets this web view supports for clipboard pasting"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2367
+msgid "Settings"
+msgstr "Innstillinger"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+msgid "An associated WebKitWebSettings instance"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+msgid "Web Inspector"
+msgstr "Inspeksjon av nettsider"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+msgid "The associated WebKitWebInspector instance"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+msgid "Editable"
+msgstr "Redigerbar"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#, fuzzy
+msgid "Whether content can be modified by the user"
+msgstr "Bruk koding som spesifisert av dokumentet"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+msgid "Transparent"
+msgstr "Gjennomsiktig"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#, fuzzy
+msgid "Whether content has a transparent background"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+msgid "Zoom level"
+msgstr "Zoom-nivå"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2424
+msgid "The level of zoom of the content"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2439
+msgid "Full content zoom"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2440
+msgid "Whether the full content is scaled when zooming"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2453
+msgid "Encoding"
+msgstr "Koding"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+msgid "The default encoding of the web view"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#, fuzzy
+msgid "Custom Encoding"
+msgstr "Tekstkoding"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2468
+msgid "The custom encoding of the web view"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2520
+msgid "Icon URI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2521
+msgid "The URI for the favicon for the #WebKitWebView."
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
+msgid "Submit"
+msgstr "Send inn"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+msgid "Reset"
+msgstr "Nullstill"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
+msgid "This is a searchable index. Enter search keywords: "
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
+msgid "Choose File"
+msgstr "Velg fil"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+msgid "(None)"
+msgstr "(Ingen)"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+msgid "Open Link in New _Window"
+msgstr "Åpne lenke i nytt _vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#, fuzzy
+msgid "_Download Linked File"
+msgstr "Last ne_d lenke"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
+msgid "Copy Link Loc_ation"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
+msgid "Open _Image in New Window"
+msgstr "Åpne b_ilde i nytt vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+msgid "Sa_ve Image As"
+msgstr "La_gre bilde som"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+msgid "Cop_y Image"
+msgstr "Kop_ier bilde"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#, fuzzy
+msgid "Open _Frame in New Window"
+msgstr "Åpne i nytt _vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+msgid "_Reload"
+msgstr "_Last om"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
+msgid "No Guesses Found"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
+msgid "_Ignore Spelling"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
+msgid "_Learn Spelling"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
+msgid "_Search the Web"
+msgstr "_Søk på nettet"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+msgid "_Look Up in Dictionary"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+msgid "_Open Link"
+msgstr "_Åpne lenke"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
+msgid "Ignore _Grammar"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
+msgid "Spelling and _Grammar"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+msgid "_Show Spelling and Grammar"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
+msgid "_Hide Spelling and Grammar"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
+msgid "_Check Document Now"
+msgstr "_Sjekk dokumentet nå"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
+msgid "Check Spelling While _Typing"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
+msgid "Check _Grammar With Spelling"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
+msgid "_Font"
+msgstr "Skri_ft"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+msgid "_Outline"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+msgid "Inspect _Element"
+msgstr "Inspiser _element"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
+msgid "No recent searches"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
+msgid "Recent searches"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
+msgid "_Clear recent searches"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
+#, fuzzy
+msgid "term"
+msgstr "Andre"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+msgid "definition"
+msgstr "definisjon"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#, fuzzy
+msgid "press"
+msgstr "Adresse"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+msgid "select"
+msgstr "velg"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+msgid "activate"
+msgstr "slå på"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+msgid "uncheck"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+msgid "check"
+msgstr "sjekk"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+msgid "jump"
+msgstr "hopp"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+msgid " files"
+msgstr " filer"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+msgid "Unknown"
+msgstr "Ukjent"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+msgid "Loading..."
+msgstr "Laster..."
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
+msgid "Live Broadcast"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
+msgid "audio element controller"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
+msgid "video element controller"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
+msgid "mute"
+msgstr "demp"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+msgid "unmute"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+msgid "play"
+msgstr "spill av"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+msgid "pause"
+msgstr "pause"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
+msgid "movie time"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
+msgid "timeline slider thumb"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
+msgid "back 30 seconds"
+msgstr "tilbake 30 sekunder"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
+msgid "return to realtime"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
+msgid "elapsed time"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
+msgid "remaining time"
+msgstr "gjenstående tid"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+msgid "status"
+msgstr "status"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+msgid "fullscreen"
+msgstr "fullskjerm"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#, fuzzy
+msgid "fast forward"
+msgstr "_Fremover"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#, fuzzy
+msgid "fast reverse"
+msgstr "Tidligere utviklere:"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
+msgid "show closed captions"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
+msgid "hide closed captions"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
+msgid "audio element playback controls and status display"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
+msgid "video element playback controls and status display"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
+msgid "mute audio tracks"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
+msgid "unmute audio tracks"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
+msgid "begin playback"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
+msgid "pause playback"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
+msgid "movie time scrubber"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
+msgid "movie time scrubber thumb"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
+msgid "seek movie back 30 seconds"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
+msgid "return streaming movie to real time"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
+msgid "current movie time in seconds"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
+msgid "number of seconds of movie remaining"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
+msgid "current movie status"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
+msgid "seek quickly back"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
+msgid "seek quickly forward"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
+#, fuzzy
+msgid "Play movie in fullscreen mode"
+msgstr "Lås i fullskjermmodus"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
+msgid "start displaying closed captions"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
+msgid "stop displaying closed captions"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
+msgid "indefinite time"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
+msgid "value missing"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
+msgid "type mismatch"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
+msgid "pattern mismatch"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
+msgid "too long"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
+msgid "range underflow"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
+msgid "range overflow"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
+msgid "step mismatch"
+msgstr ""
+
diff --git a/WebKit/gtk/tests/testcopyandpaste.c b/WebKit/gtk/tests/testcopyandpaste.c
index 58fb764..5e3f5e7 100644
--- a/WebKit/gtk/tests/testcopyandpaste.c
+++ b/WebKit/gtk/tests/testcopyandpaste.c
@@ -25,7 +25,6 @@
#include <JavaScriptCore/JSStringRef.h>
#include <JavaScriptCore/JSContextRef.h>
-
#if GTK_CHECK_VERSION(2, 14, 0)
typedef struct {
@@ -134,8 +133,10 @@ static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef functio
event->key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
g_object_ref(event->key.window);
#ifndef GTK_API_VERSION_2
- gdk_event_set_device(event, gdk_device_get_associated_device(gdk_display_get_core_pointer(gdk_drawable_get_display(event->key.window))));
+ GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_drawable_get_display(event->key.window));
+ gdk_event_set_device(event, gdk_device_manager_get_client_pointer(manager));
#endif
+
GdkKeymapKey* keys;
gint n_keys;
if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event->key.keyval, &keys, &n_keys)) {
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 76fe6cb..98f8e4e 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -519,7 +519,7 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
Frame* frame = core(webView)->mainFrame();
if (frame->contentRenderer() && frame->view()) {
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
cairo_t* cr = gdk_cairo_create(event->window);
GraphicsContext ctx(cr);
@@ -3193,6 +3193,18 @@ bool webkit_web_view_use_primary_for_paste(WebKitWebView* webView)
return webView->priv->usePrimaryForPaste;
}
+/**
+ * webkit_web_view_set_settings:
+ * @web_view: a #WebKitWebView
+ * @settings: (transfer none): the #WebKitWebSettings to be set
+ *
+ * Replaces the #WebKitWebSettings instance that is currently attached
+ * to @web_view with @settings. The reference held by the @web_view on
+ * the old #WebKitWebSettings instance is dropped, and the reference
+ * count of @settings is inscreased.
+ *
+ * The settings are automatically applied to @web_view.
+ */
void webkit_web_view_set_settings(WebKitWebView* webView, WebKitWebSettings* webSettings)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
@@ -3208,6 +3220,19 @@ void webkit_web_view_set_settings(WebKitWebView* webView, WebKitWebSettings* web
g_object_notify(G_OBJECT(webView), "settings");
}
+/**
+ * webkit_web_view_get_settings:
+ * @web_view: a #WebKitWebView
+ *
+ * Obtains the #WebKitWebSettings associated with the
+ * #WebKitWebView. The #WebKitWebView always has an associated
+ * instance of #WebKitWebSettings. The reference that is returned by
+ * this call is owned by the #WebKitWebView. You may need to increase
+ * its reference count if you intend to keep it alive for longer than
+ * the #WebKitWebView.
+ *
+ * Return value: (transfer none): the #WebKitWebSettings instance
+ */
WebKitWebSettings* webkit_web_view_get_settings(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL);
@@ -3226,9 +3251,7 @@ WebKitWebSettings* webkit_web_view_get_settings(WebKitWebView* webView)
* so this function will only return NULL if the argument is not a
* valid #WebKitWebView.
*
- * Returns: the #WebKitWebInspector instance associated with the
- * #WebKitWebView; %NULL is only returned if the argument is not a
- * valid #WebKitWebView.
+ * Return value: (transfer none): the #WebKitWebInspector instance.
*
* Since: 1.0.3
*/
@@ -3263,7 +3286,7 @@ static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWe
* Returns the instance of #WebKitWebWindowFeatures held by the given
* #WebKitWebView.
*
- * Return value: the #WebKitWebWindowFeatures
+ * Return value: (transfer none): the #WebKitWebWindowFeatures
*
* Since: 1.0.3
*/
@@ -3329,7 +3352,7 @@ void webkit_web_view_set_maintains_back_forward_list(WebKitWebView* webView, gbo
* webkit_web_view_get_back_forward_list:
* @web_view: a #WebKitWebView
*
- * Obtains the #WebKitBackForwardList associated with the given #WebKitWebView. The
+ * Obtains the #WebKitWebBackForwardList associated with the given #WebKitWebView. The
* #WebKitWebBackForwardList is owned by the #WebKitWebView.
*
* Return value: (transfer none): the #WebKitWebBackForwardList
diff --git a/WebKit/mac/Carbon/HIViewAdapter.m b/WebKit/mac/Carbon/HIViewAdapter.m
index d11bea4..565be4f 100644
--- a/WebKit/mac/Carbon/HIViewAdapter.m
+++ b/WebKit/mac/Carbon/HIViewAdapter.m
@@ -30,6 +30,7 @@
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebNSObjectExtras.h"
#import <wtf/Assertions.h>
diff --git a/WebKit/mac/Carbon/HIWebView.mm b/WebKit/mac/Carbon/HIWebView.mm
index b461394..a3cdc66 100644
--- a/WebKit/mac/Carbon/HIWebView.mm
+++ b/WebKit/mac/Carbon/HIWebView.mm
@@ -32,11 +32,11 @@
#import "CarbonWindowAdapter.h"
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebHTMLViewInternal.h"
#import "WebKit.h"
-
-#import <objc/objc-runtime.h>
#import <WebKitSystemInterface.h>
+#import <objc/objc-runtime.h>
@interface NSWindow (AppKitSecretsHIWebViewKnows)
- (void)_removeWindowRef;
@@ -351,7 +351,7 @@ Draw( HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext )
NSView <WebDocumentView> *documentView = [[[inView->fWebView mainFrame] frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)documentView _web_layoutIfNeededRecursive];
+ [(WebHTMLView *)documentView _web_updateLayoutAndStyleIfNeededRecursive];
if ( inView->fIsComposited )
[inView->fWebView displayIfNeededInRect: *(NSRect*)&hiRect];
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 565b1b0..88a2fbf 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,265 @@
+2010-09-01 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add support for autocorrection UI on Mac OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=44958
+ <rdar://problem/7326847>
+
+ See detailed high level description in WebCore/ChangeLog.
+
+ * WebCoreSupport/WebEditorClient.h: Added new member methods declared in
+ EditorClient. Added m_correctionPanelTag to store the ID of current autocorrection UI object.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient): Initialize m_correctionPanelTag.
+ (WebEditorClient::~WebEditorClient): Make sure the autocorrection UI is
+ dismissed before destroying the object.
+ (WebEditorClient::respondToChangedSelection): Dismiss autocorrection UI whenever the selection changes.
+ (WebEditorClient::showCorrectionPanel): Show autocorrection UI.
+ (WebEditorClient::dismissCorrectionPanel): Dismiss autocorrection UI.
+
+2010-09-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/8374711> WebKit needs to compile without access to QuickDraw private headers.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Misc/QuickDrawCompatibility.h: Added.
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ Eliminate Mac-specific code for style re-application and recursive layout/style updating in
+ favor of the cross-platform code that all the other ports use.
+
+ * Carbon/HIWebView.mm:
+ (Draw):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::forceLayout):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
+ (-[WebHTMLView viewWillDraw]):
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
+ (-[WebHTMLView reapplyStyles]):
+ (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView setNeedsToApplyStyles:]):
+ (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
+ (-[WebHTMLView _layoutIfNeeded]):
+ (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _viewWillDrawInternal]):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ Safari needs to be able to count text matches without triggering lots of repainting.
+ Rename markAllMatchesForText: to countMatchesForText: and add a markMatches:
+ parameter. For backwards compatibility markAllMatchesForText: calls
+ countMatchesForText: and passes YES for markMatches:.
+
+ * WebView/WebDocumentInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebPDFView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebView.mm:
+ (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
+ (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
+ * WebView/WebViewPrivate.h:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * WebInspector/WebInspectorFrontend.mm:
+ (-[WebInspectorFrontend initWithFrontendClient:]): Remove a stray semicolon.
+
+2010-08-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8369736> WebKit build fails.
+
+ Temporarily add some extra includes in order to get things building again until <rdar://problem/8374711> is addressed.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r66156): Sites using AppleConnect for authentication fail to log in.
+ https://bugs.webkit.org/show_bug.cgi?id=44865
+
+ After http://trac.webkit.org/changeset/66156, sites using the AppleConnect plug-in
+ for authentication fail to log in. This is due to a bug in AppleConnect that r66156
+ exposed, but since this will have a significant impact on users of WebKit nightly
+ builds, a plugin-specific hack should be added while the underlying issue is being
+ addressed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Convert plug-in parameter names to lowercase
+ if the plugin is of type 'application/x-snkp'.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ text/plain non-video files cause <video> to hang (while reading them?)
+ https://bugs.webkit.org/show_bug.cgi?id=44212
+
+ Add the new WebKitSystemInterface function WKQTMovieDisableComponent to
+ the initialization routine.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize WKQTMovieDisableComponent.
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make an internal method used by Apple Mail into SPI
+ https://bugs.webkit.org/show_bug.cgi?id=44832
+ rdar://problem/5748951
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Moved this method
+ from the internal section to the private section.
+ * WebView/WebFrameInternal.h: Moved the method declaration out of here.
+ * WebView/WebFramePrivate.h: Moved the method declaration in here.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+
+ Added chrome client overrides which support entering and exiting full screen. A new preference has
+ been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled
+ (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore
+ when the chrome has started/finished its full screen animation.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::supportsFullscreenForElement):
+ (WebChromeClient::enterFullscreenForElement):
+ (WebChromeClient::exitFullscreenForElement):
+ (-[WebKitFullScreenListener initWithElement:]):
+ (-[WebKitFullScreenListener webkitWillEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitDidEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitWillExitFullScreen]):
+ (-[WebKitFullScreenListener webkitDidExitFullScreen]):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setFullScreenEnabled:]):
+ (-[WebPreferences fullScreenEnabled]):
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44788, implement HTML5-compliant doctype switching.
+
+ Rename the various modes to match the HTML5 specification:
+ ParseMode -> CompatibilityMode
+ CompatMode -> QuirksMode
+ AlmostStrictMode -> LimitedQuirksMode
+ StrictMode -> NoQuirksMode
+
+ Remove the htmlHacks() accessor from RenderStyle and make rendering code just go to the document
+ instead. This makes switching modes avoid forcing all RenderStyles to detect as changed.
+
+ Clean up user stylesheets to minimize style recalculation when the mode is switched.
+
+ Fix bugs with the propagation of correct modes in the HTML5 parser. Make sure the
+ dummy document created for fragment parsing properly inherits the real document's CompatibilityMode.
+ Make sure the tree builder properly changes the insertion mode to "BeforeHTML" after handling
+ a doctype token.
+
+ determineParseMode -> setCompatibilityModeFromDoctype, and it now implements the HTML5 algorithm
+ precisely.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
2010-08-24 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index f2b4c09..8f8c213 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -71,6 +71,7 @@ ENABLE_FILTERS_macosx = ENABLE_FILTERS;
ENABLE_FILE_WRITER = ;
ENABLE_FILE_SYSTEM = ;
+ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
@@ -120,4 +121,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index deb52b6..659ac62 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 = 534;
-MINOR_VERSION = 6;
+MINOR_VERSION = 7;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/Misc/QuickDrawCompatibility.h b/WebKit/mac/Misc/QuickDrawCompatibility.h
new file mode 100644
index 0000000..1a4ff99
--- /dev/null
+++ b/WebKit/mac/Misc/QuickDrawCompatibility.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef QuickDrawCompatibility_h
+#define QuickDrawCompatibility_h
+
+#ifndef __LP64__
+
+#import <Carbon/Carbon.h>
+
+#if defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MacSetRect SetRect
+#define MacSetRectRgn SetRectRgn
+#define MacUnionRgn UnionRgn
+
+extern Boolean EmptyRgn(RgnHandle);
+extern OSStatus CreateCGContextForPort(CGrafPtr, CGContextRef*);
+extern OSStatus SyncCGContextOriginWithPort(CGContextRef, CGrafPtr);
+extern PixMapHandle GetPortPixMap(CGrafPtr);
+extern QDErr NewGWorldFromPtr(GWorldPtr*, UInt32, const Rect*, CTabHandle, GDHandle, GWorldFlags, Ptr, SInt32);
+extern Rect* GetPortBounds(CGrafPtr, Rect*);
+extern Rect* GetRegionBounds(RgnHandle, Rect*);
+extern RgnHandle GetPortClipRegion(CGrafPtr, RgnHandle);
+extern RgnHandle GetPortVisibleRegion(CGrafPtr, RgnHandle);
+extern RgnHandle NewRgn();
+extern void BackColor(long);
+extern void DisposeGWorld(GWorldPtr);
+extern void DisposeRgn(RgnHandle);
+extern void ForeColor(long);
+extern void GetGWorld(CGrafPtr*, GDHandle*);
+extern void GetPort(GrafPtr*);
+extern void GlobalToLocal(Point*);
+extern void MacSetRect(Rect*, short, short, short, short);
+extern void MacSetRectRgn(RgnHandle, short, short, short, short);
+extern void MacUnionRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void MovePortTo(short, short);
+extern void OffsetRect(Rect*, short, short);
+extern void OffsetRgn(RgnHandle, short, short);
+extern void PaintRect(const Rect*);
+extern void PenNormal();
+extern void PortSize(short, short);
+extern void RectRgn(RgnHandle, const Rect*);
+extern void SectRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void SetGWorld(CGrafPtr, GDHandle);
+extern void SetOrigin(short, short);
+extern void SetPort(GrafPtr);
+extern void SetPortClipRegion(CGrafPtr, RgnHandle);
+extern void SetPortVisibleRegion(CGrafPtr, RgnHandle);
+
+enum {
+ k16BE555PixelFormat = 0x00000010,
+ k32ARGBPixelFormat = 0x00000020,
+ k16LE555PixelFormat = 'L555',
+ k32BGRAPixelFormat = 'BGRA',
+
+ blackColor = 33,
+ whiteColor = 30,
+ greenColor = 341,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#endif // __LP64__
+
+#endif // QuickDrawCompatibility_h
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 10a3187..a4481bc 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -30,6 +30,7 @@
#import "WebNetscapePluginView.h"
+#import "QuickDrawCompatibility.h"
#import "WebDataSourceInternal.h"
#import "WebDefaultUIDelegate.h"
#import "WebFrameInternal.h"
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index e5de14d..5f3b727 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -164,6 +164,12 @@ public:
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#endif
+
+#if ENABLE(FULLSCREEN_API)
+ virtual bool supportsFullScreenForElement(const WebCore::Element*);
+ virtual void enterFullScreenForElement(WebCore::Element*);
+ virtual void exitFullScreenForElement(WebCore::Element*);
+#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 2c2616d..d973e2b 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -110,6 +110,16 @@ using namespace WebCore;
- (id)initWithGeolocation:(Geolocation*)geolocation;
@end
+#if ENABLE(FULLSCREEN_API)
+@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener>
+{
+ RefPtr<Element> _element;
+}
+
+- (id)initWithElement:(Element*)element;
+@end
+#endif
+
WebChromeClient::WebChromeClient(WebView *webView)
: m_webView(webView)
{
@@ -815,6 +825,29 @@ void WebChromeClient::exitFullscreenForNode(Node*)
#endif
+#if ENABLE(FULLSCREEN_API)
+
+bool WebChromeClient::supportsFullScreenForElement(const Element* element)
+{
+ return CallUIDelegateReturningBoolean(false, m_webView, @selector(webView:supportsFullScreenForElement:), kit(const_cast<WebCore::Element*>(element)));
+}
+
+void WebChromeClient::enterFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:enterFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+void WebChromeClient::exitFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:exitFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+#endif
+
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -919,3 +952,41 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
}
@end
+
+#if ENABLE(FULLSCREEN_API)
+@implementation WebKitFullScreenListener
+- (id)initWithElement:(Element*)element
+{
+ if (!(self = [super init]))
+ return nil;
+
+ _element = element;
+ return self;
+}
+
+- (void)webkitWillEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitWillExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillExitFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidExitFullScreenForElement(_element.get());
+}
+
+@end
+#endif
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index e6426aa..fe33e05 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -27,6 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import <WebCore/Editor.h>
#import <WebCore/EditorClient.h>
#import <wtf/RetainPtr.h>
#import <wtf/Forward.h>
@@ -38,7 +39,7 @@
class WebEditorClient : public WebCore::EditorClient {
public:
WebEditorClient(WebView *);
-
+ virtual ~WebEditorClient();
virtual void pageDestroyed();
virtual bool isGrammarCheckingEnabled();
@@ -129,12 +130,19 @@ public:
virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ virtual void showCorrectionPanel(const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
+ virtual void dismissCorrectionPanel(bool correctionAccepted);
+#endif
private:
void registerCommandForUndoOrRedo(PassRefPtr<WebCore::EditCommand>, bool isRedo);
WebEditorClient();
-
+
WebView *m_webView;
RetainPtr<WebEditorUndoTarget> m_undoTarget;
-
bool m_haveUndoRedoOperations;
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ NSInteger m_correctionPanelTag;
+#endif
};
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 2c89919..41cff68 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -64,6 +64,9 @@
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
#import <wtf/Threading.h>
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#import <AppKit/NSTextChecker.h>
+#endif
using namespace WebCore;
using namespace WTF;
@@ -171,7 +174,17 @@ WebEditorClient::WebEditorClient(WebView *webView)
: m_webView(webView)
, m_undoTarget([[[WebEditorUndoTarget alloc] init] autorelease])
, m_haveUndoRedoOperations(false)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ , m_correctionPanelTag(-1)
+#endif
+{
+}
+
+WebEditorClient::~WebEditorClient()
{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ dismissCorrectionPanel(true);
+#endif
}
bool WebEditorClient::isContinuousSpellCheckingEnabled()
@@ -286,6 +299,10 @@ void WebEditorClient::respondToChangedSelection()
{
[m_webView _selectionChanged];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ dismissCorrectionPanel(true);
+#endif
+
// FIXME: This quirk is needed due to <rdar://problem/5009625> - We can phase it out once Aperture can adopt the new behavior on their end
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Aperture"])
return;
@@ -790,6 +807,35 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar
#endif
}
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+void WebEditorClient::showCorrectionPanel(const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, Editor* editor) {
+ dismissCorrectionPanel(true);
+
+ NSRect boundingBoxAsNSRect = boundingBoxOfReplacedString;
+ NSRect webViewFrame = m_webView.frame;
+ boundingBoxAsNSRect.origin.y = webViewFrame.size.height-NSMaxY(boundingBoxAsNSRect);
+
+ // Need to explicitly use these local NSString objects, because the C++ references may be invalidated by the time the block below is executed.
+ NSString *replacedStringAsNSString = replacedString;
+ NSString *replacementStringAsNSString = replacementString;
+
+ m_correctionPanelTag = [[NSSpellChecker sharedSpellChecker] showCorrection:replacementStringAsNSString forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(BOOL accepted) {
+ if (!accepted) {
+ [[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseRejected toCorrection:replacementStringAsNSString forWord:replacedStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
+ editor->handleRejectedCorrection();
+ }
+ }];
+}
+
+void WebEditorClient::dismissCorrectionPanel(bool correctionAccepted)
+{
+ if (m_correctionPanelTag >= 0) {
+ [[NSSpellChecker sharedSpellChecker] dismissCorrection:m_correctionPanelTag acceptCorrection:correctionAccepted];
+ m_correctionPanelTag = -1;
+ }
+}
+#endif
+
void WebEditorClient::updateSpellingUIWithMisspelledWord(const String& misspelledWord)
{
[[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithMisspelledWord:misspelledWord];
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 8bdeca0..3f7c471 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -241,8 +241,6 @@ bool WebFrameLoaderClient::hasHTMLView() const
void WebFrameLoaderClient::forceLayout()
{
NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
- if ([view isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)view setNeedsToApplyStyles:YES];
[view setNeedsLayout:YES];
[view layout];
}
@@ -1576,8 +1574,20 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
NSURL *baseURL = document->baseURL();
NSURL *pluginURL = url;
+ // <rdar://problem/8366089>: AppleConnect has a bug where it does not
+ // understand the parameter names specified in the <object> element that
+ // embeds its plug-in. This site-specific hack works around the issue by
+ // converting the parameter names to lowercase before passing them to the
+ // plug-in.
+ Frame* frame = core(m_webFrame.get());
+ NSMutableArray *attributeKeys = kit(paramNames);
+ if (frame && frame->settings()->needsSiteSpecificQuirks() && equalIgnoringCase(mimeType, "application/x-snkp")) {
+ for (NSUInteger i = 0; i < [attributeKeys count]; ++i)
+ [attributeKeys replaceObjectAtIndex:i withObject:[[attributeKeys objectAtIndex:i] lowercaseString]];
+ }
+
if ([[webView UIDelegate] respondsToSelector:selector]) {
- NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
+ NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:attributeKeys];
NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
attributes, WebPlugInAttributesKey,
[NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey,
@@ -1620,7 +1630,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
if (pluginPackage) {
if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
- view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually);
+ view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, attributeKeys, kit(paramValues), baseURL, kit(element), loadManually);
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
@@ -1630,7 +1640,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
URL:pluginURL
baseURL:baseURL
MIMEType:MIMEType
- attributeKeys:kit(paramNames)
+ attributeKeys:attributeKeys
attributeValues:kit(paramValues)
loadManually:loadManually
element:element] autorelease];
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 0b74dee..47b16b2 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -84,6 +84,7 @@ void InitWebCoreSystemInterface(void)
INIT(SignalCFReadStreamHasBytes);
INIT(QTIncludeOnlyModernMediaFileTypes);
INIT(QTMovieDataRate);
+ INIT(QTMovieDisableComponent);
INIT(QTMovieMaxTimeLoaded);
INIT(QTMovieMaxTimeLoadedChangeNotification);
INIT(QTMovieMaxTimeSeekable);
diff --git a/WebKit/mac/WebInspector/WebInspectorFrontend.mm b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
index 91caa64..c285ef7 100644
--- a/WebKit/mac/WebInspector/WebInspectorFrontend.mm
+++ b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
@@ -29,7 +29,7 @@
@implementation WebInspectorFrontend
-- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient;
+- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient
{
if (!(self = [super init]))
return nil;
diff --git a/WebKit/mac/WebView/WebDocumentInternal.h b/WebKit/mac/WebView/WebDocumentInternal.h
index 191264b..0f63d75 100644
--- a/WebKit/mac/WebView/WebDocumentInternal.h
+++ b/WebKit/mac/WebView/WebDocumentInternal.h
@@ -62,6 +62,7 @@
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue;
- (BOOL)markedTextMatchesAreHighlighted;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
@end
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index dff9ff7..1feb97e 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -824,64 +824,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return kit(range.get());
}
-// Determines whether whitespace needs to be added around aString to preserve proper spacing and
-// punctuation when it’s inserted into the receiver’s text over charRange. Returns by reference
-// in beforeString and afterString any whitespace that should be added, unless either or both are
-// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
-{
- // give back nil pointers in case of early returns
- if (beforeString)
- *beforeString = nil;
- if (afterString)
- *afterString = nil;
-
- // inspect destination
- Node *startContainer = core([rangeToReplace startContainer]);
- Node *endContainer = core([rangeToReplace endContainer]);
-
- Position startPos(startContainer, [rangeToReplace startOffset]);
- Position endPos(endContainer, [rangeToReplace endOffset]);
-
- VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
- VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
-
- // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
- if (startVisiblePos.isNull() || endVisiblePos.isNull())
- return;
-
- bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
- if (addLeadingSpace)
- if (UChar previousChar = startVisiblePos.previous().characterAfter())
- addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
-
- bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
- if (addTrailingSpace)
- if (UChar thisChar = endVisiblePos.characterAfter())
- addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
-
- // inspect source
- bool hasWhitespaceAtStart = false;
- bool hasWhitespaceAtEnd = false;
- unsigned pasteLength = [pasteString length];
- if (pasteLength > 0) {
- NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
-
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
- hasWhitespaceAtStart = YES;
- }
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
- hasWhitespaceAtEnd = YES;
- }
- }
-
- // issue the verdict
- if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
- *beforeString = @" ";
- if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
- *afterString = @" ";
-}
-
- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString
{
if (!_private->coreFrame || !_private->coreFrame->document())
@@ -1240,6 +1182,64 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
}
+// Determines whether whitespace needs to be added around aString to preserve proper spacing and
+// punctuation when it's inserted into the receiver's text over charRange. Returns by reference
+// in beforeString and afterString any whitespace that should be added, unless either or both are
+// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
+{
+ // give back nil pointers in case of early returns
+ if (beforeString)
+ *beforeString = nil;
+ if (afterString)
+ *afterString = nil;
+
+ // inspect destination
+ Node *startContainer = core([rangeToReplace startContainer]);
+ Node *endContainer = core([rangeToReplace endContainer]);
+
+ Position startPos(startContainer, [rangeToReplace startOffset]);
+ Position endPos(endContainer, [rangeToReplace endOffset]);
+
+ VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
+ VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
+
+ // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
+ if (startVisiblePos.isNull() || endVisiblePos.isNull())
+ return;
+
+ bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
+ if (addLeadingSpace)
+ if (UChar previousChar = startVisiblePos.previous().characterAfter())
+ addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
+
+ bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
+ if (addTrailingSpace)
+ if (UChar thisChar = endVisiblePos.characterAfter())
+ addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
+
+ // inspect source
+ bool hasWhitespaceAtStart = false;
+ bool hasWhitespaceAtEnd = false;
+ unsigned pasteLength = [pasteString length];
+ if (pasteLength > 0) {
+ NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
+
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
+ hasWhitespaceAtStart = YES;
+ }
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
+ hasWhitespaceAtEnd = YES;
+ }
+ }
+
+ // issue the verdict
+ if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
+ *beforeString = @" ";
+ if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
+ *afterString = @" ";
+}
+
- (NSMutableDictionary *)_cacheabilityDictionary
{
NSMutableDictionary *result = [NSMutableDictionary dictionary];
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 240b09c..dc3de21 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
#import "WebFramePrivate.h"
#import "WebPreferencesPrivate.h"
-
#import <WebCore/EditAction.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/SelectionController.h>
@@ -142,7 +141,6 @@ WebView *getWebView(WebFrame *webFrame);
- (id)_accessibilityTree;
- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
- (NSRange)_convertToNSRange:(WebCore::Range*)range;
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 3556ad8..a1031f3 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,6 +37,7 @@
@class DOMDocumentFragment;
@class DOMNode;
+@class DOMRange;
@class WebIconFetcher;
@class WebScriptObject;
@class WebScriptWorld;
@@ -84,7 +85,7 @@ typedef enum {
- (BOOL)_isDisplayingStandaloneImage;
-- (unsigned) _pendingFrameUnloadEventCount;
+- (unsigned)_pendingFrameUnloadEventCount;
- (WebIconFetcher *)fetchApplicationIcon:(id)target
selector:(SEL)selector;
@@ -111,16 +112,18 @@ typedef enum {
- (BOOL)_pauseSVGAnimation:(NSString*)elementId onSMILNode:(DOMNode *)node atTime:(NSTimeInterval)time;
// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
-- (unsigned) _numberOfActiveAnimations;
+- (unsigned)_numberOfActiveAnimations;
// Suspend and resume animations (includes both CSS transitions and CSS animations).
-- (void) _suspendAnimations;
-- (void) _resumeAnimations;
+- (void)_suspendAnimations;
+- (void)_resumeAnimations;
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
+
- (NSMutableDictionary *)_cacheabilityDictionary;
- (BOOL)_allowsFollowingLink:(NSURL *)URL;
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index a619f18..34745a1 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -443,7 +443,6 @@ struct WebHTMLViewInterpretKeyEventsParameters {
@interface WebHTMLViewPrivate : NSObject {
@public
BOOL closed;
- BOOL needsToApplyStyles;
BOOL ignoringMouseDraggedEvents;
BOOL printing;
BOOL avoidingPrintOrphan;
@@ -1290,7 +1289,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
- (void)_propagateDirtyRectsToOpaqueAncestors
{
if (![[self _webView] drawsBackground])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super _propagateDirtyRectsToOpaqueAncestors];
}
@@ -1302,7 +1301,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// So check if the dataSource is nil before calling [self _isTopHTMLView], this can be removed
// once the FIXME in _isTopHTMLView is fixed.
if (_private->dataSource && [self _isTopHTMLView])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super viewWillDraw];
}
@@ -1320,7 +1319,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1336,12 +1335,12 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self getRectsBeingDrawn:0 count:&rectCount];
if (rectCount) {
LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now.");
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
}
}
#else
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[_subviews makeObjectsPerformSelector:@selector(_propagateDirtyRectsToOpaqueAncestors)];
#endif
@@ -1373,7 +1372,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1383,7 +1382,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// Because Tiger does not have viewWillDraw we need to do layout here.
NSRect boundsBeforeLayout = [self bounds];
if (!NSIsEmptyRect(visRect))
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
// If layout changes the view's bounds, then we need to recompute the visRect.
// That's because the visRect passed to us was based on the bounds at the time
@@ -1416,7 +1415,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
{
#ifdef BUILDING_ON_TIGER
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
[self _setAsideSubviews];
@@ -3117,37 +3116,23 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)reapplyStyles
{
- if (!_private->needsToApplyStyles)
- return;
-
#ifdef LOG_TIMES
double start = CFAbsoluteTimeGetCurrent();
#endif
- if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
- coreView->setMediaType(_private->printing ? "print" : "screen");
- if (Document* document = coreFrame->document()) {
- document->setPaginatedForScreen(_private->paginateScreenContent);
- document->setPrinting(_private->printing);
- }
- coreFrame->reapplyStyles();
- }
+ if (Frame* coreFrame = core([self _frame]))
+ coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
#ifdef LOG_TIMES
double thisTime = CFAbsoluteTimeGetCurrent() - start;
LOG(Timing, "%s apply style seconds = %f", [self URL], thisTime);
#endif
-
- _private->needsToApplyStyles = NO;
}
// Do a layout, but set up a new fixed width for the purposes of doing printing layout.
// minPageWidth==0 implies a non-printing layout
- (void)layoutToMinimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize
-{
- [self reapplyStyles];
-
+{
if (![self _needsLayout])
return;
@@ -3308,7 +3293,13 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)setNeedsToApplyStyles: (BOOL)flag
{
LOG(View, "%@ setNeedsToApplyStyles:%@", self, flag ? @"YES" : @"NO");
- _private->needsToApplyStyles = flag;
+ if (!flag)
+ return; // There's no way to say you don't need a style recalc.
+ if (Frame* frame = core([self _frame])) {
+ if (frame->document() && frame->document()->inPageCache())
+ return;
+ frame->document()->scheduleForcedStyleRecalc();
+ }
}
- (void)drawSingleRect:(NSRect)rect
@@ -3883,7 +3874,18 @@ static BOOL isInPasswordField(Frame* coreFrame)
_private->paginateScreenContent = paginateScreenContent;
if (!printing && !paginateScreenContent)
_private->avoidingPrintOrphan = NO;
- [self setNeedsToApplyStyles:YES];
+
+ Frame* coreFrame = core([self _frame]);
+ if (coreFrame) {
+ if (FrameView* coreView = coreFrame->view())
+ coreView->setMediaType(_private->printing ? "print" : "screen");
+ if (Document* document = coreFrame->document()) {
+ document->setPaginatedForScreen(_private->paginateScreenContent);
+ document->setPrinting(_private->printing);
+ document->styleSelectorChanged(RecalcStyleImmediately);
+ }
+ }
+
[self setNeedsLayout:YES];
[self layoutToMinimumPageWidth:minPageWidth height:minPageHeight maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
if (!printing) {
@@ -5507,31 +5509,16 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
{
ASSERT(!_private->subviewsSetAside);
- if (_private->needsToApplyStyles || [self _needsLayout])
+ if ([self _needsLayout])
[self layout];
}
-- (void)_web_layoutIfNeededRecursive
+- (void)_web_updateLayoutAndStyleIfNeededRecursive
{
- [self _layoutIfNeeded];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = YES;
-#endif
-
- NSMutableArray *descendantWebHTMLViews = [[NSMutableArray alloc] init];
-
- [self _web_addDescendantWebHTMLViewsToArray:descendantWebHTMLViews];
-
- unsigned count = [descendantWebHTMLViews count];
- for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _layoutIfNeeded];
-
- [descendantWebHTMLViews release];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = NO;
-#endif
+ WebFrame *webFrame = [self _frame];
+ Frame* coreFrame = core(webFrame);
+ if (coreFrame && coreFrame->view())
+ coreFrame->view()->updateLayoutAndStyleIfNeededRecursive();
}
- (void) _destroyAllWebPlugins
@@ -6202,10 +6189,15 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
Frame* coreFrame = core([self _frame]);
if (!coreFrame)
return 0;
- return coreFrame->markAllMatchesForText(string, caseFlag, limit);
+ return coreFrame->countMatchesForText(string, caseFlag, limit, markMatches);
}
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
diff --git a/WebKit/mac/WebView/WebHTMLViewInternal.h b/WebKit/mac/WebView/WebHTMLViewInternal.h
index 3f1f50d..2d9e2a9 100644
--- a/WebKit/mac/WebView/WebHTMLViewInternal.h
+++ b/WebKit/mac/WebView/WebHTMLViewInternal.h
@@ -59,7 +59,7 @@ namespace WebCore {
#endif
- (WebCore::CachedImage*)promisedDragTIFFDataSource;
- (void)setPromisedDragTIFFDataSource:(WebCore::CachedImage*)source;
-- (void)_web_layoutIfNeededRecursive;
+- (void)_web_updateLayoutAndStyleIfNeededRecursive;
- (void)_destroyAllWebPlugins;
- (BOOL)_needsLayout;
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index 5e7b73c..70fceb6 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -628,6 +628,11 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
PDFSelection *previousMatch = nil;
PDFSelection *nextMatch = nil;
NSMutableArray *matches = [[NSMutableArray alloc] initWithCapacity:limit];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 86f6d85..3b750ff 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -97,6 +97,7 @@
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
+#define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled"
#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
// These are private both because callers should be using the cover methods and because the
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index eae2d8d..a4a5383 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -365,6 +365,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
[NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
[NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
[NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota,
@@ -1346,6 +1347,16 @@ static NSString *classIBCreatorID = nil;
[self _setStringValue:value forKey:key];
}
+- (void)setFullScreenEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
+- (BOOL)fullScreenEnabled
+{
+ return [self _boolValueForKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 45c2a24..783038d 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -206,4 +206,10 @@ extern NSString *WebPreferencesRemovedNotification;
// For WebView's use only.
- (void)willAddToWebView;
- (void)didRemoveFromWebView;
+
+// Full screen support is dependent on WebCore/WebKit being
+// compiled with ENABLE_FULLSCREEN_API.
+- (void)setFullScreenEnabled:(BOOL)flag;
+- (BOOL)fullScreenEnabled;
+
@end
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 0fb120c..22752ae 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -95,6 +95,15 @@ enum {
- (void)deny;
@end
+#if ENABLE(FULLSCREEN_API)
+@protocol WebKitFullScreenListener<NSObject>
+- (void)webkitWillEnterFullScreen;
+- (void)webkitDidEnterFullScreen;
+- (void)webkitWillExitFullScreen;
+- (void)webkitDidExitFullScreen;
+@end
+#endif
+
@interface NSObject (WebUIDelegatePrivate)
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message;
@@ -164,4 +173,10 @@ enum {
*/
- (void)webView:(WebView *)sender printFrame:(WebFrame *)frame;
+#if ENABLE(FULLSCREEN_API)
+- (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element;
+#endif
+
@end
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 2d3dbfa..f2e76c1 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -842,7 +842,7 @@ static bool shouldEnableLoadDeferring()
{
Frame* frame = [self _mainCoreFrame];
if (frame && frame->view())
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
}
#endif
@@ -1425,7 +1425,7 @@ static bool fastDocumentTeardownEnabled()
settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage);
settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
- settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings->setEnforceCSSMIMETypeInNoQuirksMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
settings->setDNSPrefetchingEnabled([preferences isDNSPrefetchingEnabled]);
// FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled.
@@ -1438,6 +1438,9 @@ static bool fastDocumentTeardownEnabled()
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
+#if ENABLE(FULLSCREEN_API)
+ settings->setFullScreenEnabled([preferences fullScreenEnabled]);
+#endif
settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
// Application Cache Preferences are stored on the global cache storage manager, not in Settings.
@@ -4372,15 +4375,21 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag highlight:highlight limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
WebFrame *frame = [self mainFrame];
unsigned matchCount = 0;
do {
id <WebDocumentView> view = [[frame frameView] documentView];
if ([view conformsToProtocol:@protocol(WebMultipleTextMatches)]) {
- [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
+ if (markMatches)
+ [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
ASSERT(limit == 0 || matchCount < limit);
- matchCount += [(NSView <WebMultipleTextMatches>*)view markAllMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount];
+ matchCount += [(NSView <WebMultipleTextMatches>*)view countMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount markMatches:markMatches];
// Stop looking if we've reached the limit. A limit of 0 means no limit.
if (limit > 0 && matchCount >= limit)
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index 9d47a4d..28348cc 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -180,6 +180,7 @@ typedef enum {
// These methods are still in flux; don't rely on them yet.
- (BOOL)canMarkAllTextMatches;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index 83ee451..f7b1188 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -1446,7 +1446,7 @@ void QWebElement::render(QPainter* painter)
FrameView* view = frame->view();
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
IntRect rect = e->getRect();
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 1b0c2df..81eabfc 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -286,7 +286,7 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
QPainter* painter = context->platformContext();
WebCore::FrameView* view = frame->view();
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 5eee21c..ec415bb 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -81,6 +81,7 @@
#include "Cache.h"
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
+#include "GeolocationPermissionClientQt.h"
#include "NotificationPresenterClientQt.h"
#include "PageClientQt.h"
#include "WorkerThread.h"
@@ -2082,30 +2083,6 @@ bool QWebPage::shouldInterruptJavaScript()
#endif
}
-/*!
- \fn bool QWebPage::allowGeolocationRequest()
- \since 4.7
-
- This function is called whenever a JavaScript program running inside \a frame tries to access user location through navigator.geolocation.
-
- If the user wants to allow access to location then it should return true; otherwise false.
-
- The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.
-
- \warning Because of binary compatibility constraints, this function is not virtual. If you want to
- provide your own implementation in a QWebPage subclass, reimplement the allowGeolocationRequest()
- slot in your subclass instead. QtWebKit will dynamically detect the slot and call it.
-*/
-bool QWebPage::allowGeolocationRequest(QWebFrame *frame)
-{
-#ifdef QT_NO_MESSAGEBOX
- return false;
-#else
- QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
- return QMessageBox::Yes == QMessageBox::information(parent, tr("Location Request by- %1").arg(frame->url().host()), tr("The page wants to access your location information. Do you want to allow the request?"), QMessageBox::Yes, QMessageBox::No);
-#endif
-}
-
void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, PermissionPolicy policy)
{
switch (domain) {
@@ -2115,6 +2092,12 @@ void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, Perm
NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame);
#endif
break;
+ case GeolocationPermissionDomain:
+#if ENABLE(GEOLOCATION)
+ GeolocationPermissionClientQt::geolocationPermissionClient()->setPermission(frame, policy);
+#endif
+ break;
+
default:
break;
}
@@ -2131,7 +2114,11 @@ void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, Perm
If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
- \sa acceptNavigationRequest()
+ \note In the cases when the window creation is being triggered by JavaScript, apart from
+ reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
+ of QWebSettings to true in order for it to get called.
+
+ \sa acceptNavigationRequest(), QWebView::createWindow()
*/
QWebPage *QWebPage::createWindow(WebWindowType type)
{
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index 14f3b8b..dda4a6a 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -57,6 +57,7 @@ namespace WebCore {
class InspectorClientQt;
class InspectorFrontendClientQt;
class NotificationPresenterClientQt;
+ class GeolocationPermissionClientQt;
class ResourceHandle;
class HitTestResult;
class QNetworkReplyHandler;
@@ -202,7 +203,8 @@ public:
};
enum PermissionDomain {
- NotificationsPermissionDomain
+ NotificationsPermissionDomain,
+ GeolocationPermissionDomain
};
class ViewportHints {
@@ -351,7 +353,6 @@ public:
public Q_SLOTS:
bool shouldInterruptJavaScript();
- bool allowGeolocationRequest(QWebFrame *frame);
Q_SIGNALS:
void loadStarted();
@@ -424,6 +425,7 @@ private:
friend class WebCore::InspectorClientQt;
friend class WebCore::InspectorFrontendClientQt;
friend class WebCore::NotificationPresenterClientQt;
+ friend class WebCore::GeolocationPermissionClientQt;
friend class WebCore::ResourceHandle;
friend class WebCore::QNetworkReplyHandler;
friend class DumpRenderTreeSupportQt;
diff --git a/WebKit/qt/Api/qwebplugindatabase.cpp b/WebKit/qt/Api/qwebplugindatabase.cpp
index 758e257..a7a3b5f 100644
--- a/WebKit/qt/Api/qwebplugindatabase.cpp
+++ b/WebKit/qt/Api/qwebplugindatabase.cpp
@@ -284,6 +284,10 @@ QList<QWebPluginInfo> QWebPluginDatabase::plugins() const
for (unsigned int i = 0; i < plugins.size(); ++i) {
PluginPackage* plugin = plugins[i];
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ if (!plugin->ensurePluginLoaded())
+ continue;
+#endif
qwebplugins.append(QWebPluginInfo(plugin));
}
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index edd07da..d88b0da 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -34,6 +34,7 @@
#include "KURL.h"
#include "PlatformString.h"
#include "IconDatabase.h"
+#include "PluginDatabase.h"
#include "Image.h"
#include "IntSize.h"
#include "ApplicationCacheStorage.h"
@@ -1093,6 +1094,14 @@ void QWebSettings::enablePersistentStorage(const QString& path)
QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
+
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ QFileInfo info(storagePath);
+ if (info.isDir() && info.isWritable()) {
+ WebCore::PluginDatabase::setPersistentMetadataCacheEnabled(true);
+ WebCore::PluginDatabase::setPersistentMetadataCachePath(storagePath);
+ }
+#endif
}
/*!
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 10cf60c..1f400cb 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -953,7 +953,11 @@ void QWebView::paintEvent(QPaintEvent *ev)
\note If the createWindow() method of the associated page is reimplemented, this
method is not called, unless explicitly done so in the reimplementation.
- \sa QWebPage::createWindow()
+ \note In the cases when the window creation is being triggered by JavaScript, apart from
+ reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
+ of QWebSettings to true in order for it to get called.
+
+ \sa QWebPage::createWindow(), QWebPage::acceptNavigationRequest()
*/
QWebView *QWebView::createWindow(QWebPage::WebWindowType type)
{
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 9969ebd..996435b 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,232 @@
+2010-09-01 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] QWebPage::allowGeolocationRequest should be async API
+ https://bugs.webkit.org/show_bug.cgi?id=41364
+
+ Provides a new async API for geolocation permission. Using
+ Notification API approach from qtwebkit. GeolocationPermissionClientQt
+ maintains list of pending requests from WebCore and intimates them
+ when client either allowes/denies the request. Also implements
+ ChromeClientQt::cancelGeolocationPermissionRequestForFrame.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::setUserPermission):
+ * Api/qwebpage.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
+ (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/GeolocationPermissionClientQt.cpp: Added.
+ (WebCore::GeolocationPermissionClientQt::geolocationPermissionClient):
+ (WebCore::GeolocationPermissionClientQt::GeolocationPermissionClientQt):
+ (WebCore::GeolocationPermissionClientQt::~GeolocationPermissionClientQt):
+ (WebCore::GeolocationPermissionClientQt::requestGeolocationPermissionForFrame):
+ (WebCore::GeolocationPermissionClientQt::cancelGeolocationPermissionRequestForFrame):
+ (WebCore::GeolocationPermissionClientQt::setPermission):
+ * WebCoreSupport/GeolocationPermissionClientQt.h: Added.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (JSTestPage::requestPermission):
+ (tst_QWebPage::geolocationRequestJS):
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::render):
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderRelativeCoords):
+
+2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebPage::originatingObjectInNetworkRequests() fails on trunk
+ https://bugs.webkit.org/show_bug.cgi?id=45001
+
+ Fix the test, we should not use data encoded URL since we are not
+ setting an URL but setting the substituteData directly.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::originatingObjectInNetworkRequests):
+
+2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ JSC TimeoutChecker::didTimeOut overflows on ARM
+ https://bugs.webkit.org/show_bug.cgi?id=38538
+
+ Re-enabled the test that was skipped for Maemo 5.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::inspectorDestroyed):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-28 Daniel Bates <dbates@rim.com>
+
+ Attempt to fix the Qt Windows and Qt Linux Release minimal builds
+ after changeset 66297 <http://trac.webkit.org/changeset/66297>.
+
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginDatabase::plugins): Wrap the call to PluginPackage::ensurePluginLoaded
+ in #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE).
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] tst_QWebView::focusInputTypes() fails on MeeGo Handset with WebKit 2.1
+ https://bugs.webkit.org/show_bug.cgi?id=44761
+
+ Make the test more robust to changes in the execution environment. The click
+ are now correctly simulated, and the position are determined from the content.
+
+ The test also create the view and page on the stack to avoid the leak when the
+ test is failing.
+
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::focusInputTypes):
+
+2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Cache plugin info to a persistent database
+
+ https://bugs.webkit.org/show_bug.cgi?id=43179
+
+ Implement a cache of NPAPI plugin metadata. Write the metadata to aa
+ file that gets rewritten if any plugin is added / removed. Compilation
+ of the feature is controlled by #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+
+ Currently only enabled for Qt UNIX flavors.
+
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginDatabase::plugins): Match previous behavior: ensure all returned plugins are loaded.
+ * Api/qwebsettings.cpp:
+ (QWebSettings::enablePersistentStorage): Set plugin cache path.
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebFrame::inputFieldFocus() fails on MeeGo Handset with QtWebKit 2.1
+ https://bugs.webkit.org/show_bug.cgi?id=44703
+
+ Make the test more robust to changes in the execution environment.
+ The position where the mouse events are sent is now computed from the element geometry,
+ this make the test less dependent on the fonts.
+
+ The test now also make sure the window manager mapped the window on screen
+ before attempting to send the events.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebFrame::hitTestContent() fails on Meego Handset
+ https://bugs.webkit.org/show_bug.cgi?id=44701
+
+ Make the test more robust. The position of the text is not relying
+ on the size of the fonts anymore.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-08-26 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for automatically creating new windows in QWebView
+ https://bugs.webkit.org/show_bug.cgi?id=29847
+
+ Improved the documentation of createWindow methods of both QWebView and
+ QWebPage by mentioning that for any of them be called, QWebSettings'
+ JavaScriptCanOpenWindows attribute must be set to true.
+
+ * Api/qwebpage.cpp:
+ * Api/qwebview.cpp:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::inspectorDestroyed):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ (WebCore::InspectorFrontendClientQt::disconnectFromBackend):
+ (WebCore::InspectorFrontendClientQt::destroyInspectorView):
+ (WebCore::InspectorFrontendClientQt::inspectorClientDestroyed):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Remove dead code.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::statusbarVisible):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ (WebCore::InspectorFrontendClientQt::disconnectFromBackend):
+ (WebCore::InspectorFrontendClientQt::destroyInspectorView):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] tst_QWebFrame::popupFocus() hardcode the element position
+ https://bugs.webkit.org/show_bug.cgi?id=44674
+
+ This patch dynamically find the position of the combo element instead
+ of hardcoding a position to click.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
2010-08-25 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index bfce824..8b01d4d 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -41,6 +41,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerQt.h"
#endif
+#include "GeolocationPermissionClientQt.h"
#include "HitTestResult.h"
#include "Icon.h"
#include "NotImplemented.h"
@@ -229,7 +230,6 @@ void ChromeClientQt::setStatusbarVisible(bool visible)
bool ChromeClientQt::statusbarVisible()
{
return statusBarVisible;
- return false;
}
@@ -568,10 +568,18 @@ void ChromeClientQt::setCursor(const Cursor& cursor)
void ChromeClientQt::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
- bool allow = false;
+#if ENABLE(GEOLOCATION)
QWebFrame* webFrame = QWebFramePrivate::kit(frame);
- QMetaObject::invokeMethod(m_webPage, "allowGeolocationRequest", Qt::DirectConnection, Q_RETURN_ARG(bool, allow), Q_ARG(QWebFrame*, webFrame));
- geolocation->setIsAllowed(allow);
+ GeolocationPermissionClientQt::geolocationPermissionClient()->requestGeolocationPermissionForFrame(webFrame, geolocation);
+#endif
+}
+
+void ChromeClientQt::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
+{
+#if ENABLE(GEOLOCATION)
+ QWebFrame* webFrame = QWebFramePrivate::kit(frame);
+ GeolocationPermissionClientQt::geolocationPermissionClient()->cancelGeolocationPermissionRequestForFrame(webFrame, geolocation);
+#endif
}
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 55edc50..d18f993 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -168,7 +168,7 @@ namespace WebCore {
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
virtual bool selectItemWritingDirectionIsNatural();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index b6c3d51..026866c 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -388,7 +388,7 @@ void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
- coreFrame->document()->updateStyleSelector();
+ coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
view->layout();
}
diff --git a/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp
new file mode 100644
index 0000000..5fb9ab7
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GeolocationPermissionClientQt.h"
+
+#include "Geolocation.h"
+
+#include "qwebframe.h"
+#include "qwebkitglobal.h"
+#include "qwebpage.h"
+
+namespace WebCore {
+
+#if ENABLE(GEOLOCATION)
+
+static GeolocationPermissionClientQt* s_geolocationPermission;
+
+GeolocationPermissionClientQt* GeolocationPermissionClientQt::geolocationPermissionClient()
+{
+ if (s_geolocationPermission)
+ return s_geolocationPermission;
+
+ s_geolocationPermission = new GeolocationPermissionClientQt();
+ return s_geolocationPermission;
+}
+
+GeolocationPermissionClientQt::GeolocationPermissionClientQt()
+{
+}
+
+GeolocationPermissionClientQt::~GeolocationPermissionClientQt()
+{
+}
+
+void GeolocationPermissionClientQt::requestGeolocationPermissionForFrame(QWebFrame* webFrame, Geolocation* listener)
+{
+ m_pendingPermissionRequests.insert(webFrame, listener);
+
+ QWebPage* page = webFrame->page();
+ emit page->requestPermissionFromUser(webFrame, QWebPage::GeolocationPermissionDomain);
+}
+
+
+void GeolocationPermissionClientQt::cancelGeolocationPermissionRequestForFrame(QWebFrame* webFrame, Geolocation* listener)
+{
+ m_pendingPermissionRequests.remove(webFrame);
+
+ QWebPage* page = webFrame->page();
+ emit page->cancelRequestsForPermission(webFrame, QWebPage::GeolocationPermissionDomain);
+}
+
+void GeolocationPermissionClientQt::setPermission(QWebFrame* webFrame, QWebPage::PermissionPolicy permission)
+{
+ if (!m_pendingPermissionRequests.contains(webFrame))
+ return;
+
+ Geolocation* listener = m_pendingPermissionRequests.value(webFrame);
+
+ if (permission == QWebPage::PermissionGranted)
+ listener->setIsAllowed(true);
+ else if (permission == QWebPage::PermissionDenied)
+ listener->setIsAllowed(false);
+ else
+ return;
+
+ m_pendingPermissionRequests.remove(webFrame);
+}
+
+#endif // ENABLE(GEOLOCATION)
+}
diff --git a/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
new file mode 100644
index 0000000..abe9c76
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 GeolocationPermissionClientQt_h
+#define GeolocationPermissionClientQt_h
+
+#include "Geolocation.h"
+#include "qwebpage.h"
+
+#include <QHash>
+
+class QWebFrame;
+class QWebPage;
+
+namespace WebCore {
+
+class GeolocationPermissionClientQt {
+public:
+ GeolocationPermissionClientQt();
+ ~GeolocationPermissionClientQt();
+
+ void requestGeolocationPermissionForFrame(QWebFrame*, Geolocation*);
+ void cancelGeolocationPermissionRequestForFrame(QWebFrame*, Geolocation*);
+ void setPermission(QWebFrame*, QWebPage::PermissionPolicy);
+
+ static GeolocationPermissionClientQt* geolocationPermissionClient();
+private:
+ QHash<QWebFrame*, Geolocation*> m_pendingPermissionRequests;
+};
+
+}
+
+#endif
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 83b8600..98ce663 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -2678,7 +2678,8 @@ void tst_QWebFrame::popupFocus()
QTRY_VERIFY(view.hasFocus());
// open the popup by clicking. check if focus is on the popup
- QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
+ const QWebElement webCombo = view.page()->mainFrame()->documentElement().findFirst(QLatin1String("select[name=select]"));
+ QTest::mouseClick(&view, Qt::LeftButton, 0, webCombo.geometry().center());
QObject* webpopup = firstChildByClassName(&view, "QComboBox");
QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
QVERIFY(combo != 0);
@@ -2696,6 +2697,7 @@ void tst_QWebFrame::inputFieldFocus()
view.setHtml("<html><body><input type=\"text\"></input></body></html>");
view.resize(400, 100);
view.show();
+ QTest::qWaitForWindowShown(&view);
view.setFocus();
QTRY_VERIFY(view.hasFocus());
@@ -2703,7 +2705,8 @@ void tst_QWebFrame::inputFieldFocus()
int delay = qApp->cursorFlashTime() * 2;
// focus the lineedit and check if it blinks
- QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
+ const QWebElement inputElement = view.page()->mainFrame()->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&view, Qt::LeftButton, 0, inputElement.geometry().center());
m_inputFieldsTestView = &view;
view.installEventFilter( this );
QTest::qWait(delay);
@@ -2713,13 +2716,14 @@ void tst_QWebFrame::inputFieldFocus()
void tst_QWebFrame::hitTestContent()
{
- QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\">link text</a></body></html>");
+ QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\" id=\"link\">link text</a></body></html>");
QWebPage page;
QWebFrame* frame = page.mainFrame();
frame->setHtml(html);
page.setViewportSize(QSize(200, 0)); //no height so link is not visible
- QWebHitTestResult result = frame->hitTestContent(QPoint(10, 100));
+ const QWebElement linkElement = frame->documentElement().findFirst(QLatin1String("a#link"));
+ QWebHitTestResult result = frame->hitTestContent(linkElement.geometry().center());
QCOMPARE(result.linkText(), QString("link text"));
QWebElement link = result.linkElement();
QCOMPARE(link.attribute("target"), QString("_foo"));
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 67e3ecd..9a6c35f 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -217,9 +217,12 @@ public slots:
bool shouldInterruptJavaScript() {
return true;
}
- bool allowGeolocationRequest(QWebFrame *frame)
+ void requestPermission(QWebFrame* frame, QWebPage::PermissionDomain domain)
{
- return m_allowGeolocation;
+ if (m_allowGeolocation)
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
}
public:
@@ -234,9 +237,6 @@ private:
void tst_QWebPage::infiniteLoopJS()
{
-#ifdef Q_WS_MAEMO_5
- QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
-#endif
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
@@ -247,6 +247,9 @@ void tst_QWebPage::infiniteLoopJS()
void tst_QWebPage::geolocationRequestJS()
{
JSTestPage* newPage = new JSTestPage(m_view);
+ connect(newPage, SIGNAL(requestPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)),
+ newPage, SLOT(requestPermission(QWebFrame*, QWebPage::PermissionDomain)));
+
newPage->setGeolocationPermission(false);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
@@ -2028,7 +2031,7 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
m_page->setNetworkAccessManager(networkManager);
networkManager->requests.clear();
- m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
+ m_view->setHtml(QString("<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
"<head><meta http-equiv='refresh' content='1'></head>foo \">"
"<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 57f726d..fd4978d 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -28,6 +28,7 @@
#include <qnetworkrequest.h>
#include <qdiriterator.h>
#include <qwebkitversion.h>
+#include <qwebelement.h>
#include <qwebframe.h>
class tst_QWebView : public QObject
@@ -52,20 +53,6 @@ private slots:
void crashTests();
};
-class WebView : public QWebView
-{
- Q_OBJECT
-
-public:
- void fireMouseClick(QPoint point) {
- QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QWebView::mousePressEvent(&presEv);
- QWebView::mousePressEvent(&relEv);
- }
-
-};
-
// This will be called before the first test function is executed.
// It is only called once.
void tst_QWebView::initTestCase()
@@ -245,79 +232,86 @@ void tst_QWebView::microFocusCoordinates()
void tst_QWebView::focusInputTypes()
{
- QWebPage* page = new QWebPage;
- WebView* webView = new WebView;
- webView->setPage( page );
+ QWebView webView;
+ webView.show();
+ QTest::qWaitForWindowShown(&webView);
- QCoreApplication::processEvents();
QUrl url("qrc:///resources/input_types.html");
- page->mainFrame()->load(url);
- page->mainFrame()->setFocus();
+ QWebFrame* const mainFrame = webView.page()->mainFrame();
+ mainFrame->load(url);
+ mainFrame->setFocus();
- QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+ QVERIFY(waitForSignal(&webView, SIGNAL(loadFinished(bool))));
// 'text' type
- webView->fireMouseClick(QPoint(20, 10));
+ QWebElement inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoPredictiveText);
#else
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
#endif
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'tel' field
- webView->fireMouseClick(QPoint(20, 110));
- QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=tel]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhDialableCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'number' field
- webView->fireMouseClick(QPoint(20, 160));
- QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=number]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhDigitsOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'email' field
- webView->fireMouseClick(QPoint(20, 210));
- QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=email]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhEmailCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'url' field
- webView->fireMouseClick(QPoint(20, 260));
- QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=url]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhUrlCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text' type
- webView->fireMouseClick(QPoint(20, 10));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoPredictiveText);
#else
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
#endif
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text area' field
- webView->fireMouseClick(QPoint(20, 320));
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
-
- delete webView;
-
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("textarea"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
}
QTEST_MAIN(tst_QWebView)
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9a20e51..b3877dc 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,96 @@
+2010-09-01 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebViews should allow their parent windows to handle WM_MOUSEACTIVATE messages.
+ https://bugs.webkit.org/show_bug.cgi?id=45047
+
+ * WebView.cpp:
+ (WebView::WebViewWndProc):
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * WebFrame.cpp:
+ (WebFrame::paintDocumentRectToContext):
+ * WebView.cpp:
+ (WebView::updateBackingStore):
+
+2010-08-30 Adam Roben <aroben@apple.com>
+
+ Fix crash on launch on Windows due to changing IWebFramePrivate's
+ vtable
+
+ This regressed in r65107.
+
+ Fixes <http://webkit.org/b/44755>.
+
+ Rubber-stamped by Jon Honeycutt.
+
+ * Interfaces/IWebFramePrivate.idl: Moved suspendAnimations and
+ resumeAnimations to the end of the interface so that the vtable will
+ match what Safari expects.
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
2010-08-24 Ada Chan <adachan@apple.com>
Reviewed by Steve Falkenburg.
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index cf25204..bc9a4bd 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -90,8 +90,6 @@ interface IWebFramePrivate : IUnknown
HRESULT pauseAnimation([in] BSTR animationName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning);
HRESULT numberOfActiveAnimations([out, retval] UINT* number);
- HRESULT suspendAnimations();
- HRESULT resumeAnimations();
HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result);
@@ -116,4 +114,7 @@ interface IWebFramePrivate : IUnknown
HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
HRESULT renderTreeAsExternalRepresentation([in] BOOL forPrinting, [out, retval] BSTR* result);
+
+ HRESULT suspendAnimations();
+ HRESULT resumeAnimations();
}
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index d0cd1e8..d12989b 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -340,7 +340,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
return E_FAIL;
// We can't paint with a layout still pending.
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
GraphicsContext gc(dc);
@@ -373,7 +373,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintScrollViewRectToContextAtPoint(
return E_FAIL;
// We can't paint with a layout still pending.
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
GraphicsContext gc(dc);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index c682e91..5aa4fc4 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -910,7 +910,7 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
// Do a layout first so that everything we render to the backing store is always current.
if (Frame* coreFrame = core(m_mainFrame))
if (FrameView* view = coreFrame->view())
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
Vector<IntRect> paintRects;
if (!backingStoreCompletelyDirty && m_backingStoreDirtyRegion) {
@@ -2193,6 +2193,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
break;
case WM_MOUSEACTIVATE:
webView->setMouseActivated(true);
+ handled = false;
break;
case WM_GETDLGCODE: {
COMPtr<IWebUIDelegate> uiDelegate;
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
new file mode 100644
index 0000000..ea106fe
--- /dev/null
+++ b/WebKit/wince/ChangeLog
@@ -0,0 +1,120 @@
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add EditorClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44822
+
+ * WebCoreSupport/EditorClientWinCE.cpp: Added.
+ (WebKit::EditorClient::EditorClient):
+ (WebKit::EditorClient::~EditorClient):
+ (WebKit::EditorClient::setInputMethodState):
+ (WebKit::EditorClient::shouldDeleteRange):
+ (WebKit::EditorClient::shouldShowDeleteInterface):
+ (WebKit::EditorClient::isContinuousSpellCheckingEnabled):
+ (WebKit::EditorClient::isGrammarCheckingEnabled):
+ (WebKit::EditorClient::spellCheckerDocumentTag):
+ (WebKit::EditorClient::shouldBeginEditing):
+ (WebKit::EditorClient::shouldEndEditing):
+ (WebKit::EditorClient::shouldInsertText):
+ (WebKit::EditorClient::shouldChangeSelectedRange):
+ (WebKit::EditorClient::shouldApplyStyle):
+ (WebKit::EditorClient::shouldMoveRangeAfterDelete):
+ (WebKit::EditorClient::didBeginEditing):
+ (WebKit::EditorClient::respondToChangedContents):
+ (WebKit::EditorClient::respondToChangedSelection):
+ (WebKit::EditorClient::didEndEditing):
+ (WebKit::EditorClient::didWriteSelectionToPasteboard):
+ (WebKit::EditorClient::didSetSelectionTypesForPasteboard):
+ (WebKit::EditorClient::isEditable):
+ (WebKit::EditorClient::registerCommandForUndo):
+ (WebKit::EditorClient::registerCommandForRedo):
+ (WebKit::EditorClient::clearUndoRedoOperations):
+ (WebKit::EditorClient::canUndo):
+ (WebKit::EditorClient::canRedo):
+ (WebKit::EditorClient::undo):
+ (WebKit::EditorClient::redo):
+ (WebKit::EditorClient::shouldInsertNode):
+ (WebKit::EditorClient::pageDestroyed):
+ (WebKit::EditorClient::smartInsertDeleteEnabled):
+ (WebKit::EditorClient::isSelectTrailingWhitespaceEnabled):
+ (WebKit::EditorClient::toggleContinuousSpellChecking):
+ (WebKit::EditorClient::toggleGrammarChecking):
+ (WebKit::EditorClient::handleKeyboardEvent):
+ (WebKit::EditorClient::handleInputMethodKeydown):
+ (WebKit::EditorClient::textFieldDidBeginEditing):
+ (WebKit::EditorClient::textFieldDidEndEditing):
+ (WebKit::EditorClient::textDidChangeInTextField):
+ (WebKit::EditorClient::doTextFieldCommandFromEvent):
+ (WebKit::EditorClient::textWillBeDeletedInTextField):
+ (WebKit::EditorClient::textDidChangeInTextArea):
+ (WebKit::EditorClient::ignoreWordInSpellDocument):
+ (WebKit::EditorClient::learnWord):
+ (WebKit::EditorClient::checkSpellingOfString):
+ (WebKit::EditorClient::getAutoCorrectSuggestionForMisspelledWord):
+ (WebKit::EditorClient::checkGrammarOfString):
+ (WebKit::EditorClient::updateSpellingUIWithGrammarString):
+ (WebKit::EditorClient::updateSpellingUIWithMisspelledWord):
+ (WebKit::EditorClient::showSpellingUI):
+ (WebKit::EditorClient::spellingUIIsShowing):
+ (WebKit::EditorClient::getGuessesForWord):
+ (WebKit::EditorClient::willSetInputMethodState):
+ * WebCoreSupport/EditorClientWinCE.h: Added.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add DragClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44821
+
+ * WebCoreSupport/DragClientWinCE.cpp: Added.
+ (WebKit::DragClient::willPerformDragDestinationAction):
+ (WebKit::DragClient::willPerformDragSourceAction):
+ (WebKit::DragClient::actionMaskForDrag):
+ (WebKit::DragClient::dragSourceActionMaskForPoint):
+ (WebKit::DragClient::startDrag):
+ (WebKit::DragClient::createDragImageForLink):
+ (WebKit::DragClient::dragControllerDestroyed):
+ * WebCoreSupport/DragClientWinCE.h: Added.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add ContextMenuClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44820
+
+ * WebCoreSupport/ContextMenuClientWinCE.cpp: Added.
+ (WebKit::ContextMenuClient::ContextMenuClient):
+ (WebKit::ContextMenuClient::contextMenuDestroyed):
+ (WebKit::ContextMenuClient::getCustomMenuFromDefaultItems):
+ (WebKit::ContextMenuClient::contextMenuItemSelected):
+ (WebKit::ContextMenuClient::downloadURL):
+ (WebKit::ContextMenuClient::copyImageToClipboard):
+ (WebKit::ContextMenuClient::searchWithGoogle):
+ (WebKit::ContextMenuClient::lookUpInDictionary):
+ (WebKit::ContextMenuClient::speak):
+ (WebKit::ContextMenuClient::stopSpeaking):
+ (WebKit::ContextMenuClient::isSpeaking):
+ * WebCoreSupport/ContextMenuClientWinCE.h: Added.
+
+2010-08-28 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ Add InspectorClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44819
+
+ * WebCoreSupport/InspectorClientWinCE.cpp: Added.
+ (WebKit::InspectorClient::InspectorClient):
+ (WebKit::InspectorClient::~InspectorClient):
+ (WebKit::InspectorClient::inspectorDestroyed):
+ (WebKit::InspectorClient::openInspectorFrontend):
+ (WebKit::InspectorClient::releaseFrontendPage):
+ (WebKit::InspectorClient::highlight):
+ (WebKit::InspectorClient::hideHighlight):
+ (WebKit::InspectorClient::populateSetting):
+ (WebKit::InspectorClient::storeSetting):
+ (WebKit::InspectorClient::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientWinCE.h: Added.
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
new file mode 100644
index 0000000..011c2ea
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ContextMenuClientWinCE.h"
+
+#include "ContextMenu.h"
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ContextMenuClient::ContextMenuClient(WebView *webView)
+ : m_webView(webView)
+{
+}
+
+void ContextMenuClient::contextMenuDestroyed()
+{
+ delete this;
+}
+
+PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
+{
+ return menu->releasePlatformDescription();
+}
+
+void ContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::downloadURL(const KURL& url)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::copyImageToClipboard(const HitTestResult&)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::searchWithGoogle(const Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::lookUpInDictionary(Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::speak(const String&)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::stopSpeaking()
+{
+ notImplemented();
+}
+
+bool ContextMenuClient::isSpeaking()
+{
+ notImplemented();
+ return false;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
new file mode 100644
index 0000000..3d51f3c
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ContextMenuClientWinCE_h
+#define ContextMenuClientWinCE_h
+
+#include "ContextMenuClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class ContextMenuClient : public WebCore::ContextMenuClient {
+public:
+ ContextMenuClient(WebView*);
+
+ virtual void contextMenuDestroyed();
+
+ virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
+ virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
+
+ virtual void downloadURL(const WebCore::KURL&);
+ virtual void copyImageToClipboard(const WebCore::HitTestResult&);
+ virtual void searchWithGoogle(const WebCore::Frame*);
+ virtual void lookUpInDictionary(WebCore::Frame*);
+ virtual void speak(const WTF::String&);
+ virtual void stopSpeaking();
+ virtual bool isSpeaking();
+
+private:
+ WebView* m_webView;
+};
+
+} // namespace WebKit
+
+#endif // ContextMenuClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp
new file mode 100644
index 0000000..cd94547
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DragClientWinCE.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*)
+{
+ notImplemented();
+}
+
+void DragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*)
+{
+ notImplemented();
+}
+
+DragDestinationAction DragClient::actionMaskForDrag(DragData*)
+{
+ notImplemented();
+ return DragDestinationActionAny;
+}
+
+DragSourceAction DragClient::dragSourceActionMaskForPoint(const IntPoint&)
+{
+ notImplemented();
+ return DragSourceActionAny;
+}
+
+void DragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool)
+{
+ notImplemented();
+}
+
+DragImageRef DragClient::createDragImageForLink(KURL&, const String& label, Frame*)
+{
+ notImplemented();
+ return 0;
+}
+
+void DragClient::dragControllerDestroyed()
+{
+ delete this;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.h b/WebKit/wince/WebCoreSupport/DragClientWinCE.h
new file mode 100644
index 0000000..01dba3c
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DragClientWinCE_h
+#define DragClientWinCE_h
+
+#include "DragClient.h"
+
+namespace WebKit {
+
+class DragClient : public WebCore::DragClient {
+public:
+ virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*);
+ virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*);
+ virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*);
+
+ virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
+
+ virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::Clipboard*, WebCore::Frame*, bool = false);
+ virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL&, const WTF::String&, WebCore::Frame*);
+
+ virtual void dragControllerDestroyed();
+};
+
+} // namespace WebKit
+
+#endif // DragClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
new file mode 100644
index 0000000..d81fc02
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
@@ -0,0 +1,315 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EditorClientWinCE.h"
+
+#include "EditCommand.h"
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+EditorClient::EditorClient(WebView* webView)
+ : m_webView(webView)
+{
+}
+
+EditorClient::~EditorClient()
+{
+}
+
+void EditorClient::setInputMethodState(bool active)
+{
+ notImplemented();
+}
+
+bool EditorClient::shouldDeleteRange(Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldShowDeleteInterface(HTMLElement*)
+{
+ return false;
+}
+
+bool EditorClient::isContinuousSpellCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::isGrammarCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+int EditorClient::spellCheckerDocumentTag()
+{
+ notImplemented();
+ return 0;
+}
+
+bool EditorClient::shouldBeginEditing(WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldEndEditing(WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldInsertText(const String&, Range*, EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+void EditorClient::didBeginEditing()
+{
+ notImplemented();
+}
+
+void EditorClient::respondToChangedContents()
+{
+ notImplemented();
+}
+
+void EditorClient::respondToChangedSelection()
+{
+ notImplemented();
+}
+
+void EditorClient::didEndEditing()
+{
+ notImplemented();
+}
+
+void EditorClient::didWriteSelectionToPasteboard()
+{
+ notImplemented();
+}
+
+void EditorClient::didSetSelectionTypesForPasteboard()
+{
+ notImplemented();
+}
+
+bool EditorClient::isEditable()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command)
+{
+ notImplemented();
+}
+
+void EditorClient::registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand> command)
+{
+ notImplemented();
+}
+
+void EditorClient::clearUndoRedoOperations()
+{
+ notImplemented();
+}
+
+bool EditorClient::canUndo() const
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::canRedo() const
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::undo()
+{
+ notImplemented();
+}
+
+void EditorClient::redo()
+{
+ notImplemented();
+}
+
+bool EditorClient::shouldInsertNode(Node*, Range*, EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+void EditorClient::pageDestroyed()
+{
+ delete this;
+}
+
+bool EditorClient::smartInsertDeleteEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::isSelectTrailingWhitespaceEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::toggleContinuousSpellChecking()
+{
+ notImplemented();
+}
+
+void EditorClient::toggleGrammarChecking()
+{
+ notImplemented();
+}
+
+void EditorClient::handleKeyboardEvent(KeyboardEvent* event)
+{
+ notImplemented();
+}
+
+void EditorClient::handleInputMethodKeydown(KeyboardEvent* event)
+{
+ notImplemented();
+}
+
+void EditorClient::textFieldDidBeginEditing(Element*)
+{
+}
+
+void EditorClient::textFieldDidEndEditing(Element*)
+{
+}
+
+void EditorClient::textDidChangeInTextField(Element*)
+{
+}
+
+bool EditorClient::doTextFieldCommandFromEvent(Element*, KeyboardEvent*)
+{
+ return false;
+}
+
+void EditorClient::textWillBeDeletedInTextField(Element*)
+{
+ notImplemented();
+}
+
+void EditorClient::textDidChangeInTextArea(Element*)
+{
+ notImplemented();
+}
+
+void EditorClient::ignoreWordInSpellDocument(const String& text)
+{
+ notImplemented();
+}
+
+void EditorClient::learnWord(const String& text)
+{
+ notImplemented();
+}
+
+void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
+{
+ notImplemented();
+}
+
+String EditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord)
+{
+ // This method can be implemented using customized algorithms for the particular browser.
+ // Currently, it computes an empty string.
+ return String();
+}
+
+void EditorClient::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*)
+{
+ notImplemented();
+}
+
+void EditorClient::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&)
+{
+ notImplemented();
+}
+
+void EditorClient::updateSpellingUIWithMisspelledWord(const String&)
+{
+ notImplemented();
+}
+
+void EditorClient::showSpellingUI(bool)
+{
+ notImplemented();
+}
+
+bool EditorClient::spellingUIIsShowing()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses)
+{
+ notImplemented();
+}
+
+void EditorClient::willSetInputMethodState()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
new file mode 100644
index 0000000..943f591
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EditorClientWinCE_h
+#define EditorClientWinCE_h
+
+#include "EditorClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class EditorClient : public WebCore::EditorClient {
+public:
+ EditorClient(WebView*);
+ ~EditorClient();
+
+ virtual void pageDestroyed();
+
+ virtual bool shouldDeleteRange(WebCore::Range*);
+ virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
+ virtual bool smartInsertDeleteEnabled();
+ virtual bool isSelectTrailingWhitespaceEnabled();
+ virtual bool isContinuousSpellCheckingEnabled();
+ virtual void toggleContinuousSpellChecking();
+ virtual bool isGrammarCheckingEnabled();
+ virtual void toggleGrammarChecking();
+ virtual int spellCheckerDocumentTag();
+
+ virtual bool isEditable();
+
+ virtual bool shouldBeginEditing(WebCore::Range*);
+ virtual bool shouldEndEditing(WebCore::Range*);
+ virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
+ virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction);
+ virtual bool shouldChangeSelectedRange(WebCore::Range*, WebCore::Range*, WebCore::EAffinity, bool);
+
+ virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*);
+ virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*);
+
+ virtual void didBeginEditing();
+ virtual void respondToChangedContents();
+ virtual void respondToChangedSelection();
+ virtual void didEndEditing();
+ virtual void didWriteSelectionToPasteboard();
+ virtual void didSetSelectionTypesForPasteboard();
+
+ virtual void registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand>);
+ virtual void registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand>);
+ virtual void clearUndoRedoOperations();
+
+ virtual bool canUndo() const;
+ virtual bool canRedo() const;
+
+ virtual void undo();
+ virtual void redo();
+
+ virtual void handleKeyboardEvent(WebCore::KeyboardEvent*);
+ virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*);
+
+ virtual void textFieldDidBeginEditing(WebCore::Element*);
+ virtual void textFieldDidEndEditing(WebCore::Element*);
+ virtual void textDidChangeInTextField(WebCore::Element*);
+ virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*);
+ virtual void textWillBeDeletedInTextField(WebCore::Element*);
+ virtual void textDidChangeInTextArea(WebCore::Element*);
+
+ virtual void ignoreWordInSpellDocument(const WTF::String&);
+ virtual void learnWord(const WTF::String&);
+ virtual void checkSpellingOfString(const UChar*, int, int*, int*);
+ virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&);
+ virtual void checkGrammarOfString(const UChar*, int, WTF::Vector<WebCore::GrammarDetail>&, int*, int*);
+ virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&);
+ virtual void updateSpellingUIWithMisspelledWord(const WTF::String&);
+ virtual void showSpellingUI(bool);
+ virtual bool spellingUIIsShowing();
+ virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>&);
+ virtual void willSetInputMethodState();
+ virtual void setInputMethodState(bool);
+
+private:
+ WebView* m_webView;
+};
+
+} // namespace WebKit
+
+#endif // EditorClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp
new file mode 100644
index 0000000..debc611
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "InspectorClientWinCE.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+InspectorClient::InspectorClient(WebView* webView)
+ : m_inspectedWebView(webView)
+{
+}
+
+InspectorClient::~InspectorClient()
+{
+}
+
+void InspectorClient::inspectorDestroyed()
+{
+ delete this;
+}
+
+void InspectorClient::openInspectorFrontend(InspectorController* controller)
+{
+ notImplemented();
+}
+
+void InspectorClient::releaseFrontendPage()
+{
+ notImplemented();
+}
+
+void InspectorClient::highlight(Node* node)
+{
+ notImplemented();
+}
+
+void InspectorClient::hideHighlight()
+{
+ notImplemented();
+}
+
+void InspectorClient::populateSetting(const String& key, String* value)
+{
+ notImplemented();
+}
+
+void InspectorClient::storeSetting(const String& key, const String& value)
+{
+ notImplemented();
+}
+
+bool InspectorClient::sendMessageToFrontend(const String& message)
+{
+ notImplemented();
+ return false;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
new file mode 100644
index 0000000..45fcc5b
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InspectorClientWinCE_h
+#define InspectorClientWinCE_h
+
+#include "InspectorClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class InspectorClient : public WebCore::InspectorClient {
+public:
+ InspectorClient(WebView* webView);
+ ~InspectorClient();
+
+ virtual void inspectorDestroyed();
+
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
+
+ virtual void highlight(WebCore::Node*);
+ virtual void hideHighlight();
+
+ virtual void populateSetting(const WTF::String& key, WTF::String* value);
+ virtual void storeSetting(const WTF::String& key, const WTF::String& value);
+
+ virtual bool sendMessageToFrontend(const WTF::String&);
+
+ void releaseFrontendPage();
+
+private:
+ WebView* m_inspectedWebView;
+};
+
+} // namespace WebKit
+
+#endif // InspectorClientWinCE_h
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 342edea..757981f 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,59 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * WebView.cpp:
+ (wxWebView::OnPaint):
+
+2010-08-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after parseMode -> compatibilityMode rename.
+
+ * WebFrame.cpp:
+ (wxWebFrame::GetCompatibilityMode):
+ * WebFrame.h:
+ * WebView.cpp:
+ (wxWebView::GetCompatibilityMode):
+ * WebView.h:
+
+2010-08-26 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ A few tweaks to the wxWebView editing APIs after addition of DOM bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=44656
+
+ 1. adoptRef fix for WebCore::EditCommand wrapper API.
+ 2. Add the mimetype as an argument to SetPageSource to allow XHTML documents to be loaded.
+ 3. Add notification events for contents / selection changed editing events.
+ 4. Improved wxPython binding typemaps support for DOM APIs.
+
+ * WebEdit.cpp:
+ (WebCoreEditCommandPrivate::WebCoreEditCommandPrivate):
+ (WebCoreEditCommandPrivate::~WebCoreEditCommandPrivate):
+ (WebCoreEditCommandPrivate::command):
+ (wxWebEditCommand::wxWebEditCommand):
+ (wxWebEditCommand::~wxWebEditCommand):
+ (wxWebEditCommand::SetNodeAttribute):
+ (wxWebEditCommand::Apply):
+ * WebEdit.h:
+ * WebFrame.cpp:
+ (wxWebFrame::SetPageSource):
+ * WebFrame.h:
+ * WebKitSupport/EditorClientWx.cpp:
+ (WebCore::EditorClientWx::respondToChangedContents):
+ (WebCore::EditorClientWx::respondToChangedSelection):
+ * WebSettings.h:
+ * WebView.cpp:
+ (wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent):
+ (wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent):
+ (wxWebView::SetPageSource):
+ * WebView.h:
+ * bindings/python/webview.i:
+
2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, do not build WebCore as a convenience library as this leads to
diff --git a/WebKit/wx/WebEdit.cpp b/WebKit/wx/WebEdit.cpp
index 503e2ed..33b4c86 100644
--- a/WebKit/wx/WebEdit.cpp
+++ b/WebKit/wx/WebEdit.cpp
@@ -34,32 +34,47 @@ public:
}
+class WebCoreEditCommandPrivate {
+public:
+ WebCoreEditCommandPrivate()
+ : m_ptr(0)
+ { }
+
+ WebCoreEditCommandPrivate(WebCore::WebCoreEditCommand* ptr)
+ : m_ptr(adoptRef(ptr))
+ { }
+
+ ~WebCoreEditCommandPrivate() { }
+
+ WebCore::WebCoreEditCommand* command() { return m_ptr.get(); }
+
+ RefPtr<WebCore::WebCoreEditCommand> m_ptr;
+};
+
wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe)
{
if (webframe) {
WebCore::Frame* frame = webframe->GetFrame();
if (frame && frame->document())
- m_impl = new WebCore::WebCoreEditCommand(frame->document());
- m_impl->ref();
+ m_impl = new WebCoreEditCommandPrivate(new WebCore::WebCoreEditCommand(frame->document()));
}
}
wxWebEditCommand::~wxWebEditCommand()
{
// the impl. is ref-counted, so don't delete it as it may be in an undo/redo stack
- if (m_impl)
- m_impl->deref();
+ delete m_impl;
m_impl = 0;
}
void wxWebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value)
{
- if (m_impl)
- m_impl->setElementAttribute(element->impl(), WebCore::QualifiedName(WTF::nullAtom, WTF::String(name), WTF::nullAtom), WTF::String(value));
+ if (m_impl && m_impl->command())
+ m_impl->command()->setElementAttribute(element->impl(), WebCore::QualifiedName(WTF::nullAtom, WTF::String(name), WTF::nullAtom), WTF::String(value));
}
void wxWebEditCommand::Apply()
{
- if (m_impl)
- m_impl->apply();
-} \ No newline at end of file
+ if (m_impl && m_impl->command())
+ m_impl->command()->apply();
+}
diff --git a/WebKit/wx/WebEdit.h b/WebKit/wx/WebEdit.h
index 7099088..e4bba91 100644
--- a/WebKit/wx/WebEdit.h
+++ b/WebKit/wx/WebEdit.h
@@ -41,6 +41,7 @@ namespace WebCore {
}
class WebDOMElement;
+class WebCoreEditCommandPrivate;
class wxWebFrame;
class WXDLLIMPEXP_WEBKIT wxWebEditCommand
@@ -56,7 +57,7 @@ public:
void Apply();
private:
- WebCore::WebCoreEditCommand* m_impl;
+ WebCoreEditCommandPrivate* m_impl;
};
#endif
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index f9be56f..fe45eea 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -155,7 +155,7 @@ wxString wxWebFrame::GetPageSource()
return wxEmptyString;
}
-void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl)
+void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_impl->frame && m_impl->frame->loader()) {
WebCore::KURL url(WebCore::KURL(), baseUrl);
@@ -164,7 +164,7 @@ void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl)
const char* contents = charBuffer;
WTF::PassRefPtr<WebCore::SharedBuffer> sharedBuffer = WebCore::SharedBuffer::create(contents, strlen(contents));
- WebCore::SubstituteData substituteData(sharedBuffer, WTF::String("text/html"), WTF::String("UTF-8"), WebCore::blankURL(), url);
+ WebCore::SubstituteData substituteData(sharedBuffer, mimetype, WTF::String("UTF-8"), WebCore::blankURL(), url);
m_impl->frame->loader()->stop();
m_impl->frame->loader()->load(WebCore::ResourceRequest(url), substituteData, false);
@@ -476,12 +476,12 @@ bool wxWebFrame::ShouldClose() const
return true;
}
-wxWebKitParseMode wxWebFrame::GetParseMode() const
+wxWebKitCompatibilityMode wxWebFrame::GetCompatibilityMode() const
{
if (m_impl->frame && m_impl->frame->document())
- return (wxWebKitParseMode)m_impl->frame->document()->parseMode();
+ return (wxWebKitCompatibilityMode)m_impl->frame->document()->compatibilityMode();
- return NoDocument;
+ return QuirksMode;
}
void wxWebFrame::GrantUniversalAccess()
diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h
index f09c884..3e9355a 100644
--- a/WebKit/wx/WebFrame.h
+++ b/WebKit/wx/WebFrame.h
@@ -93,7 +93,7 @@ private:
};
// based on enums in WebCore/dom/Document.h
-enum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument };
+enum wxWebKitCompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
class WXDLLIMPEXP_WEBKIT wxWebFrame
{
@@ -134,7 +134,7 @@ public:
void Redo();
wxString GetPageSource();
- void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString);
+ void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString, const wxString& mimetype = wxT("text/html"));
wxString GetInnerText();
wxString GetAsMarkup();
@@ -167,7 +167,7 @@ public:
bool ShouldClose() const;
- wxWebKitParseMode GetParseMode() const;
+ wxWebKitCompatibilityMode GetCompatibilityMode() const;
void GrantUniversalAccess();
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
index 99afec8..59e2fd4 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
@@ -262,7 +262,15 @@ void EditorClientWx::didBeginEditing()
void EditorClientWx::respondToChangedContents()
{
- notImplemented();
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+
+ if (frame) {
+ wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ if (webKitWin) {
+ wxWebViewContentsChangedEvent wkEvent(webKitWin);
+ webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+ }
}
void EditorClientWx::didEndEditing()
@@ -483,7 +491,14 @@ void EditorClientWx::textDidChangeInTextArea(Element*)
void EditorClientWx::respondToChangedSelection()
{
- notImplemented();
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+ if (frame) {
+ wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ if (webKitWin) {
+ wxWebViewSelectionChangedEvent wkEvent(webKitWin);
+ webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+ }
}
void EditorClientWx::ignoreWordInSpellDocument(const String&)
diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h
index 148755a..9ab5502 100644
--- a/WebKit/wx/WebSettings.h
+++ b/WebKit/wx/WebSettings.h
@@ -66,6 +66,8 @@ public:
{}
wxWebSettings() : wxObject() {}
+
+ virtual ~wxWebSettings() { }
/**
Sets the default font size for fixed fonts.
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 3b0bcb0..5980236 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -226,6 +226,29 @@ wxWebViewWindowObjectClearedEvent::wxWebViewWindowObjectClearedEvent(wxWindow* w
SetId(win->GetId());
}
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewContentsChangedEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_CONTENTS_CHANGED)
+
+wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_CONTENTS_CHANGED);
+ SetEventObject(win);
+ if (win)
+ SetId(win->GetId());
+}
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_SELECTION_CHANGED)
+
+wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_SELECTION_CHANGED);
+ SetEventObject(win);
+ if (win)
+ SetId(win->GetId());
+}
//---------------------------------------------------------
// DOM Element info data type
@@ -438,10 +461,10 @@ wxString wxWebView::GetPageSource()
return wxEmptyString;
}
-void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl)
+void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_mainFrame)
- m_mainFrame->SetPageSource(source, baseUrl);
+ m_mainFrame->SetPageSource(source, baseUrl, mimetype);
}
wxString wxWebView::GetInnerText()
@@ -661,7 +684,7 @@ void wxWebView::OnPaint(wxPaintEvent& event)
WebCore::GraphicsContext gc(&dc);
#endif
if (frame->contentRenderer()) {
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
frame->view()->paint(&gc, paintRect);
}
}
@@ -1121,12 +1144,12 @@ wxWebSettings wxWebView::GetWebSettings()
return wxWebSettings();
}
-wxWebKitParseMode wxWebView::GetParseMode() const
+wxWebKitCompatibilityMode wxWebView::GetCompatibilityMode() const
{
if (m_mainFrame)
- return m_mainFrame->GetParseMode();
+ return m_mainFrame->GetCompatibilityMode();
- return NoDocument;
+ return QuirksMode;
}
void wxWebView::GrantUniversalAccess()
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index d7f23b6..3ddb45e 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -156,7 +156,7 @@ public:
//bool CanGetPageSource();
wxString GetPageSource();
- void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString);
+ void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString, const wxString& mimetype = wxT("text/html"));
wxString GetInnerText();
wxString GetAsMarkup();
@@ -221,7 +221,7 @@ public:
const wxString& password = wxEmptyString);
wxWebSettings GetWebSettings();
- wxWebKitParseMode GetParseMode() const;
+ wxWebKitCompatibilityMode GetCompatibilityMode() const;
/*
This method allows cross site-scripting (XSS) in the WebView.
@@ -525,6 +525,26 @@ private:
JSObjectRef m_windowObject;
};
+class WXDLLIMPEXP_WEBKIT wxWebViewContentsChangedEvent : public wxCommandEvent {
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS(wxWebViewContentsChangedEvent)
+#endif
+
+public:
+ wxWebViewContentsChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
+ wxEvent *Clone(void) const { return new wxWebViewContentsChangedEvent(*this); }
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewSelectionChangedEvent : public wxCommandEvent {
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent)
+#endif
+
+public:
+ wxWebViewSelectionChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
+ wxEvent *Clone(void) const { return new wxWebViewSelectionChangedEvent(*this); }
+};
+
typedef void (wxEvtHandler::*wxWebViewLoadEventFunction)(wxWebViewLoadEvent&);
typedef void (wxEvtHandler::*wxWebViewBeforeLoadEventFunction)(wxWebViewBeforeLoadEvent&);
typedef void (wxEvtHandler::*wxWebViewNewWindowEventFunction)(wxWebViewNewWindowEvent&);
@@ -535,6 +555,8 @@ typedef void (wxEvtHandler::*wxWebViewConfirmEventFunction)(wxWebViewConfirmEven
typedef void (wxEvtHandler::*wxWebViewPromptEventFunction)(wxWebViewPromptEvent&);
typedef void (wxEvtHandler::*wxWebViewReceivedTitleEventFunction)(wxWebViewReceivedTitleEvent&);
typedef void (wxEvtHandler::*wxWebViewWindowObjectClearedFunction)(wxWebViewWindowObjectClearedEvent&);
+typedef void (wxEvtHandler::*wxWebViewContentsChangedFunction)(wxWebViewContentsChangedEvent&);
+typedef void (wxEvtHandler::*wxWebViewSelectionChangedFunction)(wxWebViewSelectionChangedEvent&);
#define wxWebViewLoadEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewLoadEventFunction, &func)
@@ -556,7 +578,11 @@ typedef void (wxEvtHandler::*wxWebViewWindowObjectClearedFunction)(wxWebViewWind
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewReceivedTitleEventFunction, &func)
#define wxWebViewWindowObjectClearedEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewWindowObjectClearedFunction, &func)
-
+#define wxWebViewContentsChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewContentsChangedEventFunction, &func)
+#define wxWebViewSelectionChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewSelectionChangedEventFunction, &func)
+
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_BEFORE_LOAD, wxID_ANY)
@@ -569,6 +595,8 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_JS_PROMPT, wxID_ANY)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_RECEIVED_TITLE, wxID_ANY)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_CONTENTS_CHANGED, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_SELECTION_CHANGED, wxID_ANY)
END_DECLARE_EVENT_TYPES()
#endif
@@ -652,4 +680,21 @@ END_DECLARE_EVENT_TYPES()
(wxWebViewWindowObjectClearedFunction) & func, \
static_cast<wxObject*>(NULL)),
+#define EVT_WEBVIEW_CONTENTS_CHANGED(winid, func) \
+ DECLARE_EVENT_TABLE_ENTRY(wxEVT_WEBVIEW_CONTENTS_CHANGED, \
+ winid, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewContentsChangedEventFunction) & func, \
+ static_cast<wxObject*>(0)),
+
+#define EVT_WEBVIEW_SELECTION_CHANGED(winid, func) \
+ DECLARE_EVENT_TABLE_ENTRY(wxEVT_WEBVIEW_SELECTION_CHANGED, \
+ winid, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewSelectionChangedEventFunction) & func, \
+ static_cast<wxObject*>(0)),
+
+
#endif // ifndef WXWEBVIEW_H
diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i
index 8e3c808..f1621b0 100644
--- a/WebKit/wx/bindings/python/webview.i
+++ b/WebKit/wx/bindings/python/webview.i
@@ -51,7 +51,7 @@
#include "WebDOMRange.h"
#ifndef __WXMSW__
-PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
+PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn, bool isValueObject)
{
//static wxPyTypeInfoHashMap* typeInfoCache = NULL;
@@ -73,9 +73,13 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
name = "WebDOMNode*";
}
swigType = SWIG_TypeQuery(name);
- if (swigType)
+ if (swigType) {
+ if (isValueObject) {
+ return SWIG_Python_NewPointerObj(new WebDOMNode(*ptr), swigType, setThisOwn);
+ }
+
return SWIG_Python_NewPointerObj(ptr, swigType, setThisOwn);
-
+ }
// if it still wasn't found, try looking for a mapped name
//if (swigType) {
// and add it to the map if found
@@ -87,8 +91,34 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
return Py_None;
}
+
+WebDOMString* createWebDOMString(PyObject* source)
+{
+ if (!PyString_Check(source) && !PyUnicode_Check(source)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return new WebDOMString();
+ }
+
+ char* tmpPtr;
+ Py_ssize_t tmpSize;
+
+ if (PyString_Check(source))
+ PyString_AsStringAndSize(source, &tmpPtr, &tmpSize);
+ else {
+ PyObject* str = PyUnicode_AsUTF8String(source);
+ PyString_AsStringAndSize(str, &tmpPtr, &tmpSize);
+ Py_DECREF(str);
+ }
+
+ WebDOMString temp = WebDOMString::fromUTF8(tmpPtr);
+
+ return new WebDOMString(temp);
+}
+
#endif
+
+
%}
//---------------------------------------------------------------------------
@@ -96,10 +126,13 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
%import windows.i
#ifndef __WXMSW__
-%typemap(out) WebDOMNode* { $result = createDOMNodeSubtype($1, (bool)$owner); }
-%typemap(out) WebDOMElement* { $result = createDOMNodeSubtype($1, (bool)$owner); }
-%typemap(out) WebDOMNode { $result = createDOMNodeSubtype(&$1, (bool)$owner); }
-%typemap(out) WebDOMElement { $result = createDOMNodeSubtype(&$1, (bool)$owner); }
+%typemap(out) WebDOMNode* { $result = createDOMNodeSubtype($1, (bool)$owner, 0); }
+%typemap(out) WebDOMElement* { $result = createDOMNodeSubtype($1, (bool)$owner, 0); }
+%typemap(out) WebDOMNode { $result = createDOMNodeSubtype(&$1, (bool)$owner, 1); }
+%typemap(out) WebDOMElement { $result = createDOMNodeSubtype(&$1, (bool)$owner, 1); }
+%typemap(in) WebDOMString& { $1 = createWebDOMString($input); }
+%typemap(out) WebDOMString { $result = PyUnicode_DecodeUTF8($1.utf8().data(), $1.utf8().length(), NULL); }
+%typemap(out) WebDOMString& { $result = PyUnicode_DecodeUTF8($1.utf8().data(), $1.utf8().length(), NULL); }
#endif
MAKE_CONST_WXSTRING(WebViewNameStr);
@@ -134,6 +167,8 @@ MustHaveApp(wxWebView);
%constant wxEventType wxEVT_WEBVIEW_RIGHT_CLICK;
%constant wxEventType wxEVT_WEBVIEW_CONSOLE_MESSAGE;
%constant wxEventType wxEVT_WEBVIEW_RECEIVED_TITLE;
+%constant wxEventType wxEVT_WEBVIEW_CONTENTS_CHANGED;
+%constant wxEventType wxEVT_WEBVIEW_SELECTION_CHANGED;
%pythoncode {
EVT_WEBVIEW_BEFORE_LOAD = wx.PyEventBinder( wxEVT_WEBVIEW_BEFORE_LOAD, 1 )
@@ -141,5 +176,7 @@ EVT_WEBVIEW_LOAD = wx.PyEventBinder( wxEVT_WEBVIEW_LOAD, 1 )
EVT_WEBVIEW_NEW_WINDOW = wx.PyEventBinder( wxEVT_WEBVIEW_NEW_WINDOW, 1 )
EVT_WEBVIEW_RIGHT_CLICK = wx.PyEventBinder( wxEVT_WEBVIEW_RIGHT_CLICK, 1 )
EVT_WEBVIEW_CONSOLE_MESSAGE = wx.PyEventBinder( wxEVT_WEBVIEW_CONSOLE_MESSAGE, 1 )
-EVT_WEBVIEW_RECEIVED_TITLE = wx.PyEventBinder( wxEVT_WEBVIEW_RECEIVED_TITLE, 1 )
+EVT_WEBVIEW_RECEIVED_TITLE = wx.PyEventBinder( wxEVT_WEBVIEW_RECEIVED_TITLE, 1 )
+EVT_WEBVIEW_CONTENTS_CHANGED = wx.PyEventBinder( wxEVT_WEBVIEW_CONTENTS_CHANGED, 1 )
+EVT_WEBVIEW_SELECTION_CHANGED = wx.PyEventBinder( wxEVT_WEBVIEW_SELECTION_CHANGED, 1 )
}