ComputedStyle of the overflow shorthand property returns either overflow-x and overflow-y |
||
Issue descriptionChrome Version: 57.0.2987.98 (Official Build) (64-bit) When an element has a different "overflow-x" and "overflow-y", the computed style of the "overflow" property should just be "", but Chrome returns the value of either overflow-x or overflow-y. To reproduce, https://jsfiddle.net/81sLz7m7/1/ contains a div with different overflow-x and overflow-y. Firefox shows "" as the computed overflow, but Chrome shows "scroll".
,
Apr 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784 commit 02c25323de5c3f16bb47d5dc6fc6c7b9a939b784 Author: shend <shend@chromium.org> Date: Mon Apr 03 00:20:05 2017 Return '' for overflow if overflow-x and overflow-y are different. According to the CSSOM spec [1], when overflow-x and overflow-y are different, the computed value of overflow should be the empty string since it cannot be expressed in the grammar (step 1.2.). However, we currently return the max of overflow-x and overflow-y in terms of their enum values, which does not follow the spec. Firefox handles this issue correctly. This patch fixes this issue by return an empty string if the two overflows are different. [1] https://drafts.csswg.org/cssom/#serialize-a-css-value [2] https://github.com/w3c/csswg-drafts/issues/1100 BUG= 701235 Review-Url: https://codereview.chromium.org/2752623002 Cr-Commit-Position: refs/heads/master@{#461352} [add] https://crrev.com/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784/third_party/WebKit/LayoutTests/fast/css/different-overflow-x-and-y.html [modify] https://crrev.com/02c25323de5c3f16bb47d5dc6fc6c7b9a939b784/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
,
Apr 5 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by joelhockey@chromium.org
, Mar 15 2017