Closed
Bug 1072100
Opened 11 years ago
Closed 11 years ago
dynamic changes to mix-blend-mode don't cause repaints
Categories
(Core :: Web Painting, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: cabanier, Assigned: cabanier)
References
()
Details
Attachments
(1 file)
|
2.17 KB,
patch
|
dbaron
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Applying a new mix-blend-mode style doesn't update the visual rendering until you force a repaint.
I *think* the solution is that nsDisplayMixBlendMode sets a dirty rect (since forcing that fixes the issue), but I don't know where to set that.
| Assignee | ||
Updated•11 years ago
|
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → cabanier
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(roc)
Comment 1•11 years ago
|
||
Is there a reason that nsStyleDisplay::CalcDifference doesn't return a repaint hint for mix-blend-mode changes?
And it should also stop returning the nsChangeHint_NeutralChange hint.
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #1)
> Is there a reason that nsStyleDisplay::CalcDifference doesn't return a
> repaint hint for mix-blend-mode changes?
No, that looks like an oversight. Should I treat it like opacity and call "NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);" ?
Also, should there be a test for CSS filters in that routine?
Flags: needinfo?(roc) → needinfo?(bzbarsky)
| Assignee | ||
Comment 4•11 years ago
|
||
We're also seeing something similar with background blending on Windows. Could it be related?
(In reply to Rik Cabanier from comment #3)
> (In reply to Boris Zbarsky [:bz] from comment #1)
> > Is there a reason that nsStyleDisplay::CalcDifference doesn't return a
> > repaint hint for mix-blend-mode changes?
>
> No, that looks like an oversight. Should I treat it like opacity and call
> "NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);" ?
We do nsChangeHint_RepaintFrame or UpdateOpacityLayer for opacity, not ReconstructFrame. Since mix-blend-mode isn't (I think) propagated to layers, you shouldn't need any hint for layer updating; RepaintFrame should be fine. (I don't think it changes anything, like absolute positioning containing blocks, that RepaintFrame wouldn't handle.)
> Also, should there be a test for CSS filters in that routine?
nsStyleSVGReset::CalcDifference already handles filter changes.
(In reply to Rik Cabanier from comment #4)
> We're also seeing something similar with background blending on Windows.
> Could it be related?
It doesn't seem related. nsStyleBackground::Layer::operator== does compare mBlendMode, and nsStyleBackground::CalcDifference compares the layers. Or does changing background blending require more than a repaint? (I don't see why it should.)
Flags: needinfo?(bzbarsky)
(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #5)
> We do nsChangeHint_RepaintFrame or UpdateOpacityLayer for opacity, not
> ReconstructFrame. Since mix-blend-mode isn't (I think) propagated to
> layers, you shouldn't need any hint for layer updating; RepaintFrame should
> be fine. (I don't think it changes anything, like absolute positioning
> containing blocks, that RepaintFrame wouldn't handle.)
RepaintFrame will update layers as necessary. UpdateOpacityLayer is a special optimization which we just don't need for mix-blend-mode changes. So the correct hint here should be RepaintFrame.
| Assignee | ||
Comment 7•11 years ago
|
||
| Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8494624 [details] [diff] [review]
Added repaint hint when mix-blend-mode is changed
try build: https://tbpl.mozilla.org/?tree=Try&rev=dd87b8b76fd7
Attachment #8494624 -
Flags: review?(dbaron)
Attachment #8494624 -
Flags: review?(dbaron) → review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Keywords: checkin-needed
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
This is a very low-risk patch, and seems worth taking on aurora (maybe even beta). (This is a bug in a feature that's new in 32.) Do you mind requesting approval?
Flags: needinfo?(cabanier)
Summary: mix-blend-mode doesn't work when set in JS → dynamic changes to mix-blend-mode don't cause repaints
| Assignee | ||
Comment 12•11 years ago
|
||
Sure!
Can you point me to a page that describes how I can start that process?
Flags: needinfo?(cabanier)
Set the appropriate tracking flags (See "Tracking flags:") on this bug to "?", and answer the questions that are autofilled into the comments.
Flags: needinfo?(cabanier)
| Assignee | ||
Comment 14•11 years ago
|
||
[Tracking Requested - why for this release]: This is a low risk fix. We had reports from authors that they had to work around this by forcing a repaint.
tracking-firefox33:
--- → ?
Flags: needinfo?(cabanier)
Comment 15•11 years ago
|
||
Actually, you can just request approval flags directly on the patch itself even if the bug is not being tracked.
| Assignee | ||
Comment 16•11 years ago
|
||
Comment on attachment 8494624 [details] [diff] [review]
Added repaint hint when mix-blend-mode is changed
Approval Request Comment
[Feature/regressing bug #]: Setting the CSS mix-blend-mode through JS
[User impact if declined]: CSS property doesn't take effect. User has to force a repaint
[Describe test coverage new/current, TBPL]: None
[Risks and why]: None
[String/UUID change made/needed]:
Attachment #8494624 -
Flags: approval-mozilla-beta?
| Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #15)
> Actually, you can just request approval flags directly on the patch itself
> even if the bug is not being tracked.
Does this look OK? They can always ask me for more specifics if neeed.
Updated•11 years ago
|
Comment 18•11 years ago
|
||
Comment on attachment 8494624 [details] [diff] [review]
Added repaint hint when mix-blend-mode is changed
Close ;) You have also to request aurora uplift.
I did it for you.
Accepting in beta too because it is low risk and a small change.
Attachment #8494624 -
Flags: approval-mozilla-beta?
Attachment #8494624 -
Flags: approval-mozilla-beta+
Attachment #8494624 -
Flags: approval-mozilla-aurora+
(In reply to Boris Zbarsky [:bz] from comment #15)
> Actually, you can just request approval flags directly on the patch itself
> even if the bug is not being tracked.
Oops, sorry; not sure what I was thinking.
| Assignee | ||
Comment 20•11 years ago
|
||
(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #19)
> (In reply to Boris Zbarsky [:bz] from comment #15)
> > Actually, you can just request approval flags directly on the patch itself
> > even if the bug is not being tracked.
>
> Oops, sorry; not sure what I was thinking.
No worries! Thanks for pointing out that we can get it in earlier.
Comment 21•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/293253d7df7a
https://hg.mozilla.org/releases/mozilla-beta/rev/badc5be25cc1
Can we get a test for this?
Flags: needinfo?(cabanier)
Flags: in-testsuite?
| Assignee | ||
Comment 22•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #21)
> https://hg.mozilla.org/releases/mozilla-aurora/rev/293253d7df7a
> https://hg.mozilla.org/releases/mozilla-beta/rev/badc5be25cc1
>
> Can we get a test for this?
I don't know how to test for test since it only fails in fullscreen mode.
Flags: needinfo?(cabanier)
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•