[webkit-dev] Add support for CSS3 text-decoration* properties

Ryosuke Niwa rniwa at webkit.org
Thu Aug 2 23:01:29 PDT 2012

On Thu, Aug 2, 2012 at 9:43 PM, Bruno Abinader <brunoabinader at gmail.com>wrote:
>  On Thu, Aug 2, 2012 at 6:10 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> > Does the spec require to return new values in the computed style of
> > text-decoration property without authors specifying new text-decoration
> > properties and values?
> >
> > If not, then using text-decoration property is probably better because
> it'll
> > only affect those authors who have used new properties and values.
> >
> > - Ryosuke
> >
> If I got it right you are asking if it is necessary to designate
> values for all longhand properties from "text-decoration". The answer
> is no, based on what the specification says:
> "This property is a shorthand for setting ‘text-decoration-line’,
> ‘text-decoration-color’, and ‘text-decoration-style’ in one
> declaration. Omitted values are set to their initial values. A
> ‘text-decoration’ declaration that omits both the
> ‘text-decoration-color’ and ‘text-decoration-style’ values is
> backwards-compatible with CSS Levels 1 and 2."
> Speaking about it, I did finished a refactory on the "text-decoration"
> property that now becomes a shorthand (thus removing the necessity of
> having "-webkit-text-decoration" property), like CSS3 specifies.
> Though I haven't upstreamed it to Bugzilla yet, it is fully
> backwards-compatible with previous CSS specifications. I do have,
> however, a small set of questions to ask before publishing it for
> review:
> 1. I had a full layout test run and noticed a few test failures, but
> not exactly failures. The reason they failed is because the computed
> style expected something like "text-decoration: underline" and now it
> produces "text-decoration-line: underline". Is it ok to update the
> test expectations on these cases? IMO It doesn't makes sense having a
> shorthand property behaving like a longhand one anymore.

We need to be careful here. Computed styles are used in editing and markup
generated (including style attribute values) need to be understood properly
by old UAs. It's not sufficient that only WebKit with/without your patch
can parse it correctly.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120802/81a79c7a/attachment.html>

More information about the webkit-dev mailing list