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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2225033003: Separate backgroundObscurationStatus and hasBoxDecorationBackground (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 6a19f033836de0391ee12d806643160be5dda3eb..6afb5f4d8739a566deca49491e37c711d15a3459 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1342,11 +1342,11 @@ void LayoutBox::paintBoxDecorationBackground(const PaintInfo& paintInfo, const L
bool LayoutBox::getBackgroundPaintedExtent(LayoutRect& paintedExtent) const
{
- ASSERT(hasBackground());
+ DCHECK(styleRef().hasBackground());
// LayoutView is special in the sense that it expands to the whole canvas,
// thus can't be handled by this function.
- ASSERT(!isLayoutView());
+ DCHECK(!isLayoutView());
LayoutRect backgroundRect(borderBoxRect());
@@ -1459,8 +1459,7 @@ bool LayoutBox::computeBackgroundIsKnownToBeObscured() const
if (scrollsOverflow())
return false;
// Test to see if the children trivially obscure the background.
- // FIXME: This test can be much more comprehensive.
- if (!hasBackground())
+ if (!styleRef().hasBackground())
return false;
// Root background painting is special.
if (isLayoutView())
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698