DCHECK firing in ScrollManager: startNode.layoutObject() |
||||
Issue descriptionLoading attached file with debug build of content_shell on Linux prints: [1:1:1005/164618:33897571481:FATAL:ScrollManager.cpp(84)] Check failed: startNode.layoutObject(). #0 0x7f30c56aeb1e base::debug::StackTrace::StackTrace() #1 0x7f30c571c95f logging::LogMessage::~LogMessage() #2 0x7f30bd751958 blink::ScrollManager::recomputeScrollChain() #3 0x7f30bd752112 blink::ScrollManager::customizedScroll() #4 0x7f30bd753070 blink::ScrollManager::handleGestureScrollEnd() #5 0x7f30bd7535c2 blink::ScrollManager::handleGestureScrollEvent() #6 0x7f30bd733732 blink::EventHandler::handleGestureScrollEvent() #7 0x7f30bff38038 blink::WebViewImpl::handleGestureEvent() #8 0x7f30bfe4fc17 blink::PageWidgetDelegate::handleInputEvent() #9 0x7f30bff39dbd blink::WebViewImpl::handleInputEvent() #10 0x7f30bff33a4c blink::WebViewFrameWidget::handleInputEvent() ...
,
Oct 6 2016
There's a few things going on here. The page blocks on external imports being loaded before doing layout/style so we haven't built the layout tree when the scrolls come in so that's why the DCHECK is firing here. This would normally be ok since the LayoutView should be available on the documentNode but we're actually trying to scroll the HTML element which doesn't yet have a LayoutObject. I think the reason we try to scroll HTML rather than #document is because of some ViewportScrollCallback special-cases where we fall back to documentElement (since it can have an applyScroll). We're missing a short-circuit in the case documentElement doesn't have a LayoutObject. I'll add that. More worryingly, it seems that we never get a GestureScrollBegin here. CC sees a ScrollBegin but Blink doesn't but the following ScrollUpdate and ScrollEnds are forwarded to Blink. This seems like a problem to me. Dave/Tim, is there a reason for this or is this a routing bug?
,
Oct 6 2016
PS, to repro you need to actually scroll while the page is loading. Once the scrollbar shows up scrolling works just fine.
,
Oct 6 2016
Additionally, in Blink, when we get a ScrollUpdate/End and don't yet have a target we go and do a hit test. That seems error prone to me. Now that we have wheel gestures, is there a reason we shouldn't limit hit testing to ScrollBegin?
,
Oct 7 2016
,
Oct 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/41c5c138b099891457c2e0cb965b8f24dacc403e commit 41c5c138b099891457c2e0cb965b8f24dacc403e Author: bokan <bokan@chromium.org> Date: Wed Oct 12 01:09:51 2016 Make sure we don't try scrolling a node without a LayoutObject Early out of Blink's scrolling code if there's no LayoutObject to scroll. BUG= 653327 Review-Url: https://codereview.chromium.org/2394263003 Cr-Commit-Position: refs/heads/master@{#424625} [modify] https://crrev.com/41c5c138b099891457c2e0cb965b8f24dacc403e/third_party/WebKit/Source/core/input/ScrollManager.cpp [modify] https://crrev.com/41c5c138b099891457c2e0cb965b8f24dacc403e/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [add] https://crrev.com/41c5c138b099891457c2e0cb965b8f24dacc403e/third_party/WebKit/Source/web/tests/data/display-none.html
,
Oct 12 2016
And I'm wondering why no one's responding to my questions :) +Dave/Tim, see comments 2-4.
,
Oct 12 2016
It is possible looking at the code that the gesture scroll begin is handled by the compositor but then when it goes to handled the gesture scroll update ScrollAnimated returns it can't handle it. https://cs.chromium.org/chromium/src/ui/events/blink/input_handler_proxy.cc?q=Input_handler_proxy.cc&sq=package:chromium&l=675 And then it could fall into the did_not_handle which will end up sending it to the main thread. I agree a GSU without a GSB is odd since the GSB should do the hit test.
,
Oct 12 2016
Ok, I've filed a new bug under Hotlist-CodeHealth ( issue 655143 ) to make sure GSUs are always framed by a GSB and GSE and to make sure we hit test only on GSB. The DCHECK in this bug should be fixed by the patch above.
,
Oct 12 2016
Thanks for the quick fix :) |
||||
►
Sign in to add a comment |
||||
Comment 1 by bokan@chromium.org
, Oct 6 2016Labels: Hotlist-Input-Dev
Owner: bokan@chromium.org
Status: Assigned (was: Unconfirmed)