summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog727
-rw-r--r--WebKit/chromium/DEPS6
-rw-r--r--WebKit/chromium/WebKit.gyp2
-rw-r--r--WebKit/chromium/WebKit.gypi5
-rwxr-xr-x[-rw-r--r--]WebKit/chromium/gyp_webkit14
-rw-r--r--WebKit/chromium/public/WebCommonWorkerClient.h5
-rw-r--r--WebKit/chromium/public/WebFileSystem.h73
-rw-r--r--WebKit/chromium/public/WebFormElement.h2
-rw-r--r--WebKit/chromium/public/WebFrameClient.h15
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h3
-rw-r--r--WebKit/chromium/public/WebInputElement.h6
-rw-r--r--WebKit/chromium/public/WebKitClient.h10
-rw-r--r--WebKit/chromium/public/WebNode.h5
-rw-r--r--WebKit/chromium/public/WebNotification.h3
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h3
-rw-r--r--WebKit/chromium/public/WebSecurityPolicy.h9
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebStorageNamespace.h6
-rw-r--r--WebKit/chromium/public/WebThemeEngine.h (renamed from WebKit/chromium/public/win/WebThemeEngine.h)51
-rw-r--r--WebKit/chromium/public/WebURLRequest.h4
-rw-r--r--WebKit/chromium/public/WebView.h14
-rw-r--r--WebKit/chromium/public/WebViewClient.h8
-rw-r--r--WebKit/chromium/public/WebWidget.h4
-rw-r--r--WebKit/chromium/public/WebWindowFeatures.h104
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp15
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp60
-rw-r--r--WebKit/chromium/src/ChromiumThreading.cpp8
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp25
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp43
-rw-r--r--WebKit/chromium/src/SharedWorkerRepository.cpp1
-rw-r--r--WebKit/chromium/src/StorageAreaProxy.cpp8
-rw-r--r--WebKit/chromium/src/StorageEventDispatcherImpl.cpp4
-rw-r--r--WebKit/chromium/src/SuggestionsPopupMenuClient.cpp6
-rw-r--r--WebKit/chromium/src/WebElement.cpp2
-rw-r--r--WebKit/chromium/src/WebFormElement.cpp12
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp23
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h2
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp18
-rw-r--r--WebKit/chromium/src/WebKit.cpp1
-rw-r--r--WebKit/chromium/src/WebNode.cpp5
-rw-r--r--WebKit/chromium/src/WebNotification.cpp10
-rw-r--r--WebKit/chromium/src/WebPasswordFormData.cpp5
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp6
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.h2
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp16
-rw-r--r--WebKit/chromium/src/WebSecurityPolicy.cpp32
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--WebKit/chromium/src/WebStorageNamespaceImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp81
-rw-r--r--WebKit/chromium/src/WebViewImpl.h16
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp43
-rw-r--r--WebKit/chromium/src/WebWorkerBase.h10
-rw-r--r--WebKit/chromium/src/WebWorkerClientImpl.h1
-rw-r--r--WebKit/chromium/src/js/DebuggerAgent.js63
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js39
-rw-r--r--WebKit/chromium/src/js/DevTools.js87
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentChromium.pngbin4253 -> 4272 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentChromium2.pngbin4376 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentHoverChromium2.pngbin4126 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/segmentSelectedChromium2.pngbin4099 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBackgroundChromium.pngbin4070 -> 4116 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBackgroundChromium2.pngbin4118 -> 0 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.pngbin4070 -> 4120 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarButtonsChromium.pngbin4258 -> 4313 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarMenuButtonChromium.pngbin4391 -> 4654 bytes
-rwxr-xr-xWebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.pngbin4639 -> 0 bytes
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js9
-rwxr-xr-xWebKit/chromium/src/js/devTools.css50
-rw-r--r--WebKit/chromium/tests/DragImageTest.cpp22
72 files changed, 1471 insertions, 347 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ed43fff..68129b0 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,730 @@
+2010-05-06 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Add support for resources on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=38637
+
+ * DEPS: Check out tools/data_pack.
+
+2010-05-06 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Chromium Dev Tools: Large toolbar icons flash when dev
+ tools is opened in docked mode.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38631
+
+ * src/js/DevTools.js:
+ (devtools.domContentLoaded):
+
+2010-05-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ drop support for sessionStorage in sandbox iframes
+ https://bugs.webkit.org/show_bug.cgi?id=38151
+
+ Update client of sessionStorage to handle exceptions.
+
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::storageEvent):
+
+2010-05-05 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] clear out deprecated methods that are no longer used
+ https://bugs.webkit.org/show_bug.cgi?id=38610
+
+ * public/WebFormElement.h:
+ * public/WebInputElement.h:
+ * public/WebKitClient.h:
+ * public/WebView.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createPopupMenu):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened):
+ * src/WebFormElement.cpp:
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::setSelectionRange):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::hideSuggestionsPopup):
+ * src/WebViewImpl.h:
+
+2010-05-05 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [chromium] Add quota parameter to WebStorageNamespace::createSessionStorageNamespace
+ https://bugs.webkit.org/show_bug.cgi?id=38589
+
+ * public/WebStorageNamespace.h:
+ (WebKit::WebStorageNamespace::createSessionStorageNamespace):
+ * src/WebStorageNamespaceImpl.cpp:
+ (WebKit::WebStorageNamespace::createSessionStorageNamespace):
+
+2010-05-05 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Update the plugin container's setFocus implementation to pass the new
+ boolean argument to the next layer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37961
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::setFocus):
+ * src/WebPluginContainerImpl.h:
+
+2010-05-04 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Provide an API for querying whether a WebWidget is using gpu accelerated compositing.
+ Also changed: isAcceleratedCompositing to: isAcceleratedCompositingActive.
+ https://bugs.webkit.org/show_bug.cgi?id=38220
+
+ * public/WebWidget.h:
+ * src/WebPopupMenuImpl.h:
+ (WebKit::WebPopupMenuImpl::isAcceleratedCompositingActive):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::paint):
+ (WebKit::WebViewImpl::isAcceleratedCompositingActive):
+ (WebKit::WebViewImpl::setRootGraphicsLayer):
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ (WebKit::WebViewImpl::updateRootLayerContents):
+ * src/WebViewImpl.h:
+
+2010-04-29 John Gregg <johnnyg@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ notifications should have dir and replaceId attributes
+ https://bugs.webkit.org/show_bug.cgi?id=38336
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dir):
+ (WebKit::WebNotification::replaceId):
+
+2010-05-04 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Make the select popup not close on right/middle clicks.
+ https://bugs.webkit.org/show_bug.cgi?id=38473
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+
+2010-05-03 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard):
+ * src/WebSettingsImpl.h:
+
+2010-05-03 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=38397
+
+ No tests (functionality is exposed only through native WebKit API.)
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::willSendSubmitEvent): New empty method
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchWillSendSubmitEvent): Delegate to client
+ * src/FrameLoaderClientImpl.h:
+
+2010-05-02 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ Define two new ResourceRequestBase TargetTypes for worker and shared worker
+ main resources. Use the new target types where appropiate. Add logic to marshal
+ the target type specified by requests initiated on a background worker thread.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38295
+
+ * src/SharedWorkerRepository.cpp: use TargetIsSharedWorker
+ (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
+
+2010-05-02 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Include WebWindowFeatures in call to WebViewClient::createView.
+ https://bugs.webkit.org/show_bug.cgi?id=38301
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-05-01 Evan Stade <estade@chromium.org>
+
+ Reviewed by David Levin
+
+ [chromium] Skia needs to fade DragImages
+ https://bugs.webkit.org/show_bug.cgi?id=38008
+
+ * tests/DragImageTest.cpp:
+ (DragImageTest.CreateDragImage): test that the drag image is a deep copy
+
+2010-04-30 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add WebFileSystem interface and hook up with all FileSystem methods.
+ https://bugs.webkit.org/show_bug.cgi?id=38228
+
+ * WebKit.gyp:
+ * public/WebFileSystem.h: Added.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::fileSystem):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::fileExists):
+ (WebCore::ChromiumBridge::deleteFile):
+ (WebCore::ChromiumBridge::deleteEmptyDirectory):
+ (WebCore::ChromiumBridge::getFileSize):
+ (WebCore::ChromiumBridge::getFileModificationTime):
+ (WebCore::ChromiumBridge::directoryName):
+ (WebCore::ChromiumBridge::pathByAppendingComponent):
+ (WebCore::ChromiumBridge::makeAllDirectories):
+ (WebCore::ChromiumBridge::getAbsolutePath):
+ (WebCore::ChromiumBridge::isDirectory):
+ (WebCore::ChromiumBridge::filePathToURL):
+ (WebCore::ChromiumBridge::openFile):
+ (WebCore::ChromiumBridge::closeFile):
+ (WebCore::ChromiumBridge::seekFile):
+ (WebCore::ChromiumBridge::truncateFile):
+ (WebCore::ChromiumBridge::readFromFile):
+ (WebCore::ChromiumBridge::writeToFile):
+
+2010-04-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Change StorageEvent.uri to StorageEvent.url to match the spec
+ https://bugs.webkit.org/show_bug.cgi?id=38331
+
+ Get rid of a stale FIXME and combine 2 lines that needn't be split.
+
+ * src/StorageEventDispatcherImpl.cpp:
+ (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent):
+
+2010-04-29 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Consider implementing addOriginAccessWhitelistEntry method
+ http://trac.webkit.org/changeset/57537 introduced a new method
+ to manage whitelisting of origins.
+ Expose this method in Chromium's bridge.
+ https://bugs.webkit.org/show_bug.cgi?id=37578
+
+ * public/WebSecurityPolicy.h: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method
+ * src/WebSecurityPolicy.cpp: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method
+
+2010-04-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r58498.
+ http://trac.webkit.org/changeset/58498
+ https://bugs.webkit.org/show_bug.cgi?id=38332
+
+ "Broke a bunch of tests on Chromium canaries" (Requested by
+ dglazkov on #webkit).
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-29 Adam Langley <agl@chromium.org>
+
+ Unreviewed, DEPS roll.
+
+ WebKit's r58517 needs OTS's r30 which was rolled into Chromium in
+ r45932.
+
+ * DEPS:
+ Use Chromium r45932.
+
+2010-04-29 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Include WindowFeatures in call to WebViewClient::createView.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38301
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-29 Garret Kelly <gdk@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Expose the RuntimeFeature for touch events through the
+ WebRuntimeFeatures mechanism.
+ https://bugs.webkit.org/show_bug.cgi?id=37486
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableTouch):
+ (WebKit::WebRuntimeFeatures::isTouchEnabled):
+
+2010-04-29 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove the unnecessary texImage2D function with Image as input in GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=38235
+
+ * src/GraphicsContext3D.cpp: Remove tex*image implementation with Image input.
+
+2010-04-28 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Allow editing script resources when resource tracking is enabled.
+
+ http://bugs.webkit.org/show_bug.cgi?id=38269
+
+ * src/js/DebuggerAgent.js:
+ * src/js/InspectorControllerImpl.js:
+ (.devtools.InspectorBackendImpl.prototype.setBreakpoint):
+ (.devtools.InspectorBackendImpl.prototype.editScriptSource):
+
+2010-04-28 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] callOnMainThread should equate to MessageLoop::PostTask
+ https://bugs.webkit.org/show_bug.cgi?id=38276
+
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::callOnMainThread):
+ * src/ChromiumThreading.cpp:
+ (WTF::ChromiumThreading::callOnMainThread):
+
+2010-04-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Make WebThemeEngine::paint take a const ref of ExtraParams
+ https://bugs.webkit.org/show_bug.cgi?id=38242
+
+ * public/WebThemeEngine.h:
+ (WebKit::WebThemeEngine::paint):
+
+2010-04-28 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fixed passing breakpoints to V8.
+ https://bugs.webkit.org/show_bug.cgi?id=38266
+
+ * src/js/InspectorControllerImpl.js:
+ (.devtools.InspectorBackendImpl.prototype.setBreakpoint):
+
+2010-04-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Support pause on exceptions in v8 implementation of ScriptDebugServer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38205
+
+ * src/js/DebuggerScript.js:
+ (debuggerScriptConstructor.DebuggerScript.getScripts):
+ (debuggerScriptConstructor.DebuggerScript.pauseOnExceptionsState):
+ (debuggerScriptConstructor.DebuggerScript.setPauseOnExceptionsState):
+ (debuggerScriptConstructor.DebuggerScript._v8ToWebkitLineNumber):
+ (debuggerScriptConstructor):
+
+2010-04-27 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Fix bug that prevents autosave of forms without action attribute
+ https://bugs.webkit.org/show_bug.cgi?id=38014
+ Change is in the Chromium WebKit API so it can't be tested with a JS-based layout test.
+ It needs a native unit test, which would go in the Chromium repo, not WebKit.
+
+ * src/WebPasswordFormData.cpp:
+ (WebKit::WebPasswordFormData::WebPasswordFormData): Set correct URL if action is NULL
+
+2010-04-27 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dmitry Titov.
+
+ [Chromium] Add two things to the webkit API to support appcaches in workers.
+ 1) WebURLRequest TargetTypes for worker and shared worker main resources.
+ 2) Factory method on class WebCommonWorkerClient to
+ createApplicationCacheHost() for the associated worker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38147
+
+ * public/WebCommonWorkerClient.h: add the factory method
+ * public/WebURLRequest.h: add the TargetTypes
+ * src/WebWorkerBase.cpp: call the embedder's factory when needed
+ (WebKit::WebWorkerBase::didCreateDataSource)
+ (WebKit::WebWorkerBase::createApplicationCacheHost)
+ * src/WebWorkerBase.h: ditto
+ * src/WebWorkerClientImpl.h: add a stub impl of the factory method
+ (WebKit::WebWorkerClientImpl::createApplicationCacheHost):
+
+2010-04-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [DRT/Chromium] Enable Windows project generation
+ https://bugs.webkit.org/show_bug.cgi?id=38103
+
+ - Avoid platform.system(), which causes a crash with python.exe in
+ depot_tools. Use sys.platform instead.
+ - Process DumpRenderTree.gyp on all platforms.
+
+ * gyp_webkit:
+
+2010-04-27 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Makes clicking a select element close its associated popup if
+ it is open.
+ https://bugs.webkit.org/show_bug.cgi?id=38105
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+
+2010-04-27 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Merged the WebView public method to close suggestion popups
+ into a single method to close all popups (select and suggestions).
+ That ensures select popups are closed when the browser window is moved
+ or resized.
+ https://bugs.webkit.org/show_bug.cgi?id=37837
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::hidePopups):
+ (WebKit::WebViewImpl::hideSuggestionsPopup):
+ * src/WebViewImpl.h:
+
+2010-04-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Remove unnecessary header now that Chrome is updated
+ https://bugs.webkit.org/show_bug.cgi?id=38211
+
+ * public/win/WebThemeEngine.h: Removed.
+
+2010-04-27 Jens Alfke <snej@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add some notifications and an accessor to WebKit API
+ https://bugs.webkit.org/show_bug.cgi?id=37625
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didFirstLayout):
+ (WebKit::WebFrameClient::didFirstVisuallyNonEmptyLayout):
+ * public/WebNode.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidFirstLayout):
+ (WebKit::FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout):
+ * src/WebElement.cpp:
+ * src/WebNode.cpp:
+ (WebKit::WebNode::hasNonEmptyBoundingBox):
+
+2010-04-27 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Remove deprecated form of didChangeLocationWithinPage
+ https://bugs.webkit.org/show_bug.cgi?id=38178
+
+ * public/WebFrameClient.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
+
+2010-04-27 Evan Martin <evan@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] bold bengali text not rendered properly on Linux
+ Roll forward Chrome DEPS so we get new Skia API.
+
+ * DEPS: update Chrome to r45696.
+
+2010-04-27 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Restore breakpoints associated with script's URL once
+ script is parsed.
+ https://bugs.webkit.org/show_bug.cgi?id=38132
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.initUI):
+ (devtools.DebuggerAgent.prototype.addBreakpoint):
+ (devtools.DebuggerAgent.prototype.addScriptInfo_):
+ (devtools.DebuggerAgent.prototype.restoreBreakpoints_):
+ (devtools.BreakpointInfo):
+ (devtools.BreakpointInfo.prototype.enabled):
+ (devtools.BreakpointInfo.prototype.condition):
+
+2010-04-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chrome Dev Tools: Further beautify themes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38187
+
+ * src/js/DevTools.js:
+ (WebInspector.setToolbarColors):
+ * src/js/devTools.css:
+ (body.platform-windows #toolbar, body.platform-windows.inactive #toolbar):
+
+2010-04-26 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Prepare to making WebThemeEngine cross-platform
+ https://bugs.webkit.org/show_bug.cgi?id=38077
+
+ * WebKit.gyp:
+ * public/WebThemeEngine.h: Added.
+ * public/win/WebThemeEngine.h:
+
+2010-04-26 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Crash after calling window.print() on a window object that has been closed.
+ https://bugs.webkit.org/show_bug.cgi?id=38148
+
+ It is unfortunately not possible to write a layout test for this as the
+ crash occurs in an API that is only called by Chrome while showing a
+ print dialog.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::willEnterModalLoop):
+ (WebKit::WebView::didExitModalLoop):
+
+2010-04-25 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
+ Disentangle initializing the main thread from initializing threading
+
+ * src/WebKit.cpp:
+ (WebKit::initialize): Add call to initializeMainThread.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl): Ditto.
+
+2010-04-26 Roman Gershman <romange@google.com>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Font size in suggestions popup menu should be correlated with the font size of its text field.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37977
+
+ * src/SuggestionsPopupMenuClient.cpp:
+ (WebKit::SuggestionsPopupMenuClient::initialize):
+
+2010-04-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chromium Dev Tools: brush up images.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38124
+
+ * WebKit.gypi:
+ * src/js/DevTools.js:
+ (WebInspector.setToolbarColors):
+ * src/js/Images/segmentChromium.png:
+ * src/js/Images/segmentChromium2.png: Removed.
+ * src/js/Images/segmentHoverChromium2.png: Removed.
+ * src/js/Images/segmentSelectedChromium2.png: Removed.
+ * src/js/Images/statusbarBackgroundChromium.png:
+ * src/js/Images/statusbarBackgroundChromium2.png: Removed.
+ * src/js/Images/statusbarBottomBackgroundChromium.png:
+ * src/js/Images/statusbarButtonsChromium.png:
+ * src/js/Images/statusbarMenuButtonChromium.png:
+ * src/js/Images/statusbarMenuButtonChromium2.png: Removed.
+ * src/js/devTools.css:
+ (.section > .header):
+ (.console-group-messages .section > .header):
+ (#resources-filter):
+ (.crumbs .crumb):
+ (.crumbs .crumb.end):
+ (.crumbs .crumb.selected):
+ (.crumbs .crumb.selected:hover):
+ (.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover):
+ (.crumbs .crumb:hover):
+ (.crumbs .crumb.dimmed:hover):
+ (.crumbs .crumb.end:hover):
+ (body.drawer-visible #main-status-bar):
+ (.status-bar):
+ (button.status-bar-item):
+ (select.status-bar-item:active):
+ (#drawer):
+ (select.status-bar-item):
+
+2010-04-23 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add isGLES2Compliant to GraphicsContext3D: make the method const.
+ https://bugs.webkit.org/show_bug.cgi?id=37872
+
+ * src/GraphicsContext3D.cpp: Make isGLES2Compliant() const.
+ (WebCore::GraphicsContext3DInternal::isGLES2Compliant):
+ (WebCore::GraphicsContext3D::isGLES2Compliant):
+
+2010-04-23 Rafael Weinstein <rafaelw@grafaelw.sfo.corp.google.com>
+
+ Reviewed by Darin Fisher.
+
+ This patch adds a WebWindowFeatures binding struct for the
+ chromium client in anticipation of a follow-on patch which will
+ pass it to WebViewClient::createWindow.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38013
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ * public/WebWindowFeatures.h: Added.
+ (WebKit::WebWindowFeatures::WebWindowFeatures):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+
+2010-04-22 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Add isGLES2Compliant to GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=37872
+
+ * public/WebGraphicsContext3D.h: Add isGLES2Compliant().
+ * src/GraphicsContext3D.cpp: Ditto.
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto.
+ (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2Compliant):
+ * src/WebGraphicsContext3DDefaultImpl.h: Ditto.
+
+2010-04-22 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Added notification when the favicons for a page are changed
+ from a script.
+ The Document object will notify the frame loader, which will
+ notify the client. Implementations of FrameLoaderClient will
+ have to add one method; dispatchDidChangeIcons().
+
+ https://bugs.webkit.org/show_bug.cgi?id=33812
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didChangeIcons):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons):
+ * src/FrameLoaderClientImpl.h:
+
+2010-04-22 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Emulate GL_IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for glGet
+ https://bugs.webkit.org/show_bug.cgi?id=37281
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Emulate two enums.
+
+2010-04-22 Adam Barth <abarth@webkit.org>
+
+ Unreviewed, rolling out r58069.
+ http://trac.webkit.org/changeset/58069
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ Broke compile on Windows.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ * src/WebSettingsImpl.h:
+
+2010-04-22 Tony Chang <tony@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [chromium] roll chromium deps to pick up some windows build fixes
+ https://bugs.webkit.org/show_bug.cgi?id=37972
+
+ * DEPS:
+
+2010-04-22 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Add support for controlling clipboard access from javascript.
+ Clipboard access from javascript is disabled by default.
+ https://bugs.webkit.org/show_bug.cgi?id=27751
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard):
+ * src/WebSettingsImpl.h:
+
+2010-04-21 Tony Chang <tony@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [chromium] gyp_webkit should be executable
+ https://bugs.webkit.org/show_bug.cgi?id=37971
+
+ * gyp_webkit: Added property svn:executable.
+
+2010-04-21 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Don't notify the WebView that a popup was
+ opened when the popup is handled externally, as the popup
+ is in that case transparent to the WebView.
+ The notification was causing an ASSERT on Mac (where
+ the popup is handled externally) as there would be no
+ notification that the popup was closed.
+ https://bugs.webkit.org/show_bug.cgi?id=37825
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::popupOpened):
+
2010-04-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r58028.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index c6d71ab..07401d7 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '44453',
+ 'chromium_rev': '45932',
'pthreads-win32_rev': '26716',
}
@@ -44,6 +44,8 @@ deps = {
# build tools
'build':
Var('chromium_svn')+'/build@'+Var('chromium_rev'),
+ 'tools/data_pack':
+ Var('chromium_svn')+'/tools/data_pack@'+Var('chromium_rev'),
'tools/gyp':
From('chromium_deps', 'src/tools/gyp'),
@@ -173,6 +175,8 @@ deps_os = {
Var('chromium_svn')+'/third_party/harfbuzz@'+Var('chromium_rev'),
'tools/xdisplaycheck':
Var('chromium_svn')+'/tools/xdisplaycheck@'+Var('chromium_rev'),
+ 'tools/data_pack':
+ Var('chromium_svn')+'/tools/data_pack@'+Var('chromium_rev'),
'third_party/yasm/source/patched-yasm':
From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
},
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 53581bc..b3a926e 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -121,6 +121,7 @@
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
'public/WebFileInfo.h',
+ 'public/WebFileSystem.h',
'public/WebFindOptions.h',
'public/WebFrame.h',
'public/WebFrameClient.h',
@@ -201,6 +202,7 @@
'public/WebTextAffinity.h',
'public/WebTextCaseSensitivity.h',
'public/WebTextDirection.h',
+ 'public/WebThemeEngine.h',
'public/WebURL.h',
'public/WebURLError.h',
'public/WebURLLoader.h',
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 37faa99..a9df3f5 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -48,19 +48,14 @@
],
'devtools_image_files': [
'src/js/Images/segmentChromium.png',
- 'src/js/Images/segmentChromium2.png',
'src/js/Images/segmentHoverChromium.png',
- 'src/js/Images/segmentHoverChromium2.png',
'src/js/Images/segmentHoverEndChromium.png',
'src/js/Images/segmentSelectedChromium.png',
- 'src/js/Images/segmentSelectedChromium2.png',
'src/js/Images/segmentSelectedEndChromium.png',
'src/js/Images/statusbarBackgroundChromium.png',
- 'src/js/Images/statusbarBackgroundChromium2.png',
'src/js/Images/statusbarBottomBackgroundChromium.png',
'src/js/Images/statusbarButtonsChromium.png',
'src/js/Images/statusbarMenuButtonChromium.png',
- 'src/js/Images/statusbarMenuButtonChromium2.png',
'src/js/Images/statusbarMenuButtonSelectedChromium.png',
],
},
diff --git a/WebKit/chromium/gyp_webkit b/WebKit/chromium/gyp_webkit
index db1aa7a..812ed27 100644..100755
--- a/WebKit/chromium/gyp_webkit
+++ b/WebKit/chromium/gyp_webkit
@@ -1,4 +1,4 @@
-#
+#!/usr/bin/env python
# Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,6 @@
import glob
import os
-import platform
import shlex
import sys
@@ -78,7 +77,7 @@ if __name__ == '__main__':
args.extend(['-I' + i for i in additional_include_files(args)])
# On linux, we want gyp to output a makefile (default is scons).
- if platform.system() == 'Linux':
+ if sys.platform == 'linux2':
args.extend(['-fmake'])
# Other command args:
@@ -91,12 +90,9 @@ if __name__ == '__main__':
# gyp hack: otherwise gyp assumes its in chromium's src/ dir.
'--depth=./',
- # gyp file to execute.
- 'WebKit.gyp'])
-
- # Generate DRT build files on the platforms that support it.
- if platform.system() in ('Darwin', 'Linux'):
- args.append('../../WebKitTools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp')
+ # gyp files to execute.
+ 'WebKit.gyp',
+ '../../WebKitTools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp'])
print 'Updating webkit projects from gyp files...'
sys.stdout.flush()
diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h
index f4df16d..13603cb 100644
--- a/WebKit/chromium/public/WebCommonWorkerClient.h
+++ b/WebKit/chromium/public/WebCommonWorkerClient.h
@@ -33,6 +33,8 @@
namespace WebKit {
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
class WebNotificationPresenter;
class WebString;
class WebWorker;
@@ -74,6 +76,9 @@ public:
// they are created via the WebSharedWorkerRepository.
virtual WebWorker* createWorker(WebWorkerClient* client) = 0;
+ // Called on the main webkit thread in the worker process during initialization.
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) = 0;
+
protected:
~WebCommonWorkerClient() { }
};
diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h
new file mode 100644
index 0000000..fc6e6dd
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystem.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFileSystem_h
+#define WebFileSystem_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+
+class WebFileSystem {
+public:
+#ifdef WIN32
+ typedef HANDLE FileHandle;
+#else
+ typedef int FileHandle;
+#endif
+
+ virtual bool fileExists(const WebString& path) { return false; }
+ virtual bool deleteFile(const WebString& path) { return false; }
+ virtual bool deleteEmptyDirectory(const WebString& path) { return false; }
+ virtual bool getFileSize(const WebString& path, long long& result) { return false; }
+ virtual bool getFileModificationTime(const WebString& path, double& result) { return false; }
+ virtual WebString directoryName(const WebString& path) { return WebString(); }
+ virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); }
+ virtual bool makeAllDirectories(const WebString& path) { return false; }
+ virtual WebString getAbsolutePath(const WebString& path) { return WebString(); }
+ virtual bool isDirectory(const WebString& path) { return false; }
+ virtual WebURL filePathToURL(const WebString& path) { return WebURL(); }
+ virtual FileHandle openFile(const WebString& path, int mode) { return FileHandle(); }
+ // Should set the FileHandle to a invalid value if the file is closed successfully.
+ virtual void closeFile(FileHandle&) { }
+ virtual long long seekFile(FileHandle, long long offset, int origin) { return 0; }
+ virtual bool truncateFile(FileHandle, long long offset) { return false; }
+ virtual int readFromFile(FileHandle, char* data, int length) { return 0; }
+ virtual int writeToFile(FileHandle, const char* data, int length) { return 0; }
+
+protected:
+ ~WebFileSystem() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 8cb4e47..6a0b24e 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -66,8 +66,6 @@ namespace WebKit {
WEBKIT_API void submit();
// FIXME: Deprecate and replace with WebVector<WebElement>.
WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&);
- // DEPRECATED: Replaced by getFormControlElements.
- WEBKIT_API void getInputElements(WebVector<WebInputElement>&) const;
WEBKIT_API void getFormControlElements(WebVector<WebFormControlElement>&) const;
#if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 315cf87..2b7ee0d 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -138,6 +138,10 @@ public:
// Navigational notifications ------------------------------------------
+ // A form submission has been requested, but the page's submit event handler
+ // hasn't yet had a chance to run (and possibly alter/interrupt the submit.)
+ virtual void willSendSubmitEvent(WebFrame*, const WebFormElement&) { }
+
// A form submission is about to occur.
virtual void willSubmitForm(WebFrame*, const WebFormElement&) { }
@@ -192,6 +196,9 @@ public:
// The page title is available.
virtual void didReceiveTitle(WebFrame*, const WebString& title) { }
+ // The icons for the page have changed.
+ virtual void didChangeIcons(WebFrame*) { }
+
// The frame's document finished loading.
virtual void didFinishDocumentLoad(WebFrame*) { }
@@ -211,8 +218,6 @@ public:
// The navigation resulted in scrolling the page to a named anchor instead
// of downloading a new document.
- // FIXME: The isNewNavigation parameter is DEPRECATED.
- virtual void didChangeLocationWithinPage(WebFrame*, bool isNewNavigation) { }
virtual void didChangeLocationWithinPage(WebFrame*) { }
// Called upon update to scroll position, document state, and other
@@ -292,6 +297,12 @@ public:
// Geometry notifications ----------------------------------------------
+ // The frame's document finished the initial layout of a page.
+ virtual void didFirstLayout(WebFrame*) { }
+
+ // The frame's document finished the initial non-empty layout of a page.
+ virtual void didFirstVisuallyNonEmptyLayout(WebFrame*) { }
+
// The size of the content area changed.
virtual void didChangeContentsSize(WebFrame*, const WebSize&) { }
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index 3418ef9..dc4f534 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -99,6 +99,9 @@ public:
// Resizes the region into which this WebGraphicsContext3D is drawing.
virtual void reshape(int width, int height) = 0;
+ // Query whether it is built on top of compliant GLES2 implementation.
+ virtual bool isGLES2Compliant() = 0;
+
// Helper for software compositing path. Reads back the frame buffer into
// the memory region pointed to by "pixels" with size "bufferSize". It is
// expected that the storage for "pixels" covers (4 * width * height) bytes.
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 0fec63f..a7a71b0 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -90,12 +90,6 @@ namespace WebKit {
WEBKIT_API void setAutofilled(bool);
WEBKIT_API void dispatchFormControlChangeEvent();
WEBKIT_API void setSelectionRange(int, int);
- // DEPRECATED: The following two methods have been moved to WebFormControlElement.
- WEBKIT_API WebString name() const;
- // Returns the name that should be used for the specified |element| when
- // storing AutoFill data. This is either the field name or its id, an
- // empty string if it has no name and no id.
- WEBKIT_API WebString nameForAutofill() const;
#if WEBKIT_IMPLEMENTATION
WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 38b131d..97d25a8 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -49,6 +49,7 @@ class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
class WebClipboard;
class WebCookieJar;
+class WebFileSystem;
class WebGLES2Context;
class WebGraphicsContext3D;
class WebIndexedDatabase;
@@ -70,6 +71,9 @@ public:
// Must return non-null.
virtual WebMimeRegistry* mimeRegistry() { return 0; }
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
// May return null if sandbox support is not necessary
virtual WebSandboxSupport* sandboxSupport() { return 0; }
@@ -85,10 +89,6 @@ public:
// Return a LocalStorage namespace that corresponds to the following path.
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
- // Return a new SessionStorage namespace.
- // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this.
- virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
-
// Called when storage events fire.
virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
const WebString& newValue, const WebString& origin,
@@ -263,7 +263,7 @@ public:
virtual void stopSharedTimer() { }
// Callable from a background WebKit thread.
- virtual void callOnMainThread(void (*func)()) { }
+ virtual void callOnMainThread(void (*func)(void*), void* context) { }
// WebGL --------------------------------------------------------------
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index 5a87da0..792ede5 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -101,6 +101,11 @@ public:
WEBKIT_API void simulateClick();
WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const;
+ // Returns true if the node has a non-empty bounding box in layout.
+ // This does not 100% guarantee the user can see it, but is pretty close.
+ // Note: This method only works properly after layout has occurred.
+ WEBKIT_API bool hasNonEmptyBoundingBox() const;
+
// Deprecated. Use to() instead.
template<typename T> T toElement()
{
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index 9d64e2a..ab747e3 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -75,6 +75,9 @@ public:
WEBKIT_API WebString title() const;
WEBKIT_API WebString body() const;
+ WEBKIT_API WebString dir() const;
+ WEBKIT_API WebString replaceId() const;
+
// Called to indicate the notification has been displayed.
WEBKIT_API void dispatchDisplayEvent();
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 40a5952..03ff681 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -74,6 +74,9 @@ public:
WEBKIT_API static void enablePushState(bool);
WEBKIT_API static bool isPushStateEnabled(bool);
+ WEBKIT_API static void enableTouch(bool);
+ WEBKIT_API static bool isTouchEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h
index 815f471..ac0031d 100644
--- a/WebKit/chromium/public/WebSecurityPolicy.h
+++ b/WebKit/chromium/public/WebSecurityPolicy.h
@@ -55,9 +55,18 @@ public:
WEBKIT_API static void registerURLSchemeAsSecure(const WebString&);
// Support for whitelisting access to origins beyond the same-origin policy.
+ WEBKIT_API static void addOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void removeOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void resetOriginAccessWhitelists();
+ // DEPRECATED: Phase on of renaming to addOriginAccessWhitelistEntry.
WEBKIT_API static void whiteListAccessFromOrigin(
const WebURL& sourceOrigin, const WebString& destinationProtocol,
const WebString& destinationHost, bool allowDestinationSubdomains);
+ // DEPRECATED: Phase on of renaming to resetOriginAccessWhitelists..
WEBKIT_API static void resetOriginAccessWhiteLists();
// Returns whether the url should be allowed to see the referrer
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 6339ded..356d9fa 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -72,6 +72,7 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool) = 0;
virtual void setUsesPageCache(bool) = 0;
virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
+ virtual void setJavaScriptCanAccessClipboard(bool) = 0;
virtual void setXSSAuditorEnabled(bool) = 0;
virtual void setLocalStorageEnabled(bool) = 0;
virtual void setEditableLinkBehaviorNeverLive() = 0;
diff --git a/WebKit/chromium/public/WebStorageNamespace.h b/WebKit/chromium/public/WebStorageNamespace.h
index da92a77..4b648d4 100644
--- a/WebKit/chromium/public/WebStorageNamespace.h
+++ b/WebKit/chromium/public/WebStorageNamespace.h
@@ -48,7 +48,11 @@ public:
// If path is empty, data will not persist. You should call delete on the returned
// object when you're finished.
WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota);
- WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace();
+ WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
+ WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace()
+ {
+ return createSessionStorageNamespace(noQuota);
+ }
static const unsigned noQuota = UINT_MAX;
diff --git a/WebKit/chromium/public/win/WebThemeEngine.h b/WebKit/chromium/public/WebThemeEngine.h
index b563608..1fccb0e 100644
--- a/WebKit/chromium/public/win/WebThemeEngine.h
+++ b/WebKit/chromium/public/WebThemeEngine.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -31,21 +31,23 @@
#ifndef WebThemeEngine_h
#define WebThemeEngine_h
-#include "../WebCanvas.h"
-#include "../WebColor.h"
+#include "WebCanvas.h"
+#include "WebColor.h"
namespace WebKit {
struct WebRect;
+struct WebSize;
+class WebThemeEngine {
+public:
+#ifdef WIN32
// The part and state parameters correspond to values defined by the
// Windows Theme API (see
// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ).
// The classicState parameter corresponds to the uState
// parameter of the Windows DrawFrameControl() function.
// See the definitions in <vsstyle.h> and <winuser.h>.
-class WebThemeEngine {
-public:
virtual void paintButton(
WebCanvas*, int part, int state, int classicState,
const WebRect&) = 0;
@@ -73,6 +75,45 @@ public:
virtual void paintTrackbar(
WebCanvas*, int part, int state, int classicState,
const WebRect&) = 0;
+#endif
+
+ // WebThemeEngine was originally used only on Windows, hence its platform-
+ // specific parameters. This is new cross-platform theming API, and we'll
+ // switch the code to using these APIs on all platforms instead.
+ enum Part {
+ PartScrollbarDownArrow,
+ PartScrollbarLeftArrow,
+ PartScrollbarRightArrow,
+ PartScrollbarUpArrow,
+ PartScrollbarHorizontalThumb,
+ PartScrollbarVerticalThumb,
+ PartScrollbarHoriztonalTrack,
+ PartScrollbarVerticalTrack,
+ };
+
+ enum State {
+ StateDisabled,
+ StateHot,
+ StateHover,
+ StateNormal,
+ StatePressed,
+ };
+
+ struct ScrollbarTrackExtraParams {
+ int alignX;
+ int alignY;
+ };
+
+ union ExtraParams {
+ ScrollbarTrackExtraParams scrollbarTrack;
+ };
+
+ // Gets the size of the given theme component. For variable sized items
+ // like vertical scrollbar tracks, the width will be the required width of
+ // the track while the height will be the minimum height.
+ virtual void getSize(Part, WebSize*) {}
+ virtual void paint(
+ WebCanvas*, Part, State, const WebRect&, const ExtraParams&) {}
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
index 41443b4..408aad7 100644
--- a/WebKit/chromium/public/WebURLRequest.h
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -67,7 +67,9 @@ public:
TargetIsFontResource = 5,
TargetIsImage = 6,
TargetIsObject = 7,
- TargetIsMedia = 8
+ TargetIsMedia = 8,
+ TargetIsWorker = 9,
+ TargetIsSharedWorker = 10
};
~WebURLRequest() { reset(); }
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 5a043f2..9ed98c6 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -225,13 +225,6 @@ public:
// AutoFill / Autocomplete ---------------------------------------------
- // DEPRECATED: WebView::applyAutocompleteSuggestions is the new way to
- // access this.
- virtual void applyAutofillSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex) = 0;
-
// Notifies the WebView that AutoFill suggestions are available for a node.
virtual void applyAutoFillSuggestions(
const WebNode&,
@@ -246,11 +239,8 @@ public:
const WebVector<WebString>& suggestions,
int defaultSuggestionIndex) = 0;
- // DEPRECATED: WebView::hideSuggestionsPopup is the new way to access this.
- virtual void hideAutofillPopup() = 0;
-
- // Hides the suggestions popup if any are showing.
- virtual void hideSuggestionsPopup() = 0;
+ // Hides any popup (suggestions, selects...) that might be showing.
+ virtual void hidePopups() = 0;
// Context menu --------------------------------------------------------
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index c2a96dc..98e0485 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -60,6 +60,7 @@ struct WebConsoleMessage;
struct WebContextMenuData;
struct WebPoint;
struct WebPopupMenuInfo;
+struct WebWindowFeatures;
// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient.
// Virtual inheritance allows an implementation of WebWidgetClient to be
@@ -71,16 +72,13 @@ public:
// Create a new related WebView. This method must clone its session storage
// so any subsequent calls to createSessionStorageNamespace conform to the
// WebStorage specification.
- virtual WebView* createView(WebFrame* creator) { return 0; }
+ virtual WebView* createView(WebFrame* creator,
+ const WebWindowFeatures& features) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
// responsible for rendering the contents of the popup menu.
virtual WebWidget* createPopupMenu(WebPopupType) { return 0; }
virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
- // Deprecated methods.
- virtual WebWidget* createPopupMenu() { return 0; }
- virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
-
// Create a session storage namespace object associated with this WebView.
virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index 9dfeefc..b1feee9 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -90,6 +90,10 @@ public:
// Changes the text direction of the selected input node.
virtual void setTextDirection(WebTextDirection) = 0;
+ // Returns true if the WebWidget uses GPU accelerated compositing
+ // to render its contents.
+ virtual bool isAcceleratedCompositingActive() const = 0;
+
protected:
~WebWidget() { }
};
diff --git a/WebKit/chromium/public/WebWindowFeatures.h b/WebKit/chromium/public/WebWindowFeatures.h
new file mode 100644
index 0000000..2e7278a
--- /dev/null
+++ b/WebKit/chromium/public/WebWindowFeatures.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebWindowFeatures_h
+#define WebWindowFeatures_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include "WindowFeatures.h"
+#endif
+
+namespace WebKit {
+
+struct WebWindowFeatures {
+ float x;
+ bool xSet;
+ float y;
+ bool ySet;
+ float width;
+ bool widthSet;
+ float height;
+ bool heightSet;
+
+ bool menuBarVisible;
+ bool statusBarVisible;
+ bool toolBarVisible;
+ bool locationBarVisible;
+ bool scrollbarsVisible;
+ bool resizable;
+
+ bool fullscreen;
+ bool dialog;
+ WebVector<WebString> additionalFeatures;
+
+ WebWindowFeatures()
+ : xSet(false)
+ , ySet(false)
+ , widthSet(false)
+ , heightSet(false)
+ , menuBarVisible(true)
+ , statusBarVisible(true)
+ , toolBarVisible(true)
+ , locationBarVisible(true)
+ , scrollbarsVisible(true)
+ , resizable(true)
+ , fullscreen(false)
+ , dialog(false)
+ {
+ }
+
+
+#if WEBKIT_IMPLEMENTATION
+ WebWindowFeatures(const WebCore::WindowFeatures& f)
+ : xSet(f.xSet)
+ , ySet(f.ySet)
+ , widthSet(f.widthSet)
+ , heightSet(f.heightSet)
+ , menuBarVisible(f.menuBarVisible)
+ , statusBarVisible(f.statusBarVisible)
+ , toolBarVisible(f.toolBarVisible)
+ , locationBarVisible(f.locationBarVisible)
+ , scrollbarsVisible(f.scrollbarsVisible)
+ , resizable(f.resizable)
+ , fullscreen(f.fullscreen)
+ , dialog(f.dialog)
+ , additionalFeatures(f.additionalFeatures)
+ {
+ }
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index c7acab5..74f0bd8 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -74,6 +74,7 @@
#include "WebURLRequest.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include "WebWindowFeatures.h"
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
@@ -233,7 +234,7 @@ Page* ChromeClientImpl::createWindow(
return 0;
WebViewImpl* newView = static_cast<WebViewImpl*>(
- m_webView->client()->createView(WebFrameImpl::fromFrame(frame)));
+ m_webView->client()->createView(WebFrameImpl::fromFrame(frame), features));
if (!newView)
return 0;
@@ -622,15 +623,11 @@ void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
} else {
webwidget = m_webView->client()->createPopupMenu(
convertPopupType(popupContainer->popupType()));
- // Try the deprecated methods.
- // FIXME: Remove the deprecated methods once the Chromium side use the
- // new method.
- if (!webwidget)
- webwidget = m_webView->client()->createPopupMenu();
- if (!webwidget)
- webwidget = m_webView->client()->createPopupMenu(false);
+ // We only notify when the WebView has to handle the popup, as when
+ // the popup is handled externally, the fact that a popup is showing is
+ // transparent to the WebView.
+ m_webView->popupOpened(popupContainer);
}
- m_webView->popupOpened(popupContainer);
static_cast<WebPopupMenuImpl*>(webwidget)->Init(popupContainer, bounds);
}
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index cffd166..a0e8d3b 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -40,6 +40,7 @@
#include "WebCookieJar.h"
#include "WebCursorInfo.h"
#include "WebData.h"
+#include "WebFileSystem.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebImage.h"
@@ -270,63 +271,118 @@ void ChromiumBridge::prefetchDNS(const String& hostname)
bool ChromiumBridge::fileExists(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->fileExists(path);
return webKitClient()->fileExists(path);
}
bool ChromiumBridge::deleteFile(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->deleteFile(path);
return webKitClient()->deleteFile(path);
}
bool ChromiumBridge::deleteEmptyDirectory(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->deleteEmptyDirectory(path);
return webKitClient()->deleteEmptyDirectory(path);
}
bool ChromiumBridge::getFileSize(const String& path, long long& result)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->getFileSize(path, result);
return webKitClient()->getFileSize(path, result);
}
bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result)
{
double modificationTime;
- if (!webKitClient()->getFileModificationTime(path, modificationTime))
- return false;
+ if (webKitClient()->fileSystem()) {
+ if (!webKitClient()->fileSystem()->getFileModificationTime(path, modificationTime))
+ return false;
+ } else {
+ if (!webKitClient()->getFileModificationTime(path, modificationTime))
+ return false;
+ }
result = static_cast<time_t>(modificationTime);
return true;
}
String ChromiumBridge::directoryName(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->directoryName(path);
return webKitClient()->directoryName(path);
}
String ChromiumBridge::pathByAppendingComponent(const String& path, const String& component)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->pathByAppendingComponent(path, component);
return webKitClient()->pathByAppendingComponent(path, component);
}
bool ChromiumBridge::makeAllDirectories(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->makeAllDirectories(path);
return webKitClient()->makeAllDirectories(path);
}
String ChromiumBridge::getAbsolutePath(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->getAbsolutePath(path);
return webKitClient()->getAbsolutePath(path);
}
bool ChromiumBridge::isDirectory(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->isDirectory(path);
return webKitClient()->isDirectory(path);
}
KURL ChromiumBridge::filePathToURL(const String& path)
{
+ if (webKitClient()->fileSystem())
+ return webKitClient()->fileSystem()->filePathToURL(path);
return webKitClient()->filePathToURL(path);
}
+PlatformFileHandle ChromiumBridge::openFile(const String& path, FileOpenMode mode)
+{
+ return webKitClient()->fileSystem()->openFile(path, mode);
+}
+
+void ChromiumBridge::closeFile(PlatformFileHandle& handle)
+{
+ webKitClient()->fileSystem()->closeFile(handle);
+}
+
+long long ChromiumBridge::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
+{
+ return webKitClient()->fileSystem()->seekFile(handle, offset, origin);
+}
+
+bool ChromiumBridge::truncateFile(PlatformFileHandle handle, long long offset)
+{
+ return webKitClient()->fileSystem()->truncateFile(handle, offset);
+}
+
+int ChromiumBridge::readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ return webKitClient()->fileSystem()->readFromFile(handle, data, length);
+}
+
+int ChromiumBridge::writeToFile(PlatformFileHandle handle, const char* data, int length)
+{
+ return webKitClient()->fileSystem()->writeToFile(handle, data, length);
+}
+
// Font -----------------------------------------------------------------------
#if OS(WINDOWS)
diff --git a/WebKit/chromium/src/ChromiumThreading.cpp b/WebKit/chromium/src/ChromiumThreading.cpp
index 902a433..c6fefac 100644
--- a/WebKit/chromium/src/ChromiumThreading.cpp
+++ b/WebKit/chromium/src/ChromiumThreading.cpp
@@ -38,13 +38,9 @@
namespace WTF {
-void ChromiumThreading::initializeMainThread()
+void ChromiumThreading::callOnMainThread(void (*func)(void*), void* context)
{
-}
-
-void ChromiumThreading::scheduleDispatchFunctionsOnMainThread()
-{
- WebKit::webKitClient()->callOnMainThread(&WTF::dispatchFunctionsFromMainThread);
+ WebKit::webKitClient()->callOnMainThread(func, context);
}
} // namespace WTF
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 135392b..17d9416 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -628,14 +628,9 @@ void FrameLoaderClientImpl::dispatchDidNavigateWithinPage()
bool isNewNavigation;
webView->didCommitLoad(&isNewNavigation);
- if (m_webFrame->client()) {
+ if (m_webFrame->client())
m_webFrame->client()->didNavigateWithinPage(m_webFrame, isNewNavigation);
- // FIXME: Remove this notification once it is no longer consumed downstream.
- if (isHashChange)
- m_webFrame->client()->didChangeLocationWithinPage(m_webFrame, isNewNavigation);
- }
-
// Generate didStopLoading if loader is completed.
if (webView->client() && loaderCompleted)
webView->client()->didStopLoading();
@@ -726,6 +721,12 @@ void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title)
m_webFrame->client()->didReceiveTitle(m_webFrame, title);
}
+void FrameLoaderClientImpl::dispatchDidChangeIcons()
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->didChangeIcons(m_webFrame);
+}
+
void FrameLoaderClientImpl::dispatchDidCommitLoad()
{
WebViewImpl* webview = m_webFrame->viewImpl();
@@ -788,12 +789,14 @@ void FrameLoaderClientImpl::dispatchDidFinishLoad()
void FrameLoaderClientImpl::dispatchDidFirstLayout()
{
+ if (m_webFrame->client())
+ m_webFrame->client()->didFirstLayout(m_webFrame);
}
void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout()
{
- // FIXME: called when webkit finished layout of a page that was visually non-empty.
- // All resources have not necessarily finished loading.
+ if (m_webFrame->client())
+ m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame);
}
Frame* FrameLoaderClientImpl::dispatchCreatePage()
@@ -949,6 +952,12 @@ void FrameLoaderClientImpl::dispatchUnableToImplementPolicy(const ResourceError&
m_webFrame->client()->unableToImplementPolicyWithError(m_webFrame, error);
}
+void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
+{
+ if (m_webFrame->client())
+ m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(form));
+}
+
void FrameLoaderClientImpl::dispatchWillSubmitForm(FramePolicyFunction function,
PassRefPtr<FormState> formState)
{
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 1cbc1de..c163f62 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -102,6 +102,7 @@ public:
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
virtual void dispatchDidReceiveTitle(const WebCore::String& title);
+ virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&);
virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
@@ -116,6 +117,7 @@ public:
virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state);
virtual void cancelPolicyCheck();
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
+ virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*);
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 0f9c959..e51f433 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -111,6 +111,8 @@ public:
void beginPaint(WebGLRenderingContext* context);
void endPaint();
+ bool isGLES2Compliant() const;
+
//----------------------------------------------------------------------
// Entry points for WebGL.
//
@@ -617,6 +619,11 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
DELEGATE_TO_IMPL_1R(sizeInBytes, int, int)
+bool GraphicsContext3DInternal::isGLES2Compliant() const
+{
+ return m_impl->isGLES2Compliant();
+}
+
DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
DELEGATE_TO_IMPL_2_X12(attachShader, WebGLProgram*, WebGLShader*)
@@ -1202,41 +1209,10 @@ DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
- bool flipY, bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texImage2D(target, level, internalFormat,
- image->width(), image->height(), 0,
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float)
DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int)
-
DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-int GraphicsContext3D::texSubImage2D(unsigned target,
- unsigned level,
- unsigned xoffset,
- unsigned yoffset,
- Image* image,
- bool flipY,
- bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texSubImage2D(target, level, xoffset, yoffset,
- image->width(), image->height(),
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_2(uniform1f, long, float)
DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int)
DELEGATE_TO_INTERNAL_2(uniform1i, long, int)
@@ -1291,6 +1267,11 @@ DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned)
DELEGATE_TO_INTERNAL_1(synthesizeGLError, unsigned long)
+bool GraphicsContext3D::isGLES2Compliant() const
+{
+ return m_internal->isGLES2Compliant();
+}
+
} // namespace WebCore
#endif // ENABLE(3D_CANVAS)
diff --git a/WebKit/chromium/src/SharedWorkerRepository.cpp b/WebKit/chromium/src/SharedWorkerRepository.cpp
index f0a8ec8..a2b513f 100644
--- a/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -70,6 +70,7 @@ public:
, m_name(name)
, m_webWorker(webWorker)
, m_port(port)
+ , m_scriptLoader(ResourceRequestBase::TargetIsSharedWorker)
, m_loading(false)
{
}
diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp
index 0e44250..5311b65 100644
--- a/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -125,8 +125,12 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
frames.append(frame);
}
- for (unsigned i = 0; i < frames.size(); ++i)
- frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), frames[i]->domWindow()->sessionStorage()));
+ for (unsigned i = 0; i < frames.size(); ++i) {
+ ExceptionCode ec = 0;
+ Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
+ if (!ec)
+ frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
+ }
} else {
// Send events to every page.
const HashSet<Page*>& pages = page->group().pages();
diff --git a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
index ae25d44..631753b 100644
--- a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
+++ b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
@@ -71,13 +71,11 @@ void StorageEventDispatcherImpl::dispatchStorageEvent(const String& key, const S
}
}
- // FIXME: Figure out how to pass in the document URI.
for (unsigned i = 0; i < frames.size(); ++i) {
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->localStorage(ec);
if (!ec)
- frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue,
- url, storage));
+ frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
}
}
diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
index aaf9036..dd7d9b8 100644
--- a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
+++ b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
@@ -156,11 +156,9 @@ void SuggestionsPopupMenuClient::initialize(HTMLInputElement* textField,
FontDescription fontDescription;
RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
fontDescription);
+ RenderStyle* style = m_textField->computedStyle();
+ fontDescription.setComputedSize(style->fontDescription().computedSize());
- // Use a smaller font size to match IE/Firefox.
- // FIXME: http://crbug.com/7376 use the system size instead of a
- // fixed font size value.
- fontDescription.setComputedSize(12.0);
Font font(fontDescription, 0, 0);
font.update(textField->document()->styleSelector()->fontSelector());
// The direction of text in popup menu is set the same as the direction of
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 3ed16e6..25a396e 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -32,6 +32,8 @@
#include "WebElement.h"
#include "Element.h"
+#include "RenderBoxModelObject.h"
+#include "RenderObject.h"
#include <wtf/PassRefPtr.h>
using namespace WebCore;
diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp
index 610c36d..7952479 100644
--- a/WebKit/chromium/src/WebFormElement.cpp
+++ b/WebKit/chromium/src/WebFormElement.cpp
@@ -78,18 +78,6 @@ void WebFormElement::getNamedElements(const WebString& name,
result.assign(tempVector);
}
-void WebFormElement::getInputElements(WebVector<WebInputElement>& result) const
-{
- const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
- Vector<RefPtr<HTMLInputElement> > tempVector;
- for (size_t i = 0; i < form->formElements.size(); i++) {
- if (form->formElements[i]->hasLocalName(HTMLNames::inputTag))
- tempVector.append(static_cast<HTMLInputElement*>(
- form->formElements[i]));
- }
- result.assign(tempVector);
-}
-
void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const
{
const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 2ff1c11..52bc645 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -464,6 +464,11 @@ int WebGraphicsContext3DDefaultImpl::sizeInBytes(int type)
return 0;
}
+bool WebGraphicsContext3DDefaultImpl::isGLES2Compliant()
+{
+ return false;
+}
+
static int createTextureObject(GLenum target)
{
GLuint texture = 0;
@@ -1050,7 +1055,23 @@ void WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv(unsign
glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, value);
}
-DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, unsigned long, int*)
+void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* value)
+{
+ // Need to emulate IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for GL. Any valid
+ // combination should work, but GL_RGB/GL_UNSIGNED_BYTE might be the most
+ // useful for desktop WebGL users.
+ makeContextCurrent();
+ switch (pname) {
+ case 0x8B9B: // IMPLEMENTATION_COLOR_READ_FORMAT
+ *value = GL_RGB;
+ break;
+ case 0x8B9A: // IMPLEMENTATION_COLOR_READ_TYPE
+ *value = GL_UNSIGNED_BYTE;
+ break;
+ default:
+ glGetIntegerv(pname, value);
+ }
+}
DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, unsigned long, int*)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index cc283e3..2518a37 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -75,6 +75,8 @@ public:
virtual int sizeInBytes(int type);
+ virtual bool isGLES2Compliant();
+
virtual void reshape(int width, int height);
virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize);
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 1eab91f..2f65ad2 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -94,24 +94,6 @@ void WebInputElement::setSelectionRange(int start, int end)
{
unwrap<HTMLInputElement>()->setSelectionRange(start, end);
}
-
-WebString WebInputElement::name() const
-{
- return constUnwrap<HTMLInputElement>()->name();
-}
-
-WebString WebInputElement::nameForAutofill() const
-{
- String name = constUnwrap<HTMLInputElement>()->name();
- String trimmedName = name.stripWhiteSpace();
- if (!trimmedName.isEmpty())
- return trimmedName;
- name = constUnwrap<HTMLInputElement>()->getAttribute(HTMLNames::idAttr);
- trimmedName = name.stripWhiteSpace();
- if (!trimmedName.isEmpty())
- return trimmedName;
- return String();
-}
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index a8e1851..8346ef8 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -56,6 +56,7 @@ void initialize(WebKitClient* webKitClient)
s_webKitClient = webKitClient;
WTF::initializeThreading();
+ WTF::initializeMainThread();
WebCore::AtomicString::init();
// Chromium sets the minimum interval timeout to 4ms, overriding the
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index e050c79..90bbb34 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -178,6 +178,11 @@ WebNodeList WebNode::getElementsByTagName(const WebString& tag) const
return WebNodeList(m_private->getElementsByTagName(tag));
}
+bool WebNode::hasNonEmptyBoundingBox() const
+{
+ return m_private->hasNonEmptyBoundingBox();
+}
+
WebNode::WebNode(const PassRefPtr<Node>& node)
: m_private(node)
{
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 5200d17..5ae1557 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -94,6 +94,16 @@ WebString WebNotification::body() const
return m_private->contents().body();
}
+WebString WebNotification::dir() const
+{
+ return m_private->dir();
+}
+
+WebString WebNotification::replaceId() const
+{
+ return m_private->replaceId();
+}
+
void WebNotification::dispatchDisplayEvent()
{
RefPtr<Event> event = Event::create("display", false, true);
diff --git a/WebKit/chromium/src/WebPasswordFormData.cpp b/WebKit/chromium/src/WebPasswordFormData.cpp
index 64b1754..eb230d5 100644
--- a/WebKit/chromium/src/WebPasswordFormData.cpp
+++ b/WebKit/chromium/src/WebPasswordFormData.cpp
@@ -162,7 +162,10 @@ WebPasswordFormData::WebPasswordFormData(const WebFormElement& webForm)
KURL fullOrigin(ParsedURLString, form->document()->documentURI());
// Calculate the canonical action URL
- KURL fullAction = frame->loader()->completeURL(form->action());
+ String action = form->action();
+ if (action.isNull())
+ action = ""; // missing 'action' attribute implies current URL
+ KURL fullAction = frame->loader()->completeURL(action);
if (!fullAction.isValid())
return;
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 2cdf255..b207a25 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -128,10 +128,10 @@ void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/);
}
-void WebPluginContainerImpl::setFocus()
+void WebPluginContainerImpl::setFocus(bool focused)
{
- Widget::setFocus();
- m_webPlugin->updateFocus(true);
+ Widget::setFocus(focused);
+ m_webPlugin->updateFocus(focused);
}
void WebPluginContainerImpl::show()
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h
index 3160394..4163ee5 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -67,7 +67,7 @@ public:
virtual void setFrameRect(const WebCore::IntRect&);
virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
virtual void invalidateRect(const WebCore::IntRect&);
- virtual void setFocus();
+ virtual void setFocus(bool);
virtual void show();
virtual void hide();
virtual void handleEvent(WebCore::Event*);
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 7390394..ca50b81 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -75,6 +75,7 @@ public:
int targetStart, int targetEnd, const WebString& text);
virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
virtual void setTextDirection(WebTextDirection direction);
+ virtual bool isAcceleratedCompositingActive() const { return false; }
// WebPopupMenuImpl
void Init(WebCore::FramelessScrollView* widget,
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 464834d..8e73d6f 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -210,4 +210,20 @@ bool WebRuntimeFeatures::isPushStateEnabled(bool enable)
return RuntimeEnabledFeatures::pushStateEnabled();
}
+void WebRuntimeFeatures::enableTouch(bool enable)
+{
+#if ENABLE(TOUCH_EVENTS)
+ RuntimeEnabledFeatures::setTouchEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isTouchEnabled()
+{
+#if ENABLE(TOUCH_EVENTS)
+ return RuntimeEnabledFeatures::touchEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp
index 24ef7d1..cb7ded0 100644
--- a/WebKit/chromium/src/WebSecurityPolicy.cpp
+++ b/WebKit/chromium/src/WebSecurityPolicy.cpp
@@ -56,7 +56,8 @@ void WebSecurityPolicy::registerURLSchemeAsSecure(const WebString& scheme)
SecurityOrigin::registerURLSchemeAsSecure(scheme);
}
-void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
+void WebSecurityPolicy::addOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin,
const WebString& destinationProtocol,
const WebString& destinationHost,
bool allowDestinationSubdomains)
@@ -66,11 +67,38 @@ void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
destinationHost, allowDestinationSubdomains);
}
-void WebSecurityPolicy::resetOriginAccessWhiteLists()
+void WebSecurityPolicy::removeOriginAccessWhitelistEntry(
+ const WebURL& sourceOrigin,
+ const WebString& destinationProtocol,
+ const WebString& destinationHost,
+ bool allowDestinationSubdomains)
+{
+ SecurityOrigin::removeOriginAccessWhitelistEntry(
+ *SecurityOrigin::create(sourceOrigin), destinationProtocol,
+ destinationHost, allowDestinationSubdomains);
+}
+
+void WebSecurityPolicy::resetOriginAccessWhitelists()
{
SecurityOrigin::resetOriginAccessWhitelists();
}
+// To be removed when Chromium's test_shell has proper references.
+void WebSecurityPolicy::whiteListAccessFromOrigin(const WebURL& sourceOrigin,
+ const WebString& destinationProtocol,
+ const WebString& destinationHost,
+ bool allowDestinationSubdomains)
+{
+ addOriginAccessWhitelistEntry(sourceOrigin,
+ destinationProtocol, destinationHost,
+ allowDestinationSubdomains);
+}
+
+void WebSecurityPolicy::resetOriginAccessWhiteLists()
+{
+ resetOriginAccessWhitelists();
+}
+
bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer)
{
return SecurityOrigin::shouldHideReferrer(url, referrer);
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 9e0fa91..3adf3ac 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -200,6 +200,11 @@ void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled)
m_settings->setDownloadableBinaryFontsEnabled(enabled);
}
+void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled)
+{
+ m_settings->setJavaScriptCanAccessClipboard(enabled);
+}
+
void WebSettingsImpl::setXSSAuditorEnabled(bool enabled)
{
m_settings->setXSSAuditorEnabled(enabled);
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 7a809c7..54c660b 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -74,6 +74,7 @@ public:
virtual void setAuthorAndUserStylesEnabled(bool);
virtual void setUsesPageCache(bool);
virtual void setDownloadableBinaryFontsEnabled(bool);
+ virtual void setJavaScriptCanAccessClipboard(bool);
virtual void setXSSAuditorEnabled(bool);
virtual void setLocalStorageEnabled(bool);
virtual void setEditableLinkBehaviorNeverLive();
diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
index 66be027..5fc6e16 100644
--- a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
+++ b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
@@ -45,9 +45,9 @@ WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebS
return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::localStorageNamespace(path, quota));
}
-WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace()
+WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace(unsigned quota)
{
- return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(noQuota));
+ return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(quota));
}
WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace)
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 671a8c9..81a4ff3 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -183,7 +183,9 @@ void WebView::willEnterModalLoop()
PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
ASSERT(pageGroup);
- ASSERT(!pageGroup->pages().isEmpty());
+
+ if (pageGroup->pages().isEmpty())
+ return;
// Pick any page in the page group since we are deferring all pages.
pageGroupLoadDeferrer = new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true);
@@ -191,9 +193,6 @@ void WebView::willEnterModalLoop()
void WebView::didExitModalLoop()
{
- // The embedder must have called willEnterNestedEventLoop.
- ASSERT(pageGroupLoadDeferrer);
-
delete pageGroupLoadDeferrer;
pageGroupLoadDeferrer = 0;
}
@@ -243,13 +242,14 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_haveMouseCapture(false)
#if USE(ACCELERATED_COMPOSITING)
, m_layerRenderer(0)
- , m_isAcceleratedCompositing(false)
+ , m_isAcceleratedCompositingActive(false)
#endif
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
// initialized because CollatorICU requires it.
WTF::initializeThreading();
+ WTF::initializeMainThread();
// set to impossible point so we always get the first mouse pos
m_lastMousePosition = WebPoint(-1, -1);
@@ -326,9 +326,15 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
- // If there is a select popup opened, close it as the user is clicking on
- // the page (outside of the popup).
- hideSelectPopup();
+ // If there is a select popup open, close it as the user is clicking on
+ // the page (outside of the popup). We also save it so we can prevent a
+ // click on the select element from immediately reopening the popup.
+ RefPtr<WebCore::PopupContainer> selectPopup;
+ if (event.button == WebMouseEvent::ButtonLeft) {
+ selectPopup = m_selectPopup;
+ hideSelectPopup();
+ ASSERT(!m_selectPopup);
+ }
m_lastMouseDownPoint = WebPoint(event.x, event.y);
m_haveMouseCapture = true;
@@ -362,6 +368,13 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
static_cast<EditorClientImpl*>(m_page->editorClient())->
showFormAutofillForNode(clickedNode.get());
}
+ if (m_selectPopup && m_selectPopup == selectPopup) {
+ // That click triggered a select popup which is the same as the one that
+ // was showing before the click. It means the user clicked the select
+ // while the popup was showing, and as a result we first closed then
+ // immediately reopened the select popup. It needs to be closed.
+ hideSelectPopup();
+ }
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Windows, we handle it on mouse up, not down.
@@ -849,6 +862,14 @@ void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
}
}
+void WebViewImpl::hideSuggestionsPopup()
+{
+ if (m_suggestionsPopupShowing) {
+ m_suggestionsPopup->hidePopup();
+ m_suggestionsPopupShowing = false;
+ }
+}
+
Frame* WebViewImpl::focusedWebCoreFrame()
{
return m_page.get() ? m_page->focusController()->focusedOrMainFrame() : 0;
@@ -931,7 +952,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
{
#if USE(ACCELERATED_COMPOSITING)
- if (!isAcceleratedCompositing()) {
+ if (!isAcceleratedCompositingActive()) {
#endif
WebFrameImpl* webframe = mainFrameImpl();
if (webframe)
@@ -1267,6 +1288,15 @@ void WebViewImpl::setTextDirection(WebTextDirection direction)
}
}
+bool WebViewImpl::isAcceleratedCompositingActive() const
+{
+#if USE(ACCELERATED_COMPOSITING)
+ return m_isAcceleratedCompositingActive;
+#else
+ return false;
+#endif
+}
+
// WebView --------------------------------------------------------------------
WebSettings* WebViewImpl::settings()
@@ -1667,14 +1697,6 @@ WebAccessibilityObject WebViewImpl::accessibilityObject()
document->axObjectCache()->getOrCreate(document->renderer()));
}
-void WebViewImpl::applyAutofillSuggestions(
- const WebNode& node,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex)
-{
- applyAutocompleteSuggestions(node, suggestions, defaultSuggestionIndex);
-}
-
void WebViewImpl::applyAutoFillSuggestions(
const WebNode& node,
const WebVector<WebString>& names,
@@ -1789,19 +1811,12 @@ void WebViewImpl::applyAutocompleteSuggestions(
}
}
-void WebViewImpl::hideAutofillPopup()
+void WebViewImpl::hidePopups()
{
+ hideSelectPopup();
hideSuggestionsPopup();
}
-void WebViewImpl::hideSuggestionsPopup()
-{
- if (m_suggestionsPopupShowing) {
- m_suggestionsPopup->hidePopup();
- m_suggestionsPopupShowing = false;
- }
-}
-
void WebViewImpl::performCustomContextMenuAction(unsigned action)
{
if (!m_page)
@@ -2038,29 +2053,29 @@ bool WebViewImpl::tabsToLinks() const
#if USE(ACCELERATED_COMPOSITING)
void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
{
- setAcceleratedCompositing(layer ? true : false);
+ setIsAcceleratedCompositingActive(layer ? true : false);
if (m_layerRenderer)
m_layerRenderer->setRootLayer(layer);
}
-void WebViewImpl::setAcceleratedCompositing(bool accelerated)
+void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
{
- if (m_isAcceleratedCompositing == accelerated)
+ if (m_isAcceleratedCompositingActive == active)
return;
- if (accelerated) {
+ if (active) {
m_layerRenderer = LayerRendererChromium::create();
if (m_layerRenderer)
- m_isAcceleratedCompositing = true;
+ m_isAcceleratedCompositingActive = true;
} else {
m_layerRenderer = 0;
- m_isAcceleratedCompositing = false;
+ m_isAcceleratedCompositingActive = false;
}
}
void WebViewImpl::updateRootLayerContents(const WebRect& rect)
{
- if (!isAcceleratedCompositing())
+ if (!isAcceleratedCompositingActive())
return;
WebFrameImpl* webframe = mainFrameImpl();
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index ba2dc25..0bed223 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -100,6 +100,7 @@ public:
virtual bool queryCompositionStatus(bool* enabled,
WebRect* caretRect);
virtual void setTextDirection(WebTextDirection direction);
+ virtual bool isAcceleratedCompositingActive() const;
// WebView methods:
virtual void initializeMainFrame(WebFrameClient*);
@@ -156,10 +157,6 @@ public:
virtual WebDevToolsAgent* devToolsAgent();
virtual void setDevToolsAgent(WebDevToolsAgent*);
virtual WebAccessibilityObject accessibilityObject();
- virtual void applyAutofillSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex);
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
@@ -169,8 +166,7 @@ public:
const WebNode&,
const WebVector<WebString>& suggestions,
int defaultSuggestionIndex);
- virtual void hideAutofillPopup();
- virtual void hideSuggestionsPopup();
+ virtual void hidePopups();
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor);
@@ -299,6 +295,8 @@ public:
void popupOpened(WebCore::PopupContainer* popupContainer);
void popupClosed(WebCore::PopupContainer* popupContainer);
+ void hideSuggestionsPopup();
+
// HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can
// fix WebKit to pass enough information up into ChromeClient::show() so we
// can decide if the window.open event was caused by a middle-mouse click
@@ -343,7 +341,6 @@ private:
// Returns true if the view was scrolled.
bool scrollViewWithKeyboard(int keyCode, int modifiers);
- // Hides the select popup if one is opened.
void hideSelectPopup();
// Converts |pos| from window coordinates to contents coordinates and gets
@@ -358,8 +355,7 @@ private:
DragAction);
#if USE(ACCELERATED_COMPOSITING)
- void setAcceleratedCompositing(bool);
- bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; }
+ void setIsAcceleratedCompositingActive(bool);
void updateRootLayerContents(const WebRect&);
#endif
@@ -495,7 +491,7 @@ private:
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer;
- bool m_isAcceleratedCompositing;
+ bool m_isAcceleratedCompositingActive;
#endif
static const WebInputEvent* m_currentInputEvent;
};
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index da51414..8e26560 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -51,30 +51,6 @@ namespace WebKit {
#if ENABLE(WORKERS)
-// Dummy WebViewDelegate - we only need it in Worker process to load a
-// 'shadow page' which will initialize WebCore loader.
-class WorkerWebFrameClient : public WebFrameClient {
-public:
- // Tell the loader to load the data into the 'shadow page' synchronously,
- // so we can grab the resulting Document right after load.
- virtual void didCreateDataSource(WebFrame* frame, WebDataSource* ds)
- {
- static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
- }
-
- // Lazy allocate and leak this instance.
- static WorkerWebFrameClient* sharedInstance()
- {
- static WorkerWebFrameClient client;
- return &client;
- }
-
-private:
- WorkerWebFrameClient()
- {
- }
-};
-
// This function is called on the main thread to force to initialize some static
// values used in WebKit before any worker thread is started. This is because in
// our worker processs, we do not run any WebKit code in main thread and thus
@@ -103,6 +79,9 @@ WebWorkerBase::WebWorkerBase()
WebWorkerBase::~WebWorkerBase()
{
ASSERT(m_webView);
+ WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame());
+ if (webFrame)
+ webFrame->setClient(0);
m_webView->close();
}
@@ -122,7 +101,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url)
// infrastructure.
ASSERT(!m_webView);
m_webView = WebView::create(0);
- m_webView->initializeMainFrame(WorkerWebFrameClient::sharedInstance());
+ m_webView->initializeMainFrame(this);
WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame());
@@ -151,6 +130,20 @@ void WebWorkerBase::invokeTaskMethod(void* param)
delete task;
}
+void WebWorkerBase::didCreateDataSource(WebFrame*, WebDataSource* ds)
+{
+ // Tell the loader to load the data into the 'shadow page' synchronously,
+ // so we can grab the resulting Document right after load.
+ static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false);
+}
+
+WebApplicationCacheHost* WebWorkerBase::createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient* appcacheHostClient)
+{
+ if (commonClient())
+ return commonClient()->createApplicationCacheHost(appcacheHostClient);
+ return 0;
+}
+
// WorkerObjectProxy -----------------------------------------------------------
void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message,
diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h
index 1252770..a470ee4 100644
--- a/WebKit/chromium/src/WebWorkerBase.h
+++ b/WebKit/chromium/src/WebWorkerBase.h
@@ -34,6 +34,7 @@
#if ENABLE(WORKERS)
#include "ScriptExecutionContext.h"
+#include "WebFrameClient.h"
#include "WorkerLoaderProxy.h"
#include "WorkerObjectProxy.h"
#include <wtf/PassOwnPtr.h>
@@ -44,6 +45,8 @@ class WorkerThread;
}
namespace WebKit {
+class WebApplicationCacheHost;
+class WebApplicationCacheHostClient;
class WebCommonWorkerClient;
class WebSecurityOrigin;
class WebString;
@@ -56,7 +59,8 @@ class WebWorkerClient;
// code used by both implementation classes, including implementations of the
// WorkerObjectProxy and WorkerLoaderProxy interfaces.
class WebWorkerBase : public WebCore::WorkerObjectProxy
- , public WebCore::WorkerLoaderProxy {
+ , public WebCore::WorkerLoaderProxy
+ , public WebFrameClient {
public:
WebWorkerBase();
virtual ~WebWorkerBase();
@@ -80,6 +84,10 @@ public:
virtual void postTaskForModeToWorkerContext(
PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WebCore::String& mode);
+ // WebFrameClient methods to support resource loading thru the 'shadow page'.
+ virtual void didCreateDataSource(WebFrame*, WebDataSource*);
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*);
+
// Executes the given task on the main thread.
static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h
index 4bdc332..907499a 100644
--- a/WebKit/chromium/src/WebWorkerClientImpl.h
+++ b/WebKit/chromium/src/WebWorkerClientImpl.h
@@ -94,6 +94,7 @@ public:
// FIXME: Notifications not yet supported in workers.
return 0;
}
+ virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) { return 0; }
private:
virtual ~WebWorkerClientImpl();
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index 8230616..67e54aa 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -182,6 +182,7 @@ devtools.DebuggerAgent.prototype.initUI = function()
for (var scriptId in this.parsedScripts_) {
var script = this.parsedScripts_[scriptId];
WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1);
+ this.restoreBreakpoints_(scriptId, script.getUrl());
}
return;
}
@@ -245,7 +246,7 @@ devtools.DebuggerAgent.prototype.pauseExecution = function()
* @param {number} line Number of the line for the breakpoint.
* @param {?string} condition The breakpoint condition.
*/
-devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condition)
+devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, enabled, condition)
{
var script = this.parsedScripts_[sourceId];
if (!script)
@@ -263,7 +264,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
this.urlToBreakpoints_[script.getUrl()] = breakpoints;
}
- var breakpointInfo = new devtools.BreakpointInfo(line);
+ var breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
breakpoints[line] = breakpointInfo;
commandArguments = {
@@ -278,7 +279,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
if (breakpointInfo)
return;
- breakpointInfo = new devtools.BreakpointInfo(line);
+ breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
script.addBreakpointInfo(breakpointInfo);
commandArguments = {
@@ -290,6 +291,9 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
};
}
+ if (!enabled)
+ return;
+
var cmd = new devtools.DebugCommand("setbreakpoint", commandArguments);
this.requestNumberToBreakpointInfo_[cmd.getSequenceNumber()] = breakpointInfo;
@@ -305,18 +309,11 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
/**
* Changes given line of the script.
*/
-devtools.DebuggerAgent.prototype.editScriptLine = function(sourceId, line, newContent, callback)
+devtools.DebuggerAgent.prototype.editScriptSource = function(sourceId, newContent, callback)
{
- var script = this.parsedScripts_[sourceId];
- if (!script || !script.source)
- return;
-
- var lines = script.source.split("\n");
- lines[line] = newContent;
-
var commandArguments = {
"script_id": sourceId,
- "new_source": lines.join("\n")
+ "new_source": newContent
};
var cmd = new devtools.DebugCommand("changelive", commandArguments);
@@ -962,6 +959,7 @@ devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg)
if (this.scriptsPanelInitialized_) {
// Only report script as parsed after scripts panel has been shown.
WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1);
+ this.restoreBreakpoints_(script.id, script.name);
}
};
@@ -1085,6 +1083,23 @@ devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame)
/**
+ * Restores breakpoints associated with the URL of a newly parsed script.
+ * @param {number} sourceID The id of the script.
+ * @param {string} scriptUrl URL of the script.
+ */
+devtools.DebuggerAgent.prototype.restoreBreakpoints_ = function(sourceID, scriptUrl)
+{
+ var breakpoints = this.urlToBreakpoints_[scriptUrl];
+ for (var line in breakpoints) {
+ if (parseInt(line) == line) {
+ var v8Line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(parseInt(line));
+ WebInspector.restoredBreakpoint(sourceID, scriptUrl, v8Line, breakpoints[line].enabled(), breakpoints[line].condition());
+ }
+ }
+};
+
+
+/**
* Collects properties for an object from the debugger response.
* @param {Object} object An object from the debugger protocol response.
* @param {Array.<WebInspector.ObjectPropertyProxy>} result An array to put the
@@ -1279,9 +1294,11 @@ devtools.ScriptInfo.prototype.removeBreakpointInfo = function(breakpoint)
* @param {number} line Breakpoint 0-based line number in the containing script.
* @constructor
*/
-devtools.BreakpointInfo = function(line)
+devtools.BreakpointInfo = function(line, enabled, condition)
{
this.line_ = line;
+ this.enabled_ = enabled;
+ this.condition_ = condition;
this.v8id_ = -1;
this.removed_ = false;
};
@@ -1316,7 +1333,7 @@ devtools.BreakpointInfo.prototype.setV8Id = function(id)
/**
- * Marks this breakpoint as removed from the front-end.
+ * Marks this breakpoint as removed from the front-end.
*/
devtools.BreakpointInfo.prototype.markAsRemoved = function()
{
@@ -1335,6 +1352,24 @@ devtools.BreakpointInfo.prototype.isRemoved = function()
/**
+ * @return {boolean} Whether this breakpoint is enabled.
+ */
+devtools.BreakpointInfo.prototype.enabled = function()
+{
+ return this.enabled_;
+};
+
+
+/**
+ * @return {?string} Breakpoint condition.
+ */
+devtools.BreakpointInfo.prototype.condition = function()
+{
+ return this.condition_;
+};
+
+
+/**
* Call stack frame data.
* @param {string} id CallFrame id.
* @param {string} type CallFrame type.
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 75c5467..7c4d126 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -33,18 +33,29 @@ function debuggerScriptConstructor() {
var DebuggerScript = {};
DebuggerScript._breakpoints = {};
+DebuggerScript.PauseOnExceptionsState = {
+ DontPauseOnExceptions : 0,
+ PauseOnAllExceptions : 1,
+ PauseOnUncaughtExceptions: 2
+};
+
+DebuggerScript._pauseOnExceptionsState = DebuggerScript.PauseOnExceptionsState.DontPauseOnExceptions;
+Debug.clearBreakOnException();
+Debug.clearBreakOnUncaughtException();
DebuggerScript.getAfterCompileScript = function(execState, args)
{
return DebuggerScript._formatScript(args.eventData.script_.script_);
}
-DebuggerScript.getScripts = function(execState, args)
+DebuggerScript.getScripts = function(contextData)
{
var scripts = Debug.scripts();
var result = [];
for (var i = 0; i < scripts.length; ++i) {
- result.push(DebuggerScript._formatScript(scripts[i]));
+ var script = scripts[i];
+ if (contextData === script.context_data)
+ result.push(DebuggerScript._formatScript(script));
}
return result;
}
@@ -92,6 +103,26 @@ DebuggerScript.removeBreakpoint = function(execState, args)
delete DebuggerScript._breakpoints[key];
}
+DebuggerScript.pauseOnExceptionsState = function()
+{
+ return DebuggerScript._pauseOnExceptionsState;
+}
+
+DebuggerScript.setPauseOnExceptionsState = function(newState)
+{
+ DebuggerScript._pauseOnExceptionsState = newState;
+
+ if (DebuggerScript.PauseOnExceptionsState.PauseOnAllExceptions === newState)
+ Debug.setBreakOnException();
+ else
+ Debug.clearBreakOnException();
+
+ if (DebuggerScript.PauseOnExceptionsState.PauseOnUncaughtExceptions === newState)
+ Debug.setBreakOnUncaughtException();
+ else
+ Debug.clearBreakOnUncaughtException();
+}
+
DebuggerScript.currentCallFrame = function(execState, args)
{
var frameCount = execState.frameCount();
@@ -160,7 +191,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var sourceID = script && script.id();
// Get line number.
- var line = DebuggerScript._v8ToWwebkitLineNumber(frameMirror.sourceLine());
+ var line = DebuggerScript._v8ToWebkitLineNumber(frameMirror.sourceLine());
// Get this object.
var thisObject = frameMirror.details_.receiver();
@@ -201,7 +232,7 @@ DebuggerScript._webkitToV8LineNumber = function(line)
return line - 1;
};
-DebuggerScript._v8ToWwebkitLineNumber = function(line)
+DebuggerScript._v8ToWebkitLineNumber = function(line)
{
return line + 1;
};
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index a530fe5..59b88db 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -190,6 +190,23 @@ WebInspector.loaded = function()
InspectorFrontendHost.loaded();
};
+devtools.domContentLoaded = function()
+{
+ var queryParams = window.location.search;
+ if (queryParams) {
+ var params = queryParams.substring(1).split("&");
+ var paramsObject = {};
+ for (var i = 0; i < params.length; ++i) {
+ var pair = params[i].split("=");
+ paramsObject[pair[0]] = pair[1];
+ }
+ WebInspector.setAttachedWindow(paramsObject.docked);
+ if (paramsObject.toolbar_color && paramsObject.text_color)
+ WebInspector.setToolbarColors(paramsObject.toolbar_color, paramsObject.text_color);
+ }
+}
+document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
+
if (!window.v8ScriptDebugServerEnabled) {
@@ -415,78 +432,14 @@ WebInspector.setToolbarColors = function(backgroundColor, color)
document.head.appendChild(WebInspector._themeStyleElement);
}
WebInspector._themeStyleElement.textContent =
- "body #toolbar, body.inactive #toolbar {\
+ "#toolbar {\
background-image: none !important;\
background-color: " + backgroundColor + " !important;\
}\
\
- body .status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png) !important;\
- background-color: " + backgroundColor + " !important;\
- }\
- \
- body button.status-bar-item {\
- background-image: none !important;\
- }\
- \
- button.status-bar-item {\
- background-image: none;\
- border-right: 1px solid " + backgroundColor + ";\
- }\
- \
- .status-bar {\
- background-image: none;\
- color: " + color + ";\
- }\
- \
- body #drawer {\
- background-image: none !important;\
- }\
- \
- #drawer-status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png);\
- background-color: " + backgroundColor + ";\
- }\
- \
- \
- body.drawer-visible #main-status-bar {\
- background-image: url(Images/statusbarBackgroundChromium2.png) !important;\
- }\
- \
- body .crumbs .crumb, body .crumbs .crumb.end {\
- -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\
- background-color: " + backgroundColor + " !important;\
- }\
- \
- body .crumbs .crumb:hover, body .crumbs .crumb.dimmed:hover {\
- -webkit-border-image: url(Images/segmentHoverChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body .crumbs .crumb.end {\
- -webkit-border-image: url(Images/segmentChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body .crumbs .crumb.selected:hover, body .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {\
- -webkit-border-image: url(Images/segmentSelectedChromium2.png) 0 12 0 2 !important;\
- }\
- \
- body select.status-bar-item {\
- -webkit-border-image: url(Images/statusbarMenuButtonChromium2.png) 0 17 0 2 !important;\
- background-color: " + backgroundColor + " !important;\
- text-shadow: none !important;\
- }\
- \
- .glyph {\
- background-color: " + color + ";\
- }\
- \
- button.status-bar-item .glyph.shadow {\
- display: none;\
- }\
- \
- .crumbs, .crumbs .crumb:hover, #drawer .scope-bar:not(.console-filter-top) li, .toolbar-label, select.status-bar-item {\
+ .toolbar-label {\
+ color: " + color + " !important;\
text-shadow: none;\
- color: " + color + ";\
}";
}
diff --git a/WebKit/chromium/src/js/Images/segmentChromium.png b/WebKit/chromium/src/js/Images/segmentChromium.png
index 607559b..f4248e1 100755
--- a/WebKit/chromium/src/js/Images/segmentChromium.png
+++ b/WebKit/chromium/src/js/Images/segmentChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentChromium2.png b/WebKit/chromium/src/js/Images/segmentChromium2.png
deleted file mode 100755
index e94f570..0000000
--- a/WebKit/chromium/src/js/Images/segmentChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentHoverChromium2.png b/WebKit/chromium/src/js/Images/segmentHoverChromium2.png
deleted file mode 100755
index 4d4a211..0000000
--- a/WebKit/chromium/src/js/Images/segmentHoverChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png b/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png
deleted file mode 100755
index f2b695b..0000000
--- a/WebKit/chromium/src/js/Images/segmentSelectedChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
index 9d326ac..7a760c1 100755
--- a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png
deleted file mode 100755
index 12d62b1..0000000
--- a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
index 7c7db0a..e3bc944 100755
--- a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png b/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
index 0c6635d..136d5a8 100755
--- a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
index bf26684..5ff61d9 100755
--- a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
+++ b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png
Binary files differ
diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png
deleted file mode 100755
index 9527ac8..0000000
--- a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium2.png
+++ /dev/null
Binary files differ
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index becc076..5c3e8bd 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -128,8 +128,7 @@ if (!window.v8ScriptDebugServerEnabled) {
devtools.InspectorBackendImpl.prototype.setBreakpoint = function(sourceID, line, enabled, condition)
{
this.removeBreakpoint(sourceID, line);
- if (enabled)
- devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, condition);
+ devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, enabled, condition);
};
@@ -139,10 +138,10 @@ devtools.InspectorBackendImpl.prototype.removeBreakpoint = function(sourceID, li
};
-devtools.InspectorBackendImpl.prototype.editScriptLine = function(callID, sourceID, line, newContent)
+devtools.InspectorBackendImpl.prototype.editScriptSource = function(callID, sourceID, newContent)
{
- devtools.tools.getDebuggerAgent().editScriptLine(sourceID, line, newContent, function(newFullBody) {
- WebInspector.didEditScriptLine(callID, newFullBody);
+ devtools.tools.getDebuggerAgent().editScriptSource(sourceID, newContent, function(newFullBody) {
+ WebInspector.didEditScriptSource(callID, newFullBody);
});
};
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index bb33f72..6b4b3e5 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -15,12 +15,8 @@ body.attached #toolbar {
/* Chrome theme overrides */
-body.platform-windows #toolbar {
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(242, 247, 253)), to(rgb(223, 234, 248)));
-}
-
-body.platform-windows.inactive #toolbar {
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(248, 248, 248)), to(rgb(237, 237, 237)));
+body.platform-windows #toolbar, body.platform-windows.inactive #toolbar {
+ background-image: none;
}
body.detached.platform-mac-leopard #toolbar {
@@ -39,6 +35,12 @@ body.detached.platform-mac-snowleopard.inactive #toolbar {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(215, 215, 215)), to(rgb(207, 207, 207))) !important;
}
+body.platform-linux #scripts-files {
+ font-size: 11px;
+ font-weight: normal;
+ line-height: 12px;
+}
+
/* Heap Profiler Styles */
.heap-snapshot-status-bar-item .glyph {
@@ -151,77 +153,79 @@ body.detached.platform-mac-snowleopard.inactive #toolbar {
left: 25%;
}
-body.platform-windows .section > .header {
+.section > .header {
border: 1px solid rgb(92, 116, 157);
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(105, 133, 180)), to(rgb(92, 116, 157)));
}
-body.platform-windows .console-group-messages .section > .header {
+.console-group-messages .section > .header {
padding: 0 8px 0 0;
background-image: none;
border: none;
min-height: 0;
}
-body.platform-windows #resources-filter {
+#resources-filter {
background: -webkit-gradient(linear, left top, left bottom, from(rgb(233, 233, 233)), to(rgb(233, 233, 233)));
}
-body.platform-windows .crumbs .crumb {
+.crumbs .crumb {
-webkit-border-image: url(Images/segmentChromium.png) 0 12 0 2;
+ margin-right: -3px;
+ padding-left: 6px;
}
-body.platform-windows .crumbs .crumb.end {
+.crumbs .crumb.end {
-webkit-border-image: url(Images/segmentEndChromium.png) 0 2 0 2;
}
-body.platform-windows .crumbs .crumb.selected {
+.crumbs .crumb.selected {
-webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
color: white;
text-shadow: rgba(255, 255, 255, 0.5) 0 0px 0;
}
-body.platform-windows .crumbs .crumb.selected:hover {
+.crumbs .crumb.selected:hover {
-webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {
+.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {
-webkit-border-image: url(Images/segmentSelectedEndChromium.png) 0 2 0 2;
}
-body.platform-windows .crumbs .crumb:hover {
+.crumbs .crumb:hover {
-webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.dimmed:hover {
+.crumbs .crumb.dimmed:hover {
-webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
}
-body.platform-windows .crumbs .crumb.end:hover {
+.crumbs .crumb.end:hover {
-webkit-border-image: url(Images/segmentHoverEndChromium.png) 0 2 0 2;
}
-body.platform-windows body.drawer-visible #main-status-bar {
+body.drawer-visible #main-status-bar {
background-image: url(Images/statusbarResizerVertical.png), url(Images/statusbarBackgroundChromium.png);
}
-body.platform-windows .status-bar {
+.status-bar {
background-image: url(Images/statusbarBackgroundChromium.png);
}
-body.platform-windows button.status-bar-item {
+button.status-bar-item {
background-image: url(Images/statusbarButtonsChromium.png);
}
-body.platform-windows select.status-bar-item:active {
+select.status-bar-item:active {
-webkit-border-image: url(Images/statusbarMenuButtonSelectedChromium.png) 0 17 0 2;
}
-body.platform-windows #drawer {
+#drawer {
background-image: url(Images/statusbarBottomBackgroundChromium.png);
}
-body.platform-windows select.status-bar-item {
+select.status-bar-item {
-webkit-border-image: url(Images/statusbarMenuButtonChromium.png) 0 17 0 2;
}
diff --git a/WebKit/chromium/tests/DragImageTest.cpp b/WebKit/chromium/tests/DragImageTest.cpp
index 6c9718e..7b7d4ee 100644
--- a/WebKit/chromium/tests/DragImageTest.cpp
+++ b/WebKit/chromium/tests/DragImageTest.cpp
@@ -118,19 +118,29 @@ TEST(DragImageTest, NonNullHandling)
EXPECT_EQ(1, size.width());
EXPECT_EQ(1, size.height());
- // This is not implemented, so we don't do any output validation.
dragImage = dissolveDragImageToFraction(dragImage, 0.5);
ASSERT_TRUE(dragImage);
deleteDragImage(dragImage);
}
-TEST(DragImageTest, CreateDragImageReturningNull)
+TEST(DragImageTest, CreateDragImage)
{
- // Tests that the DrageImage implementation doesn't choke on null values
- // of nativeImageForCurrentFrame().
- TestImage testImage((IntSize()));
- EXPECT_FALSE(createDragImageFromImage(&testImage));
+ {
+ // Tests that the DrageImage implementation doesn't choke on null values
+ // of nativeImageForCurrentFrame().
+ TestImage testImage((IntSize()));
+ EXPECT_FALSE(createDragImageFromImage(&testImage));
+ }
+
+ {
+ // Tests that the drag image is a deep copy.
+ TestImage testImage(IntSize(1, 1));
+ DragImageRef dragImage = createDragImageFromImage(&testImage);
+ ASSERT_TRUE(dragImage);
+ SkAutoLockPixels lock1(*dragImage), lock2(*testImage.nativeImageForCurrentFrame());
+ EXPECT_NE(dragImage->getPixels(), testImage.nativeImageForCurrentFrame()->getPixels());
+ }
}
} // anonymous namespace