| OLD | NEW |
| 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/PaintInvalidator.h" | 5 #include "core/paint/PaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/editing/FrameSelection.h" | 7 #include "core/editing/FrameSelection.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 context.paintInvalidationContainer = | 364 context.paintInvalidationContainer = |
| 365 context.paintInvalidationContainerForStackedContents = | 365 context.paintInvalidationContainerForStackedContents = |
| 366 &layoutView->containerForPaintInvalidation(); | 366 &layoutView->containerForPaintInvalidation(); |
| 367 context.paintingLayer = layoutView->layer(); | 367 context.paintingLayer = layoutView->layer(); |
| 368 | 368 |
| 369 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 369 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 370 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); | 370 ScopedUndoFrameViewContentClipAndScroll undo(frameView, context); |
| 371 frameView.invalidatePaintOfScrollControlsIfNeeded(context); | 371 frameView.invalidatePaintOfScrollControlsIfNeeded(context); |
| 372 } | 372 } |
| 373 | |
| 374 frameView.frame().selection().invalidateCaretRect(); | |
| 375 } | 373 } |
| 376 | 374 |
| 377 void PaintInvalidator::invalidatePaintIfNeeded( | 375 void PaintInvalidator::invalidatePaintIfNeeded( |
| 378 const LayoutObject& object, | 376 const LayoutObject& object, |
| 379 PaintInvalidatorContext& context) { | 377 PaintInvalidatorContext& context) { |
| 380 object.getMutableForPainting().ensureIsReadyForPaintInvalidation(); | 378 object.getMutableForPainting().ensureIsReadyForPaintInvalidation(); |
| 381 | 379 |
| 382 // The paint offset should already be updated through | 380 // The paint offset should already be updated through |
| 383 // PaintPropertyTreeBuilder::updatePropertiesForSelf. | 381 // PaintPropertyTreeBuilder::updatePropertiesForSelf. |
| 384 DCHECK(context.treeBuilderContext.current.paintOffset == | 382 DCHECK(context.treeBuilderContext.current.paintOffset == |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 443 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 446 } | 444 } |
| 447 | 445 |
| 448 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 446 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 449 for (auto target : m_pendingDelayedPaintInvalidations) | 447 for (auto target : m_pendingDelayedPaintInvalidations) |
| 450 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 448 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 451 PaintInvalidationDelayedFull); | 449 PaintInvalidationDelayedFull); |
| 452 } | 450 } |
| 453 | 451 |
| 454 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |