| 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. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 FloatingObject* lastFloatFromPreviousLine, LineWidth& width) | 31 FloatingObject* lastFloatFromPreviousLine, LineWidth& width) |
| 32 { | 32 { |
| 33 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(),
lineInfo, LeadingWhitespace)) { | 33 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(),
lineInfo, LeadingWhitespace)) { |
| 34 RenderObject* object = resolver.position().object(); | 34 RenderObject* object = resolver.position().object(); |
| 35 if (object->isOutOfFlowPositioned()) { | 35 if (object->isOutOfFlowPositioned()) { |
| 36 setStaticPositions(m_block, toRenderBox(object)); | 36 setStaticPositions(m_block, toRenderBox(object)); |
| 37 if (object->style()->isOriginalDisplayInlineType()) { | 37 if (object->style()->isOriginalDisplayInlineType()) { |
| 38 resolver.runs().addRun(createRun(0, 1, object, resolver)); | 38 resolver.runs().addRun(createRun(0, 1, object, resolver)); |
| 39 lineInfo.incrementRunsFromLeadingWhitespace(); | 39 lineInfo.incrementRunsFromLeadingWhitespace(); |
| 40 } | 40 } |
| 41 } else if (object->isFloating()) { | |
| 42 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend
erBox(object)), lastFloatFromPreviousLine, lineInfo, width); | |
| 43 } else if (object->isText() && object->style()->hasTextCombine() && obje
ct->isCombineText() && !toRenderCombineText(object)->isCombined()) { | 41 } else if (object->isText() && object->style()->hasTextCombine() && obje
ct->isCombineText() && !toRenderCombineText(object)->isCombined()) { |
| 44 toRenderCombineText(object)->combineText(); | 42 toRenderCombineText(object)->combineText(); |
| 45 if (toRenderCombineText(object)->isCombined()) | 43 if (toRenderCombineText(object)->isCombined()) |
| 46 continue; | 44 continue; |
| 47 } | 45 } |
| 48 resolver.position().increment(&resolver); | 46 resolver.position().increment(&resolver); |
| 49 } | 47 } |
| 50 resolver.commitExplicitEmbedding(resolver.runs()); | 48 resolver.commitExplicitEmbedding(resolver.runs()); |
| 51 } | 49 } |
| 52 | 50 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 73 | 71 |
| 74 if (resolver.position().atEnd()) | 72 if (resolver.position().atEnd()) |
| 75 return resolver.position(); | 73 return resolver.position(); |
| 76 | 74 |
| 77 BreakingContext context(resolver, lineInfo, width, renderTextInfo, lastFloat
FromPreviousLine, appliedStartWidth, m_block); | 75 BreakingContext context(resolver, lineInfo, width, renderTextInfo, lastFloat
FromPreviousLine, appliedStartWidth, m_block); |
| 78 | 76 |
| 79 while (context.currentObject()) { | 77 while (context.currentObject()) { |
| 80 context.initializeForCurrentObject(); | 78 context.initializeForCurrentObject(); |
| 81 if (context.currentObject()->isOutOfFlowPositioned()) { | 79 if (context.currentObject()->isOutOfFlowPositioned()) { |
| 82 context.handleOutOfFlowPositioned(m_positionedObjects); | 80 context.handleOutOfFlowPositioned(m_positionedObjects); |
| 83 } else if (context.currentObject()->isFloating()) { | |
| 84 context.handleFloat(); | |
| 85 } else if (context.currentObject()->isRenderInline()) { | 81 } else if (context.currentObject()->isRenderInline()) { |
| 86 context.handleEmptyInline(); | 82 context.handleEmptyInline(); |
| 87 } else if (context.currentObject()->isReplaced()) { | 83 } else if (context.currentObject()->isReplaced()) { |
| 88 context.handleReplaced(); | 84 context.handleReplaced(); |
| 89 } else if (context.currentObject()->isText()) { | 85 } else if (context.currentObject()->isText()) { |
| 90 if (context.handleText(wordMeasurements, m_hyphenated)) { | 86 if (context.handleText(wordMeasurements, m_hyphenated)) { |
| 91 // We've hit a hard text line break. Our line break iterator is
updated, so go ahead and early return. | 87 // We've hit a hard text line break. Our line break iterator is
updated, so go ahead and early return. |
| 92 return context.lineBreak(); | 88 return context.lineBreak(); |
| 93 } | 89 } |
| 94 } else { | 90 } else { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 105 | 101 |
| 106 context.increment(); | 102 context.increment(); |
| 107 } | 103 } |
| 108 | 104 |
| 109 context.clearLineBreakIfFitsOnLine(); | 105 context.clearLineBreakIfFitsOnLine(); |
| 110 | 106 |
| 111 return context.handleEndOfLine(); | 107 return context.handleEndOfLine(); |
| 112 } | 108 } |
| 113 | 109 |
| 114 } | 110 } |
| OLD | NEW |