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

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

Issue 1642223002: Delete selection gap code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Integrate feedback. Created 4 years, 10 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/BlockPainter.h" 5 #include "core/paint/BlockPainter.h"
6 6
7 #include "core/editing/DragCaretController.h" 7 #include "core/editing/DragCaretController.h"
8 #include "core/editing/FrameSelection.h" 8 #include "core/editing/FrameSelection.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutBlockFlow.h" 10 #include "core/layout/LayoutBlockFlow.h"
(...skipping 22 matching lines...) Expand all
33 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutBlock.location(); 33 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutBlock.location();
34 if (!intersectsPaintRect(paintInfo, adjustedPaintOffset)) 34 if (!intersectsPaintRect(paintInfo, adjustedPaintOffset))
35 return; 35 return;
36 36
37 PaintInfo localPaintInfo(paintInfo); 37 PaintInfo localPaintInfo(paintInfo);
38 PaintPhase originalPhase = localPaintInfo.phase; 38 PaintPhase originalPhase = localPaintInfo.phase;
39 39
40 // There are some cases where not all clipped visual overflow is accounted f or. 40 // There are some cases where not all clipped visual overflow is accounted f or.
41 // FIXME: reduce the number of such cases. 41 // FIXME: reduce the number of such cases.
42 ContentsClipBehavior contentsClipBehavior = ForceContentsClip; 42 ContentsClipBehavior contentsClipBehavior = ForceContentsClip;
43 if (m_layoutBlock.hasOverflowClip() && !m_layoutBlock.hasControlClip() && !( m_layoutBlock.shouldPaintSelectionGaps() && originalPhase == PaintPhaseForegroun d) && !m_layoutBlock.hasCaret()) 43 if (m_layoutBlock.hasOverflowClip() && !m_layoutBlock.hasControlClip() && !m _layoutBlock.hasCaret())
44 contentsClipBehavior = SkipContentsClipIfPossible; 44 contentsClipBehavior = SkipContentsClipIfPossible;
45 45
46 if (originalPhase == PaintPhaseOutline) { 46 if (originalPhase == PaintPhaseOutline) {
47 localPaintInfo.phase = PaintPhaseDescendantOutlinesOnly; 47 localPaintInfo.phase = PaintPhaseDescendantOutlinesOnly;
48 } else if (shouldPaintSelfBlockBackground(originalPhase)) { 48 } else if (shouldPaintSelfBlockBackground(originalPhase)) {
49 localPaintInfo.phase = PaintPhaseSelfBlockBackgroundOnly; 49 localPaintInfo.phase = PaintPhaseSelfBlockBackgroundOnly;
50 m_layoutBlock.paintObject(localPaintInfo, adjustedPaintOffset); 50 m_layoutBlock.paintObject(localPaintInfo, adjustedPaintOffset);
51 if (shouldPaintDescendantBlockBackgrounds(originalPhase)) 51 if (shouldPaintDescendantBlockBackgrounds(originalPhase))
52 localPaintInfo.phase = PaintPhaseDescendantBlockBackgroundsOnly; 52 localPaintInfo.phase = PaintPhaseDescendantBlockBackgroundsOnly;
53 } 53 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 ObjectPainter(m_layoutBlock).paintInlineChildrenOutlines(paintInfo, paintOffset); 251 ObjectPainter(m_layoutBlock).paintInlineChildrenOutlines(paintInfo, paintOffset);
252 else 252 else
253 LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, p aintInfo, paintOffset); 253 LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, p aintInfo, paintOffset);
254 } else { 254 } else {
255 PaintInfo paintInfoForDescendants = paintInfo.forDescendants(); 255 PaintInfo paintInfoForDescendants = paintInfo.forDescendants();
256 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset); 256 m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset);
257 } 257 }
258 } 258 }
259 259
260 } // namespace blink 260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698