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