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

Issue 11644048: Revert 138209 (Closed)

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

Description

Revert 138209 > Revert 138188 > > Merge 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 > > Review URL: https://codereview.chromium.org/11635024 > > TBR=leviw@chromium.org > Review URL: https://codereview.chromium.org/11644037 TBR=kerz@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138266

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -32 lines) Patch
M LayoutTests/ChangeLog View 1 chunk +12 lines, -0 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/touch-target-removed-crash.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/touch-target-removed-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/ChangeLog View 1 chunk +76 lines, -0 lines 0 comments Download
M Source/WebCore/dom/Document.h View 3 chunks +17 lines, -5 lines 0 comments Download
M Source/WebCore/dom/Document.cpp View 3 chunks +46 lines, -13 lines 0 comments Download
M Source/WebCore/dom/Node.cpp View 4 chunks +10 lines, -5 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 +7 lines, -0 lines 0 comments Download
M Source/WebCore/page/scrolling/ScrollingCoordinator.cpp View 2 chunks +52 lines, -0 lines 0 comments Download
M Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.h View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp View 2 chunks +36 lines, -0 lines 0 comments Download
M Source/WebCore/testing/Internals.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebCore/testing/Internals.cpp View 2 chunks +32 lines, -1 line 0 comments Download
M Source/WebCore/testing/Internals.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/ChangeLog View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/features.gypi View 1 chunk +1 line, -0 lines 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-20 18:17:16 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698