Nested scroller not scrolled to url fragment anchor on reload |
|||||
Issue descriptionVersion: 55.0.2883.11 OS: Linux What steps will reproduce the problem? (1) Open the attached file (2) Click on one of the links to navigate to an anchor (3) Click refresh What is the expected output? The page should reload with the nested scroller at the same position What do you see instead? The page reloads with the scroller reset to 0 This appears to be a difference between reloading a page and navigating (Omnibox + Enter).
,
Dec 1 2016
,
Dec 5 2016
,
Dec 6 2016
,
Dec 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d072f7c3b55dbe96358cb9623dfce5e756bad54 commit 6d072f7c3b55dbe96358cb9623dfce5e756bad54 Author: chaopeng <chaopeng@chromium.org> Date: Tue Dec 06 19:22:07 2016 Ensure scrollToFragmentAnchor called before restoreScrollPositionAndViewState. This issue is caused by FrameLoader::restoreScrollPositionAndViewState being called by FrameView::setContentsSize when reloading. restoreScrollPositionAndViewState calls ScrollableArea::setScrollOffset which clears FrameView::m_fragmentAnchor so the DIV scroll to incorrect position. In this patch we move scrollToFragmentAnchor to setContentsSize before restoreScrollPositionAndViewState. BUG= 656658 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2541513004 Cr-Commit-Position: refs/heads/master@{#436682} [modify] https://crrev.com/6d072f7c3b55dbe96358cb9623dfce5e756bad54/content/browser/frame_host/navigation_controller_impl_browsertest.cc [add] https://crrev.com/6d072f7c3b55dbe96358cb9623dfce5e756bad54/content/test/data/navigation_controller/reload-with-url-anchor.html [modify] https://crrev.com/6d072f7c3b55dbe96358cb9623dfce5e756bad54/third_party/WebKit/Source/core/frame/FrameView.cpp
,
Dec 7 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bokan@chromium.org
, Oct 17 2016