Open Bug 1305976 Opened 8 years ago Updated 2 years ago

Outline is only updated on repaint

Categories

(Core :: Layout, defect, P3)

40 Branch
defect

Tracking

()

Tracking Status
firefox49 --- wontfix
firefox-esr45 --- wontfix
firefox50 --- wontfix
firefox51 --- wontfix
firefox52 --- fix-optional
firefox53 --- affected

People

(Reporter: cers, Unassigned)

References

Details

Attachments

(1 file)

Attached file test case
If a child of an element with an outline is affected by - for example - an animated transform in a way that should alter the outline, this is only reflected when forced to repaint. If nothings forces the repaint (like mouse movement or animating another property), then the outline fails to update. STR: 1) load attached test case 2) hold mouse cursor still 3) observe outer blue outlines 4) move mouse cursor around (over same window) 5) observe outer blue outlines Expected result: The two examples should look the same regardless of mouse movement Actual result: Examples only look similar (slightly jerkier for the left one) when mouse is moving Through mozregression, I've narrowed down the cause to this range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=883e17fc475f&tochange=ab0490972e1e , and my best guess is that bug 1061364 is to blame.
Bug 1061364 sounds like a good guess. Brian, want to take a look?
Blocks: 1061364
Flags: needinfo?(bbirtles)
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All
Wow, that's crazy. I didn't know outline was supposed to respect transforms (it doesn't in Chrome or Edge). Perhaps we need some special handling like we have for scroll bars where we updated the transform on the main thread every 200ms when an outline is applied on an ancestor? I wouldn't want to back out bug 1061364 for this since, assuming it is the cause, it just goes to demonstrate how much unnecessary work we were doing before that landed.
I've never been looking into bug 1061364 deeply, it seems to affect only transitions. No? I guess bug 980770 is the one in the range in comment 0.
Oh, I didn't even see bug 980770 in there! That's definitely the cause (as confirmed by loading the test case with layers.offmainthreadcomposition.async-animations set to false). I suppose our options include: * Update the main thread periodically when we have an outline on an ancestor like we do for scroll bars (will probably look pretty bad) * Make outline not incorporate transforms (to match Chrome/Edge) -- I'm guessing we chose to include them deliberately though * Force animations on elements with a visible outline on an ancestor to the main thread
Blocks: enable-omt-animations
No longer blocks: 1061364
Flags: needinfo?(bbirtles)
(In reply to Brian Birtles (:birtles) from comment #2) > Wow, that's crazy. I didn't know outline was supposed to respect transforms > (it doesn't in Chrome or Edge). The spec isn't terribly clear to me at least, but the most relevant part I can find says: > Outlines may be non-rectangular. For example, if the element is broken across several lines, the outline should be an outline or minimum set of outlines that encloses all the element’s boxes. So the question I guess is really if the box moves when something is transformed? Perhaps someone better versed in the spec can say...
https://drafts.csswg.org/css-ui-3/#outline-props The rendering of applying transforms to outlines is left explicitly undefined in CSS3-UI. (In reply to Brian Birtles (:birtles) from comment #4) > I suppose our options include: > > * Update the main thread periodically when we have an outline on an ancestor > like we do for scroll bars (will probably look pretty bad) > * Make outline not incorporate transforms (to match Chrome/Edge) -- I'm > guessing we chose to include them deliberately though So, > * Force animations on elements with a visible outline on an ancestor to the > main thread We should take this for now, I think.
Priority: -- → P3
Whiteboard: tlt-backlog
Too late for 49, but we might still take a patch on beta.
This feels like something that we wouldn't uplift a fix for all the way to beta. I'm assuming it's very much too late to back out bug 1061364 at this point?
Flags: needinfo?(bbirtles)
Version: unspecified → 40 Branch
(In reply to Andrew Overholt [:overholt] from comment #9) > This feels like something that we wouldn't uplift a fix for all the way to > beta. I'm assuming it's very much too late to back out bug 1061364 at this > point? The regressing bug here is bug 980770 (i.e. async animations) not bug 1061364 and I'm sure we won't back out bug 980770 for this. This regression has been shipping since Firefox 41. We'll get to it but it's not our highest priority at the moment (we have other regressions from async animations like bug 1301305 that are higher priority).
Flags: needinfo?(bbirtles)
Thanks for clarifying, Brian.
Whiteboard: tlt-backlog
This bug has graduated beyond regression :)
Keywords: regression
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: