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

Unified Diff: Source/core/rendering/svg/SVGInlineFlowBox.cpp

Issue 671943004: Move SVG inline flow box paint code to SVGInlineFlowBoxPainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/SVGRootInlineBoxPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGInlineFlowBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineFlowBox.cpp b/Source/core/rendering/svg/SVGInlineFlowBox.cpp
index 3c4211573836c9031c7858032b442c71205002eb..5c186b534c9aea6ad61053d80031ca2aa7706cf1 100644
--- a/Source/core/rendering/svg/SVGInlineFlowBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineFlowBox.cpp
@@ -23,36 +23,19 @@
#include "config.h"
#include "core/rendering/svg/SVGInlineFlowBox.h"
-#include "core/paint/SVGInlineTextBoxPainter.h"
-#include "core/rendering/svg/RenderSVGInlineText.h"
+#include "core/paint/SVGInlineFlowBoxPainter.h"
#include "core/rendering/svg/SVGInlineTextBox.h"
-#include "core/rendering/svg/SVGRenderingContext.h"
namespace blink {
void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo)
{
- ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
-
- PaintInfo childPaintInfo(paintInfo);
- for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
- if (child->isSVGInlineTextBox())
- SVGInlineTextBoxPainter(*toSVGInlineTextBox(child)).paintSelectionBackground(childPaintInfo);
- else if (child->isSVGInlineFlowBox())
- toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo);
- }
+ SVGInlineFlowBoxPainter(*this).paintSelectionBackground(paintInfo);
}
void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit, LayoutUnit)
{
- ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection);
-
- GraphicsContextStateSaver stateSaver(*paintInfo.context);
- SVGRenderingContext renderingContext(&renderer(), paintInfo);
- if (renderingContext.isRenderingPrepared()) {
- for (InlineBox* child = firstChild(); child; child = child->nextOnLine())
- child->paint(paintInfo, paintOffset, 0, 0);
- }
+ SVGInlineFlowBoxPainter(*this).paint(paintInfo, paintOffset);
}
FloatRect SVGInlineFlowBox::calculateBoundaries() const
« no previous file with comments | « Source/core/paint/SVGRootInlineBoxPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698