Closed Bug 1386848 Opened 2 years ago Closed 2 years ago

stylo: Medium.com unable to edit a series

Categories

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

57 Branch
defect

Tracking

()

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

People

(Reporter: adamopenweb, Assigned: canaltinova)

References

(Blocks 1 open bug, )

Details

Attachments

(5 files)

Attached image stylo enabled
Originally reported: https://github.com/webcompat/web-bugs/issues/8628

URL: https://medium.com

Browser / Version: Firefox 57.0
Operating System: Linux / OSX
Tested Another Browser: Yes

Problem type: Design is broken
Description: Not able to edit a Series on Medium.com

Steps to Reproduce:
1. Create an account & log in
2. Navigate to: https://medium.com/me/series/drafts
3. Under public choose the existing series.
4. Click Edit Story.

Expected results:
Able to see the first 3 screens

Actual results:
Layout is broken, can only see the last screen
Attached image stylo disabled
Priority: -- → P1
The position is wrong because the transform property is computed incorrectly.

That probably value has lots of variables involved so it is also possible to be a variable-related bug?
Funny... it is related to calc.
Attached file simplified testcase
transform functions don't seem to support calc() properly.
Assignee: nobody → canaltinova
Status: NEW → ASSIGNED
I was able to reproduce this yesterday but it was passing the right values to gecko side. It seemed like the problem was with gecko side. With today's central, I'm unable to reproduce this anymore. Xidorn, could you also check this with you local build?
I couldn't find the fixing commit precisely from mozregression because fix is not in nightly yet but I found the commit that brings this bug. After that commit this stopped working: https://hg.mozilla.org/integration/autoland/rev/58c1de79d494
No need to find the exact changeset that fixed it. Just turn the testcase into a reftest and check it into the tree. :-)
With today's m-c, I can still reproduce this issue with the simplified testcase.
Yeah, that bug was an overkill.
Blocks: 1384656
Actually, I can still reproduce this issue with the tip of autoland. FWIW I'm on Windows, and I haven't tested any other platforms, but it doesn't seem to be platform specific anyway.
Oh, sorry actually I can also reproduce this. I investigated a bit and before that commit it seems we were multiplying the length with 60 inside `nsRuleNode::SpecifiedCalcToComputedCalc`.  But when we remove that function call from stylo, it stopped multiplying here. A fix is coming.
Comment on attachment 8894022 [details]
Bug 1386848 - stylo: Get proper length value from calc nsCSSValue

https://reviewboard.mozilla.org/r/165114/#review170474

Looks reasonable, but please do a try push before landing.
Attachment #8894022 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8894023 [details]
Bug 1386848 - stylo: Add a reftest for `transform: translate()`

https://reviewboard.mozilla.org/r/165116/#review170476
Attachment #8894023 - Flags: review?(xidorn+moz) → review+
https://treeherder.mozilla.org/#/jobs?repo=try&revision=00beba6e41ba94b045a09081fe3377e2cd1c0b82
Tests are finished(except macOS ones but they take long time to finish. I don't think that's going to be a problem though) and they are passing.
Pushed by canaltinova@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cc843dd9a34b
stylo: Get proper length value from calc nsCSSValue r=xidorn
https://hg.mozilla.org/integration/autoland/rev/206a3e09beda
stylo: Add a reftest for `transform: translate()` r=xidorn
https://hg.mozilla.org/mozilla-central/rev/cc843dd9a34b
https://hg.mozilla.org/mozilla-central/rev/206a3e09beda
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Nazim, how serious or widespread is this bug? Should we uplift your fix to Beta 56 for people in our Stylo experiment on Beta?
Flags: needinfo?(canaltinova)
I don't think using calc inside transform is very widespread but medium is a pretty big website and this bug was making stories unusable. Also this is pretty straightforward fix. I think we can uplift this.
Flags: needinfo?(canaltinova)
Thanks. I'll request uplift.
Comment on attachment 8894022 [details]
Bug 1386848 - stylo: Get proper length value from calc nsCSSValue

Approval Request Comment
[Feature/Bug causing the regression]:
[User impact if declined]: medium.com's post editor is unusable when Stylo is enabled. We plan to run a Stylo experiment with Beta 56 users, so it would be good to fix this.
[Is this code covered by automated tests?]: Yes, this bug's second patch adds a new test: https://hg.mozilla.org/mozilla-central/rev/206a3e09beda
[Has the fix been verified in Nightly?]:
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: We should also uplift the new test in this bug's second patch: https://hg.mozilla.org/mozilla-central/rev/206a3e09beda
[Is the change risky?]: No
[Why is the change risky/not risky?]: This is a two-line patch that should only affect Stylo, which won't ship in 56.
[String changes made/needed]: None
Attachment #8894022 - Flags: approval-mozilla-beta?
Comment on attachment 8894022 [details]
Bug 1386848 - stylo: Get proper length value from calc nsCSSValue

Stylo fix, useful for testing on beta 56. Let's also uplift the test.
Attachment #8894022 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Chris Peterson [:cpeterson] from comment #22)
> [Is this code covered by automated tests?]: Yes, this bug's second patch
> adds a new test: https://hg.mozilla.org/mozilla-central/rev/206a3e09beda
> [Has the fix been verified in Nightly?]:
> [Needs manual test from QE? If yes, steps to reproduce]: No.

Setting qe-verify- based on Chris's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.