summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog832
-rw-r--r--WebKit/chromium/DEPS56
-rw-r--r--WebKit/chromium/WebKit.gyp9
-rw-r--r--WebKit/chromium/features.gypi8
-rw-r--r--WebKit/chromium/public/WebAccessibilityRole.h1
-rw-r--r--WebKit/chromium/public/WebApplicationCacheHostClient.h3
-rw-r--r--WebKit/chromium/public/WebCString.h10
-rw-r--r--WebKit/chromium/public/WebCompositionCommand.h1
-rw-r--r--WebKit/chromium/public/WebCompositionUnderline.h61
-rw-r--r--WebKit/chromium/public/WebDatabase.h8
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h3
-rw-r--r--WebKit/chromium/public/WebDevToolsAgentClient.h2
-rw-r--r--WebKit/chromium/public/WebDevToolsMessageTransport.h48
-rw-r--r--WebKit/chromium/public/WebFrame.h17
-rw-r--r--WebKit/chromium/public/WebGLES2Context.h2
-rw-r--r--WebKit/chromium/public/WebHistoryItem.h6
-rw-r--r--WebKit/chromium/public/WebMediaPlayer.h2
-rw-r--r--WebKit/chromium/public/WebNotification.h5
-rw-r--r--WebKit/chromium/public/WebSharedWorker.h9
-rw-r--r--WebKit/chromium/public/WebTextInputType.h53
-rw-r--r--WebKit/chromium/public/WebURL.h5
-rw-r--r--WebKit/chromium/public/WebURLResponse.h5
-rw-r--r--WebKit/chromium/public/WebView.h5
-rw-r--r--WebKit/chromium/public/WebViewClient.h5
-rw-r--r--WebKit/chromium/public/WebWidget.h31
-rw-r--r--WebKit/chromium/public/WebWidgetClient.h4
-rw-r--r--WebKit/chromium/public/mac/WebSandboxSupport.h63
-rw-r--r--WebKit/chromium/src/ApplicationCacheHostInternal.h12
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp1
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.cpp8
-rw-r--r--WebKit/chromium/src/AutocompletePopupMenuClient.cpp4
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp2
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp19
-rw-r--r--WebKit/chromium/src/CompositionUnderlineBuilder.h53
-rw-r--r--WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp49
-rw-r--r--WebKit/chromium/src/CompositionUnderlineVectorBuilder.h53
-rw-r--r--WebKit/chromium/src/DatabaseObserver.cpp8
-rw-r--r--WebKit/chromium/src/DebuggerAgentManager.cpp2
-rw-r--r--WebKit/chromium/src/DragScrollTimer.cpp126
-rw-r--r--WebKit/chromium/src/DragScrollTimer.h69
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp7
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp3
-rw-r--r--WebKit/chromium/src/GLES2Context.cpp21
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.cpp80
-rw-r--r--WebKit/chromium/src/InspectorClientImpl.h7
-rw-r--r--WebKit/chromium/src/InspectorFrontendClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/NotificationPresenterImpl.cpp5
-rw-r--r--WebKit/chromium/src/ToolsAgent.h3
-rw-r--r--WebKit/chromium/src/WebCString.cpp12
-rw-r--r--WebKit/chromium/src/WebDatabase.cpp27
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp188
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.h23
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentPrivate.h5
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebEntities.cpp2
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp29
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h5
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp3
-rw-r--r--WebKit/chromium/src/WebHistoryItem.cpp11
-rw-r--r--WebKit/chromium/src/WebNotification.cpp9
-rw-r--r--WebKit/chromium/src/WebPluginListBuilderImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.cpp24
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h11
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp6
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp10
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp272
-rw-r--r--WebKit/chromium/src/WebViewImpl.h29
-rw-r--r--WebKit/chromium/src/js/DebuggerAgent.js2
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js2
-rw-r--r--WebKit/chromium/src/js/DevTools.js71
-rw-r--r--WebKit/chromium/src/js/DevToolsHostStub.js277
-rw-r--r--WebKit/chromium/src/js/HeapProfilerPanel.js2
-rw-r--r--WebKit/chromium/src/js/InjectDispatch.js48
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js39
-rw-r--r--WebKit/chromium/src/js/ProfilerAgent.js19
-rw-r--r--WebKit/chromium/src/js/Tests.js191
76 files changed, 2229 insertions, 889 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 452c79d..2a56d9d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,826 @@
+2010-06-25 Lei Zheng <lzheng@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Add a flag to the ResourceResponse for tracking if a request was fetched
+ when Alternate-Protocol is available.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41001
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::wasAlternateProtocolAvailable):
+ (WebKit::WebURLResponse::setWasAlternateProtocolAvailable):
+
+2010-06-25 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Dumitru Daniliuc.
+
+ Additional API to pass additional info needed for AppCache progress events.
+ https://bugs.webkit.org/show_bug.cgi?id=37602
+
+ Also, delete an obsolete method from the worker API.
+
+ * public/WebApplicationCacheHostClient.h: define a new method
+ * public/WebSharedWorker.h: remove an obsolte method
+ * src/ApplicationCacheHostInternal.h: implement the new method
+ (WebCore::ApplicationCacheHostInternal::notifyProgressEventListener):
+
+2010-06-25 John Gregg <johnnyg@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Notification should expose ltr/rtl as TextDirection, not String
+ https://bugs.webkit.org/show_bug.cgi?id=40871
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::direction):
+
+2010-06-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Clean up and document DocumentWriter::replaceDocument code path
+ https://bugs.webkit.org/show_bug.cgi?id=41182
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::loadJavaScriptURL):
+ - Make Chromium use DocumentWriter like it should.
+
+2010-06-24 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] A WebView can now own a GLES2Context which gets created on
+ demand. This context will typically be created for the gpu compositor
+ and used as a parent context for any elements on the page that use the
+ gpu for rendering (e.g. WebGL) and need to pass their backbuffer directly
+ to the compositor.
+ https://bugs.webkit.org/show_bug.cgi?id=41010
+
+ * public/WebGLES2Context.h:
+ * src/GLES2Context.cpp:
+ (WebCore::GLES2ContextInternal::getWebGLES2Context):
+ (WebCore::GLES2ContextInternal::initialize):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::gles2Context):
+ * src/WebViewImpl.h:
+
+2010-06-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41094
+
+ - Merged InspectorClient implementation into WebDevToolsAgent
+ - Changed the way WebDevToolsAgent is initialized (will break chromium bot, needs coordinated landing)
+ - Removed a lot of legacy code from WebDevToolsAgentImpl
+ - Removed a lot of overrides from DevTools.js
+ - Simplified devtools stubs
+ - Got rid of all logic from within InjectDispatch.js
+
+ * public/WebView.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad):
+ * src/InspectorClientImpl.cpp:
+ (WebKit::InspectorClientImpl::inspectorDestroyed):
+ (WebKit::InspectorClientImpl::openInspectorFrontend):
+ (WebKit::InspectorClientImpl::highlight):
+ (WebKit::InspectorClientImpl::hideHighlight):
+ (WebKit::InspectorClientImpl::populateSetting):
+ (WebKit::InspectorClientImpl::storeSetting):
+ (WebKit::InspectorClientImpl::sendMessageToFrontend):
+ (WebKit::InspectorClientImpl::resourceTrackingWasEnabled):
+ (WebKit::InspectorClientImpl::resourceTrackingWasDisabled):
+ (WebKit::InspectorClientImpl::timelineProfilerWasStarted):
+ (WebKit::InspectorClientImpl::timelineProfilerWasStopped):
+ (WebKit::InspectorClientImpl::devToolsAgent):
+ * src/InspectorClientImpl.h:
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::inspectedURLChanged):
+ * src/ToolsAgent.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+ (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost):
+ (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled):
+ (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient):
+ (WebKit::WebDevToolsAgentImpl::inspectorDestroyed):
+ (WebKit::WebDevToolsAgentImpl::openInspectorFrontend):
+ (WebKit::WebDevToolsAgentImpl::highlight):
+ (WebKit::WebDevToolsAgentImpl::hideHighlight):
+ (WebKit::WebDevToolsAgentImpl::populateSetting):
+ (WebKit::WebDevToolsAgentImpl::storeSetting):
+ (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend):
+ (WebKit::WebDevToolsAgentImpl::resourceTrackingWasEnabled):
+ (WebKit::WebDevToolsAgentImpl::resourceTrackingWasDisabled):
+ (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStarted):
+ (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStopped):
+ * src/WebDevToolsAgentImpl.h:
+ * src/WebDevToolsAgentPrivate.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::create):
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ * src/js/DevTools.js:
+ (devtools.ToolsAgent):
+ ():
+ (devtools):
+ * src/js/DevToolsHostStub.js:
+ (.window.setDebuggerScriptSource):
+ (.window.dispatchOnInjectedScript):
+ * src/js/InjectDispatch.js:
+ (dispatch):
+ * src/js/InspectorControllerImpl.js:
+
+2010-06-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: revert 61766.
+
+ * WebKit.gyp:
+ * public/WebView.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad):
+ * src/InspectorClientImpl.cpp: Added.
+ (WebKit::InspectorClientImpl::InspectorClientImpl):
+ (WebKit::InspectorClientImpl::~InspectorClientImpl):
+ (WebKit::InspectorClientImpl::inspectorDestroyed):
+ (WebKit::InspectorClientImpl::openInspectorFrontend):
+ (WebKit::invalidateNodeBoundingRect):
+ (WebKit::InspectorClientImpl::highlight):
+ (WebKit::InspectorClientImpl::hideHighlight):
+ (WebKit::InspectorClientImpl::populateSetting):
+ (WebKit::InspectorClientImpl::storeSetting):
+ (WebKit::InspectorClientImpl::sendMessageToFrontend):
+ * src/InspectorClientImpl.h: Added.
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::inspectedURLChanged):
+ * src/ToolsAgent.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+ (WebKit::WebDevToolsAgentImpl::didCommitProvisionalLoad):
+ (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost):
+ (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled):
+ (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient):
+ (WebKit::WebDevToolsAgentImpl::jsDispatchToApu):
+ (WebKit::WebDevToolsAgentImpl::jsEvaluateOnSelf):
+ (WebKit::WebDevToolsAgentImpl::jsOnRuntimeFeatureStateChanged):
+ * src/WebDevToolsAgentImpl.h:
+ * src/WebDevToolsAgentPrivate.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::create):
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::setDevToolsAgent):
+ * src/WebViewImpl.h:
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::initializeLoader):
+ * src/js/DevTools.js:
+ (devtools.ToolsAgent):
+ (devtools.ToolsAgent.prototype.frameNavigate_):
+ ():
+ * src/js/DevToolsHostStub.js:
+ (.RemoteDebuggerAgentStub):
+ (.RemoteDebuggerAgentStub.prototype.getContextId):
+ (.RemoteDebuggerAgentStub.prototype.processDebugCommands):
+ (.RemoteProfilerAgentStub):
+ (.RemoteProfilerAgentStub.prototype.getActiveProfilerModules):
+ (.RemoteProfilerAgentStub.prototype.getLogLines):
+ (.RemoteToolsAgentStub):
+ (.RemoteToolsAgentStub.prototype.dispatchOnInjectedScript):
+ (.RemoteToolsAgentStub.prototype.dispatchOnInspectorController):
+ (.ProfilerStubHelper):
+ (.ProfilerStubHelper.GetInstance):
+ (.ProfilerStubHelper.prototype.StopProfiling):
+ (.ProfilerStubHelper.prototype.StartProfiling):
+ (.ProfilerStubHelper.prototype.getActiveProfilerModules):
+ (.ProfilerStubHelper.prototype.getLogLines):
+ (.RemoteDebuggerCommandExecutorStub):
+ (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerCommand):
+ (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerPauseScript):
+ (.RemoteDebuggerCommandExecutorStub.prototype.sendResponse_):
+ (.DevToolsHostStub):
+ (.DevToolsHostStub.prototype.reset):
+ (.DevToolsHostStub.prototype.setting):
+ (.DevToolsHostStub.prototype.setSetting):
+ * src/js/InjectDispatch.js:
+ (ApuAgentDispatcher.dispatchToApu):
+ (dispatch):
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl.prototype.debuggerEnabled):
+ (devtools.InspectorBackendImpl.prototype.profilerEnabled):
+
+2010-06-23 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Inspector cleanup + better DevTools alignment with Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41094
+
+ - Merged InspectorClient implementation into WebDevToolsAgent
+ - Changed the way WebDevToolsAgent is initialized (will break chromium bot, needs coordinated landing)
+ - Removed a lot of legacy code from WebDevToolsAgentImpl
+ - Removed a lot of overrides from DevTools.js
+ - Simplified devtools stubs
+ - Got rid of all logic from within InjectDispatch.js
+
+ * WebKit.gyp:
+ * public/WebDevToolsAgent.h:
+ * public/WebView.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad):
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::inspectedURLChanged):
+ * src/ToolsAgent.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+ (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost):
+ (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled):
+ (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient):
+ (WebKit::WebDevToolsAgentImpl::inspectorDestroyed):
+ (WebKit::WebDevToolsAgentImpl::openInspectorFrontend):
+ (WebKit::WebDevToolsAgentImpl::highlight):
+ (WebKit::WebDevToolsAgentImpl::hideHighlight):
+ (WebKit::WebDevToolsAgentImpl::populateSetting):
+ (WebKit::WebDevToolsAgentImpl::storeSetting):
+ (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend):
+ (WebKit::WebDevToolsAgentImpl::resourceTrackingWasEnabled):
+ (WebKit::WebDevToolsAgentImpl::resourceTrackingWasDisabled):
+ (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStarted):
+ (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStopped):
+ * src/WebDevToolsAgentImpl.h:
+ * src/WebDevToolsAgentPrivate.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::create):
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::initializeLoader):
+ * src/js/DevTools.js:
+ (devtools.ToolsAgent):
+ ():
+ (devtools):
+ * src/js/DevToolsHostStub.js:
+ (.window.setDebuggerScriptSource):
+ (.window.dispatchOnInjectedScript):
+ * src/js/InjectDispatch.js:
+ (dispatch):
+ * src/js/InspectorControllerImpl.js:
+
+2010-06-24 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: implement layout tests for debugger
+ https://bugs.webkit.org/show_bug.cgi?id=40774
+
+ * src/WebDevToolsFrontendImpl.cpp:
+ (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl):
+
+2010-06-23 Tony Chang <tony@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ layout test for a crash in chromium multipart request handling
+ https://bugs.webkit.org/show_bug.cgi?id=41050
+
+ Also roll DEPS to pick up the crash fix.
+
+ * DEPS:
+
+2010-06-23 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Make page format data methods accessible from Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=41056
+
+ * public/WebFrame.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::isPageBoxVisible):
+ (WebKit::WebFrameImpl::pageAreaRectInPixels):
+ (WebKit::WebFrameImpl::preferredPageSizeInPixels):
+ * src/WebFrameImpl.h:
+
+2010-06-22 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Rename HTMLDocumentParser to LegacyHTMLDocumentParser
+ https://bugs.webkit.org/show_bug.cgi?id=41043
+
+ * src/WebEntities.cpp:
+
+2010-06-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: follow up to r61655 to make Chromium tests happy.
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-22 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [Chromium] Clean up after removal of static WebDevToolsAgentClient::sendMessageToFrontendOnIOThread.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40914
+
+ * public/WebDevToolsAgentClient.h:
+
+2010-06-22 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [Chromium] Add a sanity test for heap profiler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40917
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype.testHeapProfiler.findDisplayedNode):
+ (.TestSuite.prototype.testHeapProfiler.findVisibleView):
+ (.TestSuite.prototype.testHeapProfiler):
+
+2010-06-21 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Dragging outside the frame immediately causes page to scroll
+ http://webkit.org/b/40461
+
+ This is regression that was introduced at http://webkit.org/b/39725.
+
+ There are 2 problems:
+ 1. It starts auto-scrolling immediately. We should have some delay.
+ 2. The scroll continues even after a mouse cursor goes outside a frame.
+ The scroll should be stopped when the curosr has left.
+
+ This change introduced DragScrollTimer to handle 1.
+ At the same time, it fixed DragScrollTimer::scrollDistanceFor() to
+ handle 2, We now stop scrolling when the cursor gone.
+
+ * WebKit.gyp:
+ * src/DragScrollTimer.cpp: Added.
+ (WebKit::distanceToRect):
+ (WebKit::DragScrollTimer::DragScrollTimer):
+ (WebKit::DragScrollTimer::~DragScrollTimer):
+ (WebKit::DragScrollTimer::stop):
+ (WebKit::DragScrollTimer::scroll):
+ (WebKit::DragScrollTimer::update):
+ (WebKit::DragScrollTimer::triggerScroll):
+ (WebKit::DragScrollTimer::scrollDistanceFor):
+ * src/DragScrollTimer.h: Added.
+ (WebKit::DragScrollTimer::fired):
+ (WebKit::DragScrollTimer::shouldScroll):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::dragSourceEndedAt):
+ (WebKit::WebViewImpl::dragSourceMovedTo):
+ (WebKit::WebViewImpl::dragTargetDrop):
+ (WebKit::WebViewImpl::dragTargetDragEnterOrOver):
+ * src/WebViewImpl.h:
+
+2010-06-21 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Enable EVENTSOURCE, FILE_WRITER, and IMAGE_RESIZER
+ https://bugs.webkit.org/show_bug.cgi?id=40905
+
+ EVENTSOURCE: It is already enabled in Chromium browser. This fixes
+ some tests with Chromium DRT.
+
+ FILE_WRITER and IMAGE_RESIZER: Enable experimental features in
+ order to test them before enabling them in Chromium browser.
+
+ * features.gypi:
+
+2010-06-21 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
+ https://bugs.webkit.org/show_bug.cgi?id=40878
+
+ * features.gypi:
+
+2010-06-21 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ [Chromium] Remove usage of static WebDevToolsAgentClient::sendMessageToFrontendOnIOThread.
+
+ Also, move WebDevToolsMessageTransport to its own header file.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40913
+
+ * DEPS:
+ * WebKit.gyp:
+ * public/WebDevToolsAgent.h:
+ * public/WebDevToolsAgentClient.h:
+ * public/WebDevToolsMessageTransport.h: Added.
+ (WebKit::WebDevToolsMessageTransport::~WebDevToolsMessageTransport):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+
+2010-06-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: don't add ScriptDebugServer as v8 listener if browser exposes
+ v8 debugging protocol.
+
+ * src/DebuggerAgentManager.cpp:
+ (WebKit::DebuggerAgentManager::setExposeV8DebuggerProtocol):
+
+2010-06-19 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Adding a < operator to WebURLs so they can be used in std::maps.
+ https://bugs.webkit.org/show_bug.cgi?id=40632
+
+ * public/WebCString.h:
+ (WebKit::operator<):
+ * public/WebURL.h:
+ (WebKit::operator<):
+ * src/WebCString.cpp:
+ (WebKit::WebCString::compare):
+
+2010-06-19 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed. Build fix for r61488.
+
+ * features.gypi: Define use_accelerated_compositing.
+
+2010-06-19 Thomas Van Lenten <thomasvl@chromium.org>
+
+ Reviewed by David Levin.
+
+ Warnings from -Wextra in a Chromium Mac build
+ 1. checks of unsigned >= 0
+ 2. enumeral and non-enumeral type in conditional expression
+ 3. copy ctors that don't call the super copy ctor or ctor
+
+ https://bugs.webkit.org/show_bug.cgi?id=40791
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::getSuggestion):
+ (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex):
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionChanged):
+ * src/AutocompletePopupMenuClient.cpp:
+ (WebKit::AutocompletePopupMenuClient::getSuggestion):
+ (WebKit::AutocompletePopupMenuClient::removeSuggestionAtIndex):
+
+2010-06-19 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium]Refactor input method related APIs.
+ https://bugs.webkit.org/show_bug.cgi?id=40608
+
+ * WebKit.gyp:
+ * public/WebCompositionCommand.h:
+ * public/WebCompositionUnderline.h: Added.
+ (WebKit::WebCompositionUnderline::WebCompositionUnderline):
+ * public/WebTextInputType.h: Added.
+ (WebKit::):
+ * public/WebViewClient.h:
+ * public/WebWidget.h:
+ * public/WebWidgetClient.h:
+ (WebKit::WebWidgetClient::resetInputMethod):
+ * src/CompositionUnderlineBuilder.h: Added.
+ (WebKit::CompositionUnderlineBuilder::CompositionUnderlineBuilder):
+ * src/CompositionUnderlineVectorBuilder.cpp: Added.
+ (WebKit::CompositionUnderlineVectorBuilder::CompositionUnderlineVectorBuilder):
+ * src/CompositionUnderlineVectorBuilder.h: Added.
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::setInputMethodState):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::setComposition):
+ (WebKit::WebPopupMenuImpl::confirmComposition):
+ (WebKit::WebPopupMenuImpl::textInputType):
+ (WebKit::WebPopupMenuImpl::caretOrSelectionBounds):
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleCompositionEvent):
+ (WebKit::WebViewImpl::setComposition):
+ (WebKit::WebViewImpl::confirmComposition):
+ (WebKit::WebViewImpl::textInputType):
+ (WebKit::WebViewImpl::caretOrSelectionBounds):
+ * src/WebViewImpl.h:
+
+2010-06-19 Victoria Kirst <vrk@google.com>
+
+ Reviewed by David Levin.
+
+ Modifying the WebMediaPlayer interface to be compatible with
+ a change in chrome.
+ This is a part 2 of 3 one-sided changes to chrome and WebKit. Chrome
+ has been updated, so this commit should NOT break chromium anymore,
+ nor should it cause any test failures.
+ https://bugs.webkit.org/show_bug.cgi?id=39445
+
+ * public/WebMediaPlayer.h: Changed buffered() to be non-const.
+
+2010-06-19 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ fast/canvas/webgl/get-active-test.html failed in Chrome Mac
+ https://bugs.webkit.org/show_bug.cgi?id=40496
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Call makeContextCurrent().
+ (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform):
+ (WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
+
+2010-06-18 Aaron Boodman <aa@chromium.org>
+
+ Remove WebKit::WebDocument::isXHTMLDocument.
+ https://bugs.webkit.org/show_bug.cgi?id=40815
+
+ * public/WebDocument.h: Remove isXHTMLDocument().
+ * src/WebDocument.cpp: Ditto.
+
+2010-06-19 Aaron Boodman <aa@chromium.org>
+
+ Unreviewed, rolling out r61466.
+ http://trac.webkit.org/changeset/61466
+ https://bugs.webkit.org/show_bug.cgi?id=40816
+
+ Landed wrong change
+
+ * src/WebKit.cpp:
+ (WebKit::shutdown):
+
+2010-06-18 Aaron Boodman <aa@chromium.org>
+
+ WebKit API: Undo static hooks into V8 when WebKit is shut downm
+ https://bugs.webkit.org/show_bug.cgi?id=40816
+
+ * src/WebKit.cpp:
+ (WebKit::shutdown): Call new WebCore::V8DOMWindowShell::uninitializeV8IfNeeded().
+
+2010-06-18 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Plumbing for top-level frame names
+ https://bugs.webkit.org/show_bug.cgi?id=40430
+
+ * public/WebFrame.h:
+ Removed obsolete clearName() API and added better documentation for
+ setName().
+ * src/WebFrameImpl.cpp:
+ Removed clearName() API.
+ * src/WebFrameImpl.h:
+ Removed clearName() API.
+
+2010-06-18 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ Roll chromium DEPS 50089:50171
+ https://bugs.webkit.org/show_bug.cgi?id=40842
+
+ * DEPS:
+ Update chromium_rev to r50171 to remove downstream reference to WebFrame::clearName().
+
+2010-06-18 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Implement 'takeHeapSnapshot' in InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40834
+
+ * src/js/HeapProfilerPanel.js:
+ (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+ * src/js/ProfilerAgent.js:
+ (devtools.ProfilerAgent.prototype.startProfiling):
+
+2010-06-18 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Finish migration to new named property query API
+ https://bugs.webkit.org/show_bug.cgi?id=40771
+ Remove definition which allowed gradual transition to new API.
+ See https://bugs.webkit.org/show_bug.cgi?id=40303 for first phase.
+ Requires V8 roll.
+
+ * DEPS:
+
+2010-06-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: bring XHR console records back.
+ - adds "Enable XHR Monitor" / "Disable XHR Monitor" actions to the console's context menu
+ - make the chosen option persist in the settings.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40799
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-15 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+ https://bugs.webkit.org/show_bug.cgi?id=39041
+
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableDatabase):
+ (WebKit::WebRuntimeFeatures::isDatabaseEnabled):
+
+2010-06-17 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] cleanup redundant DEPS value and remove buildbot cleanup code
+ https://bugs.webkit.org/show_bug.cgi?id=40615
+
+ * DEPS: tools/data_pack was listed twice for linux (harmless, but unnecessary)
+
+2010-06-17 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium API] Implement WebSandboxSupport on OS X and add stubs to allow
+ OOP loading of fonts.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40544
+
+ * WebKit.gyp: Add mac WebSandboxSupport.h
+ * public/mac/WebSandboxSupport.h: Added.
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::loadFont):
+
+2010-06-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Unreviewed: chromium tests fix. Added InspectorBackend delegates for new inspector methods.
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+
+2010-06-17 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [Chromium] Prepare to making WebDevToolsAgentClient::sendMessageToFrontendOnIOThread virtual
+
+ https://bugs.webkit.org/show_bug.cgi?id=39302
+
+ * public/WebDevToolsAgent.h:
+ * public/WebDevToolsAgentClient.h:
+ (WebKit::WebDevToolsMessageTransport::~WebDevToolsMessageTransport):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+ (WebKit::WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread):
+
+2010-06-17 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Undo the build fix with the correct patch: Chromium NotificationPresenter
+ is now informed of the destruction before it actually happens, so this
+ use of the Notification object is correct.
+ https://bugs.webkit.org/show_bug.cgi?id=40097
+
+ * src/NotificationPresenterImpl.cpp:
+ (WebKit::NotificationPresenterImpl::notificationObjectDestroyed):
+
+2010-06-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Set current working directory for each of tests
+ https://bugs.webkit.org/show_bug.cgi?id=40668
+
+ * DEPS: Update Chromium to r49915 to have
+ webkit_support::SetCurrentDirectoryForFileURL().
+
+2010-06-16 Drew Wilson <atwilson@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Added plumbing to Chromium WebKit API to allow setting/getting the name
+ of top level frames.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40430
+ * public/WebFrame.h:
+ Added setName() API.
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::createView):
+ Now takes a "name" parameter.
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::createWindow):
+ Passes a name parameter.
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::setName):
+ Allows setting the frame name by calling through to the WebCore API.
+ * src/WebFrameImpl.h:
+
+2010-06-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Move functions out of Frame class that were marked "move to Chrome"
+ https://bugs.webkit.org/show_bug.cgi?id=39636
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::dispatchBeforeUnloadEvent): Call shouldClose
+ on FrameLoader instead of going through Frame.
+
+2010-06-11 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ Expose WebHistoryItem::itemSequenceNumber.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40451
+
+ * public/WebHistoryItem.h:
+ * src/WebHistoryItem.cpp:
+ (WebKit::WebHistoryItem::itemSequenceNumber):
+ (WebKit::WebHistoryItem::setItemSequenceNumber):
+
+2010-06-15 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: make ui tests pass when ScriptDebugServer is used
+ https://bugs.webkit.org/show_bug.cgi?id=40623
+
+ * src/js/DebuggerAgent.js:
+ (devtools.DebuggerAgent.prototype.formatCallFrame_): return empty function name for anonymous functions.
+ * src/js/DebuggerScript.js:
+ * src/js/Tests.js:
+ (.TestSuite.prototype.testProfilerTab.findVisibleView):
+ (.TestSuite.prototype.testProfilerTab):
+ (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed):
+ (.TestSuite.prototype.testSetBreakpoint.this):
+ (.TestSuite.prototype.testSetBreakpoint):
+ (.TestSuite.prototype.testEvalOnCallFrame.waitForBreakpointHit):
+ (.TestSuite.prototype._executeCodeWhenScriptsAreParsed.executeFunctionInInspectedPage):
+ (.TestSuite.prototype.testExpandScope.examineScopes):
+ (.TestSuite.prototype.testExpandScope):
+ (.TestSuite.prototype.testDebugIntrinsicProperties):
+
+2010-06-14 Anders Carlsson <andersca@apple.com>
+
+ Fix Chromium build.
+
+ * src/WebPluginListBuilderImpl.cpp:
+ (WebKit::WebPluginListBuilderImpl::addFileExtensionToLastMediaType):
+
+2010-06-14 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Get DatabaseTracker ready for sync DBs.
+ https://bugs.webkit.org/show_bug.cgi?id=39041
+
+ * public/WebDatabase.h:
+ * src/DatabaseObserver.cpp:
+ (WebCore::DatabaseObserver::databaseOpened):
+ (WebCore::DatabaseObserver::databaseModified):
+ (WebCore::DatabaseObserver::databaseClosed):
+ * src/WebDatabase.cpp:
+ (WebKit::WebDatabase::closeDatabaseImmediately):
+ (WebKit::WebDatabase::WebDatabase):
+ (WebKit::WebDatabase::operator=):
+ (WebKit::WebDatabase::operator WTF::PassRefPtr<AbstractDatabase>):
+
+2010-06-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: need ListItemRole and PresentationalRole
+ https://bugs.webkit.org/show_bug.cgi?id=40133
+
+ * public/WebAccessibilityRole.h:
+ * src/AssertMatchingEnums.cpp:
+
+2010-06-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove pluginIndex from MimeClassInfo
+ https://bugs.webkit.org/show_bug.cgi?id=40588
+
+ * src/WebPluginListBuilderImpl.cpp:
+ (WebKit::WebPluginListBuilderImpl::addMediaTypeToLastPlugin):
+
2010-06-14 Jeremy Orlow <jorlow@chromium.org>
Build fix.
@@ -23,6 +846,15 @@
2010-06-13 Tony Chang <tony@chromium.org>
+ Reviewed by Darin Fisher.
+
+ [chromium] checkout chromium third_party directly
+ https://bugs.webkit.org/show_bug.cgi?id=40556
+
+ * DEPS:
+
+2010-06-13 Tony Chang <tony@chromium.org>
+
Build fix, not reviewed.
fix chromium compile after r61094 (id attribute refactor)
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 973e78d..b6b35a5 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': '49521',
+ 'chromium_rev': '50676',
}
deps = {
@@ -91,70 +91,26 @@ deps = {
Var('chromium_svn')+'/media@'+Var('chromium_rev'),
'third_party/angle': # needed by the gpu process
From('chromium_deps', 'src/third_party/angle'),
- 'third_party/glew': # webgl related
- Var('chromium_svn')+'/third_party/glew@'+Var('chromium_rev'),
'third_party/ffmpeg': # needed by webkit/media
From('chromium_deps', 'src/third_party/ffmpeg'),
'third_party/libvpx/include':
From('chromium_deps', 'src/third_party/libvpx/include'),
'third_party/libvpx/lib':
From('chromium_deps', 'src/third_party/libvpx/lib'),
- 'third_party/mesa':
- Var('chromium_svn')+'/third_party/mesa@'+Var('chromium_rev'),
- 'third_party/yasm': # needed by ffmpeg
- Var('chromium_svn')+'/third_party/yasm@'+Var('chromium_rev'),
- 'third_party/openmax': # needed by webkit/media
- Var('chromium_svn')+'/third_party/openmax@'+Var('chromium_rev'),
'tools/grit':
Var('chromium_svn')+'/tools/grit@'+Var('chromium_rev'),
'tools/generate_stubs':
Var('chromium_svn')+'/tools/generate_stubs@'+Var('chromium_rev'),
# other third party
+ 'third_party':
+ Var('chromium_svn')+'/third_party@'+Var('chromium_rev'),
'third_party/icu':
From('chromium_deps', 'src/third_party/icu'),
-
- 'third_party/bzip2':
- Var('chromium_svn')+'/third_party/bzip2@'+Var('chromium_rev'),
-
- 'third_party/libevent':
- Var('chromium_svn')+'/third_party/libevent@'+Var('chromium_rev'),
-
- 'third_party/libjpeg':
- Var('chromium_svn')+'/third_party/libjpeg@'+Var('chromium_rev'),
-
- 'third_party/libpng':
- Var('chromium_svn')+'/third_party/libpng@'+Var('chromium_rev'),
-
- 'third_party/libxml':
- Var('chromium_svn')+'/third_party/libxml@'+Var('chromium_rev'),
-
- 'third_party/libxslt':
- Var('chromium_svn')+'/third_party/libxslt@'+Var('chromium_rev'),
-
- 'third_party/modp_b64':
- Var('chromium_svn')+'/third_party/modp_b64@'+Var('chromium_rev'),
-
- 'third_party/npapi':
- Var('chromium_svn')+'/third_party/npapi@'+Var('chromium_rev'),
-
'third_party/ppapi':
From('chromium_deps', 'src/third_party/ppapi'),
-
'third_party/ots':
From('chromium_deps', 'src/third_party/ots'),
-
- 'third_party/sqlite':
- Var('chromium_svn')+'/third_party/sqlite@'+Var('chromium_rev'),
-
- 'third_party/tcmalloc':
- Var('chromium_svn')+'/third_party/tcmalloc@'+Var('chromium_rev'),
-
- 'third_party/zlib':
- Var('chromium_svn')+'/third_party/zlib@'+Var('chromium_rev'),
-
- 'third_party/mozilla':
- Var('chromium_svn')+'/third_party/mozilla@'+Var('chromium_rev'),
}
deps_os = {
@@ -169,8 +125,6 @@ deps_os = {
From('chromium_deps', 'src/third_party/lighttpd'),
'third_party/nss':
From('chromium_deps', 'src/third_party/nss'),
- 'third_party/wtl':
- Var('chromium_svn')+'/third_party/wtl@'+Var('chromium_rev'),
},
'mac': {
# needed by ffmpeg
@@ -181,12 +135,8 @@ deps_os = {
},
'unix': {
# Linux, actually.
- 'third_party/harfbuzz':
- 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 83ae631..a53dd28 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -77,6 +77,7 @@
'public/linux/WebRenderTheme.h',
'public/x11/WebScreenInfoFactory.h',
'public/mac/WebInputEventFactory.h',
+ 'public/mac/WebSandboxSupport.h',
'public/mac/WebScreenInfoFactory.h',
'public/WebAccessibilityCache.h',
'public/WebAccessibilityObject.h',
@@ -93,6 +94,7 @@
'public/WebCommon.h',
'public/WebCommonWorkerClient.h',
'public/WebCompositionCommand.h',
+ 'public/WebCompositionUnderline.h',
'public/WebConsoleMessage.h',
'public/WebContextMenuData.h',
'public/WebCookie.h',
@@ -110,6 +112,7 @@
'public/WebDevToolsFrontend.h',
'public/WebDevToolsFrontendClient.h',
'public/WebDevToolsMessageData.h',
+ 'public/WebDevToolsMessageTransport.h',
'public/WebDocument.h',
'public/WebDragData.h',
'public/WebEditingAction.h',
@@ -205,6 +208,7 @@
'public/WebTextAffinity.h',
'public/WebTextCaseSensitivity.h',
'public/WebTextDirection.h',
+ 'public/WebTextInputType.h',
'public/WebThemeEngine.h',
'public/WebURL.h',
'public/WebURLError.h',
@@ -240,6 +244,9 @@
'src/ChromiumBridge.cpp',
'src/ChromiumCurrentTime.cpp',
'src/ChromiumThreading.cpp',
+ 'src/CompositionUnderlineBuilder.h',
+ 'src/CompositionUnderlineVectorBuilder.cpp',
+ 'src/CompositionUnderlineVectorBuilder.h',
'src/ContextMenuClientImpl.cpp',
'src/ContextMenuClientImpl.h',
'src/DatabaseObserver.cpp',
@@ -254,6 +261,8 @@
'src/DOMUtilitiesPrivate.h',
'src/DragClientImpl.cpp',
'src/DragClientImpl.h',
+ 'src/DragScrollTimer.cpp',
+ 'src/DragScrollTimer.h',
'src/EditorClientImpl.cpp',
'src/EditorClientImpl.h',
'src/EventListenerWrapper.cpp',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 9a23949..256192b 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -46,13 +46,15 @@
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=0',
'ENABLE_DOM_STORAGE=1',
+ 'ENABLE_EVENTSOURCE=1',
'ENABLE_FILE_READER=1',
- 'ENABLE_FILE_WRITER=0',
+ 'ENABLE_FILE_WRITER=1',
'ENABLE_FILTERS=1',
'ENABLE_GEOLOCATION=1',
'ENABLE_ICONDATABASE=0',
- 'ENABLE_IMAGE_RESIZER=0',
+ 'ENABLE_IMAGE_RESIZER=1',
'ENABLE_INDEXED_DATABASE=1',
+ 'ENABLE_INPUT_SPEECH=1',
'ENABLE_JAVASCRIPT_DEBUGGER=1',
'ENABLE_JSC_MULTIPLE_THREADS=0',
'ENABLE_METER_TAG=1',
@@ -80,10 +82,12 @@
'WTF_USE_ACCELERATED_COMPOSITING=0',
],
+ 'use_accelerated_compositing%': 0,
'enable_svg%': 1,
},
'feature_defines%': '<(feature_defines)',
+ 'use_accelerated_compositing%': '<(use_accelerated_compositing)',
'enable_svg%': '<(enable_svg)',
},
}
diff --git a/WebKit/chromium/public/WebAccessibilityRole.h b/WebKit/chromium/public/WebAccessibilityRole.h
index ec041e0..b0748a7 100644
--- a/WebKit/chromium/public/WebAccessibilityRole.h
+++ b/WebKit/chromium/public/WebAccessibilityRole.h
@@ -102,6 +102,7 @@ enum WebAccessibilityRole {
WebAccessibilityRoleAnnotation,
WebAccessibilityRoleSliderThumb,
WebAccessibilityRoleIgnored,
+ WebAccessibilityRolePresentational,
WebAccessibilityRoleTab,
WebAccessibilityRoleTabList,
WebAccessibilityRoleTabPanel,
diff --git a/WebKit/chromium/public/WebApplicationCacheHostClient.h b/WebKit/chromium/public/WebApplicationCacheHostClient.h
index 4e830e3..39b7fa2 100644
--- a/WebKit/chromium/public/WebApplicationCacheHostClient.h
+++ b/WebKit/chromium/public/WebApplicationCacheHostClient.h
@@ -39,8 +39,9 @@ namespace WebKit {
// This interface is used by the embedder to call into webkit.
class WebApplicationCacheHostClient {
public:
- // Called to fire the event in the scriptable interface.
+ // Called to fire events in the scriptable interface.
virtual void notifyEventListener(WebApplicationCacheHost::EventID) = 0;
+ virtual void notifyProgressEventListener(const WebURL&, int num_total, int num_complete) = 0;
protected:
// Should not be deleted by the embedder.
diff --git a/WebKit/chromium/public/WebCString.h b/WebKit/chromium/public/WebCString.h
index d24916b..2c1e137 100644
--- a/WebKit/chromium/public/WebCString.h
+++ b/WebKit/chromium/public/WebCString.h
@@ -68,6 +68,11 @@ public:
return *this;
}
+ // Returns 0 if both strings are equals, a value greater than zero if the
+ // first character that does not match has a greater value in this string
+ // than in |other|, or a value less than zero to indicate the opposite.
+ WEBKIT_API int compare(const WebCString& other) const;
+
WEBKIT_API void reset();
WEBKIT_API void assign(const WebCString&);
WEBKIT_API void assign(const char* data, size_t len);
@@ -117,6 +122,11 @@ private:
WebCStringPrivate* m_private;
};
+inline bool operator<(const WebCString& a, const WebCString& b)
+{
+ return a.compare(b) < 0;
+}
+
} // namespace WebKit
#endif
diff --git a/WebKit/chromium/public/WebCompositionCommand.h b/WebKit/chromium/public/WebCompositionCommand.h
index fa89529..bda1eb1 100644
--- a/WebKit/chromium/public/WebCompositionCommand.h
+++ b/WebKit/chromium/public/WebCompositionCommand.h
@@ -33,6 +33,7 @@
namespace WebKit {
+// DEPRECATED.
enum WebCompositionCommand {
WebCompositionCommandDiscard,
WebCompositionCommandSet,
diff --git a/WebKit/chromium/public/WebCompositionUnderline.h b/WebKit/chromium/public/WebCompositionUnderline.h
new file mode 100644
index 0000000..d8b0d63
--- /dev/null
+++ b/WebKit/chromium/public/WebCompositionUnderline.h
@@ -0,0 +1,61 @@
+/*
+ * 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 WebCompositionUnderline_h
+#define WebCompositionUnderline_h
+
+#include "WebColor.h"
+
+namespace WebKit {
+
+// Class WebCompositionUnderline is intended to be used with WebWidget's
+// setComposition() method.
+struct WebCompositionUnderline {
+ WebCompositionUnderline()
+ : startOffset(0)
+ , endOffset(0)
+ , color(0)
+ , thick(false) { }
+
+ WebCompositionUnderline(unsigned s, unsigned e, WebColor c, bool t)
+ : startOffset(s)
+ , endOffset(e)
+ , color(c)
+ , thick(t) { }
+
+ unsigned startOffset;
+ unsigned endOffset;
+ WebColor color;
+ bool thick;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebDatabase.h b/WebKit/chromium/public/WebDatabase.h
index 108201d..4679f68 100644
--- a/WebKit/chromium/public/WebDatabase.h
+++ b/WebKit/chromium/public/WebDatabase.h
@@ -35,7 +35,7 @@
#include "WebSecurityOrigin.h"
#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class Database; }
+namespace WebCore { class AbstractDatabase; }
namespace WTF { template <typename T> class PassRefPtr; }
#endif
@@ -76,9 +76,9 @@ public:
const WebString& originIdentifier, const WebString& databaseName);
#if WEBKIT_IMPLEMENTATION
- WebDatabase(const WTF::PassRefPtr<WebCore::Database>&);
- WebDatabase& operator=(const WTF::PassRefPtr<WebCore::Database>&);
- operator WTF::PassRefPtr<WebCore::Database>() const;
+ WebDatabase(const WTF::PassRefPtr<WebCore::AbstractDatabase>&);
+ WebDatabase& operator=(const WTF::PassRefPtr<WebCore::AbstractDatabase>&);
+ operator WTF::PassRefPtr<WebCore::AbstractDatabase>() const;
#endif
private:
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index e3b5186..d1ad23c 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -35,6 +35,7 @@
namespace WebKit {
class WebDevToolsAgentClient;
+class WebDevToolsMessageTransport;
class WebFrame;
class WebString;
class WebURLRequest;
@@ -73,7 +74,7 @@ public:
// Asynchronously request debugger to pause immediately.
WEBKIT_API static void debuggerPauseScript();
- WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebDevToolsMessageData&);
+ WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(WebDevToolsMessageTransport*, const WebDevToolsMessageData&);
typedef void (*MessageLoopDispatchHandler)();
diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h
index 622f788..91fd3e8 100644
--- a/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -51,8 +51,6 @@ public:
// Notifies host upon runtime feature being enabled/disabled.
virtual void runtimeFeatureStateChanged(const WebString& feature, bool enabled) { }
- WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData&);
-
virtual WebCString injectedScriptSource() { return WebCString(); }
virtual WebCString injectedScriptDispatcherSource() { return WebCString(); }
virtual WebCString debuggerScriptSource() { return WebCString(); }
diff --git a/WebKit/chromium/public/WebDevToolsMessageTransport.h b/WebKit/chromium/public/WebDevToolsMessageTransport.h
new file mode 100644
index 0000000..54c07f1
--- /dev/null
+++ b/WebKit/chromium/public/WebDevToolsMessageTransport.h
@@ -0,0 +1,48 @@
+/*
+ * 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 WebDevToolsMessageTransport_h
+#define WebDevToolsMessageTransport_h
+
+#include "WebCString.h"
+#include "WebCommon.h"
+
+namespace WebKit {
+struct WebDevToolsMessageData;
+
+class WebDevToolsMessageTransport {
+public:
+ virtual ~WebDevToolsMessageTransport() { }
+ virtual void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData&) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 772db75..319ce38 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -102,7 +102,11 @@ public:
// The name of this frame.
virtual WebString name() const = 0;
- virtual void clearName() = 0;
+
+ // Sets the name of this frame. For child frames (frames that are not a
+ // top-most frame) the actual name may have a suffix appended to make the
+ // frame name unique within the hierarchy.
+ virtual void setName(const WebString&) = 0;
// The url of the document loaded in this frame. This is equivalent to
// dataSource()->request().url().
@@ -399,6 +403,17 @@ public:
// Reformats the WebFrame for screen display.
virtual void printEnd() = 0;
+ // CSS3 Paged Media ----------------------------------------------------
+
+ // Returns true if page box (margin boxes and page borders) is visible.
+ virtual bool isPageBoxVisible(int pageIndex) = 0;
+
+ // Returns the page area rectangle in pixels, assuming 96 pixels per inch.
+ virtual WebRect pageAreaRectInPixels(int pageIndex) = 0;
+
+ // Returns the preferred page size in pixels, assuming 96 pixels per inch.
+ virtual WebSize preferredPageSizeInPixels(int pageIndex) = 0;
+
// Find-in-page --------------------------------------------------------
diff --git a/WebKit/chromium/public/WebGLES2Context.h b/WebKit/chromium/public/WebGLES2Context.h
index bd63060..a7e9560 100644
--- a/WebKit/chromium/public/WebGLES2Context.h
+++ b/WebKit/chromium/public/WebGLES2Context.h
@@ -45,7 +45,7 @@ class WebGLES2Context : public WebNonCopyable {
public:
virtual ~WebGLES2Context() {}
- virtual bool initialize(WebView*) = 0;
+ virtual bool initialize(WebView*, WebGLES2Context* parent) = 0;
virtual bool makeCurrent() = 0;
virtual bool destroy() = 0;
virtual bool swapBuffers() = 0;
diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h
index 015f5d7..1b4863e 100644
--- a/WebKit/chromium/public/WebHistoryItem.h
+++ b/WebKit/chromium/public/WebHistoryItem.h
@@ -34,6 +34,9 @@
#include "WebCommon.h"
#include "WebPrivatePtr.h"
+// FIXME: Remove this once Chromium starts using itemSequenceNumber.
+#define WEBKIT_BUG_40451_IS_FIXED
+
namespace WebCore { class HistoryItem; }
namespace WebKit {
@@ -102,6 +105,9 @@ public:
WEBKIT_API WebVector<WebString> documentState() const;
WEBKIT_API void setDocumentState(const WebVector<WebString>&);
+ WEBKIT_API long long itemSequenceNumber() const;
+ WEBKIT_API void setItemSequenceNumber(long long);
+
WEBKIT_API long long documentSequenceNumber() const;
WEBKIT_API void setDocumentSequenceNumber(long long);
diff --git a/WebKit/chromium/public/WebMediaPlayer.h b/WebKit/chromium/public/WebMediaPlayer.h
index 0b658f9..6f51345 100644
--- a/WebKit/chromium/public/WebMediaPlayer.h
+++ b/WebKit/chromium/public/WebMediaPlayer.h
@@ -95,7 +95,7 @@ public:
virtual void setVisible(bool) = 0;
virtual bool setAutoBuffer(bool) = 0;
virtual bool totalBytesKnown() = 0;
- virtual const WebTimeRanges& buffered() const = 0;
+ virtual const WebTimeRanges& buffered() = 0;
virtual float maxTimeSeekable() const = 0;
virtual void setSize(const WebSize&) = 0;
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index ab747e3..787d4f3 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -32,6 +32,7 @@
#define WebNotification_h
#include "WebCommon.h"
+#include "WebTextDirection.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class Notification; }
@@ -75,7 +76,11 @@ public:
WEBKIT_API WebString title() const;
WEBKIT_API WebString body() const;
+ // FIXME: Remove dir() when no longer referenced.
+ // dir() is deprecated; use direction().
WEBKIT_API WebString dir() const;
+ WEBKIT_API WebTextDirection direction() const;
+
WEBKIT_API WebString replaceId() const;
// Called to indicate the notification has been displayed.
diff --git a/WebKit/chromium/public/WebSharedWorker.h b/WebKit/chromium/public/WebSharedWorker.h
index 01c8391..9492a4f 100644
--- a/WebKit/chromium/public/WebSharedWorker.h
+++ b/WebKit/chromium/public/WebSharedWorker.h
@@ -63,15 +63,6 @@ public:
const WebString& sourceCode,
long long scriptResourceAppCacheID) = 0;
- // FIXME(michaeln): Remove this after the roll and adjusting to it.
- virtual void startWorkerContext(const WebURL& scriptURL,
- const WebString& name,
- const WebString& userAgent,
- const WebString& sourceCode)
- {
- startWorkerContext(scriptURL, name, userAgent, sourceCode, 0);
- }
-
class ConnectListener {
public:
// Invoked once the connect event has been sent so the caller can free this object.
diff --git a/WebKit/chromium/public/WebTextInputType.h b/WebKit/chromium/public/WebTextInputType.h
new file mode 100644
index 0000000..2592f6f
--- /dev/null
+++ b/WebKit/chromium/public/WebTextInputType.h
@@ -0,0 +1,53 @@
+/*
+ * 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 WebTextInputType_h
+#define WebTextInputType_h
+
+namespace WebKit {
+
+enum WebTextInputType {
+ // Input caret is not in an editable node, no input method shall be used.
+ WebTextInputTypeNone,
+
+ // Input caret is in a normal editable node, any input method can be used.
+ WebTextInputTypeText,
+
+ // Input caret is in a password box, an input method may be used only if
+ // it's suitable for password input.
+ WebTextInputTypePassword,
+
+ // FIXME: Add more text input types when necessary, eg. Number,
+ // Date, Email, URL, etc.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURL.h b/WebKit/chromium/public/WebURL.h
index 78a16a8..bb90e32 100644
--- a/WebKit/chromium/public/WebURL.h
+++ b/WebKit/chromium/public/WebURL.h
@@ -138,6 +138,11 @@ private:
bool m_isValid;
};
+inline bool operator<(const WebURL& a, const WebURL& b)
+{
+ return a.spec() < b.spec();
+}
+
} // namespace WebKit
#endif
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index 4462394..293d955 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -131,6 +131,11 @@ public:
WEBKIT_API bool wasNpnNegotiated() const;
WEBKIT_API void setWasNpnNegotiated(bool);
+ // Flag whether this request was made when "Alternate-Protocol: xxx"
+ // is present in server's response.
+ WEBKIT_API bool wasAlternateProtocolAvailable() const;
+ WEBKIT_API void setWasAlternateProtocolAvailable(bool);
+
// Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc).
WEBKIT_API bool wasFetchedViaProxy() const;
WEBKIT_API void setWasFetchedViaProxy(bool);
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 9054d8c..eadfc26 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -38,6 +38,7 @@ namespace WebKit {
class WebAccessibilityObject;
class WebDevToolsAgent;
+class WebDevToolsAgentClient;
class WebDragData;
class WebFrame;
class WebFrameClient;
@@ -55,8 +56,8 @@ public:
// Creates a WebView that is NOT yet initialized. You will need to
// call initializeMainFrame to finish the initialization. It is valid
- // to pass a null WebViewClient pointer.
- WEBKIT_API static WebView* create(WebViewClient*);
+ // to pass null WebViewClient and WebDevToolsAgentClient pointers.
+ WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient* = 0);
// After creating a WebView, you should immediately call this method.
// You can optionally modify the settings before calling this method.
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 31ef028..0712815 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -73,7 +73,8 @@ public:
// so any subsequent calls to createSessionStorageNamespace conform to the
// WebStorage specification.
virtual WebView* createView(WebFrame* creator,
- const WebWindowFeatures& features) { return 0; }
+ const WebWindowFeatures& features,
+ const WebString& name) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
// responsible for rendering the contents of the popup menu.
@@ -124,6 +125,8 @@ public:
virtual bool isSmartInsertDeleteEnabled() { return true; }
virtual bool isSelectTrailingWhitespaceEnabled() { return true; }
+
+ // DEPRECATED: replaced by WebWidgetClient::resetInputMethod().
virtual void setInputMethodEnabled(bool enabled) { }
virtual void didBeginEditing() { }
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index b1feee9..3da245b 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -34,6 +34,8 @@
#include "WebCanvas.h"
#include "WebCommon.h"
#include "WebCompositionCommand.h"
+#include "WebCompositionUnderline.h"
+#include "WebTextInputType.h"
#include "WebTextDirection.h"
namespace WebKit {
@@ -42,6 +44,7 @@ class WebInputEvent;
class WebString;
struct WebRect;
struct WebSize;
+template <typename T> class WebVector;
class WebWidget {
public:
@@ -76,17 +79,39 @@ public:
// Called to inform the WebWidget that it has gained or lost keyboard focus.
virtual void setFocus(bool) = 0;
- // Called to inform the WebWidget of a composition event.
+ // DEPRECATED. It's replaced by setComposition() and confirmComposition().
virtual bool handleCompositionEvent(WebCompositionCommand command,
int cursorPosition,
int targetStart,
int targetEnd,
const WebString& text) = 0;
- // Retrieve the status of this WebWidget required by IME APIs. Upon
- // success enabled and caretBounds are set.
+ // Called to inform the WebWidget of a new composition text.
+ // If selectionStart and selectionEnd has the same value, then it indicates
+ // the input caret position. If the text is empty, then the existing
+ // composition text will be cancelled.
+ // Returns true if the composition text was set successfully.
+ virtual bool setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart,
+ int selectionEnd) = 0;
+
+ // Called to inform the WebWidget to confirm an ongoing composition.
+ // Returns true if there is an ongoing composition.
+ virtual bool confirmComposition() = 0;
+
+ // DEPRECATED. It's replaced by textInputType() and
+ // caretOrSelectionBounds().
virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) = 0;
+ // Returns the current text input type of this WebWidget.
+ virtual WebTextInputType textInputType() = 0;
+
+ // Returns the current caret bounds of this WebWidget. The selection bounds
+ // will be returned if a selection range is available.
+ virtual WebRect caretOrSelectionBounds() = 0;
+
// Changes the text direction of the selected input node.
virtual void setTextDirection(WebTextDirection) = 0;
diff --git a/WebKit/chromium/public/WebWidgetClient.h b/WebKit/chromium/public/WebWidgetClient.h
index 06d9eba..bd7bd6a 100644
--- a/WebKit/chromium/public/WebWidgetClient.h
+++ b/WebKit/chromium/public/WebWidgetClient.h
@@ -83,6 +83,10 @@ public:
// displayed.
virtual WebScreenInfo screenInfo() { return WebScreenInfo(); }
+ // When this method gets called, WebWidgetClient implementation should
+ // reset the input method by cancelling any ongoing composition.
+ virtual void resetInputMethod() { }
+
protected:
~WebWidgetClient() { }
};
diff --git a/WebKit/chromium/public/mac/WebSandboxSupport.h b/WebKit/chromium/public/mac/WebSandboxSupport.h
new file mode 100644
index 0000000..57d48aa
--- /dev/null
+++ b/WebKit/chromium/public/mac/WebSandboxSupport.h
@@ -0,0 +1,63 @@
+/*
+ * 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 WebSandboxSupport_h
+#define WebSandboxSupport_h
+
+typedef uintptr_t ATSFontContainerRef;
+
+#ifdef __OBJC__
+@class NSFont;
+#else
+class NSFont;
+#endif
+
+namespace WebKit {
+
+// Put methods here that are required due to sandbox restrictions.
+class WebSandboxSupport {
+public:
+ // Given an input font - |srcFont| [which can't be loaded due to sandbox
+ // restrictions]. Return a font container belonging to an equivalent
+ // font file that can be used to access the font.
+ //
+ // Note that a font container may contain multiple fonts, the caller is
+ // responsible for retreiving the appropriate font from the container.
+ //
+ // If this function succeeds, the caller assumes ownership of the |out|
+ // parameter and must call ATSFontDeactivate() to unload it when done.
+ //
+ // Returns: true on success, false on error.
+ virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h
index bf6c4ae..edaaca9 100644
--- a/WebKit/chromium/src/ApplicationCacheHostInternal.h
+++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h
@@ -39,6 +39,7 @@
#include "WebFrameImpl.h"
#include "WebKit.h"
#include "WebKitClient.h"
+#include "WebURL.h"
namespace WebCore {
@@ -57,6 +58,17 @@ public:
m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID));
}
+ virtual void notifyProgressEventListener(const WebKit::WebURL&, int num_total, int num_complete)
+ {
+ // FIXME: Modify webcore's progress event handling to carry the extra info and alter the
+ // layout tests to not fail when the more recently specified 'final' event is raised.
+ // For now, we're eating the extra info and that last event.
+ // See https://bugs.webkit.org/show_bug.cgi?id=37602
+ if (num_complete == num_total)
+ return;
+ notifyEventListener(WebKit::WebApplicationCacheHost::ProgressEvent);
+ }
+
static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost)
{
if (innerHost && innerHost->m_internal.get())
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index fa7d73a..819339d 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -127,6 +127,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListDefinition, Defin
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleAnnotation, AnnotationRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSliderThumb, SliderThumbRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleIgnored, IgnoredRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRolePresentational, PresentationalRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTab, TabRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabList, TabListRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabPanel, TabPanelRole);
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 8084aad..04c02f2 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -56,7 +56,7 @@ WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const
--listIndex;
// FIXME: Modify the PopupMenu to add the label in gray right-justified.
- ASSERT(listIndex >= 0 && listIndex < m_names.size());
+ ASSERT(listIndex < m_names.size());
WebString suggestion = m_names[listIndex];
if (m_labels[listIndex].isEmpty())
@@ -68,7 +68,7 @@ WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const
void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
{
// FIXME: Do we want to remove AutoFill suggestions?
- ASSERT(listIndex >= 0 && listIndex < m_names.size());
+ ASSERT(listIndex < m_names.size());
m_names.remove(listIndex);
m_labels.remove(listIndex);
}
@@ -82,7 +82,7 @@ void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
--listIndex;
- ASSERT(listIndex >= 0 && listIndex < m_names.size());
+ ASSERT(listIndex < m_names.size());
webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
m_names[listIndex],
@@ -99,7 +99,7 @@ void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEven
if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
--listIndex;
- ASSERT(listIndex >= 0 && listIndex < m_names.size());
+ ASSERT(listIndex < m_names.size());
webView->client()->didSelectAutoFillSuggestion(WebNode(getTextField()),
m_names[listIndex],
diff --git a/WebKit/chromium/src/AutocompletePopupMenuClient.cpp b/WebKit/chromium/src/AutocompletePopupMenuClient.cpp
index 9620ffc..ed4f670 100644
--- a/WebKit/chromium/src/AutocompletePopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutocompletePopupMenuClient.cpp
@@ -46,13 +46,13 @@ unsigned AutocompletePopupMenuClient::getSuggestionsCount() const
WebString AutocompletePopupMenuClient::getSuggestion(unsigned listIndex) const
{
- ASSERT(listIndex >= 0 && listIndex < m_suggestions.size());
+ ASSERT(listIndex < m_suggestions.size());
return m_suggestions[listIndex];
}
void AutocompletePopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
{
- ASSERT(listIndex >= 0 && listIndex < m_suggestions.size());
+ ASSERT(listIndex < m_suggestions.size());
m_suggestions.remove(listIndex);
}
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 559a62b..54c81aa 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -231,7 +231,7 @@ Page* ChromeClientImpl::createWindow(
return 0;
WebViewImpl* newView = static_cast<WebViewImpl*>(
- m_webView->client()->createView(WebFrameImpl::fromFrame(frame), features));
+ m_webView->client()->createView(WebFrameImpl::fromFrame(frame), features, r.frameName()));
if (!newView)
return 0;
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 3b8e5fa..4963f78 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -49,6 +49,7 @@
#include "WebMimeRegistry.h"
#include "WebPluginContainerImpl.h"
#include "WebPluginListBuilderImpl.h"
+#include "WebSandboxSupport.h"
#include "WebScreenInfo.h"
#include "WebString.h"
#include "WebURL.h"
@@ -59,12 +60,10 @@
#if OS(WINDOWS)
#include "WebRect.h"
-#include "WebSandboxSupport.h"
#include "WebThemeEngine.h"
#endif
#if OS(LINUX)
-#include "WebSandboxSupport.h"
#include "WebFontInfo.h"
#include "WebFontRenderStyle.h"
#endif
@@ -404,6 +403,22 @@ void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle,
}
#endif
+#if OS(DARWIN)
+bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
+{
+ WebSandboxSupport* ss = webKitClient()->sandboxSupport();
+ if (ss)
+ return ss->loadFont(srcFont, out);
+
+ // This function should only be called in response to an error loading a
+ // font due to being blocked by the sandbox.
+ // This by definition shouldn't happen if there is no sandbox support.
+ ASSERT_NOT_REACHED();
+ *out = 0;
+ return false;
+}
+#endif
+
// Geolocation ----------------------------------------------------------------
GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium)
diff --git a/WebKit/chromium/src/CompositionUnderlineBuilder.h b/WebKit/chromium/src/CompositionUnderlineBuilder.h
new file mode 100644
index 0000000..ce62474
--- /dev/null
+++ b/WebKit/chromium/src/CompositionUnderlineBuilder.h
@@ -0,0 +1,53 @@
+/*
+ * 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 CompositionUnderlineBuilder_h
+#define CompositionUnderlineBuilder_h
+
+#include "Editor.h"
+#include "Vector.h"
+#include "WebCompositionUnderline.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+// This class is used for converting from WebCompositionUnderline to
+// WebCore::CompositionUnderline.
+
+class CompositionUnderlineBuilder : public WebCore::CompositionUnderline {
+public:
+ CompositionUnderlineBuilder(const WebCompositionUnderline& u)
+ : WebCore::CompositionUnderline(u.startOffset, u.endOffset,
+ WebCore::Color(u.color), u.thick) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp
new file mode 100644
index 0000000..55dca85
--- /dev/null
+++ b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CompositionUnderlineVectorBuilder.h"
+
+#include "CompositionUnderlineBuilder.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+CompositionUnderlineVectorBuilder::CompositionUnderlineVectorBuilder(
+ const WebVector<WebCompositionUnderline>& underlines)
+{
+ size_t size = underlines.size();
+ reserveCapacity(size);
+ for (size_t i = 0; i < size; ++i)
+ append(CompositionUnderlineBuilder(underlines[i]));
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h
new file mode 100644
index 0000000..8050f02
--- /dev/null
+++ b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h
@@ -0,0 +1,53 @@
+/*
+ * 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 CompositionUnderlineVectorBuilder_h
+#define CompositionUnderlineVectorBuilder_h
+
+#include "Editor.h"
+#include "Vector.h"
+#include "WebCompositionUnderline.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+// This classes are used for converting from std::vector<WebCompositionUnderline>
+// to Vector<WebCore::CompositionUnderline>.
+
+class CompositionUnderlineVectorBuilder :
+ public Vector<WebCore::CompositionUnderline> {
+public:
+ CompositionUnderlineVectorBuilder(
+ const WebVector<WebCompositionUnderline>&);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/DatabaseObserver.cpp b/WebKit/chromium/src/DatabaseObserver.cpp
index be658fe..e1b7cbe 100644
--- a/WebKit/chromium/src/DatabaseObserver.cpp
+++ b/WebKit/chromium/src/DatabaseObserver.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "DatabaseObserver.h"
-#include "Database.h"
+#include "AbstractDatabase.h"
#include "Document.h"
#include "ScriptExecutionContext.h"
#include "WebDatabase.h"
@@ -65,19 +65,19 @@ bool DatabaseObserver::canEstablishDatabase(ScriptExecutionContext* scriptExecut
return true;
}
-void DatabaseObserver::databaseOpened(Database* database)
+void DatabaseObserver::databaseOpened(AbstractDatabase* database)
{
ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseOpened(WebDatabase(database));
}
-void DatabaseObserver::databaseModified(Database* database)
+void DatabaseObserver::databaseModified(AbstractDatabase* database)
{
ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseModified(WebDatabase(database));
}
-void DatabaseObserver::databaseClosed(Database* database)
+void DatabaseObserver::databaseClosed(AbstractDatabase* database)
{
ASSERT(database->scriptExecutionContext()->isContextThread());
WebDatabase::observer()->databaseClosed(WebDatabase(database));
diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp
index a30675d..939f4ed 100644
--- a/WebKit/chromium/src/DebuggerAgentManager.cpp
+++ b/WebKit/chromium/src/DebuggerAgentManager.cpp
@@ -265,9 +265,9 @@ void DebuggerAgentManager::setMessageLoopDispatchHandler(WebDevToolsAgent::Messa
void DebuggerAgentManager::setExposeV8DebuggerProtocol(bool value)
{
s_exposeV8DebuggerProtocol = value;
+ WebCore::ScriptDebugServer::shared().setEnabled(!s_exposeV8DebuggerProtocol);
}
-
void DebuggerAgentManager::setHostId(WebFrameImpl* webframe, int hostId)
{
ASSERT(hostId > 0);
diff --git a/WebKit/chromium/src/DragScrollTimer.cpp b/WebKit/chromium/src/DragScrollTimer.cpp
new file mode 100644
index 0000000..83b81b7
--- /dev/null
+++ b/WebKit/chromium/src/DragScrollTimer.cpp
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DragScrollTimer.h"
+
+#include "FrameView.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// Computes the distance from a point outside a rect to the nearest edge of the rect.
+static IntSize distanceToRect(const IntPoint& point, const IntRect& rect)
+{
+ int dx = 0, dy = 0;
+ if (point.x() < rect.x())
+ dx = point.x() - rect.x();
+ else if (rect.right() < point.x())
+ dx = point.x() - rect.right();
+ if (point.y() < rect.y())
+ dy = point.y() - rect.y();
+ else if (rect.bottom() < point.y())
+ dy = point.y() - rect.bottom();
+ return IntSize(dx, dy);
+}
+
+DragScrollTimer::DragScrollTimer()
+ : m_timer(this, &DragScrollTimer::fired)
+ , m_view(0)
+ , m_scrolling(false)
+{
+}
+
+DragScrollTimer::~DragScrollTimer()
+{
+ // We do this for detecting dead object earlier
+ stop();
+}
+
+void DragScrollTimer::stop()
+{
+ m_timer.stop();
+ m_view = 0;
+ m_scrolling = false;
+}
+
+void DragScrollTimer::scroll()
+{
+ m_view->scrollBy(m_lastDistance);
+ m_scrolling = true;
+}
+
+void DragScrollTimer::update()
+{
+ if (shouldScroll())
+ scroll();
+ else
+ stop();
+}
+
+void DragScrollTimer::triggerScroll(FrameView* view, const WebPoint& location)
+{
+ if (!view)
+ return;
+
+ // Approximates Safari
+ static const double scrollStartDelay = 0.2;
+
+ m_view = view;
+ m_lastDistance = scrollDistanceFor(view, location);
+
+ if (m_scrolling)
+ update();
+ else if (shouldScroll() && !m_timer.isActive())
+ m_timer.startOneShot(scrollStartDelay);
+}
+
+IntSize DragScrollTimer::scrollDistanceFor(FrameView* view, const WebPoint& location) const
+{
+ static const int scrollMargin = 30;
+
+ IntRect bounds(0, 0, view->visibleWidth(), view->visibleHeight());
+ if (!bounds.contains(location))
+ return IntSize(0, 0); // The location is outside the border belt.
+
+ bounds.setY(bounds.y() + scrollMargin);
+ bounds.setHeight(bounds.height() - scrollMargin * 2);
+ bounds.setX(bounds.x() + scrollMargin);
+ bounds.setWidth(bounds.width() - scrollMargin * 2);
+
+ if (bounds.contains(location))
+ return IntSize(0, 0); // The location is inside the border belt.
+
+ // The location is over the border belt.
+ return distanceToRect(location, bounds);
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/DragScrollTimer.h b/WebKit/chromium/src/DragScrollTimer.h
new file mode 100644
index 0000000..a4090e0
--- /dev/null
+++ b/WebKit/chromium/src/DragScrollTimer.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DragScrollTimer_h
+#define DragScrollTimer_h
+
+#include "IntSize.h"
+#include "Timer.h"
+#include "WebPoint.h"
+
+namespace WebCore { class FrameView; }
+
+namespace WebKit {
+
+//
+// Encapsulating a timer and associated state management for
+// scroll-on-drag behaviour.
+//
+class DragScrollTimer {
+public:
+ DragScrollTimer();
+ ~DragScrollTimer();
+
+ void fired(WebCore::Timer<DragScrollTimer>*) { update(); }
+ void triggerScroll(WebCore::FrameView*, const WebPoint&);
+ void stop();
+
+private:
+ void scroll();
+ void update();
+ WebCore::IntSize scrollDistanceFor(WebCore::FrameView*, const WebPoint&) const;
+ bool shouldScroll() const { return !m_lastDistance.isZero(); }
+
+ WebCore::Timer<DragScrollTimer> m_timer;
+ WebCore::FrameView* m_view;
+ WebCore::IntSize m_lastDistance;
+ bool m_scrolling;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index 4eda1f6..2a40d78 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -921,8 +921,13 @@ void EditorClientImpl::getGuessesForWord(const String&,
void EditorClientImpl::setInputMethodState(bool enabled)
{
- if (m_webView->client())
+ if (m_webView->client()) {
+ m_webView->client()->resetInputMethod();
+
+ // Remove this line when WebViewClient::setInputMethodEnabled() gets
+ // removed.
m_webView->client()->setInputMethodEnabled(enabled);
+ }
}
} // namesace WebKit
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 694d7c2..dae9348 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -735,9 +735,6 @@ void FrameLoaderClientImpl::dispatchDidCommitLoad()
if (m_webFrame->client())
m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, isNewNavigation);
-
- if (webview->devToolsAgentPrivate())
- webview->devToolsAgentPrivate()->didCommitProvisionalLoad(m_webFrame, isNewNavigation);
}
void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad(
diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp
index 9dd4eff..b6d619c 100644
--- a/WebKit/chromium/src/GLES2Context.cpp
+++ b/WebKit/chromium/src/GLES2Context.cpp
@@ -47,6 +47,8 @@
// WebGLES2Context. This is done so we have a place to inject an
// implementation which creates the GL ES context.
+using namespace WebKit;
+
namespace WebCore {
class GLES2ContextInternal {
@@ -56,23 +58,20 @@ public:
bool initialize(Page*);
- WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl.get(); }
+ WebGLES2Context* getWebGLES2Context() { return m_impl; }
private:
- OwnPtr<WebKit::WebGLES2Context> m_impl;
+ WebGLES2Context* m_impl;
};
bool GLES2ContextInternal::initialize(Page* page)
{
- m_impl = WebKit::webKitClient()->createGLES2Context();
+ ASSERT(page);
+ WebViewImpl* webView = WebViewImpl::fromPage(page);
+ m_impl = webView->gles2Context();
if (!m_impl)
return false;
- WebKit::WebViewImpl* webView = WebKit::WebViewImpl::fromPage(page);
- if (!m_impl->initialize(webView)) {
- m_impl.clear();
- return false;
- }
return true;
}
@@ -94,7 +93,7 @@ GLES2Context::~GLES2Context()
bool GLES2Context::makeCurrent()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->makeCurrent();
@@ -102,7 +101,7 @@ bool GLES2Context::makeCurrent()
bool GLES2Context::destroy()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->destroy();
@@ -110,7 +109,7 @@ bool GLES2Context::destroy()
bool GLES2Context::swapBuffers()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->swapBuffers();
diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp
index 91d10d5..cf491f7 100644
--- a/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -60,64 +60,74 @@ InspectorClientImpl::~InspectorClientImpl()
void InspectorClientImpl::inspectorDestroyed()
{
- // Our lifetime is bound to the WebViewImpl.
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->inspectorDestroyed();
}
-void InspectorClientImpl::openInspectorFrontend(InspectorController*)
+void InspectorClientImpl::openInspectorFrontend(InspectorController* controller)
{
-}
-
-static void invalidateNodeBoundingRect(WebViewImpl* webView)
-{
- // FIXME: Is it important to just invalidate the rect of the node region
- // given that this is not on a critical codepath? In order to do so, we'd
- // have to take scrolling into account.
- const WebSize& size = webView->size();
- WebRect damagedRect(0, 0, size.width, size.height);
- if (webView->client())
- webView->client()->didInvalidateRect(damagedRect);
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->openInspectorFrontend(controller);
}
void InspectorClientImpl::highlight(Node* node)
{
- // InspectorController does the actually tracking of the highlighted node
- // and the drawing of the highlight. Here we just make sure to invalidate
- // the rects of the old and new nodes.
- hideHighlight();
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->highlight(node);
}
void InspectorClientImpl::hideHighlight()
{
- // FIXME: able to invalidate a smaller rect.
- invalidateNodeBoundingRect(m_inspectedWebView);
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->hideHighlight();
}
void InspectorClientImpl::populateSetting(const String& key, String* value)
{
- WebString string;
- m_inspectedWebView->inspectorSetting(key, &string);
- *value = string;
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->populateSetting(key, value);
}
void InspectorClientImpl::storeSetting(const String& key, const String& value)
{
- m_inspectedWebView->setInspectorSetting(key, value);
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->storeSetting(key, value);
}
bool InspectorClientImpl::sendMessageToFrontend(const WebCore::String& message)
{
- WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
- if (!devToolsAgent)
- return false;
-
- WebVector<WebString> arguments(size_t(1));
- arguments[0] = message;
- WebDevToolsMessageData data;
- data.className = "ToolsAgentDelegate";
- data.methodName = "dispatchOnClient";
- data.arguments.swap(arguments);
- devToolsAgent->sendRpcMessage(data);
- return true;
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ return agent->sendMessageToFrontend(message);
+ return false;
+}
+
+void InspectorClientImpl::resourceTrackingWasEnabled()
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->resourceTrackingWasEnabled();
+}
+
+void InspectorClientImpl::resourceTrackingWasDisabled()
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->resourceTrackingWasDisabled();
+}
+
+void InspectorClientImpl::timelineProfilerWasStarted()
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->timelineProfilerWasStarted();
+}
+
+void InspectorClientImpl::timelineProfilerWasStopped()
+{
+ if (WebDevToolsAgentImpl* agent = devToolsAgent())
+ agent->timelineProfilerWasStopped();
+}
+
+WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
+{
+ return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent());
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/InspectorClientImpl.h b/WebKit/chromium/src/InspectorClientImpl.h
index f4994e3..0605ccd 100644
--- a/WebKit/chromium/src/InspectorClientImpl.h
+++ b/WebKit/chromium/src/InspectorClientImpl.h
@@ -38,6 +38,7 @@
namespace WebKit {
class WebDevToolsAgentClient;
+class WebDevToolsAgentImpl;
class WebViewImpl;
class InspectorClientImpl : public WebCore::InspectorClient {
@@ -56,7 +57,13 @@ public:
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
virtual bool sendMessageToFrontend(const WebCore::String&);
+
+ virtual void resourceTrackingWasEnabled();
+ virtual void resourceTrackingWasDisabled();
+ virtual void timelineProfilerWasStarted();
+ virtual void timelineProfilerWasStopped();
private:
+ WebDevToolsAgentImpl* devToolsAgent();
// The WebViewImpl of the page being inspected; gets passed to the constructor
WebViewImpl* m_inspectedWebView;
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 6f7ed95..83b925a 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "InspectorFrontendClientImpl.h"
+#include "Document.h"
+#include "Frame.h"
#include "InspectorFrontendHost.h"
#include "Page.h"
#include "PlatformString.h"
@@ -120,9 +122,9 @@ void InspectorFrontendClientImpl::changeAttachedWindowHeight(unsigned)
// Do nothing;
}
-void InspectorFrontendClientImpl::inspectedURLChanged(const String&)
+void InspectorFrontendClientImpl::inspectedURLChanged(const String& url)
{
- // Do nothing;
+ m_frontendPage->mainFrame()->document()->setTitle("Developer Tools - " + url);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp
index c928c91..dca1856 100644
--- a/WebKit/chromium/src/NotificationPresenterImpl.cpp
+++ b/WebKit/chromium/src/NotificationPresenterImpl.cpp
@@ -88,10 +88,7 @@ void NotificationPresenterImpl::cancel(Notification* notification)
void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notification)
{
- // TODO(pkasting): We cannot ref an object that's being destroyed. Either
- // this function needs to be called earlier than in ~Notification(), or it
- // needs to not ref this object.
- //m_presenter->objectDestroyed(PassRefPtr<Notification>(notification));
+ m_presenter->objectDestroyed(PassRefPtr<Notification>(notification));
}
NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& sourceURL)
diff --git a/WebKit/chromium/src/ToolsAgent.h b/WebKit/chromium/src/ToolsAgent.h
index ab48153..c748c8a 100644
--- a/WebKit/chromium/src/ToolsAgent.h
+++ b/WebKit/chromium/src/ToolsAgent.h
@@ -50,9 +50,6 @@ namespace WebKit {
DEFINE_RPC_CLASS(ToolsAgent, TOOLS_AGENT_STRUCT)
#define TOOLS_AGENT_DELEGATE_STRUCT(METHOD0, METHOD1, METHOD2, METHOD3, METHOD4, METHOD5) \
- /* Updates focused node on the client. */ \
- METHOD1(frameNavigate, String /* url */) \
- \
/* Response to the DispatchOn*. */ \
METHOD3(didDispatchOn, int /* call_id */, String /* result */, String /* exception */) \
\
diff --git a/WebKit/chromium/src/WebCString.cpp b/WebKit/chromium/src/WebCString.cpp
index b484b19..f81d7f4 100644
--- a/WebKit/chromium/src/WebCString.cpp
+++ b/WebKit/chromium/src/WebCString.cpp
@@ -41,6 +41,18 @@ namespace WebKit {
class WebCStringPrivate : public WTF::CStringBuffer {
};
+int WebCString::compare(const WebCString& other) const
+{
+ // A null string is always less than a non null one.
+ if (isNull() != other.isNull())
+ return isNull() ? -1 : 1;
+
+ if (isNull())
+ return 0; // Both WebStrings are null.
+
+ return strcmp(m_private->data(), other.m_private->data());
+}
+
void WebCString::reset()
{
if (m_private) {
diff --git a/WebKit/chromium/src/WebDatabase.cpp b/WebKit/chromium/src/WebDatabase.cpp
index 1479eb0..376509d 100644
--- a/WebKit/chromium/src/WebDatabase.cpp
+++ b/WebKit/chromium/src/WebDatabase.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebDatabase.h"
-#include "Database.h"
+#include "AbstractDatabase.h"
#include "DatabaseTask.h"
#include "DatabaseThread.h"
#include "DatabaseTracker.h"
@@ -50,7 +50,7 @@ namespace WebKit {
static WebDatabaseObserver* databaseObserver = 0;
-class WebDatabasePrivate : public Database {
+class WebDatabasePrivate : public AbstractDatabase {
};
void WebDatabase::reset()
@@ -110,34 +110,27 @@ void WebDatabase::updateDatabaseSize(
void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, const WebString& databaseName)
{
- HashSet<RefPtr<Database> > databaseHandles;
- PassRefPtr<SecurityOrigin> originPrp(WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier));
- RefPtr<SecurityOrigin> origin = originPrp;
+ HashSet<RefPtr<AbstractDatabase> > databaseHandles;
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
DatabaseTracker::tracker().getOpenDatabases(origin.get(), databaseName, &databaseHandles);
- for (HashSet<RefPtr<Database> >::iterator it = databaseHandles.begin(); it != databaseHandles.end(); ++it) {
- Database* database = it->get();
- DatabaseThread* databaseThread = database->scriptExecutionContext()->databaseThread();
- if (databaseThread && !databaseThread->terminationRequested()) {
- database->stop();
- databaseThread->scheduleTask(DatabaseCloseTask::create(database, Database::RemoveDatabaseFromContext, 0));
- }
- }
+ for (HashSet<RefPtr<AbstractDatabase> >::iterator it = databaseHandles.begin(); it != databaseHandles.end(); ++it)
+ it->get()->closeImmediately();
}
-WebDatabase::WebDatabase(const WTF::PassRefPtr<Database>& database)
+WebDatabase::WebDatabase(const WTF::PassRefPtr<AbstractDatabase>& database)
: m_private(static_cast<WebDatabasePrivate*>(database.releaseRef()))
{
}
-WebDatabase& WebDatabase::operator=(const WTF::PassRefPtr<Database>& database)
+WebDatabase& WebDatabase::operator=(const WTF::PassRefPtr<AbstractDatabase>& database)
{
assign(static_cast<WebDatabasePrivate*>(database.releaseRef()));
return *this;
}
-WebDatabase::operator WTF::PassRefPtr<Database>() const
+WebDatabase::operator WTF::PassRefPtr<AbstractDatabase>() const
{
- return PassRefPtr<Database>(const_cast<WebDatabasePrivate*>(m_private));
+ return PassRefPtr<AbstractDatabase>(const_cast<WebDatabasePrivate*>(m_private));
}
void WebDatabase::assign(WebDatabasePrivate* d)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index c4bbbfa..c0e9b44 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -60,12 +60,15 @@
#include "WebDataSource.h"
#include "WebDevToolsAgentClient.h"
#include "WebDevToolsMessageData.h"
+#include "WebDevToolsMessageTransport.h"
#include "WebFrameImpl.h"
+#include "WebRect.h"
#include "WebString.h"
#include "WebURL.h"
#include "WebURLError.h"
#include "WebURLRequest.h"
#include "WebURLResponse.h"
+#include "WebViewClient.h"
#include "WebViewImpl.h"
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
@@ -103,32 +106,23 @@ void InspectorBackendWeakReferenceCallback(v8::Persistent<v8::Value> object, voi
object.Dispose();
}
-void SetApuAgentEnabledInUtilityContext(v8::Handle<v8::Context> context, bool enabled)
-{
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(context);
- v8::Handle<v8::Object> dispatcher = v8::Local<v8::Object>::Cast(
- context->Global()->Get(v8::String::New("ApuAgentDispatcher")));
- if (dispatcher.IsEmpty())
- return;
- dispatcher->Set(v8::String::New("enabled"), v8::Boolean::New(enabled));
-}
-
-// TODO(pfeldman): Make this public in WebDevToolsAgent API.
-static const char kApuAgentFeatureName[] = "apu-agent";
-
-// Keep these in sync with the ones in inject_dispatch.js.
-static const char kTimelineFeatureName[] = "timeline-profiler";
static const char kResourceTrackingFeatureName[] = "resource-tracking";
+static const char kTimelineFeatureName[] = "timeline-profiler";
+static const char kApuAgentFeatureName[] = "apu-agent";
class IORPCDelegate : public DevToolsRPC::Delegate, public Noncopyable {
public:
- IORPCDelegate() { }
+ IORPCDelegate() : m_transport(0) { }
+ explicit IORPCDelegate(WebDevToolsMessageTransport* transport) : m_transport(transport) { }
virtual ~IORPCDelegate() { }
virtual void sendRpcMessage(const WebDevToolsMessageData& data)
{
- WebDevToolsAgentClient::sendMessageToFrontendOnIOThread(data);
+ if (m_transport)
+ m_transport->sendMessageToFrontendOnIOThread(data);
}
+
+private:
+ WebDevToolsMessageTransport* m_transport;
};
class ClientMessageLoopAdapter : public WebCore::ScriptDebugServer::ClientMessageLoop {
@@ -306,21 +300,6 @@ void WebDevToolsAgentImpl::didNavigate()
DebuggerAgentManager::onNavigate();
}
-void WebDevToolsAgentImpl::didCommitProvisionalLoad(WebFrameImpl* webframe, bool isNewNavigation)
-{
- if (!m_attached)
- return;
- WebDataSource* ds = webframe->dataSource();
- const WebURLRequest& request = ds->request();
- WebURL url = ds->hasUnreachableURL() ?
- ds->unreachableURL() :
- request.url();
- if (!webframe->parent()) {
- m_toolsAgentDelegateStub->frameNavigate(WebCore::KURL(url).string());
- SetApuAgentEnabledInUtilityContext(m_utilityContext, m_apuAgentEnabled);
- }
-}
-
void WebDevToolsAgentImpl::didClearWindowObject(WebFrameImpl* webframe)
{
DebuggerAgentManager::setHostId(webframe, m_hostId);
@@ -412,15 +391,6 @@ void WebDevToolsAgentImpl::initDevToolsAgentHost()
devtoolsAgentHost.addProtoFunction(
"dispatch",
WebDevToolsAgentImpl::jsDispatchOnClient);
- devtoolsAgentHost.addProtoFunction(
- "dispatchToApu",
- WebDevToolsAgentImpl::jsDispatchToApu);
- devtoolsAgentHost.addProtoFunction(
- "evaluateOnSelf",
- WebDevToolsAgentImpl::jsEvaluateOnSelf);
- devtoolsAgentHost.addProtoFunction(
- "runtimeFeatureStateChanged",
- WebDevToolsAgentImpl::jsOnRuntimeFeatureStateChanged);
devtoolsAgentHost.build();
v8::HandleScope scope;
@@ -481,7 +451,6 @@ void WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController()
void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled)
{
m_apuAgentEnabled = enabled;
- SetApuAgentEnabledInUtilityContext(m_utilityContext, enabled);
InspectorController* ic = m_webViewImpl->page()->inspectorController();
if (enabled) {
m_resourceTrackingWasEnabled = ic->resourceTrackingEnabled();
@@ -510,55 +479,25 @@ v8::Handle<v8::Value> WebDevToolsAgentImpl::jsDispatchOnClient(const v8::Argumen
String message = WebCore::toWebCoreStringWithNullCheck(args[0]);
if (message.isEmpty() || exceptionCatcher.HasCaught())
return v8::Undefined();
+
WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(v8::External::Cast(*args.Data())->Value());
- agent->m_toolsAgentDelegateStub->dispatchOnClient(message);
- return v8::Undefined();
-}
-// static
-v8::Handle<v8::Value> WebDevToolsAgentImpl::jsDispatchToApu(const v8::Arguments& args)
-{
- v8::TryCatch exceptionCatcher;
- String message = WebCore::toWebCoreStringWithNullCheck(args[0]);
- if (message.isEmpty() || exceptionCatcher.HasCaught())
+ if (!agent->m_apuAgentEnabled) {
+ agent->m_toolsAgentDelegateStub->dispatchOnClient(message);
return v8::Undefined();
- WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(
- v8::External::Cast(*args.Data())->Value());
- agent->m_apuAgentDelegateStub->dispatchToApu(message);
- return v8::Undefined();
-}
-
-// static
-v8::Handle<v8::Value> WebDevToolsAgentImpl::jsEvaluateOnSelf(const v8::Arguments& args)
-{
- String code;
- {
- v8::TryCatch exceptionCatcher;
- code = WebCore::toWebCoreStringWithNullCheck(args[0]);
- if (code.isEmpty() || exceptionCatcher.HasCaught())
- return v8::Undefined();
}
- WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(v8::External::Cast(*args.Data())->Value());
- v8::Context::Scope(agent->m_utilityContext);
- V8Proxy* proxy = V8Proxy::retrieve(agent->m_webViewImpl->page()->mainFrame());
- v8::Local<v8::Value> result = proxy->runScript(v8::Script::Compile(v8::String::New(code.utf8().data())), true);
- return result;
-}
-// static
-v8::Handle<v8::Value> WebDevToolsAgentImpl::jsOnRuntimeFeatureStateChanged(const v8::Arguments& args)
-{
- v8::TryCatch exceptionCatcher;
- String feature = WebCore::toWebCoreStringWithNullCheck(args[0]);
- bool enabled = args[1]->ToBoolean()->Value();
- if (feature.isEmpty() || exceptionCatcher.HasCaught())
+ String method = WebCore::toWebCoreStringWithNullCheck(args[1]);
+ if (method.isEmpty() || exceptionCatcher.HasCaught())
return v8::Undefined();
- WebDevToolsAgentImpl* agent = static_cast<WebDevToolsAgentImpl*>(v8::External::Cast(*args.Data())->Value());
- agent->m_client->runtimeFeatureStateChanged(feature, enabled);
+
+ if (method != "addRecordToTimeline" && method != "updateResource" && method != "addResource")
+ return v8::Undefined();
+
+ agent->m_apuAgentDelegateStub->dispatchToApu(message);
return v8::Undefined();
}
-
WebCore::InspectorController* WebDevToolsAgentImpl::inspectorController()
{
if (Page* page = m_webViewImpl->page())
@@ -612,6 +551,83 @@ void WebDevToolsAgentImpl::didFailLoading(unsigned long resourceId, const WebURL
ic->didFailLoading(resourceId, resourceError);
}
+void WebDevToolsAgentImpl::inspectorDestroyed()
+{
+ // Our lifetime is bound to the WebViewImpl.
+}
+
+void WebDevToolsAgentImpl::openInspectorFrontend(InspectorController*)
+{
+}
+
+void WebDevToolsAgentImpl::highlight(Node* node)
+{
+ // InspectorController does the actuall tracking of the highlighted node
+ // and the drawing of the highlight. Here we just make sure to invalidate
+ // the rects of the old and new nodes.
+ hideHighlight();
+}
+
+void WebDevToolsAgentImpl::hideHighlight()
+{
+ // FIXME: able to invalidate a smaller rect.
+ // FIXME: Is it important to just invalidate the rect of the node region
+ // given that this is not on a critical codepath? In order to do so, we'd
+ // have to take scrolling into account.
+ const WebSize& size = m_webViewImpl->size();
+ WebRect damagedRect(0, 0, size.width, size.height);
+ if (m_webViewImpl->client())
+ m_webViewImpl->client()->didInvalidateRect(damagedRect);
+}
+
+void WebDevToolsAgentImpl::populateSetting(const String& key, String* value)
+{
+ WebString string;
+ m_webViewImpl->inspectorSetting(key, &string);
+ *value = string;
+}
+
+void WebDevToolsAgentImpl::storeSetting(const String& key, const String& value)
+{
+ m_webViewImpl->setInspectorSetting(key, value);
+}
+
+bool WebDevToolsAgentImpl::sendMessageToFrontend(const WebCore::String& message)
+{
+ WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_webViewImpl->devToolsAgent());
+ if (!devToolsAgent)
+ return false;
+
+ WebVector<WebString> arguments(size_t(1));
+ arguments[0] = message;
+ WebDevToolsMessageData data;
+ data.className = "ToolsAgentDelegate";
+ data.methodName = "dispatchOnClient";
+ data.arguments.swap(arguments);
+ devToolsAgent->sendRpcMessage(data);
+ return true;
+}
+
+void WebDevToolsAgentImpl::resourceTrackingWasEnabled()
+{
+ m_client->runtimeFeatureStateChanged(kResourceTrackingFeatureName, true);
+}
+
+void WebDevToolsAgentImpl::resourceTrackingWasDisabled()
+{
+ m_client->runtimeFeatureStateChanged(kResourceTrackingFeatureName, false);
+}
+
+void WebDevToolsAgentImpl::timelineProfilerWasStarted()
+{
+ m_client->runtimeFeatureStateChanged(kTimelineFeatureName, true);
+}
+
+void WebDevToolsAgentImpl::timelineProfilerWasStopped()
+{
+ m_client->runtimeFeatureStateChanged(kTimelineFeatureName, false);
+}
+
void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script)
{
InspectorController* ic = inspectorController();
@@ -647,10 +663,10 @@ void WebDevToolsAgent::setMessageLoopDispatchHandler(MessageLoopDispatchHandler
DebuggerAgentManager::setMessageLoopDispatchHandler(handler);
}
-bool WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread(const WebDevToolsMessageData& data)
+bool WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread(WebDevToolsMessageTransport* transport, const WebDevToolsMessageData& data)
{
- IORPCDelegate transport;
- ProfilerAgentDelegateStub stub(&transport);
+ IORPCDelegate delegate(transport);
+ ProfilerAgentDelegateStub stub(&delegate);
ProfilerAgentImpl agent(&stub);
return ProfilerAgentDispatch::dispatch(&agent, data);
}
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 455dcef..c97b21f 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -31,6 +31,8 @@
#ifndef WebDevToolsAgentImpl_h
#define WebDevToolsAgentImpl_h
+#include "InspectorClient.h"
+
#include "APUAgentDelegate.h"
#include "DevToolsRPC.h"
#include "ToolsAgent.h"
@@ -41,6 +43,7 @@
namespace WebCore {
class Document;
+class InspectorClient;
class InspectorController;
class Node;
class String;
@@ -62,7 +65,8 @@ struct WebDevToolsMessageData;
class WebDevToolsAgentImpl : public WebDevToolsAgentPrivate,
public ToolsAgent,
- public DevToolsRPC::Delegate {
+ public DevToolsRPC::Delegate,
+ public WebCore::InspectorClient {
public:
WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* client);
virtual ~WebDevToolsAgentImpl();
@@ -73,7 +77,6 @@ public:
// WebDevToolsAgentPrivate implementation.
virtual void didClearWindowObject(WebFrameImpl* frame);
- virtual void didCommitProvisionalLoad(WebFrameImpl* frame, bool isNewNavigation);
// WebDevToolsAgent implementation.
virtual void attach();
@@ -92,6 +95,19 @@ public:
virtual void didFinishLoading(unsigned long);
virtual void didFailLoading(unsigned long, const WebURLError&);
+ // InspectorClient implementation.
+ virtual void inspectorDestroyed();
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
+ virtual void highlight(WebCore::Node*);
+ virtual void hideHighlight();
+ virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
+ virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
+ virtual void resourceTrackingWasEnabled();
+ virtual void resourceTrackingWasDisabled();
+ virtual void timelineProfilerWasStarted();
+ virtual void timelineProfilerWasStopped();
+ virtual bool sendMessageToFrontend(const WebCore::String&);
+
// DevToolsRPC::Delegate implementation.
virtual void sendRpcMessage(const WebDevToolsMessageData& data);
@@ -101,9 +117,6 @@ public:
private:
static v8::Handle<v8::Value> jsDispatchOnClient(const v8::Arguments& args);
- static v8::Handle<v8::Value> jsDispatchToApu(const v8::Arguments& args);
- static v8::Handle<v8::Value> jsEvaluateOnSelf(const v8::Arguments& args);
- static v8::Handle<v8::Value> jsOnRuntimeFeatureStateChanged(const v8::Arguments& args);
void disposeUtilityContext();
diff --git a/WebKit/chromium/src/WebDevToolsAgentPrivate.h b/WebKit/chromium/src/WebDevToolsAgentPrivate.h
index 446f647..7038a5e 100644
--- a/WebKit/chromium/src/WebDevToolsAgentPrivate.h
+++ b/WebKit/chromium/src/WebDevToolsAgentPrivate.h
@@ -43,11 +43,6 @@ public:
// The window object for the frame has been cleared of any extra properties
// that may have been set by script from the previously loaded document.
virtual void didClearWindowObject(WebFrameImpl*) = 0;
-
- // The provisional datasource is now committed. The first part of the
- // response body has been received, and the encoding of the response body
- // is known.
- virtual void didCommitProvisionalLoad(WebFrameImpl*, bool isNewNavigation) = 0;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index 0a6c8de..eda2f77 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -105,6 +105,10 @@ WebDevToolsFrontendImpl::WebDevToolsFrontendImpl(
InspectorController* ic = m_webViewImpl->page()->inspectorController();
ic->setInspectorFrontendClient(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this));
+ // Put DevTools frontend Page into its own group so that it's not
+ // deferred along with inspected page.
+ m_webViewImpl->page()->setGroupName("DevToolsFrontend");
+
WebFrameImpl* frame = m_webViewImpl->mainFrameImpl();
v8::HandleScope scope;
v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame());
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
index 2b8ae3c..665d8d9 100644
--- a/WebKit/chromium/src/WebEntities.cpp
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -42,7 +42,7 @@
using namespace WebCore;
namespace {
-// Note that this file is also included by HTMLDocumentParser.cpp so we are getting
+// Note that this file is also included by LegacyHTMLDocumentParser.cpp so we are getting
// two copies of the data in memory. We can fix this by changing the script
// that generated the array to create a static const that is its length, but
// this is low priority since the data is less than 4K. We use anonymous
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index bb1f6ce..c5fa1fe 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -472,9 +472,9 @@ WebString WebFrameImpl::name() const
return m_frame->tree()->name();
}
-void WebFrameImpl::clearName()
+void WebFrameImpl::setName(const WebString& name)
{
- m_frame->tree()->clearName();
+ m_frame->tree()->setName(name);
}
WebURL WebFrameImpl::url() const
@@ -1279,6 +1279,21 @@ void WebFrameImpl::printEnd()
m_printContext.clear();
}
+bool WebFrameImpl::isPageBoxVisible(int pageIndex)
+{
+ return frame()->document()->isPageBoxVisible(pageIndex);
+}
+
+WebRect WebFrameImpl::pageAreaRectInPixels(int pageIndex)
+{
+ return frame()->document()->pageAreaRectInPixels(pageIndex);
+}
+
+WebSize WebFrameImpl::preferredPageSizeInPixels(int pageIndex)
+{
+ return frame()->document()->preferredPageSizeInPixels(pageIndex);
+}
+
bool WebFrameImpl::find(int identifier,
const WebString& searchText,
const WebFindOptions& options,
@@ -2135,14 +2150,8 @@ void WebFrameImpl::loadJavaScriptURL(const KURL& url)
if (!result.getString(scriptResult))
return;
- SecurityOrigin* securityOrigin = m_frame->document()->securityOrigin();
-
- if (!m_frame->redirectScheduler()->locationChangePending()) {
- m_frame->loader()->stopAllLoaders();
- m_frame->loader()->writer()->begin(m_frame->loader()->url(), true, securityOrigin);
- m_frame->loader()->writer()->addData(scriptResult);
- m_frame->loader()->writer()->end();
- }
+ if (!m_frame->redirectScheduler()->locationChangePending())
+ m_frame->loader()->writer()->replaceDocument(scriptResult);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index a8b272f..c14ad9b 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -64,7 +64,7 @@ class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> {
public:
// WebFrame methods:
virtual WebString name() const;
- virtual void clearName();
+ virtual void setName(const WebString&);
virtual WebURL url() const;
virtual WebURL favIconURL() const;
virtual WebURL openSearchDescriptionURL() const;
@@ -149,6 +149,9 @@ public:
virtual float printPage(int pageToPrint, WebCanvas*);
virtual float getPrintPageShrink(int page);
virtual void printEnd();
+ virtual bool isPageBoxVisible(int pageIndex);
+ virtual WebRect pageAreaRectInPixels(int pageIndex);
+ virtual WebSize preferredPageSizeInPixels(int pageIndex);
virtual bool find(
int identifier, const WebString& searchText, const WebFindOptions&,
bool wrapWithinFrame, WebRect* selectionRect);
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 4d24ea9..b23dc35 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -1001,6 +1001,7 @@ void WebGraphicsContext3DDefaultImpl::generateMipmap(unsigned long target)
bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo& info)
{
+ makeContextCurrent();
if (!program) {
synthesizeGLError(GL_INVALID_VALUE);
return false;
@@ -1032,6 +1033,7 @@ bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned
bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned long index, ActiveInfo& info)
{
+ makeContextCurrent();
GLint maxNameLength = -1;
glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength);
if (maxNameLength < 0)
@@ -1223,6 +1225,7 @@ DELEGATE_TO_GL_2(polygonOffset, PolygonOffset, double, double)
void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels)
{
+ makeContextCurrent();
// FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
// all previous rendering calls should be done before reading pixels.
glFlush();
diff --git a/WebKit/chromium/src/WebHistoryItem.cpp b/WebKit/chromium/src/WebHistoryItem.cpp
index 45e4472..99ebce8 100644
--- a/WebKit/chromium/src/WebHistoryItem.cpp
+++ b/WebKit/chromium/src/WebHistoryItem.cpp
@@ -201,6 +201,17 @@ void WebHistoryItem::setDocumentState(const WebVector<WebString>& state)
m_private->setDocumentState(ds);
}
+long long WebHistoryItem::itemSequenceNumber() const
+{
+ return m_private->itemSequenceNumber();
+}
+
+void WebHistoryItem::setItemSequenceNumber(long long itemSequenceNumber)
+{
+ ensureMutable();
+ m_private->setItemSequenceNumber(itemSequenceNumber);
+}
+
long long WebHistoryItem::documentSequenceNumber() const
{
return m_private->documentSequenceNumber();
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 5ae1557..38d91df 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -36,6 +36,7 @@
#include "Notification.h"
#include "WebString.h"
+#include "WebTextDirection.h"
#include "WebURL.h"
#include <wtf/PassRefPtr.h>
@@ -94,11 +95,19 @@ WebString WebNotification::body() const
return m_private->contents().body();
}
+// FIXME: remove dir() when unreferenced. Being replaced by direction().
WebString WebNotification::dir() const
{
return m_private->dir();
}
+WebTextDirection WebNotification::direction() const
+{
+ return (m_private->direction() == RTL) ?
+ WebTextDirectionRightToLeft :
+ WebTextDirectionLeftToRight;
+}
+
WebString WebNotification::replaceId() const
{
return m_private->replaceId();
diff --git a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp b/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
index 8f5a1f7..d0f7324 100644
--- a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
+++ b/WebKit/chromium/src/WebPluginListBuilderImpl.cpp
@@ -53,16 +53,13 @@ void WebPluginListBuilderImpl::addMediaTypeToLastPlugin(const WebString& name, c
MimeClassInfo info;
info.type = name;
info.desc = description;
- info.pluginIndex = m_results->size() - 1;
m_results->last().mimes.append(info);
}
void WebPluginListBuilderImpl::addFileExtensionToLastMediaType(const WebString& extension)
{
MimeClassInfo& info = m_results->last().mimes.last();
- if (!info.suffixes.isEmpty())
- info.suffixes.append(',');
- info.suffixes.append(extension);
+ info.extensions.append(extension);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp
index f9da394..9ac4d34 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -230,6 +230,7 @@ void WebPopupMenuImpl::setFocus(bool enable)
{
}
+// DEPRECATED, will be removed later.
bool WebPopupMenuImpl::handleCompositionEvent(
WebCompositionCommand command, int cursorPosition, int targetStart,
int targetEnd, const WebString& imeString)
@@ -237,11 +238,34 @@ bool WebPopupMenuImpl::handleCompositionEvent(
return false;
}
+bool WebPopupMenuImpl::setComposition(
+ const WebString& text, const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart, int selectionEnd)
+{
+ return false;
+}
+
+bool WebPopupMenuImpl::confirmComposition()
+{
+ return false;
+}
+
+// DEPRECATED, will be removed later.
bool WebPopupMenuImpl::queryCompositionStatus(bool* enabled, WebRect* caretRect)
{
return false;
}
+WebTextInputType WebPopupMenuImpl::textInputType()
+{
+ return WebTextInputTypeNone;
+}
+
+WebRect WebPopupMenuImpl::caretOrSelectionBounds()
+{
+ return WebRect();
+}
+
void WebPopupMenuImpl::setTextDirection(WebTextDirection direction)
{
}
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index a2602b0..95f776e 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -66,10 +66,21 @@ public:
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
+
+ // DEPRECATED, will be removed later.
virtual bool handleCompositionEvent(
WebCompositionCommand command, int cursorPosition,
int targetStart, int targetEnd, const WebString& text);
+ virtual bool setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart, int selectionEnd);
+ virtual bool confirmComposition();
+
+ // DEPRECATED, will be removed later.
virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
+ virtual WebTextInputType textInputType();
+ virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
virtual bool isAcceleratedCompositingActive() const { return false; }
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 8e73d6f..595a47f 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebRuntimeFeatures.h"
-#include "Database.h"
+#include "AbstractDatabase.h"
#include "RuntimeEnabledFeatures.h"
#include "WebMediaPlayerClientImpl.h"
#include "WebSocket.h"
@@ -43,14 +43,14 @@ namespace WebKit {
void WebRuntimeFeatures::enableDatabase(bool enable)
{
#if ENABLE(DATABASE)
- Database::setIsAvailable(enable);
+ AbstractDatabase::setIsAvailable(enable);
#endif
}
bool WebRuntimeFeatures::isDatabaseEnabled()
{
#if ENABLE(DATABASE)
- return Database::isAvailable();
+ return AbstractDatabase::isAvailable();
#else
return false;
#endif
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index d5ba707..3f3ddba 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -287,6 +287,16 @@ void WebURLResponse::setWasNpnNegotiated(bool value)
m_private->m_resourceResponse->setWasNpnNegotiated(value);
}
+bool WebURLResponse::wasAlternateProtocolAvailable() const
+{
+ return m_private->m_resourceResponse->wasAlternateProtocolAvailable();
+}
+
+void WebURLResponse::setWasAlternateProtocolAvailable(bool value)
+{
+ m_private->m_resourceResponse->setWasAlternateProtocolAvailable(value);
+}
+
bool WebURLResponse::wasFetchedViaProxy() const
{
return m_private->m_resourceResponse->wasFetchedViaProxy();
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 5adc35c..257d646 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -35,6 +35,7 @@
#include "AutocompletePopupMenuClient.h"
#include "AXObjectCache.h"
#include "Chrome.h"
+#include "CompositionUnderlineVectorBuilder.h"
#include "ContextMenu.h"
#include "ContextMenuController.h"
#include "ContextMenuItem.h"
@@ -45,6 +46,7 @@
#include "DocumentLoader.h"
#include "DOMUtilitiesPrivate.h"
#include "DragController.h"
+#include "DragScrollTimer.h"
#include "DragData.h"
#include "Editor.h"
#include "EventHandler.h"
@@ -81,14 +83,18 @@
#include "SecurityOrigin.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "Timer.h"
#include "TypingCommand.h"
#include "WebAccessibilityObject.h"
#include "WebDevToolsAgentPrivate.h"
+#include "WebDevToolsAgentImpl.h"
#include "WebDragData.h"
#include "WebFrameImpl.h"
#include "WebImage.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
#include "WebMediaPlayerAction.h"
#include "WebNode.h"
#include "WebPoint.h"
@@ -160,9 +166,9 @@ static const PopupContainerSettings suggestionsPopupSettings = {
// WebView ----------------------------------------------------------------
-WebView* WebView::create(WebViewClient* client)
+WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient)
{
- return new WebViewImpl(client);
+ return new WebViewImpl(client, devToolsClient);
}
void WebView::updateVisitedLinkState(unsigned long long linkHash)
@@ -209,7 +215,7 @@ void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient)
SecurityOrigin::setLocalLoadPolicy(SecurityOrigin::AllowLocalLoadsForLocalOnly);
}
-WebViewImpl::WebViewImpl(WebViewClient* client)
+WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devToolsClient)
: m_client(client)
, m_backForwardListClientImpl(this)
, m_chromeClientImpl(this)
@@ -238,10 +244,12 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_suggestionsPopup(0)
, m_isTransparent(false)
, m_tabsToLinks(false)
+ , m_dragScrollTimer(new DragScrollTimer())
#if USE(ACCELERATED_COMPOSITING)
, m_layerRenderer(0)
, m_isAcceleratedCompositingActive(false)
#endif
+ , m_gles2Context(0)
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -252,9 +260,13 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
// set to impossible point so we always get the first mouse pos
m_lastMousePosition = WebPoint(-1, -1);
- // the page will take ownership of the various clients
+ if (devToolsClient)
+ m_devToolsAgent = static_cast<WebDevToolsAgentImpl*>(WebDevToolsAgent::create(this, devToolsClient));
+
m_page.set(new Page(&m_chromeClientImpl, &m_contextMenuClientImpl, &m_editorClientImpl, &m_dragClientImpl, &m_inspectorClientImpl, 0, 0, 0));
+ // the page will take ownership of the various clients
+
m_page->backForwardList()->setClient(&m_backForwardListClientImpl);
m_page->setGroupName(pageGroupName);
@@ -827,45 +839,6 @@ bool WebViewImpl::mapKeyCodeForScroll(int keyCode,
return true;
}
-// Computes the distance from a point outside a rect to the nearest edge of the rect.
-static IntSize distanceToRect(const IntPoint& point, const IntRect& rect)
-{
- int dx = 0, dy = 0;
- if (point.x() < rect.x())
- dx = point.x() - rect.x();
- else if (rect.right() < point.x())
- dx = point.x() - rect.right();
- if (point.y() < rect.y())
- dy = point.y() - rect.y();
- else if (rect.bottom() < point.y())
- dy = point.y() - rect.bottom();
- return IntSize(dx, dy);
-}
-
-void WebViewImpl::scrollForDragging(const WebPoint& clientPoint)
-{
- // This margin approximates Safari behavior, derived from an observation.
- static const int scrollMargin = 30;
-
- FrameView* view = mainFrameImpl()->frameView();
- if (!view)
- return;
-
- IntRect bounds(0, 0, view->visibleWidth(), view->visibleHeight());
- bounds.setY(bounds.y() + scrollMargin);
- bounds.setHeight(bounds.height() - scrollMargin * 2);
- bounds.setX(bounds.x() + scrollMargin);
- bounds.setWidth(bounds.width() - scrollMargin * 2);
-
- IntPoint point = clientPoint;
- if (bounds.contains(point))
- return;
-
- IntSize toScroll = distanceToRect(point, bounds);
- if (!toScroll.isZero())
- view->scrollBy(toScroll);
-}
-
void WebViewImpl::hideSelectPopup()
{
if (m_selectPopup.get())
@@ -1191,25 +1164,66 @@ void WebViewImpl::setFocus(bool enable)
}
}
+// DEPRECATED, will be removed later.
bool WebViewImpl::handleCompositionEvent(WebCompositionCommand command,
int cursorPosition,
int targetStart,
int targetEnd,
const WebString& imeString)
{
+ if (command == WebKit::WebCompositionCommandSet) {
+ if (targetStart < 0)
+ targetStart = 0;
+ if (targetEnd < 0)
+ targetEnd = static_cast<int>(imeString.length());
+
+ // Create custom underlines.
+ // To emphasize the selection, the selected region uses a solid black
+ // for its underline while other regions uses a pale gray for theirs.
+ WebVector<WebCompositionUnderline> underlines(static_cast<size_t>(3));
+ underlines[0].startOffset = 0;
+ underlines[0].endOffset = targetStart;
+ underlines[0].thick = true;
+ underlines[0].color = 0xffd3d3d3;
+ underlines[1].startOffset = targetStart;
+ underlines[1].endOffset = targetEnd;
+ underlines[1].thick = true;
+ underlines[1].color = 0xff000000;
+ underlines[2].startOffset = targetEnd;
+ underlines[2].endOffset = static_cast<unsigned>(imeString.length());
+ underlines[2].thick = true;
+ underlines[2].color = 0xffd3d3d3;
+ return setComposition(imeString, underlines, cursorPosition, cursorPosition);
+ }
+
+ if (command == WebKit::WebCompositionCommandDiscard)
+ setComposition(WebString(), WebVector<WebCompositionUnderline>(), 0, 0);
+ else if (command == WebKit::WebCompositionCommandConfirm) {
+ setComposition(imeString, WebVector<WebCompositionUnderline>(), 0, 0);
+ confirmComposition();
+ }
+
+ return true;
+}
+
+bool WebViewImpl::setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart,
+ int selectionEnd)
+{
Frame* focused = focusedWebCoreFrame();
if (!focused || !m_imeAcceptEvents)
return false;
Editor* editor = focused->editor();
if (!editor)
return false;
- if (!editor->canEdit()) {
- // The input focus has been moved to another WebWidget object.
- // We should use this |editor| object only to complete the ongoing
- // composition.
- if (!editor->hasComposition())
- return false;
- }
+
+ // The input focus has been moved to another WebWidget object.
+ // We should use this |editor| object only to complete the ongoing
+ // composition.
+ if (!editor->canEdit() && !editor->hasComposition())
+ return false;
// We should verify the parent node of this IME composition node are
// editable because JavaScript may delete a parent node of the composition
@@ -1224,9 +1238,7 @@ bool WebViewImpl::handleCompositionEvent(WebCompositionCommand command,
// If we're not going to fire a keypress event, then the keydown event was
// canceled. In that case, cancel any existing composition.
- // FIXME: Ideally, we would only cancel a single keypress, rather than the
- // whole composition.
- if ((command == WebCompositionCommandDiscard) || m_suppressNextKeypressEvent) {
+ if (text.isEmpty() || m_suppressNextKeypressEvent) {
// A browser process sent an IPC message which does not contain a valid
// string, which means an ongoing composition has been canceled.
// If the ongoing composition has been canceled, replace the ongoing
@@ -1234,49 +1246,45 @@ bool WebViewImpl::handleCompositionEvent(WebCompositionCommand command,
String emptyString;
Vector<CompositionUnderline> emptyUnderlines;
editor->setComposition(emptyString, emptyUnderlines, 0, 0);
- } else {
- // A browser process sent an IPC message which contains a string to be
- // displayed in this Editor object.
- // To display the given string, set the given string to the
- // m_compositionNode member of this Editor object and display it.
- if (targetStart < 0)
- targetStart = 0;
- if (targetEnd < 0)
- targetEnd = static_cast<int>(imeString.length());
- String compositionString(imeString);
- // Create custom underlines.
- // To emphasize the selection, the selected region uses a solid black
- // for its underline while other regions uses a pale gray for theirs.
- Vector<CompositionUnderline> underlines(3);
- underlines[0].startOffset = 0;
- underlines[0].endOffset = targetStart;
- underlines[0].thick = true;
- underlines[0].color.setRGB(0xd3, 0xd3, 0xd3);
- underlines[1].startOffset = targetStart;
- underlines[1].endOffset = targetEnd;
- underlines[1].thick = true;
- underlines[1].color.setRGB(0x00, 0x00, 0x00);
- underlines[2].startOffset = targetEnd;
- underlines[2].endOffset = static_cast<int>(imeString.length());
- underlines[2].thick = true;
- underlines[2].color.setRGB(0xd3, 0xd3, 0xd3);
- // When we use custom underlines, WebKit ("InlineTextBox.cpp" Line 282)
- // prevents from writing a text in between 'selectionStart' and
- // 'selectionEnd' somehow.
- // Therefore, we use the 'cursorPosition' for these arguments so that
- // there are not any characters in the above region.
- editor->setComposition(compositionString, underlines,
- cursorPosition, cursorPosition);
- // The given string is a result string, which means the ongoing
- // composition has been completed. I have to call the
- // Editor::confirmCompletion() and complete this composition.
- if (command == WebCompositionCommandConfirm)
- editor->confirmComposition();
+ return text.isEmpty();
}
+ // When the range of composition underlines overlap with the range between
+ // selectionStart and selectionEnd, WebKit somehow won't paint the selection
+ // at all (see InlineTextBox::paint() function in InlineTextBox.cpp).
+ // But the selection range actually takes effect.
+ editor->setComposition(String(text),
+ CompositionUnderlineVectorBuilder(underlines),
+ selectionStart, selectionEnd);
+
return editor->hasComposition();
}
+bool WebViewImpl::confirmComposition()
+{
+ Frame* focused = focusedWebCoreFrame();
+ if (!focused || !m_imeAcceptEvents)
+ return false;
+ Editor* editor = focused->editor();
+ if (!editor || !editor->hasComposition())
+ return false;
+
+ // We should verify the parent node of this IME composition node are
+ // editable because JavaScript may delete a parent node of the composition
+ // node. In this case, WebKit crashes while deleting texts from the parent
+ // node, which doesn't exist any longer.
+ PassRefPtr<Range> range = editor->compositionRange();
+ if (range) {
+ const Node* node = range->startPosition().node();
+ if (!node || !node->isContentEditable())
+ return false;
+ }
+
+ editor->confirmComposition();
+ return true;
+}
+
+// DEPRECATED, will be removed later.
bool WebViewImpl::queryCompositionStatus(bool* enableIME, WebRect* caretRect)
{
// Store whether the selected node needs IME and the caret rectangle.
@@ -1311,6 +1319,59 @@ bool WebViewImpl::queryCompositionStatus(bool* enableIME, WebRect* caretRect)
return true;
}
+WebTextInputType WebViewImpl::textInputType()
+{
+ WebTextInputType type = WebTextInputTypeNone;
+ const Frame* focused = focusedWebCoreFrame();
+ if (!focused)
+ return type;
+
+ const Editor* editor = focused->editor();
+ if (!editor || !editor->canEdit())
+ return type;
+
+ SelectionController* controller = focused->selection();
+ if (!controller)
+ return type;
+
+ const Node* node = controller->start().node();
+ if (!node)
+ return type;
+
+ // FIXME: Support more text input types when necessary, eg. Number,
+ // Date, Email, URL, etc.
+ if (controller->isInPasswordField())
+ type = WebTextInputTypePassword;
+ else if (node->shouldUseInputMethod())
+ type = WebTextInputTypeText;
+
+ return type;
+}
+
+WebRect WebViewImpl::caretOrSelectionBounds()
+{
+ WebRect rect;
+ const Frame* focused = focusedWebCoreFrame();
+ if (!focused)
+ return rect;
+
+ SelectionController* controller = focused->selection();
+ if (!controller)
+ return rect;
+
+ const FrameView* view = focused->view();
+ if (!view)
+ return rect;
+
+ if (controller->isCaret())
+ rect = view->contentsToWindow(controller->absoluteCaretBounds());
+ else if (controller->isRange()) {
+ RefPtr<Range> range = controller->toNormalizedRange();
+ rect = view->contentsToWindow(focused->firstRectForRange(range.get()));
+ }
+ return rect;
+}
+
void WebViewImpl::setTextDirection(WebTextDirection direction)
{
// The Editor::setBaseWritingDirection() function checks if we can change
@@ -1393,7 +1454,7 @@ bool WebViewImpl::dispatchBeforeUnloadEvent()
if (!frame)
return true;
- return frame->shouldClose();
+ return frame->loader()->shouldClose();
}
void WebViewImpl::dispatchUnloadEvent()
@@ -1576,6 +1637,7 @@ void WebViewImpl::dragSourceEndedAt(
false, 0);
m_page->mainFrame()->eventHandler()->dragSourceEndedAt(pme,
static_cast<DragOperation>(operation));
+ m_dragScrollTimer->stop();
}
void WebViewImpl::dragSourceMovedTo(
@@ -1583,7 +1645,7 @@ void WebViewImpl::dragSourceMovedTo(
const WebPoint& screenPoint,
WebDragOperation operation)
{
- scrollForDragging(clientPoint);
+ m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint);
}
void WebViewImpl::dragSourceSystemDragEnded()
@@ -1672,6 +1734,7 @@ void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
m_dropEffect = DropEffectDefault;
m_dragOperation = WebDragOperationNone;
m_dragIdentity = 0;
+ m_dragScrollTimer->stop();
}
int WebViewImpl::dragIdentity()
@@ -1707,7 +1770,10 @@ WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo
m_dragOperation = static_cast<WebDragOperation>(effect);
if (dragAction == DragOver)
- scrollForDragging(clientPoint);
+ m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint);
+ else
+ m_dragScrollTimer->stop();
+
return m_dragOperation;
}
@@ -2221,7 +2287,23 @@ void WebViewImpl::setRootLayerNeedsDisplay()
if (m_layerRenderer)
m_layerRenderer->setNeedsDisplay();
}
+#endif // USE(ACCELERATED_COMPOSITING)
-#endif
+// Returns the GLES2 context associated with this View. If one doesn't exist
+// it will get created first.
+WebGLES2Context* WebViewImpl::gles2Context()
+{
+ if (!m_gles2Context) {
+ m_gles2Context = webKitClient()->createGLES2Context();
+ if (!m_gles2Context)
+ return 0;
+
+ if (!m_gles2Context->initialize(this, 0)) {
+ m_gles2Context.clear();
+ return 0;
+ }
+ }
+ return m_gles2Context.get();
+}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 8b15f8a..a6fa131 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -31,6 +31,7 @@
#ifndef WebViewImpl_h
#define WebViewImpl_h
+#include "WebGLES2Context.h"
#include "WebNavigationPolicy.h"
#include "WebPoint.h"
#include "WebSize.h"
@@ -68,8 +69,10 @@ namespace WebKit {
class AutocompletePopupMenuClient;
class AutoFillPopupMenuClient;
class ContextMenuClientImpl;
+class DragScrollTimer;
class SuggestionsPopupMenuClient;
class WebAccessibilityObject;
+class WebDevToolsAgentClient;
class WebDevToolsAgentPrivate;
class WebFrameImpl;
class WebImage;
@@ -90,13 +93,24 @@ public:
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
+
+ // DEPRECATED, will be removed later.
virtual bool handleCompositionEvent(WebCompositionCommand command,
int cursorPosition,
int targetStart,
int targetEnd,
const WebString& text);
- virtual bool queryCompositionStatus(bool* enabled,
- WebRect* caretRect);
+ virtual bool setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart,
+ int selectionEnd);
+ virtual bool confirmComposition();
+
+ // DEPRECATED, will be removed later.
+ virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
+ virtual WebTextInputType textInputType();
+ virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
virtual bool isAcceleratedCompositingActive() const;
@@ -322,6 +336,10 @@ public:
WebCore::ScrollDirection* scrollDirection,
WebCore::ScrollGranularity* scrollGranularity);
+ // Returns the GLES2Context associated with this WebView. One will be created
+ // if it doesn't already exist.
+ WebGLES2Context* gles2Context();
+
private:
friend class WebView; // So WebView::Create can call our constructor
friend class WTF::RefCounted<WebViewImpl>;
@@ -331,7 +349,7 @@ private:
DragOver
};
- WebViewImpl(WebViewClient* client);
+ WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devToolsClient);
~WebViewImpl();
// Returns true if the event was actually processed.
@@ -351,8 +369,6 @@ private:
// Returns true if the view was scrolled.
bool scrollViewWithKeyboard(int keyCode, int modifiers);
- void scrollForDragging(const WebPoint&);
-
void hideSelectPopup();
// Converts |pos| from window coordinates to contents coordinates and gets
@@ -496,6 +512,7 @@ private:
typedef HashMap<WebCore::String, WebCore::String> SettingsMap;
OwnPtr<SettingsMap> m_inspectorSettingsMap;
+ OwnPtr<DragScrollTimer> m_dragScrollTimer;
#if ENABLE(NOTIFICATIONS)
// The provider of desktop notifications;
@@ -510,6 +527,8 @@ private:
bool m_isAcceleratedCompositingActive;
#endif
static const WebInputEvent* m_currentInputEvent;
+
+ OwnPtr<WebGLES2Context> m_gles2Context;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index 8d2457f..01d7627 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -1075,7 +1075,7 @@ devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame)
WebInspector.parsedScriptSource(sourceId, null, null, 0, WebInspector.Script.WorldType.MAIN_WORLD);
}
- var funcName = func.name || func.inferredName || "(anonymous function)";
+ var funcName = func.name || func.inferredName;
var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(stackFrame.line);
// Add basic scope chain info with scope variables.
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 3ff3eb7..baddb7d 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -219,8 +219,6 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var functionName;
if (func)
functionName = func.name() || func.inferredName();
- if (!functionName)
- functionName = "[anonymous]";
// Get script ID.
var script = func.script();
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 398d358..851c934 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -61,7 +61,6 @@ devtools$$dispatch = function(remoteName, methodName, param1, param2, param3)
devtools.ToolsAgent = function()
{
RemoteToolsAgent.didDispatchOn = WebInspector.Callback.processCallback;
- RemoteToolsAgent.frameNavigate = this.frameNavigate_.bind(this);
RemoteToolsAgent.dispatchOnClient = this.dispatchOnClient_.bind(this);
this.debuggerAgent_ = new devtools.DebuggerAgent();
this.profilerAgent_ = new devtools.ProfilerAgent();
@@ -107,24 +106,14 @@ devtools.ToolsAgent.prototype.getProfilerAgent = function()
};
-/**
- * @param {string} url Url frame navigated to.
- * @see tools_agent.h
- * @private
- */
-devtools.ToolsAgent.prototype.frameNavigate_ = function(url)
+(function () {
+var orig = WebInspector.reset;
+WebInspector.reset = function()
{
- this.reset();
- // Do not reset Profiles panel.
- var profiles = null;
- if ("profiles" in WebInspector.panels) {
- profiles = WebInspector.panels["profiles"];
- delete WebInspector.panels["profiles"];
- }
- WebInspector.reset();
- if (profiles !== null)
- WebInspector.panels["profiles"] = profiles;
+ devtools.tools.reset();
+ orig.call(this);
};
+})();
/**
@@ -302,31 +291,6 @@ WebInspector.UIString = function(string)
return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
};
-// Activate window upon node search complete. This will go away once InspectorFrontendClient is landed.
-(function() {
- var original = WebInspector.searchingForNodeWasDisabled;
- WebInspector.searchingForNodeWasDisabled = function()
- {
- if (this.panels.elements._nodeSearchButton.toggled)
- InspectorFrontendHost.bringToFront();
- original.apply(this, arguments);
- }
-})();
-
-
-// There is no clear way of setting frame title yet. So sniffing main resource
-// load.
-(function OverrideUpdateResource() {
- var originalUpdateResource = WebInspector.updateResource;
- WebInspector.updateResource = function(identifier, payload)
- {
- originalUpdateResource.call(this, identifier, payload);
- var resource = this.resources[identifier];
- if (resource && resource.mainResource && resource.finished)
- document.title = WebInspector.UIString("Developer Tools - %s", resource.url);
- };
-})();
-
/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
(function()
@@ -356,9 +320,10 @@ WebInspector.UIString = function(string)
})();
-// We need to have a place for postponed tasks
-// which should be executed when all the messages between agent and frontend
-// are processed.
+
+///////////////////////////////////////////
+// Chromium layout test harness support. //
+///////////////////////////////////////////
WebInspector.runAfterPendingDispatchesQueue = [];
@@ -375,19 +340,11 @@ WebInspector.queuesAreEmpty = function()
copy[i].call(this);
};
-(function()
-{
-var originalAddToFrame = InspectorFrontendHost.addResourceSourceToFrame;
-InspectorFrontendHost.addResourceSourceToFrame = function(identifier, element)
-{
- var resource = WebInspector.resources[identifier];
- if (!resource)
- return;
- originalAddToFrame.call(this, identifier, resource.mimeType, element);
-};
-})();
-// Chromium theme support.
+/////////////////////////////
+// Chromium theme support. //
+/////////////////////////////
+
WebInspector.setToolbarColors = function(backgroundColor, color)
{
if (!WebInspector._themeStyleElement) {
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index da5929a..806bf6a 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -34,277 +34,8 @@
*/
if (!window["RemoteDebuggerAgent"]) {
-
-/**
- * FIXME: change field naming style to use trailing underscore.
- * @constructor
- */
-RemoteDebuggerAgentStub = function()
-{
-};
-
-
-RemoteDebuggerAgentStub.prototype.getContextId = function()
-{
- RemoteDebuggerAgent.setContextId(3);
-};
-
-
-RemoteDebuggerAgentStub.prototype.processDebugCommands = function()
-{
-};
-
-
-
-/**
- * @constructor
- */
-RemoteProfilerAgentStub = function()
-{
-};
-
-
-RemoteProfilerAgentStub.prototype.getActiveProfilerModules = function()
-{
- ProfilerStubHelper.GetInstance().getActiveProfilerModules();
-};
-
-
-RemoteProfilerAgentStub.prototype.getLogLines = function(pos)
-{
- ProfilerStubHelper.GetInstance().getLogLines(pos);
-};
-
-
-/**
- * @constructor
- */
-RemoteToolsAgentStub = function()
-{
-};
-
-
-RemoteToolsAgentStub.prototype.dispatchOnInjectedScript = function()
-{
-};
-
-
-RemoteToolsAgentStub.prototype.dispatchOnInspectorController = function()
-{
-};
-
-
-/**
- * @constructor
- */
-ProfilerStubHelper = function()
-{
- this.activeProfilerModules_ = devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_NONE;
- this.heapProfSample_ = 0;
- this.log_ = '';
-};
-
-
-ProfilerStubHelper.GetInstance = function()
-{
- if (!ProfilerStubHelper.instance_)
- ProfilerStubHelper.instance_ = new ProfilerStubHelper();
- return ProfilerStubHelper.instance_;
-};
-
-
-ProfilerStubHelper.prototype.StopProfiling = function(modules)
-{
- this.activeProfilerModules_ &= ~modules;
-};
-
-
-ProfilerStubHelper.prototype.StartProfiling = function(modules)
-{
- var profModules = devtools.ProfilerAgent.ProfilerModules;
- if (modules & profModules.PROFILER_MODULE_HEAP_SNAPSHOT) {
- if (modules & profModules.PROFILER_MODULE_HEAP_STATS) {
- this.log_ +=
- 'heap-sample-begin,"Heap","allocated",' +
- (new Date()).getTime() + '\n' +
- 'heap-sample-stats,"Heap","allocated",10000,1000\n';
- this.log_ +=
- 'heap-sample-item,STRING_TYPE,100,1000\n' +
- 'heap-sample-item,CODE_TYPE,10,200\n' +
- 'heap-sample-item,MAP_TYPE,20,350\n';
- this.log_ += ProfilerStubHelper.HeapSamples[this.heapProfSample_++];
- this.heapProfSample_ %= ProfilerStubHelper.HeapSamples.length;
- this.log_ += 'heap-sample-end,"Heap","allocated"\n';
- }
- } else {
- if (modules & profModules.PROFILER_MODULE_CPU)
- this.log_ += ProfilerStubHelper.ProfilerLogBuffer;
- this.activeProfilerModules_ |= modules;
- }
-};
-
-
-ProfilerStubHelper.prototype.getActiveProfilerModules = function()
-{
- var self = this;
- setTimeout(function() {
- RemoteProfilerAgent.didGetActiveProfilerModules(self.activeProfilerModules_);
- }, 100);
-};
-
-
-ProfilerStubHelper.prototype.getLogLines = function(pos)
-{
- var profModules = devtools.ProfilerAgent.ProfilerModules;
- var logLines = this.log_.substr(pos);
- setTimeout(function() {
- RemoteProfilerAgent.didGetLogLines(pos + logLines.length, logLines);
- }, 100);
-};
-
-
-ProfilerStubHelper.ProfilerLogBuffer =
- 'profiler,begin,1\n' +
- 'profiler,resume\n' +
- 'code-creation,LazyCompile,0x1000,256,"test1 http://aaa.js:1"\n' +
- 'code-creation,LazyCompile,0x2000,256,"test2 http://bbb.js:2"\n' +
- 'code-creation,LazyCompile,0x3000,256,"test3 http://ccc.js:3"\n' +
- 'tick,0x1010,0x0,3\n' +
- 'tick,0x2020,0x0,3,0x1010\n' +
- 'tick,0x2020,0x0,3,0x1010\n' +
- 'tick,0x3010,0x0,3,0x2020, 0x1010\n' +
- 'tick,0x2020,0x0,3,0x1010\n' +
- 'tick,0x2030,0x0,3,0x2020, 0x1010\n' +
- 'tick,0x2020,0x0,3,0x1010\n' +
- 'tick,0x1010,0x0,3\n' +
- 'profiler,pause\n';
-
-
-ProfilerStubHelper.HeapSamples = [
- 'heap-js-cons-item,foo,1,100\n' +
- 'heap-js-cons-item,bar,20,2000\n' +
- 'heap-js-cons-item,Object,5,100\n' +
- 'heap-js-ret-item,foo,bar;3\n' +
- 'heap-js-ret-item,bar,foo;5\n' +
- 'heap-js-ret-item,Object:0x1234,(roots);1\n',
-
- 'heap-js-cons-item,foo,2000,200000\n' +
- 'heap-js-cons-item,bar,10,1000\n' +
- 'heap-js-cons-item,Object,6,120\n' +
- 'heap-js-ret-item,foo,bar;7,Object:0x1234;10\n' +
- 'heap-js-ret-item,bar,foo;10,Object:0x1234;10\n' +
- 'heap-js-ret-item,Object:0x1234,(roots);1\n',
-
- 'heap-js-cons-item,foo,15,1500\n' +
- 'heap-js-cons-item,bar,15,1500\n' +
- 'heap-js-cons-item,Object,5,100\n' +
- 'heap-js-cons-item,Array,3,1000\n' +
- 'heap-js-ret-item,foo,bar;3,Array:0x5678;1\n' +
- 'heap-js-ret-item,bar,foo;5,Object:0x1234;8,Object:0x5678;2\n' +
- 'heap-js-ret-item,Object:0x1234,(roots);1,Object:0x5678;2\n' +
- 'heap-js-ret-item,Object:0x5678,(global property);3,Object:0x1234;5\n' +
- 'heap-js-ret-item,Array:0x5678,(global property);3,Array:0x5678;2\n',
-
- 'heap-js-cons-item,bar,20,2000\n' +
- 'heap-js-cons-item,Object,6,120\n' +
- 'heap-js-ret-item,bar,foo;5,Object:0x1234;1,Object:0x1235;3\n' +
- 'heap-js-ret-item,Object:0x1234,(global property);3\n' +
- 'heap-js-ret-item,Object:0x1235,(global property);5\n',
-
- 'heap-js-cons-item,foo,15,1500\n' +
- 'heap-js-cons-item,bar,15,1500\n' +
- 'heap-js-cons-item,Array,10,1000\n' +
- 'heap-js-ret-item,foo,bar;1,Array:0x5678;1\n' +
- 'heap-js-ret-item,bar,foo;5\n' +
- 'heap-js-ret-item,Array:0x5678,(roots);3\n',
-
- 'heap-js-cons-item,bar,20,2000\n' +
- 'heap-js-cons-item,baz,15,1500\n' +
- 'heap-js-ret-item,bar,baz;3\n' +
- 'heap-js-ret-item,baz,bar;3\n'
-];
-
-
-/**
- * @constructor
- */
-RemoteDebuggerCommandExecutorStub = function()
-{
-};
-
-
-RemoteDebuggerCommandExecutorStub.prototype.DebuggerCommand = function(cmd)
-{
- if ('{"seq":2,"type":"request","command":"scripts","arguments":{"includeSource":false}}' === cmd) {
- var response1 =
- '{"seq":5,"request_seq":2,"type":"response","command":"scripts","' +
- 'success":true,"body":[{"handle":61,"type":"script","name":"' +
- 'http://www/~test/t.js","id":59,"lineOffset":0,"columnOffset":0,' +
- '"lineCount":1,"sourceStart":"function fib(n) {","sourceLength":300,' +
- '"scriptType":2,"compilationType":0,"context":{"ref":60}}],"refs":[{' +
- '"handle":60,"type":"context","data":"page,3"}],"running":false}';
- this.sendResponse_(response1);
- } else if ('{"seq":3,"type":"request","command":"scripts","arguments":{"ids":[59],"includeSource":true}}' === cmd) {
- this.sendResponse_(
- '{"seq":8,"request_seq":3,"type":"response","command":"scripts",' +
- '"success":true,"body":[{"handle":1,"type":"script","name":' +
- '"http://www/~test/t.js","id":59,"lineOffset":0,"columnOffset":0,' +
- '"lineCount":1,"source":"function fib(n) {return n+1;}",' +
- '"sourceLength":244,"scriptType":2,"compilationType":0,"context":{' +
- '"ref":0}}],"refs":[{"handle":0,"type":"context","data":"page,3}],"' +
- '"running":false}');
- } else if (cmd.indexOf('"command":"profile"') !== -1) {
- var cmdObj = JSON.parse(cmd);
- if (cmdObj.arguments.command === "resume")
- ProfilerStubHelper.GetInstance().StartProfiling(parseInt(cmdObj.arguments.modules));
- else if (cmdObj.arguments.command === "pause")
- ProfilerStubHelper.GetInstance().StopProfiling(parseInt(cmdObj.arguments.modules));
- else
- debugPrint("Unexpected profile command: " + cmdObj.arguments.command);
- } else
- debugPrint("Unexpected command: " + cmd);
-};
-
-
-RemoteDebuggerCommandExecutorStub.prototype.DebuggerPauseScript = function()
-{
-};
-
-
-RemoteDebuggerCommandExecutorStub.prototype.sendResponse_ = function(response)
-{
- setTimeout(function() {
- RemoteDebuggerAgent.debuggerOutput(response);
- }, 0);
-};
-
-
-DevToolsHostStub = function()
-{
- this.isStub = true;
-};
-DevToolsHostStub.prototype.__proto__ = WebInspector.InspectorFrontendHostStub.prototype;
-
-
-DevToolsHostStub.prototype.reset = function()
-{
-};
-
-
-DevToolsHostStub.prototype.setting = function()
-{
-};
-
-
-DevToolsHostStub.prototype.setSetting = function()
-{
-};
-
-
-window["RemoteDebuggerAgent"] = new RemoteDebuggerAgentStub();
-window["RemoteDebuggerCommandExecutor"] = new RemoteDebuggerCommandExecutorStub();
-window["RemoteProfilerAgent"] = new RemoteProfilerAgentStub();
-window["RemoteToolsAgent"] = new RemoteToolsAgentStub();
-InspectorFrontendHost = new DevToolsHostStub();
-
+ window["RemoteDebuggerAgent"] = { setDebuggerScriptSource: function() {} };
+ window["RemoteDebuggerCommandExecutor"] = {};
+ window["RemoteProfilerAgent"] = {};
+ window["RemoteToolsAgent"] = { dispatchOnInjectedScript: function() {} };
}
diff --git a/WebKit/chromium/src/js/HeapProfilerPanel.js b/WebKit/chromium/src/js/HeapProfilerPanel.js
index 0fc4418..bcb008f 100644
--- a/WebKit/chromium/src/js/HeapProfilerPanel.js
+++ b/WebKit/chromium/src/js/HeapProfilerPanel.js
@@ -932,7 +932,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
buttonClicked: function()
{
- InspectorBackend.takeHeapSnapshot();
+ devtools.tools.getProfilerAgent().startProfiling(devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT);
},
get welcomeMessage()
diff --git a/WebKit/chromium/src/js/InjectDispatch.js b/WebKit/chromium/src/js/InjectDispatch.js
index 30caaf2..cda84e5 100644
--- a/WebKit/chromium/src/js/InjectDispatch.js
+++ b/WebKit/chromium/src/js/InjectDispatch.js
@@ -49,60 +49,14 @@ InspectorControllerDispatcher.dispatch = function(functionName, json_args)
};
/**
- * Special controller object for APU related messages. Outgoing messages
- * are sent to this object if the ApuAgentDispatcher is enabled.
- **/
-var ApuAgentDispatcher = { enabled : false };
-
-/**
- * Dispatches messages to APU. This filters and transforms
- * outgoing messages that are used by APU.
- * @param {string} method name of the dispatch method.
- **/
-ApuAgentDispatcher.dispatchToApu = function(method, args)
-{
- if (method !== "addRecordToTimeline" && method !== "updateResource" && method !== "addResource")
- return;
- // TODO(knorton): Transform args so they can be used
- // by APU.
- DevToolsAgentHost.dispatchToApu(JSON.stringify(args));
-};
-
-/**
* This is called by the InspectorFrontend for serialization.
* We serialize the call and send it to the client over the IPC
* using dispatchOut bound method.
*/
function dispatch(method, var_args) {
- // Handle all messages with non-primitieve arguments here.
var args = Array.prototype.slice.call(arguments);
-
- if (method === "inspectedWindowCleared" || method === "reset" || method === "setAttachedWindow") {
- // Filter out messages we don't need here.
- // We do it on the sender side since they may have non-serializable
- // parameters.
- return;
- }
-
- // Sniff some inspector controller state changes in order to support
- // cross-navigation instrumentation. Keep names in sync with
- // webdevtoolsagent_impl.
- if (method === "timelineProfilerWasStarted")
- DevToolsAgentHost.runtimeFeatureStateChanged("timeline-profiler", true);
- else if (method === "timelineProfilerWasStopped")
- DevToolsAgentHost.runtimeFeatureStateChanged("timeline-profiler", false);
- else if (method === "resourceTrackingWasEnabled")
- DevToolsAgentHost.runtimeFeatureStateChanged("resource-tracking", true);
- else if (method === "resourceTrackingWasDisabled")
- DevToolsAgentHost.runtimeFeatureStateChanged("resource-tracking", false);
-
- if (ApuAgentDispatcher.enabled) {
- ApuAgentDispatcher.dispatchToApu(method, args);
- return;
- }
-
var call = JSON.stringify(args);
- DevToolsAgentHost.dispatch(call);
+ DevToolsAgentHost.dispatch(call, method);
};
function close() {
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index 327ca8f..cbe607d 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -38,14 +38,18 @@ if (!this.devtools)
devtools.InspectorBackendImpl = function()
{
WebInspector.InspectorBackendStub.call(this);
+ this.installInspectorControllerDelegate_("addInspectedNode");
this.installInspectorControllerDelegate_("addScriptToEvaluateOnLoad");
- this.installInspectorControllerDelegate_("clearMessages");
+ this.installInspectorControllerDelegate_("changeTagName");
+ this.installInspectorControllerDelegate_("clearConsoleMessages");
this.installInspectorControllerDelegate_("copyNode");
this.installInspectorControllerDelegate_("deleteCookie");
this.installInspectorControllerDelegate_("didEvaluateForTestInFrontend");
+ this.installInspectorControllerDelegate_("disableMonitoringXHR");
this.installInspectorControllerDelegate_("disableResourceTracking");
this.installInspectorControllerDelegate_("disableSearchingForNode");
this.installInspectorControllerDelegate_("disableTimeline");
+ this.installInspectorControllerDelegate_("enableMonitoringXHR");
this.installInspectorControllerDelegate_("enableResourceTracking");
this.installInspectorControllerDelegate_("enableSearchingForNode");
this.installInspectorControllerDelegate_("enableTimeline");
@@ -54,6 +58,7 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("getDatabaseTableNames");
this.installInspectorControllerDelegate_("getDOMStorageEntries");
this.installInspectorControllerDelegate_("getEventListenersForNode");
+ this.installInspectorControllerDelegate_("getOuterHTML");
this.installInspectorControllerDelegate_("getProfile");
this.installInspectorControllerDelegate_("getProfileHeaders");
this.installInspectorControllerDelegate_("removeProfile");
@@ -62,6 +67,7 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("highlightDOMNode");
this.installInspectorControllerDelegate_("hideDOMNodeHighlight");
this.installInspectorControllerDelegate_("performSearch");
+ this.installInspectorControllerDelegate_("pushNodeByPathToFrontend");
this.installInspectorControllerDelegate_("releaseWrapperObjectGroup");
this.installInspectorControllerDelegate_("removeAllScriptsToEvaluateOnLoad");
this.installInspectorControllerDelegate_("reloadPage");
@@ -74,12 +80,14 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("setAttribute");
this.installInspectorControllerDelegate_("setDOMStorageItem");
this.installInspectorControllerDelegate_("setInjectedScriptSource");
+ this.installInspectorControllerDelegate_("setOuterHTML");
this.installInspectorControllerDelegate_("setTextNodeValue");
this.installInspectorControllerDelegate_("startProfiling");
this.installInspectorControllerDelegate_("startTimelineProfiler");
this.installInspectorControllerDelegate_("stopProfiling");
this.installInspectorControllerDelegate_("stopTimelineProfiler");
this.installInspectorControllerDelegate_("storeLastActivePanel");
+ this.installInspectorControllerDelegate_("takeHeapSnapshot");
this.installInspectorControllerDelegate_("getAllStyles");
this.installInspectorControllerDelegate_("getStyles");
@@ -113,24 +121,6 @@ devtools.InspectorBackendImpl = function()
devtools.InspectorBackendImpl.prototype.__proto__ = WebInspector.InspectorBackendStub.prototype;
-/**
- * @override
- */
-devtools.InspectorBackendImpl.prototype.debuggerEnabled = function()
-{
- return true;
-};
-
-
-/**
- * @override
- */
-devtools.InspectorBackendImpl.prototype.profilerEnabled = function()
-{
- return true;
-};
-
-
if (!window.v8ScriptDebugServerEnabled) {
devtools.InspectorBackendImpl.prototype.setBreakpoint = function(sourceID, line, enabled, condition)
@@ -248,17 +238,6 @@ devtools.InspectorBackendImpl.prototype.pauseInDebugger = function()
/**
* @override
*/
-devtools.InspectorBackendImpl.prototype.takeHeapSnapshot = function()
-{
- devtools.tools.getProfilerAgent().startProfiling(devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT
- | devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_STATS
- | devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_JS_CONSTRUCTORS);
-};
-
-
-/**
- * @override
- */
devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript = function(callId, injectedScriptId, methodName, argsString, async)
{
// Encode injectedScriptId into callId
diff --git a/WebKit/chromium/src/js/ProfilerAgent.js b/WebKit/chromium/src/js/ProfilerAgent.js
index 29de4a3..0b65ace 100644
--- a/WebKit/chromium/src/js/ProfilerAgent.js
+++ b/WebKit/chromium/src/js/ProfilerAgent.js
@@ -105,12 +105,8 @@ devtools.ProfilerAgent.prototype._getNextLogLines = function(immediately)
*/
devtools.ProfilerAgent.prototype.startProfiling = function(modules)
{
- var cmd = new devtools.DebugCommand("profile", {
- "modules": modules,
- "command": "resume"});
- devtools.DebuggerAgent.sendCommand_(cmd);
- RemoteDebuggerAgent.processDebugCommands();
if (modules & devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT) {
+ InspectorBackend.takeHeapSnapshot();
// Active modules will not change, instead, a snapshot will be logged.
this._getNextLogLines();
}
@@ -118,19 +114,6 @@ devtools.ProfilerAgent.prototype.startProfiling = function(modules)
/**
- * Stops profiling.
- */
-devtools.ProfilerAgent.prototype.stopProfiling = function(modules)
-{
- var cmd = new devtools.DebugCommand("profile", {
- "modules": modules,
- "command": "pause"});
- devtools.DebuggerAgent.sendCommand_(cmd);
- RemoteDebuggerAgent.processDebugCommands();
-};
-
-
-/**
* Handles current profiler status.
* @param {number} modules List of active (started) modules.
*/
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index fa910ab..893bc56 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -453,7 +453,7 @@ TestSuite.prototype.testProfilerTab = function()
setTimeout(findVisibleView, 0);
return;
}
- setTimeout(findDisplayedNode, 0);
+ setTimeout(findDisplayedNode, 0);
}
findVisibleView();
@@ -462,6 +462,51 @@ TestSuite.prototype.testProfilerTab = function()
/**
+ * Tests that heap profiler works.
+ */
+TestSuite.prototype.testHeapProfiler = function()
+{
+ this.showPanel("profiles");
+
+ var panel = WebInspector.panels.profiles;
+ var test = this;
+
+ function findDisplayedNode() {
+ var node = panel.visibleView.dataGrid.children[0];
+ if (!node) {
+ // Profile hadn't been queried yet, re-schedule.
+ window.setTimeout(findDisplayedNode, 100);
+ return;
+ }
+
+ // Iterate over displayed functions and find node called "A"
+ // If found, this will mean that we actually have taken heap snapshot.
+ while (node) {
+ if (node.constructorName.indexOf("A") !== -1) {
+ test.releaseControl();
+ return;
+ }
+ node = node.traverseNextNode(false, null, true);
+ }
+
+ test.fail();
+ }
+
+ function findVisibleView() {
+ if (!panel.visibleView) {
+ setTimeout(findVisibleView, 0);
+ return;
+ }
+ setTimeout(findDisplayedNode, 0);
+ }
+
+ WebInspector.HeapSnapshotProfileType.prototype.buttonClicked();
+ findVisibleView();
+ this.takeControl();
+};
+
+
+/**
* Tests that scripts tab can be open and populated with inspected scripts.
*/
TestSuite.prototype.testShowScriptsTab = function()
@@ -488,31 +533,19 @@ TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function()
var test = this;
this.assertEquals(WebInspector.panels.elements, WebInspector.currentPanel, "Elements panel should be current one.");
- this.addSniffer(devtools.DebuggerAgent.prototype, "reset", waitUntilScriptIsParsed);
+ this.addSniffer(WebInspector.panels.scripts, "reset", waitUntilScriptIsParsed);
// Reload inspected page. It will reset the debugger agent.
test.evaluateInConsole_(
"window.location.reload(true);",
- function(resultText) {
- test.assertEquals("undefined", resultText, "Unexpected result of reload().");
- });
+ function(resultText) {});
function waitUntilScriptIsParsed() {
- var parsed = devtools.tools.getDebuggerAgent().parsedScripts_;
- for (var id in parsed) {
- var url = parsed[id].getUrl();
- if (url && url.search("debugger_test_page.html") !== -1) {
- checkScriptsPanel();
- return;
- }
- }
- test.addSniffer(devtools.DebuggerAgent.prototype, "addScriptInfo_", waitUntilScriptIsParsed);
- }
-
- function checkScriptsPanel() {
test.showPanel("scripts");
- test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html"]), "Inspected script not found in the scripts list");
- test.releaseControl();
+ test._waitUntilScriptsAreParsed(["debugger_test_page.html"],
+ function() {
+ test.releaseControl();
+ });
}
// Wait until all scripts are added to the debugger.
@@ -603,7 +636,7 @@ TestSuite.prototype.testSetBreakpoint = function()
var test = this;
this.showPanel("scripts");
- var breakpointLine = 12;
+ var breakpointLine = 16
this._waitUntilScriptsAreParsed(["debugger_test_page.html"],
function() {
@@ -611,15 +644,25 @@ TestSuite.prototype.testSetBreakpoint = function()
"debugger_test_page.html",
function(view, url) {
view._addBreakpoint(breakpointLine);
- // Force v8 execution.
- RemoteDebuggerAgent.processDebugCommands();
- test.waitForSetBreakpointResponse_(url, breakpointLine,
- function() {
- test.releaseControl();
+
+ test.evaluateInConsole_(
+ 'setTimeout("calculate()" , 0)',
+ function(resultText) {
+ test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
});
});
});
+ this._waitForScriptPause(
+ {
+ functionsOnStack: ["calculate", ""],
+ lineNumber: breakpointLine,
+ lineText: " result = fib(lastVal++);"
+ },
+ function() {
+ test.releaseControl();
+ });
+
this.takeControl();
};
@@ -632,21 +675,13 @@ TestSuite.prototype.testPauseOnException = function()
this.showPanel("scripts");
var test = this;
- // TODO(yurys): remove else branch once the states are supported.
- if (WebInspector.ScriptsPanel.PauseOnExceptionsState) {
- while (WebInspector.currentPanel._pauseOnExceptionButton.state !== WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions)
- WebInspector.currentPanel._pauseOnExceptionButton.element.click();
- } else {
- // Make sure pause on exceptions is on.
- if (!WebInspector.currentPanel._pauseOnExceptionButton.toggled)
- WebInspector.currentPanel._pauseOnExceptionButton.element.click();
- }
+ InspectorBackend.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
this._executeCodeWhenScriptsAreParsed("handleClick()", ["pause_on_exception.html"]);
this._waitForScriptPause(
{
- functionsOnStack: ["throwAnException", "handleClick", "(anonymous function)"],
+ functionsOnStack: ["throwAnException", "handleClick", ""],
lineNumber: 6,
lineText: " return unknown_var;"
},
@@ -728,7 +763,7 @@ TestSuite.prototype.testPauseWhenScriptIsRunning = function()
test._waitForScriptPause(
{
- functionsOnStack: ["handleClick", "(anonymous function)"],
+ functionsOnStack: ["handleClick", ""],
lineNumber: 5,
lineText: " while(true) {"
},
@@ -861,36 +896,30 @@ TestSuite.prototype.testEvalOnCallFrame = function()
var breakpointLine = 16;
var test = this;
- this.addSniffer(devtools.DebuggerAgent.prototype, "handleScriptsResponse_",
- function(msg) {
+ this._waitUntilScriptsAreParsed(["debugger_test_page.html"],
+ function() {
test.showMainPageScriptSource_(
"debugger_test_page.html",
function(view, url) {
view._addBreakpoint(breakpointLine);
- // Force v8 execution.
- RemoteDebuggerAgent.processDebugCommands();
- test.waitForSetBreakpointResponse_(url, breakpointLine, setBreakpointCallback);
+
+ // Since breakpoints are ignored in evals' calculate() function is
+ // execute after zero-timeout so that the breakpoint is hit.
+ test.evaluateInConsole_(
+ 'setTimeout("calculate(123)" , 0)',
+ function(resultText) {
+ test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
+ waitForBreakpointHit();
+ });
});
});
- function setBreakpointCallback() {
- // Since breakpoints are ignored in evals' calculate() function is
- // execute after zero-timeout so that the breakpoint is hit.
- test.evaluateInConsole_(
- 'setTimeout("calculate(123)" , 0)',
- function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
- waitForBreakpointHit();
- });
- }
-
function waitForBreakpointHit() {
- test.addSniffer(
- devtools.DebuggerAgent.prototype,
- "handleBacktraceResponse_",
- function(msg) {
- test.assertEquals(2, this.callFrames_.length, "Unexpected stack depth on the breakpoint. " + JSON.stringify(msg));
- test.assertEquals("calculate", this.callFrames_[0].functionName, "Unexpected top frame function.");
+ test.addSniffer(WebInspector,
+ "pausedScript",
+ function(callFrames) {
+ test.assertEquals(2, callFrames.length, "Unexpected stack depth on the breakpoint. " + JSON.stringify(callFrames, null, 4));
+ test.assertEquals("calculate", callFrames[0].functionName, "Unexpected top frame function.");
// Evaluate "e+1" where "e" is an argument of "calculate" function.
test.evaluateInConsole_(
"e+1",
@@ -916,7 +945,7 @@ TestSuite.prototype.testCompletionOnPause = function()
this._waitForScriptPause(
{
- functionsOnStack: ["innerFunction", "handleClick", "(anonymous function)"],
+ functionsOnStack: ["innerFunction", "handleClick", ""],
lineNumber: 9,
lineText: " debugger;"
},
@@ -963,6 +992,9 @@ TestSuite.prototype.testCompletionOnPause = function()
*/
TestSuite.prototype.testAutoContinueOnSyntaxError = function()
{
+ if (window.v8ScriptDebugServerEnabled)
+ return;
+
this.showPanel("scripts");
var test = this;
@@ -978,6 +1010,7 @@ TestSuite.prototype.testAutoContinueOnSyntaxError = function()
}
}
+
this.addSniffer(devtools.DebuggerAgent.prototype, "handleScriptsResponse_",
function(msg) {
checkScriptsList();
@@ -1140,7 +1173,7 @@ TestSuite.prototype._executeCodeWhenScriptsAreParsed = function(code, expectedSc
test.evaluateInConsole_(
'setTimeout("' + code + '" , 0)',
function(resultText) {
- test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText);
+ test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText + ". Code: " + code);
});
}
@@ -1188,7 +1221,7 @@ TestSuite.prototype.testStepOver = function()
this._performSteps([
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 3,
lineText: " debugger;"
},
@@ -1196,7 +1229,7 @@ TestSuite.prototype.testStepOver = function()
document.getElementById("scripts-step-over").click();
},
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 5,
lineText: " var y = fact(10);"
},
@@ -1204,7 +1237,7 @@ TestSuite.prototype.testStepOver = function()
document.getElementById("scripts-step-over").click();
},
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 6,
lineText: " return y;"
},
@@ -1229,7 +1262,7 @@ TestSuite.prototype.testStepOut = function()
this._performSteps([
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 3,
lineText: " debugger;"
},
@@ -1237,7 +1270,7 @@ TestSuite.prototype.testStepOut = function()
document.getElementById("scripts-step-out").click();
},
{
- functionsOnStack: ["a","(anonymous function)"],
+ functionsOnStack: ["a",""],
lineNumber: 8,
lineText: " printResult(result);"
},
@@ -1262,7 +1295,7 @@ TestSuite.prototype.testStepIn = function()
this._performSteps([
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 3,
lineText: " debugger;"
},
@@ -1270,7 +1303,7 @@ TestSuite.prototype.testStepIn = function()
document.getElementById("scripts-step-over").click();
},
{
- functionsOnStack: ["d","a","(anonymous function)"],
+ functionsOnStack: ["d","a",""],
lineNumber: 5,
lineText: " var y = fact(10);"
},
@@ -1278,7 +1311,7 @@ TestSuite.prototype.testStepIn = function()
document.getElementById("scripts-step-into").click();
},
{
- functionsOnStack: ["fact","d","a","(anonymous function)"],
+ functionsOnStack: ["fact","d","a",""],
lineNumber: 10,
lineText: " var r = 1;"
},
@@ -1440,7 +1473,7 @@ TestSuite.prototype.testExpandScope = function()
this._waitForScriptPause(
{
- functionsOnStack: ["innerFunction", "handleClick", "(anonymous function)"],
+ functionsOnStack: ["innerFunction", "handleClick", ""],
lineNumber: 8,
lineText: " debugger;"
},
@@ -1463,14 +1496,14 @@ TestSuite.prototype.testExpandScope = function()
properties: {
x:"2009",
innerFunctionLocalVar:"2011",
- "this": "global",
+ "this": (window.v8ScriptDebugServerEnabled ? "DOMWindow" : "global"),
}
},
{
title: "Closure",
properties: {
- n:"TextParam",
- makeClosureLocalVar:"local.TextParam",
+ n: (window.v8ScriptDebugServerEnabled ? '"TextParam"' : "TextParam"),
+ makeClosureLocalVar: (window.v8ScriptDebugServerEnabled ? '"local.TextParam"' : "local.TextParam"),
}
},
{
@@ -1554,7 +1587,7 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
this._waitForScriptPause(
{
- functionsOnStack: ["callDebugger", "handleClick", "(anonymous function)"],
+ functionsOnStack: ["callDebugger", "handleClick", ""],
lineNumber: 29,
lineText: " debugger;"
},
@@ -1574,6 +1607,15 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
}
function examineLocalScope() {
+ if (window.v8ScriptDebugServerEnabled) {
+ var scopeExpectations = [
+ "a", "Child", [
+ "constructor", "function Child(n) {", null,
+ "parentField", "10", null,
+ "childField", "20", null,
+ ]
+ ];
+ } else {
var scopeExpectations = [
"a", "Object", [
"constructor", "function Child()", [
@@ -1606,13 +1648,14 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
"childField", 20, null,
]
];
+ }
checkProperty(localScopeSection.propertiesTreeOutline, "<Local Scope>", scopeExpectations);
}
var propQueue = [];
var index = 0;
- var expectedFinalIndex = 8;
+ var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 1 : 8);
function expandAndCheckNextProperty() {
if (index === propQueue.length) {