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

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

Issue 191003007: Use isSVG*Element() helpers more in SVG code (Part 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006 Apple Computer Inc. 3 * Copyright (C) 2006 Apple Computer Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. 6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 if (child->isSVGInlineTextBox()) { 97 if (child->isSVGInlineTextBox()) {
98 ASSERT(child->renderer().isSVGInlineText()); 98 ASSERT(child->renderer().isSVGInlineText());
99 characterLayout.layoutInlineTextBox(toSVGInlineTextBox(child)); 99 characterLayout.layoutInlineTextBox(toSVGInlineTextBox(child));
100 } else { 100 } else {
101 // Skip generated content. 101 // Skip generated content.
102 Node* node = child->renderer().node(); 102 Node* node = child->renderer().node();
103 if (!node) 103 if (!node)
104 continue; 104 continue;
105 105
106 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child); 106 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
107 bool isTextPath = node->hasTagName(SVGNames::textPathTag); 107 bool isTextPath = isSVGTextPathElement(*node);
108 if (isTextPath) { 108 if (isTextPath) {
109 // Build text chunks for all <textPath> children, using the line layout algorithm. 109 // Build text chunks for all <textPath> children, using the line layout algorithm.
110 // This is needeed as text-anchor is just an additional startOff set for text paths. 110 // This is needeed as text-anchor is just an additional startOff set for text paths.
111 SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes( )); 111 SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes( ));
112 layoutCharactersInTextBoxes(flowBox, lineLayout); 112 layoutCharactersInTextBoxes(flowBox, lineLayout);
113 113
114 characterLayout.beginTextPathLayout(&child->renderer(), lineLayo ut); 114 characterLayout.beginTextPathLayout(&child->renderer(), lineLayo ut);
115 } 115 }
116 116
117 layoutCharactersInTextBoxes(flowBox, characterLayout); 117 layoutCharactersInTextBoxes(flowBox, characterLayout);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 } 279 }
280 280
281 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri butes) 281 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri butes)
282 { 282 {
283 Vector<InlineBox*> leafBoxesInLogicalOrder; 283 Vector<InlineBox*> leafBoxesInLogicalOrder;
284 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang eAndValueListsIfNeeded, &attributes); 284 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang eAndValueListsIfNeeded, &attributes);
285 } 285 }
286 286
287 } // namespace WebCore 287 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGResources.cpp ('k') | Source/core/rendering/svg/SVGTextRunRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698