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

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

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 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 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 "config.h" 5 #include "config.h"
6 #include "core/paint/ReplacedPainter.h" 6 #include "core/paint/ReplacedPainter.h"
7 7
8 #include "core/layout/LayoutReplaced.h" 8 #include "core/layout/LayoutReplaced.h"
9 #include "core/layout/api/SelectionState.h" 9 #include "core/layout/api/SelectionState.h"
10 #include "core/layout/svg/LayoutSVGRoot.h" 10 #include "core/layout/svg/LayoutSVGRoot.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 BoxPainter(m_layoutReplaced).paintClippingMask(paintInfo, adjust edPaintOffset); 83 BoxPainter(m_layoutReplaced).paintClippingMask(paintInfo, adjust edPaintOffset);
84 } else { 84 } else {
85 m_layoutReplaced.paintReplaced(paintInfo, adjustedPaintOffset); 85 m_layoutReplaced.paintReplaced(paintInfo, adjustedPaintOffset);
86 } 86 }
87 } 87 }
88 } 88 }
89 89
90 // The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of 90 // The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of
91 // surrounding content. 91 // surrounding content.
92 bool drawSelectionTint = paintInfo.phase == PaintPhaseForeground && m_layout Replaced.selectionState() != SelectionNone && !paintInfo.isPrinting(); 92 bool drawSelectionTint = paintInfo.phase == PaintPhaseForeground && m_layout Replaced.selectionState() != SelectionNone && !paintInfo.isPrinting();
93 if (drawSelectionTint && !LayoutObjectDrawingRecorder::useCachedDrawingIfPos sible(*paintInfo.context, m_layoutReplaced, DisplayItem::SelectionTint, adjusted PaintOffset)) { 93 if (drawSelectionTint && !LayoutObjectDrawingRecorder::useCachedDrawingIfPos sible(paintInfo.context, m_layoutReplaced, DisplayItem::SelectionTint, adjustedP aintOffset)) {
94 LayoutRect selectionPaintingRect = m_layoutReplaced.localSelectionRect() ; 94 LayoutRect selectionPaintingRect = m_layoutReplaced.localSelectionRect() ;
95 selectionPaintingRect.moveBy(adjustedPaintOffset); 95 selectionPaintingRect.moveBy(adjustedPaintOffset);
96 IntRect selectionPaintingIntRect = pixelSnappedIntRect(selectionPainting Rect); 96 IntRect selectionPaintingIntRect = pixelSnappedIntRect(selectionPainting Rect);
97 97
98 LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layout Replaced, DisplayItem::SelectionTint, selectionPaintingIntRect, adjustedPaintOff set); 98 LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutR eplaced, DisplayItem::SelectionTint, selectionPaintingIntRect, adjustedPaintOffs et);
99 paintInfo.context->fillRect(selectionPaintingIntRect, m_layoutReplaced.s electionBackgroundColor()); 99 paintInfo.context.fillRect(selectionPaintingIntRect, m_layoutReplaced.se lectionBackgroundColor());
100 } 100 }
101 } 101 }
102 102
103 } // namespace blink 103 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PartPainter.cpp ('k') | third_party/WebKit/Source/core/paint/RoundedInnerRectClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698