Bug 104947

Summary: Send a message from WebViewImpl to the compositor to inform about end of flings
Product: WebKit Reporter: yusufo
Component: New BugsAssignee: yusufo
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, aelias, dglazkov, fishd, jamesr, klobag, noel.gordon, rjkroege, tkent+wkapi, webkit.review.bot, yusufo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 105067    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

yusufo
Reported 2012-12-13 13:53:08 PST
Send a message from WebViewImpl to the compositor to inform about end of flings
Attachments
Patch (8.27 KB, patch)
2012-12-13 13:56 PST, yusufo
no flags
Patch (8.27 KB, patch)
2012-12-13 14:37 PST, yusufo
no flags
Patch (8.36 KB, patch)
2012-12-13 15:17 PST, yusufo
no flags
Patch (8.40 KB, patch)
2012-12-13 15:48 PST, yusufo
no flags
Patch (8.51 KB, patch)
2012-12-14 11:33 PST, yusufo
no flags
Patch (10.02 KB, patch)
2012-12-14 17:00 PST, yusufo
no flags
yusufo
Comment 1 2012-12-13 13:56:22 PST
yusufo
Comment 2 2012-12-13 14:37:45 PST
James Robinson
Comment 3 2012-12-13 14:45:41 PST
Comment on attachment 179329 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=179329&action=review I swear I put this feedback up earlier but must have imagined it or a gremlin ate it. Logic looks sound, needs a bit of naming love methinks > Source/Platform/chromium/public/WebLayerTreeView.h:162 > + virtual void mainThreadHasStoppedFlinging() { }; no trailing ; the "mainThread" part of this isn't very informative - this API (WebLayerTreeView) is single threaded, so all calls on it are on the main thread. maybe "didStopFlinging" or something like that? > Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.h:102 > + bool m_flingActiveOnMainThread; you should note either in the variable name or some clear comments that this is conservative - i.e. if this is false, we know definitely that the main thread is not flinging, but if it is true the main thread may or may not be flinging
yusufo
Comment 4 2012-12-13 15:00:28 PST
How about using didStopFlinging for WebLayerTreeView and web_layer_tree_view_impl and using either mainThreadHasStoppedFLinging or mainHasStoppedFlinging starting from and including layer_tree_host? I feel like when it gets to the input handler we should have some mention of it not being a fling on the compositor, but not sure where to make the name switch.
James Robinson
Comment 5 2012-12-13 15:06:22 PST
(In reply to comment #4) > How about using didStopFlinging for WebLayerTreeView Sounds good > and web_layer_tree_view_impl soungs good > and using either mainThreadHasStoppedFLinging or mainHasStoppedFlinging starting from and including layer_tree_host? I feel like when it gets to the input handler we should have some mention of it not being a fling on the compositor, but not sure where to make the name switch. Yeah, we should definitely flip names once we switch threads. Maybe have the call to the proxy be the switching point?
yusufo
Comment 6 2012-12-13 15:17:28 PST
James Robinson
Comment 7 2012-12-13 15:19:27 PST
Comment on attachment 179351 [details] Patch R=me
James Robinson
Comment 8 2012-12-13 15:19:39 PST
Guess this means we have to iterate again on the chromium side - sorry about that.
yusufo
Comment 9 2012-12-13 15:25:00 PST
Uploaded the chromium side changes. Looks like I will have to wait for the other change in WebCompositorInputHandlerImpl to be gardened in anyway.
yusufo
Comment 10 2012-12-13 15:48:07 PST
yusufo
Comment 11 2012-12-13 15:55:57 PST
I think my local repo is up to date now. jamesr@ would you mind giving this a final review and pushing it to the CQ whenever possible?
James Robinson
Comment 12 2012-12-13 15:57:51 PST
Comment on attachment 179358 [details] Patch R+ CQ- for now, will set CQ once the chromium-side implementation of WebInputHandler has landed (and please remind me if I forget).
yusufo
Comment 13 2012-12-13 16:22:05 PST
(In reply to comment #12) > (From update of attachment 179358 [details]) > R+ CQ- for now, will set CQ once the chromium-side implementation of WebInputHandler has landed (and please remind me if I forget). I think this one has to go in first? The change to WebInputHandler won't be an issue, since WebCompositorInputHandlerImpl is the one extending that. WebToCCInputHandlerAdapter extends InputHandler and own a WebInputHandler. So I can't land the chromium side if WebInputHandler mainThreadHasStoppedFLinginng is not there yet.
WebKit Review Bot
Comment 14 2012-12-13 16:51:09 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
WebKit Review Bot
Comment 15 2012-12-13 17:21:10 PST
Comment on attachment 179358 [details] Patch Attachment 179358 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15311478 New failing tests: accessibility/aria-checkbox-checked.html animations/3d/matrix-transform-type-animation.html http/tests/appcache/cyrillic-uri.html accessibility/anchor-linked-anonymous-block-crash.html animations/animation-add-events-in-handler.html http/tests/appcache/deferred-events-delete-while-raising.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html http/tests/appcache/deferred-events-delete-while-raising-timer.html accessibility/aria-disabled.html http/tests/appcache/crash-when-navigating-away-then-back.html animations/animation-border-overflow.html animations/animation-direction-alternate-reverse.html accessibility/accessibility-object-detached.html http/tests/appcache/abort-cache-ondownloading-manifest-404.html http/tests/appcache/credential-url.html animations/animation-controller-drt-api.html animations/3d/change-transform-in-end-event.html canvas/philip/tests/2d.canvas.readonly.html animations/3d/transform-perspective.html accessibility/accessibility-node-reparent.html http/tests/appcache/access-via-redirect.php http/tests/appcache/deferred-events.html animations/3d/state-at-end-event-transform.html animations/animation-direction-normal.html animations/3d/transform-origin-vs-functions.html accessibility/accessibility-node-memory-management.html animations/animation-css-rule-types.html accessibility/adjacent-continuations-cause-assertion-failure.html accessibility/aria-describedby-on-input.html
yusufo
Comment 16 2012-12-13 18:09:58 PST
Yes, I just verified locally that this one is building by itself(the linux failure for tests is a flake?) and the chromium side one doesn't pass without the WebInputHandler.h change here.
James Robinson
Comment 17 2012-12-13 21:20:29 PST
Comment on attachment 179358 [details] Patch Oh yes! Quite right.
WebKit Review Bot
Comment 18 2012-12-13 22:22:31 PST
Comment on attachment 179358 [details] Patch Rejecting attachment 179358 [details] from commit-queue. New failing tests: accessibility/aria-checkbox-checked.html animations/3d/matrix-transform-type-animation.html http/tests/appcache/cyrillic-uri.html accessibility/anchor-linked-anonymous-block-crash.html animations/animation-add-events-in-handler.html http/tests/appcache/deferred-events-delete-while-raising.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html http/tests/appcache/deferred-events-delete-while-raising-timer.html accessibility/aria-disabled.html http/tests/appcache/crash-when-navigating-away-then-back.html animations/animation-border-overflow.html animations/animation-direction-alternate-reverse.html accessibility/accessibility-object-detached.html http/tests/appcache/abort-cache-ondownloading-manifest-404.html http/tests/appcache/credential-url.html animations/animation-controller-drt-api.html animations/3d/change-transform-in-end-event.html canvas/philip/tests/2d.canvas.readonly.html animations/3d/transform-perspective.html accessibility/accessibility-node-reparent.html http/tests/appcache/access-via-redirect.php http/tests/appcache/deferred-events.html animations/3d/state-at-end-event-transform.html animations/animation-direction-normal.html animations/3d/transform-origin-vs-functions.html accessibility/accessibility-node-memory-management.html animations/animation-css-rule-types.html accessibility/adjacent-continuations-cause-assertion-failure.html accessibility/aria-describedby-on-input.html Full output: http://queues.webkit.org/results/15311546
yusufo
Comment 19 2012-12-13 22:38:44 PST
Can't really tell if the issue is a bot failure/tree breakage but I see "DumpRenderTree crash" on all test failures. Maybe this one will also need to be manually landed?
WebKit Review Bot
Comment 20 2012-12-14 11:02:03 PST
Comment on attachment 179358 [details] Patch Rejecting attachment 179358 [details] from commit-queue. New failing tests: accessibility/aria-checkbox-checked.html animations/3d/matrix-transform-type-animation.html http/tests/appcache/cyrillic-uri.html accessibility/anchor-linked-anonymous-block-crash.html animations/animation-add-events-in-handler.html http/tests/appcache/deferred-events-delete-while-raising.html animations/additive-transform-animations.html animations/3d/replace-filling-transform.html http/tests/appcache/deferred-events-delete-while-raising-timer.html accessibility/aria-disabled.html http/tests/appcache/crash-when-navigating-away-then-back.html animations/animation-border-overflow.html animations/animation-direction-alternate-reverse.html accessibility/accessibility-object-detached.html http/tests/appcache/abort-cache-ondownloading-manifest-404.html http/tests/appcache/credential-url.html http/tests/appcache/access-via-redirect.php animations/3d/change-transform-in-end-event.html animations/animation-controller-drt-api.html animations/3d/transform-perspective.html accessibility/accessibility-node-reparent.html http/tests/appcache/deferred-events.html animations/3d/state-at-end-event-transform.html animations/animation-direction-normal.html animations/3d/transform-origin-vs-functions.html accessibility/accessibility-node-memory-management.html animations/animation-css-rule-types.html animations/animation-direction-reverse-fill-mode-hardware.html accessibility/adjacent-continuations-cause-assertion-failure.html accessibility/aria-describedby-on-input.html Full output: http://queues.webkit.org/results/15316789
James Robinson
Comment 21 2012-12-14 11:18:14 PST
Comment on attachment 179358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=179358&action=review > Source/WebKit/chromium/src/WebViewImpl.cpp:710 > + m_layerTreeView->didStopFlinging(); or maybe DRT is actually crashing - you need to null check m_layerTreeView here and other places before you deref it
yusufo
Comment 22 2012-12-14 11:32:15 PST
(In reply to comment #21) > (From update of attachment 179358 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=179358&action=review > > > Source/WebKit/chromium/src/WebViewImpl.cpp:710 > > + m_layerTreeView->didStopFlinging(); > > or maybe DRT is actually crashing - you need to null check m_layerTreeView here and other places before you deref it Ooops! Yes, I think the one in didCommitLoad was the one biting me. Uploaded another patch with null checks. But it is possible for it to be non-null in didCommitLoad right? Or should I not even bother calling it there?
yusufo
Comment 23 2012-12-14 11:33:15 PST
James Robinson
Comment 24 2012-12-14 12:37:43 PST
Comment on attachment 179505 [details] Patch I think it's possible for m_layerTreeView to be null in any of these calls.
WebKit Review Bot
Comment 25 2012-12-14 13:18:11 PST
Comment on attachment 179505 [details] Patch Clearing flags on attachment: 179505 Committed r137765: <http://trac.webkit.org/changeset/137765>
WebKit Review Bot
Comment 26 2012-12-14 13:18:16 PST
All reviewed patches have been landed. Closing bug.
noel gordon
Comment 27 2012-12-14 14:47:46 PST
webkit-unit-tests began failing with the patch I think. http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/42406 [----------] Global test environment tear-down [==========] 490 tests from 63 test cases ran. (7061 ms total) [ PASSED ] 485 tests. [ FAILED ] 5 tests, listed below: [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchpad [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingAnimatesTouchpad [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingTransferResetsTouchpad [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchscreen [ FAILED ] WebCompositorInputHandlerImplTest.lastInputEventForVSync Expected?
yusufo
Comment 28 2012-12-14 14:56:18 PST
(In reply to comment #27) > webkit-unit-tests began failing with the patch I think. > > http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/42406 > > [----------] Global test environment tear-down > [==========] 490 tests from 63 test cases ran. (7061 ms total) > [ PASSED ] 485 tests. > [ FAILED ] 5 tests, listed below: > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingAnimatesTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingTransferResetsTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchscreen > [ FAILED ] WebCompositorInputHandlerImplTest.lastInputEventForVSync > > Expected? It might be. This has a chromium side change that is waiting for this to be gardened in. https://codereview.chromium.org/11565022/ (In reply to comment #27) > webkit-unit-tests began failing with the patch I think. > > http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/42406 > > [----------] Global test environment tear-down > [==========] 490 tests from 63 test cases ran. (7061 ms total) > [ PASSED ] 485 tests. > [ FAILED ] 5 tests, listed below: > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingAnimatesTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingTransferResetsTouchpad > [ FAILED ] WebCompositorInputHandlerImplTest.gestureFlingIgnoredTouchscreen > [ FAILED ] WebCompositorInputHandlerImplTest.lastInputEventForVSync > > Expected? Yes, it looks like I missed to update expected results on some of the tests. Would you like to roll this back or should I upload another one that fixes the test expectations?
James Robinson
Comment 29 2012-12-14 15:03:02 PST
Hmm, I wonder why cr-linux was green, then. We need this patch to land the chromium side, so I think updating or suppressing the test failures for now is the only option.
yusufo
Comment 30 2012-12-14 15:24:40 PST
Uploaded https://bugs.webkit.org/process_bug.cgi Testing locally to verify
yusufo
Comment 31 2012-12-14 15:46:31 PST
Tested and verified https://bugs.webkit.org/show_bug.cgi?id=105059 resolves these issues.
WebKit Review Bot
Comment 32 2012-12-14 16:25:05 PST
Re-opened since this is blocked by bug 105067
James Robinson
Comment 33 2012-12-14 16:26:08 PST
There are real bugs uncovered by the tests, we're gonna roll out and try again more carefully.
yusufo
Comment 34 2012-12-14 17:00:16 PST
WebKit Review Bot
Comment 35 2012-12-14 18:29:58 PST
Comment on attachment 179560 [details] Patch Clearing flags on attachment: 179560 Committed r137793: <http://trac.webkit.org/changeset/137793>
WebKit Review Bot
Comment 36 2012-12-14 18:30:04 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.