Created attachment 197030 [details] W3C test showcasing the problem The CSS Regions spec states that regions should create a stacking context for their contents. However, it currently doesn't look like this is happening Steps to reproduce: Open attached file in browser EXPECTED The purple square is drawn on top of the other squares ACTUAL The purple square is drawn under the yellow square (actually under all the other three squares)
Created attachment 204343 [details] Patch
Comment on attachment 204343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204343&action=review > Source/WebCore/rendering/RenderRegion.cpp:166 > + bool isPaintingBackground = (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground); > + if (!isValid() || (!isPaintingBackground && paintInfo.phase != PaintPhaseSelection)) Let's extract this into something like "bool shouldPaint". It looks bad with so many negations in it.
Created attachment 204356 [details] Patch Updated patch based on Alex's comments.
(In reply to comment #2) > (From update of attachment 204343 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=204343&action=review > > > Source/WebCore/rendering/RenderRegion.cpp:166 > > + bool isPaintingBackground = (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground); > > + if (!isValid() || (!isPaintingBackground && paintInfo.phase != PaintPhaseSelection)) > > Let's extract this into something like "bool shouldPaint". It looks bad with so many negations in it. Good suggestion. I pulled the isValid() into it's own if statement. Now this if statement only contains the phase checking. I ended up not needing a boolean.
Comment on attachment 204356 [details] Patch r=me
Comment on attachment 204356 [details] Patch Thanks for the review! Setting cq+.
Comment on attachment 204356 [details] Patch Clearing flags on attachment: 204356 Committed r151475: <http://trac.webkit.org/changeset/151475>
All reviewed patches have been landed. Closing bug.