New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638671 link

Starred by 11 users

Issue metadata

Status: Fixed
Merged: issue 633140
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 3
Type: Bug



Sign in to add a comment

resizeTo/resizeBy causes rendering problems in <select> dropdowns

Reported by mdicke...@gmail.com, Aug 17 2016

Issue description

Chrome Version       : 52.0.2743.116 m
URLs (if applicable) : <N/A>
Other browsers tested: 
   Chromium: FAIL 52.0.2743.0 
   Chromium: PASS 51.0.2704.0 
    Firefox: PASS 48
         IE: PASS 11

What steps will reproduce the problem?
(1) Open the attached resizebug.html
(2) Optionally, press "Popup" to open the page as a popup, the bug occurs in either case.
(3) Immediately after the page loads, try opening one of the dropdowns.
(4) It will not occur again until the page is refreshed

What is the expected result?

The dropdown appears directly below or directly above the select element.

What happens instead?

In the unstyled case:
    The dropdown appears offset from where it is supposed to appear.
When a transition style is applied to the select element:
    The dropdown contents is offset by black space. Some options are clipped and can't be clicked.

Additional information:

This only occurs when the resizeTo or resizeBy results in the window staying the same size.
This can happen in these cases:
  - resize function was not called from a popup, so resizing isn't allowed. 
  - a popup was already at the size passed to resizeTo
  - calling resizeBy(0,0)

The dropdowns return to normal after opening one, manually resizing the window, or moving the window.

I have only seen the black space happen using the transition style, but it might happen with others.
 
resizebug.html
1.3 KB View Download
2016-08-17 14_34_44-localhost_8090_test_resizebug.html - Chromium.png
23.5 KB View Download
2016-08-17 14_35_01-localhost_8090_test_resizebug.html - Chromium.png
25.2 KB View Download
2016-08-17 14_37_03-.png
1.7 MB View Download
Cc: dgozman@chromium.org
Components: Blink>Forms>Select
Labels: M-54 OS-Linux OS-Windows
Owner: bokan@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on Windows 10 and Ubuntu 14.04 using stable 52.0.2743.116.
This is a regression issue broken in M52.

Bisect info:
==============
Good : 52.0.2718.0 --389939
Bad : 52.0.2719.0 --390251

CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/9c6944d530898d73c02325c0a5c03a257dd7f208..15c6e50b51e8da0393a001a03c50b38f51eb1c01

Possible suspects from the above CL are:
https://codereview.chromium.org/1894333002
bokan@ : Could you please take a look into this if its related to your change as it talks about resize.
& https://codereview.chromium.org/1914023002
dgozman@ : Cced you as it may be related to your change.

Note : Its working fine on Mac 10.11.6.

Comment 2 by bokan@chromium.org, Aug 18 2016

Mergedinto: 633140
Status: Duplicate (was: Assigned)

Comment 3 by bokan@chromium.org, Aug 19 2016

Status: Assigned (was: Duplicate)
Actually, on closer inspection this is actually a separate bug.

Comment 4 by bokan@chromium.org, Aug 24 2016

Cc: rnimmagadda@chromium.org bokan@chromium.org
 Issue 640087  has been merged into this issue.

Comment 5 by mdicke...@gmail.com, Aug 26 2016

I found a different way of causing the black box bug to happen. 

1. Open the resizebug2.html attached to this comment.
2. Position the window so that the drop down would have to expand upwards.
3. Click the drop down

There is a click event attached to the select element which adds options to the list when it is clicked. In the case I observed this, the select list was being dynamically populated with the result of an AJAX request.

This is obviously bad practice, but it demonstrates the issue in a different way which hopefully is useful.

Browsers tested: 

   Chromium: FAIL 52.0.2743.0 
   Chromium: PASS 51.0.2704.0 
    Firefox: PASS 48
         IE: PASS 11



resizebug2.html
642 bytes View Download
2016-08-26 15_31_52-localhost_8090_test_resizebug2.html - Chromium.png
16.8 KB View Download

Comment 6 by bokan@chromium.org, Sep 7 2016

Cc: nyerramilli@chromium.org ranjitkan@chromium.org pbomm...@chromium.org
 Issue 642349  has been merged into this issue.

Comment 7 by bokan@chromium.org, Sep 9 2016

Status: Started (was: Assigned)

Comment 8 by bokan@chromium.org, Sep 12 2016

 Issue 645863  has been merged into this issue.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 23 2016

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

commit f8386d1d8f1268ef794fafef76d7dd5b372367a9
Author: bokan <bokan@chromium.org>
Date: Fri Sep 23 03:03:47 2016

Remove window.moveTo calls from picker-common.js

These moveTo calls appear to be unneeded and they don't work on the main window
anyway. Due to the way that RenderWidget caches move requests, this causes us to
return incorrect values for the windowRect until the browser resets the rect.

This appears to work correctly today due to a bug in how the pending_window_rect
gets cached in RenderWidget but makes it difficult to fix that bug. See related
CL: https://codereview.chromium.org/2333353002/

Note: This change affects only LayoutTests.

BUG= 638671 

Review-Url: https://codereview.chromium.org/2354273002
Cr-Commit-Position: refs/heads/master@{#420557}

[modify] https://crrev.com/f8386d1d8f1268ef794fafef76d7dd5b372367a9/third_party/WebKit/LayoutTests/fast/forms/resources/picker-common.js

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 5 2016

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

commit 6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c
Author: bokan <bokan@chromium.org>
Date: Wed Oct 05 00:55:21 2016

Don't set view_screen_rect_ on RequestMove ACK

In https://codereview.chromium.org/1894333002/ I made the OnRequestMoveAck
method reset the view_screen_rect_ variable to the pending rect. This was a
mistake because the move request is on the *window* rect, not the view rect.
Additionally, it's unnecessary since it's the browser's job to send an
UpdateScreenRects message to the renderer with the new view and window bounds.
This only happens for non-popup windows so popups will now store the view/window
rects immediately. This patch removes the reset in the Ack method.

In addition, the windowRect method confusingly returns the view_screen_rect or
pending_window_rect if there's a pending move. I've changed this to return the
window_screen_rect_ and added a viewRect method for callers that actually
expect the view. I also did some cleanup and replaced the redundant
RootWindowRect with windowRect.

BUG= 638671 

Review-Url: https://codereview.chromium.org/2333353002
Cr-Commit-Position: refs/heads/master@{#423030}

[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/content/renderer/gpu/gpu_benchmarking_extension.cc
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/content/renderer/render_view_impl.cc
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/content/renderer/render_widget.cc
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/content/renderer/render_widget.h
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize-expected.txt
[add] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize.html
[add] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/input-select-after-resize-expected.png
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/Source/web/ChromeClientImpl.cpp
[modify] https://crrev.com/6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c/third_party/WebKit/public/web/WebWidgetClient.h

Labels: ReleaseBlock-Stable
Labels: Merge-Request-54
Confirmed fix in Canary. Requesting merge to M54. Note, this is related and required to merge the fix in  issue 653327 .

Comment 13 by dimu@chromium.org, Oct 6 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 6 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7941224be415b3ba40c1e1e536b7545b215e4560

commit 7941224be415b3ba40c1e1e536b7545b215e4560
Author: David Bokan <bokan@chromium.org>
Date: Thu Oct 06 13:47:41 2016

Don't set view_screen_rect_ on RequestMove ACK

In https://codereview.chromium.org/1894333002/ I made the OnRequestMoveAck
method reset the view_screen_rect_ variable to the pending rect. This was a
mistake because the move request is on the *window* rect, not the view rect.
Additionally, it's unnecessary since it's the browser's job to send an
UpdateScreenRects message to the renderer with the new view and window bounds.
This only happens for non-popup windows so popups will now store the view/window
rects immediately. This patch removes the reset in the Ack method.

In addition, the windowRect method confusingly returns the view_screen_rect or
pending_window_rect if there's a pending move. I've changed this to return the
window_screen_rect_ and added a viewRect method for callers that actually
expect the view. I also did some cleanup and replaced the redundant
RootWindowRect with windowRect.

BUG= 638671 

Review-Url: https://codereview.chromium.org/2333353002
Cr-Commit-Position: refs/heads/master@{#423030}
(cherry picked from commit 6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c)

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

Cr-Commit-Position: refs/branch-heads/2840@{#662}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/gpu/gpu_benchmarking_extension.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_view_impl.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_widget.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_widget.h
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize-expected.txt
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize.html
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/input-select-after-resize-expected.png
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/Source/web/ChromeClientImpl.cpp
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/public/web/WebWidgetClient.h

Status: Fixed (was: Started)
Labels: TE-Verified-54.0.2840.59 TE-Verified-M54
Tested this issue on Windows-10 and Ubuntu 14.04 using chrome latest Beta M54-54.0.2840.59  by following steps mentioned in the original comment. Observed drop down appears directly below the select element as expected. Hence adding TE-Verified label.

638671.mp4
1020 KB View Download
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 27 2016

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

commit 7941224be415b3ba40c1e1e536b7545b215e4560
Author: David Bokan <bokan@chromium.org>
Date: Thu Oct 06 13:47:41 2016

Don't set view_screen_rect_ on RequestMove ACK

In https://codereview.chromium.org/1894333002/ I made the OnRequestMoveAck
method reset the view_screen_rect_ variable to the pending rect. This was a
mistake because the move request is on the *window* rect, not the view rect.
Additionally, it's unnecessary since it's the browser's job to send an
UpdateScreenRects message to the renderer with the new view and window bounds.
This only happens for non-popup windows so popups will now store the view/window
rects immediately. This patch removes the reset in the Ack method.

In addition, the windowRect method confusingly returns the view_screen_rect or
pending_window_rect if there's a pending move. I've changed this to return the
window_screen_rect_ and added a viewRect method for callers that actually
expect the view. I also did some cleanup and replaced the redundant
RootWindowRect with windowRect.

BUG= 638671 

Review-Url: https://codereview.chromium.org/2333353002
Cr-Commit-Position: refs/heads/master@{#423030}
(cherry picked from commit 6b08cd23a5bbe4e1d95bb7e0431fc743e6b0180c)

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

Cr-Commit-Position: refs/branch-heads/2840@{#662}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/gpu/gpu_benchmarking_extension.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_view_impl.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_widget.cc
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/content/renderer/render_widget.h
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize-expected.txt
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/fast/forms/select/input-select-after-resize.html
[add] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/input-select-after-resize-expected.png
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/Source/web/ChromeClientImpl.cpp
[modify] https://crrev.com/7941224be415b3ba40c1e1e536b7545b215e4560/third_party/WebKit/public/web/WebWidgetClient.h

Sign in to add a comment