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

Side by Side Diff: Source/core/layout/svg/SVGTextChunkBuilder.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 m_textChunks.clear(); 80 m_textChunks.clear();
81 } 81 }
82 82
83 void SVGTextChunkBuilder::addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxe s, unsigned boxStart, unsigned boxCount) 83 void SVGTextChunkBuilder::addTextChunk(Vector<SVGInlineTextBox*>& lineLayoutBoxe s, unsigned boxStart, unsigned boxCount)
84 { 84 {
85 SVGInlineTextBox* textBox = lineLayoutBoxes[boxStart]; 85 SVGInlineTextBox* textBox = lineLayoutBoxes[boxStart];
86 ASSERT(textBox); 86 ASSERT(textBox);
87 87
88 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->layoutObj ect()); 88 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->layoutObj ect());
89 89
90 const LayoutStyle& style = toLayoutSVGInlineText(textBox->layoutObject()).st yleRef(); 90 const ComputedStyle& style = toLayoutSVGInlineText(textBox->layoutObject()). styleRef();
91 91
92 const SVGLayoutStyle& svgStyle = style.svgStyle(); 92 const SVGComputedStyle& svgStyle = style.svgStyle();
93 93
94 // Build chunk style flags. 94 // Build chunk style flags.
95 unsigned chunkStyle = SVGTextChunk::DefaultStyle; 95 unsigned chunkStyle = SVGTextChunk::DefaultStyle;
96 96
97 // Handle 'direction' property. 97 // Handle 'direction' property.
98 if (!style.isLeftToRightDirection()) 98 if (!style.isLeftToRightDirection())
99 chunkStyle |= SVGTextChunk::RightToLeftText; 99 chunkStyle |= SVGTextChunk::RightToLeftText;
100 100
101 // Handle 'writing-mode' property. 101 // Handle 'writing-mode' property.
102 if (svgStyle.isVerticalWritingMode()) 102 if (svgStyle.isVerticalWritingMode())
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 SVGTextFragment& fragment = fragments[i]; 247 SVGTextFragment& fragment = fragments[i];
248 248
249 if (isVerticalText) 249 if (isVerticalText)
250 fragment.y += textAnchorShift; 250 fragment.y += textAnchorShift;
251 else 251 else
252 fragment.x += textAnchorShift; 252 fragment.x += textAnchorShift;
253 } 253 }
254 } 254 }
255 255
256 } 256 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGResourcesCache.cpp ('k') | Source/core/layout/svg/SVGTextLayoutEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698