Closed Bug 1455944 Opened 2 years ago Closed 2 years ago

Assertion failure: (opacityNesting == 0 && !cdi.mHasOpacity) || (opacityNesting > 0 && cdi.mHasOpacity), at layout/painting/FrameLayerBuilder.cpp:6306

Categories

(Core :: Web Painting, defect, P2)

61 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox59 --- unaffected
firefox60 --- unaffected
firefox61 --- fixed

People

(Reporter: bc, Assigned: miko)

References

()

Details

(Keywords: assertion)

Attachments

(3 files)

Attached file Linux log
1. http://www.marieclaire.ru/moda/printsessa-plyaja-bikini-stil-dianyi/

2. Assertion failure: (opacityNesting == 0 && !cdi.mHasOpacity) || (opacityNesting > 0 && cdi.mHasOpacity), at /builds/worker/workspace/build/src/layout/painting/FrameLayerBuilder.cpp:6306
#01: mozilla::FrameLayerBuilder::DrawPaintedLayer [layout/painting/FrameLayerBuilder.cpp:6524]
#02: mozilla::layers::ClientPaintedLayer::PaintThebes [gfx/layers/client/ClientPaintedLayer.cpp:166]
#03: mozilla::layers::ClientPaintedLayer::RenderLayerWithReadback [gfx/src/nsRegion.h:2234]
#04: mozilla::layers::ClientContainerLayer::RenderLayer [gfx/layers/client/ClientContainerLayer.h:60]
#05: mozilla::layers::ClientLayerManager::EndTransactionInternal [gfx/layers/client/ClientLayerManager.cpp:359]
#06: mozilla::layers::ClientLayerManager::EndTransaction [gfx/layers/client/ClientLayerManager.cpp:424]
#07: nsDisplayList::PaintRoot [layout/painting/nsDisplayList.cpp:2762]

Windows & Linux.
Assignee: nobody → mikokm
Priority: -- → P2
Status: NEW → ASSIGNED
Attached file opacity-empty.html
Simplified testcase.
The display list for the test case is following:
Opacity
  SubDocument
  	CanvasBackgroundColor

Because of how nsDisplayItem::RecomputeVisibility() works, CanvasBackgroundColor[1] will propagate false up to opacity [2], causing it to get empty visible rect. This in turn triggers the assertion. 

[1]: https://searchfox.org/mozilla-central/rev/78dbe34925f04975f16cb9a5d4938be714d41897/layout/generic/nsCanvasFrame.h#144
[2]: https://searchfox.org/mozilla-central/rev/36dec78aecc40539ecc8d78e91612e38810f963c/layout/painting/nsDisplayList.cpp#3176
Comment on attachment 8971031 [details]
Bug 1455944 - Do not paint nsDisplayOpacity children when opacity push/pop markers have empty paint rect

https://reviewboard.mozilla.org/r/239758/#review245512

::: layout/painting/FrameLayerBuilder.cpp:6318
(Diff revision 1)
>  
>      const nsRect& visibleRect = item->GetVisibleRect();
> +    const nsRect paintRect = visibleRect.Intersect(boundRect);
>  
> -    nsRect paintRect = visibleRect.Intersect(boundRect);
> -    if (paintRect.IsEmpty()) {
> +    if (paintRect.IsEmpty() || emptyOpacityNesting > 0) {
> +      // In order for this branch to be hit, either this item has ab empty paint

an empty paint
Attachment #8971031 - Flags: review?(matt.woodrow) → review+
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f9c00fb269a0
Do not paint nsDisplayOpacity children when opacity push/pop markers have empty paint rect r=mattwoodrow
https://hg.mozilla.org/mozilla-central/rev/f9c00fb269a0
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.