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

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

Issue 2430313004: Paint collapsed borders of a table as one display item (Closed)
Patch Set: Rebaseline-cl Created 4 years, 1 month 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (object.styleRef().hasOutline()) 202 if (object.styleRef().hasOutline())
203 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines(); 203 context.paintingLayer->setNeedsPaintPhaseDescendantOutlines();
204 204
205 if (object.hasBoxDecorationBackground() 205 if (object.hasBoxDecorationBackground()
206 // We also paint overflow controls in background phase. 206 // We also paint overflow controls in background phase.
207 || (object.hasOverflowClip() && 207 || (object.hasOverflowClip() &&
208 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { 208 toLayoutBox(object).getScrollableArea()->hasOverflowControls())) {
209 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); 209 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds();
210 } 210 }
211 211
212 if (object.isTable()) { 212 if (object.isTable() && toLayoutTable(object).hasCollapsedBorders())
chrishtr 2016/11/03 21:16:29 The old code was just inaccurate I guess?
Xianzhu 2016/11/03 21:26:55 They are equivalent. The new function LayoutTable:
213 const LayoutTable& table = toLayoutTable(object); 213 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds();
214 if (table.collapseBorders() && !table.collapsedBorders().isEmpty())
215 context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds();
216 }
217 } 214 }
218 215
219 namespace { 216 namespace {
220 217
221 // This is temporary to workaround paint invalidation issues in 218 // This is temporary to workaround paint invalidation issues in
222 // non-rootLayerScrolls mode. 219 // non-rootLayerScrolls mode.
223 // It undoes FrameView's content clip and scroll for paint invalidation of frame 220 // It undoes FrameView's content clip and scroll for paint invalidation of frame
224 // scroll controls and the LayoutView to which the content clip and scroll don't 221 // scroll controls and the LayoutView to which the content clip and scroll don't
225 // apply. 222 // apply.
226 class ScopedUndoFrameViewContentClipAndScroll { 223 class ScopedUndoFrameViewContentClipAndScroll {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 object.getMutableForPainting().clearPaintInvalidationFlags(); 448 object.getMutableForPainting().clearPaintInvalidationFlags();
452 } 449 }
453 450
454 void PaintInvalidator::processPendingDelayedPaintInvalidations() { 451 void PaintInvalidator::processPendingDelayedPaintInvalidations() {
455 for (auto target : m_pendingDelayedPaintInvalidations) 452 for (auto target : m_pendingDelayedPaintInvalidations)
456 target->getMutableForPainting().setShouldDoFullPaintInvalidation( 453 target->getMutableForPainting().setShouldDoFullPaintInvalidation(
457 PaintInvalidationDelayedFull); 454 PaintInvalidationDelayedFull);
458 } 455 }
459 456
460 } // namespace blink 457 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698