OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All right reserved. | 4 * All right reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * Copyright (C) 2013 Adobe Systems Incorporated. | 6 * Copyright (C) 2013 Adobe Systems Incorporated. |
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 if (wordMeasurements[i].width > 0) | 664 if (wordMeasurements[i].width > 0) |
665 return wordMeasurements[i].width; | 665 return wordMeasurements[i].width; |
666 } | 666 } |
667 return 0; | 667 return 0; |
668 } | 668 } |
669 | 669 |
670 ALWAYS_INLINE TextDirection | 670 ALWAYS_INLINE TextDirection |
671 textDirectionFromUnicode(WTF::Unicode::CharDirection direction) { | 671 textDirectionFromUnicode(WTF::Unicode::CharDirection direction) { |
672 return direction == WTF::Unicode::RightToLeft || | 672 return direction == WTF::Unicode::RightToLeft || |
673 direction == WTF::Unicode::RightToLeftArabic | 673 direction == WTF::Unicode::RightToLeftArabic |
674 ? RTL | 674 ? TextDirection::Rtl |
675 : LTR; | 675 : TextDirection::Ltr; |
676 } | 676 } |
677 | 677 |
678 ALWAYS_INLINE float textWidth( | 678 ALWAYS_INLINE float textWidth( |
679 LineLayoutText text, | 679 LineLayoutText text, |
680 unsigned from, | 680 unsigned from, |
681 unsigned len, | 681 unsigned len, |
682 const Font& font, | 682 const Font& font, |
683 float xPos, | 683 float xPos, |
684 bool collapseWhiteSpace, | 684 bool collapseWhiteSpace, |
685 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, | 685 HashSet<const SimpleFontData*>* fallbackFonts = nullptr, |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1542 | 1542 |
1543 if (style.getTextIndentType() == TextIndentHanging) | 1543 if (style.getTextIndentType() == TextIndentHanging) |
1544 indentText = indentText == IndentText ? DoNotIndentText : IndentText; | 1544 indentText = indentText == IndentText ? DoNotIndentText : IndentText; |
1545 | 1545 |
1546 return indentText; | 1546 return indentText; |
1547 } | 1547 } |
1548 | 1548 |
1549 } // namespace blink | 1549 } // namespace blink |
1550 | 1550 |
1551 #endif // BreakingContextInlineHeaders_h | 1551 #endif // BreakingContextInlineHeaders_h |
OLD | NEW |