Closed Bug 1390496 Opened 7 years ago Closed 7 years ago

stylo: Greensock documentation website's side panel flickers and is wrong size

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- wontfix
firefox57 --- fixed

People

(Reporter: callahad, Assigned: canova)

References

(Blocks 1 open bug, )

Details

(Keywords: DevAdvocacy)

Attachments

(3 files)

Attached video stylo-greensock.mp4
(See attached screencast)

STR:

1. Visit https://greensock.com/docs/
2. Navigate in the lefthand panel (TweenLite -> Back to Docs Home -> TweenLite -> Back to Docs Home)

Without Stylo:

- The panel remains a constant width and transitions smoothly between states

With Stylo:

- The panel rapidly flickers during the transition
- The panel content is mis-sized and does not fill its container

I can reliably reproduce this on Windows, macOS, and Linux.
Attached image stylo-greensock.png
Screenshot of broken state
Seems to be related animation.
Flags: needinfo?(hikezoe)
Has STR: --- → yes
Priority: -- → P1
Summary: stylo: Greensock documentation website broken when layout.css.servo.enabled → stylo: Greensock documentation website's side panel flickers and is wrong size
Assignee: nobody → hikezoe
Attached file A reduced case zip
Though I am trying to create a reduced test case based on the site, it seems that any animations are not involved with.  It's somewhat related to calc() value.

Attaching zip includes a reduced test case (but still lots of scripts there).
Flags: needinfo?(hikezoe)
Since it seems calc-related and not animation-related, I asked Nazim to take a look so that hiro can focus on animation stuff.

Hiro, let me know if you got further with your investigations since comment 3 and would like to continue it instead of having Nazim take over.
Assignee: hikezoe → canaltinova
Happy to leave this bug.:)  FWIW, though Nazim might notice already, on Stylo the width of the element in question is calc(98px), whereas on Gecko the width if calc(100% - 2px).
Just an hypotheses, but consider the following test-case:

<div style="width: calc(100% - 2px)"></div>
<script>alert(document.querySelector('div').style.width)</script>

Gecko and Chromium:

 * calc(100% - 2px)

(Note that Gecko and Chromium aren't compatible in more complex examples)

Stylo:

 * calc(-2px + 100%)

I _suspect_ the page is parsing it and changing the order is just freaking them a lot.

Also, look that we do something slightly fishy (not incorrect though!):

<div style="width: calc(2px - 100%)"></div>
<script>alert(document.querySelector('div').style.width)</script>

Stylo alerts "calc(2px + -100%)", which is super-weird...

So I'd try first fixing the second case (and similar ones), and adding tests for them. If that happens to not be enough, I'd guess we need to s/CalcLengthOrPercentage/CalcNode/ or something like that, which would be slightly unfortunate, but probably ok.

If this happens not to be the bug, we need to file a bug on this stuff.
Yes, this is about the order. I tried to simply workaround the issue with swapping printing orders and it seems working like that. I filed bug 1391120 for the other one.
See Also: → 1391120
Should be fixed in latest nightly, which should include https://github.com/servo/servo/pull/18131.
Looks good, so far. Can't reproduce with Nightly 57 x64 20170820100343 @ Debian Testing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Verified in comment 9
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: