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

Side by Side Diff: Source/core/paint/SVGInlineFlowBoxPainter.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/SVGImagePainter.cpp ('k') | Source/core/paint/SVGShapePainter.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/SVGInlineFlowBoxPainter.h" 6 #include "core/paint/SVGInlineFlowBoxPainter.h"
7 7
8 #include "core/layout/LayoutInline.h" 8 #include "core/layout/LayoutInline.h"
9 #include "core/layout/svg/line/SVGInlineFlowBox.h" 9 #include "core/layout/svg/line/SVGInlineFlowBox.h"
10 #include "core/layout/svg/line/SVGInlineTextBox.h" 10 #include "core/layout/svg/line/SVGInlineTextBox.h"
11 #include "core/paint/InlinePainter.h" 11 #include "core/paint/ObjectPainter.h"
12 #include "core/paint/PaintInfo.h" 12 #include "core/paint/PaintInfo.h"
13 #include "core/paint/SVGInlineTextBoxPainter.h" 13 #include "core/paint/SVGInlineTextBoxPainter.h"
14 #include "core/paint/SVGPaintContext.h" 14 #include "core/paint/SVGPaintContext.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 void SVGInlineFlowBoxPainter::paintSelectionBackground(const PaintInfo& paintInf o) 18 void SVGInlineFlowBoxPainter::paintSelectionBackground(const PaintInfo& paintInf o)
19 { 19 {
20 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection); 20 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection);
21 21
(...skipping 11 matching lines...) Expand all
33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection); 33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection);
34 34
35 { 35 {
36 SVGPaintContext paintContext(m_svgInlineFlowBox.layoutObject(), paintInf o); 36 SVGPaintContext paintContext(m_svgInlineFlowBox.layoutObject(), paintInf o);
37 if (paintContext.applyClipMaskAndFilterIfNecessary()) { 37 if (paintContext.applyClipMaskAndFilterIfNecessary()) {
38 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; chil d = child->nextOnLine()) 38 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; chil d = child->nextOnLine())
39 child->paint(paintContext.paintInfo(), paintOffset, 0, 0); 39 child->paint(paintContext.paintInfo(), paintOffset, 0, 0);
40 } 40 }
41 } 41 }
42 42
43 if (m_svgInlineFlowBox.layoutObject().isLayoutInline()) 43 if (m_svgInlineFlowBox.layoutObject().styleRef().hasOutline()) {
44 InlinePainter(toLayoutInline(m_svgInlineFlowBox.layoutObject())).paintOu tline(paintInfo, paintOffset); 44 PaintInfo outlinePaintInfo(paintInfo);
45 outlinePaintInfo.phase = PaintPhaseSelfOutline;
46 ObjectPainter(m_svgInlineFlowBox.layoutObject()).paintOutline(outlinePai ntInfo, paintOffset);
47 }
45 } 48 }
46 49
47 } // namespace blink 50 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698