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

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2736373003: Fix wrong paint invalidation container for column spanners (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 m_paintInvalidationContainerForStackedContents = 126 m_paintInvalidationContainerForStackedContents =
127 toLayoutBoxModelObject(&currentObject); 127 toLayoutBoxModelObject(&currentObject);
128 } else if (currentObject.isLayoutView()) { 128 } else if (currentObject.isLayoutView()) {
129 // m_paintInvalidationContainerForStackedContents is only for stacked 129 // m_paintInvalidationContainerForStackedContents is only for stacked
130 // descendants in its own frame, because it doesn't establish stacking 130 // descendants in its own frame, because it doesn't establish stacking
131 // context for stacked contents in sub-frames. Contents stacked in the root 131 // context for stacked contents in sub-frames. Contents stacked in the root
132 // stacking context in this frame should use this frame's 132 // stacking context in this frame should use this frame's
133 // paintInvalidationContainer. 133 // paintInvalidationContainer.
134 m_paintInvalidationContainerForStackedContents = 134 m_paintInvalidationContainerForStackedContents =
135 m_paintInvalidationContainer; 135 m_paintInvalidationContainer;
136 } else if (currentObject.isFloatingWithNonContainingBlockParent()) { 136 } else if (currentObject.isFloatingWithNonContainingBlockParent() ||
137 currentObject.isColumnSpanAll()) {
138 // In these cases, the object may belong to an ancestor of the current
139 // paint invalidation container, in paint order.
137 m_paintInvalidationContainer = 140 m_paintInvalidationContainer =
138 &currentObject.containerForPaintInvalidation(); 141 &currentObject.containerForPaintInvalidation();
139 m_cachedOffsetsEnabled = false; 142 m_cachedOffsetsEnabled = false;
140 } else if (currentObject.styleRef().isStacked() && 143 } else if (currentObject.styleRef().isStacked() &&
141 // This is to exclude some objects (e.g. LayoutText) inheriting 144 // This is to exclude some objects (e.g. LayoutText) inheriting
142 // stacked style from parent but aren't actually stacked. 145 // stacked style from parent but aren't actually stacked.
143 currentObject.hasLayer() && 146 currentObject.hasLayer() &&
144 m_paintInvalidationContainer != 147 m_paintInvalidationContainer !=
145 m_paintInvalidationContainerForStackedContents) { 148 m_paintInvalidationContainerForStackedContents) {
146 // The current object is stacked, so we should use 149 // The current object is stacked, so we should use
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 633 }
631 634
632 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking( 635 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(
633 const LayoutObject& object, 636 const LayoutObject& object,
634 LayoutRect& rect) const { 637 LayoutRect& rect) const {
635 DCHECK(&object == &m_paintInvalidationState.currentObject()); 638 DCHECK(&object == &m_paintInvalidationState.currentObject());
636 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 639 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
637 } 640 }
638 641
639 } // namespace blink 642 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698