| 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 * Copyright (C) 2013 Adobe Systems Incorporated. | 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * 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. |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 inline void BreakingContext::handleOutOfFlowPositioned(Vector<LineLayoutBox>& po
sitionedObjects) | 370 inline void BreakingContext::handleOutOfFlowPositioned(Vector<LineLayoutBox>& po
sitionedObjects) |
| 371 { | 371 { |
| 372 // If our original display wasn't an inline type, then we can | 372 // If our original display wasn't an inline type, then we can |
| 373 // go ahead and determine our static inline position now. | 373 // go ahead and determine our static inline position now. |
| 374 LineLayoutBox box(m_current.getLineLayoutItem()); | 374 LineLayoutBox box(m_current.getLineLayoutItem()); |
| 375 bool isInlineType = box.style()->isOriginalDisplayInlineType(); | 375 bool isInlineType = box.style()->isOriginalDisplayInlineType(); |
| 376 if (!isInlineType) { | 376 if (!isInlineType) { |
| 377 m_block.setStaticInlinePositionForChild(box, m_block.startOffsetForConte
nt()); | 377 m_block.setStaticInlinePositionForChild(box, m_block.startOffsetForConte
nt()); |
| 378 } else { | 378 } else { |
| 379 // If our original display was an INLINE type, then we can go ahead | 379 // If our original display was an INLINE type, then we can determine our
static y position |
| 380 // and determine our static y position now. | 380 // now. Note, however, that if we're paginated, we may have to update th
is position after |
| 381 // the line has been laid out, since the line may be pushed by a paginat
ion strut. |
| 381 box.layer()->setStaticBlockPosition(m_block.logicalHeight()); | 382 box.layer()->setStaticBlockPosition(m_block.logicalHeight()); |
| 382 } | 383 } |
| 383 | 384 |
| 384 // If we're ignoring spaces, we have to stop and include this object and | 385 // If we're ignoring spaces, we have to stop and include this object and |
| 385 // then start ignoring spaces again. | 386 // then start ignoring spaces again. |
| 386 if (isInlineType || box.container().isLayoutInline()) { | 387 bool containerIsInline = box.container().isLayoutInline(); |
| 388 if (isInlineType || containerIsInline) { |
| 387 if (m_ignoringSpaces) | 389 if (m_ignoringSpaces) |
| 388 ensureLineBoxInsideIgnoredSpaces(&m_lineMidpointState, box); | 390 ensureLineBoxInsideIgnoredSpaces(&m_lineMidpointState, box); |
| 389 m_trailingObjects.appendObjectIfNeeded(box); | 391 m_trailingObjects.appendObjectIfNeeded(box); |
| 390 } else { | 392 } |
| 393 if (!containerIsInline) |
| 391 positionedObjects.append(box); | 394 positionedObjects.append(box); |
| 392 } | |
| 393 m_width.addUncommittedWidth(inlineLogicalWidthFromAncestorsIfNeeded(box).toF
loat()); | 395 m_width.addUncommittedWidth(inlineLogicalWidthFromAncestorsIfNeeded(box).toF
loat()); |
| 394 // Reset prior line break context characters. | 396 // Reset prior line break context characters. |
| 395 m_layoutTextInfo.m_lineBreakIterator.resetPriorContext(); | 397 m_layoutTextInfo.m_lineBreakIterator.resetPriorContext(); |
| 396 } | 398 } |
| 397 | 399 |
| 398 inline void BreakingContext::handleFloat() | 400 inline void BreakingContext::handleFloat() |
| 399 { | 401 { |
| 400 LineLayoutBox floatBox(m_current.getLineLayoutItem()); | 402 LineLayoutBox floatBox(m_current.getLineLayoutItem()); |
| 401 FloatingObject* floatingObject = m_block.insertFloatingObject(floatBox); | 403 FloatingObject* floatingObject = m_block.insertFloatingObject(floatBox); |
| 402 // check if it fits in the current line. | 404 // check if it fits in the current line. |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 | 1195 |
| 1194 if (style.getTextIndentType() == TextIndentHanging) | 1196 if (style.getTextIndentType() == TextIndentHanging) |
| 1195 indentText = indentText == IndentText ? DoNotIndentText : IndentText; | 1197 indentText = indentText == IndentText ? DoNotIndentText : IndentText; |
| 1196 | 1198 |
| 1197 return indentText; | 1199 return indentText; |
| 1198 } | 1200 } |
| 1199 | 1201 |
| 1200 } // namespace blink | 1202 } // namespace blink |
| 1201 | 1203 |
| 1202 #endif // BreakingContextInlineHeaders_h | 1204 #endif // BreakingContextInlineHeaders_h |
| OLD | NEW |