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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 90983002: [CSS Blending] Fix blending when mix-blend-mode is set from javascript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « LayoutTests/css3/compositing/mix-blend-mode-with-opacity-change-js-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 43edddd8dcb9a71c920c39cd357ffb8ef81f560a..7768e755d24d29899169b0fa0d611c0dee803862 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -533,8 +533,8 @@ void RenderLayer::updateBlendMode()
m_blendMode = newBlendMode;
// Only update the flag if a blend mode is set or unset.
- if (!hadBlendMode || !hasBlendMode())
- dirtyAncestorChainBlendedDescendantStatus();
+ if (parent() && (!hadBlendMode || !hasBlendMode()))
Stephen Chennney 2013/11/27 13:06:26 My only concern is that, without a parent, should
rosca 2013/11/27 13:34:08 If we change the blendMode for an element we shoul
+ parent()->dirtyAncestorChainBlendedDescendantStatus();
if (hasCompositedLayerMapping())
compositedLayerMapping()->setBlendMode(newBlendMode);
@@ -861,6 +861,7 @@ void RenderLayer::updateDescendantDependentFlags()
}
if (m_childLayerHasBlendModeStatusDirty) {
+ m_childLayerHasBlendMode = false;
for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
if (!child->stackingNode()->isStackingContext())
child->updateDescendantDependentFlags();
« no previous file with comments | « LayoutTests/css3/compositing/mix-blend-mode-with-opacity-change-js-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698