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

Issue 2431613002: Initial viewport is not the same as FrameView rect. (Closed)

Created:
4 years, 2 months ago by rune
Modified:
4 years, 2 months ago
Reviewers:
bokan, Timothy Loh
CC:
chromium-reviews, kenneth.christiansen, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, kinuko+watch, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial viewport is not the same as FrameView rect. FrameView rect is also changed by the visual viewport. Set the initial viewport size on FrameView whenever it changes in WebViewImpl and use it for matching media queries when collecting @viewport rules. See [2] for spec reference. This is fixing what was introduced in [1]. [1] https://codereview.chromium.org/2414343002/ [2] https://www.w3.org/TR/css-device-adapt-1/#media-queries R=bokan@chromium.org,timloh@chromium.org BUG=332763 Committed: https://crrev.com/d2002126e0773ec4cc5bdc01d992ed37e6fbed61 Cr-Commit-Position: refs/heads/master@{#426424}

Patch Set 1 #

Patch Set 2 : Rebased #

Total comments: 4

Patch Set 3 : DCHECK that initial viewport size is read from main frame only. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -8 lines) Patch
M third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp View 1 chunk +4 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/MediaValuesInitialViewportTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 2 chunks +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 26 (16 generated)
rune
ptal
4 years, 2 months ago (2016-10-18 10:19:59 UTC) #4
bokan
https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp File third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp (right): https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp#newcode23 third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp:23: return m_frame->view()->initialViewportWidth(); I'm a stranger around these parts, but ...
4 years, 2 months ago (2016-10-18 17:19:26 UTC) #11
rune
https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp File third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp (right): https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp#newcode23 third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp:23: return m_frame->view()->initialViewportWidth(); On 2016/10/18 17:19:26, bokan wrote: > I'm ...
4 years, 2 months ago (2016-10-18 22:09:53 UTC) #12
bokan
https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp File third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp (right): https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp#newcode23 third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp:23: return m_frame->view()->initialViewportWidth(); On 2016/10/18 22:09:53, rune wrote: > On ...
4 years, 2 months ago (2016-10-18 22:28:06 UTC) #13
rune
https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp File third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp (right): https://codereview.chromium.org/2431613002/diff/20001/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp#newcode23 third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp:23: return m_frame->view()->initialViewportWidth(); On 2016/10/18 22:28:06, bokan wrote: > On ...
4 years, 2 months ago (2016-10-18 22:56:12 UTC) #14
bokan
thanks, lgtm. But please wait for Tim's review.
4 years, 2 months ago (2016-10-19 12:51:00 UTC) #19
Timothy Loh
On 2016/10/19 12:51:00, bokan wrote: > thanks, lgtm. But please wait for Tim's review. lgtm
4 years, 2 months ago (2016-10-20 03:15:36 UTC) #20
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/2431613002/40001
4 years, 2 months ago (2016-10-20 06:48:33 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-20 07:00:05 UTC) #24
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:16:29 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d2002126e0773ec4cc5bdc01d992ed37e6fbed61
Cr-Commit-Position: refs/heads/master@{#426424}

Powered by Google App Engine
This is Rietveld 408576698