New issue
Advanced search Search tips

Issue 656658 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Nested scroller not scrolled to url fragment anchor on reload

Project Member Reported by bokan@chromium.org, Oct 17 2016

Issue description

Version: 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).

 
index.html
1.3 KB View Download
hash-test.mov
6.8 MB Download

Comment 1 by bokan@chromium.org, Oct 17 2016

chaopeng@, lets take a look at this after we wrap up the scrollbar work.
Status: Started (was: Available)

Comment 3 by creis@chromium.org, Dec 5 2016

Cc: creis@chromium.org
Components: UI>Browser>Navigation
Labels: Reload
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment