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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 } | 405 } |
406 | 406 |
407 // This is currently just used for list markers and inline flows that have line
boxes. Neither should | 407 // This is currently just used for list markers and inline flows that have line
boxes. Neither should |
408 // have an effect on whitespace at the start of the line. | 408 // have an effect on whitespace at the start of the line. |
409 inline bool shouldSkipWhitespaceAfterStartObject(LineLayoutBlockFlow block, Line
LayoutItem o, LineMidpointState& lineMidpointState) | 409 inline bool shouldSkipWhitespaceAfterStartObject(LineLayoutBlockFlow block, Line
LayoutItem o, LineMidpointState& lineMidpointState) |
410 { | 410 { |
411 LineLayoutItem next = bidiNextSkippingEmptyInlines(block, o); | 411 LineLayoutItem next = bidiNextSkippingEmptyInlines(block, o); |
412 while (next && next.isFloatingOrOutOfFlowPositioned()) | 412 while (next && next.isFloatingOrOutOfFlowPositioned()) |
413 next = bidiNextSkippingEmptyInlines(block, next); | 413 next = bidiNextSkippingEmptyInlines(block, next); |
414 | 414 |
| 415 if (next && isEmptyInline(next)) |
| 416 next = LineLayoutInline(next).firstChild(); |
| 417 |
415 if (next && !next.isBR() && next.isText() && LineLayoutText(next).textLength
() > 0) { | 418 if (next && !next.isBR() && next.isText() && LineLayoutText(next).textLength
() > 0) { |
416 LineLayoutText nextText(next); | 419 LineLayoutText nextText(next); |
417 UChar nextChar = nextText.characterAt(0); | 420 UChar nextChar = nextText.characterAt(0); |
418 if (nextText.style()->isCollapsibleWhiteSpace(nextChar)) { | 421 if (nextText.style()->isCollapsibleWhiteSpace(nextChar)) { |
419 lineMidpointState.startIgnoringSpaces(InlineIterator(0, o, 0)); | 422 lineMidpointState.startIgnoringSpaces(InlineIterator(0, o, 0)); |
420 return true; | 423 return true; |
421 } | 424 } |
422 } | 425 } |
423 | 426 |
424 return false; | 427 return false; |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 | 934 |
932 if (style.textIndentType() == TextIndentHanging) | 935 if (style.textIndentType() == TextIndentHanging) |
933 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In
dentText; | 936 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In
dentText; |
934 | 937 |
935 return shouldIndentText; | 938 return shouldIndentText; |
936 } | 939 } |
937 | 940 |
938 } | 941 } |
939 | 942 |
940 #endif // BreakingContextInlineHeaders_h | 943 #endif // BreakingContextInlineHeaders_h |
OLD | NEW |