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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.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
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index dc0d617dbbc7615cf0fd403e1d960320cd0ab040..3ea4a8860e85050dcc59996cc8ac3300c77f712a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -488,12 +488,6 @@ void LayoutBoxModelObject::addOutlineRectsForDescendant(const LayoutObject& desc
descendant.addOutlineRects(rects, additionalOffset, includeBlockOverflows);
}
-bool LayoutBoxModelObject::calculateHasBoxDecorations() const
-{
- const ComputedStyle& styleToUse = styleRef();
- return hasBackground() || styleToUse.hasBorderDecoration() || styleToUse.hasAppearance() || styleToUse.boxShadow();
-}
-
bool LayoutBoxModelObject::hasNonEmptyLayoutSize() const
{
for (const LayoutBoxModelObject* root = this; root; root = root->continuation()) {
@@ -517,7 +511,7 @@ bool LayoutBoxModelObject::hasNonEmptyLayoutSize() const
void LayoutBoxModelObject::updateFromStyle()
{
const ComputedStyle& styleToUse = styleRef();
- setHasBoxDecorationBackground(calculateHasBoxDecorations());
+ setHasBoxDecorationBackground(styleToUse.hasBoxDecorationBackground());
setInline(styleToUse.isDisplayInlineType());
setPositionState(styleToUse.position());
setHorizontalWritingMode(styleToUse.isHorizontalWritingMode());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698