Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Issue 11612021: Revert 137939 (Closed)

Created:
8 years ago by kerz_chromium
Modified:
8 years ago
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Visibility:
Public.

Description

Revert 137939 > Add support for tracking hit test rectangles to enable fast event rejection in the compositor > https://bugs.webkit.org/show_bug.cgi?id=103914 > > Reviewed by James Robinson. > > Source/WebCore: > > Adding support for tracking hit test target regions for the purpose of performing initial hit testing > in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that > aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main > thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event > region. This patch includes the implementation to turn this on in Chromium. > > To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers > instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor > when new touch event handlers are registered or removed, or after layout much like how > nonFastScrollableRegions are currently tracked. > > This implementation will not properly update the hit test rects when the renderers are inside a sub- > tree that scrolls. > > This change was initially rolled out due to stale Node pointers in Document's touchEventTargets. This > patch adds a callback to remove the Node from that structure to Node's destructor. This is covered > by the touch-target-removed-crash.html test case which is also added. > > Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html > platform/chromium/fast/events/touch/touch-target-removed-crash.html > > * dom/Document.cpp: > (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets > are stored as the Document they point to. > (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and > to update the ScrollingCoordinator with the change. > (WebCore::Document::didRemoveTouchEventHandler): Ditto. > * dom/Document.h: > (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so > expose whether there are any or not. > (WebCore::Document::touchEventTargets): > * dom/Node.cpp: > (WebCore::Node::didMoveToNewDocument): > (WebCore::tryAddEventListener): > (WebCore::tryRemoveEventListener): > * history/CachedFrame.cpp: > (WebCore::CachedFrameBase::restore): > * html/HTMLInputElement.cpp: > (WebCore::HTMLInputElement::~HTMLInputElement): > (WebCore::HTMLInputElement::updateType): > * page/DOMWindow.cpp: > (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow. > (WebCore::DOMWindow::removeEventListener): > * page/EventHandler.cpp: > (WebCore::EventHandler::handleTouchEvent): > * page/Frame.cpp: > (WebCore::Frame::setDocument): > * page/scrolling/ScrollingCoordinator.cpp: > (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler > nodes and generate the absolute hit testing rects. > * page/scrolling/ScrollingCoordinator.h: > (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to > the scrolling tree/compositor. > (ScrollingCoordinator): > * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: > (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated): > (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged): > (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion): > (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects): > * page/scrolling/chromium/ScrollingCoordinatorChromium.h: > (ScrollingCoordinatorChromium): > * testing/Internals.cpp: > (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since > it's no longer stored as an int in Document. > (WebCore::Internals::touchEventTargetClientRects): > * testing/Internals.h: > (Internals): > * testing/Internals.idl: > > Source/WebKit/chromium: > > Enabling touch event target region tracking. > > * features.gypi: > * src/WebPluginContainerImpl.cpp: > (WebKit::WebPluginContainerImpl::requestTouchEventType): > (WebKit::WebPluginContainerImpl::~WebPluginContainerImpl): > > LayoutTests: > > * platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Added. > * platform/chromium/fast/events/touch/compositor-touch-hit-rects.html: Added. > * platform/chromium/fast/events/touch/touch-target-removed-crash-expected.txt: Added. > * platform/chromium/fast/events/touch/touch-target-removed-crash.html: Added. > TBR=leviw@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138021

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -597 lines) Patch
MM LayoutTests/ChangeLog View 1 chunk +0 lines, -12 lines 0 comments Download
D LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html View 1 chunk +0 lines, -200 lines 0 comments Download
D LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt View 1 chunk +0 lines, -46 lines 0 comments Download
D LayoutTests/platform/chromium/fast/events/touch/touch-target-removed-crash.html View 1 chunk +0 lines, -25 lines 0 comments Download
D LayoutTests/platform/chromium/fast/events/touch/touch-target-removed-crash-expected.txt View 1 chunk +0 lines, -1 line 0 comments Download
M Source/WebCore/ChangeLog View 1 chunk +0 lines, -76 lines 0 comments Download
M Source/WebCore/dom/Document.h View 3 chunks +5 lines, -17 lines 0 comments Download
M Source/WebCore/dom/Document.cpp View 3 chunks +13 lines, -46 lines 0 comments Download
M Source/WebCore/dom/Node.cpp View 4 chunks +5 lines, -10 lines 0 comments Download
M Source/WebCore/history/CachedFrame.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/html/HTMLInputElement.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/WebCore/page/DOMWindow.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebCore/page/EventHandler.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebCore/page/Frame.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/page/scrolling/ScrollingCoordinator.h View 3 chunks +0 lines, -7 lines 0 comments Download
M Source/WebCore/page/scrolling/ScrollingCoordinator.cpp View 2 chunks +0 lines, -52 lines 0 comments Download
M Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.h View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp View 2 chunks +0 lines, -36 lines 0 comments Download
M Source/WebCore/testing/Internals.h View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/WebCore/testing/Internals.cpp View 2 chunks +1 line, -32 lines 0 comments Download
M Source/WebCore/testing/Internals.idl View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/WebKit/chromium/ChangeLog View 1 chunk +0 lines, -14 lines 0 comments Download
M Source/WebKit/chromium/features.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M Source/WebKit/chromium/src/WebPluginContainerImpl.cpp View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
kerz_chromium
8 years ago (2012-12-18 15:51:05 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698