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,
bool hadIsolation =
oldStyle && !isSVGHiddenContainer() &&
SVGLayoutSupport::willIsolateBlendingDescendantsForStyle(*oldStyle);
bool isolationChanged =
hadIsolation ==
!SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this);
bool willIsolateBlendingDescendants =
SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this);
bool isolationChanged = hadIsolation != willIsolateBlendingDescendants;
if (isolationChanged)
setNeedsPaintPropertyUpdate();
if (!parent() || !isolationChanged)
return;
if (hasNonIsolatedBlendingDescendants())
if (hasNonIsolatedBlendingDescendants()) {
parent()->descendantIsolationRequirementsChanged(
SVGLayoutSupport::willIsolateBlendingDescendantsForObject(this)
? DescendantIsolationNeedsUpdate
willIsolateBlendingDescendants ? DescendantIsolationNeedsUpdate
: DescendantIsolationRequired);
}
}
bool LayoutSVGContainer::hasNonIsolatedBlendingDescendants() const {
......
......@@ -125,6 +125,9 @@ void LayoutSVGModelObject::styleDidChange(StyleDifference diff,
parent()->descendantIsolationRequirementsChanged(
style()->hasBlendMode() ? DescendantIsolationRequired
: DescendantIsolationNeedsUpdate);
if (hasBlendModeChanged)
setNeedsPaintPropertyUpdate();
}
LayoutObject::styleDidChange(diff, oldStyle);
......
......@@ -187,10 +187,12 @@ class FindObjectPropertiesNeedingUpdateScope {
originalBorderBox->propertyTreeState.scroll(),
objectBorderBox->propertyTreeState.scroll());
} else {
DCHECK_EQ(!!originalBorderBox, !!objectBorderBox);
DCHECK_EQ(!!originalBorderBox, !!objectBorderBox)
<< " Object: " << m_object.debugName();
}
} else {
DCHECK_EQ(!!m_originalProperties, !!objectProperties);
DCHECK_EQ(!!m_originalProperties, !!objectProperties)
<< " Object: " << m_object.debugName();
}
// Restore original clean bit.
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