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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/LineBreaker.cpp

Issue 1583783002: Use IndentTextOrNot instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@568851-2
Patch Set: Update Created 4 years, 11 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
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 * 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 14 matching lines...) Expand all
25 #include "core/layout/line/BreakingContextInlineHeaders.h" 25 #include "core/layout/line/BreakingContextInlineHeaders.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 void LineBreaker::skipLeadingWhitespace(InlineBidiResolver& resolver, LineInfo& lineInfo, 29 void LineBreaker::skipLeadingWhitespace(InlineBidiResolver& resolver, LineInfo& lineInfo,
30 FloatingObject* lastFloatFromPreviousLine, LineWidth& width) 30 FloatingObject* lastFloatFromPreviousLine, LineWidth& width)
31 { 31 {
32 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) { 32 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
33 LayoutObject* object = resolver.position().object(); 33 LayoutObject* object = resolver.position().object();
34 if (object->isOutOfFlowPositioned()) { 34 if (object->isOutOfFlowPositioned()) {
35 setStaticPositions(m_block, LineLayoutBox(toLayoutBox(object)), widt h.shouldIndentText()); 35 setStaticPositions(m_block, LineLayoutBox(toLayoutBox(object)), widt h.indentText());
36 if (object->style()->isOriginalDisplayInlineType()) { 36 if (object->style()->isOriginalDisplayInlineType()) {
37 resolver.runs().addRun(createRun(0, 1, LineLayoutItem(object), r esolver)); 37 resolver.runs().addRun(createRun(0, 1, LineLayoutItem(object), r esolver));
38 lineInfo.incrementRunsFromLeadingWhitespace(); 38 lineInfo.incrementRunsFromLeadingWhitespace();
39 } 39 }
40 } else if (object->isFloating()) { 40 } else if (object->isFloating()) {
41 m_block.positionNewFloatOnLine(*m_block.insertFloatingObject(*toLayo utBox(object)), lastFloatFromPreviousLine, lineInfo, width); 41 m_block.positionNewFloatOnLine(*m_block.insertFloatingObject(*toLayo utBox(object)), lastFloatFromPreviousLine, lineInfo, width);
42 } 42 }
43 resolver.position().increment(&resolver); 43 resolver.position().increment(&resolver);
44 } 44 }
45 resolver.commitExplicitEmbedding(resolver.runs()); 45 resolver.commitExplicitEmbedding(resolver.runs());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 context.increment(); 103 context.increment();
104 } 104 }
105 105
106 context.clearLineBreakIfFitsOnLine(); 106 context.clearLineBreakIfFitsOnLine();
107 107
108 return context.handleEndOfLine(); 108 return context.handleEndOfLine();
109 } 109 }
110 110
111 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698