OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 virtual int baselinePosition(FontBaseline baselineType) const; | 293 virtual int baselinePosition(FontBaseline baselineType) const; |
294 virtual LayoutUnit lineHeight() const; | 294 virtual LayoutUnit lineHeight() const; |
295 | 295 |
296 virtual int caretMinOffset() const; | 296 virtual int caretMinOffset() const; |
297 virtual int caretMaxOffset() const; | 297 virtual int caretMaxOffset() const; |
298 | 298 |
299 unsigned char bidiLevel() const { return m_bitfields.bidiEmbeddingLevel(); } | 299 unsigned char bidiLevel() const { return m_bitfields.bidiEmbeddingLevel(); } |
300 void setBidiLevel(unsigned char level) { | 300 void setBidiLevel(unsigned char level) { |
301 m_bitfields.setBidiEmbeddingLevel(level); | 301 m_bitfields.setBidiEmbeddingLevel(level); |
302 } | 302 } |
303 TextDirection direction() const { return bidiLevel() % 2 ? RTL : LTR; } | 303 TextDirection direction() const { |
304 bool isLeftToRightDirection() const { return direction() == LTR; } | 304 return bidiLevel() % 2 ? TextDirection::Rtl : TextDirection::Ltr; |
| 305 } |
| 306 bool isLeftToRightDirection() const { |
| 307 return direction() == TextDirection::Ltr; |
| 308 } |
305 int caretLeftmostOffset() const { | 309 int caretLeftmostOffset() const { |
306 return isLeftToRightDirection() ? caretMinOffset() : caretMaxOffset(); | 310 return isLeftToRightDirection() ? caretMinOffset() : caretMaxOffset(); |
307 } | 311 } |
308 int caretRightmostOffset() const { | 312 int caretRightmostOffset() const { |
309 return isLeftToRightDirection() ? caretMaxOffset() : caretMinOffset(); | 313 return isLeftToRightDirection() ? caretMaxOffset() : caretMinOffset(); |
310 } | 314 } |
311 | 315 |
312 virtual void clearTruncation() {} | 316 virtual void clearTruncation() {} |
313 | 317 |
314 bool isDirty() const { return m_bitfields.dirty(); } | 318 bool isDirty() const { return m_bitfields.dirty(); } |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 574 |
571 } // namespace blink | 575 } // namespace blink |
572 | 576 |
573 #ifndef NDEBUG | 577 #ifndef NDEBUG |
574 // Outside the WebCore namespace for ease of invocation from gdb. | 578 // Outside the WebCore namespace for ease of invocation from gdb. |
575 void showTree(const blink::InlineBox*); | 579 void showTree(const blink::InlineBox*); |
576 void showLineTree(const blink::InlineBox*); | 580 void showLineTree(const blink::InlineBox*); |
577 #endif | 581 #endif |
578 | 582 |
579 #endif // InlineBox_h | 583 #endif // InlineBox_h |
OLD | NEW |