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

Issue 701235 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 665272



Sign in to add a comment

ComputedStyle of the overflow shorthand property returns either overflow-x and overflow-y

Project Member Reported by shend@chromium.org, Mar 14 2017

Issue description

Chrome 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".
 
Labels: Update-Monthly
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by shend@chromium.org, Apr 5 2017

Status: Fixed (was: Assigned)

Sign in to add a comment