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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

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 | « third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index fee328e23171e67405ef60f6aeeb23f708d4012b..2a2912b0816b97946192ac85e064c806b67ddcfe 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -2317,6 +2317,7 @@ public:
// Border utility functions.
bool borderObscuresBackground() const;
void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
+
bool hasBoxDecorations() const
{
return hasBorderDecoration()
@@ -2329,6 +2330,14 @@ public:
|| resize() != RESIZE_NONE;
}
+ // "Box decoration background" includes all box decorations and backgrounds
+ // that are painted as the background of the object. It includes borders,
+ // box-shadows, background-color and background-image, etc.
+ bool hasBoxDecorationBackground() const
+ {
+ return hasBackground() || hasBorderDecoration() || hasAppearance() || boxShadow();
+ }
+
// Background utility functions.
FillLayer& accessBackgroundLayers() { return m_background.access()->m_background; }
const FillLayer& backgroundLayers() const { return m_background->background(); }
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698