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

Issue 556703005: Initial draft - modify ViewportAnchor to know about both inner and outer viewports. (Closed)

Created:
6 years, 3 months ago by Tima Vaisburd
Modified:
6 years, 2 months ago
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix pinch virtual viewport position after resize. Associate the viewport anchor with the inner viewport. Adjust the inner and outer viewport positions after resize such that they both remain in their allowed range and the inner viewport origin scales proportionally within the outer viewport. As a small cleanup, made the method ScrollView::scrollTo() protected. BUG=364108 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182365 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182727

Patch Set 1 #

Total comments: 16

Patch Set 2 : ViewportAnchor passes the inner viewport offset relative to outer viewport; fixed bugs #

Total comments: 19

Patch Set 3 : Accounted for inner and outer viewport constraints #

Total comments: 6

Patch Set 4 : Pass the frame by reference. #

Patch Set 5 : Added unit tests. #

Total comments: 9

Patch Set 6 : Changed unit tests, added missing PinchViewport.h change #

Patch Set 7 : Redid unit tests with actual scaling. #

Total comments: 14

Patch Set 8 : Fixed spaces and removed extra comments. #

Total comments: 6

Patch Set 9 : Changed the parameter name frameView -> scrollView #

Patch Set 10 : Passes output params by reference in ViewportAnchor::computeOrigins() #

Total comments: 1

Patch Set 11 : Passes output param by reference in moveToEncloseRect() and moveIntoRect() #

Patch Set 12 : Reapplying patch set 11 after a mac test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -30 lines) Patch
M Source/platform/scroll/ScrollView.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M Source/web/ViewportAnchor.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +15 lines, -5 lines 0 comments Download
M Source/web/ViewportAnchor.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +86 lines, -15 lines 0 comments Download
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +55 lines, -6 lines 0 comments Download
M Source/web/tests/PinchViewportTest.cpp View 1 2 3 4 5 6 2 chunks +120 lines, -0 lines 0 comments Download
A + Source/web/tests/data/200-by-800-viewport.html View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 61 (11 generated)
timav
Please review the first draft
6 years, 3 months ago (2014-09-09 23:20:11 UTC) #3
aelias_OOO_until_Jul13
The semantics of this look fine. Comments below are mainly for more clarity/consistency in the ...
6 years, 3 months ago (2014-09-10 01:46:25 UTC) #4
bokan
Looks good overall. Left a few comments in addition to what Alex said. One case ...
6 years, 3 months ago (2014-09-10 15:03:59 UTC) #5
timav
On 2014/09/10 15:03:59, bokan wrote: > Looks good overall. Left a few comments in addition ...
6 years, 3 months ago (2014-09-10 18:22:20 UTC) #6
timav
https://codereview.chromium.org/556703005/diff/1/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/1/Source/web/ViewportAnchor.cpp#newcode118 Source/web/ViewportAnchor.cpp:118: IntPoint ViewportAnchor::computeInnerViewportOrigin(const IntSize& innerSize) const On 2014/09/10 01:46:24, aelias ...
6 years, 3 months ago (2014-09-10 18:22:41 UTC) #7
bokan
https://codereview.chromium.org/556703005/diff/1/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/556703005/diff/1/Source/web/WebViewImpl.cpp#newcode2970 Source/web/WebViewImpl.cpp:2970: view->scrollTo(toIntSize(outerViewportOrigin)); On 2014/09/10 18:22:40, timav wrote: > On 2014/09/10 ...
6 years, 3 months ago (2014-09-10 18:26:40 UTC) #8
timav
Hi, I tried to address all the issues except for the tests. The names in ...
6 years, 3 months ago (2014-09-11 21:52:05 UTC) #9
bokan
Sorry for delay. Functionally, looked good when I tested, thanks! I just have a few ...
6 years, 3 months ago (2014-09-12 20:53:08 UTC) #10
timav
https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp#newcode150 Source/web/ViewportAnchor.cpp:150: moveToEncloseRect(&outerRect, FloatRect(innerOrigin, FloatSize(innerSize))); On 2014/09/12 20:53:07, bokan wrote: > ...
6 years, 3 months ago (2014-09-12 23:33:35 UTC) #11
timav
https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp#newcode150 Source/web/ViewportAnchor.cpp:150: moveToEncloseRect(&outerRect, FloatRect(innerOrigin, FloatSize(innerSize))); On 2014/09/12 23:33:35, timav wrote: > ...
6 years, 3 months ago (2014-09-12 23:42:28 UTC) #12
timav
https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp#newcode150 Source/web/ViewportAnchor.cpp:150: moveToEncloseRect(&outerRect, FloatRect(innerOrigin, FloatSize(innerSize))); On 2014/09/12 23:33:35, timav wrote: > ...
6 years, 3 months ago (2014-09-12 23:59:53 UTC) #13
bokan
https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp#newcode150 Source/web/ViewportAnchor.cpp:150: moveToEncloseRect(&outerRect, FloatRect(innerOrigin, FloatSize(innerSize))); On 2014/09/12 23:33:35, timav wrote: > ...
6 years, 3 months ago (2014-09-15 15:36:35 UTC) #14
timav
https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/20001/Source/web/ViewportAnchor.cpp#newcode150 Source/web/ViewportAnchor.cpp:150: moveToEncloseRect(&outerRect, FloatRect(innerOrigin, FloatSize(innerSize))); On 2014/09/15 15:36:35, bokan wrote: > ...
6 years, 3 months ago (2014-09-15 20:04:35 UTC) #15
bokan
lgtm modulo comments https://codereview.chromium.org/556703005/diff/40001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/40001/Source/web/ViewportAnchor.cpp#newcode94 Source/web/ViewportAnchor.cpp:94: // PinchViewport::maximimScrollPosition() does the same. nit: ...
6 years, 3 months ago (2014-09-15 21:02:21 UTC) #16
bokan
And tests, of course :)
6 years, 3 months ago (2014-09-15 21:02:48 UTC) #17
timav
Working on a test now. https://codereview.chromium.org/556703005/diff/40001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/40001/Source/web/ViewportAnchor.cpp#newcode94 Source/web/ViewportAnchor.cpp:94: // PinchViewport::maximimScrollPosition() does the ...
6 years, 3 months ago (2014-09-15 21:42:55 UTC) #18
timav
Submitted the unit tests, please review.
6 years, 3 months ago (2014-09-16 19:28:07 UTC) #19
bokan
tests lgtm. https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp File Source/web/tests/PinchViewportTest.cpp (right): https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp#newcode162 Source/web/tests/PinchViewportTest.cpp:162: settings->setMainFrameResizesAreOrientationChanges(true); Does anything break if you just ...
6 years, 3 months ago (2014-09-16 19:46:49 UTC) #20
timav
https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp File Source/web/tests/PinchViewportTest.cpp (right): https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp#newcode162 Source/web/tests/PinchViewportTest.cpp:162: settings->setMainFrameResizesAreOrientationChanges(true); On 2014/09/16 19:46:48, bokan wrote: > Does anything ...
6 years, 3 months ago (2014-09-16 21:44:52 UTC) #21
bokan
https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp File Source/web/tests/PinchViewportTest.cpp (right): https://codereview.chromium.org/556703005/diff/80001/Source/web/tests/PinchViewportTest.cpp#newcode162 Source/web/tests/PinchViewportTest.cpp:162: settings->setMainFrameResizesAreOrientationChanges(true); On 2014/09/16 21:44:51, timav wrote: > On 2014/09/16 ...
6 years, 3 months ago (2014-09-16 22:03:19 UTC) #22
timav
Please review another patch. Thank you, --Tima
6 years, 3 months ago (2014-09-17 02:14:47 UTC) #23
aelias_OOO_until_Jul13
lgtm with style nits https://codereview.chromium.org/556703005/diff/120001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/120001/Source/web/ViewportAnchor.cpp#newcode72 Source/web/ViewportAnchor.cpp:72: void moveToEncloseRect(IntRect * outer, const ...
6 years, 3 months ago (2014-09-17 05:16:36 UTC) #24
timav
Another round. https://codereview.chromium.org/556703005/diff/120001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/120001/Source/web/ViewportAnchor.cpp#newcode72 Source/web/ViewportAnchor.cpp:72: void moveToEncloseRect(IntRect * outer, const FloatRect & ...
6 years, 3 months ago (2014-09-17 17:54:45 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/556703005/140001
6 years, 3 months ago (2014-09-17 19:42:13 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/15406)
6 years, 3 months ago (2014-09-17 19:51:10 UTC) #29
bokan
FYI: You still need an OWNER for Source/core and Source/platform
6 years, 3 months ago (2014-09-17 20:18:33 UTC) #30
timav
Hi Levi, I need a reviewer who owns the directories Source/core and Source/platform. Could you, ...
6 years, 3 months ago (2014-09-17 20:50:20 UTC) #32
leviw_travelin_and_unemployed
Typo in description: "ancor" https://codereview.chromium.org/556703005/diff/140001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/140001/Source/web/ViewportAnchor.cpp#newcode156 Source/web/ViewportAnchor.cpp:156: IntPoint* mainFrameOffset, FloatPoint* pinchViewportOffset) const ...
6 years, 3 months ago (2014-09-18 18:49:55 UTC) #33
leviw_travelin_and_unemployed
Is this still an "initial draft"?
6 years, 3 months ago (2014-09-18 19:05:29 UTC) #34
timav
Updated the description - please review again. https://codereview.chromium.org/556703005/diff/140001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/140001/Source/web/ViewportAnchor.cpp#newcode156 Source/web/ViewportAnchor.cpp:156: IntPoint* mainFrameOffset, ...
6 years, 3 months ago (2014-09-19 17:38:43 UTC) #35
leviw_travelin_and_unemployed
On 2014/09/19 at 17:38:43, timav wrote: > Updated the description - please review again. > ...
6 years, 3 months ago (2014-09-19 18:43:04 UTC) #36
timav
On 2014/09/19 18:43:04, leviw wrote: > On 2014/09/19 at 17:38:43, timav wrote: > > Updated ...
6 years, 3 months ago (2014-09-19 18:57:51 UTC) #37
timav
Passed by reference.
6 years, 3 months ago (2014-09-19 18:58:29 UTC) #38
leviw_travelin_and_unemployed
lgtm with one more nit. https://codereview.chromium.org/556703005/diff/180001/Source/web/ViewportAnchor.cpp File Source/web/ViewportAnchor.cpp (right): https://codereview.chromium.org/556703005/diff/180001/Source/web/ViewportAnchor.cpp#newcode72 Source/web/ViewportAnchor.cpp:72: void moveToEncloseRect(IntRect* outer, const ...
6 years, 3 months ago (2014-09-19 19:03:06 UTC) #39
bokan
On 2014/09/19 19:03:06, leviw wrote: > lgtm with one more nit. > > https://codereview.chromium.org/556703005/diff/180001/Source/web/ViewportAnchor.cpp > ...
6 years, 3 months ago (2014-09-19 19:14:45 UTC) #40
leviw_travelin_and_unemployed
On 2014/09/19 at 19:14:45, bokan wrote: > On 2014/09/19 19:03:06, leviw wrote: > > lgtm ...
6 years, 3 months ago (2014-09-19 20:11:16 UTC) #41
timav
On 2014/09/19 20:11:16, leviw wrote: > On 2014/09/19 at 19:14:45, bokan wrote: > > On ...
6 years, 3 months ago (2014-09-19 21:45:41 UTC) #42
timav
6 years, 3 months ago (2014-09-19 21:46:18 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/556703005/200001
6 years, 3 months ago (2014-09-19 21:48:59 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/53906)
6 years, 3 months ago (2014-09-19 23:29:13 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/556703005/200001
6 years, 3 months ago (2014-09-19 23:31:16 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/53906)
6 years, 3 months ago (2014-09-20 00:23:40 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/556703005/200001
6 years, 3 months ago (2014-09-20 01:15:54 UTC) #53
commit-bot: I haz the power
Committed patchset #11 (id:200001) as 182365
6 years, 3 months ago (2014-09-20 02:56:12 UTC) #54
Mads Ager (chromium)
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/597113002/ by ager@chromium.org. ...
6 years, 3 months ago (2014-09-24 10:27:56 UTC) #55
Mads Ager (chromium)
Sorry about that. I don't think this one needs to be reverted. I think it ...
6 years, 3 months ago (2014-09-24 11:15:06 UTC) #56
Mads Ager (chromium)
On 2014/09/24 11:15:06, Mads Ager (chromium) wrote: > Sorry about that. I don't think this ...
6 years, 3 months ago (2014-09-24 11:50:13 UTC) #57
timav
On 2014/09/24 11:50:13, Mads Ager (chromium) wrote: > On 2014/09/24 11:15:06, Mads Ager (chromium) wrote: ...
6 years, 2 months ago (2014-09-26 01:17:12 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/556703005/220001
6 years, 2 months ago (2014-09-26 01:18:47 UTC) #60
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 03:29:00 UTC) #61
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as 182727

Powered by Google App Engine
This is Rietveld 408576698