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}
Committed:
https://chromium.googlesource.com/chromium/src/+/1b3b57df0600ecc1efa08e17d12110c04accba71