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

RESOLVED FIXED in Firefox 61

Status

()

defect
P2
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: bc, Assigned: miko)

Tracking

(Blocks 1 bug, {assertion})

61 Branch
mozilla61
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox59 unaffected, firefox60 unaffected, firefox61 fixed)

Details

()

Attachments

(3 attachments)

Reporter

Description

Last year
Posted 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
Assignee

Updated

Last year
Status: NEW → ASSIGNED
Assignee

Comment 1

Last year
Posted file opacity-empty.html
Simplified testcase.
Assignee

Comment 3

Last year
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 4

Last year
mozreview-review
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+
Comment hidden (mozreview-request)

Comment 6

Last year
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

Comment 7

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/f9c00fb269a0
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.