Changeset 191178 in webkit
- Timestamp:
- Oct 16, 2015 9:12:03 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r191175 r191178 1 2015-10-16 David Hyatt <hyatt@apple.com> 2 3 Implement the "all" CSS property. 4 https://bugs.webkit.org/show_bug.cgi?id=116966 5 6 Reviewed by Zalan Bujtas. 7 8 Added tests for the "all property, including a variables test! 9 10 * fast/css/all-keyword-direction-expected.html: Added. 11 * fast/css/all-keyword-direction.html: Added. 12 * fast/css/all-keyword-inherit-expected.html: Added. 13 * fast/css/all-keyword-inherit.html: Added. 14 * fast/css/all-keyword-initial-expected.html: Added. 15 * fast/css/all-keyword-initial.html: Added. 16 * fast/css/all-keyword-unset-expected.html: Added. 17 * fast/css/all-keyword-unset.html: Added. 18 * fast/css/variables/all-keyword-unset-expected.html: Added. 19 * fast/css/variables/all-keyword-unset.html: Added. 20 1 21 2015-10-15 Michael Saboff <msaboff@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r191176 r191178 1 2015-10-16 David Hyatt <hyatt@apple.com> 2 3 Implement the "all" CSS property. 4 https://bugs.webkit.org/show_bug.cgi?id=116966 5 6 Reviewed by Zalan Bujtas. 7 8 Added new tests in fast/css. 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore::ComputedStyleExtractor::propertyValue): 12 Don't support "all" from computed style for now. 13 14 * css/CSSParser.cpp: 15 (WebCore::CSSParser::parseValue): 16 Make sure to bail after checking inherit/unset/initial for all, since you can't actually 17 accept longhand values in the shorthand declarations. 18 19 (WebCore::CSSParser::parseAnimationProperty): 20 "all" for animations is a special value and should not be confused with the property. It 21 animates everything and does not omit unicode-bidi/direction the way the "all" property does. 22 23 * css/CSSPropertyNames.in: 24 Add the "all" property to the list and use a special keyword in the Longhands value, "all", 25 that makeprop.pl will look for. This way we don't have to dump every single CSS property 26 into the Longhands expression, since that would be nuts. 27 28 * css/StyleProperties.cpp: 29 (WebCore::StyleProperties::getPropertyValue): 30 Look for a common value across all properties supported by "all". That way you can get 31 back inherit/initial/unset from it. 32 33 * css/makeprop.pl: 34 Make the perl script look for "all" in the longhand list, and if it sees it, put every 35 single CSS property into the list for the all shorthand. 36 1 37 2015-10-16 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 38 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r191128 r191178 3462 3462 3463 3463 /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */ 3464 case CSSPropertyAll: 3464 3465 case CSSPropertyAnimation: 3465 3466 case CSSPropertyWebkitTextEmphasis: -
trunk/Source/WebCore/css/CSSParser.cpp
r191155 r191178 1967 1967 return true; 1968 1968 } 1969 1970 if (propId == CSSPropertyAll) 1971 return false; // "all" doesn't allow you to specify anything other than inherit/initial/unset. 1969 1972 1970 1973 if (isKeywordPropertyID(propId)) { … … 5096 5099 return nullptr; 5097 5100 CSSPropertyID result = cssPropertyID(value.string); 5098 if (result )5101 if (result && result != CSSPropertyAll) // "all" value in animation is not equivalent to the all property. 5099 5102 return CSSValuePool::singleton().createIdentifierValue(result); 5100 5103 if (equalIgnoringCase(value, "all")) { -
trunk/Source/WebCore/css/CSSPropertyNames.in
r190999 r191178 133 133 // The remaining properties are listed in alphabetical order 134 134 alignment-baseline [SVG] 135 all [Longhands=all] 135 136 animation [Longhands=animation-name|animation-duration|animation-timing-function|animation-delay|animation-iteration-count|animation-direction|animation-fill-mode] 136 137 animation-delay [AnimationProperty, NameForMethods=Delay] -
trunk/Source/WebCore/css/StyleProperties.cpp
r191128 r191178 128 128 // Shorthand and 4-values properties 129 129 switch (propertyID) { 130 case CSSPropertyAll: 131 return getCommonValue(allShorthand()); 130 132 case CSSPropertyAnimation: 131 133 return getLayeredShorthandValue(animationShorthand()); -
trunk/Source/WebCore/css/makeprop.pl
r191128 r191178 961 961 print SHORTHANDS_CPP " static const CSSPropertyID " . $lowercaseId . "Properties[] = {\n"; 962 962 foreach (@longhands) { 963 die "Unknown CSS property used in Longhands: " . $nameToId{$_} if !exists($nameToId{$_}); 964 push(@{$longhandToShorthands{$_}}, $name); 965 print SHORTHANDS_CPP " CSSProperty" . $nameToId{$_} . ",\n"; 963 if ($_ eq "all") { 964 foreach my $propname (@names) { 965 next if (exists $propertiesWithStyleBuilderOptions{$propname}{"Longhands"}); 966 next if ($propname eq "direction" || $propname eq "unicode-bidi"); 967 die "Unknown CSS property used in all shorthand: " . $nameToId{$propname} if !exists($nameToId{$propname}); 968 push(@{$longhandToShorthands{$propname}}, $name); 969 print SHORTHANDS_CPP " CSSProperty" . $nameToId{$propname} . ",\n"; 970 } 971 } else { 972 die "Unknown CSS property used in Longhands: " . $nameToId{$_} if !exists($nameToId{$_}); 973 push(@{$longhandToShorthands{$_}}, $name); 974 print SHORTHANDS_CPP " CSSProperty" . $nameToId{$_} . ",\n"; 975 } 966 976 } 967 977 print SHORTHANDS_CPP " };\n";
Note: See TracChangeset
for help on using the changeset viewer.