| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::nextInlineTextBox() con
st | 87 PassRefPtr<AbstractInlineTextBox> AbstractInlineTextBox::nextInlineTextBox() con
st |
| 88 { | 88 { |
| 89 ASSERT(!m_inlineTextBox || !m_inlineTextBox->getLineLayoutItem().needsLayout
()); | 89 ASSERT(!m_inlineTextBox || !m_inlineTextBox->getLineLayoutItem().needsLayout
()); |
| 90 if (!m_inlineTextBox) | 90 if (!m_inlineTextBox) |
| 91 return nullptr; | 91 return nullptr; |
| 92 | 92 |
| 93 return getOrCreate(m_lineLayoutItem, m_inlineTextBox->nextTextBox()); | 93 return getOrCreate(m_lineLayoutItem, m_inlineTextBox->nextTextBox()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 LayoutRect AbstractInlineTextBox::bounds() 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 |
| 101 return m_inlineTextBox->calculateBoundaries(); |
| 102 } |
| 103 |
| 104 LayoutRect AbstractInlineTextBox::absoluteBounds() const |
| 105 { |
| 106 if (!m_inlineTextBox || !m_lineLayoutItem) |
| 107 return LayoutRect(); |
| 100 | 108 |
| 101 FloatRect boundaries(m_inlineTextBox->calculateBoundaries()); | 109 FloatRect boundaries(m_inlineTextBox->calculateBoundaries()); |
| 102 return LayoutRect(m_lineLayoutItem.localToAbsoluteQuad(boundaries).enclosing
BoundingBox()); | 110 return LayoutRect(m_lineLayoutItem.localToAbsoluteQuad(boundaries).enclosing
BoundingBox()); |
| 103 } | 111 } |
| 104 | 112 |
| 105 unsigned AbstractInlineTextBox::len() const | 113 unsigned AbstractInlineTextBox::len() const |
| 106 { | 114 { |
| 107 if (!m_inlineTextBox) | 115 if (!m_inlineTextBox) |
| 108 return 0; | 116 return 0; |
| 109 | 117 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 return nullptr; | 209 return nullptr; |
| 202 | 210 |
| 203 InlineBox* previous = m_inlineTextBox->prevOnLine(); | 211 InlineBox* previous = m_inlineTextBox->prevOnLine(); |
| 204 if (previous && previous->isInlineTextBox()) | 212 if (previous && previous->isInlineTextBox()) |
| 205 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl
ineTextBox(previous)); | 213 return getOrCreate(toInlineTextBox(previous)->getLineLayoutItem(), toInl
ineTextBox(previous)); |
| 206 | 214 |
| 207 return nullptr; | 215 return nullptr; |
| 208 } | 216 } |
| 209 | 217 |
| 210 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |