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

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

Issue 2904383002: Make TextIndentLine an enum class. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | 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. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * Copyright (C) 2013 Adobe Systems Incorporated. 6 * Copyright (C) 2013 Adobe Systems Incorporated.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 width_.Commit(); 1553 width_.Commit();
1554 line_break_.MoveToStartOf(next_object_); 1554 line_break_.MoveToStartOf(next_object_);
1555 } 1555 }
1556 } 1556 }
1557 } 1557 }
1558 1558
1559 inline IndentTextOrNot RequiresIndent(bool is_first_line, 1559 inline IndentTextOrNot RequiresIndent(bool is_first_line,
1560 bool is_after_hard_line_break, 1560 bool is_after_hard_line_break,
1561 const ComputedStyle& style) { 1561 const ComputedStyle& style) {
1562 IndentTextOrNot indent_text = kDoNotIndentText; 1562 IndentTextOrNot indent_text = kDoNotIndentText;
1563 if (is_first_line || (is_after_hard_line_break && 1563 if (is_first_line ||
1564 style.GetTextIndentLine()) == TextIndentLine::kEachLine) 1564 (is_after_hard_line_break &&
1565 style.GetTextIndentLine() != TextIndentLine::kFirstLine))
eae 2017/05/30 03:57:22 Thanks for reversing the check here, makes it much
1565 indent_text = kIndentText; 1566 indent_text = kIndentText;
1566 1567
1567 if (style.GetTextIndentType() == TextIndentType::kHanging) 1568 if (style.GetTextIndentType() == TextIndentType::kHanging)
1568 indent_text = indent_text == kIndentText ? kDoNotIndentText : kIndentText; 1569 indent_text = indent_text == kIndentText ? kDoNotIndentText : kIndentText;
1569 1570
1570 return indent_text; 1571 return indent_text;
1571 } 1572 }
1572 1573
1573 } // namespace blink 1574 } // namespace blink
1574 1575
1575 #endif // BreakingContextInlineHeaders_h 1576 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698