| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/fonts/shaping/ShapeResultBuffer.h" | 5 #include "platform/fonts/shaping/ShapeResultBuffer.h" |
| 6 | 6 |
| 7 #include "platform/fonts/Character.h" | |
| 8 #include "platform/fonts/CharacterRange.h" | 7 #include "platform/fonts/CharacterRange.h" |
| 9 #include "platform/fonts/GlyphBuffer.h" | 8 #include "platform/fonts/GlyphBuffer.h" |
| 10 #include "platform/fonts/SimpleFontData.h" | 9 #include "platform/fonts/SimpleFontData.h" |
| 11 #include "platform/fonts/shaping/ShapeResultInlineHeaders.h" | 10 #include "platform/fonts/shaping/ShapeResultInlineHeaders.h" |
| 12 #include "platform/geometry/FloatPoint.h" | 11 #include "platform/geometry/FloatPoint.h" |
| 12 #include "platform/text/Character.h" |
| 13 #include "platform/text/TextBreakIterator.h" | 13 #include "platform/text/TextBreakIterator.h" |
| 14 #include "platform/text/TextDirection.h" | 14 #include "platform/text/TextDirection.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 inline void addGlyphToBuffer(GlyphBuffer* glyphBuffer, float advance, hb_directi
on_t direction, | 20 inline void addGlyphToBuffer(GlyphBuffer* glyphBuffer, float advance, hb_directi
on_t direction, |
| 21 const SimpleFontData* fontData, const HarfBuzzRunGlyphData& glyphData) | 21 const SimpleFontData* fontData, const HarfBuzzRunGlyphData& glyphData) |
| 22 { | 22 { |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 totalOffset += offsetForWord; | 405 totalOffset += offsetForWord; |
| 406 if (targetX >= 0 && targetX <= wordResult->width()) | 406 if (targetX >= 0 && targetX <= wordResult->width()) |
| 407 return totalOffset; | 407 return totalOffset; |
| 408 targetX -= wordResult->width(); | 408 targetX -= wordResult->width(); |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 return totalOffset; | 411 return totalOffset; |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace blink | 414 } // namespace blink |
| OLD | NEW |