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

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

Issue 1610233002: [Reland] Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/ReplacedPainter.h" 5 #include "core/paint/ReplacedPainter.h"
6 6
7 #include "core/layout/LayoutReplaced.h" 7 #include "core/layout/LayoutReplaced.h"
8 #include "core/layout/api/SelectionState.h" 8 #include "core/layout/api/SelectionState.h"
9 #include "core/layout/svg/LayoutSVGRoot.h" 9 #include "core/layout/svg/LayoutSVGRoot.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return; 42 return;
43 43
44 if (shouldPaintSelfOutline(paintInfo.phase)) { 44 if (shouldPaintSelfOutline(paintInfo.phase)) {
45 ObjectPainter(m_layoutReplaced).paintOutline(paintInfo, adjustedPaintOff set); 45 ObjectPainter(m_layoutReplaced).paintOutline(paintInfo, adjustedPaintOff set);
46 return; 46 return;
47 } 47 }
48 48
49 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection && !m_layoutReplaced.canHaveChildren() && paintInfo.phase != PaintPhas eClippingMask) 49 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection && !m_layoutReplaced.canHaveChildren() && paintInfo.phase != PaintPhas eClippingMask)
50 return; 50 return;
51 51
52 if (!paintInfo.shouldPaintWithinRoot(&m_layoutReplaced))
53 return;
54
55 if (paintInfo.phase == PaintPhaseSelection) 52 if (paintInfo.phase == PaintPhaseSelection)
56 if (m_layoutReplaced.selectionState() == SelectionNone) 53 if (m_layoutReplaced.selectionState() == SelectionNone)
57 return; 54 return;
58 55
59 { 56 {
60 Optional<RoundedInnerRectClipper> clipper; 57 Optional<RoundedInnerRectClipper> clipper;
61 bool completelyClippedOut = false; 58 bool completelyClippedOut = false;
62 if (m_layoutReplaced.style()->hasBorderRadius()) { 59 if (m_layoutReplaced.style()->hasBorderRadius()) {
63 if (borderRect.isEmpty()) { 60 if (borderRect.isEmpty()) {
64 completelyClippedOut = true; 61 completelyClippedOut = true;
(...skipping 27 matching lines...) Expand all
92 LayoutRect selectionPaintingRect = m_layoutReplaced.localSelectionRect() ; 89 LayoutRect selectionPaintingRect = m_layoutReplaced.localSelectionRect() ;
93 selectionPaintingRect.moveBy(adjustedPaintOffset); 90 selectionPaintingRect.moveBy(adjustedPaintOffset);
94 IntRect selectionPaintingIntRect = pixelSnappedIntRect(selectionPainting Rect); 91 IntRect selectionPaintingIntRect = pixelSnappedIntRect(selectionPainting Rect);
95 92
96 LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutR eplaced, DisplayItem::SelectionTint, selectionPaintingIntRect, adjustedPaintOffs et); 93 LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutR eplaced, DisplayItem::SelectionTint, selectionPaintingIntRect, adjustedPaintOffs et);
97 paintInfo.context.fillRect(selectionPaintingIntRect, m_layoutReplaced.se lectionBackgroundColor()); 94 paintInfo.context.fillRect(selectionPaintingIntRect, m_layoutReplaced.se lectionBackgroundColor());
98 } 95 }
99 } 96 }
100 97
101 } // namespace blink 98 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698