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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 | 95 |
96 LayoutRect AbstractInlineTextBox::localBounds() const | 96 LayoutRect AbstractInlineTextBox::localBounds() const |
97 { | 97 { |
98 if (!m_inlineTextBox || !m_lineLayoutItem) | 98 if (!m_inlineTextBox || !m_lineLayoutItem) |
99 return LayoutRect(); | 99 return LayoutRect(); |
100 | 100 |
101 return m_inlineTextBox->calculateBoundaries(); | 101 return m_inlineTextBox->calculateBoundaries(); |
102 } | 102 } |
103 | 103 |
104 LayoutRect AbstractInlineTextBox::absoluteBounds() const | |
105 { | |
106 if (!m_inlineTextBox || !m_lineLayoutItem) | |
107 return LayoutRect(); | |
108 | |
109 FloatRect boundaries(m_inlineTextBox->calculateBoundaries()); | |
110 return LayoutRect(m_lineLayoutItem.localToAbsoluteQuad(boundaries).enclosing
BoundingBox()); | |
111 } | |
112 | |
113 unsigned AbstractInlineTextBox::len() const | 104 unsigned AbstractInlineTextBox::len() const |
114 { | 105 { |
115 if (!m_inlineTextBox) | 106 if (!m_inlineTextBox) |
116 return 0; | 107 return 0; |
117 | 108 |
118 return m_inlineTextBox->len(); | 109 return m_inlineTextBox->len(); |
119 } | 110 } |
120 | 111 |
121 AbstractInlineTextBox::Direction AbstractInlineTextBox::getDirection() const | 112 AbstractInlineTextBox::Direction AbstractInlineTextBox::getDirection() const |
122 { | 113 { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 return nullptr; | 200 return nullptr; |
210 | 201 |
211 InlineBox* previous = m_inlineTextBox->prevOnLine(); | 202 InlineBox* previous = m_inlineTextBox->prevOnLine(); |
212 if (previous && previous->isInlineTextBox()) | 203 if (previous && previous->isInlineTextBox()) |
213 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl
ineTextBox(previous)); | 204 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl
ineTextBox(previous)); |
214 | 205 |
215 return nullptr; | 206 return nullptr; |
216 } | 207 } |
217 | 208 |
218 } // namespace blink | 209 } // namespace blink |
OLD | NEW |