New issue
Advanced search Search tips

Issue 816803 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 545318



Sign in to add a comment

[css-typed-om] ComputedStylePropertyMap should return computed values.

Project Member Reported by shend@chromium.org, Feb 27 2018

Issue description

ComputedStylePropertyMap should return computed values. Most of the time, this is what passing a null layout_object to CSSProperty::CSSValueFromComputedStyle gives, but sometimes it's wrong (e.g. transforms).

We should have a separate code path to return the correct computed values for these special cases.

Spec: https://drafts.css-houdini.org/css-typed-om-1/#computed-stylepropertymapreadonly-objects
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 28 2018

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

commit a2f6e294710de95febce102e645c7f4f7633b0b6
Author: Darren Shen <shend@chromium.org>
Date: Wed Feb 28 11:11:34 2018

[css-typed-om] Return transform components for computed transform.

ComputedStylePropertyMap should return computed values. For 'transform',
that's "as specified, but relative lengths converted to absolute" [1].
This means we need to return the individual transform components like
'translate3d'.

Currently there's no code to do this, so we have to roll our own.

[1] https://drafts.csswg.org/css-transforms-1/#propdef-transform

Bug:  816803 
Change-Id: I64305512fa0d0ce32ba86ea2b14595b551ff1c8d
Reviewed-on: https://chromium-review.googlesource.com/938885
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539783}
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js
[delete] https://crrev.com/c1901d7376ba846eaef0998c4b28afa9a2bafcf2/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/transform-expected.txt
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h
[modify] https://crrev.com/a2f6e294710de95febce102e645c7f4f7633b0b6/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h

Comment 2 by shend@chromium.org, Feb 28 2018

For the properties that we are shipping, I think the only case that we can't easily fix is font-style: oblique, which currently computes to italic. I don't think ComputedStyle currently can differentiate the two.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 1 2018

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

commit 37888af471588e4821c9ca2edf3ec6decf1b77a8
Author: Darren Shen <shend@chromium.org>
Date: Thu Mar 01 19:41:28 2018

[css-typed-om] Fix computed value of an interpolated transform.

Previously we did not handle the case of computing the value of an
interpolated transform, which occurs when we interpolate between
two different transform types containing percentages.

The correct result is currently not spec'd [1], so this patch fixes this
by just returning "none" in this case.

[1] https://github.com/w3c/css-houdini-drafts/issues/425

Bug:  816803 
Change-Id: I97c8f6b71f651a8d547fb4cb307121eba7dabdb6
Reviewed-on: https://chromium-review.googlesource.com/942595
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540258}
[add] https://crrev.com/37888af471588e4821c9ca2edf3ec6decf1b77a8/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/the-stylepropertymap/properties/transform-interpolated.html
[modify] https://crrev.com/37888af471588e4821c9ca2edf3ec6decf1b77a8/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp

Comment 4 by shend@chromium.org, Mar 20 2018

Status: Fixed (was: Available)
Going to close this bug & open more specific ones.

Sign in to add a comment