[CSS] Expand -webkit-line-break value space
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2012 20:31:10 +0000 (20:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2012 20:31:10 +0000 (20:31 +0000)
commitcffca845fa5064cd623f85c7d14b0750958abb0d
treedbc18950d19dbca3e2ee765da3032ed5412db42d
parentbb778d26104ee00be2634e6feee803ca0a16a0aa
[CSS] Expand -webkit-line-break value space
https://bugs.webkit.org/show_bug.cgi?id=100739

Patch by Glenn Adams <glenn@skynav.com> on 2012-10-30
Reviewed by Eric Seidel.

Source/WebCore:

(1) expand -webkit-line-break to include new values defined by CSS3 Text [1], i.e., 'auto', 'strict', 'loose';
(2) change default (initial) value for -webkit-line-break to 'auto' to match CSS3 Text;
(3) rename enum EKHTMLLineBreak to LineBreak, renaming enum values appropriately;

New tests to be added when functionality of new values is added. No rendering behavior change at this time.
Only externally visible change is default (initial) value returning 'auto' rather than 'normal', for which 3 existing
tests that were sensitive to this value have been updated. Note that until the functionality for the new values is
added, any actual use of the new values will be treated as the same as the pre-existing 'normal' value, i.e., the
default semantics.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Update from kthmlLineBreak() to lineBreak().

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
Update values supported for CSSPropertyWebkitLineBreak.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LineBreak):
Update LineBreak enumeration values (previously EKHTMLLineBreak).

* css/CSSValueKeywords.in:
Update keywords used for -webkit-line-break.

* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
Update names for line break style getter/setter.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Remove khtml prefix on line break related state.

* rendering/style/RenderStyle.h:
Remove khtml prefix on line break related methods. Update to redefined LineBreak
enumeration type.

* rendering/style/RenderStyleConstants.h:
Rename EKHTMLLineBreak enumeration to LineBreak.
Redefine LineBreak enumeration to include new CSS3 Text modes (auto, loose, strict) and
use better names.

* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
Remove khtml prefix on line break related state references.

* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
Remove khtml prefix on line break related state. Widen field to 3 bits to support 8 values,
of which 5 are now used.

LayoutTests:

Change default (initial) value for -webkit-line-break to 'auto' to match CSS3 Text.

* fast/css/getComputedStyle/computed-style-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

* svg/css/getComputedStyle-basic-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/rendering/style/RenderStyle.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