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

Side by Side Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 620243002: Move painting code from InlineTextBox to InlineTextBoxPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished. 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 unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 10 matching lines...) Expand all
21 21
22 #include "config.h" 22 #include "config.h"
23 #include "core/rendering/svg/SVGInlineTextBox.h" 23 #include "core/rendering/svg/SVGInlineTextBox.h"
24 24
25 #include "core/dom/DocumentMarkerController.h" 25 #include "core/dom/DocumentMarkerController.h"
26 #include "core/dom/RenderedDocumentMarker.h" 26 #include "core/dom/RenderedDocumentMarker.h"
27 #include "core/editing/Editor.h" 27 #include "core/editing/Editor.h"
28 #include "core/frame/FrameView.h" 28 #include "core/frame/FrameView.h"
29 #include "core/frame/LocalFrame.h" 29 #include "core/frame/LocalFrame.h"
30 #include "core/paint/InlinePainter.h" 30 #include "core/paint/InlinePainter.h"
31 #include "core/paint/InlineTextBoxPainter.h"
31 #include "core/rendering/HitTestResult.h" 32 #include "core/rendering/HitTestResult.h"
32 #include "core/rendering/InlineFlowBox.h" 33 #include "core/rendering/InlineFlowBox.h"
33 #include "core/rendering/PaintInfo.h" 34 #include "core/rendering/PaintInfo.h"
34 #include "core/rendering/PointerEventsHitRules.h" 35 #include "core/rendering/PointerEventsHitRules.h"
35 #include "core/rendering/RenderInline.h" 36 #include "core/rendering/RenderInline.h"
36 #include "core/rendering/RenderTheme.h" 37 #include "core/rendering/RenderTheme.h"
37 #include "core/rendering/style/ShadowList.h" 38 #include "core/rendering/style/ShadowList.h"
38 #include "core/rendering/svg/RenderSVGInlineText.h" 39 #include "core/rendering/svg/RenderSVGInlineText.h"
39 #include "core/rendering/svg/RenderSVGResource.h" 40 #include "core/rendering/svg/RenderSVGResource.h"
40 #include "core/rendering/svg/RenderSVGResourceSolidColor.h" 41 #include "core/rendering/svg/RenderSVGResourceSolidColor.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (!hasSelection && paintSelectedTextOnly) 257 if (!hasSelection && paintSelectedTextOnly)
257 return; 258 return;
258 259
259 RenderSVGInlineText& textRenderer = toRenderSVGInlineText(this->renderer()); 260 RenderSVGInlineText& textRenderer = toRenderSVGInlineText(this->renderer());
260 if (!textShouldBePainted(textRenderer)) 261 if (!textShouldBePainted(textRenderer))
261 return; 262 return;
262 263
263 RenderStyle* style = parentRenderer.style(); 264 RenderStyle* style = parentRenderer.style();
264 ASSERT(style); 265 ASSERT(style);
265 266
266 paintDocumentMarkers(paintInfo.context, paintOffset, style, textRenderer.sca ledFont(), true); 267 InlineTextBoxPainter(*this).paintDocumentMarkers(paintInfo.context, paintOff set, style, textRenderer.scaledFont(), true);
jbroman 2014/10/03 17:46:17 Safe to assume there will eventually be an SVGInli
chrishtr 2014/10/03 18:10:37 Yes. Working on that CL in parallel with this revi
267 268
268 const SVGRenderStyle& svgStyle = style->svgStyle(); 269 const SVGRenderStyle& svgStyle = style->svgStyle();
269 270
270 bool hasFill = svgStyle.hasFill(); 271 bool hasFill = svgStyle.hasFill();
271 bool hasVisibleStroke = svgStyle.hasVisibleStroke(); 272 bool hasVisibleStroke = svgStyle.hasVisibleStroke();
272 273
273 RenderStyle* selectionStyle = style; 274 RenderStyle* selectionStyle = style;
274 if (hasSelection) { 275 if (hasSelection) {
275 selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); 276 selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION);
276 if (selectionStyle) { 277 if (selectionStyle) {
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset)); 758 renderer().updateHitTestResult(result, locationInContainer.point () - toLayoutSize(accumulatedOffset));
758 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect)) 759 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ est, locationInContainer, rect))
759 return true; 760 return true;
760 } 761 }
761 } 762 }
762 } 763 }
763 return false; 764 return false;
764 } 765 }
765 766
766 } // namespace blink 767 } // namespace blink
OLDNEW
« Source/core/rendering/InlineTextBox.h ('K') | « Source/core/rendering/InlineTextBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698