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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 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/layout/compositing/CompositedLayerMapping.h" 9 #include "core/layout/compositing/CompositedLayerMapping.h"
10 #include "core/paint/ObjectPaintInvalidator.h" 10 #include "core/paint/ObjectPaintInvalidator.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 PaintInvalidationReason reason = computePaintInvalidationReason(); 274 PaintInvalidationReason reason = computePaintInvalidationReason();
275 if (reason == PaintInvalidationIncremental) { 275 if (reason == PaintInvalidationIncremental) {
276 bool invalidated; 276 bool invalidated;
277 if (m_box.isLayoutView() && 277 if (m_box.isLayoutView() &&
278 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 278 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
279 invalidated = incrementallyInvalidatePaint( 279 invalidated = incrementallyInvalidatePaint(
280 reason, m_context.oldVisualRect, m_context.newVisualRect); 280 reason, m_context.oldVisualRect, m_context.newVisualRect);
281 } else { 281 } else {
282 invalidated = incrementallyInvalidatePaint( 282 invalidated = incrementallyInvalidatePaint(
283 reason, LayoutRect(m_context.oldLocation, 283 reason,
284 previousBorderBoxSize( 284 LayoutRect(
285 m_box, m_context.oldVisualRect.size())), 285 m_context.oldLocation,
286 previousBorderBoxSize(m_box, m_context.oldVisualRect.size())),
286 LayoutRect(m_context.newLocation, m_box.size())); 287 LayoutRect(m_context.newLocation, m_box.size()));
287 } 288 }
288 if (invalidated) { 289 if (invalidated) {
289 m_context.paintingLayer->setNeedsRepaint(); 290 m_context.paintingLayer->setNeedsRepaint();
290 m_box.invalidateDisplayItemClients(reason); 291 m_box.invalidateDisplayItemClients(reason);
291 } else { 292 } else {
292 reason = PaintInvalidationNone; 293 reason = PaintInvalidationNone;
293 } 294 }
294 295
295 // Though we have done incremental invalidation, we still need to call 296 // Though we have done incremental invalidation, we still need to call
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 390
390 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { 391 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() {
391 DCHECK(m_box.hasPreviousBoxGeometries() == 392 DCHECK(m_box.hasPreviousBoxGeometries() ==
392 previousBoxGeometriesMap().contains(&m_box)); 393 previousBoxGeometriesMap().contains(&m_box));
393 return m_box.hasPreviousBoxGeometries() 394 return m_box.hasPreviousBoxGeometries()
394 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect 395 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect
395 : LayoutRect(); 396 : LayoutRect();
396 } 397 }
397 398
398 } // namespace blink 399 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp ('k') | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698