| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010-2012. 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ASSERT(renderer->isSVGText()); | 57 ASSERT(renderer->isSVGText()); |
| 58 RenderBlockFlow* renderBlockFlow = toRenderBlockFlow(renderer); | 58 RenderBlockFlow* renderBlockFlow = toRenderBlockFlow(renderer); |
| 59 | 59 |
| 60 // LayoutSVGText only ever contains a single line box. | 60 // LayoutSVGText only ever contains a single line box. |
| 61 InlineFlowBox* flowBox = renderBlockFlow->firstLineBox(); | 61 InlineFlowBox* flowBox = renderBlockFlow->firstLineBox(); |
| 62 ASSERT(flowBox == renderBlockFlow->lastLineBox()); | 62 ASSERT(flowBox == renderBlockFlow->lastLineBox()); |
| 63 return flowBox; | 63 return flowBox; |
| 64 } | 64 } |
| 65 | 65 |
| 66 if (renderer->isRenderInline()) { | 66 if (renderer->isRenderInline()) { |
| 67 // We're given a LayoutSVGInline or objects that derive from it (RenderS
VGTSpan / LayoutSVGTextPath) | 67 // We're given a LayoutSVGInline or objects that derive from it (LayoutS
VGTSpan / LayoutSVGTextPath) |
| 68 RenderInline* renderInline = toRenderInline(renderer); | 68 RenderInline* renderInline = toRenderInline(renderer); |
| 69 | 69 |
| 70 // LayoutSVGInline only ever contains a single line box. | 70 // LayoutSVGInline only ever contains a single line box. |
| 71 InlineFlowBox* flowBox = renderInline->firstLineBox(); | 71 InlineFlowBox* flowBox = renderInline->firstLineBox(); |
| 72 ASSERT(flowBox == renderInline->lastLineBox()); | 72 ASSERT(flowBox == renderInline->lastLineBox()); |
| 73 return flowBox; | 73 return flowBox; |
| 74 } | 74 } |
| 75 | 75 |
| 76 ASSERT_NOT_REACHED(); | 76 ASSERT_NOT_REACHED(); |
| 77 return 0; | 77 return 0; |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 int SVGTextQuery::characterNumberAtPosition(const FloatPoint& position) const | 508 int SVGTextQuery::characterNumberAtPosition(const FloatPoint& position) const |
| 509 { | 509 { |
| 510 CharacterNumberAtPositionData data(position); | 510 CharacterNumberAtPositionData data(position); |
| 511 if (!executeQuery(&data, &SVGTextQuery::characterNumberAtPositionCallback)) | 511 if (!executeQuery(&data, &SVGTextQuery::characterNumberAtPositionCallback)) |
| 512 return -1; | 512 return -1; |
| 513 | 513 |
| 514 return data.processedCharacters; | 514 return data.processedCharacters; |
| 515 } | 515 } |
| 516 | 516 |
| 517 } | 517 } |
| OLD | NEW |