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

Unified Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 15012010: Remove the CSS_COMPOSITING define, leaving the implementation under the runtime flag, since runtime… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed bogus test Created 7 years, 7 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 | « Source/core/rendering/style/RenderStyle.h ('k') | Source/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.cpp
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index deb6981216980c50e605f040ef8846ca04748876..8b58ff2a30724467ea3c4aa5f1eed0d9677e8480 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -609,10 +609,9 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
return StyleDifferenceRepaintLayer;
}
-#if ENABLE(CSS_COMPOSITING)
- if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInheritedData->m_effectiveBlendMode)
- return StyleDifferenceRepaintLayer;
-#endif
+ if (RuntimeEnabledFeatures::cssCompositingEnabled())
+ if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInheritedData->m_effectiveBlendMode)
+ return StyleDifferenceRepaintLayer;
if (rareNonInheritedData->opacity != other->rareNonInheritedData->opacity) {
// Don't return early here; instead take note of the type of change,
@@ -793,7 +792,27 @@ void RenderStyle::setContent(QuoteType quote, bool add)
rareNonInheritedData.access()->m_content = ContentData::create(quote);
}
-
+
+BlendMode RenderStyle::blendMode() const
+{
+ if (RuntimeEnabledFeatures::cssCompositingEnabled())
+ return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode);
+ return BlendModeNormal;
+}
+
+void RenderStyle::setBlendMode(BlendMode v)
+{
+ if (RuntimeEnabledFeatures::cssCompositingEnabled())
+ rareNonInheritedData.access()->m_effectiveBlendMode = v;
+}
+
+bool RenderStyle::hasBlendMode() const
+{
+ if (RuntimeEnabledFeatures::cssCompositingEnabled())
+ return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode) != BlendModeNormal;
+ return false;
+}
+
inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& transformOperations, RenderStyle::ApplyTransformOrigin applyOrigin)
{
// transform-origin brackets the transform with translate operations.
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | Source/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698