New issue
Advanced search Search tips

Issue 803688 link

Starred by 3 users

Issue metadata

Status: Fixed
Merged: issue 803739
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 545318



Sign in to add a comment

[css-typed-om] Implement CSSMathValue serialization

Project Member Reported by shend@chromium.org, Jan 19 2018

Issue description

Need to follow the resolution in https://github.com/w3c/css-houdini-drafts/issues/489

Note that we have not implemented calc lv4, so we don't have features like min/max. I think we should just throw an exception in these cases.
 

Comment 1 by shend@chromium.org, Jan 24 2018

Mergedinto: 803739
Status: Duplicate (was: Available)

Comment 2 by shend@chromium.org, Jan 30 2018

Status: Available (was: Duplicate)
Reopening this since we have a new serialization algorithm: https://github.com/w3c/css-houdini-drafts/commit/42a9ff03716e0a0282db419b7d7c059fbd5a87a1

Currently, for all the stylevalue subclasses, we've implemented serialization by first converting to CSSValues and then using the CSSOM serialization. However, this won't work for CSSMathValues, as a lot of features are missing from calc CSSValues.

We should just allow subclasses to override the ToString function if they can't use the existing CSSOM serialization.

Comment 3 by shend@chromium.org, Jan 31 2018

Owner: shend@chromium.org
Status: Assigned (was: Available)
Project Member

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

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

commit 3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2
Author: Darren Shen <shend@chromium.org>
Date: Thu Feb 01 02:18:26 2018

[css-typed-om] Implement CSSMathValue serialization.

This patch implements the new CSSMathValue serialization algorithm [1].
As explained in the bug, this serialization is impossible to do by
converting to CSSValues and then serializing them, so we have to
implement this from scratch.

We tried to make the code follow the spec algorithm as closely as
possible for easier understanding/verification.

[1] https://drafts.css-houdini.org/css-typed-om-1/#calc-serialization

Bug:  803688 
Change-Id: I48987d2b76b0bac55389a014588f3fe40aecf10a
Reviewed-on: https://chromium-review.googlesource.com/896422
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533530}
[delete] https://crrev.com/482fd9a30baa5066f8f44bd8484bcb7b3b5ea918/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative-expected.txt
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/LayoutTests/external/wpt/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathInvert.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathInvert.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathMax.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathMax.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathMin.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathMin.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathNegate.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathNegate.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathProduct.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathProduct.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathSum.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSMathSum.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSNumericValue.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.h
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSStyleValue.idl
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp
[modify] https://crrev.com/3ce9c7d39f0e493c5c1a0b334c701bed665dd8b2/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.h

Comment 5 by shend@chromium.org, Feb 1 2018

Status: Fixed (was: Assigned)
Looks fine for now.

Sign in to add a comment