Source/JavaScriptCore:
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Feb 2015 01:17:38 +0000 (01:17 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Feb 2015 01:17:38 +0000 (01:17 +0000)
commit9955a981c9fd4b68ad72e24184e318a9e5b3e152
treecef9e96dfddfd96a7cdaf961ea3bb4d4e49345bd
parent36d31e0b7b65c2defd674e1da9f089624b7c09c8
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.

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@180599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 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.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig