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

Unified Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 240253007: Don't always repaint on zIndex change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.cpp
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index ef055cc18964eb27de23fcfc35cacc2efc0dc50e..634cb8a2630430a34db7e24667a72f412afe5aed 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -605,9 +605,14 @@ StyleDifferenceLegacy RenderStyle::visualInvalidationDiffLegacy(const RenderStyl
StyleDifferenceLegacy RenderStyle::repaintOnlyDiff(const RenderStyle& other, unsigned& changedContextSensitiveProperties) const
{
- if (position() != StaticPosition && (m_box->zIndex() != other.m_box->zIndex() || m_box->hasAutoZIndex() != other.m_box->hasAutoZIndex()
- || visual->clip != other.visual->clip || visual->hasClip != other.visual->hasClip))
- return StyleDifferenceRepaintLayer;
+ // FIXME: The condition for zIndex may be incorrect or unnecessary.
+ // See StyleAdjuster::adjustRenderStyle() for the conditions that zIndex is applicable.
+ if (position() != StaticPosition) {
+ if (m_box->zIndex() != other.m_box->zIndex() || m_box->hasAutoZIndex() != other.m_box->hasAutoZIndex())
+ changedContextSensitiveProperties |= ContextSensitivePropertyZIndex;
+ if (visual->clip != other.visual->clip || visual->hasClip != other.visual->hasClip)
+ return StyleDifferenceRepaintLayer;
+ }
if (RuntimeEnabledFeatures::cssCompositingEnabled() && (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInheritedData->m_effectiveBlendMode
|| rareNonInheritedData->m_isolation != other.rareNonInheritedData->m_isolation))
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698