Changeset 233916 in webkit
- Timestamp:
- Jul 18, 2018 11:10:08 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r233915 r233916 1 2018-07-18 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Rename WordBreak::Break to WordBreak::BreakWord 4 https://bugs.webkit.org/show_bug.cgi?id=187767 5 6 Reviewed by Simon Fraser. 7 8 These breaking properties are very confusing. There are: 9 10 1. word-break: break-all, a standard value that allows breaking after every 11 character. 12 2. word-break: break-word, a non-standard value which allows for breaking after 13 every character, but only if the word is too long for the available width (otherwise 14 it works the same as word-break: normal). This affects the min-content-size of the 15 text (and makes it equal to what it would be if word-break: break-all was 16 specified). 17 3. word-wrap: break-word, which is the same as word-break: break-word, but doesn't 18 affect the min-content-size of the text. 19 4. overflow-wrap: break-word, which is the same as word-wrap: break-word. 20 21 Because this is so confusing it's valuable for our internal enums to match the names 22 of the official CSS properties/values. 23 24 No new tests because there is no behavior change. 25 26 * css/CSSPrimitiveValueMappings.h: 27 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 28 (WebCore::CSSPrimitiveValue::operator WordBreak const): 29 * rendering/RenderText.cpp: 30 (WebCore::RenderText::computePreferredLogicalWidths): 31 * rendering/style/RenderStyle.h: 32 (WebCore::RenderStyle::breakWords const): 33 * rendering/style/RenderStyleConstants.h: 34 1 35 2018-07-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 36 -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r233851 r233916 3088 3088 m_value.valueID = CSSValueKeepAll; 3089 3089 break; 3090 case WordBreak::Break :3090 case WordBreak::BreakWord: 3091 3091 m_value.valueID = CSSValueBreakWord; 3092 3092 break; … … 3104 3104 return WordBreak::KeepAll; 3105 3105 case CSSValueBreakWord: 3106 return WordBreak::Break ;3106 return WordBreak::BreakWord; 3107 3107 case CSSValueNormal: 3108 3108 return WordBreak::Normal; -
trunk/Source/WebCore/rendering/RenderText.cpp
r232178 r233916 827 827 // do not affect minimum preferred sizes. Note that break-word is a non-standard value for 828 828 // word-break, but we support it as though it means break-all. 829 bool breakAll = (style.wordBreak() == WordBreak::BreakAll || style.wordBreak() == WordBreak::Break ) && style.autoWrap();829 bool breakAll = (style.wordBreak() == WordBreak::BreakAll || style.wordBreak() == WordBreak::BreakWord) && style.autoWrap(); 830 830 bool keepAllWords = style.wordBreak() == WordBreak::KeepAll; 831 831 bool canUseLineBreakShortcut = iteratorMode == LineBreakIteratorMode::Default; -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r232559 r233916 2045 2045 inline bool RenderStyle::breakWords() const 2046 2046 { 2047 return wordBreak() == WordBreak::Break || overflowWrap() == OverflowWrap::Break;2047 return wordBreak() == WordBreak::BreakWord || overflowWrap() == OverflowWrap::Break; 2048 2048 } 2049 2049 -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r233838 r233916 517 517 BreakAll, 518 518 KeepAll, 519 Break 519 BreakWord 520 520 }; 521 521
Note: See TracChangeset
for help on using the changeset viewer.