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

Issue 1814013002: Visual viewport API initial implementation. (Closed)

Created:
4 years, 9 months ago by ymalik
Modified:
4 years, 8 months ago
Reviewers:
bokan, esprehn, Rick Byers, drott
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, kinuko+watch, Rick Byers, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Visual viewport API initial implementation. Adds a new visualViewport object to document that contains visual viewport information. A visualviewportchanged event fires everytime the visual viewport is resized or scrolled. WICG proposal: https://github.com/WICG/ViewportAPI BUG=595826 Committed: https://crrev.com/e7ff0a19a888c470f0fa149e922f35b4f8fe5539 Cr-Commit-Position: refs/heads/master@{#385047}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Move viewport to document and rename to visualViewport #

Patch Set 3 : update layout test #

Patch Set 4 : s/Viewport.idl/VisualViewport.idl #

Total comments: 6

Patch Set 5 : review comments #

Total comments: 4

Patch Set 6 : nits #

Total comments: 12

Patch Set 7 : make visualviewportchanged per frame + other review feedback #

Total comments: 9

Patch Set 8 : address review comments #

Patch Set 9 : fix web exposed interface listing layout test #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -11 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions-expected.txt View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired.html View 1 2 3 4 5 6 1 chunk +60 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired-expected.txt View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired-window-resized.html View 1 2 5 6 1 chunk +38 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired-window-resized-expected.txt View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi 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/dom/Document.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.idl View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTypeNames.in View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/VisualViewport.h View 1 2 3 4 5 6 7 4 chunks +20 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/VisualViewport.cpp View 1 2 3 4 5 6 7 4 chunks +71 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/frame/VisualViewport.idl View 1 2 3 4 5 6 2 chunks +13 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (16 generated)
ymalik
@bokan, PTAL and let me know what you think :)
4 years, 9 months ago (2016-03-17 20:16:17 UTC) #2
ymalik
https://codereview.chromium.org/1814013002/diff/1/third_party/WebKit/Source/core/frame/VisualViewport.cpp File third_party/WebKit/Source/core/frame/VisualViewport.cpp (right): https://codereview.chromium.org/1814013002/diff/1/third_party/WebKit/Source/core/frame/VisualViewport.cpp#newcode209 third_party/WebKit/Source/core/frame/VisualViewport.cpp:209: updateLayoutIgnorePendingStylesheets(); @bokan, I am not sure whether we need ...
4 years, 9 months ago (2016-03-18 13:30:57 UTC) #3
bokan
Looks good overall, thanks! There's still some discussion over whether we want it on Element ...
4 years, 9 months ago (2016-03-18 16:05:07 UTC) #4
bokan
Also, please remove the go/ link from the description since non-googlers wont be able to ...
4 years, 9 months ago (2016-03-18 16:06:26 UTC) #5
ymalik
https://codereview.chromium.org/1814013002/diff/1/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html File third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html (right): https://codereview.chromium.org/1814013002/diff/1/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html#newcode16 third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html:16: returned by JS visual viewport API."); On 2016/03/18 16:05:07, ...
4 years, 9 months ago (2016-03-22 16:35:06 UTC) #7
bokan
lgtm % comments https://codereview.chromium.org/1814013002/diff/60001/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html File third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html (right): https://codereview.chromium.org/1814013002/diff/60001/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html#newcode53 third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html:53: shouldBe("document.visualViewport.scrollTop", "0"); It might be worth ...
4 years, 9 months ago (2016-03-22 18:30:30 UTC) #8
ymalik
+drott for Source/platform/RuntimeEnabledFeatures.in +rbyers for Source/core https://codereview.chromium.org/1814013002/diff/60001/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html File third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html (right): https://codereview.chromium.org/1814013002/diff/60001/third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html#newcode53 third_party/WebKit/LayoutTests/fast/dom/viewport/verify-viewport-dimensions.html:53: shouldBe("document.visualViewport.scrollTop", "0"); On ...
4 years, 9 months ago (2016-03-22 21:28:20 UTC) #10
bokan
thanks, still lgtm + some final nits. Please update the CL description to remove the ...
4 years, 9 months ago (2016-03-22 21:34:22 UTC) #11
drott
LGTM for third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
4 years, 9 months ago (2016-03-22 23:01:35 UTC) #12
ymalik
https://codereview.chromium.org/1814013002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired.html File third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired.html (right): https://codereview.chromium.org/1814013002/diff/80001/third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired.html#newcode29 third_party/WebKit/LayoutTests/fast/dom/viewport/visualviewportchanged-event-fired.html:29: // visualviewportchanged is non-bubbling. On 2016/03/22 21:34:21, bokan wrote: ...
4 years, 9 months ago (2016-03-23 00:13:44 UTC) #14
ymalik
4 years, 9 months ago (2016-03-23 00:13:52 UTC) #15
ymalik
@Rick Gentle ping :)
4 years, 9 months ago (2016-03-24 18:22:02 UTC) #16
Rick Byers
Sorry I missed you had asked for my review. core LGTM with nits https://codereview.chromium.org/1814013002/diff/100001/third_party/WebKit/Source/core/dom/Document.idl File ...
4 years, 9 months ago (2016-03-24 19:07:54 UTC) #17
esprehn
Bunch of comments. This code probably wants to use per frame events. Just like resize ...
4 years, 9 months ago (2016-03-24 19:20:17 UTC) #19
ymalik
@esprehn PTAL :) https://codereview.chromium.org/1814013002/diff/100001/third_party/WebKit/Source/core/dom/Document.idl File third_party/WebKit/Source/core/dom/Document.idl (right): https://codereview.chromium.org/1814013002/diff/100001/third_party/WebKit/Source/core/dom/Document.idl#newcode159 third_party/WebKit/Source/core/dom/Document.idl:159: // Visual Viewport API On 2016/03/24 ...
4 years, 8 months ago (2016-03-29 19:17:28 UTC) #20
ymalik
On 2016/03/29 19:17:28, ymalik1 wrote: > @esprehn PTAL :) > > https://codereview.chromium.org/1814013002/diff/100001/third_party/WebKit/Source/core/dom/Document.idl > File third_party/WebKit/Source/core/dom/Document.idl ...
4 years, 8 months ago (2016-03-30 18:51:08 UTC) #22
esprehn
lgtm w/ comments fixed. https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1234 third_party/WebKit/Source/core/dom/Document.cpp:1234: return &host->visualViewport(); does your spec ...
4 years, 8 months ago (2016-03-31 05:15:37 UTC) #23
bokan
https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1234 third_party/WebKit/Source/core/dom/Document.cpp:1234: return &host->visualViewport(); On 2016/03/31 05:15:37, esprehn wrote: > does ...
4 years, 8 months ago (2016-03-31 15:23:55 UTC) #24
ymalik
https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/frame/VisualViewport.cpp File third_party/WebKit/Source/core/frame/VisualViewport.cpp (right): https://codereview.chromium.org/1814013002/diff/120001/third_party/WebKit/Source/core/frame/VisualViewport.cpp#newcode97 third_party/WebKit/Source/core/frame/VisualViewport.cpp:97: document->updateLayoutIgnorePendingStylesheets(); On 2016/03/31 05:15:37, esprehn wrote: > we would ...
4 years, 8 months ago (2016-04-01 17:15:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814013002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814013002/140001
4 years, 8 months ago (2016-04-01 17:16:03 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/198006)
4 years, 8 months ago (2016-04-01 18:23:18 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814013002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814013002/160001
4 years, 8 months ago (2016-04-04 14:19:03 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/44587)
4 years, 8 months ago (2016-04-04 14:32:12 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814013002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814013002/180001
4 years, 8 months ago (2016-04-04 19:53:46 UTC) #38
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 8 months ago (2016-04-04 23:22:24 UTC) #40
commit-bot: I haz the power
4 years, 8 months ago (2016-04-04 23:24:40 UTC) #42
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/e7ff0a19a888c470f0fa149e922f35b4f8fe5539
Cr-Commit-Position: refs/heads/master@{#385047}

Powered by Google App Engine
This is Rietveld 408576698