[Webkit-unassigned] [Bug 244895] Page scrolls to anchor when updating a style element via ECMAScript and a link element was dynamically added on DOMContentReady

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 21:15:46 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244895

--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
The unwanted scroll is triggered by `Document::didRemoveAllPendingStylesheet()` in this stack:

    frame #2: 0x00000005e4c545db WebCore`WebCore::FrameView::setScrollPosition(this=0x00000005d20000b0, scrollPosition={ x = 0, y = 8139 }, options=0x00007ff7b8d55638) at FrameView.cpp:2361:21
    frame #3: 0x00000005e4c675bc WebCore`WebCore::FrameView::scrollRectToVisibleInTopLevelView(this=0x00000005d20000b0, absoluteRect={ x = 8px (512), y = 8139.03px (520898), width = 600px (38400), height = 138px (8832) }, insideFixed=false, options=0x00007ff7b8d55860) at FrameView.cpp:2604:9
    frame #4: 0x00000005e4c66f0e WebCore`WebCore::FrameView::scrollRectToVisible(absoluteRect={ x = 8px (512), y = 8139.03px (520898), width = 600px (38400), height = 138px (8832) }, renderer=0x00000005d2011f80, insideFixed=false, options=0x00007ff7b8d55860) at FrameView.cpp:2502:19
    frame #5: 0x00000005e4c66406 WebCore`WebCore::FrameView::scrollToAnchor(this=0x00000005d20000b0) at FrameView.cpp:3465:9
    frame #6: 0x00000005e4c6606b WebCore`WebCore::FrameView::maintainScrollPositionAtAnchor(this=0x00000005d20000b0, anchorNode=0x00000005d2026510) at FrameView.cpp:2326:9
    frame #7: 0x00000005e4c65ca7 WebCore`WebCore::FrameView::scrollToFragmentInternal(this=0x00000005d20000b0, fragmentIdentifier={ length = 3, contents = 'foo' }) at FrameView.cpp:2293:5
    frame #8: 0x00000005e4c6552f WebCore`WebCore::FrameView::scrollToFragment(this=0x00000005d20000b0, url={ https://jrivera-projects.s3.amazonaws.com/safari-bug/index.html#foo }) at FrameView.cpp:2246:9
    frame #9: 0x00000005e3f1d7ff WebCore`WebCore::Document::didRemoveAllPendingStylesheet(this=0x000000059b147f48)::$_11::operator()() const at Document.cpp:3820:24
    frame #10: 0x00000005e3f1d6c9 WebCore`WTF::Detail::CallableWrapper<WebCore::Document::didRemoveAllPendingStylesheet()::$_11, void>::call(this=0x000000059b147f40) at Function.h:53:39
    frame #11: 0x00000005e0a29872 WebCore`WTF::Function<void ()>::operator(this=0x000000059b1296a0)() const at Function.h:82:35
    frame #12: 0x00000005e3fcf329 WebCore`WebCore::EventLoopFunctionDispatchTask::execute(this=0x000000059b129680) at EventLoop.cpp:159:28
    frame #13: 0x00000005e3fc1ad0 WebCore`WebCore::EventLoop::run(this=0x000000059b05ca90) at EventLoop.cpp:123:19
    frame #14: 0x00000005e412d286 WebCore`WebCore::WindowEventLoop::didReachTimeToRun(this=0x000000059b05ca90) at WindowEventLoop.cpp:121:5
    frame #15: 0x00000005e4130169 WebCore`decltype(__f=0x000000059b156d08, __a0=0x000000059b156d18)).*fp()) std::__1::__invoke<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&, void>(void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) at type_traits:3859:1
    frame #16: 0x00000005e41300ed WebCore`std::__1::__bind_return<void (WebCore::WindowEventLoop::*)(), std::__1::tuple<WebCore::WindowEventLoop*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::WindowEventLoop::*)(), std::__1::tuple<WebCore::WindowEventLoop*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x000000059b156d08, __bound_args=size=1, (null)=__tuple_indices<0> @ 0x00007ff7b8d55fc8, __args=size=0)(), std::__1::tuple<WebCore::WindowEventLoop*>, 0ul, std::__1::tuple<> >(void (WebCore::WindowEventLoop::*&)(), std::__1::tuple<WebCore::WindowEventLoop*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at bind.h:257:12
    frame #17: 0x00000005e41300a0 WebCore`std::__1::__bind_return<void (WebCore::WindowEventLoop::*)(), std::__1::tuple<WebCore::WindowEventLoop*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::WindowEventLoop::*)(), std::__1::tuple<WebCore::WindowEventLoop*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x000000059b156d08)(), WebCore::WindowEventLoop*>::operator()<>() at bind.h:292:20
    frame #18: 0x00000005e4130039 WebCore`WTF::Detail::CallableWrapper<std::__1::__bind<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*>, void>::call(this=0x000000059b156d00) at Function.h:53:39
    frame #19: 0x00000005e0a29872 WebCore`WTF::Function<void ()>::operator(this=0x000000059b05cb28)() const at Function.h:82:35
    frame #20: 0x00000005e0ad4df9 WebCore`WebCore::Timer::fired(this=0x000000059b05cb00) at Timer.h:135:9

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220908/a3bf928b/attachment-0001.htm>


More information about the webkit-unassigned mailing list