| 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 22 matching lines...) Expand all Loading... |
| 33 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 inline bool characterStartsSurrogatePair(const TextRun& run, unsigned index) | 39 inline bool characterStartsSurrogatePair(const TextRun& run, unsigned index) |
| 40 { | 40 { |
| 41 if (!U16_IS_LEAD(run[index])) | 41 if (!U16_IS_LEAD(run[index])) |
| 42 return false; | 42 return false; |
| 43 if (index + 1 >= static_cast<unsigned>(run.charactersLength())) | 43 if (index + 1 >= static_cast<unsigned>(run.length())) |
| 44 return false; | 44 return false; |
| 45 return U16_IS_TRAIL(run[index + 1]); | 45 return U16_IS_TRAIL(run[index + 1]); |
| 46 } | 46 } |
| 47 | 47 |
| 48 class SVGTextMetricsCalculator { | 48 class SVGTextMetricsCalculator { |
| 49 public: | 49 public: |
| 50 SVGTextMetricsCalculator(LineLayoutSVGInlineText); | 50 SVGTextMetricsCalculator(LineLayoutSVGInlineText); |
| 51 ~SVGTextMetricsCalculator(); | 51 ~SVGTextMetricsCalculator(); |
| 52 | 52 |
| 53 bool advancePosition(); | 53 bool advancePosition(); |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 { | 351 { |
| 352 walkTree(textRoot, &text); | 352 walkTree(textRoot, &text); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(LayoutSVGText& textR
oot, SVGCharacterDataMap& allCharactersMap) | 355 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(LayoutSVGText& textR
oot, SVGCharacterDataMap& allCharactersMap) |
| 356 { | 356 { |
| 357 walkTree(textRoot, nullptr, &allCharactersMap); | 357 walkTree(textRoot, nullptr, &allCharactersMap); |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |