| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 : nullptr; | 110 : nullptr; |
| 111 } | 111 } |
| 112 | 112 |
| 113 void SVGTextLayoutAttributesBuilder::collectTextPositioningElements( | 113 void SVGTextLayoutAttributesBuilder::collectTextPositioningElements( |
| 114 LayoutBoxModelObject& start) { | 114 LayoutBoxModelObject& start) { |
| 115 ASSERT(!start.isSVGText() || m_textPositions.isEmpty()); | 115 ASSERT(!start.isSVGText() || m_textPositions.isEmpty()); |
| 116 SVGTextPositioningElement* element = | 116 SVGTextPositioningElement* element = |
| 117 positioningElementFromLayoutObject(start); | 117 positioningElementFromLayoutObject(start); |
| 118 unsigned atPosition = m_textPositions.size(); | 118 unsigned atPosition = m_textPositions.size(); |
| 119 if (element) | 119 if (element) |
| 120 m_textPositions.append(TextPosition(element, m_characterCount)); | 120 m_textPositions.push_back(TextPosition(element, m_characterCount)); |
| 121 | 121 |
| 122 for (LayoutObject* child = start.slowFirstChild(); child; | 122 for (LayoutObject* child = start.slowFirstChild(); child; |
| 123 child = child->nextSibling()) { | 123 child = child->nextSibling()) { |
| 124 if (child->isSVGInlineText()) { | 124 if (child->isSVGInlineText()) { |
| 125 m_characterCount += | 125 m_characterCount += |
| 126 countCharactersInTextNode(toLayoutSVGInlineText(*child)); | 126 countCharactersInTextNode(toLayoutSVGInlineText(*child)); |
| 127 continue; | 127 continue; |
| 128 } | 128 } |
| 129 | 129 |
| 130 if (child->isSVGInline()) { | 130 if (child->isSVGInline()) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 .storedValue->value; | 238 .storedValue->value; |
| 239 attrLists.updateCharacterData(i, data); | 239 attrLists.updateCharacterData(i, data); |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 DEFINE_TRACE(SVGTextLayoutAttributesBuilder::TextPosition) { | 243 DEFINE_TRACE(SVGTextLayoutAttributesBuilder::TextPosition) { |
| 244 visitor->trace(element); | 244 visitor->trace(element); |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace blink | 247 } // namespace blink |
| OLD | NEW |