Add the concept of resolved values.

RESOLVED FIXED in Firefox 68

Status

()

defect
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: emilio, Assigned: emilio)

Tracking

(Blocks 2 bugs)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(5 attachments)

We need this at least:

  • To properly resolve nested colors / currentColor in properties (right now we have this hack, which works for all colors, but not for all properties that can transitively contain colors from this list

  • To eventually, maybe, move layout-dependent properties over to Servo as well.

  • To properly serialize shorthands from GetComputedStyle. Right now we're using the AnimationValue machinery to uncompute. That's not ok in the general case.

So it's about time.

Assignee

Updated

2 months ago
Depends on: 1542179

Comment 6

2 months ago
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a7766ece186
Add derive code for a new ToResolvedValue trait, and a few trivial implementations. r=heycam
https://hg.mozilla.org/integration/autoland/rev/7da7a8bc596a
Derive ToResolvedValue. r=heycam
https://hg.mozilla.org/integration/autoland/rev/152985a87c01
Use ToResolvedValue for computed style serialization. r=heycam
https://hg.mozilla.org/integration/autoland/rev/e5a602010961
Fix ToResolvedValue implementation for caret-color, and serialize some color properties with Servo. r=heycam
https://hg.mozilla.org/integration/autoland/rev/7fbaca51f682
Serialize more non-problematic properties with Servo. r=heycam

Backed out 5 changesets (Bug 1542178) for for test_flexbox_flex_shorthand.html failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=os%2Cx%2C10.10%2Cdebug%2Cmochitests%2Cwith%2Ce10s%2Ctest-macosx64%2Fdebug-mochitest-e10s-5%2Cm-e10s%285%29&fromchange=1fe827432de458d397fcfc78280bed57291ffc6f&tochange=e0edc59f9158d65e91a45cb6b1d96d75b5998da3&selectedJob=239334469

Backout link: https://hg.mozilla.org/integration/autoland/rev/e0edc59f9158d65e91a45cb6b1d96d75b5998da3

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=239334469&repo=autoland&lineNumber=3612

13:59:43 INFO - TEST-START | layout/style/test/test_flexbox_flex_shorthand.html
13:59:43 INFO - GECKO(853) | ++DOMWINDOW == 34 (0x11d43e400) [pid = 855] [serial = 356] [outer = 0x128829d40]
13:59:44 INFO - TEST-INFO | started process screencapture
13:59:44 INFO - TEST-INFO | screencapture: exit 0
13:59:44 INFO - Buffered messages logged at 13:59:44
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: "
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: "
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: "
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: initial"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: initial"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: initial"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: none"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: none"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: none"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 5"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: 5"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 5"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 1000"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: 1000"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 1000"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 0.0000001"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: 0.0000001"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 0.0000001"
13:59:44 INFO - Buffered messages finished
13:59:44 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 20000000" - got "20000000", expected "2e+7"
13:59:44 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:320:16
13:59:44 INFO - runFlexShorthandTest/<@layout/style/test/test_flexbox_flex_shorthand.html:261:5
13:59:44 INFO - runFlexShorthandTest@layout/style/test/test_flexbox_flex_shorthand.html:255:31
13:59:44 INFO - main@layout/style/test/test_flexbox_flex_shorthand.html:272:27
..
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 5%"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: auto"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: auto"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: auto"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: -moz-fit-content"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: -moz-fit-content"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: -moz-fit-content"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: calc(5px + 6px)"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: calc(5px + 6px)"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: calc(5px + 6px)"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: calc(15% + 30px)"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: calc(15% + 30px)"
13:59:44 INFO - Not taking screenshot here: see the one that was previously logged
13:59:44 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: calc(15% + 30px)" - got "calc(15% + 30px)", expected "calc(30px + 15%)"
13:59:44 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:320:16
13:59:44 INFO - runFlexShorthandTest/<@layout/style/test/test_flexbox_flex_shorthand.html:261:5
13:59:44 INFO - runFlexShorthandTest@layout/style/test/test_flexbox_flex_shorthand.html:255:31
13:59:44 INFO - main@layout/style/test/test_flexbox_flex_shorthand.html:272:27
13:59:44 INFO - @layout/style/test/test_flexbox_flex_shorthand.html:275:1
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 0 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-shrink" when we set "flex: 0 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-basis" when we set "flex: 0 0"
13:59:44 INFO - TEST-PASS | layout/style/test/test_flexbox_flex_shorthand.html | Computed value of subproperty "flex-grow" when we set "flex: 0 2"
..

Flags: needinfo?(emilio)

Comment 8

2 months ago
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/b8e84c48c672
Add derive code for a new ToResolvedValue trait, and a few trivial implementations. r=heycam
https://hg.mozilla.org/integration/autoland/rev/79752758fc82
Derive ToResolvedValue. r=heycam
https://hg.mozilla.org/integration/autoland/rev/11dcdb94e2fa
Use ToResolvedValue for computed style serialization. r=heycam
https://hg.mozilla.org/integration/autoland/rev/5ce09292f6bf
Fix ToResolvedValue implementation for caret-color, and serialize some color properties with Servo. r=heycam
https://hg.mozilla.org/integration/autoland/rev/3a101d5a14bb
Serialize more non-problematic properties with Servo. r=heycam
Assignee

Updated

2 months ago
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.