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

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

Issue 2082153002: Paint solid color and local attachment backgrounds into scrolling layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert some changes 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
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('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.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 984ff42be192101a07c21c53955cd3c42a23b460..a85dfe2fe463f8efdbd958d9d7fa659bfde36801 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1205,6 +1205,22 @@ bool ComputedStyle::hasEntirelyFixedBackground() const
return allLayersAreFixed(backgroundLayers());
}
+static bool allLayersAreSolidColorOrLocal(const FillLayer& layer)
+{
+ for (const FillLayer* currLayer = &layer; currLayer; currLayer = currLayer->next()) {
+ if (currLayer->attachment() != LocalBackgroundAttachment
+ && currLayer->image())
+ return false;
+ }
+
+ return true;
+}
+
+bool ComputedStyle::hasEntirelyLocalBackground() const
+{
+ return allLayersAreSolidColorOrLocal(backgroundLayers());
+}
+
const CounterDirectiveMap* ComputedStyle::counterDirectives() const
{
return m_rareNonInheritedData->m_counterDirectives.get();
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698