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

Side by Side Diff: Source/core/paint/PartPainter.cpp

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty focus ring on Mac Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/PaintInfo.h ('k') | Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/PartPainter.h" 6 #include "core/paint/PartPainter.h"
7 7
8 #include "core/layout/LayoutPart.h" 8 #include "core/layout/LayoutPart.h"
9 #include "core/paint/BoxPainter.h" 9 #include "core/paint/BoxPainter.h"
10 #include "core/paint/DeprecatedPaintLayer.h" 10 #include "core/paint/DeprecatedPaintLayer.h"
(...skipping 16 matching lines...) Expand all
27 27
28 if (m_layoutPart.hasBoxDecorationBackground() && (paintInfo.phase == PaintPh aseForeground || paintInfo.phase == PaintPhaseSelection)) 28 if (m_layoutPart.hasBoxDecorationBackground() && (paintInfo.phase == PaintPh aseForeground || paintInfo.phase == PaintPhaseSelection))
29 BoxPainter(m_layoutPart).paintBoxDecorationBackground(paintInfo, adjuste dPaintOffset); 29 BoxPainter(m_layoutPart).paintBoxDecorationBackground(paintInfo, adjuste dPaintOffset);
30 30
31 if (paintInfo.phase == PaintPhaseMask) { 31 if (paintInfo.phase == PaintPhaseMask) {
32 BoxPainter(m_layoutPart).paintMask(paintInfo, adjustedPaintOffset); 32 BoxPainter(m_layoutPart).paintMask(paintInfo, adjustedPaintOffset);
33 return; 33 return;
34 } 34 }
35 35
36 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_layoutPart.style()->hasOutline()) 36 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe lfOutline) && m_layoutPart.style()->hasOutline())
37 ObjectPainter(m_layoutPart).paintOutline(paintInfo, m_layoutPart.visualO verflowRect(), borderRect.size(), adjustedPaintOffset); 37 ObjectPainter(m_layoutPart).paintOutline(paintInfo, adjustedPaintOffset) ;
38 38
39 if (paintInfo.phase != PaintPhaseForeground) 39 if (paintInfo.phase != PaintPhaseForeground)
40 return; 40 return;
41 41
42 { 42 {
43 Optional<RoundedInnerRectClipper> clipper; 43 Optional<RoundedInnerRectClipper> clipper;
44 if (m_layoutPart.style()->hasBorderRadius()) { 44 if (m_layoutPart.style()->hasBorderRadius()) {
45 if (borderRect.isEmpty()) 45 if (borderRect.isEmpty())
46 return; 46 return;
47 47
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 IntSize widgetPaintOffset = paintLocation - widgetLocation; 89 IntSize widgetPaintOffset = paintLocation - widgetLocation;
90 // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer, 90 // When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,
91 // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plugin drawing. 91 // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plugin drawing.
92 TransformRecorder transform(*paintInfo.context, m_layoutPart, 92 TransformRecorder transform(*paintInfo.context, m_layoutPart,
93 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse t.height())); 93 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse t.height()));
94 paintRect.move(-widgetPaintOffset); 94 paintRect.move(-widgetPaintOffset);
95 widget->paint(paintInfo.context, paintRect); 95 widget->paint(paintInfo.context, paintRect);
96 } 96 }
97 97
98 } // namespace blink 98 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/PaintInfo.h ('k') | Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698