OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010-2011. 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 | 141 |
142 void SVGTextLayoutAttributesBuilder::buildCharacterDataMap(LayoutSVGText& textRo
ot) | 142 void SVGTextLayoutAttributesBuilder::buildCharacterDataMap(LayoutSVGText& textRo
ot) |
143 { | 143 { |
144 // Fill character data map using text positioning elements in top-down order
. | 144 // Fill character data map using text positioning elements in top-down order
. |
145 for (const TextPosition& position : m_textPositions) | 145 for (const TextPosition& position : m_textPositions) |
146 fillCharacterDataMap(position); | 146 fillCharacterDataMap(position); |
147 | 147 |
148 // Handle x/y default attributes. | 148 // Handle x/y default attributes. |
149 SVGCharacterData& data = m_characterDataMap.add(1, SVGCharacterData()).store
dValue->value; | 149 SVGCharacterData& data = m_characterDataMap.add(1, SVGCharacterData()).store
dValue->value; |
150 if (SVGTextLayoutAttributes::isEmptyValue(data.x)) | 150 if (!data.hasX()) |
151 data.x = 0; | 151 data.x = 0; |
152 if (SVGTextLayoutAttributes::isEmptyValue(data.y)) | 152 if (!data.hasY()) |
153 data.y = 0; | 153 data.y = 0; |
154 } | 154 } |
155 | 155 |
156 namespace { | 156 namespace { |
157 | 157 |
158 class AttributeListsIterator { | 158 class AttributeListsIterator { |
159 STACK_ALLOCATED(); | 159 STACK_ALLOCATED(); |
160 public: | 160 public: |
161 AttributeListsIterator(SVGTextPositioningElement*); | 161 AttributeListsIterator(SVGTextPositioningElement*); |
162 | 162 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 attrLists.updateCharacterData(i, data); | 233 attrLists.updateCharacterData(i, data); |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 DEFINE_TRACE(SVGTextLayoutAttributesBuilder::TextPosition) | 237 DEFINE_TRACE(SVGTextLayoutAttributesBuilder::TextPosition) |
238 { | 238 { |
239 visitor->trace(element); | 239 visitor->trace(element); |
240 } | 240 } |
241 | 241 |
242 } // namespace blink | 242 } // namespace blink |
OLD | NEW |