[CSS3] Add support for the word-break:keep-all CSS property
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jun 2015 23:59:19 +0000 (23:59 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jun 2015 23:59:19 +0000 (23:59 +0000)
commitfde66b744e509925d1f76caf0412946dd0472ff4
tree7f91237e742ba278c429bda83e006c0d3f2c57c0
parentad914f841fdd433f10dd92c91b50f0a050a18ac8
[CSS3] Add support for the word-break:keep-all CSS property
https://bugs.webkit.org/show_bug.cgi?id=123782

Reviewed by Darin Adler.

Source/WebCore:

Add support for word-break:keep-all CSS property by CSS3 spec:
http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property

Test: fast/text/word-break-keep-all.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
* css/CSSValueKeywords.in:
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/break_lines.h:
(WebCore::nextBreakablePositionKeepingAllWords):
(WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
(WebCore::isBreakable):
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* fast/text/word-break-keep-all.html: Added.
* platform/mac/fast/text/word-break-keep-all-expected.png: Added.
* platform/mac/fast/text/word-break-keep-all-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/word-break-keep-all-expected.html [new file with mode: 0644]
LayoutTests/fast/text/word-break-keep-all.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/break_lines.h
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/rendering/style/RenderStyleConstants.h