summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium')
-rw-r--r--Source/WebKit/chromium/ChangeLog1092
-rw-r--r--Source/WebKit/chromium/DEPS6
-rw-r--r--Source/WebKit/chromium/WebKit.gyp12
-rw-r--r--Source/WebKit/chromium/features.gypi4
-rwxr-xr-xSource/WebKit/chromium/gyp_webkit9
-rw-r--r--Source/WebKit/chromium/public/WebAutoFillClient.h5
-rw-r--r--Source/WebKit/chromium/public/WebFormControlElement.h2
-rw-r--r--Source/WebKit/chromium/public/WebFrameClient.h10
-rw-r--r--Source/WebKit/chromium/public/WebGraphicsContext3D.h344
-rw-r--r--Source/WebKit/chromium/public/WebIDBCallbacks.h2
-rw-r--r--Source/WebKit/chromium/public/WebIDBDatabase.h10
-rwxr-xr-xSource/WebKit/chromium/public/WebIDBObjectStore.h12
-rw-r--r--Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h2
-rw-r--r--Source/WebKit/chromium/public/WebIconLoadingCompletion.h53
-rw-r--r--Source/WebKit/chromium/public/WebInputElement.h10
-rw-r--r--Source/WebKit/chromium/public/WebKitClient.h1
-rw-r--r--Source/WebKit/chromium/public/WebMenuItemInfo.h3
-rw-r--r--Source/WebKit/chromium/public/WebNotification.h4
-rw-r--r--Source/WebKit/chromium/public/WebPoint.h2
-rw-r--r--Source/WebKit/chromium/public/WebPopupMenuInfo.h2
-rw-r--r--Source/WebKit/chromium/public/WebRect.h2
-rw-r--r--Source/WebKit/chromium/public/WebRuntimeFeatures.h5
-rw-r--r--Source/WebKit/chromium/public/WebSelectElement.h4
-rw-r--r--Source/WebKit/chromium/public/WebSettings.h4
-rw-r--r--Source/WebKit/chromium/public/WebSize.h2
-rw-r--r--Source/WebKit/chromium/public/WebSpeechInputController.h5
-rw-r--r--Source/WebKit/chromium/public/WebTextCheckingCompletion.h51
-rw-r--r--Source/WebKit/chromium/public/WebTextCheckingResult.h65
-rw-r--r--Source/WebKit/chromium/public/WebURLResponse.h5
-rw-r--r--Source/WebKit/chromium/public/WebViewClient.h16
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp5
-rw-r--r--Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp4
-rw-r--r--Source/WebKit/chromium/src/AsyncFileSystemChromium.h6
-rw-r--r--Source/WebKit/chromium/src/AudioDestinationChromium.cpp5
-rw-r--r--Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp5
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.cpp38
-rw-r--r--Source/WebKit/chromium/src/ChromeClientImpl.h6
-rw-r--r--Source/WebKit/chromium/src/ContextMenuClientImpl.cpp2
-rw-r--r--Source/WebKit/chromium/src/DragClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/DragClientImpl.h2
-rw-r--r--Source/WebKit/chromium/src/DragScrollTimer.cpp8
-rw-r--r--Source/WebKit/chromium/src/EditorClientImpl.cpp19
-rw-r--r--Source/WebKit/chromium/src/EditorClientImpl.h9
-rw-r--r--Source/WebKit/chromium/src/Extensions3DChromium.cpp14
-rw-r--r--Source/WebKit/chromium/src/ExternalPopupMenu.cpp12
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp6
-rw-r--r--Source/WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp65
-rw-r--r--Source/WebKit/chromium/src/GraphicsContext3DInternal.h10
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.cpp14
-rw-r--r--Source/WebKit/chromium/src/IDBCallbacksProxy.h1
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseProxy.cpp4
-rw-r--r--Source/WebKit/chromium/src/IDBDatabaseProxy.h2
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreProxy.cpp12
-rwxr-xr-xSource/WebKit/chromium/src/IDBObjectStoreProxy.h4
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp8
-rw-r--r--Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h1
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.cpp12
-rw-r--r--Source/WebKit/chromium/src/InspectorClientImpl.h3
-rw-r--r--Source/WebKit/chromium/src/LocalFileSystemChromium.cpp6
-rw-r--r--Source/WebKit/chromium/src/PlatformBridge.cpp46
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp76
-rw-r--r--Source/WebKit/chromium/src/WebDevToolsAgentImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h7
-rw-r--r--Source/WebKit/chromium/src/WebFontImpl.cpp24
-rw-r--r--Source/WebKit/chromium/src/WebFormControlElement.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp65
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebIDBCallbacksImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebIDBDatabaseImpl.h2
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp9
-rwxr-xr-xSource/WebKit/chromium/src/WebIDBObjectStoreImpl.h3
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp5
-rw-r--r--Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.cpp62
-rw-r--r--Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.h57
-rw-r--r--Source/WebKit/chromium/src/WebImageCG.cpp32
-rw-r--r--Source/WebKit/chromium/src/WebInputElement.cpp21
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp18
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h4
-rw-r--r--Source/WebKit/chromium/src/WebNotification.cpp6
-rw-r--r--Source/WebKit/chromium/src/WebPageSerializerImpl.cpp4
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp147
-rw-r--r--Source/WebKit/chromium/src/WebPopupMenuImpl.cpp24
-rw-r--r--Source/WebKit/chromium/src/WebRuntimeFeatures.cpp20
-rw-r--r--Source/WebKit/chromium/src/WebScrollbarImpl.cpp41
-rw-r--r--Source/WebKit/chromium/src/WebScrollbarImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebSearchableFormData.cpp3
-rw-r--r--Source/WebKit/chromium/src/WebSelectElement.cpp8
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebSettingsImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp56
-rw-r--r--Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h58
-rw-r--r--Source/WebKit/chromium/src/WebTextRun.cpp2
-rw-r--r--Source/WebKit/chromium/src/WebURLResponse.cpp10
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp29
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h1
-rw-r--r--Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp4
-rw-r--r--Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h6
-rw-r--r--Source/WebKit/chromium/src/js/DevTools.js13
-rw-r--r--Source/WebKit/chromium/src/js/Tests.js2
-rw-r--r--Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h84
-rw-r--r--Source/WebKit/chromium/tests/PopupMenuTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/TransparencyWinTest.cpp4
107 files changed, 2324 insertions, 710 deletions
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index e2d81f7..1cb0068 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,1095 @@
+2011-02-11 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Allow turning off multisampling through web preference settings
+ https://bugs.webkit.org/show_bug.cgi?id=54321
+
+ * public/WebSettings.h: Add a flag for multisampling setting.
+ * src/WebSettingsImpl.cpp: Ditto.
+ (WebKit::WebSettingsImpl::setOpenGLMultisamplingEnabled):
+ * src/WebSettingsImpl.h: Ditto.
+
+2011-02-12 Jochen Eisinger <jochen@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Implement IDBObjectStore::clear
+ https://bugs.webkit.org/show_bug.cgi?id=54193
+
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::clear):
+ * src/IDBObjectStoreProxy.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::clear):
+ * src/WebIDBObjectStoreImpl.h:
+
+2011-02-11 David Grogan <dgrogan@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ indexeddb: add onBlocked to WebKit::WebIDBCallbacks
+ https://bugs.webkit.org/show_bug.cgi?id=54329
+
+ * public/WebIDBCallbacks.h:
+ (WebKit::WebIDBCallbacks::onBlocked):
+
+2011-02-11 Adam Klein <adamk@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [fileapi] Add support for filesystem: URI handling
+ https://bugs.webkit.org/show_bug.cgi?id=53529
+
+ Changes to Chromium WebKit API required to expose
+ the FileSystem type to WebCore's fileapi code, since the
+ type is part of the filesystem URI.
+
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::AsyncFileSystemChromium):
+ * src/AsyncFileSystemChromium.h:
+ (WebCore::AsyncFileSystemChromium::create):
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::LocalFileSystem::readFileSystem):
+ (WebCore::LocalFileSystem::requestFileSystem):
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
+ (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem):
+ * src/WebFileSystemCallbacksImpl.h:
+ * src/WorkerAsyncFileSystemChromium.cpp:
+ (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
+ * src/WorkerAsyncFileSystemChromium.h:
+ (WebCore::WorkerAsyncFileSystemChromium::create):
+
+2011-02-10 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Update calls to DocumentWriter.
+ https://bugs.webkit.org/show_bug.cgi?id=50489
+
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::finishedLoading):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::encoding):
+ (WebKit::WebFrameImpl::loadJavaScriptURL):
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::serialize):
+ * src/WebSearchableFormData.cpp:
+ (HTMLNames::GetFormEncoding):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::pageEncoding):
+
+2011-02-10 Pavel Feldman <pfeldman@chromium.org>
+
+ Not reviewed: chromium build fix.
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgent::shouldInterruptForMessage):
+
+2011-02-10 Jochen Eisinger <jochen@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [chromium] add WebIDBObjectStore::clear method
+
+ https://bugs.webkit.org/show_bug.cgi?id=54149
+
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::put):
+ (WebKit::WebIDBObjectStore::deleteFunction):
+ (WebKit::WebIDBObjectStore::clear):
+
+2011-02-10 Avi Drissman <avi@google.com>
+
+ Reviewed by Darin Fisher.
+
+ <option> should implement the dir attribute. Mac Chromium version, followup to r76983, r77654.
+ https://bugs.webkit.org/show_bug.cgi?id=50969
+
+ Use manual test Source/WebCore/manual-tests/pop-up-alignment-and-direction.html added in r76983.
+
+ * public/WebMenuItemInfo.h:
+ * public/WebPopupMenuInfo.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::getPopupMenuInfo):
+ * src/ExternalPopupMenu.cpp:
+ (WebKit::ExternalPopupMenu::getPopupMenuInfo):
+
+2011-02-09 David Holloway <dhollowa@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Removes deprecated interface WebAutoFillClient::didAcceptAutocompleteSuggestion(). This interface has been replaced by the more general WebAutoFillClient::didAcceptAutoFillSuggestion() method.
+ https://bugs.webkit.org/show_bug.cgi?id=54125
+
+ * public/WebAutoFillClient.h:
+ * src/EditorClientImpl.cpp:
+ * src/EditorClientImpl.h:
+
+2011-02-09 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Export WebInputElement::defaultMaxLength as a function rather than a constant.
+ Needed because the order of initialization of static constants
+ is not guaranteed across compilation units.
+ https://bugs.webkit.org/show_bug.cgi?id=54056
+
+ * public/WebInputElement.h:
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::defaultMaxLength): Now a static function.
+
+2011-02-09 Sailesh Agrawal <sail@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Search/replace references to gfx/* with ui/gfx/*
+
+ * public/WebPoint.h:
+ * public/WebRect.h:
+ * public/WebSize.h:
+
+2011-02-09 Nebojsa Ciric <cira@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Implements Locale object of JavaScript internationalization API proposal, as an
+ v8 extension. Extension code is hosted in v8 project (src/extensions/experimental/i18n-extension.{cc,h})
+ and in this patch we just provide flags, tests and build rules for chromium port.
+ https://bugs.webkit.org/show_bug.cgi?id=49414
+
+ * features.gypi:
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableExperimentalI18NAPI):
+ (WebKit::WebRuntimeFeatures::isExperimentalI18NAPIEnabled):
+
+2011-02-09 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [Chromium] WebTextCheckingResult should have a default constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=54075
+
+ Gave default parameters to WebTextCheckingResult constructor.
+
+ * public/WebTextCheckingResult.h:
+ (WebKit::WebTextCheckingResult::WebTextCheckingResult):
+
+2011-02-08 Sailesh Agrawal <sail@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Invalidate rect doesn't work for windowless plugins on Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=53117
+
+ Invalidate rect for windowless plugins wasn't working if the web page was composited.
+
+ The problem was that the invalidate call was causing simply dirtying the LayerChromium layers. Since the plugin was windowless this didn't cause the plugin to be repainted.
+
+ Fix was to copy the invalidate code from WebCore/plugins/PluginView.cpp/PluginView::invalidateWindowlessPluginRect() which does the correct thing.
+
+ Tested my fix on Windows and Mac and verified that the movie on http://apple.com/appltv correctly plays. Verified that windowed plugins still correctly draw as well.
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::invalidateRect):
+
+2011-02-08 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove orphan code from old parser
+ https://bugs.webkit.org/show_bug.cgi?id=53984
+
+ * src/ChromeClientImpl.h:
+
+2011-02-08 Tony Chang <tony@chromium.org>
+
+ Unreviewed, build fix for clobber builds of DRT on mac/linux.
+
+ This file moved in chromium r73530 and this path wasn't changed.
+
+ * WebKit.gyp:
+
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ Minor change enforced by major changes in WebCore/inspector/InspectorController.
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorBackend):
+ * src/WebViewImpl.h:
+
+2011-02-07 Alexey Marinichev <amarinichev@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Hook up WebGraphicsContext3D::setContextLostCallback.
+ https://bugs.webkit.org/show_bug.cgi?id=53722
+
+ Test: fast/canvas/webgl/context-lost.html, comment out the line with
+ extension.loseContext() and kill the GPU process "Lose context"
+ message shows up.
+
+ * public/WebGraphicsContext3D.h:
+ (WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback::~WebGraphicsContextLostCallback):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContextLostCallbackAdapter::~GraphicsContextLostCallbackAdapter):
+ (WebCore::GraphicsContextLostCallbackAdapter::GraphicsContextLostCallbackAdapter):
+ (WebCore::GraphicsContextLostCallbackAdapter::onContextLost):
+ (WebCore::GraphicsContextLostCallbackAdapter::create):
+ (WebCore::GraphicsContext3DInternal::setContextLostCallback):
+ * src/GraphicsContext3DInternal.h:
+
+2011-02-07 Adam Klein <adamk@chromium.org>
+
+ Reviewed by Jian Li.
+
+ [chromium] Remove deprecated method WebNotification::dir
+ https://bugs.webkit.org/show_bug.cgi?id=53735
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+
+2011-02-03 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Should implement EditorClientImpl::requestCheckingOfString()
+ https://bugs.webkit.org/show_bug.cgi?id=51013
+
+ - Added WebTextCheckingCompletion to receive the checked result asynchronously.
+ - Added WebViewClient::requestCheckingOfText() and related classes.
+ - Implemented EditorClientImpl::requestCheckingOfString().
+
+ * WebKit.gyp:
+ * public/WebSettings.h:
+ * public/WebTextCheckingCompletion.h: Added.
+ (WebKit::WebTextCheckingCompletion::~WebTextCheckingCompletion):
+ * public/WebTextCheckingResult.h: Added.
+ (WebKit::WebTextCheckingResult::error):
+ (WebKit::WebTextCheckingResult::position):
+ (WebKit::WebTextCheckingResult::length):
+ (WebKit::WebTextCheckingResult::WebTextCheckingResult):
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::requestCheckingOfText): Gave an implementation
+ * src/AssertMatchingEnums.cpp:
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::requestCheckingOfString):
+ * src/EditorClientImpl.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setAsynchronousSpellCheckingEnabled):
+ * src/WebSettingsImpl.h:
+ * src/WebTextCheckingCompletionImpl.cpp: Added.
+ (WebKit::toCoreResults):
+ (WebKit::WebTextCheckingCompletionImpl::didFinishCheckingText):
+ * src/WebTextCheckingCompletionImpl.h: Added.
+ (WebKit::WebTextCheckingCompletionImpl::WebTextCheckingCompletionImpl):
+
+2011-02-07 Enrica Casucci <enrica@apple.com>
+
+ Reviewed Adam Roben and Darin Adler.
+
+ WebKit2: drag and drop support on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=52775
+
+ Removed createDragImageForLink from DragClient.
+
+ * src/DragClientImpl.cpp:
+ * src/DragClientImpl.h:
+
+2011-02-04 Charlie Reis <creis@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ Crash in WebCore::HistoryController::itemsAreClones
+ https://bugs.webkit.org/show_bug.cgi?id=52819
+
+ Removes unneeded sanity checks used for diagnosing a memory error.
+
+ * src/WebFrameImpl.cpp:
+
+2011-02-04 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Clone WebClipboard to be frame-specific.
+ https://bugs.webkit.org/show_bug.cgi?id=53727
+
+ For drop operations, Chrome currently snapshots the data and copies it
+ into the renderer process. As we add more supported drag data types, the
+ copy will become increasingly expensive. Instead, we'd like to snapshot
+ data in the browser to reduce the amount of data copied and to support
+ Blob in DataTransferItem. In order to allow this, we associated
+ WebClipboard with a frame so it can correctly route its IPCs to the
+ corresponding Chromium host.
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::clipboard):
+ * src/PlatformBridge.cpp:
+ (WebCore::getClipboard):
+ (WebCore::PlatformBridge::clipboardReadAvailableTypes):
+ (WebCore::PlatformBridge::clipboardReadData):
+ (WebCore::PlatformBridge::clipboardReadFilenames):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::fromFrame):
+ * src/WebFrameImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::dragTargetDragEnterNew):
+
+2011-02-04 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ Move chromium iframe shim code to cross-platform file
+ https://bugs.webkit.org/show_bug.cgi?id=52594
+
+ * src/WebPluginContainerImpl.cpp: Move code to WebCore/plugin/IFrameShimSupport.cpp
+
+2011-02-04 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by David Levin.
+
+ Implement "<option> should implement the dir attribute" for chromium port after r76983.
+ https://bugs.webkit.org/show_bug.cgi?id=50969
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection): Override as true.
+ * src/WebViewImpl.cpp: Remove directionality hint from autofill drop-down setting.
+
+2011-02-01 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Remove the timeout event from IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=53521
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::transaction):
+ * public/WebIDBTransactionCallbacks.h:
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::transaction):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBTransactionCallbacksProxy.cpp:
+ * src/IDBTransactionCallbacksProxy.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::transaction):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBTransactionCallbacksImpl.cpp:
+ * src/WebIDBTransactionCallbacksImpl.h:
+
+2011-02-04 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed.
+
+ Roll chromium to 73764.
+
+ * DEPS:
+
+2011-02-03 James Kozianski <koz@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add navigator.registerProtocolHandler behind a flag.
+ https://bugs.webkit.org/show_bug.cgi?id=52609
+
+ * features.gypi:
+ * public/WebViewClient.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::registerProtocolHandler):
+ * src/ChromeClientImpl.h:
+
+2011-02-03 Brian Ryner <bryner@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add a field to the ResourceResponse for tracking the socket address
+ of the host that the resource was fetched from. Patch was originally
+ by Paul Marks.
+ https://bugs.webkit.org/show_bug.cgi?id=53699
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::socketAddress):
+ (WebKit::WebURLResponse::setSocketAddress):
+
+2011-02-03 Adam Langley <agl@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Plumb mixed script URL to FrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=52384
+
+ Regressions covered by http/tests/security/mixedContent/*
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didRunInsecureContent):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::didRunInsecureContent):
+ * src/FrameLoaderClientImpl.h:
+
+2011-02-03 Victoria Kirst <vrk@google.com>
+
+ Reviewed by James Robinson.
+
+ [chromium] Fix redundant video frame paint on CSS LayerChromium for <video>
+ https://bugs.webkit.org/show_bug.cgi?id=52868
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::paint):
+ (WebKit::WebMediaPlayerClientImpl::paintCurrentFrameInContext):
+ (WebKit::WebMediaPlayerClientImpl::acceleratedRenderingInUse):
+ * src/WebMediaPlayerClientImpl.h:
+
+2011-02-03 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Don't clear the callbacks ref in the proxy layer for IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=53535
+
+ Clearing the callbacks doesn't actually solve any problems and makes
+ this code behave subtly differently than how it would in Safari and
+ other single process environments. Let's remove the difference.
+
+ * src/IDBCallbacksProxy.cpp:
+ (WebCore::IDBCallbacksProxy::onError):
+ (WebCore::IDBCallbacksProxy::onSuccess):
+ * src/IDBTransactionCallbacksProxy.cpp:
+ (WebCore::IDBTransactionCallbacksProxy::onAbort):
+ (WebCore::IDBTransactionCallbacksProxy::onComplete):
+ (WebCore::IDBTransactionCallbacksProxy::onTimeout):
+
+2011-02-03 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Chromium: Remove deprecated WebIDBObjectStore::put() function
+ https://bugs.webkit.org/show_bug.cgi?id=53669
+
+ Remove deprecated put() function. Chromium side code now overrides
+ the new version.
+
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::put):
+
+2011-02-01 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: introduce new api for managing JavaScript breakpoints.
+ https://bugs.webkit.org/show_bug.cgi?id=53235
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgent::shouldInterruptForMessage):
+
+2011-02-02 Evan Martin <evan@chromium.org>
+
+ Unreviewed, DEPS change.
+
+ * DEPS: update to pick up newer Skia.
+
+2011-02-02 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Update more references to right() and bottom() in Chromium.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas): Replaced bottom/right with maxY/maxX.
+
+2011-02-02 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Update more references to right() and bottom() in Chromium Win.
+
+ * tests/TransparencyWinTest.cpp:
+ (WebCore::TEST): Replaced bottom/right with maxY/maxX.
+
+2011-02-02 Matthew Vosburgh <maf@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Some favicons not correctly decoded by Chromium/Mac
+ https://bugs.webkit.org/show_bug.cgi?id=53448
+
+ * src/WebImageCG.cpp:
+ (WebKit::WebImage::fromData):
+
+2011-02-02 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Remove remaining references to right() and bottom() from Chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=53613
+
+ * src/DragScrollTimer.cpp:
+ (WebKit::distanceToRect): Replaced right/bottom with maxX/maxY.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas): Ditto.
+
+2011-02-01 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Avoid #ifdefs in code that constructs a GraphicsContext by
+ adding a helper class.
+ https://bugs.webkit.org/show_bug.cgi?id=53575
+
+ * WebKit.gyp:
+ * src/WebFontImpl.cpp:
+ (WebKit::WebFontImpl::drawText):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::printPage):
+ (WebKit::WebFrameImpl::paint):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::paint):
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::paint):
+ * src/painting: Added.
+ * src/painting/GraphicsContextBuilder.h: Added.
+ (WebKit::GraphicsContextBuilder::GraphicsContextBuilder):
+ (WebKit::GraphicsContextBuilder::context):
+
+2011-02-02 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB: Implement support for cursor updates
+ https://bugs.webkit.org/show_bug.cgi?id=53421
+
+ Mirror the update to the IDBObjectStoreInterface::put() signature in
+ the WebKit layer wrappers.
+
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::put):
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::put):
+ * src/IDBObjectStoreProxy.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::put):
+ * src/WebIDBObjectStoreImpl.h:
+
+2011-02-02 Chris Evans <cevans@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Propagate the accurate gesture status when calling into FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=53571
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::loadFrameRequest): FrameLoader might decide the target is a new window, so make such the UserGestureIndicator is fully accurate before calling into it.
+
+2011-02-01 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [Chromium] Roll Chromium revision for the WebKitWeightWatcher change
+ https://bugs.webkit.org/show_bug.cgi?id=53563
+
+ * DEPS: Roll to crrev.com/73378 to have the WebKitWeightWatcher change of webkit_support.
+
+2011-02-01 Darin Fisher <darin@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Remove unnecessary WebCore:: prefixing in a few places and fix-up some indentation.
+ https://bugs.webkit.org/show_bug.cgi?id=53523
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::attach):
+ (WebKit::WebDevToolsAgentImpl::inspectNode):
+ (WebKit::WebDevToolsAgentImpl::inspectorController):
+ (WebKit::WebDevToolsAgentImpl::mainFrame):
+ (WebKit::WebDevToolsAgentImpl::identifierForInitialRequest):
+ (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend):
+ (WebKit::WebDevToolsAgentImpl::updateInspectorStateCookie):
+ (WebKit::WebDevToolsAgent::interruptAndDispatch):
+ (WebKit::WebDevToolsAgent::processPendingMessages):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::resize):
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::setLocation):
+ (WebKit::WebScrollbarImpl::setValue):
+ (WebKit::WebScrollbarImpl::onMouseWheel):
+ (WebKit::WebScrollbarImpl::onKeyDown):
+ (WebKit::WebScrollbarImpl::scrollPosition):
+ (WebKit::WebScrollbarImpl::setScrollOffset):
+ (WebKit::WebScrollbarImpl::invalidateScrollbarRect):
+ (WebKit::WebScrollbarImpl::getTickmarks):
+
+2011-02-01 Mihai Parparita <mihaip@chromium.org>
+
+ Unreviewed roll of Chromium deps to r73306. This picks up a fix to get
+ the WebKit root dir correctly after the move to Source/. This allows
+ tests like http/tests/security/frame-loading-via-document-write.html
+ (which use LayoutTestController.pathToLocalResource) to pass with the
+ Chromium DRT.
+
+ * DEPS:
+
+2011-02-01 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane
+ https://bugs.webkit.org/show_bug.cgi?id=53482
+
+ * src/js/DevTools.js:
+ (WebInspector.openLinkExternallyLabel): Override to customize a context menu item label
+
+2011-02-01 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix some Visual Studio compiler warnings.
+ https://bugs.webkit.org/show_bug.cgi?id=53476
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::forms):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::repaint):
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::setValue):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas):
+ (WebKit::WebViewImpl::setZoomLevel):
+ (WebKit::WebViewImplScrollbarPaintInterface::paint):
+
+2011-02-01 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Chromium: remove WebIDBCallbacks::onSucces()
+ https://bugs.webkit.org/show_bug.cgi?id=53415
+
+ Remove un-used function.
+
+ * public/WebIDBCallbacks.h:
+
+2011-02-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Fix Chromium Debug compilation broken by r77228.
+
+ [Chromium] Autofill should work with HTML5 form elements
+ https://bugs.webkit.org/show_bug.cgi?id=51809
+
+ * src/WebInputElement.cpp:
+ (WebKit::toWebInputElement):
+
+2011-02-01 Naoki Takano <takano.naoki@gmail.com>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Autofill should work with HTML5 form elements
+ https://bugs.webkit.org/show_bug.cgi?id=51809
+ http://crbug.com/65654
+
+ No new tests, because this fix is for Chromium project and hard to test only in WebKit project.
+
+ * public/WebInputElement.h: Added toWebInputElement() declarations and implemented const version of toWebInputElement().
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::toWebInputElement): Implemented a convert function to cast no-const WebElement* to no-const WebInputElement*. Because Chrome needs safe cast for autofill completion.
+
+2011-01-31 Chris Rogers <crogers@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Improve audio latency on Mac OS X for chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=53452
+
+ * src/AudioDestinationChromium.cpp:
+
+2011-01-29 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Move CharacterNames.h into WTF directory
+ https://bugs.webkit.org/show_bug.cgi?id=49618
+
+ * src/ChromeClientImpl.cpp:
+
+2011-01-28 Ryosuke Niwa <rniwa@webkit.org>
+
+ Unreviewed; roll WebKit Chromium revision from 72894 to 73048.
+
+ * DEPS:
+
+2011-01-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <select> can't display right-to-left (rtl) languages
+ https://bugs.webkit.org/show_bug.cgi?id=19785
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::initialize): Pass hasTextDirectionOverride to the PopupMenuStyle
+ constructor.
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection): Added.
+ * src/ChromeClientImpl.h:
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestPopupMenuClient::itemStyle): Pass hasTextDirectionOverride to the PopupMenuStyle
+ constructor.
+
+2011-01-28 Adam Klein <adamk@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] Remove deprecated openFileSystem method signature
+ https://bugs.webkit.org/show_bug.cgi?id=53262
+
+ Chromium still builds after this patch.
+
+ * public/WebFrameClient.h:
+
+2011-01-28 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Andreas Kling.
+
+ Const-correct HTMLSelectElement and WebSelectElement
+ https://bugs.webkit.org/show_bug.cgi?id=53293
+
+ * public/WebSelectElement.h:
+ * src/WebSelectElement.cpp:
+ (WebKit::WebSelectElement::value): const.
+ (WebKit::WebSelectElement::listItems): const.
+
+2011-01-27 Finnur Thorarinsson <finnur.webkit@gmail.com>
+
+ Reviewed by Ojan Vafai.
+
+ This addresses a regression introduced by r75784, as described in:
+ https://bugs.webkit.org/show_bug.cgi?id=53176
+
+ The problem is that originalEndContainer and originalEndOffset was
+ meant to capture the end of the document, but was being assigned after
+ a call to searchRange->setStart() (when scoping is restarted), which can
+ result in the Range being collapsed to start (thereby assigning the
+ wrong value to the Container/Offset pair).
+
+ This code is never triggered by layout tests, but I'm adding a regressiono
+ test on the Chromium side for this.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::scopeStringMatches):
+
+2011-01-27 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Define GC3D types to match GL types and use them in WebGraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=51947
+
+ * public/WebGraphicsContext3D.h:
+
+2011-01-27 Zhenyao Mo <zmo@google.com>
+
+ Unreviewed, roll webkit chromium rev from 72673 to 72894.
+ Also, added gmock section in DEPS to pull down gmock.
+
+ * DEPS:
+
+2011-01-27 Alexey Marinichev <amarinichev@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Add a callback to WebGraphicsContext3D that is called when a context is lost
+ https://bugs.webkit.org/show_bug.cgi?id=53153
+
+ * public/WebGraphicsContext3D.h:
+ (WebKit::WebGraphicsContext3D::setContextLostCallback):
+
+2011-01-27 Mihai Parparita <mihaip@chromium.org>
+
+ Unreviewed, fixed upstream Chromium build
+
+ r76844 should have rolled back Chromium DEPS to 72673, not 72637.
+
+ * DEPS:
+
+2011-01-27 Zhenyao Mo <zmo@google.com>
+
+ Unreviewed, roll back webkit chromium rev to 72637.
+
+ * DEPS:
+
+2011-01-27 Zhenyao Mo <zmo@google.com>
+
+ Unreviewed.
+
+ Roll Webkit Chromium rev from 72637 to 72868.
+
+ * DEPS:
+
+2011-01-27 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
+ https://bugs.webkit.org/show_bug.cgi?id=53178
+
+ Remove the IDBCallbacks::onSuccess() function that was used for
+ null values, and replace such calls with calls to
+ IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
+ instead.
+
+ * public/WebIDBCallbacks.h:
+ (WebKit::WebIDBCallbacks::onSuccess):
+ * src/IDBCallbacksProxy.cpp:
+ * src/IDBCallbacksProxy.h:
+ * src/WebIDBCallbacksImpl.cpp:
+ * src/WebIDBCallbacksImpl.h:
+
+2011-01-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] WebFrame::forms() should not return empty WebFormElements
+ https://bugs.webkit.org/show_bug.cgi?id=53204
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::forms):
+ - Should iterate by forms->length(), not the number of HTMLElements.
+ - Do not increment the index for "temp" if a node is not an HTMLElement.
+
+2011-01-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/8446709> Allow inter-ideograph justification for CJK
+ https://bugs.webkit.org/show_bug.cgi?id=53184
+
+ * src/WebTextRun.cpp:
+ (WebKit::WebTextRun::operator WebCore::TextRun): Added a TrailingExpansionBehavior parameter to the
+ RenderText constructor.
+
+2011-01-26 Kenneth Russell <kbr@google.com>
+
+ Reviewed by James Robinson.
+
+ Fix multisampling support in DrawingBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=53154
+
+ Plumbed GL_ANGLE_framebuffer_multisample and
+ GL_ANGLE_framebuffer_blit (exposed as the unified extension
+ GL_CHROMIUM_framebuffer_multisample) through WebGraphicsContext3D.
+
+ * public/WebGraphicsContext3D.h:
+ * src/Extensions3DChromium.cpp:
+ (WebCore::Extensions3DChromium::blitFramebuffer):
+ (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::supportsExtension):
+ (WebCore::GraphicsContext3DInternal::ensureExtensionEnabled):
+ * src/GraphicsContext3DInternal.h:
+
+2011-01-26 Tony Chang <tony@chromium.org>
+
+ Unreviewed.
+
+ [chromium] revert r68310 because of race conditions detected by tsans
+ https://bugs.webkit.org/show_bug.cgi?id=53185
+
+ * DEPS: Roll chromium to 72673 to pick up sqlite revert.
+
+2011-01-26 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Add a DOMTimeStamp parameter to the requestAnimationFrame callback
+ https://bugs.webkit.org/show_bug.cgi?id=53142
+
+ Provides a timestamp to use for imperative animation callbacks. In this patch the timestamp is
+ just the current time at the start of the callback invocation algorithm. In the future we
+ could enhance this to try to take the compositing delay into effect to try to synchronize
+ imperative animations more closely with declarative ones, but this should do for now.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::animate):
+
+2011-01-25 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed trivial change.
+
+ * DEPS: Roll to r72581 to have a webkit_support fix.
+
+2011-01-25 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB: Remove PlatformBridge::idbShutdown()
+ https://bugs.webkit.org/show_bug.cgi?id=53077
+
+ Since Chromium r72157, this is not used anymore. Chromium keeps track
+ of when it shuts down IndexedDB itself.
+
+ * public/WebKitClient.h:
+ * src/PlatformBridge.cpp:
+
+2011-01-25 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Chromium WebKit API: Move dispatchFormControlChangeEvent() from WebInputElement to WebFormControlElement
+ In service of https://code.google.com/p/chromium/issues/detail?id=42716
+ https://bugs.webkit.org/show_bug.cgi?id=53069
+
+ * public/WebFormControlElement.h:
+ * public/WebInputElement.h:
+ * src/WebFormControlElement.cpp:
+ (WebKit::WebFormControlElement::dispatchFormControlChangeEvent): Moved from WebInputElement
+ * src/WebInputElement.cpp:
+
+2011-01-24 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Change ENABLE_3D_CANVAS to ENABLE_WEBGL
+ https://bugs.webkit.org/show_bug.cgi?id=53041
+
+ * WebKit.gyp:
+ * features.gypi:
+ * src/Extensions3DChromium.cpp:
+ * src/GraphicsContext3DChromium.cpp:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableWebGL):
+ (WebKit::WebRuntimeFeatures::isWebGLEnabled):
+
+2011-01-25 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Chromium] Prepare for landing of detailed heap snapshots.
+
+ - Introduce Preferences.detailedHeapProfiles flag for controlling
+ querying of detailed heap snapshots.
+ - Add boilerplate code for the new view.
+ - Factor out common code.
+
+ https://bugs.webkit.org/show_bug.cgi?id=52624
+
+ * src/js/DevTools.js:
+ ():
+
+2011-01-25 Pavel Podivilov <podivilov@chromium.org>
+
+ Unreviewed, trivial debugger test fix.
+
+ * src/js/Tests.js:
+
+2011-01-24 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Remove sizeInBytes from GraphicsContext3D's various implementations
+ https://bugs.webkit.org/show_bug.cgi?id=52339
+
+ * src/GraphicsContext3DChromium.cpp:
+ * src/GraphicsContext3DInternal.h:
+
+2011-01-24 Tony Chang <tony@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] turn off gyp circular dependency checking and roll chromium deps
+ https://bugs.webkit.org/show_bug.cgi?id=52935
+
+ * DEPS:
+ * gyp_webkit: Turn off gyp circular dependency checking on Linux
+ and Win since we don't do these checks in gyp_chromium. It's
+ just making it harder for us to roll DEPS and have something
+ explode.
+
+2011-01-24 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Csaba Osztrogonác.
+
+ Remove obsolete public/API method in chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=53015
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition): Removed obsolete method
+
+2010-01-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Support icon loading for <input type=file>
+ https://bugs.webkit.org/show_bug.cgi?id=38982
+
+ Implement ChromeClientImpl::chooseIconForFiles(). It delegates loading
+ to WebViewClient::queryIconForFiles(), and an implementation of
+ WebViewClient::queryIconForFiles() loads an icon and passes it to a
+ FileChooser through WebIconLoadingCompletion.
+
+ * WebKit.gyp:
+ * public/WebIconLoadingCompletion.h: Added.
+ (WebKit::WebIconLoadingCompletion::~WebIconLoadingCompletion):
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::queryIconForFiles):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::chooseIconForFiles):
+ * src/WebIconLoadingCompletionImpl.cpp: Added.
+ (WebKit::WebIconLoadingCompletionImpl::WebIconLoadingCompletionImpl):
+ (WebKit::WebIconLoadingCompletionImpl::~WebIconLoadingCompletionImpl):
+ (WebKit::WebIconLoadingCompletionImpl::didLoadIcon):
+ * src/WebIconLoadingCompletionImpl.h: Added.
+
+2011-01-22 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium]: Fix WebScrollbarImpl not getting scroll events after recent scrollbar refactoring
+ https://bugs.webkit.org/show_bug.cgi?id=52967
+
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::horizontalScrollbar):
+ (WebKit::WebScrollbarImpl::verticalScrollbar):
+ * src/WebScrollbarImpl.h:
+
+2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Introduce FontMetrics abstraction
+ https://bugs.webkit.org/show_bug.cgi?id=51456
+
+ * src/ExternalPopupMenu.cpp: Use FontMetrics instead of Font to access the metrics.
+ (WebKit::ExternalPopupMenu::getPopupMenuInfo):
+ * src/WebFontImpl.cpp: Ditto.
+ (WebKit::WebFontImpl::ascent):
+ (WebKit::WebFontImpl::descent):
+ (WebKit::WebFontImpl::height):
+ (WebKit::WebFontImpl::lineSpacing):
+ (WebKit::WebFontImpl::xHeight):
+
+2011-01-21 Chris Rogers <crogers@google.com>
+
+ Unreviewed
+
+ define HAS_WEBAUDIO_RUNTIMEFEATURES for synchronization with chromium patch landing
+ https://bugs.webkit.org/show_bug.cgi?id=52941
+
+ * public/WebRuntimeFeatures.h:
+
+2011-01-21 Chris Rogers <crogers@google.com>
+
+ Unreviewed
+
+ Add HAS_WEBAUDIO_FEATURE_ENABLE define to synchronize with chromium-side patch
+ https://bugs.webkit.org/show_bug.cgi?id=52939
+
+ * public/WebSettings.h:
+
2011-01-21 Charlie Reis <creis@chromium.org>
Reviewed by Darin Fisher.
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index 8d08c3f..8ad3c5e 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '71969'
+ 'chromium_rev': '73764'
}
deps = {
@@ -56,6 +56,8 @@ deps = {
# skia dependencies
'skia':
Var('chromium_svn')+'/skia@'+Var('chromium_rev'),
+ 'third_party/skia/gpu':
+ From('chromium_deps', 'src/third_party/skia/gpu'),
'third_party/skia/src':
From('chromium_deps', 'src/third_party/skia/src'),
'third_party/skia/include':
@@ -66,6 +68,8 @@ deps = {
Var('chromium_svn')+'/testing@'+Var('chromium_rev'),
'testing/gtest':
From('chromium_deps', 'src/testing/gtest'),
+ 'testing/gmock':
+ From('chromium_deps', 'src/testing/gmock'),
# v8 javascript engine
'v8': From('chromium_deps', 'src/v8'),
diff --git a/Source/WebKit/chromium/WebKit.gyp b/Source/WebKit/chromium/WebKit.gyp
index 3a3672c..f2aa107 100644
--- a/Source/WebKit/chromium/WebKit.gyp
+++ b/Source/WebKit/chromium/WebKit.gyp
@@ -188,6 +188,7 @@
'public/WebHistoryItem.h',
'public/WebHTTPBody.h',
'public/WebHTTPLoadInfo.h',
+ 'public/WebIconLoadingCompletion.h',
'public/WebImage.h',
'public/WebImageDecoder.h',
'public/WebIDBCallbacks.h',
@@ -272,6 +273,8 @@
'public/WebString.h',
'public/WebTextAffinity.h',
'public/WebTextCaseSensitivity.h',
+ 'public/WebTextCheckingResult.h',
+ 'public/WebTextCheckingCompletion.h',
'public/WebTextDirection.h',
'public/WebTextInputType.h',
'public/WebTextRun.h',
@@ -383,6 +386,7 @@
'src/MediaPlayerPrivateChromium.cpp',
'src/NotificationPresenterImpl.h',
'src/NotificationPresenterImpl.cpp',
+ 'src/painting/GraphicsContextBuilder.h',
'src/PlatformBridge.cpp',
'src/PlatformMessagePortChannel.cpp',
'src/PlatformMessagePortChannel.h',
@@ -399,6 +403,8 @@
'src/StorageNamespaceProxy.cpp',
'src/StorageNamespaceProxy.h',
'src/TemporaryGlue.h',
+ 'src/WebTextCheckingCompletionImpl.h',
+ 'src/WebTextCheckingCompletionImpl.cpp',
'src/VideoFrameChromiumImpl.cpp',
'src/VideoFrameChromiumImpl.h',
'src/WebAccessibilityCache.cpp',
@@ -463,6 +469,8 @@
'src/WebHistoryItem.cpp',
'src/WebHTTPBody.cpp',
'src/WebHTTPLoadInfo.cpp',
+ 'src/WebIconLoadingCompletionImpl.cpp',
+ 'src/WebIconLoadingCompletionImpl.h',
'src/WebIDBCallbacksImpl.cpp',
'src/WebIDBCallbacksImpl.h',
'src/WebIDBCursorImpl.cpp',
@@ -660,7 +668,7 @@
'chromium_code': 1,
}
}],
- ['"ENABLE_3D_CANVAS=1" in feature_defines', {
+ ['"ENABLE_WEBGL=1" in feature_defines', {
'conditions': [
['OS=="mac"', {
'link_settings': {
@@ -952,8 +960,8 @@
'variables': {
'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py',
'pak_inputs': [
- '<(SHARED_INTERMEDIATE_DIR)/gfx/gfx_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi
index 7f4cda6..8944fde 100644
--- a/Source/WebKit/chromium/features.gypi
+++ b/Source/WebKit/chromium/features.gypi
@@ -39,7 +39,7 @@
# chromium build, overrides this list with its own values. See
# features_override.gypi inline documentation for more details.
'feature_defines': [
- 'ENABLE_3D_CANVAS=1',
+ 'ENABLE_WEBGL=1',
'ENABLE_3D_RENDERING=1',
'ENABLE_ACCELERATED_2D_CANVAS=1',
'ENABLE_BLOB=1',
@@ -53,6 +53,7 @@
'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOM_STORAGE=1',
'ENABLE_EVENTSOURCE=1',
+ 'ENABLE_JAVASCRIPT_I18N_API=1',
'ENABLE_FILE_SYSTEM=1',
'ENABLE_FILTERS=1',
'ENABLE_GEOLOCATION=1',
@@ -69,6 +70,7 @@
'ENABLE_OPENTYPE_SANITIZER=1',
'ENABLE_ORIENTATION_EVENTS=0',
'ENABLE_PROGRESS_TAG=1',
+ 'ENABLE_REGISTER_PROTOCOL_HANDLER=0',
'ENABLE_REQUEST_ANIMATION_FRAME=1',
'ENABLE_SHARED_WORKERS=1',
'ENABLE_SVG=1',
diff --git a/Source/WebKit/chromium/gyp_webkit b/Source/WebKit/chromium/gyp_webkit
index 29e3e7c..768acac 100755
--- a/Source/WebKit/chromium/gyp_webkit
+++ b/Source/WebKit/chromium/gyp_webkit
@@ -76,6 +76,15 @@ if __name__ == '__main__':
# Add includes.
args.extend(['-I' + i for i in additional_include_files(args)])
+ # There shouldn't be a circular dependency relationship between .gyp files,
+ # but in Chromium's .gyp files, on non-Mac platforms, circular relationships
+ # currently exist. The check for circular dependencies is currently
+ # bypassed on other platforms, but is left enabled on the Mac, where a
+ # violation of the rule causes Xcode to misbehave badly.
+ # http://crbug.com/35878.
+ if sys.platform not in ('darwin',):
+ args.append('--no-circular-check')
+
# On linux, we want gyp to output a makefile (default is scons).
if sys.platform == 'linux2':
args.extend(['-fmake',
diff --git a/Source/WebKit/chromium/public/WebAutoFillClient.h b/Source/WebKit/chromium/public/WebAutoFillClient.h
index 4e73be0..63b39a8 100644
--- a/Source/WebKit/chromium/public/WebAutoFillClient.h
+++ b/Source/WebKit/chromium/public/WebAutoFillClient.h
@@ -70,11 +70,6 @@ public:
virtual void removeAutocompleteSuggestion(const WebString& name,
const WebString& value) { }
- // Informs the browser that the user has selected an autocomplete (password
- // or field) suggestion from the drop-down. The input element text has
- // already been set to the selected suggestion.
- virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { }
-
// These methods are called when the users edits a text-field.
virtual void textFieldDidBeginEditing(const WebInputElement&) { }
virtual void textFieldDidEndEditing(const WebInputElement&) { }
diff --git a/Source/WebKit/chromium/public/WebFormControlElement.h b/Source/WebKit/chromium/public/WebFormControlElement.h
index 56a02dd..e70b995 100644
--- a/Source/WebKit/chromium/public/WebFormControlElement.h
+++ b/Source/WebKit/chromium/public/WebFormControlElement.h
@@ -57,6 +57,8 @@ public:
WEBKIT_API WebString formControlName() const;
WEBKIT_API WebString formControlType() const;
+ WEBKIT_API void dispatchFormControlChangeEvent();
+
// Returns the name that should be used for the specified |element| when
// storing autofill data. This is either the field name or its id, an empty
// string if it has no name and no id.
diff --git a/Source/WebKit/chromium/public/WebFrameClient.h b/Source/WebKit/chromium/public/WebFrameClient.h
index 2e1890a..d1fe751 100644
--- a/Source/WebKit/chromium/public/WebFrameClient.h
+++ b/Source/WebKit/chromium/public/WebFrameClient.h
@@ -41,6 +41,7 @@ namespace WebKit {
class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
+class WebClipboard;
class WebCookieJar;
class WebDataSource;
class WebFormElement;
@@ -88,6 +89,10 @@ public:
// WebKitClient::cookieJar() will be called to access cookies.
virtual WebCookieJar* cookieJar(WebFrame*) { return 0; }
+ // A frame specific clipboard. May return null, in which case the caller
+ // should assume there is no data in the clipboard.
+ virtual WebClipboard* clipboard() { return 0; }
+
// General notifications -----------------------------------------------
@@ -279,7 +284,7 @@ public:
// The indicated security origin has run active content (such as a
// script) from an insecure source. Note that the insecure content can
// spread to other frames in the same origin.
- virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&) { }
+ virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&, const WebURL& insecureURL) { }
// Script notifications ------------------------------------------------
@@ -362,9 +367,6 @@ public:
WebFrame*, WebFileSystem::Type, long long size,
bool create, WebFileSystemCallbacks*) { }
- // FIXME: This method should be deleted once chromium implements the new method above.
- virtual void openFileSystem(WebFrame* frame, WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks) { return openFileSystem(frame, type, size, true, callbacks); }
-
protected:
~WebFrameClient() { }
};
diff --git a/Source/WebKit/chromium/public/WebGraphicsContext3D.h b/Source/WebKit/chromium/public/WebGraphicsContext3D.h
index 6568d1c..984f79d 100644
--- a/Source/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/Source/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -35,10 +35,30 @@
#include "WebNonCopyable.h"
#include "WebString.h"
+#define USE_WGC3D_TYPES
+
namespace WebKit {
+// WGC3D types match the corresponding GL types as defined in OpenGL ES 2.0
+// header file gl2.h from khronos.org.
+typedef char WGC3Dchar;
+typedef unsigned int WGC3Denum;
+typedef unsigned char WGC3Dboolean;
+typedef unsigned int WGC3Dbitfield;
+typedef signed char WGC3Dbyte;
+typedef unsigned char WGC3Dubyte;
+typedef short WGC3Dshort;
+typedef unsigned short WGC3Dushort;
+typedef int WGC3Dint;
+typedef int WGC3Dsizei;
+typedef unsigned int WGC3Duint;
+typedef float WGC3Dfloat;
+typedef float WGC3Dclampf;
+typedef signed long int WGC3Dintptr;
+typedef signed long int WGC3Dsizeiptr;
+
// Typedef for server-side objects like OpenGL textures and program objects.
-typedef unsigned int WebGLId;
+typedef WGC3Duint WebGLId;
class WebView;
@@ -52,8 +72,8 @@ public:
// Return value from getActiveUniform and getActiveAttrib.
struct ActiveInfo {
WebString name;
- unsigned type;
- int size;
+ WGC3Denum type;
+ WGC3Dint size;
};
// Context creation attributes.
@@ -76,6 +96,12 @@ public:
bool canRecoverFromContextLoss;
};
+ class WebGraphicsContextLostCallback {
+ public:
+ virtual void onContextLost() = 0;
+ virtual ~WebGraphicsContextLostCallback() {}
+ };
+
// This destructor needs to be public so that using classes can destroy instances if initialization fails.
virtual ~WebGraphicsContext3D() {}
@@ -92,10 +118,6 @@ public:
virtual int width() = 0;
virtual int height() = 0;
- // Helper to return the size in bytes of OpenGL data types
- // like GL_FLOAT, GL_INT, etc.
- virtual int sizeInBytes(int type) = 0;
-
// Resizes the region into which this WebGraphicsContext3D is drawing.
virtual void reshape(int width, int height) = 0;
@@ -111,7 +133,7 @@ public:
// Returns the id of the texture which is used for storing the contents of
// the framebuffer associated with this context. This texture is accessible
// by the gpu-based page compositor.
- virtual unsigned getPlatformTextureId() = 0;
+ virtual WebGLId getPlatformTextureId() = 0;
// Copies the contents of the off-screen render target used by the WebGL
// context to the corresponding texture used by the compositor.
@@ -125,205 +147,193 @@ public:
// Per the behavior of glGetError, this stores at most one
// instance of any given error, and returns them from calls to
// getError in the order they were added.
- virtual void synthesizeGLError(unsigned long error) = 0;
+ virtual void synthesizeGLError(WGC3Denum) = 0;
+
+ virtual bool isContextLost() = 0;
// GL_CHROMIUM_map_sub
- virtual void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) = 0;
+ virtual void* mapBufferSubDataCHROMIUM(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeiptr size, WGC3Denum access) = 0;
virtual void unmapBufferSubDataCHROMIUM(const void*) = 0;
- virtual void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) = 0;
+ virtual void* mapTexSubImage2DCHROMIUM(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, WGC3Denum access) = 0;
virtual void unmapTexSubImage2DCHROMIUM(const void*) = 0;
// GL_CHROMIUM_copy_texture_to_parent_texture
- virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) = 0;
+ virtual void copyTextureToParentTextureCHROMIUM(WebGLId texture, WebGLId parentTexture) = 0;
// GL_CHROMIUM_request_extension
virtual WebString getRequestableExtensionsCHROMIUM() = 0;
virtual void requestExtensionCHROMIUM(const char*) = 0;
+ // GL_CHROMIUM_framebuffer_multisample
+ virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Dint dstY1, WGC3Dbitfield mask, WGC3Denum filter) = 0;
+ virtual void renderbufferStorageMultisampleCHROMIUM(WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height) = 0;
+
// The entry points below map directly to the OpenGL ES 2.0 API.
// See: http://www.khronos.org/registry/gles/
// and: http://www.khronos.org/opengles/sdk/docs/man/
- virtual void activeTexture(unsigned long texture) = 0;
+ virtual void activeTexture(WGC3Denum texture) = 0;
virtual void attachShader(WebGLId program, WebGLId shader) = 0;
- virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name) = 0;
- virtual void bindBuffer(unsigned long target, WebGLId buffer) = 0;
- virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer) = 0;
- virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer) = 0;
- virtual void bindTexture(unsigned long target, WebGLId texture) = 0;
- virtual void blendColor(double red, double green, double blue, double alpha) = 0;
- virtual void blendEquation(unsigned long mode) = 0;
- virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha) = 0;
- virtual void blendFunc(unsigned long sfactor, unsigned long dfactor) = 0;
- virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha) = 0;
-
- virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage) = 0;
- virtual void bufferSubData(unsigned long target, long offset, int size, const void* data) = 0;
-
- virtual unsigned long checkFramebufferStatus(unsigned long target) = 0;
- virtual void clear(unsigned long mask) = 0;
- virtual void clearColor(double red, double green, double blue, double alpha) = 0;
- virtual void clearDepth(double depth) = 0;
- virtual void clearStencil(long s) = 0;
- virtual void colorMask(bool red, bool green, bool blue, bool alpha) = 0;
+ virtual void bindAttribLocation(WebGLId program, WGC3Duint index, const WGC3Dchar* name) = 0;
+ virtual void bindBuffer(WGC3Denum target, WebGLId buffer) = 0;
+ virtual void bindFramebuffer(WGC3Denum target, WebGLId framebuffer) = 0;
+ virtual void bindRenderbuffer(WGC3Denum target, WebGLId renderbuffer) = 0;
+ virtual void bindTexture(WGC3Denum target, WebGLId texture) = 0;
+ virtual void blendColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue, WGC3Dclampf alpha) = 0;
+ virtual void blendEquation(WGC3Denum mode) = 0;
+ virtual void blendEquationSeparate(WGC3Denum modeRGB, WGC3Denum modeAlpha) = 0;
+ virtual void blendFunc(WGC3Denum sfactor, WGC3Denum dfactor) = 0;
+ virtual void blendFuncSeparate(WGC3Denum srcRGB, WGC3Denum dstRGB, WGC3Denum srcAlpha, WGC3Denum dstAlpha) = 0;
+
+ virtual void bufferData(WGC3Denum target, WGC3Dsizeiptr size, const void* data, WGC3Denum usage) = 0;
+ virtual void bufferSubData(WGC3Denum target, WGC3Dintptr offset, WGC3Dsizeiptr size, const void* data) = 0;
+
+ virtual WGC3Denum checkFramebufferStatus(WGC3Denum target) = 0;
+ virtual void clear(WGC3Dbitfield mask) = 0;
+ virtual void clearColor(WGC3Dclampf red, WGC3Dclampf green, WGC3Dclampf blue, WGC3Dclampf alpha) = 0;
+ virtual void clearDepth(WGC3Dclampf depth) = 0;
+ virtual void clearStencil(WGC3Dint s) = 0;
+ virtual void colorMask(WGC3Dboolean red, WGC3Dboolean green, WGC3Dboolean blue, WGC3Dboolean alpha) = 0;
virtual void compileShader(WebGLId shader) = 0;
- virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border) = 0;
- virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height) = 0;
- virtual void cullFace(unsigned long mode) = 0;
- virtual void depthFunc(unsigned long func) = 0;
- virtual void depthMask(bool flag) = 0;
- virtual void depthRange(double zNear, double zFar) = 0;
+ virtual void copyTexImage2D(WGC3Denum target, WGC3Dint level, WGC3Denum internalformat, WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border) = 0;
+ virtual void copyTexSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) = 0;
+ virtual void cullFace(WGC3Denum mode) = 0;
+ virtual void depthFunc(WGC3Denum func) = 0;
+ virtual void depthMask(WGC3Dboolean flag) = 0;
+ virtual void depthRange(WGC3Dclampf zNear, WGC3Dclampf zFar) = 0;
virtual void detachShader(WebGLId program, WebGLId shader) = 0;
- virtual void disable(unsigned long cap) = 0;
- virtual void disableVertexAttribArray(unsigned long index) = 0;
- virtual void drawArrays(unsigned long mode, long first, long count) = 0;
- virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) = 0;
+ virtual void disable(WGC3Denum cap) = 0;
+ virtual void disableVertexAttribArray(WGC3Duint index) = 0;
+ virtual void drawArrays(WGC3Denum mode, WGC3Dint first, WGC3Dsizei count) = 0;
+ virtual void drawElements(WGC3Denum mode, WGC3Dsizei count, WGC3Denum type, WGC3Dintptr offset) = 0;
- virtual void enable(unsigned long cap) = 0;
- virtual void enableVertexAttribArray(unsigned long index) = 0;
+ virtual void enable(WGC3Denum cap) = 0;
+ virtual void enableVertexAttribArray(WGC3Duint index) = 0;
virtual void finish() = 0;
virtual void flush() = 0;
- virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer) = 0;
- virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level) = 0;
- virtual void frontFace(unsigned long mode) = 0;
- virtual void generateMipmap(unsigned long target) = 0;
-
- virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&) = 0;
- virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&) = 0;
-
- virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders) = 0;
-
- virtual int getAttribLocation(WebGLId program, const char* name) = 0;
-
- virtual void getBooleanv(unsigned long pname, unsigned char* value) = 0;
-
- virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
-
+ virtual void framebufferRenderbuffer(WGC3Denum target, WGC3Denum attachment, WGC3Denum renderbuffertarget, WebGLId renderbuffer) = 0;
+ virtual void framebufferTexture2D(WGC3Denum target, WGC3Denum attachment, WGC3Denum textarget, WebGLId texture, WGC3Dint level) = 0;
+ virtual void frontFace(WGC3Denum mode) = 0;
+ virtual void generateMipmap(WGC3Denum target) = 0;
+
+ virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) = 0;
+ virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) = 0;
+ virtual void getAttachedShaders(WebGLId program, WGC3Dsizei maxCount, WGC3Dsizei* count, WebGLId* shaders) = 0;
+ virtual WGC3Dint getAttribLocation(WebGLId program, const WGC3Dchar* name) = 0;
+ virtual void getBooleanv(WGC3Denum pname, WGC3Dboolean* value) = 0;
+ virtual void getBufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) = 0;
virtual Attributes getContextAttributes() = 0;
-
- virtual unsigned long getError() = 0;
-
- virtual bool isContextLost() = 0;
-
- virtual void getFloatv(unsigned long pname, float* value) = 0;
-
- virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value) = 0;
-
- virtual void getIntegerv(unsigned long pname, int* value) = 0;
-
- virtual void getProgramiv(WebGLId program, unsigned long pname, int* value) = 0;
-
+ virtual WGC3Denum getError() = 0;
+ virtual void getFloatv(WGC3Denum pname, WGC3Dfloat* value) = 0;
+ virtual void getFramebufferAttachmentParameteriv(WGC3Denum target, WGC3Denum attachment, WGC3Denum pname, WGC3Dint* value) = 0;
+ virtual void getIntegerv(WGC3Denum pname, WGC3Dint* value) = 0;
+ virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value) = 0;
virtual WebString getProgramInfoLog(WebGLId program) = 0;
-
- virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
-
- virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value) = 0;
-
+ virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) = 0;
+ virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value) = 0;
virtual WebString getShaderInfoLog(WebGLId shader) = 0;
// TBD
// void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
virtual WebString getShaderSource(WebGLId shader) = 0;
- virtual WebString getString(unsigned long name) = 0;
-
- virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value) = 0;
- virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value) = 0;
-
- virtual void getUniformfv(WebGLId program, long location, float* value) = 0;
- virtual void getUniformiv(WebGLId program, long location, int* value) = 0;
-
- virtual long getUniformLocation(WebGLId program, const char* name) = 0;
-
- virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value) = 0;
- virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value) = 0;
-
- virtual long getVertexAttribOffset(unsigned long index, unsigned long pname) = 0;
-
- virtual void hint(unsigned long target, unsigned long mode) = 0;
- virtual bool isBuffer(WebGLId buffer) = 0;
- virtual bool isEnabled(unsigned long cap) = 0;
- virtual bool isFramebuffer(WebGLId framebuffer) = 0;
- virtual bool isProgram(WebGLId program) = 0;
- virtual bool isRenderbuffer(WebGLId renderbuffer) = 0;
- virtual bool isShader(WebGLId shader) = 0;
- virtual bool isTexture(WebGLId texture) = 0;
- virtual void lineWidth(double) = 0;
+ virtual WebString getString(WGC3Denum name) = 0;
+ virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, WGC3Dfloat* value) = 0;
+ virtual void getTexParameteriv(WGC3Denum target, WGC3Denum pname, WGC3Dint* value) = 0;
+ virtual void getUniformfv(WebGLId program, WGC3Dint location, WGC3Dfloat* value) = 0;
+ virtual void getUniformiv(WebGLId program, WGC3Dint location, WGC3Dint* value) = 0;
+ virtual WGC3Dint getUniformLocation(WebGLId program, const WGC3Dchar* name) = 0;
+ virtual void getVertexAttribfv(WGC3Duint index, WGC3Denum pname, WGC3Dfloat* value) = 0;
+ virtual void getVertexAttribiv(WGC3Duint index, WGC3Denum pname, WGC3Dint* value) = 0;
+ virtual WGC3Dsizeiptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname) = 0;
+
+ virtual void hint(WGC3Denum target, WGC3Denum mode) = 0;
+ virtual WGC3Dboolean isBuffer(WebGLId buffer) = 0;
+ virtual WGC3Dboolean isEnabled(WGC3Denum cap) = 0;
+ virtual WGC3Dboolean isFramebuffer(WebGLId framebuffer) = 0;
+ virtual WGC3Dboolean isProgram(WebGLId program) = 0;
+ virtual WGC3Dboolean isRenderbuffer(WebGLId renderbuffer) = 0;
+ virtual WGC3Dboolean isShader(WebGLId shader) = 0;
+ virtual WGC3Dboolean isTexture(WebGLId texture) = 0;
+ virtual void lineWidth(WGC3Dfloat) = 0;
virtual void linkProgram(WebGLId program) = 0;
- virtual void pixelStorei(unsigned long pname, long param) = 0;
- virtual void polygonOffset(double factor, double units) = 0;
+ virtual void pixelStorei(WGC3Denum pname, WGC3Dint param) = 0;
+ virtual void polygonOffset(WGC3Dfloat factor, WGC3Dfloat units) = 0;
- virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) = 0;
+ virtual void readPixels(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, void* pixels) = 0;
virtual void releaseShaderCompiler() = 0;
- virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height) = 0;
- virtual void sampleCoverage(double value, bool invert) = 0;
- virtual void scissor(long x, long y, unsigned long width, unsigned long height) = 0;
- virtual void shaderSource(WebGLId shader, const char* string) = 0;
- virtual void stencilFunc(unsigned long func, long ref, unsigned long mask) = 0;
- virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask) = 0;
- virtual void stencilMask(unsigned long mask) = 0;
- virtual void stencilMaskSeparate(unsigned long face, unsigned long mask) = 0;
- virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass) = 0;
- virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass) = 0;
-
- virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels) = 0;
-
- virtual void texParameterf(unsigned target, unsigned pname, float param) = 0;
- virtual void texParameteri(unsigned target, unsigned pname, int param) = 0;
-
- virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels) = 0;
-
- virtual void uniform1f(long location, float x) = 0;
- virtual void uniform1fv(long location, int count, float* v) = 0;
- virtual void uniform1i(long location, int x) = 0;
- virtual void uniform1iv(long location, int count, int* v) = 0;
- virtual void uniform2f(long location, float x, float y) = 0;
- virtual void uniform2fv(long location, int count, float* v) = 0;
- virtual void uniform2i(long location, int x, int y) = 0;
- virtual void uniform2iv(long location, int count, int* v) = 0;
- virtual void uniform3f(long location, float x, float y, float z) = 0;
- virtual void uniform3fv(long location, int count, float* v) = 0;
- virtual void uniform3i(long location, int x, int y, int z) = 0;
- virtual void uniform3iv(long location, int count, int* v) = 0;
- virtual void uniform4f(long location, float x, float y, float z, float w) = 0;
- virtual void uniform4fv(long location, int count, float* v) = 0;
- virtual void uniform4i(long location, int x, int y, int z, int w) = 0;
- virtual void uniform4iv(long location, int count, int* v) = 0;
- virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value) = 0;
- virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value) = 0;
- virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value) = 0;
+
+ virtual void renderbufferStorage(WGC3Denum target, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height) = 0;
+ virtual void sampleCoverage(WGC3Dclampf value, WGC3Dboolean invert) = 0;
+ virtual void scissor(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) = 0;
+ virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) = 0;
+ virtual void stencilFunc(WGC3Denum func, WGC3Dint ref, WGC3Duint mask) = 0;
+ virtual void stencilFuncSeparate(WGC3Denum face, WGC3Denum func, WGC3Dint ref, WGC3Duint mask) = 0;
+ virtual void stencilMask(WGC3Duint mask) = 0;
+ virtual void stencilMaskSeparate(WGC3Denum face, WGC3Duint mask) = 0;
+ virtual void stencilOp(WGC3Denum fail, WGC3Denum zfail, WGC3Denum zpass) = 0;
+ virtual void stencilOpSeparate(WGC3Denum face, WGC3Denum fail, WGC3Denum zfail, WGC3Denum zpass) = 0;
+
+ virtual void texImage2D(WGC3Denum target, WGC3Dint level, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border, WGC3Denum format, WGC3Denum type, const void* pixels) = 0;
+
+ virtual void texParameterf(WGC3Denum target, WGC3Denum pname, WGC3Dfloat param) = 0;
+ virtual void texParameteri(WGC3Denum target, WGC3Denum pname, WGC3Dint param) = 0;
+
+ virtual void texSubImage2D(WGC3Denum target, WGC3Dint level, WGC3Dint xoffset, WGC3Dint yoffset, WGC3Dsizei width, WGC3Dsizei height, WGC3Denum format, WGC3Denum type, const void* pixels) = 0;
+
+ virtual void uniform1f(WGC3Dint location, WGC3Dfloat x) = 0;
+ virtual void uniform1fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) = 0;
+ virtual void uniform1i(WGC3Dint location, WGC3Dint x) = 0;
+ virtual void uniform1iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) = 0;
+ virtual void uniform2f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y) = 0;
+ virtual void uniform2fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) = 0;
+ virtual void uniform2i(WGC3Dint location, WGC3Dint x, WGC3Dint y) = 0;
+ virtual void uniform2iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) = 0;
+ virtual void uniform3f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z) = 0;
+ virtual void uniform3fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) = 0;
+ virtual void uniform3i(WGC3Dint location, WGC3Dint x, WGC3Dint y, WGC3Dint z) = 0;
+ virtual void uniform3iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) = 0;
+ virtual void uniform4f(WGC3Dint location, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z, WGC3Dfloat w) = 0;
+ virtual void uniform4fv(WGC3Dint location, WGC3Dsizei count, const WGC3Dfloat* v) = 0;
+ virtual void uniform4i(WGC3Dint location, WGC3Dint x, WGC3Dint y, WGC3Dint z, WGC3Dint w) = 0;
+ virtual void uniform4iv(WGC3Dint location, WGC3Dsizei count, const WGC3Dint* v) = 0;
+ virtual void uniformMatrix2fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) = 0;
+ virtual void uniformMatrix3fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) = 0;
+ virtual void uniformMatrix4fv(WGC3Dint location, WGC3Dsizei count, WGC3Dboolean transpose, const WGC3Dfloat* value) = 0;
virtual void useProgram(WebGLId program) = 0;
virtual void validateProgram(WebGLId program) = 0;
- virtual void vertexAttrib1f(unsigned long indx, float x) = 0;
- virtual void vertexAttrib1fv(unsigned long indx, const float* values) = 0;
- virtual void vertexAttrib2f(unsigned long indx, float x, float y) = 0;
- virtual void vertexAttrib2fv(unsigned long indx, const float* values) = 0;
- virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z) = 0;
- virtual void vertexAttrib3fv(unsigned long indx, const float* values) = 0;
- virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w) = 0;
- virtual void vertexAttrib4fv(unsigned long indx, const float* values) = 0;
- virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
- unsigned long stride, unsigned long offset) = 0;
+ virtual void vertexAttrib1f(WGC3Duint index, WGC3Dfloat x) = 0;
+ virtual void vertexAttrib1fv(WGC3Duint index, const WGC3Dfloat* values) = 0;
+ virtual void vertexAttrib2f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y) = 0;
+ virtual void vertexAttrib2fv(WGC3Duint index, const WGC3Dfloat* values) = 0;
+ virtual void vertexAttrib3f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z) = 0;
+ virtual void vertexAttrib3fv(WGC3Duint index, const WGC3Dfloat* values) = 0;
+ virtual void vertexAttrib4f(WGC3Duint index, WGC3Dfloat x, WGC3Dfloat y, WGC3Dfloat z, WGC3Dfloat w) = 0;
+ virtual void vertexAttrib4fv(WGC3Duint index, const WGC3Dfloat* values) = 0;
+ virtual void vertexAttribPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized,
+ WGC3Dsizei stride, WGC3Dintptr offset) = 0;
- virtual void viewport(long x, long y, unsigned long width, unsigned long height) = 0;
+ virtual void viewport(WGC3Dint x, WGC3Dint y, WGC3Dsizei width, WGC3Dsizei height) = 0;
// Support for buffer creation and deletion.
- virtual unsigned createBuffer() = 0;
- virtual unsigned createFramebuffer() = 0;
- virtual unsigned createProgram() = 0;
- virtual unsigned createRenderbuffer() = 0;
- virtual unsigned createShader(unsigned long) = 0;
- virtual unsigned createTexture() = 0;
-
- virtual void deleteBuffer(unsigned) = 0;
- virtual void deleteFramebuffer(unsigned) = 0;
- virtual void deleteProgram(unsigned) = 0;
- virtual void deleteRenderbuffer(unsigned) = 0;
- virtual void deleteShader(unsigned) = 0;
- virtual void deleteTexture(unsigned) = 0;
+ virtual WebGLId createBuffer() = 0;
+ virtual WebGLId createFramebuffer() = 0;
+ virtual WebGLId createProgram() = 0;
+ virtual WebGLId createRenderbuffer() = 0;
+ virtual WebGLId createShader(WGC3Denum) = 0;
+ virtual WebGLId createTexture() = 0;
+
+ virtual void deleteBuffer(WebGLId) = 0;
+ virtual void deleteFramebuffer(WebGLId) = 0;
+ virtual void deleteProgram(WebGLId) = 0;
+ virtual void deleteRenderbuffer(WebGLId) = 0;
+ virtual void deleteShader(WebGLId) = 0;
+ virtual void deleteTexture(WebGLId) = 0;
+
+ virtual void setContextLostCallback(WebGraphicsContextLostCallback* callback) {}
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/public/WebIDBCallbacks.h b/Source/WebKit/chromium/public/WebIDBCallbacks.h
index 64ffc08..1eb6d3a 100644
--- a/Source/WebKit/chromium/public/WebIDBCallbacks.h
+++ b/Source/WebKit/chromium/public/WebIDBCallbacks.h
@@ -46,7 +46,6 @@ public:
// For classes that follow the PImpl pattern, pass a const reference.
// For the rest, pass ownership to the callee via a pointer.
virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null".
virtual void onSuccess(WebIDBCursor*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); }
@@ -54,6 +53,7 @@ public:
virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBTransaction*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/Source/WebKit/chromium/public/WebIDBDatabase.h b/Source/WebKit/chromium/public/WebIDBDatabase.h
index 5ed8052..df4217b 100644
--- a/Source/WebKit/chromium/public/WebIDBDatabase.h
+++ b/Source/WebKit/chromium/public/WebIDBDatabase.h
@@ -65,10 +65,14 @@ public:
virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBTransaction to the caller.
- virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&)
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode& ec)
{
- WEBKIT_ASSERT_NOT_REACHED();
- return 0;
+ return transaction(names, mode, 0, ec);
+ }
+ // FIXME: Remove.
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long, WebExceptionCode& ec)
+ {
+ return transaction(names, mode, ec);
}
virtual void close() { WEBKIT_ASSERT_NOT_REACHED(); }
diff --git a/Source/WebKit/chromium/public/WebIDBObjectStore.h b/Source/WebKit/chromium/public/WebIDBObjectStore.h
index 8f2247f..152dfc9 100755
--- a/Source/WebKit/chromium/public/WebIDBObjectStore.h
+++ b/Source/WebKit/chromium/public/WebIDBObjectStore.h
@@ -60,8 +60,16 @@ public:
}
virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ enum PutMode {
+ AddOrUpdate,
+ AddOnly,
+ CursorUpdate
+ };
+
+ virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void deleteFunction(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
diff --git a/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
index c9b6b05..93099f1 100644
--- a/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
+++ b/Source/WebKit/chromium/public/WebIDBTransactionCallbacks.h
@@ -35,6 +35,8 @@ public:
virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onComplete() { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // FIXME: Remove.
virtual void onTimeout() { WEBKIT_ASSERT_NOT_REACHED(); }
};
diff --git a/Source/WebKit/chromium/public/WebIconLoadingCompletion.h b/Source/WebKit/chromium/public/WebIconLoadingCompletion.h
new file mode 100644
index 0000000..b6229aa
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebIconLoadingCompletion.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2011 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 WebIconLoadingCompletion_h
+#define WebIconLoadingCompletion_h
+
+namespace WebKit {
+
+class WebData;
+class WebString;
+
+// Gets called back when WebViewClient finished loading an icon.
+class WebIconLoadingCompletion {
+public:
+ // Called with the loaded icon data, which is an image data stream
+ // WebCore can decode, such as PNG. A null WebData means a failure of
+ // loading. The callback instance is destroyed when this method is called.
+ virtual void didLoadIcon(const WebData&) = 0;
+
+protected:
+ virtual ~WebIconLoadingCompletion() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebInputElement.h b/Source/WebKit/chromium/public/WebInputElement.h
index be8623c..81c397c 100644
--- a/Source/WebKit/chromium/public/WebInputElement.h
+++ b/Source/WebKit/chromium/public/WebInputElement.h
@@ -74,14 +74,13 @@ namespace WebKit {
WEBKIT_API WebString placeholder() const;
WEBKIT_API bool isAutofilled() const;
WEBKIT_API void setAutofilled(bool);
- WEBKIT_API void dispatchFormControlChangeEvent();
WEBKIT_API void setSelectionRange(int, int);
WEBKIT_API int selectionStart() const;
WEBKIT_API int selectionEnd() const;
WEBKIT_API bool isValidValue(const WebString&) const;
// Exposes the default value of the maxLength attribute.
- WEBKIT_API static const int defaultMaxLength;
+ WEBKIT_API static int defaultMaxLength();
#if WEBKIT_IMPLEMENTATION
WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
@@ -90,6 +89,13 @@ namespace WebKit {
#endif
};
+ WEBKIT_API WebInputElement* toWebInputElement(WebElement*);
+
+ inline const WebInputElement* toWebInputElement(const WebElement* element)
+ {
+ return toWebInputElement(const_cast<WebElement*>(element));
+ }
+
} // namespace WebKit
#endif
diff --git a/Source/WebKit/chromium/public/WebKitClient.h b/Source/WebKit/chromium/public/WebKitClient.h
index ae7892d..d8ead23 100644
--- a/Source/WebKit/chromium/public/WebKitClient.h
+++ b/Source/WebKit/chromium/public/WebKitClient.h
@@ -143,7 +143,6 @@ public:
// Indexed Database ----------------------------------------------------
virtual WebIDBFactory* idbFactory() { return 0; }
- virtual void idbShutdown() { };
virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
diff --git a/Source/WebKit/chromium/public/WebMenuItemInfo.h b/Source/WebKit/chromium/public/WebMenuItemInfo.h
index 445dfb4..f6e622a 100644
--- a/Source/WebKit/chromium/public/WebMenuItemInfo.h
+++ b/Source/WebKit/chromium/public/WebMenuItemInfo.h
@@ -33,6 +33,7 @@
#include "WebCommon.h"
#include "WebString.h"
+#include "WebTextDirection.h"
#include "WebVector.h"
namespace WebKit {
@@ -56,6 +57,8 @@ struct WebMenuItemInfo {
WebString label;
Type type;
unsigned action;
+ WebTextDirection textDirection;
+ bool hasTextDirectionOverride;
bool enabled;
bool checked;
};
diff --git a/Source/WebKit/chromium/public/WebNotification.h b/Source/WebKit/chromium/public/WebNotification.h
index dbbde02..a84a058 100644
--- a/Source/WebKit/chromium/public/WebNotification.h
+++ b/Source/WebKit/chromium/public/WebNotification.h
@@ -75,10 +75,6 @@ public:
WEBKIT_API WebURL iconURL() const;
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;
diff --git a/Source/WebKit/chromium/public/WebPoint.h b/Source/WebKit/chromium/public/WebPoint.h
index 20c52c2..7662363 100644
--- a/Source/WebKit/chromium/public/WebPoint.h
+++ b/Source/WebKit/chromium/public/WebPoint.h
@@ -36,7 +36,7 @@
#if WEBKIT_IMPLEMENTATION
#include "IntPoint.h"
#else
-#include <gfx/point.h>
+#include <ui/gfx/point.h>
#endif
namespace WebKit {
diff --git a/Source/WebKit/chromium/public/WebPopupMenuInfo.h b/Source/WebKit/chromium/public/WebPopupMenuInfo.h
index 7cf1b63..8824846 100644
--- a/Source/WebKit/chromium/public/WebPopupMenuInfo.h
+++ b/Source/WebKit/chromium/public/WebPopupMenuInfo.h
@@ -38,8 +38,6 @@ namespace WebKit {
// Describes the contents of a popup menu.
struct WebPopupMenuInfo {
- // FIXME: migrate clients to WebMenuItemInfo and remove this temporary Item typedef.
- typedef WebMenuItemInfo Item;
int itemHeight;
int itemFontSize;
int selectedIndex;
diff --git a/Source/WebKit/chromium/public/WebRect.h b/Source/WebKit/chromium/public/WebRect.h
index 30381d7..045b7a8 100644
--- a/Source/WebKit/chromium/public/WebRect.h
+++ b/Source/WebKit/chromium/public/WebRect.h
@@ -36,7 +36,7 @@
#if WEBKIT_IMPLEMENTATION
#include "IntRect.h"
#else
-#include <gfx/rect.h>
+#include <ui/gfx/rect.h>
#endif
namespace WebKit {
diff --git a/Source/WebKit/chromium/public/WebRuntimeFeatures.h b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
index 097e95b..c9e32f5 100644
--- a/Source/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/Source/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -31,6 +31,8 @@
#ifndef WebRuntimeFeatures_h
#define WebRuntimeFeatures_h
+#define HAS_WEBAUDIO_RUNTIMEFEATURES 1
+
#include "WebCommon.h"
namespace WebKit {
@@ -94,6 +96,9 @@ public:
WEBKIT_API static void enableFileSystem(bool);
WEBKIT_API static bool isFileSystemEnabled();
+
+ WEBKIT_API static void enableJavaScriptI18NAPI(bool);
+ WEBKIT_API static bool isJavaScriptI18NAPIEnabled();
private:
WebRuntimeFeatures();
diff --git a/Source/WebKit/chromium/public/WebSelectElement.h b/Source/WebKit/chromium/public/WebSelectElement.h
index 97d3a78..5cea39a 100644
--- a/Source/WebKit/chromium/public/WebSelectElement.h
+++ b/Source/WebKit/chromium/public/WebSelectElement.h
@@ -55,8 +55,8 @@ public:
void assign(const WebSelectElement& element) { WebFormControlElement::assign(element); }
WEBKIT_API void setValue(const WebString&);
- WEBKIT_API WebString value();
- WEBKIT_API WebVector<WebElement> listItems();
+ WEBKIT_API WebString value() const;
+ WEBKIT_API WebVector<WebElement> listItems() const;
#if WEBKIT_IMPLEMENTATION
WebSelectElement(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&);
diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h
index bfb5122..bea9cee 100644
--- a/Source/WebKit/chromium/public/WebSettings.h
+++ b/Source/WebKit/chromium/public/WebSettings.h
@@ -33,6 +33,8 @@
#include "WebCommon.h"
+#define HAS_WEBAUDIO_FEATURE_ENABLE 1
+
namespace WebKit {
class WebString;
@@ -91,6 +93,7 @@ public:
virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
virtual void setWebAudioEnabled(bool) = 0;
virtual void setExperimentalWebGLEnabled(bool) = 0;
+ virtual void setOpenGLMultisamplingEnabled(bool) = 0;
virtual void setShowDebugBorders(bool) = 0;
virtual void setEditingBehavior(EditingBehavior) = 0;
virtual void setAcceleratedCompositingEnabled(bool) = 0;
@@ -102,6 +105,7 @@ public:
virtual void setAccelerated2dCanvasEnabled(bool) = 0;
virtual void setMemoryInfoEnabled(bool) = 0;
virtual void setHyperlinkAuditingEnabled(bool) = 0;
+ virtual void setAsynchronousSpellCheckingEnabled(bool) = 0;
virtual void setCaretBrowsingEnabled(bool) = 0;
virtual void setInteractiveFormValidationEnabled(bool) = 0;
diff --git a/Source/WebKit/chromium/public/WebSize.h b/Source/WebKit/chromium/public/WebSize.h
index a7159b2..94a5365 100644
--- a/Source/WebKit/chromium/public/WebSize.h
+++ b/Source/WebKit/chromium/public/WebSize.h
@@ -36,7 +36,7 @@
#if WEBKIT_IMPLEMENTATION
#include "IntSize.h"
#else
-#include <gfx/size.h>
+#include <ui/gfx/size.h>
#endif
namespace WebKit {
diff --git a/Source/WebKit/chromium/public/WebSpeechInputController.h b/Source/WebKit/chromium/public/WebSpeechInputController.h
index eb83ec7..577c5e2 100644
--- a/Source/WebKit/chromium/public/WebSpeechInputController.h
+++ b/Source/WebKit/chromium/public/WebSpeechInputController.h
@@ -47,11 +47,6 @@ public:
// text are returned via the listener interface.
virtual bool startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar, const WebSecurityOrigin& origin)
{
- return startRecognition(requestId, elementRect, language, grammar);
- }
- // TODO(satish): Remove this once chromium has rolled past the above change.
- virtual bool startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar)
- {
WEBKIT_ASSERT_NOT_REACHED();
return false;
}
diff --git a/Source/WebKit/chromium/public/WebTextCheckingCompletion.h b/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
new file mode 100644
index 0000000..7e6526d
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
@@ -0,0 +1,51 @@
+/*
+ * 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 WebTextCheckingCompletion_h
+#define WebTextCheckingCompletion_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebTextCheckingResult;
+template <typename T> class WebVector;
+
+// Gets called back when WebViewClient finished an asynchronous spell checking.
+class WebTextCheckingCompletion {
+public:
+ virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&) = 0;
+protected:
+ ~WebTextCheckingCompletion() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebTextCheckingResult.h b/Source/WebKit/chromium/public/WebTextCheckingResult.h
new file mode 100644
index 0000000..4d16d31
--- /dev/null
+++ b/Source/WebKit/chromium/public/WebTextCheckingResult.h
@@ -0,0 +1,65 @@
+/*
+ * 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 WebTextCheckingResult_h
+#define WebTextCheckingResult_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// A checked entry of text checking.
+class WebTextCheckingResult {
+public:
+ enum Error {
+ ErrorSpelling = 1 << 0,
+ ErrorGrammar = 1 << 1
+ };
+
+ Error error() const { return m_error; }
+ int position() const { return m_position; }
+ int length() const { return m_length; }
+
+ explicit WebTextCheckingResult(Error error = ErrorSpelling, int position = 0, int length = 0)
+ : m_error(error)
+ , m_position(position)
+ , m_length(length)
+ {
+ }
+
+private:
+ Error m_error;
+ int m_position;
+ int m_length;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/public/WebURLResponse.h b/Source/WebKit/chromium/public/WebURLResponse.h
index c50f88e..4ecee17 100644
--- a/Source/WebKit/chromium/public/WebURLResponse.h
+++ b/Source/WebKit/chromium/public/WebURLResponse.h
@@ -169,6 +169,11 @@ public:
WEBKIT_API WebString downloadFilePath() const;
WEBKIT_API void setDownloadFilePath(const WebString&);
+ // Remote address of the socket which fetched this resource, for presenting
+ // to inquisitive users. Can be "ipv4:port", "[ipv6]:port", or empty.
+ WEBKIT_API WebString socketAddress() const;
+ WEBKIT_API void setSocketAddress(const WebString&);
+
protected:
void assign(WebURLResponsePrivate*);
diff --git a/Source/WebKit/chromium/public/WebViewClient.h b/Source/WebKit/chromium/public/WebViewClient.h
index 08fb942..2588788 100644
--- a/Source/WebKit/chromium/public/WebViewClient.h
+++ b/Source/WebKit/chromium/public/WebViewClient.h
@@ -54,6 +54,7 @@ class WebFileChooserCompletion;
class WebFrame;
class WebGeolocationClient;
class WebGeolocationService;
+class WebIconLoadingCompletion;
class WebImage;
class WebInputElement;
class WebKeyboardEvent;
@@ -63,6 +64,7 @@ class WebRange;
class WebSpeechInputController;
class WebSpeechInputListener;
class WebStorageNamespace;
+class WebTextCheckingCompletion;
class WebURL;
class WebURLRequest;
class WebView;
@@ -117,6 +119,10 @@ public:
// Called to retrieve the provider of desktop notifications.
virtual WebNotificationPresenter* notificationPresenter() { return 0; }
+ // Called to request an icon for the specified filenames.
+ // The icon is shown in a file upload control.
+ virtual bool queryIconForFiles(const WebVector<WebString>& filenames, WebIconLoadingCompletion*) { return false; }
+
// Navigational --------------------------------------------------------
@@ -173,7 +179,9 @@ public:
// error, then upon return misspelledLength is 0.
virtual void spellCheck(
const WebString& text, int& misspelledOffset, int& misspelledLength) { }
-
+ // Requests asynchronous spelling and grammar checking, whose result should be
+ // returned by passed completion object.
+ virtual void requestCheckingOfText(const WebString&, WebTextCheckingCompletion*) { }
// Computes an auto-corrected replacement for a misspelled word. If no
// replacement is found, then an empty string is returned.
virtual WebString autoCorrectWord(const WebString& misspelledWord) { return WebString(); }
@@ -322,6 +330,12 @@ public:
// action that wasn't initiated by the client.
virtual void zoomLevelChanged() { }
+ // Registers a new URL handler for the given protocol.
+ virtual void registerProtocolHandler(const WebString& scheme,
+ const WebString& baseUrl,
+ const WebString& url,
+ const WebString& title) { }
+
protected:
~WebViewClient() { }
};
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index e89fb74..aaaa4a5 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -36,6 +36,7 @@
#include "AccessibilityObject.h"
#include "ApplicationCacheHost.h"
#include "AsyncFileSystem.h"
+#include "DocumentMarker.h"
#include "EditorInsertAction.h"
#include "FileError.h"
#include "FileMetadata.h"
@@ -74,6 +75,7 @@
#include "WebSettings.h"
#include "WebTextAffinity.h"
#include "WebTextCaseSensitivity.h"
+#include "WebTextCheckingResult.h"
#include "WebVideoFrame.h"
#include "WebView.h"
#include <wtf/Assertions.h>
@@ -397,6 +399,9 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR)
COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied);
COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
+COMPILE_ASSERT_MATCHING_ENUM(WebTextCheckingResult::ErrorSpelling, DocumentMarker::Spelling);
+COMPILE_ASSERT_MATCHING_ENUM(WebTextCheckingResult::ErrorGrammar, DocumentMarker::Grammar);
+
#if OS(DARWIN)
COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, PlatformBridge::StateDisabled);
COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateInactive, PlatformBridge::StateInactive);
diff --git a/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
index 5975e72..ef1f616 100644
--- a/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -50,8 +50,8 @@ bool AsyncFileSystem::isAvailable()
return true;
}
-AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath)
- : AsyncFileSystem(rootPath)
+AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, const String& rootPath)
+ : AsyncFileSystem(type, rootPath)
, m_webFileSystem(WebKit::webKitClient()->fileSystem())
{
ASSERT(m_webFileSystem);
diff --git a/Source/WebKit/chromium/src/AsyncFileSystemChromium.h b/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
index 6205609..da98a33 100644
--- a/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
+++ b/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -46,9 +46,9 @@ class AsyncFileSystemCallbacks;
class AsyncFileSystemChromium : public AsyncFileSystem {
public:
- static PassOwnPtr<AsyncFileSystem> create(const String& rootPath)
+ static PassOwnPtr<AsyncFileSystem> create(AsyncFileSystem::Type type, const String& rootPath)
{
- return adoptPtr(new AsyncFileSystemChromium(rootPath));
+ return adoptPtr(new AsyncFileSystemChromium(type, rootPath));
}
virtual ~AsyncFileSystemChromium();
@@ -66,7 +66,7 @@ public:
virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
private:
- explicit AsyncFileSystemChromium(const String& rootPath);
+ AsyncFileSystemChromium(AsyncFileSystem::Type, const String& rootPath);
WebKit::WebFileSystem* m_webFileSystem;
};
diff --git a/Source/WebKit/chromium/src/AudioDestinationChromium.cpp b/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
index bed2562..a483308 100644
--- a/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
+++ b/Source/WebKit/chromium/src/AudioDestinationChromium.cpp
@@ -41,10 +41,15 @@ using namespace WebKit;
namespace WebCore {
// Buffer size that the Chromium audio system will call us back with.
+#if OS(DARWIN)
+// For Mac OS X the chromium audio backend uses a low-latency CoreAudio API, so a low buffer size is possible.
+const unsigned callbackBufferSize = 128;
+#else
// This value may need to be tuned based on the OS.
// FIXME: It may be possible to reduce this value once real-time threads
// and other Chromium audio improvements are made.
const unsigned callbackBufferSize = 2048;
+#endif
// Buffer size at which the web audio engine will render.
const unsigned renderBufferSize = 128;
diff --git a/Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 2ce31a9..d04c57c 100644
--- a/Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/Source/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -293,7 +293,7 @@ void AutoFillPopupMenuClient::initialize(
// the input element: textField.
m_regularStyle.set(new PopupMenuStyle(Color::black, Color::white, regularFont,
true, false, Length(WebCore::Fixed),
- textField->renderer()->style()->direction()));
+ textField->renderer()->style()->direction(), textField->renderer()->style()->unicodeBidi() == Override));
FontDescription warningFontDescription = regularFont.fontDescription();
warningFontDescription.setItalic(true);
@@ -305,7 +305,8 @@ void AutoFillPopupMenuClient::initialize(
m_regularStyle->isVisible(),
m_regularStyle->isDisplayNone(),
m_regularStyle->textIndent(),
- m_regularStyle->textDirection()));
+ m_regularStyle->textDirection(),
+ m_regularStyle->hasTextDirectionOverride()));
}
void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index a63a625..4b68c18 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -34,7 +34,6 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
-#include "CharacterNames.h"
#include "Console.h"
#include "Cursor.h"
#include "DatabaseTracker.h"
@@ -70,6 +69,7 @@
#include "WebFileChooserCompletionImpl.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
+#include "WebIconLoadingCompletionImpl.h"
#include "WebInputEvent.h"
#include "WebKit.h"
#include "WebNode.h"
@@ -86,6 +86,7 @@
#include "WebWindowFeatures.h"
#include "WindowFeatures.h"
#include "WrappedResourceRequest.h"
+#include <wtf/unicode/CharacterNames.h>
using namespace WebCore;
@@ -501,6 +502,13 @@ IntRect ChromeClientImpl::windowResizerRect() const
return result;
}
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+void ChromeClientImpl::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title)
+{
+ notImplemented();
+}
+#endif
+
void ChromeClientImpl::invalidateWindow(const IntRect&, bool)
{
notImplemented();
@@ -669,9 +677,13 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh
chooserCompletion->didChooseFile(WebVector<WebString>());
}
-void ChromeClientImpl::chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*)
+void ChromeClientImpl::chooseIconForFiles(const Vector<String>& filenames, FileChooser* fileChooser)
{
- notImplemented();
+ if (!m_webView->client())
+ return;
+ WebIconLoadingCompletionImpl* iconCompletion = new WebIconLoadingCompletionImpl(fileChooser);
+ if (!m_webView->client()->queryIconForFiles(filenames, iconCompletion))
+ iconCompletion->didLoadIcon(WebData());
}
void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
@@ -732,24 +744,29 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer,
{
const Vector<PopupItem*>& inputItems = popupContainer->popupData();
- WebVector<WebPopupMenuInfo::Item> outputItems(inputItems.size());
+ WebVector<WebMenuItemInfo> outputItems(inputItems.size());
for (size_t i = 0; i < inputItems.size(); ++i) {
const PopupItem& inputItem = *inputItems[i];
- WebPopupMenuInfo::Item& outputItem = outputItems[i];
+ WebMenuItemInfo& outputItem = outputItems[i];
outputItem.label = inputItem.label;
outputItem.enabled = inputItem.enabled;
+ if (inputItem.textDirection == WebCore::RTL)
+ outputItem.textDirection = WebTextDirectionRightToLeft;
+ else
+ outputItem.textDirection = WebTextDirectionLeftToRight;
+ outputItem.hasTextDirectionOverride = inputItem.hasTextDirectionOverride;
switch (inputItem.type) {
case PopupItem::TypeOption:
- outputItem.type = WebPopupMenuInfo::Item::Option;
+ outputItem.type = WebMenuItemInfo::Option;
break;
case PopupItem::TypeGroup:
- outputItem.type = WebPopupMenuInfo::Item::Group;
+ outputItem.type = WebMenuItemInfo::Group;
break;
case PopupItem::TypeSeparator:
- outputItem.type = WebPopupMenuInfo::Item::Separator;
+ outputItem.type = WebMenuItemInfo::Separator;
break;
default:
ASSERT_NOT_REACHED();
@@ -848,6 +865,11 @@ bool ChromeClientImpl::selectItemWritingDirectionIsNatural()
return false;
}
+bool ChromeClientImpl::selectItemAlignmentFollowsMenuWritingDirection()
+{
+ return true;
+}
+
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const
{
if (WebViewImpl::useExternalPopupMenus())
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.h b/Source/WebKit/chromium/src/ChromeClientImpl.h
index 07f7d1f..d3ccb75 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.h
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.h
@@ -39,7 +39,6 @@
namespace WebCore {
class AccessibilityObject;
class FileChooser;
-class HTMLParserQuirks;
class PopupContainer;
class PopupMenuClient;
class SecurityOrigin;
@@ -102,6 +101,9 @@ public:
virtual bool shouldInterruptJavaScript();
virtual bool tabsToLinks() const;
virtual WebCore::IntRect windowResizerRect() const;
+#if ENABLE(REGISTER_PROTOCOL_HANDLER)
+ virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
+#endif
virtual void invalidateWindow(const WebCore::IntRect&, bool);
virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
@@ -137,7 +139,6 @@ public:
virtual void chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*);
virtual void setCursor(const WebCore::Cursor&);
virtual void formStateDidChange(const WebCore::Node*);
- virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
#if ENABLE(TOUCH_EVENTS)
// FIXME: All touch events are forwarded regardless of whether or not they are needed.
virtual void needTouchEvents(bool needTouchEvents) { }
@@ -173,6 +174,7 @@ public:
void setCursorForPlugin(const WebCursorInfo&);
virtual bool selectItemWritingDirectionIsNatural();
+ virtual bool selectItemAlignmentFollowsMenuWritingDirection();
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
index d166d9d..49de043 100644
--- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -236,7 +236,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
// If it's not a link, an image, a media element, or an image/media link,
// show a selection menu or a more generic page menu.
- data.frameEncoding = selectedFrame->loader()->writer()->encoding();
+ data.frameEncoding = selectedFrame->document()->loader()->writer()->encoding();
// Send the frame and page URLs in any case.
data.pageURL = urlFromFrame(m_webView->mainFrameImpl()->frame());
diff --git a/Source/WebKit/chromium/src/DragClientImpl.cpp b/Source/WebKit/chromium/src/DragClientImpl.cpp
index 9874401..4c896a7 100644
--- a/Source/WebKit/chromium/src/DragClientImpl.cpp
+++ b/Source/WebKit/chromium/src/DragClientImpl.cpp
@@ -96,12 +96,6 @@ void DragClientImpl::startDrag(DragImageRef dragImage,
offsetPoint);
}
-DragImageRef DragClientImpl::createDragImageForLink(KURL&, const String& label, Frame*)
-{
- // FIXME
- return 0;
-}
-
void DragClientImpl::dragControllerDestroyed()
{
// Our lifetime is bound to the WebViewImpl.
diff --git a/Source/WebKit/chromium/src/DragClientImpl.h b/Source/WebKit/chromium/src/DragClientImpl.h
index dac7acd..b48206a 100644
--- a/Source/WebKit/chromium/src/DragClientImpl.h
+++ b/Source/WebKit/chromium/src/DragClientImpl.h
@@ -62,8 +62,6 @@ public:
WebCore::Clipboard* clipboard,
WebCore::Frame* frame,
bool isLinkDrag = false);
- virtual WebCore::DragImageRef createDragImageForLink(
- WebCore::KURL&, const WTF::String& label, WebCore::Frame*);
virtual void dragControllerDestroyed();
private:
diff --git a/Source/WebKit/chromium/src/DragScrollTimer.cpp b/Source/WebKit/chromium/src/DragScrollTimer.cpp
index 83b81b7..c994cd7 100644
--- a/Source/WebKit/chromium/src/DragScrollTimer.cpp
+++ b/Source/WebKit/chromium/src/DragScrollTimer.cpp
@@ -43,12 +43,12 @@ 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();
+ else if (rect.maxX() < point.x())
+ dx = point.x() - rect.maxX();
if (point.y() < rect.y())
dy = point.y() - rect.y();
- else if (rect.bottom() < point.y())
- dy = point.y() - rect.bottom();
+ else if (rect.maxY() < point.y())
+ dy = point.y() - rect.maxY();
return IntSize(dx, dy);
}
diff --git a/Source/WebKit/chromium/src/EditorClientImpl.cpp b/Source/WebKit/chromium/src/EditorClientImpl.cpp
index 68694c2..3dc3a6a 100644
--- a/Source/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/EditorClientImpl.cpp
@@ -40,6 +40,7 @@
#include "PlatformKeyboardEvent.h"
#include "PlatformString.h"
#include "RenderObject.h"
+#include "SpellChecker.h"
#include "DOMUtilitiesPrivate.h"
#include "WebAutoFillClient.h"
@@ -54,6 +55,7 @@
#include "WebPasswordAutocompleteListener.h"
#include "WebRange.h"
#include "WebTextAffinity.h"
+#include "WebTextCheckingCompletionImpl.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
@@ -800,18 +802,6 @@ void EditorClientImpl::cancelPendingAutofill()
m_autofillTimer.stop();
}
-void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textField)
-{
- if (m_webView->autoFillClient())
- m_webView->autoFillClient()->didAcceptAutocompleteSuggestion(WebInputElement(textField));
-
- WebFrameImpl* webframe = WebFrameImpl::fromFrame(textField->document()->frame());
- if (!webframe)
- return;
-
- webframe->notifiyPasswordListenerOfAutocomplete(WebInputElement(textField));
-}
-
bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element,
KeyboardEvent* event)
{
@@ -876,6 +866,11 @@ void EditorClientImpl::checkSpellingOfString(const UChar* text, int length,
*misspellingLength = spellLength;
}
+void EditorClientImpl::requestCheckingOfString(SpellChecker* sender, int identifier, const String& text)
+{
+ m_webView->client()->requestCheckingOfText(text, new WebTextCheckingCompletionImpl(identifier, sender));
+}
+
String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord)
{
if (!(isContinuousSpellCheckingEnabled() && m_webView->client()))
diff --git a/Source/WebKit/chromium/src/EditorClientImpl.h b/Source/WebKit/chromium/src/EditorClientImpl.h
index 9dbd6af..8c40f3c 100644
--- a/Source/WebKit/chromium/src/EditorClientImpl.h
+++ b/Source/WebKit/chromium/src/EditorClientImpl.h
@@ -37,6 +37,7 @@
namespace WebCore {
class HTMLInputElement;
+class SpellChecker;
}
namespace WebKit {
@@ -111,7 +112,7 @@ public:
WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
- virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&);
// Shows the form autofill popup for |node| if it is an HTMLInputElement and
// it is empty. This is called when you press the up or down arrow in a
@@ -120,12 +121,6 @@ public:
// otherwise.
virtual bool showFormAutofillForNode(WebCore::Node*);
- // Notification that the text changed due to acceptance of a suggestion
- // provided by an Autocomplete popup. Having a separate callback in this
- // case is a simple way to break the cycle that would otherwise occur if
- // textDidChangeInTextField was called.
- virtual void onAutocompleteSuggestionAccepted(WebCore::HTMLInputElement*);
-
private:
void modifySelection(WebCore::Frame*, WebCore::KeyboardEvent*);
diff --git a/Source/WebKit/chromium/src/Extensions3DChromium.cpp b/Source/WebKit/chromium/src/Extensions3DChromium.cpp
index ca2215e..52c2e12 100644
--- a/Source/WebKit/chromium/src/Extensions3DChromium.cpp
+++ b/Source/WebKit/chromium/src/Extensions3DChromium.cpp
@@ -25,7 +25,7 @@
#include "config.h"
-#if ENABLE(3D_CANVAS)
+#if ENABLE(WEBGL)
#include "Extensions3DChromium.h"
@@ -62,6 +62,16 @@ int Extensions3DChromium::getGraphicsResetStatusARB()
return m_internal->isContextLost() ? static_cast<int>(Extensions3D::UNKNOWN_CONTEXT_RESET_ARB) : static_cast<int>(GraphicsContext3D::NO_ERROR);
}
+void Extensions3DChromium::blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter)
+{
+ m_internal->blitFramebufferCHROMIUM(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+
+void Extensions3DChromium::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height)
+{
+ m_internal->renderbufferStorageMultisampleCHROMIUM(target, samples, internalformat, width, height);
+}
+
void* Extensions3DChromium::mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access)
{
return m_internal->mapBufferSubDataCHROMIUM(target, offset, size, access);
@@ -89,4 +99,4 @@ void Extensions3DChromium::copyTextureToParentTextureCHROMIUM(unsigned texture,
} // namespace WebCore
-#endif // ENABLE(3D_CANVAS)
+#endif // ENABLE(WEBGL)
diff --git a/Source/WebKit/chromium/src/ExternalPopupMenu.cpp b/Source/WebKit/chromium/src/ExternalPopupMenu.cpp
index f7f9862..5808003 100644
--- a/Source/WebKit/chromium/src/ExternalPopupMenu.cpp
+++ b/Source/WebKit/chromium/src/ExternalPopupMenu.cpp
@@ -128,10 +128,10 @@ void ExternalPopupMenu::didCancel()
void ExternalPopupMenu::getPopupMenuInfo(WebPopupMenuInfo* info)
{
int itemCount = m_popupMenuClient->listSize();
- WebVector<WebPopupMenuInfo::Item> items(
+ WebVector<WebMenuItemInfo> items(
static_cast<size_t>(itemCount));
for (int i = 0; i < itemCount; ++i) {
- WebPopupMenuInfo::Item& popupItem = items[i];
+ WebMenuItemInfo& popupItem = items[i];
popupItem.label = m_popupMenuClient->itemText(i);
if (m_popupMenuClient->itemIsSeparator(i))
popupItem.type = WebMenuItemInfo::Separator;
@@ -140,9 +140,15 @@ void ExternalPopupMenu::getPopupMenuInfo(WebPopupMenuInfo* info)
else
popupItem.type = WebMenuItemInfo::Option;
popupItem.enabled = m_popupMenuClient->itemIsEnabled(i);
+ PopupMenuStyle style = m_popupMenuClient->itemStyle(i);
+ if (style.textDirection() == WebCore::RTL)
+ popupItem.textDirection = WebTextDirectionRightToLeft;
+ else
+ popupItem.textDirection = WebTextDirectionLeftToRight;
+ popupItem.hasTextDirectionOverride = style.hasTextDirectionOverride();
}
- info->itemHeight = m_popupMenuClient->menuStyle().font().height();
+ info->itemHeight = m_popupMenuClient->menuStyle().font().fontMetrics().height();
info->itemFontSize =
static_cast<int>(m_popupMenuClient->menuStyle().font().size());
info->selectedIndex = m_popupMenuClient->selectedIndex();
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index b767450..34c53cf 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1099,7 +1099,7 @@ void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl)
// However, we only want to do this if makeRepresentation has been called, to
// match the behavior on the Mac.
if (m_hasRepresentation)
- dl->frameLoader()->writer()->setEncoding("", false);
+ dl->writer()->setEncoding("", false);
}
}
@@ -1153,10 +1153,10 @@ void FrameLoaderClientImpl::didDisplayInsecureContent()
m_webFrame->client()->didDisplayInsecureContent(m_webFrame);
}
-void FrameLoaderClientImpl::didRunInsecureContent(SecurityOrigin* origin)
+void FrameLoaderClientImpl::didRunInsecureContent(SecurityOrigin* origin, const KURL& insecureURL)
{
if (m_webFrame->client())
- m_webFrame->client()->didRunInsecureContent(m_webFrame, WebSecurityOrigin(origin));
+ m_webFrame->client()->didRunInsecureContent(m_webFrame, WebSecurityOrigin(origin), insecureURL);
}
ResourceError FrameLoaderClientImpl::blockedError(const ResourceRequest&)
diff --git a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
index 1d7a741..925b759 100644
--- a/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -142,7 +142,7 @@ public:
virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const;
virtual void dispatchDidChangeBackForwardIndex() const;
virtual void didDisplayInsecureContent();
- virtual void didRunInsecureContent(WebCore::SecurityOrigin*);
+ virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL& insecureURL);
virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
virtual WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest&);
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 8148ff6..0751785 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -30,7 +30,7 @@
#include "config.h"
-#if ENABLE(3D_CANVAS)
+#if ENABLE(WEBGL)
#include "GraphicsContext3D.h"
@@ -205,7 +205,7 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
// We need to draw the resizing bitmap into the canvas's backing store.
SkCanvas canvas(*canvasBitmap);
SkRect dst;
- dst.set(SkIntToScalar(0), SkIntToScalar(0), canvasBitmap->width(), canvasBitmap->height());
+ dst.set(SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(canvasBitmap->width()), SkIntToScalar(canvasBitmap->height()));
canvas.drawBitmapRect(m_resizingBitmap, 0, dst);
}
#elif PLATFORM(CG)
@@ -364,8 +364,13 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
return m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \
}
+#define DELEGATE_TO_IMPL_10(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) \
+void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9, t10 a10) \
+{ \
+ m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); \
+}
+
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
-DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)
bool GraphicsContext3DInternal::isGLES2Compliant() const
{
@@ -692,6 +697,14 @@ void splitStringHelper(const String& str, HashSet<String>& set)
set.add(substrings[i]);
}
+String mapExtensionName(const String& name)
+{
+ if (name == "GL_ANGLE_framebuffer_blit"
+ || name == "GL_ANGLE_framebuffer_multisample")
+ return "GL_CHROMIUM_framebuffer_multisample";
+ return name;
+}
+
} // anonymous namespace
void GraphicsContext3DInternal::initializeExtensions()
@@ -711,25 +724,27 @@ void GraphicsContext3DInternal::initializeExtensions()
bool GraphicsContext3DInternal::supportsExtension(const String& name)
{
initializeExtensions();
- return m_enabledExtensions.contains(name) || m_requestableExtensions.contains(name);
+ String mappedName = mapExtensionName(name);
+ return m_enabledExtensions.contains(mappedName) || m_requestableExtensions.contains(mappedName);
}
bool GraphicsContext3DInternal::ensureExtensionEnabled(const String& name)
{
initializeExtensions();
- if (m_enabledExtensions.contains(name))
+ String mappedName = mapExtensionName(name);
+ if (m_enabledExtensions.contains(mappedName))
return true;
- if (m_requestableExtensions.contains(name)) {
- m_impl->requestExtensionCHROMIUM(name.ascii().data());
+ if (m_requestableExtensions.contains(mappedName)) {
+ m_impl->requestExtensionCHROMIUM(mappedName.ascii().data());
m_enabledExtensions.clear();
m_requestableExtensions.clear();
m_initializedAvailableExtensions = false;
}
initializeExtensions();
- return m_enabledExtensions.contains(name);
+ return m_enabledExtensions.contains(mappedName);
}
DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*)
@@ -737,6 +752,8 @@ DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*)
DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, GC3Denum, void*)
DELEGATE_TO_IMPL_1(unmapTexSubImage2DCHROMIUM, const void*)
DELEGATE_TO_IMPL_2(copyTextureToParentTextureCHROMIUM, Platform3DObject, Platform3DObject)
+DELEGATE_TO_IMPL_10(blitFramebufferCHROMIUM, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dbitfield, GC3Denum)
+DELEGATE_TO_IMPL_5(renderbufferStorageMultisampleCHROMIUM, GC3Denum, GC3Dsizei, GC3Denum, GC3Dsizei, GC3Dsizei)
//----------------------------------------------------------------------
// GraphicsContext3D
@@ -897,7 +914,6 @@ PlatformLayer* GraphicsContext3D::platformLayer() const
#endif
DELEGATE_TO_INTERNAL(makeContextCurrent)
-DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int)
DELEGATE_TO_INTERNAL_2(reshape, int, int)
DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize)
@@ -1066,6 +1082,35 @@ DELEGATE_TO_INTERNAL_1(deleteTexture, Platform3DObject)
DELEGATE_TO_INTERNAL_1(synthesizeGLError, GC3Denum)
DELEGATE_TO_INTERNAL_R(getExtensions, Extensions3D*)
+DELEGATE_TO_INTERNAL_1(setContextLostCallback, PassOwnPtr<GraphicsContext3D::ContextLostCallback>)
+
+class GraphicsContextLostCallbackAdapter : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback {
+public:
+ virtual void onContextLost();
+ static PassOwnPtr<GraphicsContextLostCallbackAdapter> create(PassOwnPtr<GraphicsContext3D::ContextLostCallback>);
+ virtual ~GraphicsContextLostCallbackAdapter() {}
+private:
+ GraphicsContextLostCallbackAdapter(PassOwnPtr<GraphicsContext3D::ContextLostCallback> cb) : m_contextLostCallback(cb) {}
+ OwnPtr<GraphicsContext3D::ContextLostCallback> m_contextLostCallback;
+};
+
+void GraphicsContextLostCallbackAdapter::onContextLost()
+{
+ if (m_contextLostCallback)
+ m_contextLostCallback->onContextLost();
+}
+
+PassOwnPtr<GraphicsContextLostCallbackAdapter> GraphicsContextLostCallbackAdapter::create(PassOwnPtr<GraphicsContext3D::ContextLostCallback> cb)
+{
+ return adoptPtr(new GraphicsContextLostCallbackAdapter(cb));
+}
+
+void GraphicsContext3DInternal::setContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback> cb)
+{
+ m_contextLostCallbackAdapter = GraphicsContextLostCallbackAdapter::create(cb);
+ m_impl->setContextLostCallback(m_contextLostCallbackAdapter.get());
+}
+
bool GraphicsContext3D::isGLES2Compliant() const
{
return m_internal->isGLES2Compliant();
@@ -1073,4 +1118,4 @@ bool GraphicsContext3D::isGLES2Compliant() const
} // namespace WebCore
-#endif // ENABLE(3D_CANVAS)
+#endif // ENABLE(WEBGL)
diff --git a/Source/WebKit/chromium/src/GraphicsContext3DInternal.h b/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
index 30a8e57..be9ce16 100644
--- a/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
+++ b/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
@@ -44,6 +44,7 @@ class Extensions3DChromium;
#if USE(ACCELERATED_COMPOSITING)
class WebGLLayerChromium;
#endif
+class GraphicsContextLostCallbackAdapter;
class GraphicsContext3DInternal {
public:
@@ -62,8 +63,6 @@ public:
bool makeContextCurrent();
- unsigned int sizeInBytes(GC3Denum type);
-
void reshape(int width, int height);
IntSize getInternalFramebufferSize();
@@ -241,6 +240,8 @@ public:
void synthesizeGLError(GC3Denum error);
+ void setContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback>);
+
// Extensions3D support.
Extensions3D* getExtensions();
bool supportsExtension(const String& name);
@@ -260,9 +261,14 @@ public:
bool supportsCopyTextureToParentTextureCHROMIUM();
void copyTextureToParentTextureCHROMIUM(Platform3DObject texture, Platform3DObject parentTexture);
+ // GL_CHROMIUM_framebuffer_multisample
+ void blitFramebufferCHROMIUM(GC3Dint srcX0, GC3Dint srcY0, GC3Dint srcX1, GC3Dint srcY1, GC3Dint dstX0, GC3Dint dstY0, GC3Dint dstX1, GC3Dint dstY1, GC3Dbitfield mask, GC3Denum filter);
+ void renderbufferStorageMultisampleCHROMIUM(GC3Denum target, GC3Dsizei samples, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height);
+
private:
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
OwnPtr<Extensions3DChromium> m_extensions;
+ OwnPtr<GraphicsContextLostCallbackAdapter> m_contextLostCallbackAdapter;
WebKit::WebViewImpl* m_webViewImpl;
bool m_initializedAvailableExtensions;
HashSet<String> m_enabledExtensions;
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 69051d0..dba28d9 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -62,55 +62,41 @@ IDBCallbacksProxy::~IDBCallbacksProxy()
void IDBCallbacksProxy::onError(PassRefPtr<IDBDatabaseError> idbDatabaseError)
{
m_callbacks->onError(WebKit::WebIDBDatabaseError(idbDatabaseError));
- m_callbacks.clear();
-}
-
-void IDBCallbacksProxy::onSuccess()
-{
- m_callbacks->onSuccess();
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend)
{
m_callbacks->onSuccess(new WebKit::WebIDBCursorImpl(idbCursorBackend));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabaseBackendInterface> backend)
{
m_callbacks->onSuccess(new WebKit::WebIDBDatabaseImpl(backend));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndexBackendInterface> backend)
{
m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(backend));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey)
{
m_callbacks->onSuccess(WebKit::WebIDBKey(idbKey));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStoreBackendInterface> backend)
{
m_callbacks->onSuccess(new WebKit::WebIDBObjectStoreImpl(backend));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBTransactionBackendInterface> backend)
{
m_callbacks->onSuccess(new WebKit::WebIDBTransactionImpl(backend));
- m_callbacks.clear();
}
void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue)
{
m_callbacks->onSuccess(WebKit::WebSerializedScriptValue(serializedScriptValue));
- m_callbacks.clear();
}
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/IDBCallbacksProxy.h b/Source/WebKit/chromium/src/IDBCallbacksProxy.h
index 8c26161..e1db23d 100644
--- a/Source/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/Source/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -48,7 +48,6 @@ public:
virtual ~IDBCallbacksProxy();
virtual void onError(PassRefPtr<IDBDatabaseError>);
- virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>);
diff --git a/Source/WebKit/chromium/src/IDBDatabaseProxy.cpp b/Source/WebKit/chromium/src/IDBDatabaseProxy.cpp
index f070d64..6355a2a 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -95,10 +95,10 @@ void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks
m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec);
}
-PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode& ec)
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, ExceptionCode& ec)
{
WebKit::WebDOMStringList names(storeNames);
- WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout, ec);
+ WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, ec);
if (!transaction) {
ASSERT(ec);
return 0;
diff --git a/Source/WebKit/chromium/src/IDBDatabaseProxy.h b/Source/WebKit/chromium/src/IDBDatabaseProxy.h
index c51a604..2ceb77e 100644
--- a/Source/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/Source/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -49,7 +49,7 @@ public:
virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, ExceptionCode&);
- virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode&);
+ virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, ExceptionCode&);
virtual void close();
private:
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/Source/WebKit/chromium/src/IDBObjectStoreProxy.cpp
index e03cdc8..d6871e0 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBObjectStoreProxy.cpp
@@ -80,12 +80,12 @@ void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> c
m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
// all implementations of IDB interfaces are proxy objects.
IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
+ m_webIDBObjectStore->put(value, key, static_cast<WebKit::WebIDBObjectStore::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
void IDBObjectStoreProxy::deleteFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
@@ -96,6 +96,14 @@ void IDBObjectStoreProxy::deleteFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBC
m_webIDBObjectStore->deleteFunction(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
+void IDBObjectStoreProxy::clear(PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
+{
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->clear(new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
+}
+
PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
diff --git a/Source/WebKit/chromium/src/IDBObjectStoreProxy.h b/Source/WebKit/chromium/src/IDBObjectStoreProxy.h
index 348c794..a6e3748 100755
--- a/Source/WebKit/chromium/src/IDBObjectStoreProxy.h
+++ b/Source/WebKit/chromium/src/IDBObjectStoreProxy.h
@@ -47,8 +47,9 @@ public:
virtual PassRefPtr<DOMStringList> indexNames() const;
virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
- virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, bool addOnly, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
virtual void deleteFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void clear(PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
PassRefPtr<IDBIndexBackendInterface> createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface*, ExceptionCode&);
PassRefPtr<IDBIndexBackendInterface> index(const String& name, ExceptionCode&);
@@ -67,4 +68,3 @@ private:
#endif
#endif // IDBObjectStoreProxy_h
-
diff --git a/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp b/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
index 3a19fe2..ebda1dd 100644
--- a/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
+++ b/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
@@ -52,19 +52,11 @@ IDBTransactionCallbacksProxy::~IDBTransactionCallbacksProxy()
void IDBTransactionCallbacksProxy::onAbort()
{
m_callbacks->onAbort();
- m_callbacks.clear();
}
void IDBTransactionCallbacksProxy::onComplete()
{
m_callbacks->onComplete();
- m_callbacks.clear();
-}
-
-void IDBTransactionCallbacksProxy::onTimeout()
-{
- m_callbacks->onTimeout();
- m_callbacks.clear();
}
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h b/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
index 891d5c9..79c32f6 100644
--- a/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
+++ b/Source/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
@@ -47,7 +47,6 @@ public:
virtual void onAbort();
virtual void onComplete();
- virtual void onTimeout();
private:
IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>);
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.cpp b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
index 77150bb..1ed5284 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.cpp
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.cpp
@@ -81,18 +81,6 @@ void InspectorClientImpl::hideHighlight()
agent->hideHighlight();
}
-void InspectorClientImpl::populateSetting(const String& key, String* value)
-{
- if (WebDevToolsAgentImpl* agent = devToolsAgent())
- agent->populateSetting(key, value);
-}
-
-void InspectorClientImpl::storeSetting(const String& key, const String& value)
-{
- if (WebDevToolsAgentImpl* agent = devToolsAgent())
- agent->storeSetting(key, value);
-}
-
bool InspectorClientImpl::sendMessageToFrontend(const WTF::String& message)
{
if (WebDevToolsAgentImpl* agent = devToolsAgent())
diff --git a/Source/WebKit/chromium/src/InspectorClientImpl.h b/Source/WebKit/chromium/src/InspectorClientImpl.h
index 78d34e3..cc91454 100644
--- a/Source/WebKit/chromium/src/InspectorClientImpl.h
+++ b/Source/WebKit/chromium/src/InspectorClientImpl.h
@@ -53,9 +53,6 @@ public:
virtual void highlight(WebCore::Node*);
virtual void hideHighlight();
- virtual void populateSetting(const WTF::String& key, WTF::String* value);
- virtual void storeSetting(const WTF::String& key, const WTF::String& value);
-
virtual bool sendMessageToFrontend(const WTF::String&);
virtual void updateInspectorStateCookie(const WTF::String&);
diff --git a/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
index a9c61d0..ae2eb1d 100644
--- a/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -62,7 +62,7 @@ void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileS
ASSERT(context && context->isDocument());
Document* document = static_cast<Document*>(context);
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
- webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks));
+ webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks, type));
}
void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous)
@@ -71,12 +71,12 @@ void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFi
if (context->isDocument()) {
Document* document = static_cast<Document*>(context);
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
- webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks));
+ webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks, type));
} else {
WorkerContext* workerContext = static_cast<WorkerContext*>(context);
WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy();
WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy);
- webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, context, synchronous), synchronous);
+ webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, type, context, synchronous), synchronous);
}
}
diff --git a/Source/WebKit/chromium/src/PlatformBridge.cpp b/Source/WebKit/chromium/src/PlatformBridge.cpp
index 04016fc..b09d150 100644
--- a/Source/WebKit/chromium/src/PlatformBridge.cpp
+++ b/Source/WebKit/chromium/src/PlatformBridge.cpp
@@ -132,6 +132,14 @@ static WebWidgetClient* toWebWidgetClient(Widget* widget)
return chromeClientImpl->webView()->client();
}
+static WebClipboard* getClipboard(const Frame* frame)
+{
+ WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(frame);
+ if (!frameImpl || !frameImpl->client())
+ return 0;
+ return frameImpl->client()->clipboard();
+}
+
static WebCookieJar* getCookieJar(const Document* document)
{
WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
@@ -217,9 +225,15 @@ void PlatformBridge::clipboardWriteData(const String& type,
}
HashSet<String> PlatformBridge::clipboardReadAvailableTypes(
- PasteboardPrivate::ClipboardBuffer buffer, bool* containsFilenames)
+ const Frame* frame,
+ PasteboardPrivate::ClipboardBuffer buffer,
+ bool* containsFilenames)
{
- WebVector<WebString> result = webKitClient()->clipboard()->readAvailableTypes(
+ WebClipboard* clipboard = getClipboard(frame);
+ if (!clipboard)
+ return HashSet<String>();
+
+ WebVector<WebString> result = clipboard->readAvailableTypes(
static_cast<WebClipboard::Buffer>(buffer), containsFilenames);
HashSet<String> types;
for (size_t i = 0; i < result.size(); ++i)
@@ -227,12 +241,19 @@ HashSet<String> PlatformBridge::clipboardReadAvailableTypes(
return types;
}
-bool PlatformBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer,
- const String& type, String& data, String& metadata)
+bool PlatformBridge::clipboardReadData(const Frame* frame,
+ PasteboardPrivate::ClipboardBuffer buffer,
+ const String& type,
+ String& data,
+ String& metadata)
{
+ WebClipboard* clipboard = getClipboard(frame);
+ if (!clipboard)
+ return false;
+
WebString resultData;
WebString resultMetadata;
- bool succeeded = webKitClient()->clipboard()->readData(
+ bool succeeded = clipboard->readData(
static_cast<WebClipboard::Buffer>(buffer), type, &resultData, &resultMetadata);
if (succeeded) {
data = resultData;
@@ -241,9 +262,14 @@ bool PlatformBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer
return succeeded;
}
-Vector<String> PlatformBridge::clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer buffer)
+Vector<String> PlatformBridge::clipboardReadFilenames(const Frame* frame,
+ PasteboardPrivate::ClipboardBuffer buffer)
{
- WebVector<WebString> result = webKitClient()->clipboard()->readFilenames(
+ WebClipboard* clipboard = getClipboard(frame);
+ if (!clipboard)
+ return Vector<String>();
+
+ WebVector<WebString> result = clipboard->readFilenames(
static_cast<WebClipboard::Buffer>(buffer));
Vector<String> convertedResult;
for (size_t i = 0; i < result.size(); ++i)
@@ -509,12 +535,6 @@ PassRefPtr<IDBFactoryBackendInterface> PlatformBridge::idbFactory()
return IDBFactoryBackendProxy::create();
}
-void PlatformBridge::idbShutdown()
-{
- // In the browser process, this shuts down the utility process. In the renderer process, it does nothing.
- webKitClient()->idbShutdown();
-}
-
void PlatformBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys)
{
WebVector<WebSerializedScriptValue> webValues = values;
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 11ce797..6329d76 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -64,23 +64,7 @@
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
-using WebCore::DocumentLoader;
-using WebCore::FrameLoader;
-using WebCore::InjectedScriptHost;
-using WebCore::InspectorArray;
-using WebCore::InspectorBackendDispatcher;
-using WebCore::InspectorController;
-using WebCore::InspectorInstrumentation;
-using WebCore::InspectorInstrumentationCookie;
-using WebCore::Node;
-using WebCore::Page;
-using WebCore::ResourceError;
-using WebCore::ResourceRequest;
-using WebCore::ResourceResponse;
-using WTF::String;
-using WebCore::V8DOMWrapper;
-using WebCore::V8Node;
-using WebCore::V8Proxy;
+using namespace WebCore;
namespace WebKit {
@@ -89,14 +73,14 @@ namespace {
static const char kFrontendConnectedFeatureName[] = "frontend-connected";
static const char kInspectorStateFeatureName[] = "inspector-state";
-class ClientMessageLoopAdapter : public WebCore::ScriptDebugServer::ClientMessageLoop {
+class ClientMessageLoopAdapter : public ScriptDebugServer::ClientMessageLoop {
public:
static void ensureClientMessageLoopCreated(WebDevToolsAgentClient* client)
{
if (s_instance)
return;
s_instance = new ClientMessageLoopAdapter(client->createClientMessageLoop());
- WebCore::ScriptDebugServer::shared().setClientMessageLoop(s_instance);
+ ScriptDebugServer::shared().setClientMessageLoop(s_instance);
}
static void inspectedViewClosed(WebViewImpl* view)
@@ -109,7 +93,7 @@ public:
{
// Release render thread if necessary.
if (s_instance && s_instance->m_running)
- WebCore::ScriptDebugServer::shared().continueProgram();
+ ScriptDebugServer::shared().continueProgram();
}
private:
@@ -204,8 +188,8 @@ void WebDevToolsAgentImpl::attach()
m_debuggerAgentImpl.set(
new DebuggerAgentImpl(m_webViewImpl, this, m_client));
WebCString debuggerScriptJs = m_client->debuggerScriptSource();
- WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(
- WTF::String(debuggerScriptJs.data(), debuggerScriptJs.length()));
+ ScriptDebugServer::shared().setDebuggerScriptSource(
+ String(debuggerScriptJs.data(), debuggerScriptJs.length()));
m_attached = true;
}
@@ -238,7 +222,7 @@ void WebDevToolsAgentImpl::didClearWindowObject(WebFrameImpl* webframe)
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
{
- inspectorController()->inspectorBackendDispatcher()->dispatch(message);
+ inspectorController()->dispatchMessageFromFrontend(message);
}
void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point)
@@ -249,7 +233,7 @@ void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point)
void WebDevToolsAgentImpl::inspectNode(v8::Handle<v8::Value> node)
{
if (!V8Node::HasInstance(node))
- V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR);
+ V8Proxy::setDOMException(TYPE_MISMATCH_ERR);
else
inspectorController()->inspect(V8Node::toNative(v8::Handle<v8::Object>::Cast(node)));
}
@@ -262,14 +246,14 @@ void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebSt
}
}
-WebCore::InspectorController* WebDevToolsAgentImpl::inspectorController()
+InspectorController* WebDevToolsAgentImpl::inspectorController()
{
if (Page* page = m_webViewImpl->page())
return page->inspectorController();
return 0;
}
-WebCore::Frame* WebDevToolsAgentImpl::mainFrame()
+Frame* WebDevToolsAgentImpl::mainFrame()
{
if (Page* page = m_webViewImpl->page())
return page->mainFrame();
@@ -284,7 +268,7 @@ void WebDevToolsAgentImpl::identifierForInitialRequest(
const WebURLRequest& request)
{
WebFrameImpl* webFrameImpl = static_cast<WebFrameImpl*>(webFrame);
- WebCore::Frame* frame = webFrameImpl->frame();
+ Frame* frame = webFrameImpl->frame();
DocumentLoader* loader = frame->loader()->activeDocumentLoader();
InspectorInstrumentation::identifierForInitialRequest(frame, resourceId, loader, request.toResourceRequest());
}
@@ -348,19 +332,7 @@ void WebDevToolsAgentImpl::hideHighlight()
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 WTF::String& message)
+bool WebDevToolsAgentImpl::sendMessageToFrontend(const String& message)
{
WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_webViewImpl->devToolsAgent());
if (!devToolsAgent)
@@ -370,7 +342,7 @@ bool WebDevToolsAgentImpl::sendMessageToFrontend(const WTF::String& message)
return true;
}
-void WebDevToolsAgentImpl::updateInspectorStateCookie(const WTF::String& state)
+void WebDevToolsAgentImpl::updateInspectorStateCookie(const String& state)
{
m_client->runtimePropertyChanged(kInspectorStateFeatureName, state);
}
@@ -402,7 +374,7 @@ void WebDevToolsAgent::debuggerPauseScript()
void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* d)
{
- class DebuggerTask : public WebCore::ScriptDebugServer::Task {
+ class DebuggerTask : public ScriptDebugServer::Task {
public:
DebuggerTask(WebDevToolsAgent::MessageDescriptor* descriptor) : m_descriptor(descriptor) { }
virtual ~DebuggerTask() { }
@@ -414,7 +386,7 @@ void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* d)
private:
OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor;
};
- WebCore::ScriptDebugServer::interruptAndRun(new DebuggerTask(d));
+ ScriptDebugServer::interruptAndRun(new DebuggerTask(d));
}
bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message)
@@ -422,19 +394,19 @@ bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message)
String commandName;
if (!InspectorBackendDispatcher::getCommandName(message, &commandName))
return false;
- return commandName == InspectorBackendDispatcher::pauseCmd
- || commandName == InspectorBackendDispatcher::setBreakpointCmd
- || commandName == InspectorBackendDispatcher::removeBreakpointCmd
- || commandName == InspectorBackendDispatcher::activateBreakpointsCmd
- || commandName == InspectorBackendDispatcher::deactivateBreakpointsCmd
- || commandName == InspectorBackendDispatcher::startProfilingCmd
- || commandName == InspectorBackendDispatcher::stopProfilingCmd
- || commandName == InspectorBackendDispatcher::getProfileCmd;
+ return commandName == InspectorBackendDispatcher::Debugger_pauseCmd
+ || commandName == InspectorBackendDispatcher::Debugger_setJavaScriptBreakpointCmd
+ || commandName == InspectorBackendDispatcher::Debugger_removeJavaScriptBreakpointCmd
+ || commandName == InspectorBackendDispatcher::Debugger_activateBreakpointsCmd
+ || commandName == InspectorBackendDispatcher::Debugger_deactivateBreakpointsCmd
+ || commandName == InspectorBackendDispatcher::Inspector_startProfilingCmd
+ || commandName == InspectorBackendDispatcher::Inspector_stopProfilingCmd
+ || commandName == InspectorBackendDispatcher::Profiler_getProfileCmd;
}
void WebDevToolsAgent::processPendingMessages()
{
- WebCore::ScriptDebugServer::shared().runPendingTasks();
+ ScriptDebugServer::shared().runPendingTasks();
}
void WebDevToolsAgent::setMessageLoopDispatchHandler(MessageLoopDispatchHandler handler)
diff --git a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 681eedb..2bc197d 100644
--- a/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -93,8 +93,6 @@ public:
virtual void openInspectorFrontend(WebCore::InspectorController*);
virtual void highlight(WebCore::Node*);
virtual void hideHighlight();
- virtual void populateSetting(const WTF::String& key, WTF::String* value);
- virtual void storeSetting(const WTF::String& key, const WTF::String& value);
virtual void updateInspectorStateCookie(const WTF::String&);
virtual bool sendMessageToFrontend(const WTF::String&);
diff --git a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index 52a4032..0c71f80 100644
--- a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -36,8 +36,9 @@
#include "AsyncFileSystemChromium.h"
#include "FileMetadata.h"
#include "ScriptExecutionContext.h"
-#include "WebFileSystemEntry.h"
#include "WebFileInfo.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemEntry.h"
#include "WebString.h"
#include "WorkerAsyncFileSystemChromium.h"
#include <wtf/Vector.h>
@@ -46,8 +47,9 @@ using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WebCore::ScriptExecutionContext* context, bool synchronous)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, AsyncFileSystem::Type type, WebCore::ScriptExecutionContext* context, bool synchronous)
: m_callbacks(callbacks)
+ , m_type(type)
, m_context(context)
, m_synchronous(synchronous)
{
@@ -85,9 +87,9 @@ void WebFileSystemCallbacksImpl::didReadDirectory(const WebVector<WebFileSystemE
void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path)
{
if (m_context && m_context->isWorkerContext())
- m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, path, m_synchronous));
+ m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, path, m_synchronous));
else
- m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(path));
+ m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(m_type, path));
delete this;
}
diff --git a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index 75fa2bb..3e2192e 100644
--- a/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -31,6 +31,8 @@
#ifndef WebFileSystemCallbacksImpl_h
#define WebFileSystemCallbacksImpl_h
+#include "AsyncFileSystem.h"
+#include "WebFileSystem.h"
#include "WebFileSystemCallbacks.h"
#include "WebVector.h"
#include <wtf/OwnPtr.h>
@@ -49,7 +51,7 @@ class WebString;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::AsyncFileSystem::Type = WebCore::AsyncFileSystem::Temporary, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
virtual ~WebFileSystemCallbacksImpl();
virtual void didSucceed();
@@ -61,6 +63,9 @@ public:
private:
OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
+ // Used for openFileSystem callbacks.
+ WebCore::AsyncFileSystem::Type m_type;
+
// Used for worker's openFileSystem callbacks.
WebCore::ScriptExecutionContext* m_context;
bool m_synchronous;
diff --git a/Source/WebKit/chromium/src/WebFontImpl.cpp b/Source/WebKit/chromium/src/WebFontImpl.cpp
index e1fa0e7..d3555f2 100644
--- a/Source/WebKit/chromium/src/WebFontImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFontImpl.cpp
@@ -34,7 +34,7 @@
#include "Font.h"
#include "FontDescription.h"
#include "GraphicsContext.h"
-#include "PlatformContextSkia.h"
+#include "painting/GraphicsContextBuilder.h"
#include "TextRun.h"
#include "WebFloatPoint.h"
#include "WebFloatRect.h"
@@ -64,27 +64,27 @@ WebFontDescription WebFontImpl::fontDescription() const
int WebFontImpl::ascent() const
{
- return m_font.ascent();
+ return m_font.fontMetrics().ascent();
}
int WebFontImpl::descent() const
{
- return m_font.descent();
+ return m_font.fontMetrics().descent();
}
int WebFontImpl::height() const
{
- return m_font.height();
+ return m_font.fontMetrics().height();
}
int WebFontImpl::lineSpacing() const
{
- return m_font.lineSpacing();
+ return m_font.fontMetrics().lineSpacing();
}
float WebFontImpl::xHeight() const
{
- return m_font.xHeight();
+ return m_font.fontMetrics().xHeight();
}
void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFloatPoint& leftBaseline,
@@ -94,15 +94,9 @@ void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFl
// FIXME hook canvasIsOpaque up to the platform-specific indicators for
// whether subpixel AA can be used for this draw. On Windows, this is
// PlatformContextSkia::setDrawingToImageBuffer.
-#if WEBKIT_USING_CG
- GraphicsContext gc(canvas);
-#elif WEBKIT_USING_SKIA
- PlatformContextSkia context(canvas);
- // PlatformGraphicsContext is actually a pointer to PlatformContextSkia.
- GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
-#else
- notImplemented();
-#endif
+
+ GraphicsContextBuilder builder(canvas);
+ GraphicsContext& gc = builder.context();
gc.save();
gc.setFillColor(color, ColorSpaceDeviceRGB);
diff --git a/Source/WebKit/chromium/src/WebFormControlElement.cpp b/Source/WebKit/chromium/src/WebFormControlElement.cpp
index a75fe5c..d2bc8ab 100644
--- a/Source/WebKit/chromium/src/WebFormControlElement.cpp
+++ b/Source/WebKit/chromium/src/WebFormControlElement.cpp
@@ -53,6 +53,11 @@ WebString WebFormControlElement::formControlType() const
return constUnwrap<HTMLFormControlElement>()->type();
}
+void WebFormControlElement::dispatchFormControlChangeEvent()
+{
+ unwrap<HTMLFormControlElement>()->dispatchFormControlChangeEvent();
+}
+
WebString WebFormControlElement::nameForAutofill() const
{
String name = constUnwrap<HTMLFormControlElement>()->name();
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 8651fa8..c86e715 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -90,7 +90,6 @@
#include "FrameLoader.h"
#include "FrameTree.h"
#include "FrameView.h"
-#include "GraphicsContext.h"
#include "HTMLCollection.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
@@ -101,9 +100,9 @@
#include "HistoryItem.h"
#include "InspectorController.h"
#include "Page.h"
+#include "painting/GraphicsContextBuilder.h"
#include "Performance.h"
#include "PlatformBridge.h"
-#include "PlatformContextSkia.h"
#include "PluginDocument.h"
#include "PrintContext.h"
#include "RenderFrame.h"
@@ -155,10 +154,6 @@
#include <algorithm>
#include <wtf/CurrentTime.h>
-#if OS(DARWIN)
-#include "LocalCurrentGraphicsContext.h"
-#endif
-
#if OS(LINUX) || OS(FREEBSD)
#include <gdk/gdk.h>
#endif
@@ -537,7 +532,7 @@ WebURL WebFrameImpl::openSearchDescriptionURL() const
WebString WebFrameImpl::encoding() const
{
- return frame()->loader()->writer()->encoding();
+ return frame()->document()->loader()->writer()->encoding();
}
WebSize WebFrameImpl::scrollOffset() const
@@ -685,12 +680,14 @@ void WebFrameImpl::forms(WebVector<WebFormElement>& results) const
}
WebVector<WebFormElement> temp(formCount);
- for (size_t i = 0; i < formCount; ++i) {
- Node* node = forms->item(i);
+ size_t j = 0;
+ for (size_t sourceIndex = 0; j < forms->length(); ++sourceIndex) {
+ Node* node = forms->item(sourceIndex);
// Strange but true, sometimes item can be 0.
if (node && node->isHTMLElement())
- temp[i] = static_cast<HTMLFormElement*>(node);
+ temp[j++] = static_cast<HTMLFormElement*>(node);
}
+ ASSERT(j == formCount);
results.swap(temp);
}
@@ -884,17 +881,6 @@ void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item)
RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item);
ASSERT(historyItem.get());
- // Sanity check for http://webkit.org/b/52819. It appears that some child
- // items of this item might be null. Try validating just the first set of
- // children in an attempt to catch it early.
- const HistoryItemVector& childItems = historyItem->children();
- int size = childItems.size();
- for (int i = 0; i < size; ++i) {
- RefPtr<HistoryItem> childItem = childItems[i].get();
- if (!childItem.get())
- CRASH();
- }
-
// If there is no currentItem, which happens when we are navigating in
// session history after a crash, we need to manufacture one otherwise WebKit
// hoarks. This is probably the wrong thing to do, but it seems to work.
@@ -1349,15 +1335,7 @@ float WebFrameImpl::printPage(int page, WebCanvas* canvas)
return 0;
}
-#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) || OS(SOLARIS)
- PlatformContextSkia context(canvas);
- GraphicsContext spool(&context);
-#elif OS(DARWIN)
- GraphicsContext spool(canvas);
- LocalCurrentGraphicsContext localContext(&spool);
-#endif
-
- return m_printContext->spoolPage(spool, page);
+ return m_printContext->spoolPage(GraphicsContextBuilder(canvas).context(), page);
}
void WebFrameImpl::printEnd()
@@ -1542,6 +1520,9 @@ void WebFrameImpl::scopeStringMatches(int identifier,
RefPtr<Range> searchRange(rangeOfContents(frame()->document()));
+ Node* originalEndContainer = searchRange->endContainer();
+ int originalEndOffset = searchRange->endOffset();
+
ExceptionCode ec = 0, ec2 = 0;
if (m_resumeScopingFromRange.get()) {
// This is a continuation of a scoping operation that timed out and didn't
@@ -1556,9 +1537,6 @@ void WebFrameImpl::scopeStringMatches(int identifier,
}
}
- Node* originalEndContainer = searchRange->endContainer();
- int originalEndOffset = searchRange->endOffset();
-
// This timeout controls how long we scope before releasing control. This
// value does not prevent us from running for longer than this, but it is
// periodically checked to see if we have exceeded our allocated time.
@@ -1932,18 +1910,7 @@ void WebFrameImpl::paint(WebCanvas* canvas, const WebRect& rect)
{
if (rect.isEmpty())
return;
-#if WEBKIT_USING_CG
- GraphicsContext gc(canvas);
- LocalCurrentGraphicsContext localContext(&gc);
-#elif WEBKIT_USING_SKIA
- PlatformContextSkia context(canvas);
-
- // PlatformGraphicsContext is actually a pointer to PlatformContextSkia
- GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
-#else
- notImplemented();
-#endif
- paintWithContext(gc, rect);
+ paintWithContext(GraphicsContextBuilder(canvas).context(), rect);
}
void WebFrameImpl::createFrameView()
@@ -1985,7 +1952,7 @@ void WebFrameImpl::createFrameView()
view->setParentVisible(true);
}
-WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame)
+WebFrameImpl* WebFrameImpl::fromFrame(const Frame* frame)
{
if (!frame)
return 0;
@@ -2133,7 +2100,7 @@ void WebFrameImpl::invalidateArea(AreaToInvalidate area)
IntRect contentArea(
view->x(), view->y(), view->visibleWidth(), view->visibleHeight());
IntRect frameRect = view->frameRect();
- contentArea.move(-frameRect.topLeft().x(), -frameRect.topLeft().y());
+ contentArea.move(-frameRect.x(), -frameRect.y());
view->invalidateRect(contentArea);
}
@@ -2144,7 +2111,7 @@ void WebFrameImpl::invalidateArea(AreaToInvalidate area)
ScrollbarTheme::nativeTheme()->scrollbarThickness(),
view->visibleHeight());
IntRect frameRect = view->frameRect();
- scrollBarVert.move(-frameRect.topLeft().x(), -frameRect.topLeft().y());
+ scrollBarVert.move(-frameRect.x(), -frameRect.y());
view->invalidateRect(scrollBarVert);
}
}
@@ -2298,7 +2265,7 @@ void WebFrameImpl::loadJavaScriptURL(const KURL& url)
return;
if (!m_frame->navigationScheduler()->locationChangePending())
- m_frame->loader()->writer()->replaceDocument(scriptResult);
+ m_frame->document()->loader()->writer()->replaceDocument(scriptResult);
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.h b/Source/WebKit/chromium/src/WebFrameImpl.h
index b7ac100..e7c92b0 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.h
+++ b/Source/WebKit/chromium/src/WebFrameImpl.h
@@ -209,7 +209,7 @@ public:
void paintWithContext(WebCore::GraphicsContext&, const WebRect&);
void createFrameView();
- static WebFrameImpl* fromFrame(WebCore::Frame* frame);
+ static WebFrameImpl* fromFrame(const WebCore::Frame*);
static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element);
// If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl
diff --git a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index 14ed02e..bb7a19b 100644
--- a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -61,11 +61,6 @@ void WebIDBCallbacksImpl::onError(const WebKit::WebIDBDatabaseError& error)
m_callbacks->onError(error);
}
-void WebIDBCallbacksImpl::onSuccess()
-{
- m_callbacks->onSuccess();
-}
-
void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBCursor* cursor)
{
m_callbacks->onSuccess(IDBCursorBackendProxy::create(cursor));
diff --git a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
index 33a72f4..d2ae255 100644
--- a/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBCallbacksImpl.h
@@ -42,7 +42,6 @@ public:
virtual ~WebIDBCallbacksImpl();
virtual void onError(const WebKit::WebIDBDatabaseError&);
- virtual void onSuccess(); // For "null".
virtual void onSuccess(WebKit::WebIDBCursor*);
virtual void onSuccess(WebKit::WebIDBDatabase*);
virtual void onSuccess(const WebKit::WebIDBKey&);
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index fa7a200..7f794d9 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -84,10 +84,10 @@ void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* c
m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks), ec);
}
-WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode& ec)
+WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode& ec)
{
RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
- RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout, ec);
+ RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, ec);
if (!transaction) {
ASSERT(ec);
return 0;
diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 64e0b2e..2dc27d5 100644
--- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -52,7 +52,7 @@ public:
virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&);
- virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&);
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, WebExceptionCode&);
virtual void close();
private:
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 0503ede..9fe6166 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -71,9 +71,9 @@ void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks
m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, PutMode putMode, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
+ m_objectStore->put(value, key, static_cast<IDBObjectStoreBackendInterface::PutMode>(putMode), IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
void WebIDBObjectStoreImpl::deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
@@ -81,6 +81,11 @@ void WebIDBObjectStoreImpl::deleteFunction(const WebIDBKey& key, WebIDBCallbacks
m_objectStore->deleteFunction(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
+void WebIDBObjectStoreImpl::clear(WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
+{
+ m_objectStore->clear(IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
+}
+
WebIDBIndex* WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
RefPtr<IDBIndexBackendInterface> index = m_objectStore->createIndex(name, keyPath, unique, transaction.getIDBTransactionBackendInterface(), ec);
diff --git a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index f9cd776..3e2dfab 100755
--- a/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -48,8 +48,9 @@ public:
WebDOMStringList indexNames() const;
void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- void put(const WebSerializedScriptValue&, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ void put(const WebSerializedScriptValue&, const WebIDBKey&, PutMode, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
void deleteFunction(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ void clear(WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&);
WebIDBIndex* index(const WebString& name, WebExceptionCode&);
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp b/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
index 96924cf..848182e 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
+++ b/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
@@ -51,11 +51,6 @@ void WebIDBTransactionCallbacksImpl::onComplete()
m_callbacks->onComplete();
}
-void WebIDBTransactionCallbacksImpl::onTimeout()
-{
- m_callbacks->onTimeout();
-}
-
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h b/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
index 89b9cbe..416ac3c 100644
--- a/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
+++ b/Source/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
@@ -43,7 +43,6 @@ public:
virtual void onAbort();
virtual void onComplete();
- virtual void onTimeout();
private:
RefPtr<IDBTransactionCallbacks> m_callbacks;
diff --git a/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.cpp b/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.cpp
new file mode 100644
index 0000000..c1dd321
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2011 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 "WebIconLoadingCompletionImpl.h"
+
+#include "BitmapImage.h"
+#include "Icon.h"
+#include "SharedBuffer.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIconLoadingCompletionImpl::WebIconLoadingCompletionImpl(FileChooser* chooser)
+ : m_fileChooser(chooser)
+{
+}
+
+WebIconLoadingCompletionImpl::~WebIconLoadingCompletionImpl()
+{
+}
+
+void WebIconLoadingCompletionImpl::didLoadIcon(const WebData& iconData)
+{
+ if (!iconData.isEmpty()) {
+ RefPtr<Image> image = BitmapImage::create();
+ image->setData(iconData, true);
+ m_fileChooser->iconLoaded(Icon::create(image));
+ }
+ // This object is no longer needed.
+ delete this;
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.h b/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.h
new file mode 100644
index 0000000..6e6f3a8
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebIconLoadingCompletionImpl.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 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 WebIconLoadingCompletionImpl_h
+#define WebIconLoadingCompletionImpl_h
+
+#include "FileChooser.h"
+#include "WebData.h"
+#include "WebIconLoadingCompletion.h"
+#include <wtf/PassRefPtr.h>
+
+using WebKit::WebIconLoadingCompletion;
+using WebKit::WebData;
+
+namespace WebKit {
+
+class WebIconLoadingCompletionImpl : public WebIconLoadingCompletion {
+public:
+ WebIconLoadingCompletionImpl(WebCore::FileChooser*);
+ virtual void didLoadIcon(const WebData&);
+
+private:
+ ~WebIconLoadingCompletionImpl();
+
+ RefPtr<WebCore::FileChooser> m_fileChooser;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/src/WebImageCG.cpp b/Source/WebKit/chromium/src/WebImageCG.cpp
index 045c8be..dda829f 100644
--- a/Source/WebKit/chromium/src/WebImageCG.cpp
+++ b/Source/WebKit/chromium/src/WebImageCG.cpp
@@ -49,20 +49,38 @@ namespace WebKit {
WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize)
{
- // FIXME: Do something like what WebImageSkia.cpp does to enumerate frames.
- // Not sure whether the CG decoder uses the same frame ordering rules (if so
- // we can just use the same logic).
-
ImageSource source;
source.setData(PassRefPtr<SharedBuffer>(data).get(), true);
if (!source.isSizeAvailable())
return WebImage();
- RetainPtr<CGImageRef> frame0(AdoptCF, source.createFrameAtIndex(0));
- if (!frame0)
+ // Frames are arranged by decreasing size, then decreasing bit depth.
+ // Pick the frame closest to |desiredSize|'s area without being smaller,
+ // which has the highest bit depth.
+ const size_t frameCount = source.frameCount();
+ size_t index = 0; // Default to first frame if none are large enough.
+ int frameAreaAtIndex = 0;
+ for (size_t i = 0; i < frameCount; ++i) {
+ const IntSize frameSize = source.frameSizeAtIndex(i);
+ if (WebSize(frameSize) == desiredSize) {
+ index = i;
+ break; // Perfect match.
+ }
+ const int frameArea = frameSize.width() * frameSize.height();
+ if (frameArea < (desiredSize.width * desiredSize.height))
+ break; // No more frames that are large enough.
+
+ if (!i || (frameArea < frameAreaAtIndex)) {
+ index = i; // Closer to desired area than previous best match.
+ frameAreaAtIndex = frameArea;
+ }
+ }
+
+ RetainPtr<CGImageRef> frame(AdoptCF, source.createFrameAtIndex(index));
+ if (!frame)
return WebImage();
- return WebImage(frame0.get());
+ return WebImage(frame.get());
}
void WebImage::reset()
diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp
index 8d89c60..7e91a17 100644
--- a/Source/WebKit/chromium/src/WebInputElement.cpp
+++ b/Source/WebKit/chromium/src/WebInputElement.cpp
@@ -135,11 +135,6 @@ void WebInputElement::setAutofilled(bool autoFilled)
unwrap<HTMLInputElement>()->setAutofilled(autoFilled);
}
-void WebInputElement::dispatchFormControlChangeEvent()
-{
- unwrap<HTMLInputElement>()->dispatchFormControlChangeEvent();
-}
-
void WebInputElement::setSelectionRange(int start, int end)
{
unwrap<HTMLInputElement>()->setSelectionRange(start, end);
@@ -160,7 +155,10 @@ bool WebInputElement::isValidValue(const WebString& value) const
return constUnwrap<HTMLInputElement>()->isValidValue(value);
}
-const int WebInputElement::defaultMaxLength = HTMLInputElement::s_maximumLength;
+int WebInputElement::defaultMaxLength()
+{
+ return HTMLInputElement::s_maximumLength;
+}
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
@@ -178,4 +176,15 @@ WebInputElement::operator PassRefPtr<HTMLInputElement>() const
return static_cast<HTMLInputElement*>(m_private.get());
}
+WebInputElement* toWebInputElement(WebElement* webElement)
+{
+ InputElement* inputElement = toInputElement(webElement->unwrap<Element>());
+ if (!inputElement)
+ return 0;
+
+ ASSERT(webElement->unwrap<Element>()->isHTMLElement());
+
+ return static_cast<WebInputElement*>(webElement);
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 65f0fde..853cbcf 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -144,7 +144,7 @@ void WebMediaPlayerClientImpl::repaint()
ASSERT(m_mediaPlayer);
#if USE(ACCELERATED_COMPOSITING)
if (m_videoLayer.get() && supportsAcceleratedRendering())
- m_videoLayer->setNeedsDisplay(FloatRect(0, 0, m_videoLayer->bounds().width(), m_videoLayer->bounds().height()));
+ m_videoLayer->setNeedsDisplay(IntRect(0, 0, m_videoLayer->bounds().width(), m_videoLayer->bounds().height()));
#endif
m_mediaPlayer->repaint();
}
@@ -397,6 +397,17 @@ void WebMediaPlayerClientImpl::setSize(const IntSize& size)
void WebMediaPlayerClientImpl::paint(GraphicsContext* context, const IntRect& rect)
{
+#if USE(ACCELERATED_COMPOSITING)
+ // If we are using GPU to render video, ignore requests to paint frames into
+ // canvas because it will be taken care of by VideoLayerChromium.
+ if (acceleratedRenderingInUse())
+ return;
+#endif
+ paintCurrentFrameInContext(context, rect);
+}
+
+void WebMediaPlayerClientImpl::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
+{
// Normally GraphicsContext operations do nothing when painting is disabled.
// Since we're accessing platformContext() directly we have to manually
// check.
@@ -445,6 +456,11 @@ bool WebMediaPlayerClientImpl::supportsAcceleratedRendering() const
return m_supportsAcceleratedCompositing;
}
+bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
+{
+ return m_videoLayer.get() && m_videoLayer->layerRenderer();
+}
+
VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame()
{
VideoFrameChromium* videoFrame = 0;
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index ca7c43c..fcdb219 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -111,6 +111,7 @@ public:
virtual unsigned bytesLoaded() const;
virtual void setSize(const WebCore::IntSize&);
virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
+ virtual void paintCurrentFrameInContext(WebCore::GraphicsContext*, const WebCore::IntRect&);
virtual bool hasSingleSecurityOrigin() const;
virtual WebCore::MediaPlayer::MovieLoadType movieLoadType() const;
#if USE(ACCELERATED_COMPOSITING)
@@ -128,6 +129,9 @@ private:
static void getSupportedTypes(WTF::HashSet<WTF::String>&);
static WebCore::MediaPlayer::SupportsType supportsType(
const WTF::String& type, const WTF::String& codecs);
+#if USE(ACCELERATED_COMPOSITING)
+ bool acceleratedRenderingInUse();
+#endif
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
diff --git a/Source/WebKit/chromium/src/WebNotification.cpp b/Source/WebKit/chromium/src/WebNotification.cpp
index c3b1f51..1f2640c 100644
--- a/Source/WebKit/chromium/src/WebNotification.cpp
+++ b/Source/WebKit/chromium/src/WebNotification.cpp
@@ -96,12 +96,6 @@ 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) ?
diff --git a/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp b/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp
index 0d85d78..7ea9a8c 100644
--- a/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp
@@ -168,7 +168,7 @@ String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
// Get encoding info.
String xmlEncoding = param->document->xmlEncoding();
if (xmlEncoding.isEmpty())
- xmlEncoding = param->document->frame()->loader()->writer()->encoding();
+ xmlEncoding = param->document->loader()->writer()->encoding();
if (xmlEncoding.isEmpty())
xmlEncoding = UTF8Encoding().name();
result.append("<?xml version=\"");
@@ -505,7 +505,7 @@ bool WebPageSerializerImpl::serialize()
didSerialization = true;
- String encoding = webFrame->frame()->loader()->writer()->encoding();
+ String encoding = document->loader()->writer()->encoding();
const TextEncoding& textEncoding = encoding.isEmpty() ? UTF8Encoding() : TextEncoding(encoding);
String directoryName = url == mainURL ? m_localDirectoryName : "";
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 5f62077..bb1b083 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -63,12 +63,14 @@
#include "HTMLFormElement.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
+#include "IFrameShimSupport.h"
#include "KeyboardCodes.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "Page.h"
#include "RenderBox.h"
#include "ScrollView.h"
+#include "UserGestureIndicator.h"
#include "WheelEvent.h"
#if WEBKIT_USING_SKIA
@@ -127,14 +129,12 @@ void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
if (!parent())
return;
- IntRect damageRect = convertToContainingWindow(rect);
+ RenderBox* renderer = toRenderBox(m_element->renderer());
- // Get our clip rect and intersect with it to ensure we don't invalidate
- // too much.
- IntRect clipRect = parent()->windowClipRect();
- damageRect.intersect(clipRect);
-
- parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/);
+ IntRect dirtyRect = rect;
+ dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(),
+ renderer->borderTop() + renderer->paddingTop());
+ renderer->repaintRectangle(dirtyRect);
}
void WebPluginContainerImpl::setFocus(bool focused)
@@ -368,6 +368,9 @@ void WebPluginContainerImpl::loadFrameRequest(
FrameLoadRequest frameRequest(frame->document()->securityOrigin(),
request.toResourceRequest(), target);
+ UserGestureIndicator gestureIndicator(request.hasUserGesture() ?
+ DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
+
frame->loader()->loadFrameRequest(
frameRequest,
false, // lock history
@@ -552,7 +555,7 @@ void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect,
clipRect = windowClipRect();
clipRect.move(-windowRect.x(), -windowRect.y());
- windowCutOutRects(frameRect, cutOutRects);
+ getPluginOcclusions(m_element, this->parent(), frameRect, cutOutRects);
// Convert to the plugin position.
for (size_t i = 0; i < cutOutRects.size(); i++)
cutOutRects[i].move(-frameRect.x(), -frameRect.y());
@@ -577,132 +580,4 @@ WebCore::IntRect WebPluginContainerImpl::windowClipRect() const
return clipRect;
}
-static void getObjectStack(const RenderObject* ro,
- Vector<const RenderObject*>* roStack)
-{
- roStack->clear();
- while (ro) {
- roStack->append(ro);
- ro = ro->parent();
- }
-}
-
-// Returns true if stack1 is at or above stack2
-static bool checkStackOnTop(
- const Vector<const RenderObject*>& iframeZstack,
- const Vector<const RenderObject*>& pluginZstack)
-{
- for (size_t i1 = 0, i2 = 0;
- i1 < iframeZstack.size() && i2 < pluginZstack.size();
- i1++, i2++) {
- // The root is at the end of these stacks. We want to iterate
- // root-downwards so we index backwards from the end.
- const RenderObject* ro1 = iframeZstack[iframeZstack.size() - 1 - i1];
- const RenderObject* ro2 = pluginZstack[pluginZstack.size() - 1 - i2];
-
- if (ro1 != ro2) {
- // When we find nodes in the stack that are not the same, then
- // we've found the nodes just below the lowest comment ancestor.
- // Determine which should be on top.
-
- // See if z-index determines an order.
- if (ro1->style() && ro2->style()) {
- int z1 = ro1->style()->zIndex();
- int z2 = ro2->style()->zIndex();
- if (z1 > z2)
- return true;
- if (z1 < z2)
- return false;
- }
-
- // If the plugin does not have an explicit z-index it stacks behind the iframe.
- // This is for maintaining compatibility with IE.
- if (ro2->style()->position() == StaticPosition) {
- // The 0'th elements of these RenderObject arrays represent the plugin node and
- // the iframe.
- const RenderObject* pluginRenderObject = pluginZstack[0];
- const RenderObject* iframeRenderObject = iframeZstack[0];
-
- if (pluginRenderObject->style() && iframeRenderObject->style()) {
- if (pluginRenderObject->style()->zIndex() > iframeRenderObject->style()->zIndex())
- return false;
- }
- return true;
- }
-
- // Inspect the document order. Later order means higher
- // stacking.
- const RenderObject* parent = ro1->parent();
- if (!parent)
- return false;
- ASSERT(parent == ro2->parent());
-
- for (const RenderObject* ro = parent->firstChild(); ro; ro = ro->nextSibling()) {
- if (ro == ro1)
- return false;
- if (ro == ro2)
- return true;
- }
- ASSERT(false); // We should have seen ro1 and ro2 by now.
- return false;
- }
- }
- return true;
-}
-
-// Return a set of rectangles that should not be overdrawn by the
-// plugin ("cutouts"). This helps implement the "iframe shim"
-// technique of overlaying a windowed plugin with content from the
-// page. In a nutshell, iframe elements should occlude plugins when
-// they occur higher in the stacking order.
-void WebPluginContainerImpl::windowCutOutRects(const IntRect& frameRect,
- Vector<IntRect>& cutOutRects)
-{
- RenderObject* pluginNode = m_element->renderer();
- ASSERT(pluginNode);
- if (!pluginNode->style())
- return;
- Vector<const RenderObject*> pluginZstack;
- Vector<const RenderObject*> iframeZstack;
- getObjectStack(pluginNode, &pluginZstack);
-
- // Get the parent widget
- Widget* parentWidget = this->parent();
- if (!parentWidget->isFrameView())
- return;
-
- FrameView* parentFrameView = static_cast<FrameView*>(parentWidget);
-
- const HashSet<RefPtr<Widget> >* children = parentFrameView->children();
- for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != children->end(); ++it) {
- // We only care about FrameView's because iframes show up as FrameViews.
- if (!(*it)->isFrameView())
- continue;
-
- const FrameView* frameView =
- static_cast<const FrameView*>((*it).get());
- // Check to make sure we can get both the element and the RenderObject
- // for this FrameView, if we can't just move on to the next object.
- if (!frameView->frame() || !frameView->frame()->ownerElement()
- || !frameView->frame()->ownerElement()->renderer())
- continue;
-
- HTMLElement* element = frameView->frame()->ownerElement();
- RenderObject* iframeRenderer = element->renderer();
-
- if (element->hasTagName(HTMLNames::iframeTag)
- && iframeRenderer->absoluteBoundingBoxRect().intersects(frameRect)
- && (!iframeRenderer->style() || iframeRenderer->style()->visibility() == VISIBLE)) {
- getObjectStack(iframeRenderer, &iframeZstack);
- if (checkStackOnTop(iframeZstack, pluginZstack)) {
- IntPoint point =
- roundedIntPoint(iframeRenderer->localToAbsolute());
- RenderBox* rbox = toRenderBox(iframeRenderer);
- IntSize size(rbox->width(), rbox->height());
- cutOutRects.append(IntRect(point, size));
- }
- }
- }
-}
-
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
index a209e6a..b4d4246 100644
--- a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -35,7 +35,7 @@
#include "FramelessScrollView.h"
#include "FrameView.h"
#include "IntRect.h"
-#include "PlatformContextSkia.h"
+#include "painting/GraphicsContextBuilder.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PlatformWheelEvent.h"
@@ -141,13 +141,13 @@ void WebPopupMenuImpl::resize(const WebSize& newSize)
m_size = newSize;
if (m_widget) {
- IntRect newGeometry(0, 0, m_size.width, m_size.height);
- m_widget->setFrameRect(newGeometry);
+ IntRect newGeometry(0, 0, m_size.width, m_size.height);
+ m_widget->setFrameRect(newGeometry);
}
if (m_client) {
- WebRect damagedRect(0, 0, m_size.width, m_size.height);
- m_client->didInvalidateRect(damagedRect);
+ WebRect damagedRect(0, 0, m_size.width, m_size.height);
+ m_client->didInvalidateRect(damagedRect);
}
}
@@ -164,18 +164,8 @@ void WebPopupMenuImpl::paint(WebCanvas* canvas, const WebRect& rect)
if (!m_widget)
return;
- if (!rect.isEmpty()) {
-#if WEBKIT_USING_CG
- GraphicsContext gc(canvas);
-#elif WEBKIT_USING_SKIA
- PlatformContextSkia context(canvas);
- // PlatformGraphicsContext is actually a pointer to PlatformContextSkia.
- GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
-#else
- notImplemented();
-#endif
- m_widget->paint(&gc, rect);
- }
+ if (!rect.isEmpty())
+ m_widget->paint(&GraphicsContextBuilder(canvas).context(), rect);
}
void WebPopupMenuImpl::themeChanged()
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 0b5d397..e3ece6e 100644
--- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -202,14 +202,14 @@ bool WebRuntimeFeatures::isWebAudioEnabled()
void WebRuntimeFeatures::enableWebGL(bool enable)
{
-#if ENABLE(3D_CANVAS)
+#if ENABLE(WEBGL)
RuntimeEnabledFeatures::setWebGLEnabled(enable);
#endif
}
bool WebRuntimeFeatures::isWebGLEnabled()
{
-#if ENABLE(3D_CANVAS)
+#if ENABLE(WEBGL)
return RuntimeEnabledFeatures::webGLRenderingContextEnabled();
#else
return false;
@@ -304,4 +304,20 @@ bool WebRuntimeFeatures::isFileSystemEnabled()
#endif
}
+void WebRuntimeFeatures::enableJavaScriptI18NAPI(bool enable)
+{
+#if ENABLE(JAVASCRIPT_I18N_API)
+ RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isJavaScriptI18NAPIEnabled()
+{
+#if ENABLE(JAVASCRIPT_I18N_API)
+ return RuntimeEnabledFeatures::javaScriptI18NAPIEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebScrollbarImpl.cpp b/Source/WebKit/chromium/src/WebScrollbarImpl.cpp
index 05d2d1f..57ea92e 100644
--- a/Source/WebKit/chromium/src/WebScrollbarImpl.cpp
+++ b/Source/WebKit/chromium/src/WebScrollbarImpl.cpp
@@ -33,7 +33,7 @@
#include "GraphicsContext.h"
#include "KeyboardCodes.h"
-#include "PlatformContextSkia.h"
+#include "painting/GraphicsContextBuilder.h"
#include "Scrollbar.h"
#include "ScrollbarTheme.h"
#include "ScrollTypes.h"
@@ -76,7 +76,7 @@ WebScrollbarImpl::~WebScrollbarImpl()
void WebScrollbarImpl::setLocation(const WebRect& rect)
{
- WebCore::IntRect oldRect = m_scrollbar->frameRect();
+ IntRect oldRect = m_scrollbar->frameRect();
m_scrollbar->setFrameRect(rect);
if (WebRect(oldRect) != rect)
m_scrollbar->invalidate();
@@ -95,7 +95,7 @@ int WebScrollbarImpl::value() const
void WebScrollbarImpl::setValue(int position)
{
- WebCore::ScrollableArea::scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), position);
+ ScrollableArea::scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), static_cast<float>(position));
}
void WebScrollbarImpl::setDocumentSize(int size)
@@ -119,18 +119,7 @@ void WebScrollbarImpl::scroll(ScrollDirection direction, ScrollGranularity granu
void WebScrollbarImpl::paint(WebCanvas* canvas, const WebRect& rect)
{
-#if WEBKIT_USING_CG
- GraphicsContext gc(canvas);
-#elif WEBKIT_USING_SKIA
- PlatformContextSkia context(canvas);
-
- // PlatformGraphicsContext is actually a pointer to PlatformContextSkia
- GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context));
-#else
- notImplemented();
-#endif
-
- m_scrollbar->paint(&gc, rect);
+ m_scrollbar->paint(&GraphicsContextBuilder(canvas).context(), rect);
}
bool WebScrollbarImpl::handleInputEvent(const WebInputEvent& event)
@@ -220,7 +209,7 @@ bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event)
if (negative)
delta *= -1;
}
- WebCore::ScrollableArea::scroll((m_scrollbar->orientation() == HorizontalScrollbar) ? WebCore::ScrollLeft : WebCore::ScrollUp, WebCore::ScrollByPixel, delta);
+ ScrollableArea::scroll((m_scrollbar->orientation() == HorizontalScrollbar) ? WebCore::ScrollLeft : WebCore::ScrollUp, WebCore::ScrollByPixel, delta);
return true;
}
@@ -259,7 +248,7 @@ bool WebScrollbarImpl::onKeyDown(const WebInputEvent& event)
WebCore::ScrollGranularity scrollGranularity;
if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity)) {
// Will return false if scroll direction wasn't compatible with this scrollbar.
- return WebCore::ScrollableArea::scroll(scrollDirection, scrollGranularity);
+ return ScrollableArea::scroll(scrollDirection, scrollGranularity);
}
return false;
}
@@ -269,12 +258,12 @@ int WebScrollbarImpl::scrollSize(WebCore::ScrollbarOrientation orientation) cons
return (orientation == m_scrollbar->orientation()) ? (m_scrollbar->totalSize() - m_scrollbar->visibleSize()) : 0;
}
-int WebScrollbarImpl::scrollPosition(WebCore::Scrollbar*) const
+int WebScrollbarImpl::scrollPosition(Scrollbar*) const
{
return m_scrollOffset;
}
-void WebScrollbarImpl::setScrollOffset(const WebCore::IntPoint& offset)
+void WebScrollbarImpl::setScrollOffset(const IntPoint& offset)
{
if (m_scrollbar->orientation() == HorizontalScrollbar)
m_scrollOffset = offset.x();
@@ -284,7 +273,7 @@ void WebScrollbarImpl::setScrollOffset(const WebCore::IntPoint& offset)
m_client->valueChanged(this);
}
-void WebScrollbarImpl::invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect& rect)
+void WebScrollbarImpl::invalidateScrollbarRect(Scrollbar*, const IntRect& rect)
{
WebRect webrect(rect);
webrect.x += m_scrollbar->x();
@@ -302,7 +291,7 @@ bool WebScrollbarImpl::scrollbarCornerPresent() const
return false;
}
-void WebScrollbarImpl::getTickmarks(Vector<WebCore::IntRect>& tickmarks) const
+void WebScrollbarImpl::getTickmarks(Vector<IntRect>& tickmarks) const
{
WebVector<WebRect> ticks;
m_client->getTickmarks(const_cast<WebScrollbarImpl*>(this), &ticks);
@@ -311,4 +300,14 @@ void WebScrollbarImpl::getTickmarks(Vector<WebCore::IntRect>& tickmarks) const
tickmarks[i] = ticks[i];
}
+Scrollbar* WebScrollbarImpl::horizontalScrollbar() const
+{
+ return m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar.get() : 0;
+}
+
+Scrollbar* WebScrollbarImpl::verticalScrollbar() const
+{
+ return m_scrollbar->orientation() == VerticalScrollbar ? m_scrollbar.get() : 0;
+}
+
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebScrollbarImpl.h b/Source/WebKit/chromium/src/WebScrollbarImpl.h
index 4dcfd5d..ac120cf 100644
--- a/Source/WebKit/chromium/src/WebScrollbarImpl.h
+++ b/Source/WebKit/chromium/src/WebScrollbarImpl.h
@@ -65,6 +65,8 @@ public:
virtual bool isActive() const;
virtual bool scrollbarCornerPresent() const;
virtual void getTickmarks(Vector<WebCore::IntRect>&) const;
+ virtual WebCore::Scrollbar* horizontalScrollbar() const;
+ virtual WebCore::Scrollbar* verticalScrollbar() const;
private:
bool onMouseDown(const WebInputEvent& event);
diff --git a/Source/WebKit/chromium/src/WebSearchableFormData.cpp b/Source/WebKit/chromium/src/WebSearchableFormData.cpp
index 8e27a67..647f20d 100644
--- a/Source/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/Source/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -62,8 +62,7 @@ void GetFormEncoding(const HTMLFormElement* form, TextEncoding* encoding)
if (encoding->isValid())
return;
}
- const Frame* frame = form->document()->frame();
- *encoding = frame ? TextEncoding(frame->loader()->writer()->encoding()) : Latin1Encoding();
+ *encoding = TextEncoding(form->document()->loader()->writer()->encoding());
}
// Returns true if the submit request results in an HTTP URL.
diff --git a/Source/WebKit/chromium/src/WebSelectElement.cpp b/Source/WebKit/chromium/src/WebSelectElement.cpp
index 79a4d85..7aac44a 100644
--- a/Source/WebKit/chromium/src/WebSelectElement.cpp
+++ b/Source/WebKit/chromium/src/WebSelectElement.cpp
@@ -46,14 +46,14 @@ void WebSelectElement::setValue(const WebString& value)
unwrap<HTMLSelectElement>()->setValue(value);
}
-WebString WebSelectElement::value()
+WebString WebSelectElement::value() const
{
- return unwrap<HTMLSelectElement>()->value();
+ return constUnwrap<HTMLSelectElement>()->value();
}
-WebVector<WebElement> WebSelectElement::listItems()
+WebVector<WebElement> WebSelectElement::listItems() const
{
- const Vector<Element*>& sourceItems = unwrap<HTMLSelectElement>()->listItems();
+ const Vector<Element*>& sourceItems = constUnwrap<HTMLSelectElement>()->listItems();
WebVector<WebElement> items(sourceItems.size());
for (size_t i = 0; i < sourceItems.size(); ++i)
items[i] = WebElement(static_cast<HTMLElement*>(sourceItems[i]));
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
index 0457f77..dd82fa6 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -274,6 +274,11 @@ void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled)
m_settings->setWebGLEnabled(enabled);
}
+void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled)
+{
+ m_settings->setOpenGLMultisamplingEnabled(enabled);
+}
+
void WebSettingsImpl::setShowDebugBorders(bool show)
{
m_settings->setShowDebugBorders(show);
@@ -329,6 +334,11 @@ void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled)
m_settings->setHyperlinkAuditingEnabled(enabled);
}
+void WebSettingsImpl::setAsynchronousSpellCheckingEnabled(bool enabled)
+{
+ m_settings->setAsynchronousSpellCheckingEnabled(enabled);
+}
+
void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled)
{
m_settings->setCaretBrowsingEnabled(enabled);
diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h
index 4960bb9..b52a364 100644
--- a/Source/WebKit/chromium/src/WebSettingsImpl.h
+++ b/Source/WebKit/chromium/src/WebSettingsImpl.h
@@ -86,6 +86,7 @@ public:
virtual void setOfflineWebApplicationCacheEnabled(bool);
virtual void setWebAudioEnabled(bool);
virtual void setExperimentalWebGLEnabled(bool);
+ virtual void setOpenGLMultisamplingEnabled(bool);
virtual void setShowDebugBorders(bool);
virtual void setEditingBehavior(EditingBehavior);
virtual void setAcceleratedCompositingEnabled(bool);
@@ -97,6 +98,7 @@ public:
virtual void setAccelerated2dCanvasEnabled(bool);
virtual void setMemoryInfoEnabled(bool);
virtual void setHyperlinkAuditingEnabled(bool);
+ virtual void setAsynchronousSpellCheckingEnabled(bool);
virtual void setCaretBrowsingEnabled(bool);
virtual void setInteractiveFormValidationEnabled(bool);
diff --git a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
new file mode 100644
index 0000000..2759790
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 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 "WebTextCheckingCompletionImpl.h"
+
+#include "SpellChecker.h"
+#include "WebTextCheckingResult.h"
+#include "WebVector.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+static Vector<SpellCheckingResult> toCoreResults(const WebVector<WebTextCheckingResult>& results)
+{
+ Vector<SpellCheckingResult> coreResults;
+ for (size_t i = 0; i < results.size(); ++i)
+ coreResults.append(SpellCheckingResult(static_cast<DocumentMarker::MarkerType>(results[i].error()), results[i].position(), results[i].length()));
+ return coreResults;
+}
+
+void WebTextCheckingCompletionImpl::didFinishCheckingText(const WebVector<WebTextCheckingResult>& results)
+{
+ m_spellChecker->didCheck(m_identifier, toCoreResults(results));
+ delete this;
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
new file mode 100644
index 0000000..f1017c7
--- /dev/null
+++ b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
@@ -0,0 +1,58 @@
+/*
+ * 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 WebTextCheckingCompletionImpl_h
+#define WebTextCheckingCompletionImpl_h
+
+#include "WebTextCheckingCompletion.h"
+
+namespace WebCore {
+class SpellChecker;
+}
+
+namespace WebKit {
+
+class WebTextCheckingCompletionImpl : public WebTextCheckingCompletion {
+public:
+ WebTextCheckingCompletionImpl(int identifier, WebCore::SpellChecker* spellchecker)
+ : m_identifier(identifier), m_spellChecker(spellchecker)
+ {
+ }
+
+ virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&);
+
+private:
+ int m_identifier;
+ WebCore::SpellChecker* m_spellChecker;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/src/WebTextRun.cpp b/Source/WebKit/chromium/src/WebTextRun.cpp
index 58d9fac..b8c6ccb 100644
--- a/Source/WebKit/chromium/src/WebTextRun.cpp
+++ b/Source/WebKit/chromium/src/WebTextRun.cpp
@@ -39,7 +39,7 @@ namespace WebKit {
WebTextRun::operator WebCore::TextRun() const
{
- return TextRun(text, false, 0, 0, rtl, directionalOverride);
+ return TextRun(text, false, 0, 0, TextRun::AllowTrailingExpansion, rtl, directionalOverride);
}
} // namespace WebKit
diff --git a/Source/WebKit/chromium/src/WebURLResponse.cpp b/Source/WebKit/chromium/src/WebURLResponse.cpp
index bf3c521..7917298 100644
--- a/Source/WebKit/chromium/src/WebURLResponse.cpp
+++ b/Source/WebKit/chromium/src/WebURLResponse.cpp
@@ -384,6 +384,16 @@ void WebURLResponse::setDownloadFilePath(const WebString& downloadFilePath)
m_private->m_downloadFilePath = downloadFilePath;
}
+WebString WebURLResponse::socketAddress() const
+{
+ return m_private->m_resourceResponse->socketAddress();
+}
+
+void WebURLResponse::setSocketAddress(const WebString& socketAddress)
+{
+ m_private->m_resourceResponse->setSocketAddress(socketAddress);
+}
+
void WebURLResponse::assign(WebURLResponsePrivate* p)
{
// Subclasses may call this directly so a self-assignment check is needed
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 798e5ff..18a953e 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -121,6 +121,7 @@
#include "WebVector.h"
#include "WebViewClient.h"
#include <wtf/ByteArray.h>
+#include <wtf/CurrentTime.h>
#include <wtf/RefPtr.h>
#if PLATFORM(CG)
@@ -200,13 +201,9 @@ COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery);
static const PopupContainerSettings autoFillPopupSettings = {
false, // setTextOnIndexChange
false, // acceptOnAbandon
- true, // loopSelectionNavigation
- false, // restrictWidthOfListBox (For security reasons show the entire entry
- // so the user doesn't enter information he did not intend to.)
- // For suggestions, we use the direction of the input field as the direction
- // of the popup items. The main reason is to keep the display of items in
- // drop-down the same as the items in the input field.
- PopupContainerSettings::DOMElementDirection,
+ true, // loopSelectionNavigation
+ false // restrictWidthOfListBox (For security reasons show the entire entry
+ // so the user doesn't enter information he did not intend to.)
};
static bool shouldUseExternalPopupMenus = false;
@@ -979,7 +976,7 @@ void WebViewImpl::animate()
if (webframe) {
FrameView* view = webframe->frameView();
if (view)
- view->serviceScriptedAnimations();
+ view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
}
#endif
}
@@ -1008,8 +1005,8 @@ void WebViewImpl::layout()
#if USE(ACCELERATED_COMPOSITING)
void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect)
{
- ASSERT(rect.right() <= m_layerRenderer->rootLayerTextureSize().width()
- && rect.bottom() <= m_layerRenderer->rootLayerTextureSize().height());
+ ASSERT(rect.maxX() <= m_layerRenderer->rootLayerTextureSize().width()
+ && rect.maxY() <= m_layerRenderer->rootLayerTextureSize().height());
#if PLATFORM(SKIA)
PlatformContextSkia context(canvas);
@@ -1024,7 +1021,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
notImplemented();
#endif
// Compute rect to sample from inverted GPU buffer.
- IntRect invertRect(rect.x(), bitmapHeight - rect.bottom(), rect.width(), rect.height());
+ IntRect invertRect(rect.x(), bitmapHeight - rect.maxY(), rect.width(), rect.height());
OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size()));
RefPtr<ByteArray> pixelArray(ByteArray::create(rect.width() * rect.height() * 4));
@@ -1032,7 +1029,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
m_layerRenderer->getFramebufferPixels(pixelArray->data(), invertRect);
imageBuffer->putPremultipliedImageData(pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint());
gc.save();
- gc.translate(FloatSize(0.0f, bitmapHeight));
+ gc.translate(IntSize(0, bitmapHeight));
gc.scale(FloatSize(1.0f, -1.0f));
// Use invertRect in next line, so that transform above inverts it back to
// desired destination rect.
@@ -1461,7 +1458,7 @@ WebString WebViewImpl::pageEncoding() const
if (!m_page.get())
return WebString();
- return m_page->mainFrame()->loader()->writer()->encoding();
+ return m_page->mainFrame()->document()->loader()->writer()->encoding();
}
void WebViewImpl::setPageEncoding(const WebString& encodingName)
@@ -1615,7 +1612,7 @@ double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel)
if (pluginContainer)
pluginContainer->plugin()->setZoomLevel(m_zoomLevel, textOnly);
else {
- double zoomFactor = zoomLevelToZoomFactor(m_zoomLevel);
+ float zoomFactor = static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel));
if (textOnly)
frame->setPageAndTextZoomFactors(1, zoomFactor);
else
@@ -1760,7 +1757,7 @@ WebDragOperation WebViewImpl::dragTargetDragEnterNew(
{
ASSERT(!m_currentDragData.get());
- m_currentDragData = ChromiumDataObject::createReadable(Clipboard::DragAndDrop);
+ m_currentDragData = ChromiumDataObject::createReadable(m_page->mainFrame(), Clipboard::DragAndDrop);
m_dragIdentity = identity;
m_operationsAllowed = operationsAllowed;
@@ -2372,7 +2369,7 @@ public:
return;
FrameView* view = page->mainFrame()->view();
- context.translate(view->scrollX(), view->scrollY());
+ context.translate(static_cast<float>(view->scrollX()), static_cast<float>(view->scrollY()));
IntRect windowRect = view->contentsToWindow(contentRect);
view->paintScrollbars(&context, windowRect);
}
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index d164a48..7640ceb 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -53,6 +53,7 @@
namespace WebCore {
class ChromiumDataObject;
+class DocumentLoader;
class Frame;
class HistoryItem;
class HitTestResult;
diff --git a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
index 058e947..faea40b 100644
--- a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
+++ b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
@@ -56,8 +56,8 @@ namespace WebCore {
static const char fileSystemOperationsMode[] = "fileSystemOperationsMode";
-WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
- : AsyncFileSystem(rootPath)
+WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)
+ : AsyncFileSystem(type, rootPath)
, m_scriptExecutionContext(context)
, m_webFileSystem(WebKit::webKitClient()->fileSystem())
, m_workerContext(static_cast<WorkerContext*>(context))
diff --git a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
index 0b4b708..7e3316b 100644
--- a/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
+++ b/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
@@ -52,9 +52,9 @@ class WorkerContext;
class WorkerAsyncFileSystemChromium : public AsyncFileSystem {
public:
- static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
+ static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)
{
- return adoptPtr(new WorkerAsyncFileSystemChromium(context, rootPath, synchronous));
+ return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, rootPath, synchronous));
}
virtual ~WorkerAsyncFileSystemChromium();
@@ -75,7 +75,7 @@ public:
virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
private:
- WorkerAsyncFileSystemChromium(ScriptExecutionContext*, const String& rootPath, bool synchronous);
+ WorkerAsyncFileSystemChromium(ScriptExecutionContext*, AsyncFileSystem::Type, const String& rootPath, bool synchronous);
PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>);
diff --git a/Source/WebKit/chromium/src/js/DevTools.js b/Source/WebKit/chromium/src/js/DevTools.js
index d6536bc..3d61be7 100644
--- a/Source/WebKit/chromium/src/js/DevTools.js
+++ b/Source/WebKit/chromium/src/js/DevTools.js
@@ -41,6 +41,7 @@ var context = {}; // Used by WebCore's inspector routines.
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
Preferences.heapProfilerPresent = true;
+ Preferences.detailedHeapProfiles = false;
Preferences.debuggerAlwaysEnabled = true;
Preferences.profilerAlwaysEnabled = true;
Preferences.canEditScriptSource = true;
@@ -88,6 +89,18 @@ WebInspector.UIString = function(string)
};
+/*
+ * This label must be kept consistent with that in English.lproj/localizedStrings.js
+ *
+ * http://code.google.com/p/chromium/issues/detail?id=61302 requires a custom label for Chromium,
+ * since its behavior is different.
+ */
+WebInspector.openLinkExternallyLabel = function()
+{
+ return WebInspector.UIString("Open Link in New Tab");
+};
+
+
/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
(function()
{
diff --git a/Source/WebKit/chromium/src/js/Tests.js b/Source/WebKit/chromium/src/js/Tests.js
index 900d79e..f155e08 100644
--- a/Source/WebKit/chromium/src/js/Tests.js
+++ b/Source/WebKit/chromium/src/js/Tests.js
@@ -685,7 +685,7 @@ TestSuite.prototype._checkSourceFrameWhenLoaded = function(expectations, callbac
{
var test = this;
- var frame = WebInspector.currentPanel.visibleView.sourceFrame;
+ var frame = WebInspector.currentPanel.visibleView;
if (frame._textViewer)
checkExecLine();
diff --git a/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h b/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h
new file mode 100644
index 0000000..5ffae8e
--- /dev/null
+++ b/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2011 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 GraphicsContextBuilder_h
+#define GraphicsContextBuilder_h
+
+#include "GraphicsContext.h"
+
+#if WEBKIT_USING_CG
+#include "LocalCurrentGraphicsContext.h"
+#elif WEBKIT_USING_SKIA
+#include "PlatformContextSkia.h"
+#endif
+
+namespace WebKit {
+
+#if WEBKIT_USING_CG
+
+class GraphicsContextBuilder {
+public:
+ GraphicsContextBuilder(WebCanvas* canvas)
+ : m_graphicsContext(canvas)
+ , m_localContext(&m_graphicsContext)
+ {
+ }
+
+ WebCore::GraphicsContext& context() { return m_graphicsContext; }
+
+private:
+ WebCore::GraphicsContext m_graphicsContext;
+ WebCore::LocalCurrentGraphicsContext m_localContext;
+};
+
+#elif WEBKIT_USING_SKIA
+
+class GraphicsContextBuilder {
+public:
+ GraphicsContextBuilder(WebCanvas* canvas)
+ : m_platformContext(canvas)
+ , m_graphicsContext(&m_platformContext)
+ {
+ }
+
+ WebCore::GraphicsContext& context() { return m_graphicsContext; }
+
+private:
+ WebCore::PlatformContextSkia m_platformContext;
+ WebCore::GraphicsContext m_graphicsContext;
+};
+
+#else
+#error "Need to define GraphicsContextBuilder!"
+#endif
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/WebKit/chromium/tests/PopupMenuTest.cpp b/Source/WebKit/chromium/tests/PopupMenuTest.cpp
index 4c9a149..acfcda5 100644
--- a/Source/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/Source/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -76,7 +76,7 @@ public:
virtual PopupMenuStyle itemStyle(unsigned listIndex) const
{
Font font(FontPlatformData(12.0, false, false), false);
- return PopupMenuStyle(Color::black, Color::white, font, true, false, Length(), TextDirection());
+ return PopupMenuStyle(Color::black, Color::white, font, true, false, Length(), TextDirection(), false /* has text direction override */);
}
virtual PopupMenuStyle menuStyle() const { return itemStyle(0); }
virtual int clientInsetLeft() const { return 0; }
diff --git a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
index ed7f12f..ee3307f 100644
--- a/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
+++ b/Source/WebKit/chromium/tests/TransparencyWinTest.cpp
@@ -552,8 +552,8 @@ TEST(TransparencyWin, Scale)
EXPECT_TRUE(helper.context()->getCTM().isIdentity());
EXPECT_EQ(2, helper.drawRect().x());
EXPECT_EQ(2, helper.drawRect().y());
- EXPECT_EQ(8, helper.drawRect().right());
- EXPECT_EQ(8, helper.drawRect().bottom());
+ EXPECT_EQ(8, helper.drawRect().maxX());
+ EXPECT_EQ(8, helper.drawRect().maxY());
// Set the pixel at (2, 2) to be transparent. This should be fixed when
// the helper goes out of scope. We don't want to call