Closed
Bug 725580
Opened 13 years ago
Closed 12 years ago
Partially transparent transformed div unexpectedly invalidates content when visible content disappears during animation
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: cjones, Assigned: cjones)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(3 files, 2 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
The description of this bug might be a bit hard to follow, but load the test below with paint-flashing on and you'll see what I mean.
I'm testing with patches from bug 722923 and bug 724189 applied. This bug is important for b2g.
Assignee | ||
Updated•13 years ago
|
Summary: Partially transparent transparent div unexpectedly invalidates content when visible content disappears → Partially transparent transformed div unexpectedly invalidates content when visible content disappears during animation
Assignee | ||
Comment 1•13 years ago
|
||
As expected, InvalidateTransformLayer stops thinking the frame has a layer when the invalidation starts.
Breakpoint 2, nsIFrame::InvalidateTransformLayer (this=0x7fffe023cd38) at /home/cjones/mozilla/mozilla-central/layout/generic/nsFrame.cpp:4376
$79 = true
Breakpoint 2, nsIFrame::InvalidateTransformLayer (this=0x7fffe023cd38) at /home/cjones/mozilla/mozilla-central/layout/generic/nsFrame.cpp:4376
$80 = false
This might be a little tricky to fix.
Assignee | ||
Comment 2•13 years ago
|
||
FrameLayerBuilder::GetDedicatedLayer
(gdb) p layer->HasUserData(&gColorLayerUserData)
$772 = false
(gdb) p layer->HasUserData(&gImageLayerUserData)
$773 = false
(gdb) p layer->HasUserData(&gThebesDisplayItemLayerUserData)
$774 = true
Assignee | ||
Comment 3•13 years ago
|
||
We stop building an nsDisplayTransform when the invalidations start.
Assignee | ||
Comment 4•13 years ago
|
||
We're *building* the displaytransform, it just gets "optimized away" after the visible part scrolls offscreen.
This patch forces the entire frame of the display transform to be "visible", when we're using the prerender optimization. Makes the extra invalidation go away except for some artifacts that persist for a while after the animation finishes. Not sure what's up with that.
I don't know if this is the right approach or not.
Attachment #595681 -
Flags: feedback?
Assignee | ||
Updated•13 years ago
|
Attachment #595681 -
Flags: feedback? → feedback?(roc)
Attachment #595681 -
Flags: review+
Attachment #595681 -
Flags: feedback?(roc)
Attachment #595681 -
Flags: feedback+
Comment on attachment 595681 [details] [diff] [review]
something like this?
Actually yeah this is wrong. I don't know what I was thinking.
Start on top of https://bugzilla.mozilla.org/attachment.cgi?id=595597&action=edit.
And instead of using mFrame->GetRect(), use GetVisualOverflowRectRelativeToSelf() and add ToReferenceFrame() before you transform it.
Attachment #595681 -
Flags: review+ → review-
Assignee | ||
Comment 6•13 years ago
|
||
Needs a test. Might have to wait until tomorrow (running out of gas).
Assignee: nobody → jones.chris.g
Attachment #595681 -
Attachment is obsolete: true
Attachment #595688 -
Flags: review?(roc)
Assignee | ||
Comment 7•13 years ago
|
||
Stealing most of the test from bug 722923. Will be polite and not conflict it out if I can avoid that.
Depends on: 722923
Attachment #595688 -
Flags: review?(roc) → review+
Assignee | ||
Comment 8•13 years ago
|
||
When I extract the core of this test and run it in FF, it works perfectly: invalidates before patch, doesn't after. But it doesn't work when ported to mochitest-chrome as here :(. Not sure what's up.
Assignee | ||
Comment 9•13 years ago
|
||
The test might be failing to check the element corresponding to the thebeslayer that's being invalidated. id="bg", document.body, and document.documentElement don't seem to be it. Or something else is wrong.
Assignee | ||
Comment 10•13 years ago
|
||
The previous test seemed to be interacting badly with the color-layer optimization. That probably confused checkAndClearPaintedState().
This one works fine, and when run standalone I see the invalidated region in the outer <div> (the one with the gradient) persist forever. But the test still isn't catching the invalidation :(. Not sure what to do here. Hate to patch and run, but at this point it's starting to look like the cost expended on the test is beginning to outweigh its benefit.
roc, happy to defer the call to you.
Attachment #595700 -
Attachment is obsolete: true
Assignee | ||
Comment 11•13 years ago
|
||
(This decision is most likely to affect Matt, so pulling him.)
(In reply to Chris Jones [:cjones] [:warhammer] from comment #10)
> at this point it's starting to look like the cost
> expended on the test is beginning to outweigh its benefit.
Agreed.
Blocks: 726546
You can land this along with the already-reviewed patch from bug 722603 that you depend on.
Comment 14•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #11)
> (This decision is most likely to affect Matt, so pulling him.)
Fine with me. Just need to make sure we manually recheck these things when landing display list based invalidation.
Assignee | ||
Comment 15•13 years ago
|
||
Comment 16•13 years ago
|
||
Reviewed try logs with roc and decided that patch is ready to land.
http://hg.mozilla.org/integration/mozilla-inbound/rev/92d08776a039
Comment 17•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/92d08776a039
I assume this should stay open for the test... if not please resolve.
Updated•13 years ago
|
Blocks: b2g-product-phone
Updated•13 years ago
|
No longer blocks: b2g-demo-phone
Assignee | ||
Comment 18•12 years ago
|
||
This stayed fixed with dlbi.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•