Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
index 984ff42be192101a07c21c53955cd3c42a23b460..4d8f7ef63fb2faf02ec3aa710df4e9ff217965d4 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
@@ -1205,6 +1205,21 @@ bool ComputedStyle::hasEntirelyFixedBackground() const |
return allLayersAreFixed(backgroundLayers()); |
} |
+static bool allLayersAreLocal(const FillLayer& layer) |
+{ |
+ for (const FillLayer* currLayer = &layer; currLayer; currLayer = currLayer->next()) { |
+ if (currLayer->attachment() != LocalBackgroundAttachment) |
+ return false; |
+ } |
+ |
+ return true; |
+} |
+ |
+bool ComputedStyle::hasEntirelyLocalBackground() const |
+{ |
+ return allLayersAreLocal(backgroundLayers()); |
+} |
+ |
const CounterDirectiveMap* ComputedStyle::counterDirectives() const |
{ |
return m_rareNonInheritedData->m_counterDirectives.get(); |