Closed Bug 1387951 Opened 8 years ago Closed 8 years ago

stylo: Make interpolation behavior of -moz-image-region with 'auto' value match with gecko

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: boris, Assigned: hiro)

References

Details

Attachments

(3 files)

-moz-image-region and clip use ClipRectOrAuto, and I got these failures: TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html | rect-valued property -moz-image-region: interpolation of rects - got "rect(0px, 4px, 4px, 2px)", expected "rect(3px, 13px, 10px, 5px)" TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html | rect-valued property -moz-image-region: can't interpolate auto components - got "rect(0px, 4px, 4px, 2px)", expected "auto" TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html | rect-valued property clip: can't interpolate auto components - got "rect(0px, 6px, 4px, auto)", expected "auto" It seems the interpolation of ClipRectOrAuto is not correct. Besides, ColorOrAuto is also not correct while using "auto": TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html | color-valued property caret-color: not interpolatable between auto and rgb color - got "rgb(0, 0, 0)", expected "rgb(51, 102, 153)" I remember Either<T, Auto> is a known issue, but still need this bug to track it.
The test cases that use 'auto' should also be resolved by bug 1355761. (In reply to Boris Chiou [:boris] from comment #0) > -moz-image-region and clip use ClipRectOrAuto, and I got these failures: > > TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html > | rect-valued property -moz-image-region: interpolation of rects - got > "rect(0px, 4px, 4px, 2px)", expected "rect(3px, 13px, 10px, 5px)" I have no idea about this test case at first glance.
Depends on: 1355761
Thanks for making this dependency. :)
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1) > The test cases that use 'auto' should also be resolved by bug 1355761. > > (In reply to Boris Chiou [:boris] from comment #0) > > -moz-image-region and clip use ClipRectOrAuto, and I got these failures: > > > > TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html > > | rect-valued property -moz-image-region: interpolation of rects - got > > "rect(0px, 4px, 4px, 2px)", expected "rect(3px, 13px, 10px, 5px)" > > I have no idea about this test case at first glance. File bug 1390067 for this.
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1) > The test cases that use 'auto' should also be resolved by bug 1355761. > > (In reply to Boris Chiou [:boris] from comment #0) > > -moz-image-region and clip use ClipRectOrAuto, and I got these failures: > > > > TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_per_property.html > > | rect-valued property -moz-image-region: interpolation of rects - got > > "rect(0px, 4px, 4px, 2px)", expected "rect(3px, 13px, 10px, 5px)" > > I have no idea about this test case at first glance. I am going to reuse this bug for this particular issue. Other 'auto' problem should be handled in bug 1387939.
No longer depends on: 1355761
Summary: stylo: Interpolation of ClipRectOrAuto or ColorOrAuto is not correct in test_transitions_per_property.html → stylo: Make interpolation behavior of -moz-image-region with 'auto' value match with gecko
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
Comment on attachment 8896950 [details] Bug 1387951 - Enable test_discrete-animations.html on stylo. https://reviewboard.mozilla.org/r/168246/#review173418
Attachment #8896950 - Flags: review?(dakatsuka) → review+
Comment on attachment 8896951 [details] Bug 1387951 - Don't convert zero component value to 'auto' in clone__moz_image_region. https://reviewboard.mozilla.org/r/168248/#review173420 ::: layout/style/test/test_transitions_per_property.html:2143 (Diff revision 1) > is(cs.getPropertyValue(prop), "rect(0px, 6px, 4px, auto)", > "rect-valued property " + prop + ": can't interpolate auto components"); > - div.style.setProperty(prop, "rect(0px, 6px, 4px, 2px)", ""); > + } else { > + is(prop, "-moz-image-region"); > + // Bug 1390067: -moz-image-region should behave just like clip does. > + is(cs.getPropertyValue(prop), "rect(2.25px, 11.25px, 8.5px, 3.75px)", We should make this todo_is() and use the same expected value as the above case before landing, but I just wanted to make this change clear what happens currently.
Blocks: 1387939
(In reply to Hiroyuki Ikezoe (:hiro) from comment #5) > https://treeherder.mozilla.org/#/ > jobs?repo=try&revision=972e7a45c33d81ca79298f8e26142cb32b9f759b Oops, I did push the try based on an old revision. Also the test case which was added in test_discrete-animations.html relies on a patch for bug 1387939. I am going to drop the case here.
Comment on attachment 8896951 [details] Bug 1387951 - Don't convert zero component value to 'auto' in clone__moz_image_region. https://reviewboard.mozilla.org/r/168248/#review173752 ::: layout/style/test/test_transitions_per_property.html:2146 (Diff revision 2) > + if (prop == "clip") { > is(cs.getPropertyValue(prop), "rect(0px, 6px, 4px, auto)", > "rect-valued property " + prop + ": can't interpolate auto components"); > - div.style.setProperty(prop, "rect(0px, 6px, 4px, 2px)", ""); > + } else { > + is(prop, "-moz-image-region"); Only clip and -moz-image-region use this function, so it's fine for now. However, it would be better to make it more general. ::: layout/style/test/test_transitions_per_property.html:2152 (Diff revision 2) > + is(cs.getPropertyValue(prop), "rect(2.25px, 11.25px, 8.5px, 3.75px)", > + "rect-valued property " + prop + ": can't interpolate auto components"); I think we should also update the description because this is not an expected result, right?
Attachment #8896951 - Flags: review?(boris.chiou) → review+
(In reply to Boris Chiou [:boris] from comment #13) > Comment on attachment 8896951 [details] > Bug 1387951 - Don't convert zero component value to 'auto' in > clone__moz_image_region. > > https://reviewboard.mozilla.org/r/168248/#review173752 > > ::: layout/style/test/test_transitions_per_property.html:2146 > (Diff revision 2) > > + if (prop == "clip") { > > is(cs.getPropertyValue(prop), "rect(0px, 6px, 4px, auto)", > > "rect-valued property " + prop + ": can't interpolate auto components"); > > - div.style.setProperty(prop, "rect(0px, 6px, 4px, 2px)", ""); > > + } else { > > + is(prop, "-moz-image-region"); > > Only clip and -moz-image-region use this function, so it's fine for now. > However, it would be better to make it more general. Indeed. The situation is annoying. I'd really want to enable stylo on Android and drop the Gecko code prior to using this test for a new property. :) > ::: layout/style/test/test_transitions_per_property.html:2152 > (Diff revision 2) > > + is(cs.getPropertyValue(prop), "rect(2.25px, 11.25px, 8.5px, 3.75px)", > > + "rect-valued property " + prop + ": can't interpolate auto components"); > > I think we should also update the description because this is not an > expected result, right? Right. I am going to flip 'is' to 'todo_is'.
Attached file Servo PR
Pushed by hikezoe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a960422510cc Enable test_discrete-animations.html on stylo. r=daisuke https://hg.mozilla.org/integration/autoland/rev/b4b58cf12108 Don't convert zero component value to 'auto' in clone__moz_image_region. r=boris
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: