Source/JavaScriptCore:
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Feb 2015 19:39:11 +0000 (19:39 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Feb 2015 19:39:11 +0000 (19:39 +0000)
commitddd341423c8e8102379a275c0d057379d0195eb1
tree3b2b9a2d82f5696a6d1c40611fce4f564cd21a9a
parentf19e1829860df70bfeeeeca25220a283717a8239
Source/JavaScriptCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

This patch implements initial parsing support for the -apple-trailing-word CSS property.
This property has two possible (mutually exclusive) values: auto and
-apple-partially-balanced. This property is inherited.

The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.

This is an internal property that will allow us to control line breaking behavior for
short paragraphs.

Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
the new value must be implemented as -webkit-partially-balanced. Using the -apple-
prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
version.

Test: platform/mac/fast/text/trailing-word-parse.html

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
CSS value.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
pair.
(WebCore::isKeywordPropertyID): New property is a keyword property.
(WebCore::CSSParser::parseValue): Use the keyword property codepath.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
representation and CSS values.
(WebCore::CSSPrimitiveValue::operator TrailingWord):
* css/CSSPropertyNames.in: New property.
* css/CSSValueKeywords.in: New value.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
* rendering/style/RenderStyle.h: Getter, setter and initial value.
* rendering/style/RenderStyleConstants.h: Internal data type.
* rendering/style/StyleRareInheritedData.h: One bit to control this style property.
* rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.

Source/WebKit/mac:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:
Parsing support for -webkit-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

Test parsing using getComputedStyle().

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html: Updated.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt: Updated.
* platform/mac/fast/text/trailing-word-parse-expected.txt: Added.
* platform/mac/fast/text/trailing-word-parse.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt
LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html
LayoutTests/platform/mac/fast/text/trailing-word-parse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/trailing-word-parse.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig