Closed Bug 1738658 Opened 4 years ago Closed 4 years ago

Generalize resolved value code to deal with shorthands.

Categories

(Core :: DOM: CSS Object Model, defect)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

No description provided.

This removes the various assumptions that the animation code does.

Code size might be a concern, we can optimize if it is a problem,
but let's do the obvious thing for now.

The code introduced above deals with currentColor correctly, so we
should be able to do this now.

Depends on D130017

Are there more parts coming?
With the above two patches I still just get "rgb(0, 0, 0)" from window.getComputedStyle(document.documentElement).textDecoration whereas I was expecting "none solid rgb(0, 0, 0)" as in Chrome.

Flags: needinfo?(emilio)

I guess I need bug 1738663 too maybe?

rgb(0, 0, 0) is a valid serialization for the text-decoration shorthand. I haven't changed how we serialize (the Servo and C++ code seem to be consistent which is good).

These two patches on their own shouldn't change behavior. With bug 1738663 you should be able to toggle the pref and query stuff like getComputedStyle(document.documentElement).margin or such.

Flags: needinfo?(emilio)
Attached file Testcase #1

OK, I was confused and thought these patches would fix bug 137688...
Anyway, here's the test I was using. Chrome says:

gCS = none solid rgb(0, 0, 0)
gPV = none solid currentcolor

I believe their gCS result is correct, which is what bug 137688 is aiming to fix eventually, right?
I think their gPV result is incorrect since it should be the canonical (shortest) form which is none. So we handle this correctly.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7bbef9141d91 Generalize resolved style code to deal with all shorthands. r=jwatt https://hg.mozilla.org/integration/autoland/rev/95eb93857e87 Serialize text-decoration using Servo. r=layout-reviewers,mats
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressions: 1739357
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: