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

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

Issue 2772353002: Revert of Add StyleDifference::needsVisualRectUpdate (Closed)
Patch Set: 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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 8be3e614b7f42a11aa43f40bd9a364464c2847c7..f1a02b92ae994f4d8b3b39d222de81e8fa5572c3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1736,9 +1736,6 @@
setShouldDoFullPaintInvalidationWithoutGeometryChange();
}
- if (diff.needsVisualRectUpdate())
- setMayNeedPaintInvalidation();
-
// Text nodes share style with their parents but the paint properties don't
// apply to them, hence the !isText() check.
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && !isText() &&
@@ -1760,18 +1757,20 @@
void LayoutObject::styleWillChange(StyleDifference diff,
const ComputedStyle& newStyle) {
if (m_style) {
- bool visibilityChanged = m_style->visibility() != newStyle.visibility();
// If our z-index changes value or our visibility changes,
// we need to dirty our stacking context's z-order list.
- if (visibilityChanged || m_style->zIndex() != newStyle.zIndex() ||
- m_style->isStackingContext() != newStyle.isStackingContext()) {
+ bool visibilityChanged =
+ m_style->visibility() != newStyle.visibility() ||
+ m_style->zIndex() != newStyle.zIndex() ||
+ m_style->isStackingContext() != newStyle.isStackingContext();
+ if (visibilityChanged) {
document().setAnnotatedRegionsDirty(true);
if (AXObjectCache* cache = document().existingAXObjectCache())
cache->childrenChanged(parent());
}
// Keep layer hierarchy visibility bits up to date if visibility changes.
- if (visibilityChanged) {
+ if (m_style->visibility() != newStyle.visibility()) {
// We might not have an enclosing layer yet because we might not be in the
// tree.
if (PaintLayer* layer = enclosingLayer())

Powered by Google App Engine
This is Rietveld 408576698