Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 489206 window.scroll properties being relative to visual viewport break some pages under pinch-zoom
Starred by 19 users Project Member Reported by lpa...@etouch.net, May 18, 2015 Back to list
Chrome Version: 45.0.2404.0 (Official Build) 8fd741f2eeb8b6cc59a780b81b4a53db269f6454-refs/heads/master@{#330293} 32/64 Bit.
OS: Windows 8 (Touch Device)

Steps:
1. Launch chrome and navigate to https://translate.google.co.in
2. Click on "turn on handwriting" from bottom left side such that overlay appears.
3. Perform zoom in using pinch and try to write anything inside the text area.
4. Observe.

Actual: Unable to write any text after performing pinch to zoom.

Expected: Should be able to write text in the overlay even after performing pinch to zoom.

This is a regression issue broken in M-44, will soon update the other info.
Expected_PTZ.mp4
644 KB Download
Actual_PTZ.mp4
571 KB Download
Comment 2 by smokana@chromium.org, May 18, 2015
Labels: ReleaseBlock-Stable
Adding RB label as this is a recent regression
Comment 3 by bokan@chromium.org, May 22, 2015
Issue 487986 has been merged into this issue.
Comment 4 by bokan@chromium.org, May 22, 2015
Cc: rbyers@chromium.org aelias@chromium.org
This and issue 487986 seem to be caused by having window.scrollX/Y and client coordinates (getBoundingClientRect, MouseEvent.clientX/Y, etc.) be in different viewports; the window scroll properties are w.r.t. the visual viewport while client coordinates are layout. Switching window.scrollX/Y to report the offset of the layout viewport fixes both this issue and the Facebook case.

My opinion is that we should treat browser pinch-zoom as a mechanism primarily for legacy sites. Authors that want to do something more sophisticated should build their own zooming experience (a la Google Maps). I think if we agree on that then it only makes sense to make scrollX/Y, scrollTo, innerWidth/Height and any other properties/methods be relative to the layout viewport. This would mean that pinch-zoom would truly be invisible to the page and we would avoid these kinds of breakages.

The main reason we made these properties relative to the visual viewport was some internal tooling was broken since it actually was trying to work with pinch-zoom (see issue 433794). IIRC Rick also mentioned the IE team found they broke too many sites when they tried it but I'm a little skeptical; I'll reach out to them and see if I can get a clearer picture. 

Another issue that was brought up at the time was that these properties had unusual consistency between browsers so we shouldn't change them (at the least we'd need an intent to ship). With the fact that we now have 3 different pinch-zoom models between Safari, Firefox, Chrome/IE I don't think compatibility on how properties respond to pinch-zoom is at all valuable to web developers. I'd rather add some new APIs to get the visual viewport scroll and dimensions to let authors respond in a simple way to pinch-zoom (for cases where they don't want to rebuild pinch-zoom, like our tooling scenario I mentioned) and keep all the existing properties oblivious to pinch. I think this would be better for users since we wouldn't break legacy content under pinch-zoom. It would also be better for authors since it's more rational and and explicit.

Thoughts?

In the short term, I think we may need to revert https://src.chromium.org/viewvc/blink?revision=193307&view=revision and make getBoundingClientRect relative to visual viewport again. It seems to be a common pattern to popup an absolutely positioned menu over some button by getting the button's client rect and offsetting that by scrollX/Y. The first site I hit when checking how common this might be (the gear button on nytimes.com) also has this problem.
Comment 5 by rbyers@chromium.org, May 22, 2015
I was happiest in the original plan to have all APIs reflect the layout viewport (and introduce new APIs for visual).  I agree that pinch-zoom is primarily for legacy sites not designed for touch, but I don't think we want to restrict it to that.  There is a good argument to say there has to be SOME way to get details of the visual viewport.  Perhaps we really can't reach that ideal of being fully transparent without also adding some new APIs?

But we've got to stop churning our behavior on stable channel here.  Current stable M-43 builds behave the same as ToT / 44, and the same as IE, right?  Perhaps we can afford to leave it like this for now and work on a long term solution?

In particular, we need that doc that lists all the relevant APIs and what co-ordinate space their in, discussion with IE to confirm our implementations are aligned, and then a standardization effort.  I'm a little worried that whatever changes we decide to make here, we'll end up changing again (and breaking things) when we finally standardize.

Comment 6 by bokan@chromium.org, May 22, 2015
Right, I forgot we merged that back to 43. In that case, I agree we shouldn't keep churning the behavior. FWIW, I'm not aware of any pages on the web that do anything useful or special under pinch-zoom so I'm not sure we'd *need* to wait on new APIs (obviously though, this is anecdotal), but I don't think this is serious enough that we should push on this alone.

I've been punting on that doc for a while but I think it's a prereq for starting the discussion with IE so I'll prioritize that now.
Comment 7 by bokan@chromium.org, May 22, 2015
Issue 484616 has been merged into this issue.
Comment 8 by bokan@chromium.org, May 22, 2015
Summary: window.scroll properties being relative to virtual viewport break some pages under pinch-zoom
Labels: -M-44 -ReleaseBlock-Stable M-45
Comment 9 by bokan@chromium.org, May 27, 2015
Labels: Hotlist-Input-Dev
I agree all the properties visible to the website today should be in terms of layout viewport.  Our original idea here was right.
Comment 11 by bokan@chromium.org, Jun 9, 2015
Summary: window.scroll properties being relative to visual viewport break some pages under pinch-zoom
Comment 12 by bokan@chromium.org, Jun 11, 2015
Cc: jdduke@chromium.org
Issue 496285 has been merged into this issue.
Comment 13 by bokan@chromium.org, Jun 12, 2015
Labels: -M-45 M-46
Comment 14 by bokan@chromium.org, Jul 30, 2015
Labels: -Pri-1 Pri-2
Comment 15 by bokan@chromium.org, Aug 17, 2015
Labels: -M-46 M-47
Comment 16 by bokan@chromium.org, Sep 2, 2015
Cc: bokan@chromium.org miguelg@chromium.org
Issue 526432 has been merged into this issue.
Comment 17 by bokan@chromium.org, Sep 2, 2015
Owner: ymalik@chromium.org
Comment 18 by bokan@chromium.org, Sep 16, 2015
Cc: a...@chromium.org
Issue 525956 has been merged into this issue.
Comment 19 by cdr...@gmail.com, Sep 17, 2015
FYI: Workaround to return absolute page coordinates using element.getBoundingClientRect() is to:

A) Add a <div id=pagetopelement style="position:absolute;left:0;top:0"> to the body.

B) var pageAbsoluteY = element.getBoundingClientRect().top - pagetopelement.getBoundingClientRect().top;

So window.scrollY or window.pageYOffset are not needed.
Project Member Comment 20 by bugdro...@chromium.org, Sep 28, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b92c13df0e3c771a89a5beb6ea892704fd2ed05

commit 9b92c13df0e3c771a89a5beb6ea892704fd2ed05
Author: ymalik <ymalik@chromium.org>
Date: Mon Sep 28 19:23:04 2015

Make window.scroll properties relative to the layout viewport.

window.scroll properties being relative to visual viewport breaks some pages
under pinch-zoom. The original plan was to have all APIs reflect the layout
viewport (and introduce new APIs for visual). This CL is an initial step
towards that and the window.scroll properties will be relative to the layout
viewport if the 'inert-visual-viewport' flag is set.

BUG=489206

Review URL: https://codereview.chromium.org/1366893002

Cr-Commit-Position: refs/heads/master@{#351104}

[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/chrome/app/generated_resources.grd
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/chrome/browser/about_flags.cc
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/browser/renderer_host/render_process_host_impl.cc
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/browser/renderer_host/render_view_host_impl.cc
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/public/common/common_param_traits_macros.h
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/public/common/content_switches.cc
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/public/common/content_switches.h
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/public/common/web_preferences.cc
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/public/common/web_preferences.h
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/content/renderer/render_view_impl.cc
[add] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport-expected.txt
[add] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrolls-layout-viewport.html
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/Source/core/frame/Settings.in
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/Source/web/WebSettingsImpl.cpp
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/Source/web/WebSettingsImpl.h
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/third_party/WebKit/public/web/WebSettings.h
[modify] http://crrev.com/9b92c13df0e3c771a89a5beb6ea892704fd2ed05/tools/metrics/histograms/histograms.xml

Comment 21 by ymalik@chromium.org, Sep 30, 2015
Cc: pdr@chromium.org hua...@chromium.org dsinclair@chromium.org joh...@chromium.org
Issue 523966 has been merged into this issue.
Comment 22 by bokan@chromium.org, Oct 8, 2015
Issue 515199 has been merged into this issue.
Project Member Comment 23 by bugdro...@chromium.org, Oct 14, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0

commit e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0
Author: ymalik <ymalik@chromium.org>
Date: Wed Oct 14 18:24:17 2015

Update telemetry tests that rely on window.innerWidth/Height.

window.scroll properties have been relative to the visual viewport. This breaks
some pages under pinch-zoom (see crbug.com/489206). This CL fixes the telemetry
tests that would fail if window.scroll properties are changed to be relative
to the layout viewport. This CL adds an api method to get the visual viewport
size instead of getting it from window.innerWidth and window.innerHeight.

See crbug.com/433794 for some history.

BUG=489206

Review URL: https://codereview.chromium.org/1400213002

Cr-Commit-Position: refs/heads/master@{#354071}

[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/content/renderer/gpu/gpu_benchmarking_extension.cc
[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/content/renderer/gpu/gpu_benchmarking_extension.h
[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/third_party/WebKit/Source/web/WebViewImpl.h
[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/third_party/WebKit/public/web/WebView.h
[modify] http://crrev.com/e81760ea8fd85cf9ae2900e3978dd600bbb3c8e0/tools/telemetry/telemetry/internal/actions/gesture_common.js

Comment 24 by bokan@chromium.org, Oct 19, 2015
Issue 543474 has been merged into this issue.
Project Member Comment 25 by bugdro...@chromium.org, Oct 23, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58d42ae1d6690a9f625e23f160b346e9cebeab01

commit 58d42ae1d6690a9f625e23f160b346e9cebeab01
Author: ymalik <ymalik@chromium.org>
Date: Fri Oct 23 22:30:27 2015

Remove plumbing for the inert-visual-viewport flag.

Note that the Blink setting inertVisualViewport still exists and is set to false by default.
A follow up CL will set this to true once dependent tests are fixed.

BUG=489206

Review URL: https://codereview.chromium.org/1415513002

Cr-Commit-Position: refs/heads/master@{#355907}

[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/chrome/app/generated_resources.grd
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/chrome/browser/about_flags.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/components/html_viewer/blink_settings_impl.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/components/html_viewer/web_preferences.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/components/html_viewer/web_preferences.h
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/browser/renderer_host/render_process_host_impl.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/browser/renderer_host/render_view_host_impl.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/public/common/common_param_traits_macros.h
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/public/common/content_switches.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/public/common/content_switches.h
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/public/common/web_preferences.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/public/common/web_preferences.h
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/content/renderer/render_view_impl.cc
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/third_party/WebKit/Source/web/WebSettingsImpl.cpp
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/third_party/WebKit/Source/web/WebSettingsImpl.h
[modify] http://crrev.com/58d42ae1d6690a9f625e23f160b346e9cebeab01/third_party/WebKit/public/web/WebSettings.h

Project Member Comment 26 by bugdro...@chromium.org, Oct 23, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e61efca851565188257eb9f547d601f8d90e938

commit 8e61efca851565188257eb9f547d601f8d90e938
Author: ymalik <ymalik@chromium.org>
Date: Fri Oct 23 23:44:37 2015

Update layout tests to use inernals.visualViewport APIs.

This CL adds the following methods to Internals.cpp for tests that need the
visual viewport scroll position and dimensions: visualViewportHeight,
visualViewportWidth, visualViewportScrollX, visualViewportScrollY.

This is the initial CL to fix the LayoutTests that would break if the
corresponding window properties were relative to the visual viewport. This CL
branched from another CL to make shipping this window API change easier.

Original review CL: https://codereview.chromium.org/1415513002

TBR=rbyers@chromium.org

BUG=489206

Review URL: https://codereview.chromium.org/1424593002

Cr-Commit-Position: refs/heads/master@{#355926}

[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom-scroll-bubble.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/gesture-pinch-zoom.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/touch/gesture/touch-gesture-fling-with-page-scale-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/events/touch/gesture/touch-gesture-fling-with-page-scale.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/history/scroll-restoration/scroll-restoration-scale-not-impacted.html
[delete] http://crrev.com/9c33d121fa4757213064a2653404dd66ea40c388/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrollBy-expected.txt
[delete] http://crrev.com/9c33d121fa4757213064a2653404dd66ea40c388/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrollBy.html
[delete] http://crrev.com/9c33d121fa4757213064a2653404dd66ea40c388/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrollTo-expected.txt
[delete] http://crrev.com/9c33d121fa4757213064a2653404dd66ea40c388/third_party/WebKit/LayoutTests/fast/scroll-behavior/main-frame-pinch-scrollTo.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/scrolling/editor-command-scroll-page-scale.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale-expected.txt
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/scrolling/keyboard-scroll-page-scale.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/LayoutTests/inspector/elements/highlight/highlight-node-scaled-and-scrolled.html
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/Source/core/testing/Internals.h
[modify] http://crrev.com/8e61efca851565188257eb9f547d601f8d90e938/third_party/WebKit/Source/core/testing/Internals.idl

Project Member Comment 27 by bugdro...@chromium.org, Nov 2, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0690e564718ae01d7afa37c66886a4cd199fc69

commit c0690e564718ae01d7afa37c66886a4cd199fc69
Author: ymalik <ymalik@chromium.org>
Date: Mon Nov 02 16:11:52 2015

element.scrollIntoView only scrolls the layout viewport

window.scroll properties being relative to visual viewport breaks some pages
under pinch-zoom. The plan is to have all APIs reflect the layout viewport.

Note that this CL also affects element.scrollIntoViewIfNeeded.

BUG=489206

Review URL: https://codereview.chromium.org/1424313003

Cr-Commit-Position: refs/heads/master@{#357361}

[add] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-into-view-scrolls-layout-viewport-expected.txt
[add] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-into-view-scrolls-layout-viewport.html
[modify] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/Source/core/dom/Element.cpp
[modify] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/Source/core/layout/LayoutBox.h
[modify] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] http://crrev.com/c0690e564718ae01d7afa37c66886a4cd199fc69/third_party/WebKit/Source/core/layout/LayoutObject.h

Project Member Comment 28 by bugdro...@chromium.org, Nov 5, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4aaa1da24bbd70c05694837a110a45147fa5c16

commit b4aaa1da24bbd70c05694837a110a45147fa5c16
Author: ymalik <ymalik@chromium.org>
Date: Wed Nov 04 20:37:51 2015

Use inert-visual-viewport flag correctly.

With the inert-visual-viewport flag set, window.scrollBy and window.scrollTo
should only scroll the layout viewport. Found a logic error where we don't
check this flag before calculating current offset.

This CL also updates the visual viewport to only fire scroll event when the
inert-visual-viewport flag is off.

BUG=489206

Review URL: https://codereview.chromium.org/1419143007

Cr-Commit-Position: refs/heads/master@{#357887}

[modify] http://crrev.com/b4aaa1da24bbd70c05694837a110a45147fa5c16/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] http://crrev.com/b4aaa1da24bbd70c05694837a110a45147fa5c16/third_party/WebKit/Source/core/frame/VisualViewport.cpp

Project Member Comment 29 by bugdro...@chromium.org, Nov 5, 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f75faf53de4a5c59269143b6edbfc6dc40c7fb33

commit f75faf53de4a5c59269143b6edbfc6dc40c7fb33
Author: ymalik <ymalik@chromium.org>
Date: Thu Nov 05 20:15:46 2015

Make window.scroll properties relative to the layout viewport by default.

This CL sets the inert-visual-viewport flag to true by default. The following
APIs in the CSSOM spec are affected: scrollTo, scrollBy, innerWidth,
innerHeight, scrollX, scrollY, element.scrollTop, element.scrollLeft,
element.scrollIntoView.

Intent-to-ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/mt1uciFuvWQ/ecQi0f8kCQAJ

BUG=489206

Review URL: https://codereview.chromium.org/1416283006

Cr-Commit-Position: refs/heads/master@{#358117}

[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/LayoutTests/fast/dom/Window/window-scaled-viewport-properties-expected.txt
[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/LayoutTests/fast/dom/Window/window-scaled-viewport-properties.html
[delete] http://crrev.com/19da952f29e08aea0353513c1e36f2163d14c5ce/third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling-expected.txt
[delete] http://crrev.com/19da952f29e08aea0353513c1e36f2163d14c5ce/third_party/WebKit/LayoutTests/fast/dom/window-inner-size-scaling.html
[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html
[add] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event-expected.txt
[add] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/LayoutTests/fast/scroll-behavior/visual-viewport-scroll-no-onscroll-event.html
[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/Source/core/frame/Settings.in
[modify] http://crrev.com/f75faf53de4a5c59269143b6edbfc6dc40c7fb33/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Comment 30 by ymalik@chromium.org, Nov 10, 2015
Cc: e...@chromium.org tedc...@chromium.org
Issue 547859 has been merged into this issue.
Comment 31 by bokan@chromium.org, Nov 23, 2015
Cc: tbuck...@chromium.org
Issue 515120 has been merged into this issue.
Comment 32 by jsc...@chromium.org, Nov 30, 2015
Labels: Cr-Internals-PlatformIntegration
Status: Fixed
Labels: -M-47 M-48
Shipped in M48
I think this change is misguided. window.innerWidth and innerHeight *are* changed on zoom. Try this:

<button onclick="alert(window.innerWidth);">test</button>

...now open this in desktop Chrome or any browser, click "test", note the value. Zoom the page in and try again. The value changes as the inner dims absolutely do change on zoom.

Zoom should absolutely be visible to web pages/apps. This is the way it has always worked in Android WebView and it is the way it still works in all rendering engines on mobile, desktop, or otherwise.

What if I want a button to hover in the top right corner of the screen? How can I get the viewport inner dims now?

This new change just sets window.innerWidth = screen.width, so:
1) why bother having 2 variables if they are always the same?
2) how to get the viewport inner dimensions now?
Comment 36 by bokan@chromium.org, Jan 7, 2016
Reply in issue 571297
Comment 37 by bokan@chromium.org, Feb 2, 2016
Issue 515114 has been merged into this issue.
Comment 38 by bokan@chromium.org, Feb 24, 2016
Status: Started
Reopening this due to the revert in issue 571297
Components: -Blink Blink>Scroll
Sign in to add a comment