Closed Bug 1038781 Opened 5 years ago Closed 5 years ago

Changing the clip of an element invalidates the entire element

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: cwiiis, Assigned: cwiiis)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached file Test-case
If you have a clip: rect(...); on an element and you change it, the entire associated layer will invalidate.

On the attached test, enable paint-flashing and hover over the rectangle to demonstrate.
Blocks: 1038785
Written under guidance of mattwoodrow and tn on IRC. I guess whether we can do this will hinge on whether it breaks any existing tests (but I'm tentatively hopeful)

Try: https://tbpl.mozilla.org/?tree=Try&rev=d198d5943da5
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Attachment #8456704 - Flags: review?(tnikkel)
A try push without the patch, to rule out unrelated failures - I think there are a couple of failures this patch introduces but I want to be sure.

https://tbpl.mozilla.org/?tree=Try&rev=bd455caa5deb
Phew, just a small assertion :)

New push: https://tbpl.mozilla.org/?tree=Try&rev=ecdde5b5731a
Attachment #8456704 - Attachment is obsolete: true
Attachment #8456704 - Flags: review?(tnikkel)
Attachment #8456815 - Flags: review?(tnikkel)
Comment on attachment 8456815 [details] [diff] [review]
Don't reflow/repaint when existing clip changes v2

Probably roc should review this.
Attachment #8456815 - Flags: review?(tnikkel) → review?(roc)
Comment on attachment 8456815 [details] [diff] [review]
Don't reflow/repaint when existing clip changes v2

Review of attachment 8456815 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with that

::: layout/base/nsChangeHint.h
@@ +132,5 @@
> +  /**
> +   * A change has occurred that DLBI will catch and invalidate the
> +   * necessary region of layers.
> +   */
> +  nsChangeHint_WillInvalidate = 0x80000

I think we should call this nsChangeHint_SchedulePaint
Attachment #8456815 - Flags: review?(roc) → review+
https://hg.mozilla.org/mozilla-central/rev/7056b101fbb0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.