Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Issue 12470005: Merge 144626 (Closed)

Created:
7 years, 9 months ago by apavlov
Modified:
7 years, 9 months ago
Reviewers:
apavlov
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Visibility:
Public.

Description

Merge 144626 > transition properties can't be found in CSSStyleDeclaration > https://bugs.webkit.org/show_bug.cgi?id=110011 > > Reviewed by Antti Koivisto. > > Source/WebCore: > > The previous approach for handling the unprefixing was to alias the > unprefixed properties with the prefixed ones in CSSPropertyNames.in. > Unfortunately it will alias the properties in the parsing code which will just > identically parse the two versions. This means that when we populate StylePropertySet > we do not have information whether we just parsed the prefixed, the > unprefixed properties or we parsed both. The patch takes another > approach by creating two distinct sets of properties (unprefixed and > prefixed). Each properties have their own id and we now handle them in > the parsing code as disctints properties and add both versions to the > declared style. In order to avoid properties getting out of sync, > this patch adds few facilities to StylePropertySet to update the > prefixed and the unprefixed entries. Finally the style resolution > happens only for the prefixed version (to limit the size of this patch) > and the unprefixed versions are not resolved. This is to avoid creating > the animation objects twice for the resolved style. > > Test : transitions/transitions-parsing.html > > * css/CSSComputedStyleDeclaration.cpp: > (WebCore): > (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): > * css/CSSParser.cpp: > (WebCore::CSSParser::addPropertyWithPrefixingVariant): Always add the > prefixed and the unprefixed property even if only one is specified. > (WebCore): > (WebCore::CSSParser::parseValue): > (WebCore::CSSParser::parseTransitionShorthand): Add both prefixed and > unprefixed longhands to the declarated style. > (WebCore::CSSParser::parseAnimationProperty): > * css/CSSParser.h: > (CSSParser): > * css/CSSProperty.cpp: > (WebCore::CSSProperty::isInheritedProperty): > * css/CSSProperty.h: > (WebCore:: prefixingVariantForPropertyId): This function takes a given > property id and returns its prefixed or unprefixed id if it exists. If > not it returns the same id. > (WebCore): > * css/CSSPropertyNames.in: > * css/StylePropertySet.cpp: > (WebCore::StylePropertySet::getPropertyValue): > (WebCore::StylePropertySet::removeShorthandProperty): > (WebCore::StylePropertySet::removeProperty): > (WebCore::StylePropertySet::removeProperty): Remove > also the prefixed or unprefixed shorthand if it exists. > (WebCore): > (WebCore::StylePropertySet::setProperty): > (WebCore::StylePropertySet:: appendPrefixingVariantProperty): > (WebCore::StylePropertySet::setPrefixingVariantProperty): If it > exists a unprefixed or prefixed counterpart of the property we're > trying to set, then we update the other one. > (WebCore::StylePropertySet::asText): > (WebCore::StylePropertySet::mergeAndOverrideOnConflict): > * css/StylePropertySet.h: > (StylePropertySet): > * css/StylePropertyShorthand.cpp: > (WebCore::transitionShorthand): > (WebCore): > (WebCore::shorthandForProperty): Define the transitions unprefixed > longhands. > * css/StylePropertyShorthand.h: > (WebCore): > * css/StyleResolver.cpp: > (WebCore::StyleResolver::applyProperty): StyleBuilder will handle the > resolution and the creation of the animations for the style. As the > declarated style now contains declarations for the prefixed and > unprefixed property we do not want to resolve two times and create duplicate animations. > Therefore when we try to resolve the unprefixed version we just bail out. > > LayoutTests: > > Updated layout test to cover the bug. > > * transitions/transitions-parsing-expected.txt: > * transitions/transitions-parsing.html: > TBR=alexis@webkit.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=145344

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -16 lines) Patch
M LayoutTests/transitions/transitions-parsing.html View 5 chunks +10 lines, -0 lines 0 comments Download
M LayoutTests/transitions/transitions-parsing-expected.txt View 5 chunks +10 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSComputedStyleDeclaration.cpp View 2 chunks +9 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSParser.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/WebCore/css/CSSParser.cpp View 10 chunks +28 lines, -7 lines 0 comments Download
M Source/WebCore/css/CSSProperty.h View 1 chunk +42 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSProperty.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSPropertyNames.in View 1 chunk +5 lines, -5 lines 0 comments Download
M Source/WebCore/css/StylePropertySet.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebCore/css/StylePropertySet.cpp View 6 chunks +47 lines, -3 lines 0 comments Download
M Source/WebCore/css/StylePropertyShorthand.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/css/StylePropertyShorthand.cpp View 2 chunks +14 lines, -0 lines 0 comments Download
M Source/WebCore/css/StyleResolver.cpp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
apavlov
7 years, 9 months ago (2013-03-11 08:26:03 UTC) #1
apavlov
7 years, 9 months ago (2013-03-11 08:29:02 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r145344.

Powered by Google App Engine
This is Rietveld 408576698