Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 2122773002: Skip past nested empty inlines at the start of lines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@467579
Patch Set: bug 493077 Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/inline/leading-space-after-nested-empty-inlines-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 411
412 // This is currently just used for list markers and inline flows that have line boxes. Neither should 412 // This is currently just used for list markers and inline flows that have line boxes. Neither should
413 // have an effect on whitespace at the start of the line. 413 // have an effect on whitespace at the start of the line.
414 inline bool shouldSkipWhitespaceAfterStartObject(LineLayoutBlockFlow block, Line LayoutItem o, LineMidpointState& lineMidpointState) 414 inline bool shouldSkipWhitespaceAfterStartObject(LineLayoutBlockFlow block, Line LayoutItem o, LineMidpointState& lineMidpointState)
415 { 415 {
416 LineLayoutItem next = bidiNextSkippingEmptyInlines(block, o); 416 LineLayoutItem next = bidiNextSkippingEmptyInlines(block, o);
417 while (next && next.isFloatingOrOutOfFlowPositioned()) 417 while (next && next.isFloatingOrOutOfFlowPositioned())
418 next = bidiNextSkippingEmptyInlines(block, next); 418 next = bidiNextSkippingEmptyInlines(block, next);
419 419
420 if (next && isEmptyInline(next)) 420 while (next && isEmptyInline(next)) {
421 next = LineLayoutInline(next).firstChild(); 421 LineLayoutItem child = LineLayoutInline(next).firstChild();
422 next = child ? child : bidiNextSkippingEmptyInlines(block, next);
423 }
422 424
423 if (next && !next.isBR() && next.isText() && LineLayoutText(next).textLength () > 0) { 425 if (next && !next.isBR() && next.isText() && LineLayoutText(next).textLength () > 0) {
424 LineLayoutText nextText(next); 426 LineLayoutText nextText(next);
425 UChar nextChar = nextText.characterAt(0); 427 UChar nextChar = nextText.characterAt(0);
426 if (nextText.style()->isCollapsibleWhiteSpace(nextChar)) { 428 if (nextText.style()->isCollapsibleWhiteSpace(nextChar)) {
427 lineMidpointState.startIgnoringSpaces(InlineIterator(0, o, 0)); 429 lineMidpointState.startIgnoringSpaces(InlineIterator(0, o, 0));
428 return true; 430 return true;
429 } 431 }
430 } 432 }
431 433
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 1154
1153 if (style.getTextIndentType() == TextIndentHanging) 1155 if (style.getTextIndentType() == TextIndentHanging)
1154 indentText = indentText == IndentText ? DoNotIndentText : IndentText; 1156 indentText = indentText == IndentText ? DoNotIndentText : IndentText;
1155 1157
1156 return indentText; 1158 return indentText;
1157 } 1159 }
1158 1160
1159 } // namespace blink 1161 } // namespace blink
1160 1162
1161 #endif // BreakingContextInlineHeaders_h 1163 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/inline/leading-space-after-nested-empty-inlines-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698