| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // TODO(crbug.com/490725): This is a workaround for the bug, to force | 444 // TODO(crbug.com/490725): This is a workaround for the bug, to force |
| 445 // descendant to update visual rects on clipping change. | 445 // descendant to update visual rects on clipping change. |
| 446 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && | 446 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && |
| 447 context.oldVisualRect != context.newVisualRect | 447 context.oldVisualRect != context.newVisualRect |
| 448 // Note that isLayoutView() below becomes unnecessary after the launch of | 448 // Note that isLayoutView() below becomes unnecessary after the launch of |
| 449 // root layer scrolling. | 449 // root layer scrolling. |
| 450 && (object.hasOverflowClip() || object.isLayoutView()) && | 450 && (object.hasOverflowClip() || object.isLayoutView()) && |
| 451 !toLayoutBox(object).usesCompositedScrolling()) | 451 !toLayoutBox(object).usesCompositedScrolling()) |
| 452 context.forcedSubtreeInvalidationFlags |= | 452 context.forcedSubtreeInvalidationFlags |= |
| 453 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 453 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
| 454 | |
| 455 object.getMutableForPainting().clearPaintInvalidationFlags(); | |
| 456 } | 454 } |
| 457 | 455 |
| 458 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 456 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
| 459 for (auto target : m_pendingDelayedPaintInvalidations) | 457 for (auto target : m_pendingDelayedPaintInvalidations) |
| 460 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 458 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
| 461 PaintInvalidationDelayedFull); | 459 PaintInvalidationDelayedFull); |
| 462 } | 460 } |
| 463 | 461 |
| 464 } // namespace blink | 462 } // namespace blink |
| OLD | NEW |