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

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

Issue 2885363005: Make Hyphens an enum class. (Closed)
Patch Set: Created 3 years, 7 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. 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 layout_text.IsCombineText() && 962 layout_text.IsCombineText() &&
963 LineLayoutTextCombine(layout_text).IsCombined(); 963 LineLayoutTextCombine(layout_text).IsCombined();
964 964
965 // This is currently only used for word-break: break-all, specifically for the 965 // This is currently only used for word-break: break-all, specifically for the
966 // case where we have a break opportunity within a word, then a string of non- 966 // case where we have a break opportunity within a word, then a string of non-
967 // breakable content that ends up making our word wider than the current line. 967 // breakable content that ends up making our word wider than the current line.
968 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html 968 // See: fast/css3-text/css3-word-break/word-break-all-wrap-with-floats.html
969 float width_measurement_at_last_break_opportunity = 0; 969 float width_measurement_at_last_break_opportunity = 0;
970 970
971 Hyphenation* hyphenation = auto_wrap_ ? style.GetHyphenation() : nullptr; 971 Hyphenation* hyphenation = auto_wrap_ ? style.GetHyphenation() : nullptr;
972 bool disable_soft_hyphen = style.GetHyphens() == kHyphensNone; 972 bool disable_soft_hyphen = style.GetHyphens() == Hyphens::kNone;
973 float hyphen_width = 0; 973 float hyphen_width = 0;
974 bool is_line_empty = line_info_.IsEmpty(); 974 bool is_line_empty = line_info_.IsEmpty();
975 975
976 if (layout_text.IsSVGInlineText()) { 976 if (layout_text.IsSVGInlineText()) {
977 break_words = false; 977 break_words = false;
978 break_all = false; 978 break_all = false;
979 keep_all = false; 979 keep_all = false;
980 } 980 }
981 981
982 // Use LineBreakType::Normal for break-all. When a word does not fit, 982 // Use LineBreakType::Normal for break-all. When a word does not fit,
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1566
1567 if (style.GetTextIndentType() == kTextIndentHanging) 1567 if (style.GetTextIndentType() == kTextIndentHanging)
1568 indent_text = indent_text == kIndentText ? kDoNotIndentText : kIndentText; 1568 indent_text = indent_text == kIndentText ? kDoNotIndentText : kIndentText;
1569 1569
1570 return indent_text; 1570 return indent_text;
1571 } 1571 }
1572 1572
1573 } // namespace blink 1573 } // namespace blink
1574 1574
1575 #endif // BreakingContextInlineHeaders_h 1575 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698