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

Issue 2320303002: Reset VisualViewport position after same page navigation (Closed)

Created:
4 years, 3 months ago by chaopeng
Modified:
4 years, 3 months ago
Reviewers:
bokan
CC:
chromium-reviews, blink-reviews, loading-reviews_chromium.org, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reset VisualViewport position after same page navigation This issue can be reproduced using pinch zoom in Android, ChromeOS and Mac. After navigating to the **exact** same page, we create a new FrameView but reuse the VisualViewport, meaning its scroll position remains unchanged even though it was relative to an old FrameView. In this patch, we reset the VisualViewport position in Page::didCommitLoad since prior to here we would overwrite the old history item. BUG=642279 Committed: https://crrev.com/4521a9bb2402ebfffd709f02413ba3ec5a70de46 Cr-Commit-Position: refs/heads/master@{#419167}

Patch Set 1 #

Patch Set 2 : move the fix to RootFrameViewport #

Patch Set 3 : move reset to Page::didCommitLoad and create test #

Total comments: 4

Patch Set 4 : fix test case #

Patch Set 5 : add test html #

Total comments: 2

Patch Set 6 : add tests #

Patch Set 7 : remove unuse code #

Total comments: 4

Patch Set 8 : update test html #

Patch Set 9 : change test to async #

Total comments: 6

Patch Set 10 : update comments and test #

Total comments: 2

Patch Set 11 : change test to async test #

Total comments: 2

Patch Set 12 : update comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/Page.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.idl View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 38 (11 generated)
chaopeng
4 years, 3 months ago (2016-09-09 19:29:25 UTC) #3
bokan
Hey Chao, Change looks fine but this will require a test. I think a test ...
4 years, 3 months ago (2016-09-09 19:33:13 UTC) #4
chaopeng
On 2016/09/09 19:33:13, bokan wrote: > Hey Chao, > > Change looks fine but this ...
4 years, 3 months ago (2016-09-12 18:31:37 UTC) #5
bokan
Please fix up the CL description as noted in my previous message. https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/core/page/Page.cpp File third_party/WebKit/Source/core/page/Page.cpp ...
4 years, 3 months ago (2016-09-12 18:55:24 UTC) #6
chaopeng
https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp File third_party/WebKit/Source/web/tests/VisualViewportTest.cpp (right): https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp#newcode1941 third_party/WebKit/Source/web/tests/VisualViewportTest.cpp:1941: TEST_P(ParameterizedVisualViewportTest, ScrobarPositionForLinkToSamePageAfterResize) On 2016/09/12 18:55:23, bokan wrote: > Why ...
4 years, 3 months ago (2016-09-12 20:08:35 UTC) #8
bokan
On 2016/09/12 20:08:35, chaopeng wrote: > https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp > File third_party/WebKit/Source/web/tests/VisualViewportTest.cpp (right): > > https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp#newcode1941 > ...
4 years, 3 months ago (2016-09-13 01:28:58 UTC) #9
chaopeng
On 2016/09/13 01:28:58, bokan wrote: > On 2016/09/12 20:08:35, chaopeng wrote: > > > https://codereview.chromium.org/2320303002/diff/40001/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp ...
4 years, 3 months ago (2016-09-13 02:47:43 UTC) #10
bokan
https://codereview.chromium.org/2320303002/diff/80001/third_party/WebKit/Source/core/page/Page.cpp File third_party/WebKit/Source/core/page/Page.cpp (right): https://codereview.chromium.org/2320303002/diff/80001/third_party/WebKit/Source/core/page/Page.cpp#newcode439 third_party/WebKit/Source/core/page/Page.cpp:439: // Need reset visual viewport position, fix for crbug.com/642279 ...
4 years, 3 months ago (2016-09-13 14:56:47 UTC) #12
chaopeng
On 2016/09/13 14:56:47, bokan wrote: > https://codereview.chromium.org/2320303002/diff/80001/third_party/WebKit/Source/core/page/Page.cpp > File third_party/WebKit/Source/core/page/Page.cpp (right): > > https://codereview.chromium.org/2320303002/diff/80001/third_party/WebKit/Source/core/page/Page.cpp#newcode439 > ...
4 years, 3 months ago (2016-09-14 17:58:43 UTC) #13
bokan
On 2016/09/14 17:58:43, chaopeng wrote: > On 2016/09/13 14:56:47, bokan wrote: > > > https://codereview.chromium.org/2320303002/diff/80001/third_party/WebKit/Source/core/page/Page.cpp ...
4 years, 3 months ago (2016-09-14 21:37:38 UTC) #14
bokan
https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html (right): https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode7 third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html:7: width: 600px; Nit: unnecessary tab https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode29 third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html:29: . All ...
4 years, 3 months ago (2016-09-14 21:38:11 UTC) #15
chaopeng
https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html (right): https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode217 third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html:217: return; On 2016/09/14 21:38:11, bokan wrote: > Did the ...
4 years, 3 months ago (2016-09-15 00:15:22 UTC) #16
chaopeng
On 2016/09/15 00:15:22, chaopeng wrote: > https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html > File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html > (right): > > https://codereview.chromium.org/2320303002/diff/120001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode217 ...
4 years, 3 months ago (2016-09-15 14:12:59 UTC) #17
bokan
https://codereview.chromium.org/2320303002/diff/160001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html (right): https://codereview.chromium.org/2320303002/diff/160001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode5 third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html:5: height: 800px; No need for this style, these are ...
4 years, 3 months ago (2016-09-15 15:03:47 UTC) #18
chaopeng
On 2016/09/15 15:03:47, bokan wrote: > https://codereview.chromium.org/2320303002/diff/160001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html > File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html > (right): > > https://codereview.chromium.org/2320303002/diff/160001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html#newcode5 ...
4 years, 3 months ago (2016-09-15 15:37:32 UTC) #19
bokan
https://codereview.chromium.org/2320303002/diff/180001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate-expected.txt File third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate-expected.txt (right): https://codereview.chromium.org/2320303002/diff/180001/third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate-expected.txt#newcode1 third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate-expected.txt:1: link to self You shouldn't need this file anymore. ...
4 years, 3 months ago (2016-09-15 16:03:47 UTC) #20
bokan
Also, please add some discussion/context to the issue description. See https://codereview.chromium.org/2262373003 for an example of ...
4 years, 3 months ago (2016-09-15 16:07:48 UTC) #21
chaopeng
On 2016/09/15 16:07:48, bokan wrote: > Also, please add some discussion/context to the issue description. ...
4 years, 3 months ago (2016-09-15 17:52:51 UTC) #24
bokan
Just some improvements in wording In the description: "This issue can reproduce" -> "This issue ...
4 years, 3 months ago (2016-09-15 18:27:32 UTC) #25
bokan
On 2016/09/15 18:27:32, bokan wrote: > Just some improvements in wording > > In the ...
4 years, 3 months ago (2016-09-15 18:28:05 UTC) #26
chaopeng
On 2016/09/15 18:28:05, bokan wrote: > On 2016/09/15 18:27:32, bokan wrote: > > Just some ...
4 years, 3 months ago (2016-09-15 18:38:15 UTC) #29
bokan
On 2016/09/15 18:38:15, chaopeng wrote: > On 2016/09/15 18:28:05, bokan wrote: > > On 2016/09/15 ...
4 years, 3 months ago (2016-09-15 18:42:48 UTC) #30
chaopeng
On 2016/09/15 18:42:48, bokan wrote: > On 2016/09/15 18:38:15, chaopeng wrote: > > On 2016/09/15 ...
4 years, 3 months ago (2016-09-15 19:02:20 UTC) #31
bokan
Thank you, lgtm :)
4 years, 3 months ago (2016-09-15 19:12:30 UTC) #32
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/2320303002/220001
4 years, 3 months ago (2016-09-16 13:30:34 UTC) #34
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 3 months ago (2016-09-16 14:54:44 UTC) #36
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 14:57:03 UTC) #38
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/4521a9bb2402ebfffd709f02413ba3ec5a70de46
Cr-Commit-Position: refs/heads/master@{#419167}

Powered by Google App Engine
This is Rietveld 408576698