Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1497)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 27030009: Revert "Make compositingState explicit (re-land #2 with bogus ASSERT removed)" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build error Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/CompositingState.h ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 937e63e3aa04d93f8150f1a7572c8e26f1d0a525..bd43253ea6e0b1a9493e102fef46db438e0885e5 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1258,8 +1258,7 @@ static bool isCandidateForOpaquenessTest(RenderBox* childBox)
if (!childBox->width() || !childBox->height())
return false;
if (RenderLayer* childLayer = childBox->layer()) {
- // FIXME: perhaps this could be less conservative?
- if (childLayer->compositingState() != NotComposited)
+ if (childLayer->isComposited())
return false;
// FIXME: Deal with z-index.
if (!childStyle->hasAutoZIndex())
@@ -1354,13 +1353,9 @@ void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint
if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context->paintingDisabled())
return;
- if (!layer() || layer()->compositingState() != PaintsIntoOwnBacking)
+ if (!layer() || !layer()->isComposited())
return;
- // We should never have this state in this function. A layer with a mask
- // should have always created its own backing if it became composited.
- ASSERT(layer()->compositingState() != HasOwnBackingButPaintsIntoAncestor);
-
LayoutRect paintRect = LayoutRect(paintOffset, size());
paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black);
}
« no previous file with comments | « Source/core/rendering/CompositingState.h ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698