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

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

Issue 2551963003: Reland of Paint collapsed borders of a table as one display item (Closed)
Patch Set: Created 4 years 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/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
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate; 430 PaintInvalidatorContext::ForcedSubtreeInvalidationRectUpdate;
434 } 431 }
435 432
436 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 433 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
437 for (auto target : m_pendingDelayedPaintInvalidations) 434 for (auto target : m_pendingDelayedPaintInvalidations)
438 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 435 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
439 PaintInvalidationDelayedFull); 436 PaintInvalidationDelayedFull);
440 } 437 }
441 438
442 } // namespace blink 439 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | third_party/WebKit/Source/core/paint/TableCellPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698