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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 if (object.styleRef().hasOutline()) | 207 if (object.styleRef().hasOutline()) |
208 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); | 208 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); |
209 | 209 |
210 if (object.hasBoxDecorationBackground() | 210 if (object.hasBoxDecorationBackground() |
211 // We also paint overflow controls in background phase. | 211 // We also paint overflow controls in background phase. |
212 || (object.hasOverflowClip() && | 212 || (object.hasOverflowClip() && |
213 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { | 213 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { |
214 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); | 214 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
215 } | 215 } |
216 | 216 |
217 if (object.isTable()) { | 217 if (object.isTable() && toLayoutTable(object).hasCollapsedBorders()) |
218 const LayoutTable& table = toLayoutTable(object); | 218 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
219 if (table.collapseBorders() && !table.collapsedBorders().isEmpty()) | |
220 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); | |
221 } | |
222 } | 219 } |
223 | 220 |
224 namespace { | 221 namespace { |
225 | 222 |
226 // This is temporary to workaround paint invalidation issues in | 223 // This is temporary to workaround paint invalidation issues in |
227 // non-rootLayerScrolls mode. | 224 // non-rootLayerScrolls mode. |
228 // It undoes FrameView's content clip and scroll for paint invalidation of frame | 225 // It undoes FrameView's content clip and scroll for paint invalidation of frame |
229 // scroll controls and the LayoutView to which the content clip and scroll don't | 226 // scroll controls and the LayoutView to which the content clip and scroll don't |
230 // apply. | 227 // apply. |
231 class ScopedUndoFrameViewContentClipAndScroll { | 228 class ScopedUndoFrameViewContentClipAndScroll { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; | 431 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; |
435 } | 432 } |
436 | 433 |
437 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 434 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
438 for (auto target : m_pendingDelayedPaintInvalidations) | 435 for (auto target : m_pendingDelayedPaintInvalidations) |
439 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 436 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
440 PaintInvalidationDelayedFull); | 437 PaintInvalidationDelayedFull); |
441 } | 438 } |
442 | 439 |
443 } // namespace blink | 440 } // namespace blink |
OLD | NEW |