summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog550
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/WebKit.gyp122
-rw-r--r--WebKit/chromium/features.gypi4
-rw-r--r--WebKit/chromium/public/WebAccessibilityCache.h4
-rw-r--r--WebKit/chromium/public/WebAccessibilityObject.h76
-rw-r--r--WebKit/chromium/public/WebClipboard.h33
-rw-r--r--WebKit/chromium/public/WebCompositionCommand.h45
-rw-r--r--WebKit/chromium/public/WebContextMenuData.h1
-rw-r--r--WebKit/chromium/public/WebDatabase.h27
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h2
-rw-r--r--WebKit/chromium/public/WebEventListener.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h21
-rw-r--r--WebKit/chromium/public/WebGeolocationServiceMock.h9
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h17
-rw-r--r--WebKit/chromium/public/WebIDBDatabaseError.h8
-rw-r--r--WebKit/chromium/public/WebKitClient.h1
-rw-r--r--WebKit/chromium/public/WebNotification.h2
-rw-r--r--WebKit/chromium/public/WebPasswordFormData.h2
-rw-r--r--WebKit/chromium/public/WebPlugin.h3
-rw-r--r--WebKit/chromium/public/WebPluginContainer.h4
-rw-r--r--WebKit/chromium/public/WebSearchableFormData.h2
-rw-r--r--WebKit/chromium/public/WebStorageEventDispatcher.h2
-rw-r--r--WebKit/chromium/public/WebString.h4
-rw-r--r--WebKit/chromium/public/WebView.h38
-rw-r--r--WebKit/chromium/public/WebViewClient.h3
-rw-r--r--WebKit/chromium/public/WebWidget.h12
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp1
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.cpp171
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.h65
-rw-r--r--WebKit/chromium/src/AutocompletePopupMenuClient.cpp84
-rw-r--r--WebKit/chromium/src/AutocompletePopupMenuClient.h65
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp43
-rw-r--r--WebKit/chromium/src/ContextMenuClientImpl.cpp52
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp17
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp75
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.h1
-rw-r--r--WebKit/chromium/src/SuggestionsPopupMenuClient.cpp184
-rw-r--r--WebKit/chromium/src/SuggestionsPopupMenuClient.h112
-rw-r--r--WebKit/chromium/src/WebBindings.cpp4
-rw-r--r--WebKit/chromium/src/WebDatabase.cpp59
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp34
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h10
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp37
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h10
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp10
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.h9
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.cpp14
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h8
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp325
-rw-r--r--WebKit/chromium/src/WebViewImpl.h60
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp2
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js28
-rw-r--r--WebKit/chromium/src/js/DevToolsHostStub.js5
-rw-r--r--WebKit/chromium/src/js/Tests.js18
-rw-r--r--WebKit/chromium/tests/PopupMenuTest.cpp16
58 files changed, 1388 insertions, 1141 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2a56d9d..29cf8f4 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,553 @@
+2010-07-05 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: remove v8-specific code dealing with getOwnPropertyNames from InjectedScript.js
+ https://bugs.webkit.org/show_bug.cgi?id=41595
+
+ * src/js/DebuggerScript.js:
+
+2010-07-03 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Fix issue where a contextmenu event was reporting the wrong target
+ if the context menu was shown due to pressing the context menu key
+ (or Shift+F10).
+
+ https://bugs.webkit.org/show_bug.cgi?id=38129
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::sendContextMenuEvent):
+
+2010-07-02 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute
+ https://bugs.webkit.org/show_bug.cgi?id=41511
+
+ * src/WebBindings.cpp:
+ (WebKit::getEvent):
+
+2010-07-01 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r62349.
+ http://trac.webkit.org/changeset/62349
+ https://bugs.webkit.org/show_bug.cgi?id=41499
+
+ It broke the chromium Linux build. (Requested by dave_levin on
+ #webkit).
+
+ * public/WebNode.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::registerPasswordListener):
+ (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete):
+
+2010-07-01 David Holloway <dhollowa@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for
+ use by other code in WebKit/chromium/src.
+
+ Specific use of these methods is made in WebFrameImpl.cpp. This is
+ preferred to the cast operator call that was happening prior to this
+ change.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41477
+
+ * public/WebNode.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::registerPasswordListener):
+ (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete):
+
+2010-07-01 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Stop linking against opengl32.lib in Windows Chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=41424
+
+ * WebKit.gyp:
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::initialize):
+ (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent):
+ * src/WebGraphicsContext3DDefaultImpl.h:
+
+2010-07-01 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r62246.
+ http://trac.webkit.org/changeset/62246
+ https://bugs.webkit.org/show_bug.cgi?id=41470
+
+ "Worker tests are broken in Chromium" (Requested by yurys on
+ #webkit).
+
+ * src/WebBindings.cpp:
+ (WebKit::getEvent):
+
+2010-07-01 David Holloway <dhollowa@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Consolidates AutoFill and Autocomplete popup menus into a single popup menu.
+
+ This change combines SuggestionsPopupMenuClient, AutoFillPopupMenuClient, and
+ AutocompletePopupMenuClient classes into a single consolidated AutoFillPopupMenuClient class.
+ Prior to this change the contents of the AutoFill popup menu only included AutoFill
+ suggestions and similarly the Autocomplete popup menu only included Autocomplete
+ suggestions. With this consolidation, both AutoFill and Autocomplete suggestions can
+ now be displayed in a single menu.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41236
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ * public/WebView.h:
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient):
+ (WebKit::AutoFillPopupMenuClient::~AutoFillPopupMenuClient):
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionCleared):
+ (WebKit::AutoFillPopupMenuClient::itemText):
+ (WebKit::AutoFillPopupMenuClient::itemStyle):
+ (WebKit::AutoFillPopupMenuClient::menuStyle):
+ (WebKit::AutoFillPopupMenuClient::clientPaddingLeft):
+ (WebKit::AutoFillPopupMenuClient::clientPaddingRight):
+ (WebKit::AutoFillPopupMenuClient::popupDidHide):
+ (WebKit::AutoFillPopupMenuClient::setTextFromItem):
+ (WebKit::AutoFillPopupMenuClient::fontSelector):
+ (WebKit::AutoFillPopupMenuClient::hostWindow):
+ (WebKit::AutoFillPopupMenuClient::createScrollbar):
+ (WebKit::AutoFillPopupMenuClient::initialize):
+ (WebKit::AutoFillPopupMenuClient::getWebView):
+ (WebKit::AutoFillPopupMenuClient::textFieldStyle):
+ * src/AutoFillPopupMenuClient.h:
+ (WebKit::AutoFillPopupMenuClient::itemToolTip):
+ (WebKit::AutoFillPopupMenuClient::itemAccessibilityText):
+ (WebKit::AutoFillPopupMenuClient::itemIsEnabled):
+ (WebKit::AutoFillPopupMenuClient::clientInsetLeft):
+ (WebKit::AutoFillPopupMenuClient::clientInsetRight):
+ (WebKit::AutoFillPopupMenuClient::listSize):
+ (WebKit::AutoFillPopupMenuClient::selectedIndex):
+ (WebKit::AutoFillPopupMenuClient::itemIsLabel):
+ (WebKit::AutoFillPopupMenuClient::itemIsSelected):
+ (WebKit::AutoFillPopupMenuClient::shouldPopOver):
+ (WebKit::AutoFillPopupMenuClient::valueShouldChangeOnHotTrack):
+ (WebKit::AutoFillPopupMenuClient::setAutocompleteMode):
+ (WebKit::AutoFillPopupMenuClient::getTextField):
+ (WebKit::AutoFillPopupMenuClient::getSelectedIndex):
+ (WebKit::AutoFillPopupMenuClient::setSelectedIndex):
+ * src/AutocompletePopupMenuClient.cpp: Removed.
+ * src/AutocompletePopupMenuClient.h: Removed.
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::textFieldDidEndEditing):
+ (WebKit::EditorClientImpl::doAutofill):
+ (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted):
+ * src/SuggestionsPopupMenuClient.cpp: Removed.
+ * src/SuggestionsPopupMenuClient.h: Removed.
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::currentHistoryItem):
+ (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete):
+ * src/WebFrameImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::):
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::mouseDown):
+ (WebKit::WebViewImpl::mouseUp):
+ (WebKit::WebViewImpl::selectPopupHandleKeyEvent):
+ (WebKit::WebViewImpl::autocompleteHandleKeyEvent):
+ (WebKit::WebViewImpl::hideAutoFillPopup):
+ (WebKit::WebViewImpl::setFocus):
+ (WebKit::WebViewImpl::applyAutoFillSuggestions):
+ (WebKit::WebViewImpl::applyAutocompleteSuggestions):
+ (WebKit::WebViewImpl::hidePopups):
+ (WebKit::WebViewImpl::refreshAutoFillPopup):
+ * src/WebViewImpl.h:
+ (WebKit::WebViewImpl::autoFillPopupDidHide):
+
+2010-07-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute
+ https://bugs.webkit.org/show_bug.cgi?id=41350
+
+ * src/WebBindings.cpp:
+ (WebKit::getEvent):
+
+2010-07-01 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Make the user script API static. This makes it more convenient to use
+ if you don't have a WebView instance yet.
+
+ Added static versions of the three methods and re-route current ones
+ temporarily through the static versions. Will remove the non-static
+ versions once Chromium has been updated.
+
+ Also, expose the URLPattern configuration for user stylesheets, since
+ they were not before.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41385
+
+ * public/WebView.h:
+ (WebKit::WebView::addUserScript):
+ (WebKit::WebView::addUserStyleSheet):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::addUserScript):
+ (WebKit::WebView::addUserStyleSheet):
+ (WebKit::WebView::removeAllUserContent):
+
+2010-06-30 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Roll forward Chromium DEPS to r51287
+ https://bugs.webkit.org/show_bug.cgi?id=41430
+
+ * DEPS:
+
+2010-06-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chrome DevTools: Finalize migration to new WebView constructor
+ (devtools agent is now created within WebViewImpl only).
+
+ https://bugs.webkit.org/show_bug.cgi?id=41212
+
+ * public/WebDevToolsAgent.h:
+ * public/WebView.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::initializeLoader):
+ * tests/PopupMenuTest.cpp:
+ (WebKit::SelectPopupMenuTest::SetUp):
+
+2010-06-29 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Implement getAttachedShaders
+ https://bugs.webkit.org/show_bug.cgi?id=31172
+
+ * public/WebGraphicsContext3D.h: Declaration of getAttachedShaders().
+ * src/GraphicsContext3D.cpp: Implementation of getAttachedShaders().
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto.
+ * src/WebGraphicsContext3DDefaultImpl.h: Declaration of getAttachedShaders().
+
+2010-06-29 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Simplify the WebDatabase interface.
+ https://bugs.webkit.org/show_bug.cgi?id=40607
+
+ Do not ref()/deref() the private AbstractDatabase member. This
+ allows us to use WebDatabase in the destructors of the DB
+ classes.
+
+ * public/WebDatabase.h:
+ (WebKit::WebDatabase::WebDatabase):
+ * src/WebDatabase.cpp:
+ (WebKit::WebDatabase::name):
+ (WebKit::WebDatabase::displayName):
+ (WebKit::WebDatabase::estimatedSize):
+ (WebKit::WebDatabase::securityOrigin):
+ (WebKit::WebDatabase::WebDatabase):
+
+2010-06-29 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ A crash caused by the patch of bug 40608.
+ https://bugs.webkit.org/show_bug.cgi?id=41334
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::caretOrSelectionBounds):
+
+2010-06-29 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium]: Update webkit for chromium multi dll build.
+
+ 1. Export more webkit APIs for chromium multi dll build.
+ 2. Update DumpRenderTree sources so it can build with webkit.dll
+ 3. Temp disable webkit unit tests for chromium multi dll build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41231
+
+ * WebKit.gyp:
+ * public/WebAccessibilityCache.h:
+ * public/WebAccessibilityObject.h:
+ * public/WebEventListener.h:
+ * public/WebGeolocationServiceMock.h:
+ * public/WebGraphicsContext3D.h:
+ * public/WebIDBDatabaseError.h:
+ (WebKit::WebIDBDatabaseError::WebIDBDatabaseError):
+ (WebKit::WebIDBDatabaseError::operator=):
+ * public/WebNotification.h:
+ * public/WebPasswordFormData.h:
+ * public/WebSearchableFormData.h:
+ * public/WebStorageEventDispatcher.h:
+ * public/WebString.h:
+ (WebKit::WebString::WebString):
+ (WebKit::WebString::operator=):
+
+2010-06-29 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Hooking up GraphicsContext3D to the gpu compositor.
+ GraphicsContext3DInternal is now initialized with a pointer to the HostWindow
+ that corresponds to the WebView containing the context. The initializer
+ forces a WebGLES2Context to be created for the WebView (if one doesn't already
+ exist) and uses the view's GL context as a parent to the GL context created
+ for WebGL. This allows the compositor to read the texture associated with
+ WebGL's frame buffer. We also plumb though GraphicsContext3D's prepareTexture
+ and platformLayer methods which are required by the compositor code.
+ https://bugs.webkit.org/show_bug.cgi?id=41243
+
+ * public/WebGraphicsContext3D.h:
+ * public/WebView.h:
+ Made gles2Context() a virtual method on WebView instead of WebViewImpl
+ to allow access to it from GraphicsContext3DInternal::initialize().
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::initialize):
+ (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D):
+ (WebCore::GraphicsContext3DInternal::platformTexture):
+ (WebCore::GraphicsContext3DInternal::prepareTexture):
+ (WebCore::GraphicsContext3DInternal::platformLayer):
+ (WebCore::GraphicsContext3D::create):
+ (WebCore::GraphicsContext3D::prepareTexture):
+ (WebCore::GraphicsContext3D::platformLayer):
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::initialize):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId):
+ (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture):
+ * src/WebGraphicsContext3DDefaultImpl.h:
+ * src/WebViewImpl.h:
+
+2010-06-29 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: return line number where breakpoint was actually set by v8 from setBreakpoint function.
+ https://bugs.webkit.org/show_bug.cgi?id=40781
+
+ * src/js/DebuggerScript.js:
+ ():
+
+2010-06-23 John Gregg <johnnyg@google.com>
+
+ Reviewed by Kent Tamura.
+
+ add ENABLE_DIRECTORY_UPLOAD build support
+ https://bugs.webkit.org/show_bug.cgi?id=41100
+
+ * features.gypi:
+
+2010-06-28 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Jian Li.
+
+ [chromium]Remove deprecated code related to input method.
+ https://bugs.webkit.org/show_bug.cgi?id=41244
+
+ Also update TestWebWidget in tests/PopupMenuTest.cpp to add missing implementations.
+
+ * WebKit.gyp:
+ * public/WebCompositionCommand.h: Removed.
+ * public/WebViewClient.h:
+ * public/WebWidget.h:
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::setInputMethodState):
+ * src/WebPopupMenuImpl.cpp:
+ * src/WebPopupMenuImpl.h:
+ * src/WebViewImpl.cpp:
+ * src/WebViewImpl.h:
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestWebWidget::setComposition):
+ (WebKit::TestWebWidget::confirmComposition):
+ (WebKit::TestWebWidget::textInputType):
+ (WebKit::TestWebWidget::caretOrSelectionBounds):
+
+2010-06-27 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Get the selected text from plugins for right click menu
+ https://bugs.webkit.org/show_bug.cgi?id=41242
+
+ * public/WebContextMenuData.h:
+ (WebKit::WebContextMenuData::):
+ * public/WebPlugin.h:
+ (WebKit::WebPlugin::selectedText):
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::selectedText):
+ * src/WebPluginContainerImpl.h:
+
+2010-06-28 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Fix Chromium debugger tests.
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype.testDebugIntrinsicProperties):
+
+2010-06-25 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Improve default value handling for page format properties.
+ https://bugs.webkit.org/show_bug.cgi?id=41150
+
+ * public/WebFrame.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::pageSizeAndMarginsInPixels):
+ * src/WebFrameImpl.h:
+
+2010-06-26 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r61943.
+ http://trac.webkit.org/changeset/61943
+ https://bugs.webkit.org/show_bug.cgi?id=41251
+
+ Totally breaks webkit_unit_tests on Chromium linux and mac
+ (Requested by mnaganov on #webkit).
+
+ * WebKit.gyp:
+ * src/WebFrameImpl.cpp:
+ (WebKit::frameContentAsPlainText):
+ * tests/RunAllTests.cpp:
+ (main):
+ * tests/WebFrameTest.cpp: Removed.
+ * tests/data/iframes_test.html: Removed.
+ * tests/data/invisible_iframe.html: Removed.
+ * tests/data/visible_iframe.html: Removed.
+ * tests/data/zero_sized_iframe.html: Removed.
+
+2010-06-26 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Disable Web Timing support by default for chromium port.
+ https://bugs.webkit.org/show_bug.cgi?id=38924
+
+ * features.gypi:
+
+2010-06-25 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Made WebFrame not report the text from hidden frames.
+ (some pages contain hidden frames with garbage text that
+ should not be indexed or used to detect the page's language).
+ https://bugs.webkit.org/show_bug.cgi?id=39456
+
+ * DEPS:
+ * WebKit.gyp:
+ * src/WebFrameImpl.cpp:
+ (WebKit::frameContentAsPlainText):
+ * tests/RunAllTests.cpp:
+ (main):
+ * tests/WebFrameTest.cpp: Added.
+ * tests/data: Added.
+ * tests/data/iframes_test.html: Added.
+ * tests/data/invisible_iframe.html: Added.
+ * tests/data/visible_iframe.html: Added.
+ * tests/data/zero_sized_iframe.html: Added.
+
+2010-06-25 Bernhard Bauer <bauerb@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add plugin accessors to WebPluginContainer.
+ https://bugs.webkit.org/show_bug.cgi?id=41145
+
+ * public/WebPluginContainer.h:
+ * src/WebPluginContainerImpl.h:
+ (WebKit::WebPluginContainerImpl::setPlugin):
+
+2010-06-25 Sterling Swigart <sswigart@google.com>
+
+ Reviewed by David Levin.
+
+ Resetting ENABLE_IMAGE_RESIZER to 0. Image.webkitGetImage needs to be developed under
+ a 0 value, at least until both the JSC and V8 bindings are in place.
+ https://bugs.webkit.org/show_bug.cgi?id=41116
+
+ * features.gypi: ENABLE_IMAGE_RESIZER=0
+
+2010-06-25 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Update chromium webkit gyp so it has
+ option to be built as DLL.
+
+ Chromium webkit is built as webkit.dll on windows
+ if it is inside chromium build and variable component
+ is set to shared_library.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41161
+
+ * WebKit.gyp:
+
+2010-06-25 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Send unhandled events to Node's default handler
+ https://bugs.webkit.org/show_bug.cgi?id=41223
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::handleEvent):
+
+2010-06-25 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add new stubs for querying platform drag-and-drop and copy-and-paste data.
+
+ This change adds new stubs for querying for data in a clipboard or drag operation. This is
+ so adding support for more data types in clipboard/drag operations doesn't become
+ increasingly expensive, since we currently copy all the drag data we need every time a new
+ web drop target is entered. It also adds a new mechanism to write back to the system
+ clipboard that isn't tied to one data type.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40540
+
+ * public/WebClipboard.h:
+ (WebKit::WebClipboard::):
+ (WebKit::WebClipboard::isFormatAvailable):
+ (WebKit::WebClipboard::readPlainText):
+ (WebKit::WebClipboard::readHTML):
+ (WebKit::WebClipboard::writePlainText):
+ (WebKit::WebClipboard::writeHTML):
+ (WebKit::WebClipboard::writeURL):
+ (WebKit::WebClipboard::writeImage):
+ (WebKit::WebClipboard::writeData):
+ (WebKit::WebClipboard::readAvailableTypes):
+ (WebKit::WebClipboard::readData):
+ (WebKit::WebClipboard::readFilenames):
+ * public/WebKitClient.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::clipboardWriteData):
+ (WebCore::ChromiumBridge::clipboardReadAvailableTypes):
+ (WebCore::ChromiumBridge::clipboardReadData):
+ (WebCore::ChromiumBridge::clipboardReadFilenames):
+
2010-06-25 Lei Zheng <lzheng@chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index b6b35a5..fe3754f 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '50676',
+ 'chromium_rev': '51287',
}
deps = {
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index a53dd28..e2da1b4 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -52,7 +52,6 @@
'targets': [
{
'target_name': 'webkit',
- 'type': '<(webkit_target_type)',
'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
'dependencies': [
'../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
@@ -93,7 +92,6 @@
'public/WebColorName.h',
'public/WebCommon.h',
'public/WebCommonWorkerClient.h',
- 'public/WebCompositionCommand.h',
'public/WebCompositionUnderline.h',
'public/WebConsoleMessage.h',
'public/WebContextMenuData.h',
@@ -231,8 +229,6 @@
'src/ApplicationCacheHost.cpp',
'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
- 'src/AutocompletePopupMenuClient.cpp',
- 'src/AutocompletePopupMenuClient.h',
'src/AutoFillPopupMenuClient.cpp',
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
@@ -312,8 +308,6 @@
'src/StorageEventDispatcherImpl.h',
'src/StorageNamespaceProxy.cpp',
'src/StorageNamespaceProxy.h',
- 'src/SuggestionsPopupMenuClient.cpp',
- 'src/SuggestionsPopupMenuClient.h',
'src/TemporaryGlue.h',
'src/ToolsAgent.h',
'src/WebAccessibilityCache.cpp',
@@ -447,6 +441,34 @@
'src/win/WebScreenInfoFactory.cpp',
],
'conditions': [
+ ['inside_chromium_build==1 and OS=="win"', {
+ 'type': '<(component)',
+
+ 'conditions': [
+ ['component=="shared_library"', {
+ 'defines': [
+ 'WEBKIT_DLL',
+ 'USING_V8_SHARED',
+ ],
+ 'dependencies': [
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ '<(chromium_src_dir)/third_party/icu/icu.gyp:*',
+ '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
+ '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
+ '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
+ '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
+ '<(chromium_src_dir)/third_party/modp_b64/modp_b64.gyp:modp_b64',
+ '<(chromium_src_dir)/third_party/nss/nss.gyp:*',
+ '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
+ '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ }],
+ ],
+ }, {
+ 'type': '<(webkit_target_type)'
+ }],
['OS=="linux" or OS=="freebsd"', {
'dependencies': [
'<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
@@ -504,13 +526,6 @@
'GLEW_NO_GLU=1',
],
'conditions': [
- ['OS=="win"', {
- 'link_settings': {
- 'libraries': [
- '-lopengl32.lib',
- ],
- },
- }],
['OS=="mac"', {
'link_settings': {
'libraries': [
@@ -524,39 +539,46 @@
},
{
'target_name': 'webkit_unit_tests',
- 'type': 'executable',
- 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
- 'dependencies': [
- 'webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
- '<(chromium_src_dir)/testing/gtest.gyp:gtest',
- '<(chromium_src_dir)/base/base.gyp:base',
- '<(chromium_src_dir)/base/base.gyp:base_i18n',
- '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
- ],
- 'include_dirs': [
- 'public',
- 'src',
- ],
- 'sources': [
- 'tests/DragImageTest.cpp',
- 'tests/KeyboardTest.cpp',
- 'tests/KURLTest.cpp',
- 'tests/RunAllTests.cpp',
- ],
'conditions': [
- ['OS=="win"', {
- 'sources': [
- # FIXME: Port PopupMenuTest to Linux and Mac.
- 'tests/PopupMenuTest.cpp',
- 'tests/TransparencyWinTest.cpp',
- 'tests/UniscribeHelperTest.cpp',
+ # FIXME: make webkit unit tests working for multi dll build.
+ ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
+ 'type': 'none',
+ }, {
+ 'type': 'executable',
+ 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
+ 'dependencies': [
+ 'webkit',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
+ '<(chromium_src_dir)/base/base.gyp:base',
+ '<(chromium_src_dir)/base/base.gyp:base_i18n',
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
],
- }],
- ['OS=="mac"', {
- 'sources!': [
- # FIXME: Port DragImageTest to Mac.
+ 'include_dirs': [
+ 'public',
+ 'src',
+ ],
+ 'sources': [
'tests/DragImageTest.cpp',
+ 'tests/KeyboardTest.cpp',
+ 'tests/KURLTest.cpp',
+ 'tests/RunAllTests.cpp',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'sources': [
+ # FIXME: Port PopupMenuTest to Linux and Mac.
+ 'tests/PopupMenuTest.cpp',
+ 'tests/TransparencyWinTest.cpp',
+ 'tests/UniscribeHelperTest.cpp',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'sources!': [
+ # FIXME: Port DragImageTest to Mac.
+ 'tests/DragImageTest.cpp',
+ ],
+ }],
],
}],
],
@@ -614,6 +636,20 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
],
+ 'conditions': [
+ ['inside_chromium_build==1 and component=="shared_library"', {
+ 'sources': [
+ 'src/ChromiumCurrentTime.cpp',
+ 'src/ChromiumThreading.cpp',
+ ],
+ 'include_dirs': [
+ 'public',
+ ],
+ 'dependencies': [
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ ],
+ }],
+ ],
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': ['<(ahem_path)'],
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 256192b..a280f4f 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -45,6 +45,7 @@
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=0',
+ 'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOM_STORAGE=1',
'ENABLE_EVENTSOURCE=1',
'ENABLE_FILE_READER=1',
@@ -52,7 +53,7 @@
'ENABLE_FILTERS=1',
'ENABLE_GEOLOCATION=1',
'ENABLE_ICONDATABASE=0',
- 'ENABLE_IMAGE_RESIZER=1',
+ 'ENABLE_IMAGE_RESIZER=0',
'ENABLE_INDEXED_DATABASE=1',
'ENABLE_INPUT_SPEECH=1',
'ENABLE_JAVASCRIPT_DEBUGGER=1',
@@ -75,6 +76,7 @@
'ENABLE_TOUCH_EVENTS=1',
'ENABLE_VIDEO=1',
'ENABLE_WEB_SOCKETS=1',
+ 'ENABLE_WEB_TIMING=0',
'ENABLE_WORKERS=1',
'ENABLE_XHTMLMP=0',
'ENABLE_XPATH=1',
diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h
index 94704a0..52e438c 100644
--- a/WebKit/chromium/public/WebAccessibilityCache.h
+++ b/WebKit/chromium/public/WebAccessibilityCache.h
@@ -43,8 +43,8 @@ public:
WebAccessibilityCache() {}
virtual ~WebAccessibilityCache() {}
- static WebAccessibilityCache* create();
- static void enableAccessibility();
+ WEBKIT_API static WebAccessibilityCache* create();
+ WEBKIT_API static void enableAccessibility();
virtual void initialize(WebView* view) = 0;
virtual bool isInitialized() const = 0;
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index 191d40f..f1b2474 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -64,44 +64,44 @@ public:
bool isNull() const { return !m_private; }
- WebString accessibilityDescription() const;
- WebString actionVerb() const;
- bool canSetFocusAttribute() const;
- bool canSetValueAttribute() const;
-
- unsigned childCount() const;
-
- WebAccessibilityObject childAt(unsigned) const;
- WebAccessibilityObject firstChild() const;
- WebAccessibilityObject focusedChild() const;
- WebAccessibilityObject lastChild() const;
- WebAccessibilityObject nextSibling() const;
- WebAccessibilityObject parentObject() const;
- WebAccessibilityObject previousSibling() const;
-
- bool isAnchor() const;
- bool isChecked() const;
- bool isFocused() const;
- bool isEnabled() const;
- bool isHovered() const;
- bool isIndeterminate() const;
- bool isMultiSelectable() const;
- bool isOffScreen() const;
- bool isPasswordField() const;
- bool isPressed() const;
- bool isReadOnly() const;
- bool isVisited() const;
-
- WebRect boundingBoxRect() const;
- WebString helpText() const;
- int headingLevel() const;
- WebAccessibilityObject hitTest(const WebPoint&) const;
- WebString keyboardShortcut() const;
- bool performDefaultAction() const;
- WebAccessibilityRole roleValue() const;
- void setFocused(bool) const;
- WebString stringValue() const;
- WebString title() const;
+ WEBKIT_API WebString accessibilityDescription() const;
+ WEBKIT_API WebString actionVerb() const;
+ WEBKIT_API bool canSetFocusAttribute() const;
+ WEBKIT_API bool canSetValueAttribute() const;
+
+ WEBKIT_API unsigned childCount() const;
+
+ WEBKIT_API WebAccessibilityObject childAt(unsigned) const;
+ WEBKIT_API WebAccessibilityObject firstChild() const;
+ WEBKIT_API WebAccessibilityObject focusedChild() const;
+ WEBKIT_API WebAccessibilityObject lastChild() const;
+ WEBKIT_API WebAccessibilityObject nextSibling() const;
+ WEBKIT_API WebAccessibilityObject parentObject() const;
+ WEBKIT_API WebAccessibilityObject previousSibling() const;
+
+ WEBKIT_API bool isAnchor() const;
+ WEBKIT_API bool isChecked() const;
+ WEBKIT_API bool isFocused() const;
+ WEBKIT_API bool isEnabled() const;
+ WEBKIT_API bool isHovered() const;
+ WEBKIT_API bool isIndeterminate() const;
+ WEBKIT_API bool isMultiSelectable() const;
+ WEBKIT_API bool isOffScreen() const;
+ WEBKIT_API bool isPasswordField() const;
+ WEBKIT_API bool isPressed() const;
+ WEBKIT_API bool isReadOnly() const;
+ WEBKIT_API bool isVisited() const;
+
+ WEBKIT_API WebRect boundingBoxRect() const;
+ WEBKIT_API WebString helpText() const;
+ WEBKIT_API int headingLevel() const;
+ WEBKIT_API WebAccessibilityObject hitTest(const WebPoint&) const;
+ WEBKIT_API WebString keyboardShortcut() const;
+ WEBKIT_API bool performDefaultAction() const;
+ WEBKIT_API WebAccessibilityRole roleValue() const;
+ WEBKIT_API void setFocused(bool) const;
+ WEBKIT_API WebString stringValue() const;
+ WEBKIT_API WebString title() const;
#if WEBKIT_IMPLEMENTATION
WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&);
diff --git a/WebKit/chromium/public/WebClipboard.h b/WebKit/chromium/public/WebClipboard.h
index 68e22b5..6755d96 100644
--- a/WebKit/chromium/public/WebClipboard.h
+++ b/WebKit/chromium/public/WebClipboard.h
@@ -32,11 +32,13 @@
#define WebClipboard_h
#include "WebCommon.h"
+#include "WebString.h"
+#include "WebVector.h"
namespace WebKit {
+class WebDragData;
class WebImage;
-class WebString;
class WebURL;
class WebClipboard {
@@ -51,22 +53,35 @@ public:
BufferStandard,
// Used on platforms like the X Window System that treat selection
// as a type of clipboard.
- BufferSelection
+ BufferSelection,
+ // Read-only buffer corresponding to the current drag operation, if any.
+ BufferDrag,
};
- virtual bool isFormatAvailable(Format, Buffer) = 0;
+ virtual bool isFormatAvailable(Format, Buffer) { return false; }
- virtual WebString readPlainText(Buffer) = 0;
- virtual WebString readHTML(Buffer, WebURL*) = 0;
+ virtual WebString readPlainText(Buffer) { return WebString(); }
+ virtual WebString readHTML(Buffer, WebURL*) { return WebString(); }
- virtual void writePlainText(const WebString&) = 0;
+ virtual void writePlainText(const WebString&) { }
virtual void writeHTML(
const WebString& htmlText, const WebURL&,
- const WebString& plainText, bool writeSmartPaste) = 0;
+ const WebString& plainText, bool writeSmartPaste) { }
virtual void writeURL(
- const WebURL&, const WebString& title) = 0;
+ const WebURL&, const WebString& title) { }
virtual void writeImage(
- const WebImage&, const WebURL&, const WebString& title) = 0;
+ const WebImage&, const WebURL&, const WebString& title) { }
+ virtual void writeData(const WebDragData&) { }
+
+ // The following functions are used for reading platform data for copy and
+ // paste, drag and drop, and selection copy (on X).
+ virtual WebVector<WebString> readAvailableTypes(
+ Buffer, bool* containsFilenames) { return WebVector<WebString>(); }
+ // Returns true if the requested type was successfully read from the buffer.
+ virtual bool readData(
+ Buffer, const WebString& type, WebString* data,
+ WebString* metadata) { return false; }
+ virtual WebVector<WebString> readFilenames(Buffer) { return WebVector<WebString>(); }
protected:
~WebClipboard() {}
diff --git a/WebKit/chromium/public/WebCompositionCommand.h b/WebKit/chromium/public/WebCompositionCommand.h
deleted file mode 100644
index bda1eb1..0000000
--- a/WebKit/chromium/public/WebCompositionCommand.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef WebCompositionCommand_h
-#define WebCompositionCommand_h
-
-namespace WebKit {
-
-// DEPRECATED.
-enum WebCompositionCommand {
- WebCompositionCommandDiscard,
- WebCompositionCommandSet,
- WebCompositionCommandConfirm,
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/WebKit/chromium/public/WebContextMenuData.h b/WebKit/chromium/public/WebContextMenuData.h
index 8ed1f1b..e3aee4e 100644
--- a/WebKit/chromium/public/WebContextMenuData.h
+++ b/WebKit/chromium/public/WebContextMenuData.h
@@ -124,6 +124,7 @@ struct WebContextMenuData {
CanPaste = 0x10,
CanDelete = 0x20,
CanSelectAll = 0x40,
+ CanTranslate = 0x80,
};
// Which edit operations are available in the context.
diff --git a/WebKit/chromium/public/WebDatabase.h b/WebKit/chromium/public/WebDatabase.h
index 4679f68..0a5d4f8 100644
--- a/WebKit/chromium/public/WebDatabase.h
+++ b/WebKit/chromium/public/WebDatabase.h
@@ -34,33 +34,15 @@
#include "WebCommon.h"
#include "WebSecurityOrigin.h"
-#if WEBKIT_IMPLEMENTATION
namespace WebCore { class AbstractDatabase; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
namespace WebKit {
class WebDatabaseObserver;
-class WebDatabasePrivate;
class WebString;
class WebDatabase {
public:
- WebDatabase() : m_private(0) { }
- WebDatabase(const WebDatabase& d) : m_private(0) { assign(d); }
- ~WebDatabase() { reset(); }
-
- WebDatabase& operator=(const WebDatabase& d)
- {
- assign(d);
- return *this;
- }
-
- WEBKIT_API void reset();
- WEBKIT_API void assign(const WebDatabase&);
- bool isNull() const { return !m_private; }
-
WEBKIT_API WebString name() const;
WEBKIT_API WebString displayName() const;
WEBKIT_API unsigned long estimatedSize() const;
@@ -76,15 +58,12 @@ public:
const WebString& originIdentifier, const WebString& databaseName);
#if WEBKIT_IMPLEMENTATION
- WebDatabase(const WTF::PassRefPtr<WebCore::AbstractDatabase>&);
- WebDatabase& operator=(const WTF::PassRefPtr<WebCore::AbstractDatabase>&);
- operator WTF::PassRefPtr<WebCore::AbstractDatabase>() const;
+ WebDatabase(const WebCore::AbstractDatabase*);
#endif
private:
- void assign(WebDatabasePrivate*);
-
- WebDatabasePrivate* m_private;
+ WebDatabase() { }
+ const WebCore::AbstractDatabase* m_database;
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index d1ad23c..3bdee3c 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -47,8 +47,6 @@ struct WebURLError;
class WebDevToolsAgent {
public:
- WEBKIT_API static WebDevToolsAgent* create(WebView*, WebDevToolsAgentClient*);
-
virtual ~WebDevToolsAgent() {}
virtual void attach() = 0;
diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebEventListener.h
index 52de1cd..62ca0de 100644
--- a/WebKit/chromium/public/WebEventListener.h
+++ b/WebKit/chromium/public/WebEventListener.h
@@ -31,6 +31,8 @@
#ifndef WebEventListener_h
#define WebEventListener_h
+#include "WebCommon.h"
+
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class Node; }
#endif
@@ -45,8 +47,8 @@ class WebString;
class WebEventListener {
public:
- WebEventListener();
- virtual ~WebEventListener();
+ WEBKIT_API WebEventListener();
+ WEBKIT_API virtual ~WebEventListener();
// Called when an event is received.
virtual void handleEvent(const WebEvent&) = 0;
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 319ce38..c4fa7ae 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -408,12 +408,16 @@ public:
// Returns true if page box (margin boxes and page borders) is visible.
virtual bool isPageBoxVisible(int pageIndex) = 0;
- // Returns the page area rectangle in pixels, assuming 96 pixels per inch.
- virtual WebRect pageAreaRectInPixels(int pageIndex) = 0;
-
- // Returns the preferred page size in pixels, assuming 96 pixels per inch.
- virtual WebSize preferredPageSizeInPixels(int pageIndex) = 0;
-
+ // Returns the preferred page size and margins in pixels, assuming 96
+ // pixels per inch. pageSize, marginTop, marginRight, marginBottom,
+ // marginLeft must be initialized to the default values that are used if
+ // auto is specified.
+ virtual void pageSizeAndMarginsInPixels(int pageIndex,
+ WebSize& pageSize,
+ int& marginTop,
+ int& marginRight,
+ int& marginBottom,
+ int& marginLeft) = 0;
// Find-in-page --------------------------------------------------------
@@ -484,6 +488,11 @@ public:
WebInputElement,
WebPasswordAutocompleteListener*) = 0;
+ // Dispatches an Autocompletion notification to registered listener if one
+ // exists that is registered against the WebInputElement specified.
+ virtual void notifiyPasswordListenerOfAutocomplete(
+ const WebInputElement&) = 0;
+
// Utility -------------------------------------------------------------
diff --git a/WebKit/chromium/public/WebGeolocationServiceMock.h b/WebKit/chromium/public/WebGeolocationServiceMock.h
index d1a146b..407fe9d 100644
--- a/WebKit/chromium/public/WebGeolocationServiceMock.h
+++ b/WebKit/chromium/public/WebGeolocationServiceMock.h
@@ -31,6 +31,7 @@
#ifndef WebGeolocationServiceMock_h
#define WebGeolocationServiceMock_h
+#include "WebCommon.h"
#include "WebGeolocationService.h"
namespace WebKit {
@@ -39,10 +40,10 @@ class WebString;
class WebGeolocationServiceMock : public WebGeolocationService {
public:
- static WebGeolocationServiceMock* createWebGeolocationServiceMock();
- static void setMockGeolocationPermission(bool allowed);
- static void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
- static void setMockGeolocationError(int errorCode, const WebString& message);
+ WEBKIT_API static WebGeolocationServiceMock* createWebGeolocationServiceMock();
+ WEBKIT_API static void setMockGeolocationPermission(bool allowed);
+ WEBKIT_API static void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
+ WEBKIT_API static void setMockGeolocationError(int errorCode, const WebString& message);
protected:
static bool s_mockGeolocationPermission;
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index dc4f534..4378afb 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -40,6 +40,8 @@ namespace WebKit {
// Typedef for server-side objects like OpenGL textures and program objects.
typedef unsigned int WebGLId;
+class WebView;
+
// This interface abstracts the operations performed by the
// GraphicsContext3D in order to implement WebGL. Nearly all of the
// methods exposed on this interface map directly to entry points in
@@ -77,11 +79,11 @@ public:
// Creates a "default" implementation of WebGraphicsContext3D which calls
// OpenGL directly.
- static WebGraphicsContext3D* createDefault();
+ WEBKIT_API static WebGraphicsContext3D* createDefault();
// Initializes the graphics context; should be the first operation performed
// on newly-constructed instances. Returns true on success.
- virtual bool initialize(Attributes) = 0;
+ virtual bool initialize(Attributes, WebView*) = 0;
// Makes the OpenGL context current on the current thread. Returns true on
// success.
@@ -108,6 +110,15 @@ public:
// Returns true on success.
virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize) = 0;
+ // 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;
+
+ // Copies the contents of the off-screen render target used by the WebGL
+ // context to the corresponding texture used by the compositor.
+ virtual void prepareTexture() = 0;
+
// Synthesizes an OpenGL error which will be returned from a
// later call to getError. This is used to emulate OpenGL ES
// 2.0 behavior on the desktop and to enforce additional error
@@ -169,6 +180,8 @@ public:
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;
diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h
index f56a0d0..255d175 100644
--- a/WebKit/chromium/public/WebIDBDatabaseError.h
+++ b/WebKit/chromium/public/WebIDBDatabaseError.h
@@ -40,11 +40,11 @@ namespace WebKit {
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBDatabaseError {
public:
- ~WebIDBDatabaseError();
+ WEBKIT_API ~WebIDBDatabaseError();
- WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
- WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
- WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e)
+ WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
+ WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
+ WEBKIT_API WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e)
{
assign(e);
return *this;
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index d1da883..48765ac 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -83,7 +83,6 @@ public:
// May return null.
virtual WebCookieJar* cookieJar() { return 0; }
-
// DOM Storage --------------------------------------------------
// Return a LocalStorage namespace that corresponds to the following path.
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index 787d4f3..f872111 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -64,7 +64,7 @@ public:
// Operators required to put WebNotification in an ordered map.
bool equals(const WebNotification& other) const { return m_private == other.m_private; }
- bool lessThan(const WebNotification& other) const;
+ WEBKIT_API bool lessThan(const WebNotification& other) const;
// Is the notification HTML vs. icon-title-text?
WEBKIT_API bool isHTML() const;
diff --git a/WebKit/chromium/public/WebPasswordFormData.h b/WebKit/chromium/public/WebPasswordFormData.h
index e1804d1..30ce5ca 100644
--- a/WebKit/chromium/public/WebPasswordFormData.h
+++ b/WebKit/chromium/public/WebPasswordFormData.h
@@ -40,7 +40,7 @@ namespace WebKit {
struct WebPasswordFormData {
// If the provided form is suitable for password completion, isValid() will
// return true;
- WebPasswordFormData(const WebFormElement&);
+ WEBKIT_API WebPasswordFormData(const WebFormElement&);
// If creation failed, return false.
bool isValid() const { return action.isValid(); }
diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h
index f57c621..57f1cba 100644
--- a/WebKit/chromium/public/WebPlugin.h
+++ b/WebKit/chromium/public/WebPlugin.h
@@ -32,6 +32,7 @@
#define WebPlugin_h
#include "WebCanvas.h"
+#include "WebString.h"
struct NPObject;
@@ -93,6 +94,8 @@ public:
// Ends the print operation.
virtual void printEnd() { }
+ virtual WebString selectedText() { return WebString(); }
+
protected:
~WebPlugin() { }
};
diff --git a/WebKit/chromium/public/WebPluginContainer.h b/WebKit/chromium/public/WebPluginContainer.h
index 7b23f08..66ef9ab 100644
--- a/WebKit/chromium/public/WebPluginContainer.h
+++ b/WebKit/chromium/public/WebPluginContainer.h
@@ -36,6 +36,7 @@ struct NPObject;
namespace WebKit {
class WebElement;
+class WebPlugin;
class WebString;
class WebURL;
class WebURLRequest;
@@ -77,6 +78,9 @@ public:
virtual void loadFrameRequest(
const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0;
+ virtual WebPlugin* plugin() = 0;
+ virtual void setPlugin(WebPlugin*) = 0;
+
protected:
~WebPluginContainer() { }
};
diff --git a/WebKit/chromium/public/WebSearchableFormData.h b/WebKit/chromium/public/WebSearchableFormData.h
index e453387..5cd1d9b 100644
--- a/WebKit/chromium/public/WebSearchableFormData.h
+++ b/WebKit/chromium/public/WebSearchableFormData.h
@@ -43,7 +43,7 @@ class WebSearchableFormData {
public:
// If the provided form is suitable for automated searching, isValid()
// will return false.
- WebSearchableFormData(const WebFormElement&);
+ WEBKIT_API WebSearchableFormData(const WebFormElement&);
bool isValid() { return m_url.isValid(); }
diff --git a/WebKit/chromium/public/WebStorageEventDispatcher.h b/WebKit/chromium/public/WebStorageEventDispatcher.h
index 57750e8..37ceb7c 100644
--- a/WebKit/chromium/public/WebStorageEventDispatcher.h
+++ b/WebKit/chromium/public/WebStorageEventDispatcher.h
@@ -41,7 +41,7 @@ class WebURL;
// FIXME: Make this (or something) work for SessionStorage!
class WebStorageEventDispatcher {
public:
- static WebStorageEventDispatcher* create();
+ WEBKIT_API static WebStorageEventDispatcher* create();
virtual ~WebStorageEventDispatcher() { }
diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h
index d2cf9ea..2c9664e 100644
--- a/WebKit/chromium/public/WebString.h
+++ b/WebKit/chromium/public/WebString.h
@@ -131,7 +131,7 @@ public:
WebString(const NullableString16& s) : m_private(0)
{
if (s.is_null())
- assign(0);
+ reset();
else
assign(s.string().data(), s.string().length());
}
@@ -139,7 +139,7 @@ public:
WebString& operator=(const NullableString16& s)
{
if (s.is_null())
- assign(0);
+ reset();
else
assign(s.string().data(), s.string().length());
return *this;
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index eadfc26..1efd752 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -32,6 +32,8 @@
#define WebView_h
#include "WebDragOperation.h"
+#include "WebString.h"
+#include "WebVector.h"
#include "WebWidget.h"
namespace WebKit {
@@ -42,13 +44,13 @@ class WebDevToolsAgentClient;
class WebDragData;
class WebFrame;
class WebFrameClient;
+class WebGLES2Context;
class WebNode;
class WebSettings;
class WebString;
class WebViewClient;
struct WebMediaPlayerAction;
struct WebPoint;
-template <typename T> class WebVector;
class WebView : public WebWidget {
public:
@@ -57,7 +59,7 @@ public:
// Creates a WebView that is NOT yet initialized. You will need to
// call initializeMainFrame to finish the initialization. It is valid
// to pass null WebViewClient and WebDevToolsAgentClient pointers.
- WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient* = 0);
+ WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient*);
// After creating a WebView, you should immediately call this method.
// You can optionally modify the settings before calling this method.
@@ -224,7 +226,6 @@ public:
// The embedder may optionally engage a WebDevToolsAgent. This may only
// be set once per WebView.
virtual WebDevToolsAgent* devToolsAgent() = 0;
- virtual void setDevToolsAgent(WebDevToolsAgent*) = 0;
// Accessibility -------------------------------------------------------
@@ -233,17 +234,18 @@ public:
virtual WebAccessibilityObject accessibilityObject() = 0;
- // AutoFill / Autocomplete ---------------------------------------------
+ // AutoFill -----------------------------------------------------------
// Notifies the WebView that AutoFill suggestions are available for a node.
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- int defaultSuggestionIndex) = 0;
+ int separatorIndex) = 0;
// Notifies the WebView that Autocomplete suggestions are available for a
// node.
+ // DEPRECATED: merging with applyAutoFillSuggestions.
virtual void applyAutocompleteSuggestions(
const WebNode&,
const WebVector<WebString>& suggestions,
@@ -281,10 +283,22 @@ public:
unsigned inactiveForegroundColor) = 0;
// User scripts --------------------------------------------------------
- virtual void addUserScript(const WebString& sourceCode,
- bool runAtStart) = 0;
- virtual void addUserStyleSheet(const WebString& sourceCode) = 0;
- virtual void removeAllUserContent() = 0;
+ // FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled.
+ virtual void addUserScript(const WebString& sourceCode, bool runAtStart)
+ {
+ addUserScript(sourceCode, WebVector<WebString>(), runAtStart);
+ }
+ virtual void addUserStyleSheet(const WebString& sourceCode)
+ {
+ addUserStyleSheet(sourceCode, WebVector<WebString>());
+ }
+
+ WEBKIT_API static void addUserScript(const WebString& sourceCode,
+ const WebVector<WebString>& patterns,
+ bool runAtStart);
+ WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode,
+ const WebVector<WebString>& patterns);
+ WEBKIT_API static void removeAllUserContent();
// Modal dialog support ------------------------------------------------
@@ -293,6 +307,12 @@ public:
WEBKIT_API static void willEnterModalLoop();
WEBKIT_API static void didExitModalLoop();
+ // GPU acceleration support --------------------------------------------
+
+ // Returns the GLES2Context associated with this WebView. One will be
+ // created if it doesn't already exist.
+ virtual WebGLES2Context* gles2Context() = 0;
+
protected:
~WebView() {}
};
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 0712815..a59289d 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -126,9 +126,6 @@ public:
virtual bool isSmartInsertDeleteEnabled() { return true; }
virtual bool isSelectTrailingWhitespaceEnabled() { return true; }
- // DEPRECATED: replaced by WebWidgetClient::resetInputMethod().
- virtual void setInputMethodEnabled(bool enabled) { }
-
virtual void didBeginEditing() { }
virtual void didChangeSelection(bool isSelectionEmpty) { }
virtual void didChangeContents() { }
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index 3da245b..5c9f54e 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -33,7 +33,6 @@
#include "WebCanvas.h"
#include "WebCommon.h"
-#include "WebCompositionCommand.h"
#include "WebCompositionUnderline.h"
#include "WebTextInputType.h"
#include "WebTextDirection.h"
@@ -79,13 +78,6 @@ public:
// Called to inform the WebWidget that it has gained or lost keyboard focus.
virtual void setFocus(bool) = 0;
- // DEPRECATED. It's replaced by setComposition() and confirmComposition().
- virtual bool handleCompositionEvent(WebCompositionCommand command,
- int cursorPosition,
- int targetStart,
- int targetEnd,
- const WebString& text) = 0;
-
// Called to inform the WebWidget of a new composition text.
// If selectionStart and selectionEnd has the same value, then it indicates
// the input caret position. If the text is empty, then the existing
@@ -101,10 +93,6 @@ public:
// Returns true if there is an ongoing composition.
virtual bool confirmComposition() = 0;
- // DEPRECATED. It's replaced by textInputType() and
- // caretOrSelectionBounds().
- virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) = 0;
-
// Returns the current text input type of this WebWidget.
virtual WebTextInputType textInputType() = 0;
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index 819339d..5736ca0 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -181,6 +181,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatSmartPaste, PasteboardPrivate::
COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferStandard, PasteboardPrivate::StandardBuffer);
COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferSelection, PasteboardPrivate::SelectionBuffer);
+COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferDrag, PasteboardPrivate::DragBuffer);
COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, PlatformCursor::TypePointer);
COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, PlatformCursor::TypeCross);
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 04c02f2..1294561 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -31,7 +31,12 @@
#include "config.h"
#include "AutoFillPopupMenuClient.h"
+#include "CSSStyleSelector.h"
+#include "CSSValueKeywords.h"
+#include "Chrome.h"
+#include "FrameView.h"
#include "HTMLInputElement.h"
+#include "RenderTheme.h"
#include "WebNode.h"
#include "WebString.h"
#include "WebVector.h"
@@ -42,6 +47,18 @@ using namespace WebCore;
namespace WebKit {
+AutoFillPopupMenuClient::AutoFillPopupMenuClient()
+ : m_separatorIndex(-1)
+ , m_selectedIndex(-1)
+ , m_textField(0)
+ , m_AutocompleteModeEnabled(false)
+{
+}
+
+AutoFillPopupMenuClient::~AutoFillPopupMenuClient()
+{
+}
+
unsigned AutoFillPopupMenuClient::getSuggestionsCount() const
{
return m_names.size() + ((m_separatorIndex == -1) ? 0 : 1);
@@ -75,19 +92,35 @@ void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
{
- WebViewImpl* webView = getWebView();
- if (!webView)
- return;
-
- if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
- --listIndex;
-
- ASSERT(listIndex < m_names.size());
-
- webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
- m_names[listIndex],
- m_labels[listIndex],
- listIndex);
+ // DEPRECATED: Will be removed once AutoFill and Autocomplete merge is
+ // completed.
+ if (m_AutocompleteModeEnabled) {
+ m_textField->setValue(getSuggestion(listIndex));
+
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ EditorClientImpl* editor =
+ static_cast<EditorClientImpl*>(webView->page()->editorClient());
+ ASSERT(editor);
+ editor->onAutocompleteSuggestionAccepted(
+ static_cast<HTMLInputElement*>(m_textField.get()));
+ } else {
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+ --listIndex;
+
+ ASSERT(listIndex < m_names.size());
+
+ webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
+ m_names[listIndex],
+ m_labels[listIndex],
+ listIndex);
+ }
}
void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
@@ -108,22 +141,52 @@ void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEven
void AutoFillPopupMenuClient::selectionCleared()
{
- WebViewImpl* webView = getWebView();
- if (!webView)
- return;
+ // Same effect desired as popupDidHide, so call through.
+ popupDidHide();
+}
- webView->suggestionsPopupDidHide();
- webView->client()->didClearAutoFillSelection(WebNode(getTextField()));
+String AutoFillPopupMenuClient::itemText(unsigned listIndex) const
+{
+ return getSuggestion(listIndex);
+}
+
+PopupMenuStyle AutoFillPopupMenuClient::itemStyle(unsigned listIndex) const
+{
+ return *m_style;
+}
+
+PopupMenuStyle AutoFillPopupMenuClient::menuStyle() const
+{
+ return *m_style;
+}
+
+int AutoFillPopupMenuClient::clientPaddingLeft() const
+{
+ // Bug http://crbug.com/7708 seems to indicate the style can be 0.
+ RenderStyle* style = textFieldStyle();
+ if (!style)
+ return 0;
+
+ return RenderTheme::defaultTheme()->popupInternalPaddingLeft(style);
+}
+
+int AutoFillPopupMenuClient::clientPaddingRight() const
+{
+ // Bug http://crbug.com/7708 seems to indicate the style can be 0.
+ RenderStyle* style = textFieldStyle();
+ if (!style)
+ return 0;
+
+ return RenderTheme::defaultTheme()->popupInternalPaddingRight(style);
}
void AutoFillPopupMenuClient::popupDidHide()
{
- // FIXME: Refactor this method, as selectionCleared() and popupDidHide()
- // share the exact same functionality.
WebViewImpl* webView = getWebView();
if (!webView)
return;
+ webView->autoFillPopupDidHide();
webView->client()->didClearAutoFillSelection(WebNode(getTextField()));
}
@@ -132,6 +195,29 @@ bool AutoFillPopupMenuClient::itemIsSeparator(unsigned listIndex) const
return (m_separatorIndex != -1 && static_cast<unsigned>(m_separatorIndex) == listIndex);
}
+void AutoFillPopupMenuClient::setTextFromItem(unsigned listIndex)
+{
+ m_textField->setValue(getSuggestion(listIndex));
+}
+
+FontSelector* AutoFillPopupMenuClient::fontSelector() const
+{
+ return m_textField->document()->styleSelector()->fontSelector();
+}
+
+HostWindow* AutoFillPopupMenuClient::hostWindow() const
+{
+ return m_textField->document()->view()->hostWindow();
+}
+
+PassRefPtr<Scrollbar> AutoFillPopupMenuClient::createScrollbar(
+ ScrollbarClient* client,
+ ScrollbarOrientation orientation,
+ ScrollbarControlSize size)
+{
+ return Scrollbar::createNativeScrollbar(client, orientation, size);
+}
+
void AutoFillPopupMenuClient::initialize(
HTMLInputElement* textField,
const WebVector<WebString>& names,
@@ -141,11 +227,26 @@ void AutoFillPopupMenuClient::initialize(
ASSERT(names.size() == labels.size());
ASSERT(separatorIndex < static_cast<int>(names.size()));
+ m_selectedIndex = -1;
+ m_textField = textField;
+
// The suggestions must be set before initializing the
- // SuggestionsPopupMenuClient.
+ // AutoFillPopupMenuClient.
setSuggestions(names, labels, separatorIndex);
- SuggestionsPopupMenuClient::initialize(textField, -1);
+ FontDescription fontDescription;
+ RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
+ fontDescription);
+ RenderStyle* style = m_textField->computedStyle();
+ fontDescription.setComputedSize(style->fontDescription().computedSize());
+
+ Font font(fontDescription, 0, 0);
+ font.update(textField->document()->styleSelector()->fontSelector());
+ // The direction of text in popup menu is set the same as the direction of
+ // the input element: textField.
+ m_style.set(new PopupMenuStyle(Color::black, Color::white, font, true,
+ Length(WebCore::Fixed),
+ textField->renderer()->style()->direction()));
}
void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
@@ -169,4 +270,30 @@ void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
setSelectedIndex(-1);
}
+WebViewImpl* AutoFillPopupMenuClient::getWebView() const
+{
+ Frame* frame = m_textField->document()->frame();
+ if (!frame)
+ return 0;
+
+ Page* page = frame->page();
+ if (!page)
+ return 0;
+
+ return static_cast<ChromeClientImpl*>(page->chrome()->client())->webView();
+}
+
+RenderStyle* AutoFillPopupMenuClient::textFieldStyle() const
+{
+ RenderStyle* style = m_textField->computedStyle();
+ if (!style) {
+ // It seems we can only have a 0 style in a TextField if the
+ // node is detached, in which case we the popup shoud not be
+ // showing. Please report this in http://crbug.com/7708 and
+ // include the page you were visiting.
+ ASSERT_NOT_REACHED();
+ }
+ return style;
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h
index 488bdb1..a7d6693 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.h
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h
@@ -31,31 +31,64 @@
#ifndef AutoFillPopupMenuClient_h
#define AutoFillPopupMenuClient_h
-#include "SuggestionsPopupMenuClient.h"
+#include "PopupMenuClient.h"
namespace WebCore {
class HTMLInputElement;
+class PopupMenuStyle;
+class RenderStyle;
}
namespace WebKit {
class WebString;
+class WebViewImpl;
template <typename T> class WebVector;
// The AutoFill suggestions popup menu client, used to display name suggestions
// with right-justified labels.
-class AutoFillPopupMenuClient : public SuggestionsPopupMenuClient {
+class AutoFillPopupMenuClient : public WebCore::PopupMenuClient {
public:
- // SuggestionsPopupMenuClient implementation:
+ AutoFillPopupMenuClient();
+ virtual ~AutoFillPopupMenuClient();
+
+ // Returns the number of suggestions available.
virtual unsigned getSuggestionsCount() const;
+
+ // Returns the suggestion at |listIndex|.
virtual WebString getSuggestion(unsigned listIndex) const;
+
+ // Removes the suggestion at |listIndex| from the list of suggestions.
virtual void removeSuggestionAtIndex(unsigned listIndex);
- // WebCore::PopupMenuClient implementation:
+ // WebCore::PopupMenuClient methods:
virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
- virtual void selectionChanged(unsigned listIndex, bool fireEvents = true);
+ virtual void selectionChanged(unsigned, bool);
virtual void selectionCleared();
+ virtual WebCore::String itemText(unsigned listIndex) const;
+ virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); }
+ virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); }
+ virtual bool itemIsEnabled(unsigned listIndex) const { return true; }
+ virtual WebCore::PopupMenuStyle itemStyle(unsigned listIndex) const;
+ virtual WebCore::PopupMenuStyle menuStyle() const;
+ virtual int clientInsetLeft() const { return 0; }
+ virtual int clientInsetRight() const { return 0; }
+ virtual int clientPaddingLeft() const;
+ virtual int clientPaddingRight() const;
+ virtual int listSize() const { return getSuggestionsCount(); }
+ virtual int selectedIndex() const { return m_selectedIndex; }
virtual void popupDidHide();
virtual bool itemIsSeparator(unsigned listIndex) const;
+ virtual bool itemIsLabel(unsigned listIndex) const { return false; }
+ virtual bool itemIsSelected(unsigned listIndex) const { return false; }
+ virtual bool shouldPopOver() const { return false; }
+ virtual bool valueShouldChangeOnHotTrack() const { return false; }
+ virtual void setTextFromItem(unsigned listIndex);
+ virtual WebCore::FontSelector* fontSelector() const;
+ virtual WebCore::HostWindow* hostWindow() const;
+ virtual PassRefPtr<WebCore::Scrollbar> createScrollbar(
+ WebCore::ScrollbarClient* client,
+ WebCore::ScrollbarOrientation orientation,
+ WebCore::ScrollbarControlSize size);
void initialize(WebCore::HTMLInputElement*,
const WebVector<WebString>& names,
@@ -66,12 +99,34 @@ public:
const WebVector<WebString>& labels,
int separatorIndex);
+ // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
+ // complete.
+ void setAutocompleteMode(bool enabled) { m_AutocompleteModeEnabled = enabled; }
+
private:
+ WebViewImpl* getWebView() const;
+ WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); }
+ WebCore::RenderStyle* textFieldStyle() const;
+
+ int getSelectedIndex() const { return m_selectedIndex; }
+ void setSelectedIndex(int index) { m_selectedIndex = index; }
+
+ // The names and labels that make up the text of the menu items.
Vector<WebCore::String> m_names;
Vector<WebCore::String> m_labels;
// The index of the separator. -1 if there is no separator.
int m_separatorIndex;
+
+ // The index of the selected item. -1 if there is no selected item.
+ int m_selectedIndex;
+
+ RefPtr<WebCore::HTMLInputElement> m_textField;
+ OwnPtr<WebCore::PopupMenuStyle> m_style;
+
+ // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
+ // complete.
+ bool m_AutocompleteModeEnabled;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/AutocompletePopupMenuClient.cpp b/WebKit/chromium/src/AutocompletePopupMenuClient.cpp
deleted file mode 100644
index ed4f670..0000000
--- a/WebKit/chromium/src/AutocompletePopupMenuClient.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "AutocompletePopupMenuClient.h"
-
-#include "HTMLInputElement.h"
-#include "WebString.h"
-#include "WebVector.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-unsigned AutocompletePopupMenuClient::getSuggestionsCount() const
-{
- return m_suggestions.size();
-}
-
-WebString AutocompletePopupMenuClient::getSuggestion(unsigned listIndex) const
-{
- ASSERT(listIndex < m_suggestions.size());
- return m_suggestions[listIndex];
-}
-
-void AutocompletePopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
-{
- ASSERT(listIndex < m_suggestions.size());
- m_suggestions.remove(listIndex);
-}
-
-void AutocompletePopupMenuClient::initialize(
- HTMLInputElement* textField,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex)
-{
- ASSERT(defaultSuggestionIndex < static_cast<int>(suggestions.size()));
-
- // The suggestions must be set before initializing the
- // SuggestionsPopupMenuClient.
- setSuggestions(suggestions);
-
- SuggestionsPopupMenuClient::initialize(textField, defaultSuggestionIndex);
-}
-
-void AutocompletePopupMenuClient::setSuggestions(const WebVector<WebString>& suggestions)
-{
- m_suggestions.clear();
- for (size_t i = 0; i < suggestions.size(); ++i)
- m_suggestions.append(suggestions[i]);
-
- // Try to preserve selection if possible.
- if (getSelectedIndex() >= static_cast<int>(suggestions.size()))
- setSelectedIndex(-1);
-}
-
-} // namespace WebKit
diff --git a/WebKit/chromium/src/AutocompletePopupMenuClient.h b/WebKit/chromium/src/AutocompletePopupMenuClient.h
deleted file mode 100644
index 16a3771..0000000
--- a/WebKit/chromium/src/AutocompletePopupMenuClient.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef AutocompletePopupMenuClient_h
-#define AutocompletePopupMenuClient_h
-
-#include "SuggestionsPopupMenuClient.h"
-
-namespace WebCore {
-class HTMLInputElement;
-}
-
-namespace WebKit {
-class WebString;
-template <typename T> class WebVector;
-
-// The Autocomplete suggestions popup menu client, used to display a list of
-// autocomplete suggestions.
-class AutocompletePopupMenuClient : public SuggestionsPopupMenuClient {
-public:
- // SuggestionsPopupMenuClient implementation:
- virtual unsigned getSuggestionsCount() const;
- virtual WebString getSuggestion(unsigned listIndex) const;
- virtual void removeSuggestionAtIndex(unsigned listIndex);
-
- void initialize(WebCore::HTMLInputElement*,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex);
-
- void setSuggestions(const WebVector<WebString>&);
-
-private:
- Vector<WebCore::String> m_suggestions;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 4963f78..5124a7f 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -40,6 +40,7 @@
#include "WebCookieJar.h"
#include "WebCursorInfo.h"
#include "WebData.h"
+#include "WebDragData.h"
#include "WebFileSystem.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
@@ -197,6 +198,48 @@ void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
webKitClient()->clipboard()->writeImage(webImage, sourceURL, title);
}
+void ChromiumBridge::clipboardWriteData(ClipboardData* data)
+{
+ notImplemented();
+ WebDragData dragData; // FIXME: Define the conversion from ClipboardData to WebDragData.
+ webKitClient()->clipboard()->writeData(dragData);
+}
+
+HashSet<String> ChromiumBridge::clipboardReadAvailableTypes(
+ PasteboardPrivate::ClipboardBuffer buffer, bool* containsFilenames)
+{
+ WebVector<WebString> result = webKitClient()->clipboard()->readAvailableTypes(
+ static_cast<WebClipboard::Buffer>(buffer), containsFilenames);
+ HashSet<String> types;
+ for (size_t i = 0; i < result.size(); ++i)
+ types.add(result[i]);
+ return types;
+}
+
+bool ChromiumBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer,
+ const String& type, String& data, String& metadata)
+{
+ WebString resultData;
+ WebString resultMetadata;
+ bool succeeded = webKitClient()->clipboard()->readData(
+ static_cast<WebClipboard::Buffer>(buffer), type, &resultData, &resultMetadata);
+ if (succeeded) {
+ data = resultData;
+ metadata = resultMetadata;
+ }
+ return succeeded;
+}
+
+Vector<String> ChromiumBridge::clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer buffer)
+{
+ WebVector<WebString> result = webKitClient()->clipboard()->readFilenames(
+ static_cast<WebClipboard::Buffer>(buffer));
+ Vector<String> convertedResult;
+ for (size_t i = 0; i < result.size(); ++i)
+ convertedResult.append(result[i]);
+ return convertedResult;
+}
+
// Cookies --------------------------------------------------------------------
void ChromiumBridge::setCookies(const Document* document, const KURL& url,
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index 8dd3393..f757d9c 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -46,6 +46,7 @@
#include "KURL.h"
#include "MediaError.h"
#include "PlatformString.h"
+#include "RenderWidget.h"
#include "TextBreakIterator.h"
#include "Widget.h"
@@ -53,6 +54,7 @@
#include "WebDataSourceImpl.h"
#include "WebFrameImpl.h"
#include "WebMenuItemInfo.h"
+#include "WebPluginContainerImpl.h"
#include "WebPoint.h"
#include "WebString.h"
#include "WebURL.h"
@@ -147,6 +149,24 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
WebContextMenuData data;
data.mousePosition = selectedFrame->view()->contentsToWindow(r.point());
+ // Compute edit flags.
+ data.editFlags = WebContextMenuData::CanDoNone;
+ if (m_webView->focusedWebCoreFrame()->editor()->canUndo())
+ data.editFlags |= WebContextMenuData::CanUndo;
+ if (m_webView->focusedWebCoreFrame()->editor()->canRedo())
+ data.editFlags |= WebContextMenuData::CanRedo;
+ if (m_webView->focusedWebCoreFrame()->editor()->canCut())
+ data.editFlags |= WebContextMenuData::CanCut;
+ if (m_webView->focusedWebCoreFrame()->editor()->canCopy())
+ data.editFlags |= WebContextMenuData::CanCopy;
+ if (m_webView->focusedWebCoreFrame()->editor()->canPaste())
+ data.editFlags |= WebContextMenuData::CanPaste;
+ if (m_webView->focusedWebCoreFrame()->editor()->canDelete())
+ data.editFlags |= WebContextMenuData::CanDelete;
+ // We can always select all...
+ data.editFlags |= WebContextMenuData::CanSelectAll;
+ data.editFlags |= WebContextMenuData::CanTranslate;
+
// Links, Images, Media tags, and Image/Media-Links take preference over
// all else.
data.linkURL = r.absoluteLinkURL();
@@ -182,6 +202,21 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
data.mediaFlags |= WebContextMenuData::MediaHasVideo;
if (mediaElement->controls())
data.mediaFlags |= WebContextMenuData::MediaControls;
+ } else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag)
+ || r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) {
+ RenderObject* object = r.innerNonSharedNode()->renderer();
+ if (object && object->isWidget()) {
+ Widget* widget = toRenderWidget(object)->widget();
+ if (widget) {
+ WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
+ WebString text = plugin->selectedText();
+ if (!text.isEmpty()) {
+ data.selectedText = text;
+ data.editFlags |= WebContextMenuData::CanCopy;
+ }
+ data.editFlags &= ~WebContextMenuData::CanTranslate;
+ }
+ }
}
data.isImageBlocked =
@@ -226,23 +261,6 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
if (ds)
data.securityInfo = ds->response().securityInfo();
- // Compute edit flags.
- data.editFlags = WebContextMenuData::CanDoNone;
- if (m_webView->focusedWebCoreFrame()->editor()->canUndo())
- data.editFlags |= WebContextMenuData::CanUndo;
- if (m_webView->focusedWebCoreFrame()->editor()->canRedo())
- data.editFlags |= WebContextMenuData::CanRedo;
- if (m_webView->focusedWebCoreFrame()->editor()->canCut())
- data.editFlags |= WebContextMenuData::CanCut;
- if (m_webView->focusedWebCoreFrame()->editor()->canCopy())
- data.editFlags |= WebContextMenuData::CanCopy;
- if (m_webView->focusedWebCoreFrame()->editor()->canPaste())
- data.editFlags |= WebContextMenuData::CanPaste;
- if (m_webView->focusedWebCoreFrame()->editor()->canDelete())
- data.editFlags |= WebContextMenuData::CanDelete;
- // We can always select all...
- data.editFlags |= WebContextMenuData::CanSelectAll;
-
// Filter out custom menu elements and add them into the data.
populateCustomMenuItems(defaultMenu, &data);
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index 2a40d78..864988a 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -658,7 +658,7 @@ void EditorClientImpl::textFieldDidEndEditing(Element* element)
m_autofillTimer.stop();
// Hide any showing popup.
- m_webView->hideSuggestionsPopup();
+ m_webView->hideAutoFillPopup();
if (!m_webView->client())
return; // The page is getting closed, don't fill the password.
@@ -754,7 +754,7 @@ void EditorClientImpl::doAutofill(Timer<EditorClientImpl>* timer)
&& inputElement->selectionEnd() == static_cast<int>(value.length());
if ((!args->autofillOnEmptyValue && value.isEmpty()) || !isCaretAtEnd) {
- m_webView->hideSuggestionsPopup();
+ m_webView->hideAutoFillPopup();
return;
}
@@ -796,11 +796,7 @@ void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textFi
if (!webframe)
return;
- WebPasswordAutocompleteListener* listener = webframe->getPasswordListener(textField);
- // Password listeners need to autocomplete other fields that depend on the
- // input element with autofill suggestions.
- if (listener)
- listener->performInlineAutocomplete(textField->value(), false, false);
+ webframe->notifiyPasswordListenerOfAutocomplete(WebInputElement(textField));
}
bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element,
@@ -921,13 +917,8 @@ void EditorClientImpl::getGuessesForWord(const String&,
void EditorClientImpl::setInputMethodState(bool enabled)
{
- if (m_webView->client()) {
+ if (m_webView->client())
m_webView->client()->resetInputMethod();
-
- // Remove this line when WebViewClient::setInputMethodEnabled() gets
- // removed.
- m_webView->client()->setInputMethodEnabled(enabled);
- }
}
} // namesace WebKit
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 0681675..7ba0bce 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -35,6 +35,8 @@
#include "GraphicsContext3D.h"
#include "CachedImage.h"
+#include "Chrome.h"
+#include "ChromeClientImpl.h"
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
#include "ImageBuffer.h"
@@ -50,10 +52,12 @@
#include "WebGLShader.h"
#include "WebGLTexture.h"
#include "Uint8Array.h"
+#include "WebGLLayerChromium.h"
#include "WebGraphicsContext3D.h"
#include "WebGraphicsContext3DDefaultImpl.h"
#include "WebKit.h"
#include "WebKitClient.h"
+#include "WebViewImpl.h"
#include <stdio.h>
#include <wtf/FastMalloc.h>
@@ -97,7 +101,7 @@ public:
GraphicsContext3DInternal();
~GraphicsContext3DInternal();
- bool initialize(GraphicsContext3D::Attributes attrs);
+ bool initialize(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow);
PlatformGraphicsContext3D platformGraphicsContext3D() const;
Platform3DObject platformTexture() const;
@@ -111,6 +115,11 @@ public:
void beginPaint(WebGLRenderingContext* context);
void endPaint();
+ void prepareTexture();
+
+#if USE(ACCELERATED_COMPOSITING)
+ WebGLLayerChromium* platformLayer() const;
+#endif
bool isGLES2Compliant() const;
//----------------------------------------------------------------------
@@ -165,6 +174,8 @@ public:
bool getActiveAttrib(WebGLProgram* program, unsigned long index, ActiveInfo&);
bool getActiveUniform(WebGLProgram* program, unsigned long index, ActiveInfo&);
+ void getAttachedShaders(WebGLProgram* program, int maxCount, int* count, unsigned int* shaders);
+
int getAttribLocation(WebGLProgram*, const String& name);
void getBooleanv(unsigned long pname, unsigned char* value);
@@ -297,6 +308,9 @@ public:
private:
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
+#if USE(ACCELERATED_COMPOSITING)
+ RefPtr<WebGLLayerChromium> m_compositingLayer;
+#endif
#if PLATFORM(SKIA)
// If the width and height of the Canvas's backing store don't
// match those that we were given in the most recent call to
@@ -329,7 +343,8 @@ GraphicsContext3DInternal::~GraphicsContext3DInternal()
#endif
}
-bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs)
+bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs,
+ HostWindow* hostWindow)
{
WebKit::WebGraphicsContext3D::Attributes webAttributes;
webAttributes.alpha = attrs.alpha;
@@ -340,23 +355,47 @@ bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs)
WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGraphicsContext3D();
if (!webContext)
return false;
- if (!webContext->initialize(webAttributes)) {
+
+ Chrome* chrome = static_cast<Chrome*>(hostWindow);
+ WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(chrome->client());
+
+ WebKit::WebViewImpl* webView = chromeClientImpl->webView();
+
+ if (!webView)
+ return false;
+ if (!webContext->initialize(webAttributes, webView)) {
delete webContext;
return false;
}
m_impl.set(webContext);
+
+#if USE(ACCELERATED_COMPOSITING)
+ m_compositingLayer = WebGLLayerChromium::create(0);
+#endif
return true;
}
PlatformGraphicsContext3D GraphicsContext3DInternal::platformGraphicsContext3D() const
{
- return 0;
+ return m_impl.get();
}
Platform3DObject GraphicsContext3DInternal::platformTexture() const
{
- return 0;
+ return m_impl->getPlatformTextureId();
+}
+
+void GraphicsContext3DInternal::prepareTexture()
+{
+ m_impl->prepareTexture();
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+WebGLLayerChromium* GraphicsContext3DInternal::platformLayer() const
+{
+ return m_compositingLayer.get();
}
+#endif
void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
{
@@ -556,6 +595,12 @@ void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \
m_impl->name(a1, a2, a3, a4); \
}
+#define DELEGATE_TO_IMPL_4_X1(name, t1, t2, t3, t4) \
+void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \
+{ \
+ m_impl->name(EXTRACT(a1), a2, a3, a4); \
+}
+
#define DELEGATE_TO_IMPL_4_X4(name, t1, t2, t3, t4) \
void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \
{ \
@@ -734,6 +779,8 @@ bool GraphicsContext3DInternal::getActiveUniform(WebGLProgram* program, unsigned
return true;
}
+DELEGATE_TO_IMPL_4_X1(getAttachedShaders, WebGLProgram*, int, int*, unsigned int*)
+
int GraphicsContext3DInternal::getAttribLocation(WebGLProgram* program, const String& name)
{
return m_impl->getAttribLocation(EXTRACT(program), name.utf8().data());
@@ -1066,7 +1113,7 @@ GraphicsContext3D::~GraphicsContext3D()
PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow)
{
GraphicsContext3DInternal* internal = new GraphicsContext3DInternal();
- if (!internal->initialize(attrs)) {
+ if (!internal->initialize(attrs, hostWindow)) {
delete internal;
return 0;
}
@@ -1085,6 +1132,20 @@ Platform3DObject GraphicsContext3D::platformTexture() const
return m_internal->platformTexture();
}
+void GraphicsContext3D::prepareTexture()
+{
+ return m_internal->prepareTexture();
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+PlatformLayer* GraphicsContext3D::platformLayer() const
+{
+ WebGLLayerChromium* webGLLayer = m_internal->platformLayer();
+ webGLLayer->setContext(this);
+ return webGLLayer;
+}
+#endif
+
DELEGATE_TO_INTERNAL(makeContextCurrent)
DELEGATE_TO_INTERNAL_1R(sizeInBytes, int, int)
DELEGATE_TO_INTERNAL_2(reshape, int, int)
@@ -1139,6 +1200,8 @@ DELEGATE_TO_INTERNAL_1(generateMipmap, unsigned long)
DELEGATE_TO_INTERNAL_3R(getActiveAttrib, WebGLProgram*, unsigned long, ActiveInfo&, bool)
DELEGATE_TO_INTERNAL_3R(getActiveUniform, WebGLProgram*, unsigned long, ActiveInfo&, bool)
+DELEGATE_TO_INTERNAL_4(getAttachedShaders, WebGLProgram*, int, int*, unsigned int*)
+
DELEGATE_TO_INTERNAL_2R(getAttribLocation, WebGLProgram*, const String&, int)
DELEGATE_TO_INTERNAL_2(getBooleanv, unsigned long, unsigned char*)
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 42be08d..7a6571a 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -80,6 +80,11 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndex> idbIndex)
m_callbacks.clear();
}
+void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey)
+{
+ ASSERT_NOT_REACHED();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStore> idbObjectStore)
{
m_callbacks->onSuccess(new WebKit::WebIDBObjectStoreImpl(idbObjectStore));
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h
index 8f2da28..fc424f8 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -56,6 +56,7 @@ public:
virtual void onSuccess(); // For "null".
virtual void onSuccess(PassRefPtr<IDBDatabase>);
virtual void onSuccess(PassRefPtr<IDBIndex>);
+ virtual void onSuccess(PassRefPtr<IDBKey>);
virtual void onSuccess(PassRefPtr<IDBObjectStore>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp b/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
deleted file mode 100644
index dd7d9b8..0000000
--- a/WebKit/chromium/src/SuggestionsPopupMenuClient.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "SuggestionsPopupMenuClient.h"
-
-#include "CSSStyleSelector.h"
-#include "CSSValueKeywords.h"
-#include "Chrome.h"
-#include "FrameView.h"
-#include "HTMLInputElement.h"
-#include "RenderTheme.h"
-#include "WebViewImpl.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-SuggestionsPopupMenuClient::SuggestionsPopupMenuClient()
- : m_textField(0)
- , m_selectedIndex(0)
-{
-}
-
-SuggestionsPopupMenuClient::~SuggestionsPopupMenuClient()
-{
-}
-
-// FIXME: Implement this per-derived class?
-void SuggestionsPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
-{
- m_textField->setValue(getSuggestion(listIndex));
-
- WebViewImpl* webView = getWebView();
- if (!webView)
- return;
-
- EditorClientImpl* editor =
- static_cast<EditorClientImpl*>(webView->page()->editorClient());
- ASSERT(editor);
- editor->onAutocompleteSuggestionAccepted(
- static_cast<HTMLInputElement*>(m_textField.get()));
-}
-
-String SuggestionsPopupMenuClient::itemText(unsigned listIndex) const
-{
- return getSuggestion(listIndex);
-}
-
-PopupMenuStyle SuggestionsPopupMenuClient::itemStyle(unsigned listIndex) const
-{
- return *m_style;
-}
-
-PopupMenuStyle SuggestionsPopupMenuClient::menuStyle() const
-{
- return *m_style;
-}
-
-int SuggestionsPopupMenuClient::clientPaddingLeft() const
-{
- // Bug http://crbug.com/7708 seems to indicate the style can be 0.
- RenderStyle* style = textFieldStyle();
- if (!style)
- return 0;
-
- return RenderTheme::defaultTheme()->popupInternalPaddingLeft(style);
-}
-
-int SuggestionsPopupMenuClient::clientPaddingRight() const
-{
- // Bug http://crbug.com/7708 seems to indicate the style can be 0.
- RenderStyle* style = textFieldStyle();
- if (!style)
- return 0;
-
- return RenderTheme::defaultTheme()->popupInternalPaddingRight(style);
-}
-
-void SuggestionsPopupMenuClient::popupDidHide()
-{
- WebViewImpl* webView = getWebView();
- if (webView)
- webView->suggestionsPopupDidHide();
-}
-
-void SuggestionsPopupMenuClient::setTextFromItem(unsigned listIndex)
-{
- m_textField->setValue(getSuggestion(listIndex));
-}
-
-FontSelector* SuggestionsPopupMenuClient::fontSelector() const
-{
- return m_textField->document()->styleSelector()->fontSelector();
-}
-
-HostWindow* SuggestionsPopupMenuClient::hostWindow() const
-{
- return m_textField->document()->view()->hostWindow();
-}
-
-PassRefPtr<Scrollbar> SuggestionsPopupMenuClient::createScrollbar(
- ScrollbarClient* client,
- ScrollbarOrientation orientation,
- ScrollbarControlSize size)
-{
- return Scrollbar::createNativeScrollbar(client, orientation, size);
-}
-
-RenderStyle* SuggestionsPopupMenuClient::textFieldStyle() const
-{
- RenderStyle* style = m_textField->computedStyle();
- if (!style) {
- // It seems we can only have a 0 style in a TextField if the
- // node is detached, in which case we the popup shoud not be
- // showing. Please report this in http://crbug.com/7708 and
- // include the page you were visiting.
- ASSERT_NOT_REACHED();
- }
- return style;
-}
-
-void SuggestionsPopupMenuClient::initialize(HTMLInputElement* textField,
- int defaultSuggestionIndex)
-{
- m_textField = textField;
- m_selectedIndex = defaultSuggestionIndex;
-
- FontDescription fontDescription;
- RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
- fontDescription);
- RenderStyle* style = m_textField->computedStyle();
- fontDescription.setComputedSize(style->fontDescription().computedSize());
-
- Font font(fontDescription, 0, 0);
- font.update(textField->document()->styleSelector()->fontSelector());
- // The direction of text in popup menu is set the same as the direction of
- // the input element: textField.
- m_style.set(new PopupMenuStyle(Color::black, Color::white, font, true,
- Length(WebCore::Fixed),
- textField->renderer()->style()->direction()));
-}
-
-WebViewImpl* SuggestionsPopupMenuClient::getWebView() const
-{
- Frame* frame = m_textField->document()->frame();
- if (!frame)
- return 0;
-
- Page* page = frame->page();
- if (!page)
- return 0;
-
- return static_cast<ChromeClientImpl*>(page->chrome()->client())->webView();
-}
-
-} // namespace WebKit
diff --git a/WebKit/chromium/src/SuggestionsPopupMenuClient.h b/WebKit/chromium/src/SuggestionsPopupMenuClient.h
deleted file mode 100644
index 7717593..0000000
--- a/WebKit/chromium/src/SuggestionsPopupMenuClient.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "PopupMenuClient.h"
-
-#ifndef SuggestionsPopupMenuClient_h
-#define SuggestionsPopupMenuClient_h
-
-namespace WebCore {
-class HTMLInputElement;
-class PopupMenuStyle;
-class RenderStyle;
-}
-
-namespace WebKit {
-class WebString;
-class WebViewImpl;
-template <typename T> class WebVector;
-
-// The Suggestions popup menu client, used to display a list of suggestions.
-class SuggestionsPopupMenuClient : public WebCore::PopupMenuClient {
-public:
- SuggestionsPopupMenuClient();
- virtual ~SuggestionsPopupMenuClient();
-
- // Returns the number of suggestions available.
- virtual unsigned getSuggestionsCount() const = 0;
-
- // Returns the suggestion at |listIndex|.
- virtual WebString getSuggestion(unsigned listIndex) const = 0;
-
- // Removes the suggestion at |listIndex| from the list of suggestions.
- virtual void removeSuggestionAtIndex(unsigned listIndex) = 0;
-
- // WebCore::PopupMenuClient methods:
- virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
- virtual void selectionChanged(unsigned, bool) {}
- virtual void selectionCleared() {}
- virtual WebCore::String itemText(unsigned listIndex) const;
- virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); }
- virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); }
- virtual bool itemIsEnabled(unsigned listIndex) const { return true; }
- virtual WebCore::PopupMenuStyle itemStyle(unsigned listIndex) const;
- virtual WebCore::PopupMenuStyle menuStyle() const;
- virtual int clientInsetLeft() const { return 0; }
- virtual int clientInsetRight() const { return 0; }
- virtual int clientPaddingLeft() const;
- virtual int clientPaddingRight() const;
- virtual int listSize() const { return getSuggestionsCount(); }
- virtual int selectedIndex() const { return m_selectedIndex; }
- virtual void popupDidHide();
- virtual bool itemIsSeparator(unsigned listIndex) const { return false; }
- virtual bool itemIsLabel(unsigned listIndex) const { return false; }
- virtual bool itemIsSelected(unsigned listIndex) const { return false; }
- virtual bool shouldPopOver() const { return false; }
- virtual bool valueShouldChangeOnHotTrack() const { return false; }
- virtual void setTextFromItem(unsigned listIndex);
- virtual WebCore::FontSelector* fontSelector() const;
- virtual WebCore::HostWindow* hostWindow() const;
- virtual PassRefPtr<WebCore::Scrollbar> createScrollbar(
- WebCore::ScrollbarClient* client,
- WebCore::ScrollbarOrientation orientation,
- WebCore::ScrollbarControlSize size);
-
-protected:
- void initialize(WebCore::HTMLInputElement* textField,
- int defaultSuggestionIndex);
-
- int getSelectedIndex() const { return m_selectedIndex; }
- void setSelectedIndex(int index) { m_selectedIndex = index; }
-
- WebViewImpl* getWebView() const;
- WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); }
-
-private:
- WebCore::RenderStyle* textFieldStyle() const;
-
- RefPtr<WebCore::HTMLInputElement> m_textField;
- int m_selectedIndex;
- OwnPtr<WebCore::PopupMenuStyle> m_style;
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp
index 2b20c0a..3aaebfd 100644
--- a/WebKit/chromium/src/WebBindings.cpp
+++ b/WebKit/chromium/src/WebBindings.cpp
@@ -45,6 +45,7 @@
#include "V8DOMWrapper.h"
#include "V8Event.h"
#include "V8Helpers.h"
+#include "V8HiddenPropertyName.h"
#include "V8NPUtils.h"
#include "V8Proxy.h"
#include "V8Range.h"
@@ -208,8 +209,7 @@ void WebBindings::extractIdentifierData(const NPIdentifier& identifier, const NP
static v8::Local<v8::Value> getEvent(const v8::Handle<v8::Context>& context)
{
- static v8::Persistent<v8::String> eventSymbol(v8::Persistent<v8::String>::New(v8::String::NewSymbol("event")));
- return context->Global()->GetHiddenValue(eventSymbol);
+ return context->Global()->GetHiddenValue(V8HiddenPropertyName::event());
}
static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data)
diff --git a/WebKit/chromium/src/WebDatabase.cpp b/WebKit/chromium/src/WebDatabase.cpp
index 376509d..89522f1 100644
--- a/WebKit/chromium/src/WebDatabase.cpp
+++ b/WebKit/chromium/src/WebDatabase.cpp
@@ -32,11 +32,7 @@
#include "WebDatabase.h"
#include "AbstractDatabase.h"
-#include "DatabaseTask.h"
-#include "DatabaseThread.h"
#include "DatabaseTracker.h"
-#include "Document.h"
-#include "KURL.h"
#include "QuotaTracker.h"
#include "SecurityOrigin.h"
#include "WebDatabaseObserver.h"
@@ -50,44 +46,28 @@ namespace WebKit {
static WebDatabaseObserver* databaseObserver = 0;
-class WebDatabasePrivate : public AbstractDatabase {
-};
-
-void WebDatabase::reset()
-{
- assign(0);
-}
-
-void WebDatabase::assign(const WebDatabase& other)
-{
- WebDatabasePrivate* d = const_cast<WebDatabasePrivate*>(other.m_private);
- if (d)
- d->ref();
- assign(d);
-}
-
WebString WebDatabase::name() const
{
- ASSERT(m_private);
- return m_private->stringIdentifier();
+ ASSERT(m_database);
+ return m_database->stringIdentifier();
}
WebString WebDatabase::displayName() const
{
- ASSERT(m_private);
- return m_private->displayName();
+ ASSERT(m_database);
+ return m_database->displayName();
}
unsigned long WebDatabase::estimatedSize() const
{
- ASSERT(m_private);
- return m_private->estimatedSize();
+ ASSERT(m_database);
+ return m_database->estimatedSize();
}
WebSecurityOrigin WebDatabase::securityOrigin() const
{
- ASSERT(m_private);
- return WebSecurityOrigin(m_private->securityOrigin());
+ ASSERT(m_database);
+ return WebSecurityOrigin(m_database->securityOrigin());
}
void WebDatabase::setObserver(WebDatabaseObserver* observer)
@@ -117,28 +97,9 @@ void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, co
it->get()->closeImmediately();
}
-WebDatabase::WebDatabase(const WTF::PassRefPtr<AbstractDatabase>& database)
- : m_private(static_cast<WebDatabasePrivate*>(database.releaseRef()))
-{
-}
-
-WebDatabase& WebDatabase::operator=(const WTF::PassRefPtr<AbstractDatabase>& database)
-{
- assign(static_cast<WebDatabasePrivate*>(database.releaseRef()));
- return *this;
-}
-
-WebDatabase::operator WTF::PassRefPtr<AbstractDatabase>() const
-{
- return PassRefPtr<AbstractDatabase>(const_cast<WebDatabasePrivate*>(m_private));
-}
-
-void WebDatabase::assign(WebDatabasePrivate* d)
+WebDatabase::WebDatabase(const AbstractDatabase* database)
+ : m_database(database)
{
- // d is already ref'd for us by the caller
- if (m_private)
- m_private->deref();
- m_private = d;
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index c0e9b44..20ab1d3 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -643,11 +643,6 @@ void WebDevToolsAgentImpl::setTimelineProfilingEnabled(bool enabled)
ic->stopTimelineProfiler();
}
-WebDevToolsAgent* WebDevToolsAgent::create(WebView* webview, WebDevToolsAgentClient* client)
-{
- return new WebDevToolsAgentImpl(static_cast<WebViewImpl*>(webview), client);
-}
-
void WebDevToolsAgent::executeDebuggerCommand(const WebString& command, int callerId)
{
DebuggerAgentManager::executeDebuggerCommand(command, callerId);
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index c5fa1fe..ff4883e 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -962,7 +962,7 @@ WebHistoryItem WebFrameImpl::previousHistoryItem() const
WebHistoryItem WebFrameImpl::currentHistoryItem() const
{
// If we are still loading, then we don't want to clobber the current
- // history item as this could cause us to lose the scroll position and
+ // history item as this could cause us to lose the scroll position and
// document state. However, it is OK for new navigations.
if (m_frame->loader()->loadType() == FrameLoadTypeStandard
|| !m_frame->loader()->activeDocumentLoader()->isLoadingInAPISense())
@@ -1284,14 +1284,21 @@ bool WebFrameImpl::isPageBoxVisible(int pageIndex)
return frame()->document()->isPageBoxVisible(pageIndex);
}
-WebRect WebFrameImpl::pageAreaRectInPixels(int pageIndex)
+void WebFrameImpl::pageSizeAndMarginsInPixels(int pageIndex,
+ WebSize& pageSize,
+ int& marginTop,
+ int& marginRight,
+ int& marginBottom,
+ int& marginLeft)
{
- return frame()->document()->pageAreaRectInPixels(pageIndex);
-}
-
-WebSize WebFrameImpl::preferredPageSizeInPixels(int pageIndex)
-{
- return frame()->document()->preferredPageSizeInPixels(pageIndex);
+ IntSize size(pageSize.width, pageSize.height);
+ frame()->document()->pageSizeAndMarginsInPixels(pageIndex,
+ size,
+ marginTop,
+ marginRight,
+ marginBottom,
+ marginLeft);
+ pageSize = size;
}
bool WebFrameImpl::find(int identifier,
@@ -1961,6 +1968,17 @@ bool WebFrameImpl::registerPasswordListener(
return true;
}
+void WebFrameImpl::notifiyPasswordListenerOfAutocomplete(
+ const WebInputElement& inputElement)
+{
+ RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>();
+ WebPasswordAutocompleteListener* listener = getPasswordListener(element.get());
+ // Password listeners need to autocomplete other fields that depend on the
+ // input element with autofill suggestions.
+ if (listener)
+ listener->performInlineAutocomplete(element->value(), false, false);
+}
+
WebPasswordAutocompleteListener* WebFrameImpl::getPasswordListener(
HTMLInputElement* inputElement)
{
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index c14ad9b..aa1edd6 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -150,8 +150,12 @@ public:
virtual float getPrintPageShrink(int page);
virtual void printEnd();
virtual bool isPageBoxVisible(int pageIndex);
- virtual WebRect pageAreaRectInPixels(int pageIndex);
- virtual WebSize preferredPageSizeInPixels(int pageIndex);
+ virtual void pageSizeAndMarginsInPixels(int pageIndex,
+ WebSize& pageSize,
+ int& marginTop,
+ int& marginRight,
+ int& marginBottom,
+ int& marginLeft);
virtual bool find(
int identifier, const WebString& searchText, const WebFindOptions&,
bool wrapWithinFrame, WebRect* selectionRect);
@@ -164,6 +168,8 @@ public:
virtual void resetMatchCount();
virtual bool registerPasswordListener(
WebInputElement, WebPasswordAutocompleteListener*);
+ virtual void notifiyPasswordListenerOfAutocomplete(
+ const WebInputElement&);
virtual WebString contentAsText(size_t maxChars) const;
virtual WebString contentAsMarkup() const;
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index b23dc35..0863ec8 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -173,8 +173,8 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl()
glDeleteFramebuffersEXT(1, &m_fbo);
#endif // !RENDER_TO_DEBUGGING_WINDOW
#if OS(WINDOWS)
- wglMakeCurrent(0, 0);
- wglDeleteContext(m_contextObj);
+ wglewMakeCurrent(0, 0);
+ wglewDeleteContext(m_contextObj);
ReleaseDC(m_canvasWindow, m_canvasDC);
DestroyWindow(m_canvasWindow);
#elif PLATFORM(CG)
@@ -194,9 +194,17 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl()
}
}
-bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes)
+bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView)
{
#if OS(WINDOWS)
+ if (!s_initializedGLEW) {
+ // Do this only the first time through.
+ if (!wglewInit()) {
+ printf("WebGraphicsContext3DDefaultImpl: wglewInit failed\n");
+ return false;
+ }
+ }
+
WNDCLASS wc;
if (!GetClassInfo(GetModuleHandle(0), L"CANVASGL", &wc)) {
ZeroMemory(&wc, sizeof(WNDCLASS));
@@ -246,13 +254,13 @@ bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attribute
}
// create rendering context
- m_contextObj = wglCreateContext(m_canvasDC);
+ m_contextObj = wglewCreateContext(m_canvasDC);
if (!m_contextObj) {
printf("WebGraphicsContext3DDefaultImpl: wglCreateContext failed\n");
return false;
}
- if (!wglMakeCurrent(m_canvasDC, m_contextObj)) {
+ if (!wglewMakeCurrent(m_canvasDC, m_contextObj)) {
printf("WebGraphicsContext3DDefaultImpl: wglMakeCurrent failed\n");
return false;
}
@@ -260,7 +268,7 @@ bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attribute
#ifdef RENDER_TO_DEBUGGING_WINDOW
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
PFNWGLSWAPINTERVALEXTPROC setSwapInterval = 0;
- setSwapInterval = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT");
+ setSwapInterval = (PFNWGLSWAPINTERVALEXTPROC) wglewGetProcAddress("wglSwapIntervalEXT");
if (setSwapInterval)
setSwapInterval(1);
#endif // RENDER_TO_DEBUGGING_WINDOW
@@ -416,8 +424,8 @@ void WebGraphicsContext3DDefaultImpl::validateAttributes()
bool WebGraphicsContext3DDefaultImpl::makeContextCurrent()
{
#if OS(WINDOWS)
- if (wglGetCurrentContext() != m_contextObj)
- if (wglMakeCurrent(m_canvasDC, m_contextObj))
+ if (wglewGetCurrentContext() != m_contextObj)
+ if (wglewMakeCurrent(m_canvasDC, m_contextObj))
return true;
#elif PLATFORM(CG)
if (CGLGetCurrentContext() != m_contextObj)
@@ -469,6 +477,17 @@ bool WebGraphicsContext3DDefaultImpl::isGLES2Compliant()
return false;
}
+unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId()
+{
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebGraphicsContext3DDefaultImpl::prepareTexture()
+{
+ ASSERT_NOT_REACHED();
+}
+
static int createTextureObject(GLenum target)
{
GLuint texture = 0;
@@ -1059,6 +1078,8 @@ bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned
return true;
}
+DELEGATE_TO_GL_4(getAttachedShaders, GetAttachedShaders, WebGLId, int, int*, unsigned int*)
+
DELEGATE_TO_GL_2R(getAttribLocation, GetAttribLocation, WebGLId, const char*, int)
DELEGATE_TO_GL_2(getBooleanv, GetBooleanv, unsigned long, unsigned char*)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index 2518a37..e409bf5 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -42,6 +42,9 @@
#endif
#include "GL/glew.h"
+#if OS(WINDOWS)
+#include "GL/wglew.h"
+#endif
#if PLATFORM(CG)
#include <OpenGL/OpenGL.h>
@@ -67,7 +70,7 @@ public:
//----------------------------------------------------------------------
// WebGraphicsContext3D methods
- virtual bool initialize(WebGraphicsContext3D::Attributes attributes);
+ virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*);
virtual bool makeContextCurrent();
virtual int width();
@@ -81,6 +84,9 @@ public:
virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize);
+ virtual unsigned int getPlatformTextureId();
+ virtual void prepareTexture();
+
virtual void synthesizeGLError(unsigned long error);
virtual void activeTexture(unsigned long texture);
@@ -131,6 +137,8 @@ public:
virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&);
virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&);
+ virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders);
+
virtual int getAttribLocation(WebGLId program, const char* name);
virtual void getBooleanv(unsigned long pname, unsigned char* value);
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index d099048..41758d2 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -167,6 +167,11 @@ void WebPluginContainerImpl::handleEvent(Event* event)
handleWheelEvent(static_cast<WheelEvent*>(event));
else if (event->isKeyboardEvent())
handleKeyboardEvent(static_cast<KeyboardEvent*>(event));
+
+ // FIXME: it would be cleaner if Widget::handleEvent returned true/false and
+ // HTMLPluginElement called setDefaultHandled or defaultEventHandler.
+ if (!event->defaultHandled())
+ m_element->Node::defaultEventHandler(event);
}
void WebPluginContainerImpl::frameRectsChanged()
@@ -241,6 +246,11 @@ void WebPluginContainerImpl::printEnd()
return m_webPlugin->printEnd();
}
+WebString WebPluginContainerImpl::selectedText()
+{
+ return m_webPlugin->selectedText();
+}
+
WebElement WebPluginContainerImpl::element()
{
return WebElement(m_element);
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h
index ad2fa95..dd0871a 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -84,6 +84,10 @@ public:
virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed);
virtual void loadFrameRequest(const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData);
+ // This cannot be null.
+ WebPlugin* plugin() { return m_webPlugin; }
+ void setPlugin(WebPlugin* plugin) { m_webPlugin = plugin; }
+
// Printing interface. The plugin can support custom printing
// (which means it controls the layout, number of pages etc).
// Whether the plugin supports its own paginated print. The other print
@@ -98,6 +102,8 @@ public:
// Ends the print operation.
void printEnd();
+ WebString selectedText();
+
// Resource load events for the plugin's source data:
void didReceiveResponse(const WebCore::ResourceResponse&);
void didReceiveData(const char *data, int dataLength);
@@ -106,9 +112,6 @@ public:
NPObject* scriptableObject();
- // This cannot be null.
- WebPlugin* plugin() { return m_webPlugin; }
-
void willDestroyPluginLoadObserver(WebPluginLoadObserver*);
private:
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 9ac4d34..dbf9183 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -230,14 +230,6 @@ void WebPopupMenuImpl::setFocus(bool enable)
{
}
-// DEPRECATED, will be removed later.
-bool WebPopupMenuImpl::handleCompositionEvent(
- WebCompositionCommand command, int cursorPosition, int targetStart,
- int targetEnd, const WebString& imeString)
-{
- return false;
-}
-
bool WebPopupMenuImpl::setComposition(
const WebString& text, const WebVector<WebCompositionUnderline>& underlines,
int selectionStart, int selectionEnd)
@@ -250,12 +242,6 @@ bool WebPopupMenuImpl::confirmComposition()
return false;
}
-// DEPRECATED, will be removed later.
-bool WebPopupMenuImpl::queryCompositionStatus(bool* enabled, WebRect* caretRect)
-{
- return false;
-}
-
WebTextInputType WebPopupMenuImpl::textInputType()
{
return WebTextInputTypeNone;
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 95f776e..4f5c2de 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -66,19 +66,11 @@ public:
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
-
- // DEPRECATED, will be removed later.
- virtual bool handleCompositionEvent(
- WebCompositionCommand command, int cursorPosition,
- int targetStart, int targetEnd, const WebString& text);
virtual bool setComposition(
const WebString& text,
const WebVector<WebCompositionUnderline>& underlines,
int selectionStart, int selectionEnd);
virtual bool confirmComposition();
-
- // DEPRECATED, will be removed later.
- virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
virtual WebTextInputType textInputType();
virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 257d646..45b9117 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -32,7 +32,6 @@
#include "WebViewImpl.h"
#include "AutoFillPopupMenuClient.h"
-#include "AutocompletePopupMenuClient.h"
#include "AXObjectCache.h"
#include "Chrome.h"
#include "CompositionUnderlineVectorBuilder.h"
@@ -104,6 +103,7 @@
#include "WebString.h"
#include "WebVector.h"
#include "WebViewClient.h"
+#include "wtf/OwnPtr.h"
#if OS(WINDOWS)
#include "RenderThemeChromiumWin.h"
@@ -153,7 +153,7 @@ COMPILE_ASSERT_MATCHING_ENUM(DragOperationMove);
COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete);
COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery);
-static const PopupContainerSettings suggestionsPopupSettings = {
+static const PopupContainerSettings autoFillPopupSettings = {
false, // setTextOnIndexChange
false, // acceptOnAbandon
true, // loopSelectionNavigation
@@ -239,9 +239,9 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
, m_dropEffect(DropEffectDefault)
, m_operationsAllowed(WebDragOperationNone)
, m_dragOperation(WebDragOperationNone)
- , m_suggestionsPopupShowing(false)
- , m_suggestionsPopupClient(0)
- , m_suggestionsPopup(0)
+ , m_autoFillPopupShowing(false)
+ , m_autoFillPopupClient(0)
+ , m_autoFillPopup(0)
, m_isTransparent(false)
, m_tabsToLinks(false)
, m_dragScrollTimer(new DragScrollTimer())
@@ -261,7 +261,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
m_lastMousePosition = WebPoint(-1, -1);
if (devToolsClient)
- m_devToolsAgent = static_cast<WebDevToolsAgentImpl*>(WebDevToolsAgent::create(this, devToolsClient));
+ m_devToolsAgent = new WebDevToolsAgentImpl(this, devToolsClient);
m_page.set(new Page(&m_chromeClientImpl, &m_contextMenuClientImpl, &m_editorClientImpl, &m_dragClientImpl, &m_inspectorClientImpl, 0, 0, 0));
@@ -356,7 +356,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
m_mouseCaptureNode = hitNode;
// If a text field that has focus is clicked again, we should display the
- // suggestions popup.
+ // AutoFill popup.
RefPtr<Node> focusedNode = focusedWebCoreNode();
if (focusedNode.get() && toHTMLInputElement(focusedNode.get())) {
if (hitNode == focusedNode) {
@@ -374,7 +374,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
if (clickedNode.get() && clickedNode == focusedWebCoreNode()) {
- // Focus has not changed, show the suggestions popup.
+ // Focus has not changed, show the AutoFill popup.
static_cast<EditorClientImpl*>(m_page->editorClient())->
showFormAutofillForNode(clickedNode.get());
}
@@ -456,7 +456,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
IntPoint contentPoint = view->windowToContents(clickPoint);
HitTestResult hitTestResult = focused->eventHandler()->hitTestResultAtPoint(contentPoint, false, false, ShouldHitTestScrollbars);
// We don't want to send a paste when middle clicking a scroll bar or a
- // link (which will navigate later in the code). The main scrollbars
+ // link (which will navigate later in the code). The main scrollbars
// have to be handled separately.
if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused && !view->scrollbarAtPoint(clickPoint)) {
Editor* editor = focused->editor();
@@ -557,13 +557,13 @@ bool WebViewImpl::selectPopupHandleKeyEvent(const WebKeyboardEvent& event)
{
if (!m_selectPopup)
return false;
-
+
return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
}
bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
{
- if (!m_suggestionsPopupShowing
+ if (!m_autoFillPopupShowing
// Home and End should be left to the text field to process.
|| event.windowsKeyCode == VKEY_HOME
|| event.windowsKeyCode == VKEY_END)
@@ -571,7 +571,7 @@ bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
// Pressing delete triggers the removal of the selected suggestion from the DB.
if (event.windowsKeyCode == VKEY_DELETE
- && m_suggestionsPopup->selectedIndex() != -1) {
+ && m_autoFillPopup->selectedIndex() != -1) {
Node* node = focusedWebCoreNode();
if (!node || (node->nodeType() != Node::ELEMENT_NODE)) {
ASSERT_NOT_REACHED();
@@ -583,22 +583,22 @@ bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
return false;
}
- int selectedIndex = m_suggestionsPopup->selectedIndex();
+ int selectedIndex = m_autoFillPopup->selectedIndex();
HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element);
WebString name = inputElement->name();
- WebString value = m_suggestionsPopupClient->itemText(selectedIndex);
+ WebString value = m_autoFillPopupClient->itemText(selectedIndex);
m_client->removeAutofillSuggestions(name, value);
// Update the entries in the currently showing popup to reflect the
// deletion.
- m_suggestionsPopupClient->removeSuggestionAtIndex(selectedIndex);
- refreshSuggestionsPopup();
+ m_autoFillPopupClient->removeSuggestionAtIndex(selectedIndex);
+ refreshAutoFillPopup();
return false;
}
- if (!m_suggestionsPopup->isInterestedInEventForKey(event.windowsKeyCode))
+ if (!m_autoFillPopup->isInterestedInEventForKey(event.windowsKeyCode))
return false;
- if (m_suggestionsPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event))) {
+ if (m_autoFillPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event))) {
// We need to ignore the next Char event after this otherwise pressing
// enter when selecting an item in the menu will go to the page.
if (WebInputEvent::RawKeyDown == event.type)
@@ -661,62 +661,10 @@ bool WebViewImpl::touchEvent(const WebTouchEvent& event)
}
#endif
-// The WebViewImpl::SendContextMenuEvent function is based on the Webkit
-// function
-// bool WebView::handleContextMenuEvent(WPARAM wParam, LPARAM lParam) in
-// webkit\webkit\win\WebView.cpp. The only significant change in this
-// function is the code to convert from a Keyboard event to the Right
-// Mouse button up event.
-//
-// This function is an ugly copy/paste and should be cleaned up when the
-// WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438
#if OS(WINDOWS) || OS(LINUX)
-// FIXME: implement on Mac
+// Mac has no way to open a context menu based on a keyboard event.
bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
{
- static const int kContextMenuMargin = 1;
- Frame* mainFrameImpl = page()->mainFrame();
- FrameView* view = mainFrameImpl->view();
- if (!view)
- return false;
-
- IntPoint coords(-1, -1);
-#if OS(WINDOWS)
- int rightAligned = ::GetSystemMetrics(SM_MENUDROPALIGNMENT);
-#else
- int rightAligned = 0;
-#endif
- IntPoint location;
-
-
- Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
- Node* focusedNode = focusedFrame->document()->focusedNode();
- Position start = mainFrameImpl->selection()->selection().start();
-
- if (start.node()) {
- RenderObject* renderer = start.node()->renderer();
- if (!renderer)
- return false;
-
- RefPtr<Range> selection = mainFrameImpl->selection()->toNormalizedRange();
- IntRect firstRect = mainFrameImpl->firstRectForRange(selection.get());
-
- int x = rightAligned ? firstRect.right() : firstRect.x();
- location = IntPoint(x, firstRect.bottom());
- } else if (focusedNode)
- location = focusedNode->getRect().bottomLeft();
- else {
- location = IntPoint(
- rightAligned ? view->contentsWidth() - kContextMenuMargin : kContextMenuMargin,
- kContextMenuMargin);
- }
-
- location = view->contentsToWindow(location);
- // FIXME: The IntSize(0, -1) is a hack to get the hit-testing to result in
- // the selected element. Ideally we'd have the position of a context menu
- // event be separate from its target node.
- coords = location + IntSize(0, -1);
-
// The contextMenuController() holds onto the last context menu that was
// popped up on the page until a new one is created. We need to clear
// this menu before propagating the event through the DOM so that we can
@@ -725,17 +673,9 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
// not run.
page()->contextMenuController()->clearContextMenu();
- focusedFrame->view()->setCursor(pointerCursor());
- WebMouseEvent mouseEvent;
- mouseEvent.button = WebMouseEvent::ButtonRight;
- mouseEvent.x = coords.x();
- mouseEvent.y = coords.y();
- mouseEvent.type = WebInputEvent::MouseUp;
-
- PlatformMouseEventBuilder platformEvent(view, mouseEvent);
-
m_contextMenuAllowed = true;
- bool handled = focusedFrame->eventHandler()->sendContextMenuEvent(platformEvent);
+ Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
+ bool handled = focusedFrame->eventHandler()->sendContextMenuEventForKey();
m_contextMenuAllowed = false;
return handled;
}
@@ -880,11 +820,11 @@ void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
}
}
-void WebViewImpl::hideSuggestionsPopup()
+void WebViewImpl::hideAutoFillPopup()
{
- if (m_suggestionsPopupShowing) {
- m_suggestionsPopup->hidePopup();
- m_suggestionsPopupShowing = false;
+ if (m_autoFillPopupShowing) {
+ m_autoFillPopup->hidePopup();
+ m_autoFillPopupShowing = false;
}
}
@@ -1142,7 +1082,7 @@ void WebViewImpl::setFocus(bool enable)
}
m_imeAcceptEvents = true;
} else {
- hideSuggestionsPopup();
+ hideAutoFillPopup();
hideSelectPopup();
// Clear focus on the currently focused frame if any.
@@ -1164,48 +1104,6 @@ void WebViewImpl::setFocus(bool enable)
}
}
-// DEPRECATED, will be removed later.
-bool WebViewImpl::handleCompositionEvent(WebCompositionCommand command,
- int cursorPosition,
- int targetStart,
- int targetEnd,
- const WebString& imeString)
-{
- if (command == WebKit::WebCompositionCommandSet) {
- if (targetStart < 0)
- targetStart = 0;
- if (targetEnd < 0)
- targetEnd = static_cast<int>(imeString.length());
-
- // Create custom underlines.
- // To emphasize the selection, the selected region uses a solid black
- // for its underline while other regions uses a pale gray for theirs.
- WebVector<WebCompositionUnderline> underlines(static_cast<size_t>(3));
- underlines[0].startOffset = 0;
- underlines[0].endOffset = targetStart;
- underlines[0].thick = true;
- underlines[0].color = 0xffd3d3d3;
- underlines[1].startOffset = targetStart;
- underlines[1].endOffset = targetEnd;
- underlines[1].thick = true;
- underlines[1].color = 0xff000000;
- underlines[2].startOffset = targetEnd;
- underlines[2].endOffset = static_cast<unsigned>(imeString.length());
- underlines[2].thick = true;
- underlines[2].color = 0xffd3d3d3;
- return setComposition(imeString, underlines, cursorPosition, cursorPosition);
- }
-
- if (command == WebKit::WebCompositionCommandDiscard)
- setComposition(WebString(), WebVector<WebCompositionUnderline>(), 0, 0);
- else if (command == WebKit::WebCompositionCommandConfirm) {
- setComposition(imeString, WebVector<WebCompositionUnderline>(), 0, 0);
- confirmComposition();
- }
-
- return true;
-}
-
bool WebViewImpl::setComposition(
const WebString& text,
const WebVector<WebCompositionUnderline>& underlines,
@@ -1284,41 +1182,6 @@ bool WebViewImpl::confirmComposition()
return true;
}
-// DEPRECATED, will be removed later.
-bool WebViewImpl::queryCompositionStatus(bool* enableIME, WebRect* caretRect)
-{
- // Store whether the selected node needs IME and the caret rectangle.
- // This process consists of the following four steps:
- // 1. Retrieve the selection controller of the focused frame;
- // 2. Retrieve the caret rectangle from the controller;
- // 3. Convert the rectangle, which is relative to the parent view, to the
- // one relative to the client window, and;
- // 4. Store the converted rectangle.
- const Frame* focused = focusedWebCoreFrame();
- if (!focused)
- return false;
-
- const Editor* editor = focused->editor();
- if (!editor || !editor->canEdit())
- return false;
-
- SelectionController* controller = focused->selection();
- if (!controller)
- return false;
-
- const Node* node = controller->start().node();
- if (!node)
- return false;
-
- *enableIME = node->shouldUseInputMethod() && !controller->isInPasswordField();
- const FrameView* view = node->document()->view();
- if (!view)
- return false;
-
- *caretRect = view->contentsToWindow(controller->absoluteCaretBounds());
- return true;
-}
-
WebTextInputType WebViewImpl::textInputType()
{
WebTextInputType type = WebTextInputTypeNone;
@@ -1363,6 +1226,10 @@ WebRect WebViewImpl::caretOrSelectionBounds()
if (!view)
return rect;
+ const Node* node = controller->start().node();
+ if (!node || !node->renderer())
+ return rect;
+
if (controller->isCaret())
rect = view->contentsToWindow(controller->absoluteCaretBounds());
else if (controller->isRange()) {
@@ -1832,12 +1699,6 @@ WebDevToolsAgent* WebViewImpl::devToolsAgent()
return m_devToolsAgent.get();
}
-void WebViewImpl::setDevToolsAgent(WebDevToolsAgent* devToolsAgent)
-{
- ASSERT(!m_devToolsAgent.get()); // May only set once!
- m_devToolsAgent.set(static_cast<WebDevToolsAgentPrivate*>(devToolsAgent));
-}
-
WebAccessibilityObject WebViewImpl::accessibilityObject()
{
if (!mainFrameImpl())
@@ -1858,7 +1719,7 @@ void WebViewImpl::applyAutoFillSuggestions(
ASSERT(separatorIndex < static_cast<int>(names.size()));
if (names.isEmpty()) {
- hideSuggestionsPopup();
+ hideAutoFillPopup();
return;
}
@@ -1867,7 +1728,7 @@ void WebViewImpl::applyAutoFillSuggestions(
// focused node, then we have nothing to do. FIXME: also check the
// caret is at the end and that the text has not changed.
if (!focusedNode || focusedNode != PassRefPtr<Node>(node)) {
- hideSuggestionsPopup();
+ hideAutoFillPopup();
return;
}
@@ -1879,93 +1740,52 @@ void WebViewImpl::applyAutoFillSuggestions(
if (!m_autoFillPopupClient.get())
m_autoFillPopupClient.set(new AutoFillPopupMenuClient);
- m_autoFillPopupClient->initialize(inputElem, names, labels,
- separatorIndex);
-
- if (m_suggestionsPopupClient != m_autoFillPopupClient.get()) {
- hideSuggestionsPopup();
- m_suggestionsPopupClient = m_autoFillPopupClient.get();
- }
+ m_autoFillPopupClient->initialize(inputElem, names, labels, separatorIndex);
if (!m_autoFillPopup.get()) {
- m_autoFillPopup = PopupContainer::create(m_suggestionsPopupClient,
+ m_autoFillPopup = PopupContainer::create(m_autoFillPopupClient.get(),
PopupContainer::Suggestion,
- suggestionsPopupSettings);
+ autoFillPopupSettings);
}
- if (m_suggestionsPopup != m_autoFillPopup.get())
- m_suggestionsPopup = m_autoFillPopup.get();
-
- if (m_suggestionsPopupShowing) {
+ if (m_autoFillPopupShowing) {
m_autoFillPopupClient->setSuggestions(names, labels, separatorIndex);
- refreshSuggestionsPopup();
+ refreshAutoFillPopup();
} else {
- m_suggestionsPopup->show(focusedNode->getRect(),
+ m_autoFillPopup->show(focusedNode->getRect(),
focusedNode->ownerDocument()->view(), 0);
- m_suggestionsPopupShowing = true;
+ m_autoFillPopupShowing = true;
}
+
+ // DEPRECATED: This special mode will go away once AutoFill and Autocomplete
+ // merge is complete.
+ if (m_autoFillPopupClient)
+ m_autoFillPopupClient->setAutocompleteMode(false);
}
+// DEPRECATED: replacing with applyAutoFillSuggestions.
void WebViewImpl::applyAutocompleteSuggestions(
const WebNode& node,
const WebVector<WebString>& suggestions,
int defaultSuggestionIndex)
{
- ASSERT(defaultSuggestionIndex < static_cast<int>(suggestions.size()));
-
- if (!m_page.get() || suggestions.isEmpty()) {
- hideSuggestionsPopup();
- return;
- }
+ WebVector<WebString> names(suggestions.size());
+ WebVector<WebString> labels(suggestions.size());
- RefPtr<Node> focusedNode = focusedWebCoreNode();
- // If the node for which we queried the Autocomplete suggestions is not the
- // focused node, then we have nothing to do. FIXME: also check the
- // caret is at the end and that the text has not changed.
- if (!focusedNode || focusedNode != PassRefPtr<Node>(node)) {
- hideSuggestionsPopup();
- return;
+ for (size_t i = 0; i < suggestions.size(); ++i) {
+ names[i] = suggestions[i];
+ labels[i] = WebString();
}
- HTMLInputElement* inputElem =
- static_cast<HTMLInputElement*>(focusedNode.get());
-
- // The first time the Autocomplete is shown we'll create the client and the
- // popup.
- if (!m_autocompletePopupClient.get())
- m_autocompletePopupClient.set(new AutocompletePopupMenuClient);
-
- m_autocompletePopupClient->initialize(inputElem, suggestions,
- defaultSuggestionIndex);
-
- if (m_suggestionsPopupClient != m_autocompletePopupClient.get()) {
- hideSuggestionsPopup();
- m_suggestionsPopupClient = m_autocompletePopupClient.get();
- }
-
- if (!m_autocompletePopup.get()) {
- m_autocompletePopup = PopupContainer::create(m_suggestionsPopupClient,
- PopupContainer::Suggestion,
- suggestionsPopupSettings);
- }
-
- if (m_suggestionsPopup != m_autocompletePopup.get())
- m_suggestionsPopup = m_autocompletePopup.get();
-
- if (m_suggestionsPopupShowing) {
- m_autocompletePopupClient->setSuggestions(suggestions);
- refreshSuggestionsPopup();
- } else {
- m_suggestionsPopup->show(focusedNode->getRect(),
- focusedNode->ownerDocument()->view(), 0);
- m_suggestionsPopupShowing = true;
- }
+ applyAutoFillSuggestions(node, names, labels, -1);
+ if (m_autoFillPopupClient)
+ m_autoFillPopupClient->setAutocompleteMode(true);
}
void WebViewImpl::hidePopups()
{
hideSelectPopup();
- hideSuggestionsPopup();
+ hideAutoFillPopup();
}
void WebViewImpl::performCustomContextMenuAction(unsigned action)
@@ -2044,22 +1864,30 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
#endif
}
-void WebViewImpl::addUserScript(const WebString& sourceCode, bool runAtStart)
+void WebView::addUserScript(const WebString& sourceCode, const WebVector<WebString>& patternsIn, bool runAtStart)
{
+ OwnPtr<Vector<String> > patterns(new Vector<String>);
+ for (size_t i = 0; i < patternsIn.size(); ++i)
+ patterns->append(patternsIn[i]);
+
PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create());
- pageGroup->addUserScriptToWorld(world.get(), sourceCode, WebURL(), 0, 0,
+ pageGroup->addUserScriptToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0,
runAtStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
}
-void WebViewImpl::addUserStyleSheet(const WebString& sourceCode)
+void WebView::addUserStyleSheet(const WebString& sourceCode, const WebVector<WebString>& patternsIn)
{
+ OwnPtr<Vector<String> > patterns(new Vector<String>);
+ for (size_t i = 0; i < patternsIn.size(); ++i)
+ patterns->append(patternsIn[i]);
+
PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create());
- pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), 0, 0);
+ pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0);
}
-void WebViewImpl::removeAllUserContent()
+void WebView::removeAllUserContent()
{
PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
pageGroup->removeAllUserContent();
@@ -2151,24 +1979,25 @@ NotificationPresenterImpl* WebViewImpl::notificationPresenterImpl()
}
#endif
-void WebViewImpl::refreshSuggestionsPopup()
+void WebViewImpl::refreshAutoFillPopup()
{
- ASSERT(m_suggestionsPopupShowing);
+ ASSERT(m_autoFillPopupShowing);
// Hide the popup if it has become empty.
- if (!m_suggestionsPopupClient->listSize()) {
- hideSuggestionsPopup();
+ if (!m_autoFillPopupClient->listSize()) {
+ hideAutoFillPopup();
return;
}
- IntRect oldBounds = m_suggestionsPopup->boundsRect();
- m_suggestionsPopup->refresh();
- IntRect newBounds = m_suggestionsPopup->boundsRect();
+ IntRect oldBounds = m_autoFillPopup->boundsRect();
+ m_autoFillPopup->refresh();
+ IntRect newBounds = m_autoFillPopup->boundsRect();
// Let's resize the backing window if necessary.
if (oldBounds != newBounds) {
WebPopupMenuImpl* popupMenu =
- static_cast<WebPopupMenuImpl*>(m_suggestionsPopup->client());
- popupMenu->client()->setWindowRect(newBounds);
+ static_cast<WebPopupMenuImpl*>(m_autoFillPopup->client());
+ if (popupMenu)
+ popupMenu->client()->setWindowRect(newBounds);
}
}
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index a6fa131..db2a1d2 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -70,7 +70,6 @@ class AutocompletePopupMenuClient;
class AutoFillPopupMenuClient;
class ContextMenuClientImpl;
class DragScrollTimer;
-class SuggestionsPopupMenuClient;
class WebAccessibilityObject;
class WebDevToolsAgentClient;
class WebDevToolsAgentPrivate;
@@ -93,22 +92,12 @@ public:
virtual bool handleInputEvent(const WebInputEvent&);
virtual void mouseCaptureLost();
virtual void setFocus(bool enable);
-
- // DEPRECATED, will be removed later.
- virtual bool handleCompositionEvent(WebCompositionCommand command,
- int cursorPosition,
- int targetStart,
- int targetEnd,
- const WebString& text);
virtual bool setComposition(
const WebString& text,
const WebVector<WebCompositionUnderline>& underlines,
int selectionStart,
int selectionEnd);
virtual bool confirmComposition();
-
- // DEPRECATED, will be removed later.
- virtual bool queryCompositionStatus(bool* enabled, WebRect* caretRect);
virtual WebTextInputType textInputType();
virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
@@ -147,8 +136,8 @@ public:
const WebPoint& screenPoint,
WebDragOperation operation);
virtual void dragSourceMovedTo(
- const WebPoint& clientPoint,
- const WebPoint& screenPoint,
+ const WebPoint& clientPoint,
+ const WebPoint& screenPoint,
WebDragOperation operation);
virtual void dragSourceSystemDragEnded();
virtual WebDragOperation dragTargetDragEnter(
@@ -174,13 +163,13 @@ public:
virtual void setInspectorSetting(const WebString& key,
const WebString& value);
virtual WebDevToolsAgent* devToolsAgent();
- virtual void setDevToolsAgent(WebDevToolsAgent*);
virtual WebAccessibilityObject accessibilityObject();
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
int separatorIndex);
+ // DEPRECATED: replacing with applyAutoFillSuggestions.
virtual void applyAutocompleteSuggestions(
const WebNode&,
const WebVector<WebString>& suggestions,
@@ -194,10 +183,7 @@ public:
unsigned inactiveBackgroundColor,
unsigned inactiveForegroundColor);
virtual void performCustomContextMenuAction(unsigned action);
- virtual void addUserScript(const WebString& sourceCode,
- bool runAtStart);
- virtual void addUserStyleSheet(const WebString& sourceCode);
- virtual void removeAllUserContent();
+ virtual WebGLES2Context* gles2Context();
// WebViewImpl
@@ -296,9 +282,9 @@ public:
const WebImage& dragImage,
const WebPoint& dragImageOffset);
- void suggestionsPopupDidHide()
+ void autoFillPopupDidHide()
{
- m_suggestionsPopupShowing = false;
+ m_autoFillPopupShowing = false;
}
#if ENABLE(NOTIFICATIONS)
@@ -314,7 +300,7 @@ public:
void popupOpened(WebCore::PopupContainer* popupContainer);
void popupClosed(WebCore::PopupContainer* popupContainer);
- void hideSuggestionsPopup();
+ void hideAutoFillPopup();
// HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can
// fix WebKit to pass enough information up into ChromeClient::show() so we
@@ -336,10 +322,6 @@ public:
WebCore::ScrollDirection* scrollDirection,
WebCore::ScrollGranularity* scrollGranularity);
- // Returns the GLES2Context associated with this WebView. One will be created
- // if it doesn't already exist.
- WebGLES2Context* gles2Context();
-
private:
friend class WebView; // So WebView::Create can call our constructor
friend class WTF::RefCounted<WebViewImpl>;
@@ -361,10 +343,10 @@ private:
// Returns true if the autocomple has consumed the event.
bool autocompleteHandleKeyEvent(const WebKeyboardEvent&);
- // Repaints the suggestions popup. Should be called when the suggestions
- // have changed. Note that this should only be called when the suggestions
+ // Repaints the AutoFill popup. Should be called when the suggestions
+ // have changed. Note that this should only be called when the AutoFill
// popup is showing.
- void refreshSuggestionsPopup();
+ void refreshAutoFillPopup();
// Returns true if the view was scrolled.
bool scrollViewWithKeyboard(int keyCode, int modifiers);
@@ -473,32 +455,18 @@ private:
// current drop target in this WebView (the drop target can accept the drop).
WebDragOperation m_dragOperation;
- // Whether a suggestions popup is currently showing.
- bool m_suggestionsPopupShowing;
-
- // A pointer to the current suggestions popup menu client. This can be
- // either an AutoFillPopupMenuClient or an AutocompletePopupMenuClient. We
- // do not own this pointer.
- SuggestionsPopupMenuClient* m_suggestionsPopupClient;
+ // Whether an AutoFill popup is currently showing.
+ bool m_autoFillPopupShowing;
// The AutoFill popup client.
OwnPtr<AutoFillPopupMenuClient> m_autoFillPopupClient;
- // The Autocomplete popup client.
- OwnPtr<AutocompletePopupMenuClient> m_autocompletePopupClient;
-
- // A pointer to the current suggestions popup. We do not own this pointer.
- WebCore::PopupContainer* m_suggestionsPopup;
+ // The AutoFill popup.
+ RefPtr<WebCore::PopupContainer> m_autoFillPopup;
// The popup associated with a select element.
RefPtr<WebCore::PopupContainer> m_selectPopup;
- // The AutoFill suggestions popup.
- RefPtr<WebCore::PopupContainer> m_autoFillPopup;
-
- // The AutoComplete suggestions popup.
- RefPtr<WebCore::PopupContainer> m_autocompletePopup;
-
OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent;
// Whether the webview is rendering transparently.
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index 244cceb..0ad0ccd 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -165,7 +165,7 @@ void WebWorkerBase::initializeLoader(const WebURL& url)
// loading requests from the worker context to the rest of WebKit and Chromium
// infrastructure.
ASSERT(!m_webView);
- m_webView = WebView::create(0);
+ m_webView = WebView::create(0, 0);
m_webView->settings()->setOfflineWebApplicationCacheEnabled(WebRuntimeFeatures::isApplicationCacheEnabled());
m_webView->initializeMainFrame(this);
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index baddb7d..25d1903 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -93,22 +93,19 @@ DebuggerScript._formatScript = function(script)
DebuggerScript.setBreakpoint = function(execState, args)
{
args.lineNumber = DebuggerScript._webkitToV8LineNumber(args.lineNumber);
- var key = args.scriptId + ":" + args.lineNumber;
- var breakId = DebuggerScript._breakpoints[key];
- if (breakId) {
- if (args.enabled)
- Debug.enableScriptBreakPoint(breakId);
- else
- Debug.disableScriptBreakPoint(breakId);
- Debug.changeScriptBreakPointCondition(breakId, args.condition);
- return breakId;
- }
-
- breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition);
- DebuggerScript._breakpoints[key] = breakId;
+ var breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition);
if (!args.enabled)
Debug.disableScriptBreakPoint(breakId);
- return breakId;
+
+ var actualLineNumber = args.lineNumber; // TODO: replace with real stuff after v8 roll.
+
+ var key = args.scriptId + ":" + actualLineNumber;
+ if (key in DebuggerScript._breakpoints) {
+ // Remove old breakpoint.
+ Debug.findBreakPoint(DebuggerScript._breakpoints[key], true);
+ }
+ DebuggerScript._breakpoints[key] = breakId;
+ return DebuggerScript._v8ToWebkitLineNumber(actualLineNumber);
}
DebuggerScript.removeBreakpoint = function(execState, args)
@@ -240,6 +237,9 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
var scopeObject = {};
for (var j = 0; j < properties.length; j++)
scopeObject[properties[j].name()] = properties[j].value_;
+ // Reset scope object prototype to null so that the proto properties
+ // don't appear in th local scope section.
+ scopeObject.__proto__ = null;
scopeType.push(scopeMirror.scopeType());
scopeChain.push(scopeObject);
}
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index 806bf6a..bab73a9 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -37,5 +37,8 @@ if (!window["RemoteDebuggerAgent"]) {
window["RemoteDebuggerAgent"] = { setDebuggerScriptSource: function() {} };
window["RemoteDebuggerCommandExecutor"] = {};
window["RemoteProfilerAgent"] = {};
- window["RemoteToolsAgent"] = { dispatchOnInjectedScript: function() {} };
+ window["RemoteToolsAgent"] = {
+ dispatchOnInjectedScript: function() {},
+ dispatchOnInspectorController: function() {}
+ };
}
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 893bc56..cd4d9fb 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -1610,7 +1610,21 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
if (window.v8ScriptDebugServerEnabled) {
var scopeExpectations = [
"a", "Child", [
- "constructor", "function Child(n) {", null,
+ "__proto__", "Child", [
+ "__proto__", "Parent", [
+ "__proto__", "Object", null,
+ "constructor", "function Parent(n) {", [
+ "name", '"Parent"', null,
+ "prototype", 'Parent', [
+ "parentProtoField", "11", null,
+ ]
+ ],
+ "parentProtoField", "11", null,
+ ],
+ "constructor", "function Child(n) {", null,
+ "childProtoField", "21", null,
+ ],
+
"parentField", "10", null,
"childField", "20", null,
]
@@ -1655,7 +1669,7 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
var propQueue = [];
var index = 0;
- var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 1 : 8);
+ var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 5 : 8);
function expandAndCheckNextProperty() {
if (index === propQueue.length) {
diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp
index 2756f9d..9a45dc2 100644
--- a/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -122,12 +122,14 @@ public:
virtual bool handleInputEvent(const WebInputEvent&) { return true; }
virtual void mouseCaptureLost() { }
virtual void setFocus(bool) { }
- virtual bool handleCompositionEvent(WebCompositionCommand command,
- int cursorPosition,
- int targetStart,
- int targetEnd,
- const WebString& text) { return true; }
- virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) { return true; }
+ virtual bool setComposition(
+ const WebString& text,
+ const WebVector<WebCompositionUnderline>& underlines,
+ int selectionStart,
+ int selectionEnd) { return true; }
+ virtual bool confirmComposition() { return true; }
+ virtual WebTextInputType textInputType() { return WebKit::WebTextInputTypeNone; }
+ virtual WebRect caretOrSelectionBounds() { return WebRect(); }
virtual void setTextDirection(WebTextDirection) { }
};
@@ -167,7 +169,7 @@ public:
protected:
virtual void SetUp()
{
- m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient));
+ m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient, 0));
m_webView->initializeMainFrame(&m_webFrameClient);
m_popupMenu = PopupMenu::create(&m_popupMenuClient);
}