New issue
Advanced search Search tips

Issue 728658 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

[ViewportAPI] Resize event not fired when viewport changes size by gaining or losing a scrollbar

Project Member Reported by bokan@chromium.org, Jun 1 2017

Issue description

Chrome Version: 61.0.3116.0
OS: All

What steps will reproduce the problem?
(0) Enable chrome://flags/#enable-experimental-web-platform-features
(1) Add an event listener to window.view for the 'resize' event
(2) Add overflow to the page so that a scrollbar appears.

What is the expected result?
The resize event is triggered.

What happens instead?
The resize event isn't triggered.

Test case attached.
 
viewport-scrollbars-cause-resize.html
1.9 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2fb058d75cf9c596bf29df6045bd618b0e742d77

commit 2fb058d75cf9c596bf29df6045bd618b0e742d77
Author: David Bokan <bokan@chromium.org>
Date: Thu Jun 01 19:25:12 2017

[ViewportAPI] Fire resize when scrollbars appear or disappear.

The window.view width and height attributes exclude any non-overlay
scrollbars. This means that if a scrollbar appears or disappears they'll
change values. According to the spec (and intuition) this should fire a
resize event but it doesn't.

This patch adds the resize event whenever the main frame loses or gains
a non-overlay scrollbar.

Bug:  728658 
Change-Id: I32359342e795a1390cbedc95330260f03e0e2066
Reviewed-on: https://chromium-review.googlesource.com/521362
Reviewed-by: David Tapuska <dtapuska@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476383}
[add] https://crrev.com/2fb058d75cf9c596bf29df6045bd618b0e742d77/third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-scrollbars-cause-resize.html
[modify] https://crrev.com/2fb058d75cf9c596bf29df6045bd618b0e742d77/third_party/WebKit/Source/core/frame/LocalFrameView.cpp

Comment 2 by bokan@chromium.org, Jun 1 2017

Status: Fixed (was: Started)

Sign in to add a comment