OLD | NEW |
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) 2008 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 LayoutBlock* containingBlock = this->containingBlock(); | 169 LayoutBlock* containingBlock = this->containingBlock(); |
170 ASSERT(containingBlock); | 170 ASSERT(containingBlock); |
171 | 171 |
172 // Map local point to absolute point, as the character origins stored in the
text fragments use absolute coordinates. | 172 // Map local point to absolute point, as the character origins stored in the
text fragments use absolute coordinates. |
173 FloatPoint absolutePoint(point); | 173 FloatPoint absolutePoint(point); |
174 absolutePoint.moveBy(containingBlock->location()); | 174 absolutePoint.moveBy(containingBlock->location()); |
175 | 175 |
176 float closestDistance = std::numeric_limits<float>::max(); | 176 float closestDistance = std::numeric_limits<float>::max(); |
177 float closestDistancePosition = 0; | 177 float closestDistancePosition = 0; |
178 const SVGTextFragment* closestDistanceFragment = 0; | 178 const SVGTextFragment* closestDistanceFragment = nullptr; |
179 SVGInlineTextBox* closestDistanceBox = 0; | 179 SVGInlineTextBox* closestDistanceBox = nullptr; |
180 | 180 |
181 AffineTransform fragmentTransform; | 181 AffineTransform fragmentTransform; |
182 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 182 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
183 if (!box->isSVGInlineTextBox()) | 183 if (!box->isSVGInlineTextBox()) |
184 continue; | 184 continue; |
185 | 185 |
186 SVGInlineTextBox* textBox = toSVGInlineTextBox(box); | 186 SVGInlineTextBox* textBox = toSVGInlineTextBox(box); |
187 Vector<SVGTextFragment>& fragments = textBox->textFragments(); | 187 Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
188 | 188 |
189 unsigned textFragmentsSize = fragments.size(); | 189 unsigned textFragmentsSize = fragments.size(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const | 256 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const |
257 { | 257 { |
258 RefPtr<StringImpl> result = LayoutText::originalText(); | 258 RefPtr<StringImpl> result = LayoutText::originalText(); |
259 if (!result) | 259 if (!result) |
260 return nullptr; | 260 return nullptr; |
261 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P
RE); | 261 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P
RE); |
262 } | 262 } |
263 | 263 |
264 } | 264 } |
OLD | NEW |