|
|
Chromium Code Reviews|
Created:
4 years, 3 months ago by malaykeshav Modified:
4 years, 3 months ago CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1 Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionApplies zoom factor to the spinner size
The spinner element was not being scaled on browser zoom before this
modification. This also led to the same spinner element being laid out
differently when displayed on HiDPI displays with zoom-for-dsf enabled.
BUG=640256
COMPONENT=Layout Theme, Zoom DSF
Committed: https://crrev.com/cfafa095f265ed2921a85b75165548d83e9c8339
Cr-Commit-Position: refs/heads/master@{#420185}
Patch Set 1 #Patch Set 2 : Applies zoom factor to the spinner size #
Messages
Total messages: 29 (14 generated)
The CQ bit was checked by malaykeshav@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
malaykeshav@chromium.org changed reviewers: + oshima@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Description was changed from ========== Applies zoom factor to the spinner size The spinner element was not being scaled on browser zoom before this modification. BUG=640256 COMPONENT=Layout Theme, Zoom DSF ========== to ========== Applies zoom factor to the spinner size The spinner element was not being scaled on browser zoom before this modification. This also led to the same spinner element being laid out differently when displayed on HiDPI displays with zoom-for-dsf enabled. BUG=640256 COMPONENT=Layout Theme, Zoom DSF ==========
The CQ bit was checked by malaykeshav@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
malaykeshav@chromium.org changed reviewers: + wangxianzhu@chromium.org
PTAL.
Is this the standard way to apply zoom factor? How do we apply zoom for a width like '1.5em'?
On 2016/09/21 at 19:04:23, wangxianzhu wrote: > Is this the standard way to apply zoom factor? How do we apply zoom for a width like '1.5em'? Effectively, when we view an element on a 2x (or 1.5x or 1.25x) display, the element should cover as many logical pixels on the screen as the element would cover on a 1x display. A browser zoom should not change the relative positioning or layout of the elements when used as a mode of scaling for different DPI screens. In the current bug, all the elements of the date picker were being scaled except for the spinner element which led to it being displayed differently based on the level of browser zoom. Multiplying its dimensions by effective zoom, scales it to match the rest of its already scaled siblings and parent. I am not sure how the use of 1.5em as size would have an effect on this. Waiting for @oshima to pitch in.
malaykeshav@chromium.org changed reviewers: + bsep@chromium.org
@oshima is OOO this week. Adding @bsep
I think we should not apply zoom in this way. We should let the theme engine return sizes in zoom-neutral units instead of the fixed unit.
On 2016/09/21 19:57:34, Xianzhu wrote: > I think we should not apply zoom in this way. We should let the theme engine > return sizes in zoom-neutral units instead of the fixed unit. lgtm I'm not very familiar with this code, but the zoom level is used the same way elsewhere in this file. This is reasonable to me as a targeted fix.
OK. lgtm. However, I feel we should optimize how we apply zoom.
On 2016/09/21 at 19:57:34, wangxianzhu wrote: > I think we should not apply zoom in this way. We should let the theme engine return sizes in zoom-neutral units instead of the fixed unit. The theme engine returns the sizes in CSS pixels to which the browser zoom is applied and used for layout.
The CQ bit was checked by malaykeshav@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Applies zoom factor to the spinner size The spinner element was not being scaled on browser zoom before this modification. This also led to the same spinner element being laid out differently when displayed on HiDPI displays with zoom-for-dsf enabled. BUG=640256 COMPONENT=Layout Theme, Zoom DSF ========== to ========== Applies zoom factor to the spinner size The spinner element was not being scaled on browser zoom before this modification. This also led to the same spinner element being laid out differently when displayed on HiDPI displays with zoom-for-dsf enabled. BUG=640256 COMPONENT=Layout Theme, Zoom DSF Committed: https://crrev.com/cfafa095f265ed2921a85b75165548d83e9c8339 Cr-Commit-Position: refs/heads/master@{#420185} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/cfafa095f265ed2921a85b75165548d83e9c8339 Cr-Commit-Position: refs/heads/master@{#420185}
Message was sent while issue was closed.
Sorry I'm not familiar with the area. A dumb question: for a css 'width: 15px', and zoom==2, does the zoom double the size of CSS pixels (so computed width is still 15px) or double the computed width to 30px?
Message was sent while issue was closed.
On 2016/09/21 at 23:26:23, wangxianzhu wrote: > Sorry I'm not familiar with the area. A dumb question: for a css 'width: 15px', and zoom==2, does the zoom double the size of CSS pixels (so computed width is still 15px) or double the computed width to 30px? Logical width would still be 15px. But if it too x physical pixels to draw the line of width 15px on 100% browser zoom, then it would take 2 times the number of physical pixels (2 * x pixels) to draw the same line on 200% browser zoom.
Message was sent while issue was closed.
On 2016/09/22 at 01:25:30, malaykeshav wrote: > On 2016/09/21 at 23:26:23, wangxianzhu wrote: > > Sorry I'm not familiar with the area. A dumb question: for a css 'width: 15px', and zoom==2, does the zoom double the size of CSS pixels (so computed width is still 15px) or double the computed width to 30px? > > Logical width would still be 15px. But if it too x physical pixels to draw the line of width 15px on 100% browser zoom, then it would take 2 times the number of physical pixels (2 * x pixels) to draw the same line on 200% browser zoom. took* |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
