DescriptionGesture event hit test refactoring and reduction
This CL reduces the number of hit tests in trivial tap scenarios from 15
to 9. Later CLs will push GestureEventWithHitTestResults up to
WebViewImpl, down to synthetic mouse events, and attempt to share hit
test results across some event types (further reducing from 9 down to 2
or 3).
GestureEvents fall into two categories that are handled very differently
today for hit-testing purposes: scroll events and non-scroll events.
Scroll events do per-frame hit-tests and propagate across EventHandler
instances from the outer-most frame to the inner-most (because they may
do some work for scroll bubbling at each frame). Non-scroll events do a
global hit-test and jump directly to the inner most frame. Make this
confusing distinction more explicit.
Then consolidate non-scroll GestureEvent hit-tests in blink core into a
single method: EventHandler::targetGestureEvent which returns a new
GestureEventWithHitTestResults type. Pass these "targeted events"
around blink instead of doing repeated hit tests.
Eliminate duplicate frame tree walk on most gesture hit tests.
Previously we'd do an initial hit test to find the right subframe and
EventHandler instance, then use EventHandler::hitTestResultAtPoint to
hit test from the main frame again all the way down.
This CL should not have any noticeable web-exposed behavior changes, but
it paves the road for future optimizations which will.
Mutate HitTestResult to make it reflect the results of touch adjustment
(effectively converting a rect-based test result to a point-based result
somewhere inside that rect). This makes it possible to use the same
code for gestures that do and don't do adjustment, avoids passing around
extra data, and makes bugs with using unadjusted points less likely.
Update touch- adjustment entry points to take a HitTestResult instead of
a point (which we'd then need to hit-test against again). Touch
adjustment tests still need to do hit tests here though.
Remove unused 'baseEventType' hack (synthetic mouse events have carried
a 'from touch' bit for awhile now that probably supercedes whatever this
was being used for).
Fix a bug with resize handle behavior in iframes not being consistent
with other resize handle behavior.
Includes a trivial tweak to FROM_HERE macro to be explicit about
namespace usage since it can be used both within and outside of WebCore
namespace contexts. This makes eclipse happy.
Fix WebViewImpl::handleInputEvent trace logging of event name.
BUG=381728
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177164
Patch Set 1 #Patch Set 2 : Working but not yet passing all tests #Patch Set 3 : Fix test failures #Patch Set 4 : Rework to fix a number of edge cases #Patch Set 5 : Cleanups #Patch Set 6 : Add expected test results #Patch Set 7 : Merge with trunk and include hit-test-count test results #Patch Set 8 : Remove aborted perf test (too noisy) #
Total comments: 2
Patch Set 9 : zeeshanq CR feedback #Patch Set 10 : Merge with trunk #
Total comments: 24
Patch Set 11 : Merge with trunk (no changes) #Patch Set 12 : Esprehn CR feedback #
Total comments: 1
Patch Set 13 : Fix release build #Messages
Total messages: 11 (0 generated)
|