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

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

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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 if (style_to_use.WordBreak() == kBreakAllWordBreak || 1128 if (style_to_use.WordBreak() == kBreakAllWordBreak ||
1129 style_to_use.WordBreak() == kBreakWordBreak) { 1129 style_to_use.WordBreak() == kBreakWordBreak) {
1130 break_all_or_break_word = style_to_use.WordBreak(); 1130 break_all_or_break_word = style_to_use.WordBreak();
1131 } else if (style_to_use.WordBreak() == kKeepAllWordBreak) { 1131 } else if (style_to_use.WordBreak() == kKeepAllWordBreak) {
1132 line_break_type = LineBreakType::kKeepAll; 1132 line_break_type = LineBreakType::kKeepAll;
1133 } 1133 }
1134 } 1134 }
1135 1135
1136 Hyphenation* hyphenation = 1136 Hyphenation* hyphenation =
1137 style_to_use.AutoWrap() ? style_to_use.GetHyphenation() : nullptr; 1137 style_to_use.AutoWrap() ? style_to_use.GetHyphenation() : nullptr;
1138 bool disable_soft_hyphen = style_to_use.GetHyphens() == kHyphensNone; 1138 bool disable_soft_hyphen = style_to_use.GetHyphens() == Hyphens::kNone;
1139 float max_word_width = 0; 1139 float max_word_width = 0;
1140 if (!hyphenation) 1140 if (!hyphenation)
1141 max_word_width = std::numeric_limits<float>::infinity(); 1141 max_word_width = std::numeric_limits<float>::infinity();
1142 1142
1143 BidiResolver<TextRunIterator, BidiCharacterRun> bidi_resolver; 1143 BidiResolver<TextRunIterator, BidiCharacterRun> bidi_resolver;
1144 BidiCharacterRun* run; 1144 BidiCharacterRun* run;
1145 TextDirection text_direction = style_to_use.Direction(); 1145 TextDirection text_direction = style_to_use.Direction();
1146 if ((Is8Bit() && text_direction == TextDirection::kLtr) || 1146 if ((Is8Bit() && text_direction == TextDirection::kLtr) ||
1147 IsOverride(style_to_use.GetUnicodeBidi())) { 1147 IsOverride(style_to_use.GetUnicodeBidi())) {
1148 run = 0; 1148 run = 0;
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 LayoutRect rect = LayoutRect( 2049 LayoutRect rect = LayoutRect(
2050 IntRect(FirstRunX(), FirstRunY(), lines_box.Width(), lines_box.Height())); 2050 IntRect(FirstRunX(), FirstRunY(), lines_box.Width(), lines_box.Height()));
2051 LayoutBlock* block = ContainingBlock(); 2051 LayoutBlock* block = ContainingBlock();
2052 if (block && HasTextBoxes()) 2052 if (block && HasTextBoxes())
2053 block->AdjustChildDebugRect(rect); 2053 block->AdjustChildDebugRect(rect);
2054 2054
2055 return rect; 2055 return rect;
2056 } 2056 }
2057 2057
2058 } // namespace blink 2058 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698