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

Unified Diff: Source/core/rendering/PaintInvalidationState.cpp

Issue 772913003: Paint invalidation: Need to check offset cacheability for invalidation containers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: repaint test n00b fixes. Created 6 years 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 | « LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/PaintInvalidationState.cpp
diff --git a/Source/core/rendering/PaintInvalidationState.cpp b/Source/core/rendering/PaintInvalidationState.cpp
index 36673f2699f8030dcb73dbe4ad51fb992fd7e40a..ec4af685b90037950c381f60dc09026791280faf 100644
--- a/Source/core/rendering/PaintInvalidationState.cpp
+++ b/Source/core/rendering/PaintInvalidationState.cpp
@@ -44,15 +44,15 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
bool establishesPaintInvalidationContainer = renderer == m_paintInvalidationContainer;
bool fixed = renderer.style()->position() == FixedPosition;
+ if (!renderer.supportsPaintInvalidationStateCachedOffsets() || !next.m_cachedOffsetsEnabled)
+ m_cachedOffsetsEnabled = false;
if (establishesPaintInvalidationContainer) {
// When we hit a new paint invalidation container, we don't need to
// continue forcing a check for paint invalidation because movement
// from our parents will just move the whole invalidation container.
m_forceCheckForPaintInvalidation = false;
} else {
- if (!renderer.supportsPaintInvalidationStateCachedOffsets() || !next.m_cachedOffsetsEnabled) {
- m_cachedOffsetsEnabled = false;
- } else {
+ if (m_cachedOffsetsEnabled) {
if (fixed) {
FloatPoint fixedOffset = renderer.localToContainerPoint(FloatPoint(), &m_paintInvalidationContainer, TraverseDocumentBoundaries);
m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y());
« no previous file with comments | « LayoutTests/fast/repaint/vertical-rl-as-paint-container-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698