| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int endIndex; | 65 int endIndex; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 enum Direction { | 68 enum Direction { |
| 69 LeftToRight, | 69 LeftToRight, |
| 70 RightToLeft, | 70 RightToLeft, |
| 71 TopToBottom, | 71 TopToBottom, |
| 72 BottomToTop | 72 BottomToTop |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 ~AbstractInlineTextBox(); |
| 76 |
| 75 LayoutText* layoutText() const { return m_layoutText; } | 77 LayoutText* layoutText() const { return m_layoutText; } |
| 76 | 78 |
| 77 PassRefPtr<AbstractInlineTextBox> nextInlineTextBox() const; | 79 PassRefPtr<AbstractInlineTextBox> nextInlineTextBox() const; |
| 78 LayoutRect bounds() const; | 80 LayoutRect bounds() const; |
| 79 unsigned len() const; | 81 unsigned len() const; |
| 80 Direction direction() const; | 82 Direction direction() const; |
| 81 void characterWidths(Vector<float>&) const; | 83 void characterWidths(Vector<float>&) const; |
| 82 void wordBoundaries(Vector<WordBoundaries>&) const; | 84 void wordBoundaries(Vector<WordBoundaries>&) const; |
| 83 String text() const; | 85 String text() const; |
| 84 bool isFirst() const; | 86 bool isFirst() const; |
| 85 bool isLast() const; | 87 bool isLast() const; |
| 86 PassRefPtr<AbstractInlineTextBox> nextOnLine() const; | 88 PassRefPtr<AbstractInlineTextBox> nextOnLine() const; |
| 87 PassRefPtr<AbstractInlineTextBox> previousOnLine() const; | 89 PassRefPtr<AbstractInlineTextBox> previousOnLine() const; |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 void detach(); | 92 void detach(); |
| 91 | 93 |
| 92 // Weak ptrs; these are nulled when InlineTextBox::destroy() calls AbstractI
nlineTextBox::willDestroy. | 94 // Weak ptrs; these are nulled when InlineTextBox::destroy() calls AbstractI
nlineTextBox::willDestroy. |
| 93 LayoutText* m_layoutText; | 95 LayoutText* m_layoutText; |
| 94 InlineTextBox* m_inlineTextBox; | 96 InlineTextBox* m_inlineTextBox; |
| 95 | 97 |
| 96 typedef HashMap<InlineTextBox*, RefPtr<AbstractInlineTextBox>> InlineToAbstr
actInlineTextBoxHashMap; | 98 typedef HashMap<InlineTextBox*, RefPtr<AbstractInlineTextBox>> InlineToAbstr
actInlineTextBoxHashMap; |
| 97 static InlineToAbstractInlineTextBoxHashMap* gAbstractInlineTextBoxMap; | 99 static InlineToAbstractInlineTextBoxHashMap* gAbstractInlineTextBoxMap; |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 } // namespace blink | 102 } // namespace blink |
| 101 | 103 |
| 102 #endif // AbstractInlineTextBox_h | 104 #endif // AbstractInlineTextBox_h |
| OLD | NEW |