diff options
Diffstat (limited to 'Source/WebKit/chromium/src')
-rw-r--r-- | Source/WebKit/chromium/src/ContextMenuClientImpl.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebFrameImpl.cpp | 32 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebFrameImpl.h | 7 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp | 9 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebIDBDatabaseImpl.h | 3 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebInputEventConversion.cpp | 4 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebPopupMenuImpl.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebSettingsImpl.cpp | 5 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebSettingsImpl.h | 1 | ||||
-rw-r--r-- | Source/WebKit/chromium/src/WebViewImpl.cpp | 5 |
11 files changed, 49 insertions, 23 deletions
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp index 5b0b01014..641a585a0 100644 --- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -160,7 +160,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( Frame* selectedFrame = r.innerNonSharedNode()->document()->frame(); WebContextMenuData data; - data.mousePosition = r.roundedPoint(); + data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint()); // Compute edit flags. data.editFlags = WebContextMenuData::CanDoNone; diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp index eb02351da..7bb0efeea 100644 --- a/Source/WebKit/chromium/src/WebFrameImpl.cpp +++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp @@ -1779,17 +1779,15 @@ void WebFrameImpl::scopeStringMatches(int identifier, const WebFindOptions& options, bool reset) { - if (!shouldScopeMatches(searchText)) - return; - WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); if (reset) { // This is a brand new search, so we need to reset everything. // Scoping is just about to begin. m_scopingComplete = false; + // Clear highlighting for this frame. - if (frame()->editor()->markedTextMatchesAreHighlighted()) + if (frame() && frame()->editor()->markedTextMatchesAreHighlighted()) frame()->page()->unmarkAllTextMatches(); // Clear the tickmarks and results cache. @@ -1812,6 +1810,14 @@ void WebFrameImpl::scopeStringMatches(int identifier, return; } + if (!shouldScopeMatches(searchText)) { + // Note that we want to defer the final update when resetting even if shouldScopeMatches returns false. + // This is done in order to prevent sending a final message based only on the results of the first frame + // since m_framesScopingCount would be 0 as other frames have yet to reset. + finishCurrentScopingEffort(identifier); + return; + } + RefPtr<Range> searchRange(rangeOfContents(frame()->document())); Node* originalEndContainer = searchRange->endContainer(); @@ -1938,10 +1944,18 @@ void WebFrameImpl::scopeStringMatches(int identifier, return; // Done for now, resume work later. } + finishCurrentScopingEffort(identifier); +} + +void WebFrameImpl::finishCurrentScopingEffort(int identifier) +{ + WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); + // This frame has no further scoping left, so it is done. Other frames might, // of course, continue to scope matches. m_scopingComplete = true; mainFrameImpl->m_framesScopingCount--; + m_lastFindRequestCompletedWithNoMatches = !m_lastMatchCount; // If this is the last frame to finish scoping we need to trigger the final // update to be sent. @@ -1958,6 +1972,9 @@ void WebFrameImpl::cancelPendingScopingEffort() m_deferredScopingWork.clear(); m_activeMatchIndexInCurrentFrame = -1; + + if (!m_scopingComplete) + m_lastFindRequestCompletedWithNoMatches = false; } void WebFrameImpl::increaseMatchCount(int count, int identifier) @@ -2330,6 +2347,7 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client) , m_totalMatchCount(-1) , m_framesScopingCount(-1) , m_scopingComplete(false) + , m_lastFindRequestCompletedWithNoMatches(false) , m_nextInvalidateAfter(0) , m_findMatchMarkersVersion(0) , m_findMatchRectsAreValid(false) @@ -2612,9 +2630,9 @@ int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const bool WebFrameImpl::shouldScopeMatches(const String& searchText) { - // Don't scope if we can't find a frame or a view or if the frame is not visible. + // Don't scope if we can't find a frame or a view. // The user may have closed the tab/application, so abort. - if (!frame() || !frame()->view() || !hasVisibleContent()) + if (!frame() || !frame()->view()) return false; ASSERT(frame()->document() && frame()->view()); @@ -2622,7 +2640,7 @@ bool WebFrameImpl::shouldScopeMatches(const String& searchText) // If the frame completed the scoping operation and found 0 matches the last // time it was searched, then we don't have to search it again if the user is // just adding to the search string or sending the same search string again. - if (m_scopingComplete && !m_lastSearchString.isEmpty() && !m_lastMatchCount) { + if (m_lastFindRequestCompletedWithNoMatches && !m_lastSearchString.isEmpty()) { // Check to see if the search string prefixes match. String previousSearchPrefix = searchText.substring(0, m_lastSearchString.length()); diff --git a/Source/WebKit/chromium/src/WebFrameImpl.h b/Source/WebKit/chromium/src/WebFrameImpl.h index e59c932c5..58525d701 100644 --- a/Source/WebKit/chromium/src/WebFrameImpl.h +++ b/Source/WebKit/chromium/src/WebFrameImpl.h @@ -385,6 +385,9 @@ private: // was searched. bool shouldScopeMatches(const WTF::String& searchText); + // Finishes the current scoping effort and triggers any updates if appropriate. + void finishCurrentScopingEffort(int identifier); + // Queue up a deferred call to scopeStringMatches. void scopeStringMatchesSoon( int identifier, const WebString& searchText, const WebFindOptions&, @@ -456,6 +459,10 @@ private: // interrupt it before it completes by submitting a new search). bool m_scopingComplete; + // Keeps track of whether the last find request completed its scoping effort + // without finding any matches in this frame. + bool m_lastFindRequestCompletedWithNoMatches; + // Keeps track of when the scoping effort should next invalidate the scrollbar // and the frame area. int m_nextInvalidateAfter; diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp index 52879a9a7..b58cd5111 100644 --- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp +++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.cpp @@ -48,7 +48,6 @@ namespace WebKit { WebIDBDatabaseImpl::WebIDBDatabaseImpl(PassRefPtr<IDBDatabaseBackendInterface> databaseBackend, WTF::PassRefPtr<IDBDatabaseCallbacksProxy> databaseCallbacks) : m_databaseBackend(databaseBackend) , m_databaseCallbacks(databaseCallbacks) - , m_closePending(false) { } @@ -96,19 +95,15 @@ void WebIDBDatabaseImpl::close() { // Use the callbacks passed in to the constructor so that the backend in // multi-process chromium knows which database connection is closing. - if (!m_databaseCallbacks) { - m_closePending = true; + if (!m_databaseCallbacks) return; - } m_databaseBackend->close(m_databaseCallbacks.release()); } void WebIDBDatabaseImpl::forceClose() { - if (!m_databaseCallbacks) { - m_closePending = true; + if (!m_databaseCallbacks) return; - } RefPtr<IDBDatabaseCallbacksProxy> callbacks = m_databaseCallbacks.release(); m_databaseBackend->close(callbacks); callbacks->onForcedClose(); diff --git a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h index 9cd1caf59..518ffcdb9 100644 --- a/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h +++ b/Source/WebKit/chromium/src/WebIDBDatabaseImpl.h @@ -62,9 +62,6 @@ public: private: WTF::RefPtr<WebCore::IDBDatabaseBackendInterface> m_databaseBackend; WTF::RefPtr<IDBDatabaseCallbacksProxy> m_databaseCallbacks; - // FIXME: Remove this flag when we consolidate two-phase open. - // http://wkb.ug/90411 - bool m_closePending; }; } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebInputEventConversion.cpp b/Source/WebKit/chromium/src/WebInputEventConversion.cpp index 2afc7dcfe..0cc1e0c24 100644 --- a/Source/WebKit/chromium/src/WebInputEventConversion.cpp +++ b/Source/WebKit/chromium/src/WebInputEventConversion.cpp @@ -160,6 +160,10 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W break; case WebInputEvent::GestureTapDown: m_type = PlatformEvent::GestureTapDown; + m_area = IntSize(e.data.tapDown.width, e.data.tapDown.height); + break; + case WebInputEvent::GestureTapCancel: + m_type = PlatformEvent::GestureTapDownCancel; break; case WebInputEvent::GestureDoubleTap: m_type = PlatformEvent::GestureDoubleTap; diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp index bb898c966..760cc6835 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp @@ -195,6 +195,8 @@ void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const stats.droppedFrameCount = ccStats.droppedFrameCount; stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; + stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; + stats.totalCommitCount = ccStats.totalCommitCount; } void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectTable[128], int fontHeight) diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp index 58a2855cd..51114020b 100644 --- a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp +++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp @@ -277,6 +277,7 @@ bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent) case WebInputEvent::GestureFlingCancel: case WebInputEvent::GestureTap: case WebInputEvent::GestureTapDown: + case WebInputEvent::GestureTapCancel: case WebInputEvent::GestureDoubleTap: case WebInputEvent::GestureTwoFingerTap: case WebInputEvent::GestureLongPress: @@ -288,7 +289,6 @@ bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent) case WebInputEvent::Undefined: case WebInputEvent::MouseEnter: case WebInputEvent::ContextMenu: - case WebInputEvent::GestureTapCancel: return false; } return false; diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp index 51731fd8f..4cc3ef727 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp @@ -337,6 +337,11 @@ void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled) m_settings->setWebGLEnabled(enabled); } +void WebSettingsImpl::setCSSStickyPositionEnabled(bool enabled) +{ + m_settings->setCSSStickyPositionEnabled(enabled); +} + void WebSettingsImpl::setExperimentalCSSRegionsEnabled(bool enabled) { m_settings->setCSSRegionsEnabled(enabled); diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h index a5f7c0235..e9e01bfcd 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.h +++ b/Source/WebKit/chromium/src/WebSettingsImpl.h @@ -85,6 +85,7 @@ public: virtual void setEnableScrollAnimator(bool); virtual void setExperimentalCSSCustomFilterEnabled(bool); virtual void setExperimentalCSSGridLayoutEnabled(bool); + virtual void setCSSStickyPositionEnabled(bool); virtual void setExperimentalCSSRegionsEnabled(bool); virtual void setExperimentalCSSVariablesEnabled(bool); virtual void setExperimentalWebGLEnabled(bool); diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp index d18cd236c..97416e024 100644 --- a/Source/WebKit/chromium/src/WebViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebViewImpl.cpp @@ -765,15 +765,12 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) m_client->cancelScheduledContentIntents(); case WebInputEvent::GestureScrollEnd: case WebInputEvent::GestureScrollUpdate: + case WebInputEvent::GestureTapCancel: case WebInputEvent::GesturePinchEnd: case WebInputEvent::GesturePinchUpdate: { PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event); return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent); } - case WebInputEvent::GestureTapCancel: - // FIXME: Update WebCore to handle this event after chromium has been updated to send it - // http://wkb.ug/96060 - return false; default: ASSERT_NOT_REACHED(); } |