| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (!m_inlineTextBox) | 107 if (!m_inlineTextBox) |
| 108 return 0; | 108 return 0; |
| 109 | 109 |
| 110 return m_inlineTextBox->len(); | 110 return m_inlineTextBox->len(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 AbstractInlineTextBox::Direction AbstractInlineTextBox::getDirection() const { | 113 AbstractInlineTextBox::Direction AbstractInlineTextBox::getDirection() const { |
| 114 if (!m_inlineTextBox || !m_lineLayoutItem) | 114 if (!m_inlineTextBox || !m_lineLayoutItem) |
| 115 return LeftToRight; | 115 return LeftToRight; |
| 116 | 116 |
| 117 if (m_lineLayoutItem.style()->isHorizontalWritingMode()) | 117 if (m_lineLayoutItem.style()->isHorizontalWritingMode()) { |
| 118 return (m_inlineTextBox->direction() == RTL ? RightToLeft : LeftToRight); | 118 return (m_inlineTextBox->direction() == TextDirection::Rtl ? RightToLeft |
| 119 return (m_inlineTextBox->direction() == RTL ? BottomToTop : TopToBottom); | 119 : LeftToRight); |
| 120 } |
| 121 return (m_inlineTextBox->direction() == TextDirection::Rtl ? BottomToTop |
| 122 : TopToBottom); |
| 120 } | 123 } |
| 121 | 124 |
| 122 void AbstractInlineTextBox::characterWidths(Vector<float>& widths) const { | 125 void AbstractInlineTextBox::characterWidths(Vector<float>& widths) const { |
| 123 if (!m_inlineTextBox) | 126 if (!m_inlineTextBox) |
| 124 return; | 127 return; |
| 125 | 128 |
| 126 m_inlineTextBox->characterWidths(widths); | 129 m_inlineTextBox->characterWidths(widths); |
| 127 } | 130 } |
| 128 | 131 |
| 129 void AbstractInlineTextBox::wordBoundaries( | 132 void AbstractInlineTextBox::wordBoundaries( |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 213 |
| 211 InlineBox* previous = m_inlineTextBox->prevOnLine(); | 214 InlineBox* previous = m_inlineTextBox->prevOnLine(); |
| 212 if (previous && previous->isInlineTextBox()) | 215 if (previous && previous->isInlineTextBox()) |
| 213 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), | 216 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), |
| 214 toInlineTextBox(previous)); | 217 toInlineTextBox(previous)); |
| 215 | 218 |
| 216 return nullptr; | 219 return nullptr; |
| 217 } | 220 } |
| 218 | 221 |
| 219 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |