OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * | 6 * |
6 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
10 * | 11 * |
11 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } else if (context.currentItem().isOutOfFlowPositioned()) { | 86 } else if (context.currentItem().isOutOfFlowPositioned()) { |
86 context.handleOutOfFlowPositioned(m_positionedObjects); | 87 context.handleOutOfFlowPositioned(m_positionedObjects); |
87 } else if (context.currentItem().isFloating()) { | 88 } else if (context.currentItem().isFloating()) { |
88 context.handleFloat(); | 89 context.handleFloat(); |
89 } else if (context.currentItem().isLayoutInline()) { | 90 } else if (context.currentItem().isLayoutInline()) { |
90 context.handleEmptyInline(); | 91 context.handleEmptyInline(); |
91 } else if (context.currentItem().isAtomicInlineLevel()) { | 92 } else if (context.currentItem().isAtomicInlineLevel()) { |
92 context.handleReplaced(); | 93 context.handleReplaced(); |
93 } else if (context.currentItem().isText()) { | 94 } else if (context.currentItem().isText()) { |
94 if (context.handleText(wordMeasurements, m_hyphenated)) { | 95 if (context.handleText(wordMeasurements, m_hyphenated)) { |
95 // We've hit a hard text line break. Our line break iterator is updated,
so go ahead and early return. | 96 // We've hit a hard text line break. Our line break iterator is updated, |
| 97 // so go ahead and early return. |
96 return context.lineBreak(); | 98 return context.lineBreak(); |
97 } | 99 } |
98 } else { | 100 } else { |
99 ASSERT_NOT_REACHED(); | 101 ASSERT_NOT_REACHED(); |
100 } | 102 } |
101 | 103 |
102 if (context.atEnd()) | 104 if (context.atEnd()) |
103 return context.handleEndOfLine(); | 105 return context.handleEndOfLine(); |
104 | 106 |
105 context.commitAndUpdateLineBreakIfNeeded(); | 107 context.commitAndUpdateLineBreakIfNeeded(); |
106 | 108 |
107 if (context.atEnd()) | 109 if (context.atEnd()) |
108 return context.handleEndOfLine(); | 110 return context.handleEndOfLine(); |
109 | 111 |
110 context.increment(); | 112 context.increment(); |
111 } | 113 } |
112 | 114 |
113 context.clearLineBreakIfFitsOnLine(); | 115 context.clearLineBreakIfFitsOnLine(); |
114 | 116 |
115 return context.handleEndOfLine(); | 117 return context.handleEndOfLine(); |
116 } | 118 } |
117 | 119 |
118 } // namespace blink | 120 } // namespace blink |
OLD | NEW |