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

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

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve opaque layer detection and fix non-composited border painting bug in layout tests. Created 4 years, 5 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/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();

Powered by Google App Engine
This is Rietveld 408576698