CSSStyleRule cssText does not preserve border radius shorthand
Reported by
j...@netrivet.com,
Feb 28 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Steps to reproduce the problem: https://codepen.io/j-arens/pen/eVxpGz What is the expected behavior? Expected cssText to preserve border radius shorthand What went wrong? getting the cssText of an element with a shorthand border radius property does not preserve forward slashes. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 64.0.3282.140 Channel: n/a OS Version: OS X 10.12.6 Flash Version:
,
Mar 1 2018
+nainar@, alancutter@ for some advice here. It looks like the incorrect serialization comes from StylePropertySerializer but ComputedStyleUtils::ValueForBorderRadiusShorthand() (called by BorderRadius::CSSValueFromComputedStyleInternal()) creates a CSSValueList which, if serialized, should generate the correct output. It doesn't look like there's any interaction between StylePropertySerializer and calling CSSValueFromComputedStyle methods, but I haven't touched this part of the code yet. Is there any way we can re-use that value from CSSValueFromComputedStyleInternal() so that we don't duplicate the same code in StylePropertySerializer?
,
Mar 2 2018
That's some pretty complicated logic in ValueForBorderRadiusShorthand(). It would be best to avoid duplicating it. What you could do is create a wrapper class that abstracts the ComputedStyle/StylePropertySet data representation and rewrite ValueForBorderRadiusShorthand() to use the wrapper and perhaps rename it to SimplifiedBorderRadiusCSSValue().
,
Mar 25 2018
WebKit also fails to preserve forward slash in border-radius inline style. https://bugs.webkit.org/show_bug.cgi?id=183994
,
Aug 20
,
Dec 23
Issue 917522 has been merged into this issue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by cnardi@chromium.org
, Feb 28 2018Status: Assigned (was: Unconfirmed)