Closed
Bug 1388216
Opened 7 years ago
Closed 7 years ago
stylo: Rendering of afr.com differs between stylo enabled and disabled nightly
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
People
(Reporter: bryce, Assigned: boris)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files, 1 obsolete file)
http://www.afr.com/ displays differently in nightly based on stylo being toggled on or off. When toggled on the main.main element is styled with NaN dimensions. In a debug build this results in hitting an assert (see attached stack trace).
Blocks: stylo-site-issues
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Thanks for pinpointing the issue, Bryce.
The specified value of main.main's transform is rotate3d(0, 0, 0, 0), and the conversion to a computed value here:
http://searchfox.org/mozilla-central/rev/bd39b6170f04afeefc751a23bb04e18bbd10352b/servo/components/style/properties/longhand/box.mako.rs#1414-1421
is dividing by zero. Boris I think you were looking at 3D transforms at one point, do you want to look at fixing this?
Flags: needinfo?(boris.chiou)
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #2)
> Thanks for pinpointing the issue, Bryce.
>
> The specified value of main.main's transform is rotate3d(0, 0, 0, 0), and
> the conversion to a computed value here:
>
>
> http://searchfox.org/mozilla-central/rev/
> bd39b6170f04afeefc751a23bb04e18bbd10352b/servo/components/style/properties/
> longhand/box.mako.rs#1414-1421
>
> is dividing by zero. Boris I think you were looking at 3D transforms at one
> point, do you want to look at fixing this?
OK. Interesting, it uses (0,0,0) as the direction vector.
Flags: needinfo?(boris.chiou)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → boris.chiou
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Boris Chiou [:boris] from comment #3)
> OK. Interesting, it uses (0,0,0) as the direction vector.
s/direction/rotate axis/
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8894823 [details]
Bug 1388216 - Don't apply the rotation if it cannot be normalized.
https://reviewboard.mozilla.org/r/165950/#review171106
::: servo/components/style/properties/longhand/box.mako.rs:1420
(Diff revision 1)
> - result.push(computed_value::ComputedOperation::Rotate(ax / len, ay / len, az / len, theta));
> + // https://www.w3.org/TR/css-transforms-1/#funcdef-rotate3d
> + // Spec: A direction vector that cannot be normalized, such as [0,0,0],
> + // will cause the rotation to not be applied. Therefore, we don't push this
> + // transform operation into the result.
> + if len > 0. {
Yeah, I think it's wrong that Servo is doing the normalization here, since the spec says that the computed value of transform should just be the specified value with units made absolute.
(Although Gecko and other browsers just return a matrix() or matrix3d() from getComputedStyle, so I'm not sure how accurate the spec is.)
So do you think it could make sense to just append the value without normalizing here? Then Gecko should still skip this item in ProcessRotate3D.
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8894824 [details]
Bug 1388216 - Add a rotate3d whose direction vector cannot be normalized into property_database.js.
https://reviewboard.mozilla.org/r/165980/#review171108
Attachment #8894824 -
Flags: review?(cam) → review+
Assignee | ||
Comment 9•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8894823 [details]
Bug 1388216 - Don't apply the rotation if it cannot be normalized.
https://reviewboard.mozilla.org/r/165950/#review171106
> Yeah, I think it's wrong that Servo is doing the normalization here, since the spec says that the computed value of transform should just be the specified value with units made absolute.
>
> (Although Gecko and other browsers just return a matrix() or matrix3d() from getComputedStyle, so I'm not sure how accurate the spec is.)
>
> So do you think it could make sense to just append the value without normalizing here? Then Gecko should still skip this item in ProcessRotate3D.
Yes. It makes sense and the behavior would be much closer to that in Gecko. I will update this. Thanks.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8894823 [details]
Bug 1388216 - Don't apply the rotation if it cannot be normalized.
https://reviewboard.mozilla.org/r/165950/#review171512
Looks good, thanks.
Attachment #8894823 -
Flags: review?(cam) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8894823 -
Attachment is obsolete: true
Assignee | ||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8b04b798e6b2
Add a rotate3d whose direction vector cannot be normalized into property_database.js. r=heycam
Comment 16•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 17•7 years ago
|
||
(In reply to Boris Chiou [:boris] from comment #14)
> Created attachment 8895200 [details] [review]
> Servo PR, #18016
Seen fixed in Nightly 57 x64 20170810100255 @ Debian Testing.
It's no longer white where you would expect the site's main content (a list of articles).
Broken in Nightly 57 x64 20170808114032 @ Windows 7,
but fixed in Nightly 57 x64 20170809100326 @ Windows 7.
Comment 18•7 years ago
|
||
Too late for 56. Mass won't fix for 56.
You need to log in
before you can comment on or make changes to this bug.
Description
•