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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2738303002: Eagerly invalidate when a layer becomes stacking context (Closed)
Patch Set: Rebaseline Created 3 years, 9 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
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 54951eb17f9f976c2ef257245e5792797d1e35e7..0507c39044c21b83f227d51c5649d5bdfa0a6e7d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -262,12 +262,14 @@ void LayoutBoxModelObject::willBeDestroyed() {
void LayoutBoxModelObject::styleWillChange(StyleDifference diff,
const ComputedStyle& newStyle) {
- // This object's layer may cease to be a stacking context, in which case the
- // paint invalidation container of the children may change. Thus we need to
- // invalidate paint eagerly for all such children.
- if (hasLayer() && enclosingLayer()->stackingNode() &&
- enclosingLayer()->stackingNode()->isStackingContext() &&
- !newStyle.isStackingContext()) {
+ // This object's layer may begin or cease to be a stacking context, in which
+ // case the paint invalidation container of this object and descendants may
+ // change. Thus we need to invalidate paint eagerly for all such children.
+ // PaintLayerCompositor::paintInvalidationOnCompositingChange() doesn't work
+ // for the case because we can only see the new paintInvalidationContainer
+ // during compositing update.
+ if (style() &&
+ (style()->isStackingContext() != newStyle.isStackingContext())) {
// The following disablers are valid because we need to invalidate based on
// the current status.
DisableCompositingQueryAsserts compositingDisabler;
« no previous file with comments | « third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/svg/transform-text-element-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698