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

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

Issue 1616643002: Rename LineLayoutPaintShim -> LineLayoutAPIShim (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/SVGInlineFlowBoxPainter.h" 5 #include "core/paint/SVGInlineFlowBoxPainter.h"
6 6
7 #include "core/layout/LayoutInline.h" 7 #include "core/layout/LayoutInline.h"
8 #include "core/layout/api/LineLayoutAPIShim.h"
8 #include "core/layout/svg/line/SVGInlineFlowBox.h" 9 #include "core/layout/svg/line/SVGInlineFlowBox.h"
9 #include "core/layout/svg/line/SVGInlineTextBox.h" 10 #include "core/layout/svg/line/SVGInlineTextBox.h"
10 #include "core/paint/LineLayoutPaintShim.h"
11 #include "core/paint/ObjectPainter.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
22 PaintInfo childPaintInfo(paintInfo); 22 PaintInfo childPaintInfo(paintInfo);
23 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child = chil d->nextOnLine()) { 23 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child = chil d->nextOnLine()) {
24 if (child->isSVGInlineTextBox()) 24 if (child->isSVGInlineTextBox())
25 SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBa ckground(childPaintInfo); 25 SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBa ckground(childPaintInfo);
26 else if (child->isSVGInlineFlowBox()) 26 else if (child->isSVGInlineFlowBox())
27 SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBa ckground(childPaintInfo); 27 SVGInlineFlowBoxPainter(*toSVGInlineFlowBox(child)).paintSelectionBa ckground(childPaintInfo);
28 } 28 }
29 } 29 }
30 30
31 void SVGInlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin t& paintOffset) 31 void SVGInlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin t& paintOffset)
32 { 32 {
33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection); 33 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection);
34 34
35 SVGPaintContext paintContext(*LineLayoutPaintShim::constLayoutObjectFrom(m_s vgInlineFlowBox.lineLayoutItem()), paintInfo); 35 SVGPaintContext paintContext(*LineLayoutAPIShim::constLayoutObjectFrom(m_svg InlineFlowBox.lineLayoutItem()), paintInfo);
36 if (paintContext.applyClipMaskAndFilterIfNecessary()) { 36 if (paintContext.applyClipMaskAndFilterIfNecessary()) {
37 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child = child->nextOnLine()) 37 for (InlineBox* child = m_svgInlineFlowBox.firstChild(); child; child = child->nextOnLine())
38 child->paint(paintContext.paintInfo(), paintOffset, 0, 0); 38 child->paint(paintContext.paintInfo(), paintOffset, 0, 0);
39 } 39 }
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698