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

Issue 691375 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The color suggestion picker doesn't handle zooming well

Reported by ka...@opera.com, Feb 12 2017

Issue description

When zooming is applied to the document, the color suggestion picker can lose
or gain bottom pixels, which causes rendering artifacts or missing borders,
respectively.

This appears to be caused by some unfortunate assumptions and interactions
in Source/web/resources/colorSuggestionPicker.js and friends.

The color picker is a separate window, and the contents of the window is
generated in ColorChooserPopupUIController.cpp.  colorSuggestionPicker.js
resizes the window to exactly fit the content, but the zoom factor is applied
afterwards, causing an additional reflow (see WebPagePopupImpl.cpp:329).
There is no guarantee that the zoomed contents will fit the window any more,
and much of the time it doesn't.

 
Screen Shot of color-suggestion-picker-appearance-zoom200.png
58.9 KB View Download

Comment 1 by tkent@chromium.org, Feb 12 2017

Labels: Needs-Feedback
karlo@, do you work on this issue?
If so, please change the bug status to Assigned. Otherwise, please change it to Available and empty Owner field.

Comment 2 by ka...@opera.com, Feb 13 2017

Status: Assigned (was: Untriaged)
Apologies, fixed!
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 14 2017

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

commit 1b3b57df0600ecc1efa08e17d12110c04accba71
Author: karlo <karlo@opera.com>
Date: Tue Feb 14 23:30:51 2017

Reorder setting of zooming, to prevent reflowing and size mismatch.

When zooming is applied to the document, the color suggestion picker can lose
or gain bottom pixels, which causes missing borders or rendering artifacts.

This appears to be caused by some unfortunate assumptions and interactions
in Source/web/resources/colorSuggestionPicker.js and friends.

The color picker is a separate window, and the contents of the window is
generated in ColorChooserPopupUIController.cpp.  colorSuggestionPicker.js
resizes the window to exactly fit the content, but the zoom factor is applied
afterwards, causing an additional reflow (see WebPagePopupImpl.cpp:329).
There is no guarantee that the zoomed contents will fit the window any more,
and much of the time it doesn't.

By setting zoom factor before forcing layout, the final size is reached the first
time around, and the window size should be correct.

BUG= 691375 

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

[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/data-suggestion-picker-appearance-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/1b3b57df0600ecc1efa08e17d12110c04accba71/third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Comment 5 by tkent@chromium.org, Feb 19 2017

Labels: -Needs-Feedback M-58
Status: Fixed (was: Assigned)

Sign in to add a comment