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" |
11 #include "core/layout/LayoutBlockFlow.h" | 11 #include "core/layout/LayoutBlockFlow.h" |
12 #include "core/layout/LayoutObject.h" | 12 #include "core/layout/LayoutObject.h" |
13 #include "core/layout/LayoutTable.h" | 13 #include "core/layout/LayoutTable.h" |
| 14 #include "core/layout/LayoutTableSection.h" |
14 #include "core/layout/LayoutView.h" | 15 #include "core/layout/LayoutView.h" |
15 #include "core/layout/svg/SVGLayoutSupport.h" | 16 #include "core/layout/svg/SVGLayoutSupport.h" |
16 #include "core/paint/ObjectPaintProperties.h" | 17 #include "core/paint/ObjectPaintProperties.h" |
17 #include "core/paint/PaintLayer.h" | 18 #include "core/paint/PaintLayer.h" |
18 #include "core/paint/PaintLayerScrollableArea.h" | 19 #include "core/paint/PaintLayerScrollableArea.h" |
19 #include "core/paint/PaintPropertyTreeBuilder.h" | 20 #include "core/paint/PaintPropertyTreeBuilder.h" |
20 #include "platform/graphics/paint/GeometryMapper.h" | 21 #include "platform/graphics/paint/GeometryMapper.h" |
21 #include "wtf/Optional.h" | 22 #include "wtf/Optional.h" |
22 | 23 |
23 namespace blink { | 24 namespace blink { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 if (object.isTable()) { | 227 if (object.isTable()) { |
227 const LayoutTable& table = toLayoutTable(object); | 228 const LayoutTable& table = toLayoutTable(object); |
228 if (table.collapseBorders() && !table.collapsedBorders().isEmpty()) | 229 if (table.collapseBorders() && !table.collapsedBorders().isEmpty()) |
229 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); | 230 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
230 } | 231 } |
231 | 232 |
232 // The following flags are for descendants of the layer object only. | 233 // The following flags are for descendants of the layer object only. |
233 if (object == context.paintingLayer->layoutObject()) | 234 if (object == context.paintingLayer->layoutObject()) |
234 return; | 235 return; |
235 | 236 |
| 237 if (object.isTableSection()) { |
| 238 const auto& section = toLayoutTableSection(object); |
| 239 if (section.table()->hasColElements()) |
| 240 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
| 241 } |
| 242 |
236 if (object.styleRef().hasOutline()) | 243 if (object.styleRef().hasOutline()) |
237 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); | 244 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); |
238 | 245 |
239 if (object.hasBoxDecorationBackground() | 246 if (object.hasBoxDecorationBackground() |
240 // We also paint overflow controls in background phase. | 247 // We also paint overflow controls in background phase. |
241 || (object.hasOverflowClip() && | 248 || (object.hasOverflowClip() && |
242 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { | 249 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { |
243 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); | 250 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
244 } | 251 } |
245 } | 252 } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 } | 501 } |
495 } | 502 } |
496 | 503 |
497 void PaintInvalidator::processPendingDelayedPaintInvalidations() { | 504 void PaintInvalidator::processPendingDelayedPaintInvalidations() { |
498 for (auto target : m_pendingDelayedPaintInvalidations) | 505 for (auto target : m_pendingDelayedPaintInvalidations) |
499 target->getMutableForPainting().setShouldDoFullPaintInvalidation( | 506 target->getMutableForPainting().setShouldDoFullPaintInvalidation( |
500 PaintInvalidationDelayedFull); | 507 PaintInvalidationDelayedFull); |
501 } | 508 } |
502 | 509 |
503 } // namespace blink | 510 } // namespace blink |
OLD | NEW |