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

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp

Issue 2546173003: Fix under-invalidation of frameset on resize (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFrameSet.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/paint/BoxPaintInvalidator.h" 5 #include "core/paint/BoxPaintInvalidator.h"
6 6
7 #include "core/frame/Settings.h" 7 #include "core/frame/Settings.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/paint/ObjectPaintInvalidator.h" 9 #include "core/paint/ObjectPaintInvalidator.h"
10 #include "core/paint/PaintInvalidator.h" 10 #include "core/paint/PaintInvalidator.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (style.hasBorderRadius()) 172 if (style.hasBorderRadius())
173 return PaintInvalidationBorderBoxChange; 173 return PaintInvalidationBorderBoxChange;
174 174
175 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && 175 if (oldBorderBoxSize.width() != newBorderBoxSize.width() &&
176 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) 176 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange())
177 return PaintInvalidationBorderBoxChange; 177 return PaintInvalidationBorderBoxChange;
178 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && 178 if (oldBorderBoxSize.height() != newBorderBoxSize.height() &&
179 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) 179 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange())
180 return PaintInvalidationBorderBoxChange; 180 return PaintInvalidationBorderBoxChange;
181 181
182 // Needs to repaint frame boundaries.
183 if (m_box.isFrameSet())
184 return PaintInvalidationBorderBoxChange;
185
182 return PaintInvalidationIncremental; 186 return PaintInvalidationIncremental;
183 } 187 }
184 188
185 PaintInvalidationReason BoxPaintInvalidator::invalidatePaintIfNeeded() { 189 PaintInvalidationReason BoxPaintInvalidator::invalidatePaintIfNeeded() {
186 PaintInvalidationReason reason = computePaintInvalidationReason(); 190 PaintInvalidationReason reason = computePaintInvalidationReason();
187 if (reason == PaintInvalidationIncremental) { 191 if (reason == PaintInvalidationIncremental) {
188 if (incrementallyInvalidatePaint()) { 192 if (incrementallyInvalidatePaint()) {
189 m_context.paintingLayer->setNeedsRepaint(); 193 m_context.paintingLayer->setNeedsRepaint();
190 m_box.invalidateDisplayItemClients(reason); 194 m_box.invalidateDisplayItemClients(reason);
191 } else { 195 } else {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 287
284 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { 288 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() {
285 DCHECK(m_box.hasPreviousBoxGeometries() == 289 DCHECK(m_box.hasPreviousBoxGeometries() ==
286 previousBoxGeometriesMap().contains(&m_box)); 290 previousBoxGeometriesMap().contains(&m_box));
287 return m_box.hasPreviousBoxGeometries() 291 return m_box.hasPreviousBoxGeometries()
288 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect 292 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect
289 : LayoutRect(); 293 : LayoutRect();
290 } 294 }
291 295
292 } // namespace blink 296 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFrameSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698