Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)

Created:
3 years, 11 months ago by chaopeng
Modified:
3 years, 10 months ago
CC:
chromium-reviews, blink-reviews, loading-reviews_chromium.org, tyoshino+watch_chromium.org, gavinp+loader_chromium.org, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default This flaky is caused by |FrameLoader::restoreScrollPositionAndViewState| called before |FrameLoader::processFragment| in |checkCompleted| and restore from default. So we add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default. BUG=672545 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2628683003 Cr-Commit-Position: refs/heads/master@{#451111} Committed: https://chromium.googlesource.com/chromium/src/+/1033be6d096d430b3d1fe6439550448b2374ea4c

Patch Set 1 #

Patch Set 2 : Merge remote-tracking branch 'origin/master' into fix-672545 #

Patch Set 3 : for try bots #

Patch Set 4 : fix test #

Total comments: 1

Patch Set 5 : for dry run #

Patch Set 6 : revert test #

Total comments: 1

Patch Set 7 : Nate's Comment addressed #

Total comments: 6

Patch Set 8 : majidvp comment#33 addressed #

Total comments: 2

Patch Set 9 : for dry run #

Patch Set 10 : remove checkComplete call in loadInSameDocument #

Total comments: 2

Patch Set 11 : rebase #

Patch Set 12 : format #

Patch Set 13 : fix for test #

Patch Set 14 : add didSaveScrollState #

Patch Set 15 : add test #

Total comments: 6

Patch Set 16 : majid comment addressed #

Patch Set 17 : fix test #

Total comments: 5

Patch Set 18 : majid comment addressed #

Patch Set 19 : add dump file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -19 lines) Patch
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +36 lines, -3 lines 0 comments Download
M content/common/page_state_serialization.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M content/common/page_state_serialization.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +35 lines, -13 lines 0 comments Download
M content/common/page_state_serialization_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/history_serialization.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M content/test/data/navigation_controller/reload-with-url-anchor.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A content/test/data/page_state/serialized_v23.dat View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/HistoryItem.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/HistoryItem.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebHistoryItem.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebHistoryItem.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 108 (62 generated)
chaopeng
PTAL. Thank you. https://codereview.chromium.org/2628683003/diff/60001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2628683003/diff/60001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode648 third_party/WebKit/Source/core/loader/FrameLoader.cpp:648: processFragment(m_frame->document()->url(), NavigationToDifferentDocument); We need to keep ...
3 years, 11 months ago (2017-01-12 19:56:02 UTC) #16
bokan
This looks fine to me, but I'm wondering, could we just put processFragment and RestoreScrollPositionAndViewState ...
3 years, 11 months ago (2017-01-13 16:10:03 UTC) #21
Nate Chapin
On 2017/01/13 16:10:03, bokan wrote: > This looks fine to me, but I'm wondering, could ...
3 years, 11 months ago (2017-01-18 21:08:44 UTC) #22
chaopeng
bokan@ ptal. The way we "process fragment" is different in FrameView and FrameLoader so I ...
3 years, 11 months ago (2017-01-19 19:28:33 UTC) #27
Nate Chapin
https://codereview.chromium.org/2628683003/diff/100001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2628683003/diff/100001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1379 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1379: void FrameLoader::setScrollFromNavigation(const KURL* url, m_frame->document()->url() should be the correct ...
3 years, 11 months ago (2017-01-19 19:36:33 UTC) #28
chaopeng
Nate's Comment addressed. PTAL. Thank you.
3 years, 11 months ago (2017-01-23 14:39:21 UTC) #29
bokan
looks fine to me but I'll defer to japhet@ for the final stamp.
3 years, 11 months ago (2017-01-23 15:18:47 UTC) #30
majidvp
I think it is problematic that you are replacing all calls to |restoreScrollPositionAndViewState();| with |setScrollFromNavigation| ...
3 years, 11 months ago (2017-01-23 15:38:22 UTC) #31
chaopeng
On 2017/01/23 15:38:22, majidvp wrote: > I think it is problematic that you are replacing ...
3 years, 11 months ago (2017-01-23 16:14:21 UTC) #32
majidvp
https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode276 third_party/WebKit/Source/core/frame/FrameView.cpp:276: void FrameView::setScrollFromNavigation() { nit: please match the declaration order ...
3 years, 11 months ago (2017-01-24 21:53:52 UTC) #33
chaopeng
Updated, PTAL. Thank you. https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode277 third_party/WebKit/Source/core/frame/FrameView.cpp:277: scrollToFragmentAnchor(); On 2017/01/24 21:53:52, majidvp ...
3 years, 11 months ago (2017-01-25 15:22:38 UTC) #34
majidvp
https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2628683003/diff/120001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode277 third_party/WebKit/Source/core/frame/FrameView.cpp:277: scrollToFragmentAnchor(); On 2017/01/25 15:22:38, chaopeng wrote: > On 2017/01/24 ...
3 years, 11 months ago (2017-01-25 20:31:59 UTC) #35
chaopeng
Updated, PTAL. Thank you.
3 years, 11 months ago (2017-01-26 21:17:05 UTC) #40
Nate Chapin
https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (left): https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#oldcode883 third_party/WebKit/Source/core/loader/FrameLoader.cpp:883: checkCompleted(); Context: I suggested removing this, because updateForSameDocumentNavigation() will ...
3 years, 11 months ago (2017-01-26 21:25:36 UTC) #41
majidvp
https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (left): https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#oldcode883 third_party/WebKit/Source/core/loader/FrameLoader.cpp:883: checkCompleted(); On 2017/01/26 21:25:35, Nate Chapin wrote: > Context: ...
3 years, 11 months ago (2017-01-26 21:49:50 UTC) #42
Nate Chapin
On 2017/01/26 21:49:50, majidvp wrote: > https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp > File third_party/WebKit/Source/core/loader/FrameLoader.cpp (left): > > https://codereview.chromium.org/2628683003/diff/180001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#oldcode883 > ...
3 years, 11 months ago (2017-01-26 21:58:40 UTC) #43
majidvp
The patch lgtm. I was wondering if there is a need to have additional tests ...
3 years, 10 months ago (2017-01-30 16:46:53 UTC) #44
chaopeng
On 2017/01/30 16:46:53, majidvp wrote: > The patch lgtm. > > I was wondering if ...
3 years, 10 months ago (2017-01-30 17:11:47 UTC) #45
Nate Chapin
On 2017/01/30 17:11:47, chaopeng wrote: > On 2017/01/30 16:46:53, majidvp wrote: > > The patch ...
3 years, 10 months ago (2017-02-02 17:18:29 UTC) #46
majidvp
> LGTM if majidvp is happy with the state of testing. Based on what I ...
3 years, 10 months ago (2017-02-02 19:23:19 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628683003/180001
3 years, 10 months ago (2017-02-02 19:24:30 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/146405) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-02 19:26:36 UTC) #51
chaopeng
creis@, This is the patch for the flaky test NavigationControllerBrowserTest.ReloadWithUrlAnchor. PTAL. Thank you.
3 years, 10 months ago (2017-02-02 19:56:09 UTC) #54
chaopeng
alexmos@chromium.org: PTAL, Thank you.
3 years, 10 months ago (2017-02-02 20:00:52 UTC) #58
alexmos
LGTM
3 years, 10 months ago (2017-02-02 22:06:31 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628683003/220001
3 years, 10 months ago (2017-02-02 22:18:31 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/380770)
3 years, 10 months ago (2017-02-02 23:54:40 UTC) #64
chaopeng
Nate, PTAL.
3 years, 10 months ago (2017-02-08 21:24:00 UTC) #66
chaopeng
Change fix to " Add DidSaveScrollState flag to prevent restoreScrollPositionAndViewState restore from default". majidvp@ japhet@ ...
3 years, 10 months ago (2017-02-13 18:21:13 UTC) #71
majidvp
https://codereview.chromium.org/2628683003/diff/280001/content/common/page_state_serialization.cc File content/common/page_state_serialization.cc (right): https://codereview.chromium.org/2628683003/diff/280001/content/common/page_state_serialization.cc#newcode510 content/common/page_state_serialization.cc:510: WriteInteger(state.scroll_offset.y(), obj); Is did_save_scroll_state is false, then why are ...
3 years, 10 months ago (2017-02-14 20:42:17 UTC) #72
majidvp
https://codereview.chromium.org/2628683003/diff/280001/content/common/page_state_serialization.cc File content/common/page_state_serialization.cc (right): https://codereview.chromium.org/2628683003/diff/280001/content/common/page_state_serialization.cc#newcode700 content/common/page_state_serialization.cc:700: did_save_scroll_state(false), I think this is the incorrect initial value. ...
3 years, 10 months ago (2017-02-14 21:00:58 UTC) #73
chaopeng
Updated, PTAL.
3 years, 10 months ago (2017-02-15 01:54:40 UTC) #78
majidvp
This look good if japhet@ is OK with the idea. I am not an expert ...
3 years, 10 months ago (2017-02-15 17:37:32 UTC) #87
Nate Chapin
LGTM once majidvp's last round of comments are addressed.
3 years, 10 months ago (2017-02-15 17:53:34 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628683003/360001
3 years, 10 months ago (2017-02-15 18:13:12 UTC) #91
Charlie Reis
japhet@: Shouldn't we be adding a PageStateSerialization BackwardsCompat test for this (any time a new ...
3 years, 10 months ago (2017-02-15 18:38:27 UTC) #93
chaopeng
On 2017/02/15 18:38:27, Charlie Reis wrote: > japhet@: Shouldn't we be adding a PageStateSerialization BackwardsCompat ...
3 years, 10 months ago (2017-02-15 18:41:17 UTC) #95
Charlie Reis
On 2017/02/15 18:41:17, chaopeng wrote: > On 2017/02/15 18:38:27, Charlie Reis wrote: > > japhet@: ...
3 years, 10 months ago (2017-02-15 18:43:24 UTC) #96
majidvp
Pretty sure we need such a test. On Wed, Feb 15, 2017 at 1:43 PM ...
3 years, 10 months ago (2017-02-15 18:50:18 UTC) #97
majidvp
Pretty sure we need such a test. On Wed, Feb 15, 2017 at 1:43 PM ...
3 years, 10 months ago (2017-02-15 18:50:18 UTC) #98
Nate Chapin
On 2017/02/15 18:50:18, majidvp wrote: > Pretty sure we need such a test. > > ...
3 years, 10 months ago (2017-02-15 19:05:02 UTC) #99
chaopeng
Added Backwards test. PTAL, thank you.
3 years, 10 months ago (2017-02-15 20:19:46 UTC) #100
Nate Chapin
lgtm
3 years, 10 months ago (2017-02-16 19:16:55 UTC) #101
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2628683003/380001
3 years, 10 months ago (2017-02-16 19:19:06 UTC) #104
commit-bot: I haz the power
Committed patchset #19 (id:380001) as https://chromium.googlesource.com/chromium/src/+/1033be6d096d430b3d1fe6439550448b2374ea4c
3 years, 10 months ago (2017-02-16 22:10:04 UTC) #107
chaopeng
3 years, 10 months ago (2017-02-22 18:52:27 UTC) #108
Message was sent while issue was closed.
A revert of this CL (patchset #19 id:380001) has been created in
https://codereview.chromium.org/2710063002/ by chaopeng@chromium.org.

The reason for reverting is: Memory regression.
https://bugs.chromium.org/p/chromium/issues/detail?id=694569.

Powered by Google App Engine
This is Rietveld 408576698