Commit f622c97d authored by chrishtr's avatar chrishtr Committed by Commit bot

Set needs paint property update for changes of SVG isolation and blending.

BUG=677241
TEST=css3/blending/svg-isolation-*
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2607003002
Cr-Commit-Position: refs/heads/master@{#440913}
parent 482a6d43
...@@ -111,18 +111,23 @@ void LayoutSVGContainer::styleDidChange(StyleDifference diff, ...@@ -111,18 +111,23 @@ void LayoutSVGContainer::styleDidChange(StyleDifference diff,
bool hadIsolation = bool hadIsolation =
oldStyle && !isSVGHiddenContainer() && oldStyle && !isSVGHiddenContainer() &&
SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(*oldStyle); SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(*oldStyle);
bool isolationChanged =
hadIsolation == bool willIsolateBlendingDescendants =
!SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this); SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this);
bool isolationChanged = hadIsolation != willIsolateBlendingDescendants;
if (isolationChanged)
setNeedsPaintPropertyUpdate();
if (!parent() || !isolationChanged) if (!parent() || !isolationChanged)
return; return;
if (hasNonIsolatedBlendingDescendants()) if (hasNonIsolatedBlendingDescendants()) {
parent()->descendantIsolationRequirementsChanged( parent()->descendantIsolationRequirementsChanged(
SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this) willIsolateBlendingDescendants ? DescendantIsolationNeedsUpdate
? DescendantIsolationNeedsUpdate
: DescendantIsolationRequired); : DescendantIsolationRequired);
}
} }
bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const { bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const {
......
...@@ -125,6 +125,9 @@ void LayoutSVGModelObject::styleDidChange(StyleDifference diff, ...@@ -125,6 +125,9 @@ void LayoutSVGModelObject::styleDidChange(StyleDifference diff,
parent()->descendantIsolationRequirementsChanged( parent()->descendantIsolationRequirementsChanged(
style()->hasBlendMode() ? DescendantIsolationRequired style()->hasBlendMode() ? DescendantIsolationRequired
: DescendantIsolationNeedsUpdate); : DescendantIsolationNeedsUpdate);
if (hasBlendModeChanged)
setNeedsPaintPropertyUpdate();
} }
LayoutObject::styleDidChange(diff, oldStyle); LayoutObject::styleDidChange(diff, oldStyle);
......
...@@ -187,10 +187,12 @@ class FindObjectPropertiesNeedingUpdateScope { ...@@ -187,10 +187,12 @@ class FindObjectPropertiesNeedingUpdateScope {
originalBorderBox->propertyTreeState.scroll(), originalBorderBox->propertyTreeState.scroll(),
objectBorderBox->propertyTreeState.scroll()); objectBorderBox->propertyTreeState.scroll());
} else { } else {
DCHECK_EQ(!!originalBorderBox, !!objectBorderBox); DCHECK_EQ(!!originalBorderBox, !!objectBorderBox)
<< " Object: " << m_object.debugName();
} }
} else { } else {
DCHECK_EQ(!!m_originalProperties, !!objectProperties); DCHECK_EQ(!!m_originalProperties, !!objectProperties)
<< " Object: " << m_object.debugName();
} }
// Restore original clean bit. // Restore original clean bit.
m_object.getMutableForPainting().clearNeedsPaintPropertyUpdateForTesting(); m_object.getMutableForPainting().clearNeedsPaintPropertyUpdateForTesting();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment