Closed Bug 795262 Opened 12 years ago Closed 12 years ago

Highlighter depends on MozAfterPaint to detect that the size or position of an element has changed

Categories

(DevTools :: Inspector, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 18

People

(Reporter: roc, Unassigned)

Details

Attachments

(1 file)

This is a problem with DLBI (bug 539356) since we never promised to fire MozAfterPaint for changes to invisible elements (and we already don't in some cases, e.g. offscreen elements). DLBI makes the browser_inspector_invalidate.js test fail because the DIV whose width is changed is invisible; nothing gets repainted, so we don't fire MozAfterPaint.
Attached patch fix testSplinter Review
Attachment #665847 - Flags: review?(jones.chris.g)
Comment on attachment 665847 [details] [diff] [review]
fix test

There's nothing special about these changes so asking for cjones to give a quick review now.

If there are any issues, I'll fix them after this.
Attachment #665847 - Flags: review?(rcampbell)
Attachment #665847 - Flags: review+
Attachment #665847 - Flags: review?(jones.chris.g) → review+
This patch makes the test pass, but there's still a bug where highlighting invisible elements won't necessarily update promptly when the invisible element size or position changes (and nothing else does).

Right now I'm not sure how to fix that. We don't have a good API to detect such changes. It might be good enough to simply use setTimeout or mozRequestAnimationFrame and poll for changes.
https://hg.mozilla.org/mozilla-central/rev/6b58397ad735
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Comment on attachment 665847 [details] [diff] [review]
fix test

post hoc r+ from me. Thanks for this.
Attachment #665847 - Flags: review?(rcampbell) → review+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: