haikuwebkit/LayoutTests/transitions/svg-layout-transition.html

125 lines
3.0 KiB
HTML
Raw Permalink Normal View History

Remove the legacy animation code https://bugs.webkit.org/show_bug.cgi?id=216608 Reviewed by Dean Jackson. Source/WebCore: We remove the legacy animation code found in Source/WebCore/page/animation/, save for CSSPropertyAnimation which is also used by the new Web Animations engine and now moved to Source/WebCore/animation/. Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and removed as well. We also remove some testing utilities and some RenderLayerBacking methods specific to accelerated transitions which the new animation engine does not use. * CMakeLists.txt: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/Animatable.idl: * animation/AnimationEffect.idl: * animation/AnimationPlaybackEvent.idl: * animation/AnimationPlaybackEventInit.idl: * animation/AnimationTimeline.idl: * animation/CSSAnimation.idl: * animation/CSSPropertyAnimation.cpp: Renamed from Source/WebCore/page/animation/CSSPropertyAnimation.cpp. (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): * animation/CSSPropertyAnimation.h: Renamed from Source/WebCore/page/animation/CSSPropertyAnimation.h. * animation/CSSTransition.idl: * animation/DocumentAnimations.idl: * animation/DocumentOrShadowRootAnimations.idl: * animation/DocumentTimeline.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * animation/WebAnimationTypes.h: * css/CSSComputedStyleDeclaration.cpp: (WebCore::computeRenderStyleForProperty): * dom/Document.cpp: (WebCore::Document::resolveStyle): (WebCore::Document::didBecomeCurrentDocumentInFrame): (WebCore::Document::willBeRemovedFromFrame): (WebCore::Document::implicitClose): (WebCore::Document::resume): * dom/Element.cpp: (WebCore::Element::removedFromAncestor): * dom/PseudoElement.cpp: (WebCore::PseudoElement::clearHostElement): * history/CachedFrame.cpp: (WebCore::CachedFrame::destroy): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::clearTimers): (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::didDestroyRenderTree): (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): * page/FrameViewLayoutContext.cpp: (WebCore::FrameViewLayoutContext::layout): * page/Page.cpp: (WebCore::Page::handleLowModePowerChange): (WebCore::Page::setIsVisibleInternal): (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::webAnimationsEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::webAnimationsCSSIntegrationEnabled const): Deleted. * page/animation/AnimationBase.cpp: Removed. * page/animation/AnimationBase.h: Removed. * page/animation/CSSAnimationController.cpp: Removed. * page/animation/CSSAnimationController.h: Removed. * page/animation/CSSAnimationControllerPrivate.h: Removed. * page/animation/CompositeAnimation.cpp: Removed. * page/animation/CompositeAnimation.h: Removed. * page/animation/ImplicitAnimation.cpp: Removed. * page/animation/ImplicitAnimation.h: Removed. * page/animation/KeyframeAnimation.cpp: Removed. * page/animation/KeyframeAnimation.h: Removed. * platform/graphics/GraphicsLayer.h: * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::isKeyframe): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * rendering/RenderElement.cpp: (WebCore::RenderElement::animatedStyle): * rendering/RenderElement.h: (WebCore::RenderElement::startTransition): Deleted. (WebCore::RenderElement::transitionPaused): Deleted. (WebCore::RenderElement::transitionFinished): Deleted. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::currentTransform const): (WebCore::RenderLayer::calculateClipRects const): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): (WebCore::RenderLayerBacking::notifyAnimationStarted): (WebCore::RenderLayerBacking::startTransition): Deleted. (WebCore::RenderLayerBacking::transitionPaused): Deleted. (WebCore::RenderLayerBacking::transitionFinished): Deleted. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::flushPendingLayerChanges): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const): (WebCore::RenderLayerCompositor::isRunningTransformAnimation const): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::startTransition): Deleted. (WebCore::RenderLayerModelObject::transitionPaused): Deleted. (WebCore::RenderLayerModelObject::transitionFinished): Deleted. * rendering/RenderLayerModelObject.h: * rendering/RenderObject.h: (WebCore::RenderObject::legacyAnimation const): Deleted. * rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::tearDownRenderers): * style/StyleAdjuster.cpp: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate): * testing/InternalSettings.cpp: (WebCore::InternalSettings::webAnimationsCSSIntegrationEnabled): Deleted. * testing/InternalSettings.h: * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::numberOfActiveAnimations const): (WebCore::Internals::animationsAreSuspended const): (WebCore::Internals::animationsInterval const): (WebCore::Internals::suspendAnimations const): (WebCore::Internals::resumeAnimations const): (WebCore::Internals::acceleratedAnimationsForElement): (WebCore::Internals::numberOfAnimationTimelineInvalidations const): (WebCore::Internals::pauseAnimationAtTimeOnElement): Deleted. (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Deleted. (WebCore::Internals::pauseTransitionAtTimeOnElement): Deleted. (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Deleted. * testing/Internals.h: * testing/Internals.idl: Source/WebKit: Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and are now removed. * Shared/WebPreferencesExperimental.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetWebAnimationsEnabled): Deleted. (WKPreferencesGetWebAnimationsEnabled): Deleted. (WKPreferencesSetWebAnimationsCSSIntegrationEnabled): Deleted. (WKPreferencesGetWebAnimationsCSSIntegrationEnabled): Deleted. * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _setWebAnimationsCSSIntegrationEnabled:]): Deleted. (-[WKPreferences _webAnimationsCSSIntegrationEnabled]): Deleted. * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): (WebKit::InjectedBundle::setWebAnimationsEnabled): Deleted. (WebKit::InjectedBundle::setWebAnimationsCSSIntegrationEnabled): Deleted. * WebProcess/InjectedBundle/InjectedBundle.h: Source/WebKitLegacy/mac: Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and are now removed. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences webAnimationsEnabled]): Deleted. (-[WebPreferences setWebAnimationsEnabled:]): Deleted. (-[WebPreferences webAnimationsCSSIntegrationEnabled]): Deleted. (-[WebPreferences setWebAnimationsCSSIntegrationEnabled:]): Deleted. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and are now removed. * Interfaces/IWebFramePrivate.idl: * Interfaces/IWebPreferencesPrivate.idl: * WebFrame.cpp: (WebFrame::resumeAnimations): Deleted. (WebFrame::suspendAnimations): Deleted. (WebFrame::pauseAnimation): Deleted. (WebFrame::pauseTransition): Deleted. (WebFrame::numberOfActiveAnimations): Deleted. * WebFrame.h: * WebPreferenceKeysPrivate.h: * WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): (WebPreferences::webAnimationsCSSIntegrationEnabled): Deleted. (WebPreferences::setWebAnimationsCSSIntegrationEnabled): Deleted. (WebPreferences::setWebAnimationsEnabled): Deleted. (WebPreferences::webAnimationsEnabled): Deleted. * WebPreferences.h: * WebView.cpp: (WebView::notifyPreferencesChanged): Tools: Since we now have a single animation engine, the runtime flags to optionally enable the Web Animations engine are not needed anymore and are now removed. * DumpRenderTree/TestOptions.cpp: (TestOptions::TestOptions): (TestOptions::webViewIsCompatibleWithOptions const): * DumpRenderTree/TestOptions.h: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): * DumpRenderTree/win/DumpRenderTree.cpp: (enableExperimentalFeatures): (setWebPreferencesForTestOptions): LayoutTests: Remove any use of now-removed testing methods and some runtime flags from layout tests. * animations/legacy-encoding-timing-function.html: * animations/resources/animation-test-helpers.js: (pauseAnimationAtTimeOnElement): * http/tests/contentextensions/css-display-none-keyframe.html: * imported/blink/transitions/resources/opacity-transform-transitions-inside-iframe-inner.html: Removed. * transitions/background-position-transitions.html: * transitions/background-transitions.html: * transitions/blendmode-transitions.html: * transitions/border-radius-transition.html: * transitions/clip-path-path-transitions.html: * transitions/clip-path-transitions.html: * transitions/clip-transition.html: * transitions/color-transition-all.html: * transitions/color-transition-premultiplied.html: * transitions/color-transition-rounding.html: * transitions/cross-fade-background-image.html: * transitions/cross-fade-border-image.html: * transitions/cubic-bezier-overflow-color.html: * transitions/cubic-bezier-overflow-length.html: * transitions/cubic-bezier-overflow-shadow.html: * transitions/cubic-bezier-overflow-svg-length.html: * transitions/cubic-bezier-overflow-transform.html: * transitions/default-timing-function.html: * transitions/delay.html: * transitions/flex-transitions.html: * transitions/font-family-during-transition.html: * transitions/frames-timing-function.html: * transitions/interrupted-all-transition.html: * transitions/longhand-vs-shorthand-initial.html: * transitions/mask-transitions.html: * transitions/min-max-width-height-transitions.html: * transitions/mismatched-shadow-styles.html: * transitions/mismatched-shadow-transitions.html: * transitions/mixed-type.html: * transitions/move-after-transition.html: * transitions/multiple-background-size-transitions.html: * transitions/multiple-background-transitions.html: * transitions/multiple-mask-transitions.html: * transitions/multiple-shadow-transitions.html: * transitions/negative-delay.html: * transitions/opacity-transition-zindex.html: * transitions/resources/transition-test-helpers.js: * transitions/shape-outside-transitions.html: * transitions/shorthand-border-transitions.html: * transitions/shorthand-transitions.html: * transitions/steps-timing-function.html: * transitions/svg-layout-transition.html: * transitions/svg-text-shadow-transition.html: * transitions/svg-transitions.html: * transitions/text-indent-transition.html: * transitions/transform-op-list-match.html: * transitions/transform-op-list-no-match.html: * transitions/transition-end-event-rendering.html: * transitions/transition-hit-test-transform.html: * transitions/transition-hit-test.html: * transitions/transition-in-delay-phase.html: * transitions/transition-on-element-with-content.html: * transitions/transition-shorthand-delay.html: * transitions/transition-timing-function.html: * transitions/transition-to-from-auto.html: * transitions/transition-to-from-undefined.html: * transitions/visited-link-color.html: * transitions/zero-duration-in-list.html: * transitions/zero-duration-with-non-zero-delay-start.html: * webanimations/accelerated-animation-interruption-display-none.html: * webanimations/accelerated-animation-removal-upon-transition-completion.html: * webanimations/accelerated-animation-suspension.html: * webanimations/accelerated-transition-by-removing-property.html: * webanimations/accessing-current-time-after-clearing-css-animation-effect.html: * webanimations/accessing-current-time-after-finished-css-animation-target-removal.html: * webanimations/css-animation-effect-target-change-and-animation-removal-crash.html: * webanimations/css-animation-effect-target-change-and-get-keyframes-crash.html: * webanimations/css-animations.html: * webanimations/css-transition-in-flight-reversal-accelerated.html: * webanimations/empty-keyframes-crash.html: * webanimations/partly-accelerated-transition-by-removing-property.html: * webanimations/setting-css-animation-none-after-clearing-effect.html: * webanimations/setting-css-animation-timing-property-via-style-after-clearing-effect.html: Canonical link: https://commits.webkit.org/229462@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-17 12:39:28 +00:00
<!DOCTYPE>
Turn x/y to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135215 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: http://trac.webkit.org/changeset/171341 Tests: svg/css/parse-length.html transitions/svg-layout-transition.html Added copyright where I forgot it in previous patch. * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): Add x and y to list. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Parse x and y property. * css/SVGCSSPropertyNames.in: Add x and y to list of names. * css/StyleResolver.h: * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: Add x and y setters and getters. * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. (WebCore::SVGRenderStyle::SVGRenderStyle): (WebCore::SVGRenderStyle::operator==): (WebCore::SVGRenderStyle::copyNonInheritedFrom): (WebCore::SVGRenderStyle::diff): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setX): (WebCore::SVGRenderStyle::setY): (WebCore::SVGRenderStyle::x): (WebCore::SVGRenderStyle::y): * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::copy): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: (WebCore::StyleLayoutData::create): (WebCore::StyleLayoutData::operator!=): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. (WebCore::updatePathFromRectElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. * svg/SVGElement.cpp: Add x and y to the relevant property lists. (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGFilterElement.cpp: Style update on change of x and y. (WebCore::SVGFilterElement::svgAttributeChanged): * svg/SVGMaskElement.cpp: Ditto. (WebCore::SVGMaskElement::svgAttributeChanged): * svg/SVGPatternElement.cpp: Ditto. (WebCore::SVGPatternElement::svgAttributeChanged): * svg/SVGRectElement.cpp: Ditto. (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they are lists instead of individual values. Solution about to be discussed in the WG. Keep current behavior for now. (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): (WebCore::SVGTextPositioningElement::isPresentationAttribute): * svg/SVGTextPositioningElement.h: LayoutTests: Test parsing of x and y attributes. Rendering and SVG animation covered by existing tests. CSS Transition test, test transition from specified attribute value to new property value. Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. * svg/css/parse-length-expected.txt: Added. * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. * svg/css/parse-width-expected.txt: Removed. * transitions/svg-layout-transition-expected.txt: Added. * transitions/svg-layout-transition.html: Added. Canonical link: https://commits.webkit.org/153179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-25 09:52:25 +00:00
<html>
<head>
<style>
.init {
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: linear;
}
Turn cx/cy to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135975 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns x and y to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setCx): (WebCore::SVGRenderStyle::setCy): (WebCore::SVGRenderStyle::cx): (WebCore::SVGRenderStyle::cy): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted. * svg/SVGCircleElement.h: * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted. * svg/SVGEllipseElement.h: LayoutTests: turns cx and cy to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length-expected.txt: * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:38:10 +00:00
#cx {
-webkit-transition-property: cx;
}
#cx.final {
cx: 200px;
}
#cy {
-webkit-transition-property: cy;
}
#cy.final {
cy: 200px;
}
Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Patch by Dirk Schulze <krit@webkit.org> on 2014-08-15 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns rx, ry and r to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setR): (WebCore::SVGRenderStyle::setRx): (WebCore::SVGRenderStyle::setRy): (WebCore::SVGRenderStyle::r): (WebCore::SVGRenderStyle::rx): (WebCore::SVGRenderStyle::ry): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): (WebCore::updatePathFromRectElement): (WebCore::updatePathFromLineElement): Deleted. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): LayoutTests: turns r, rx and ry to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153838@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:42:38 +00:00
#r {
-webkit-transition-property: r;
}
#r.final {
r: 200px;
}
#rx {
-webkit-transition-property: rx;
}
#rx.final {
rx: 200px;
}
#ry {
-webkit-transition-property: ry;
}
#ry.final {
ry: 200px;
}
Turn x/y to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135215 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: http://trac.webkit.org/changeset/171341 Tests: svg/css/parse-length.html transitions/svg-layout-transition.html Added copyright where I forgot it in previous patch. * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): Add x and y to list. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Parse x and y property. * css/SVGCSSPropertyNames.in: Add x and y to list of names. * css/StyleResolver.h: * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: Add x and y setters and getters. * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. (WebCore::SVGRenderStyle::SVGRenderStyle): (WebCore::SVGRenderStyle::operator==): (WebCore::SVGRenderStyle::copyNonInheritedFrom): (WebCore::SVGRenderStyle::diff): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setX): (WebCore::SVGRenderStyle::setY): (WebCore::SVGRenderStyle::x): (WebCore::SVGRenderStyle::y): * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::copy): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: (WebCore::StyleLayoutData::create): (WebCore::StyleLayoutData::operator!=): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. (WebCore::updatePathFromRectElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. * svg/SVGElement.cpp: Add x and y to the relevant property lists. (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGFilterElement.cpp: Style update on change of x and y. (WebCore::SVGFilterElement::svgAttributeChanged): * svg/SVGMaskElement.cpp: Ditto. (WebCore::SVGMaskElement::svgAttributeChanged): * svg/SVGPatternElement.cpp: Ditto. (WebCore::SVGPatternElement::svgAttributeChanged): * svg/SVGRectElement.cpp: Ditto. (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they are lists instead of individual values. Solution about to be discussed in the WG. Keep current behavior for now. (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): (WebCore::SVGTextPositioningElement::isPresentationAttribute): * svg/SVGTextPositioningElement.h: LayoutTests: Test parsing of x and y attributes. Rendering and SVG animation covered by existing tests. CSS Transition test, test transition from specified attribute value to new property value. Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. * svg/css/parse-length-expected.txt: Added. * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. * svg/css/parse-width-expected.txt: Removed. * transitions/svg-layout-transition-expected.txt: Added. * transitions/svg-layout-transition.html: Added. Canonical link: https://commits.webkit.org/153179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-25 09:52:25 +00:00
#x {
-webkit-transition-property: x;
}
#x.final {
x: 200px;
}
#y {
-webkit-transition-property: y;
}
#y.final {
y: 200px;
}
#width {
-webkit-transition-property: width;
}
#width.final {
width: 200px;
}
#height {
-webkit-transition-property: height;
}
#height.final {
height: 200px;
}
</style>
<script src="resources/transition-test-helpers.js"></script>
<script type="text/javascript">
const expectedValues = [
// [time, element-id, property, expected-value, tolerance]
Turn cx/cy to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135975 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns x and y to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setCx): (WebCore::SVGRenderStyle::setCy): (WebCore::SVGRenderStyle::cx): (WebCore::SVGRenderStyle::cy): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted. * svg/SVGCircleElement.h: * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted. * svg/SVGEllipseElement.h: LayoutTests: turns cx and cy to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length-expected.txt: * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:38:10 +00:00
[0.5, 'cx', 'cx', 150, 20],
[0.5, 'cy', 'cy', 150, 20],
Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Patch by Dirk Schulze <krit@webkit.org> on 2014-08-15 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns rx, ry and r to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setR): (WebCore::SVGRenderStyle::setRx): (WebCore::SVGRenderStyle::setRy): (WebCore::SVGRenderStyle::r): (WebCore::SVGRenderStyle::rx): (WebCore::SVGRenderStyle::ry): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): (WebCore::updatePathFromRectElement): (WebCore::updatePathFromLineElement): Deleted. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): LayoutTests: turns r, rx and ry to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153838@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:42:38 +00:00
[0.5, 'r', 'r', 150, 20],
[0.5, 'rx', 'rx', 150, 20],
[0.5, 'ry', 'ry', 150, 20],
Turn x/y to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135215 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: http://trac.webkit.org/changeset/171341 Tests: svg/css/parse-length.html transitions/svg-layout-transition.html Added copyright where I forgot it in previous patch. * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): Add x and y to list. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Parse x and y property. * css/SVGCSSPropertyNames.in: Add x and y to list of names. * css/StyleResolver.h: * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: Add x and y setters and getters. * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. (WebCore::SVGRenderStyle::SVGRenderStyle): (WebCore::SVGRenderStyle::operator==): (WebCore::SVGRenderStyle::copyNonInheritedFrom): (WebCore::SVGRenderStyle::diff): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setX): (WebCore::SVGRenderStyle::setY): (WebCore::SVGRenderStyle::x): (WebCore::SVGRenderStyle::y): * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::copy): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: (WebCore::StyleLayoutData::create): (WebCore::StyleLayoutData::operator!=): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. (WebCore::updatePathFromRectElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. * svg/SVGElement.cpp: Add x and y to the relevant property lists. (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGFilterElement.cpp: Style update on change of x and y. (WebCore::SVGFilterElement::svgAttributeChanged): * svg/SVGMaskElement.cpp: Ditto. (WebCore::SVGMaskElement::svgAttributeChanged): * svg/SVGPatternElement.cpp: Ditto. (WebCore::SVGPatternElement::svgAttributeChanged): * svg/SVGRectElement.cpp: Ditto. (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they are lists instead of individual values. Solution about to be discussed in the WG. Keep current behavior for now. (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): (WebCore::SVGTextPositioningElement::isPresentationAttribute): * svg/SVGTextPositioningElement.h: LayoutTests: Test parsing of x and y attributes. Rendering and SVG animation covered by existing tests. CSS Transition test, test transition from specified attribute value to new property value. Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. * svg/css/parse-length-expected.txt: Added. * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. * svg/css/parse-width-expected.txt: Removed. * transitions/svg-layout-transition-expected.txt: Added. * transitions/svg-layout-transition.html: Added. Canonical link: https://commits.webkit.org/153179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-25 09:52:25 +00:00
[0.5, 'x', 'x', 150, 20],
[0.5, 'y', 'y', 150, 20],
[0.5, 'width', 'width', 150, 20],
[0.5, 'height', 'height', 150, 20],
];
function setupTest()
{
Turn cx/cy to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135975 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns x and y to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setCx): (WebCore::SVGRenderStyle::setCy): (WebCore::SVGRenderStyle::cx): (WebCore::SVGRenderStyle::cy): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted. * svg/SVGCircleElement.h: * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted. * svg/SVGEllipseElement.h: LayoutTests: turns cx and cy to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length-expected.txt: * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:38:10 +00:00
document.getElementById('cx').setAttribute('class', 'init final');
document.getElementById('cy').setAttribute('class', 'init final');
Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Patch by Dirk Schulze <krit@webkit.org> on 2014-08-15 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns rx, ry and r to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setR): (WebCore::SVGRenderStyle::setRx): (WebCore::SVGRenderStyle::setRy): (WebCore::SVGRenderStyle::r): (WebCore::SVGRenderStyle::rx): (WebCore::SVGRenderStyle::ry): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): (WebCore::updatePathFromRectElement): (WebCore::updatePathFromLineElement): Deleted. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): LayoutTests: turns r, rx and ry to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153838@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:42:38 +00:00
document.getElementById('r').setAttribute('class', 'init final');
document.getElementById('rx').setAttribute('class', 'init final');
document.getElementById('ry').setAttribute('class', 'init final');
Turn x/y to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135215 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: http://trac.webkit.org/changeset/171341 Tests: svg/css/parse-length.html transitions/svg-layout-transition.html Added copyright where I forgot it in previous patch. * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): Add x and y to list. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Parse x and y property. * css/SVGCSSPropertyNames.in: Add x and y to list of names. * css/StyleResolver.h: * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: Add x and y setters and getters. * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. (WebCore::SVGRenderStyle::SVGRenderStyle): (WebCore::SVGRenderStyle::operator==): (WebCore::SVGRenderStyle::copyNonInheritedFrom): (WebCore::SVGRenderStyle::diff): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setX): (WebCore::SVGRenderStyle::setY): (WebCore::SVGRenderStyle::x): (WebCore::SVGRenderStyle::y): * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::copy): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: (WebCore::StyleLayoutData::create): (WebCore::StyleLayoutData::operator!=): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. (WebCore::updatePathFromRectElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. * svg/SVGElement.cpp: Add x and y to the relevant property lists. (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGFilterElement.cpp: Style update on change of x and y. (WebCore::SVGFilterElement::svgAttributeChanged): * svg/SVGMaskElement.cpp: Ditto. (WebCore::SVGMaskElement::svgAttributeChanged): * svg/SVGPatternElement.cpp: Ditto. (WebCore::SVGPatternElement::svgAttributeChanged): * svg/SVGRectElement.cpp: Ditto. (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they are lists instead of individual values. Solution about to be discussed in the WG. Keep current behavior for now. (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): (WebCore::SVGTextPositioningElement::isPresentationAttribute): * svg/SVGTextPositioningElement.h: LayoutTests: Test parsing of x and y attributes. Rendering and SVG animation covered by existing tests. CSS Transition test, test transition from specified attribute value to new property value. Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. * svg/css/parse-length-expected.txt: Added. * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. * svg/css/parse-width-expected.txt: Removed. * transitions/svg-layout-transition-expected.txt: Added. * transitions/svg-layout-transition.html: Added. Canonical link: https://commits.webkit.org/153179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-25 09:52:25 +00:00
document.getElementById('x').setAttribute('class', 'init final');
document.getElementById('y').setAttribute('class', 'init final');
document.getElementById('width').setAttribute('class', 'init final');
document.getElementById('height').setAttribute('class', 'init final');
}
runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
<svg>
Turn cx/cy to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135975 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns x and y to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setCx): (WebCore::SVGRenderStyle::setCy): (WebCore::SVGRenderStyle::cx): (WebCore::SVGRenderStyle::cy): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): (WebCore::SVGCircleElement::selfHasRelativeLengths): Deleted. * svg/SVGCircleElement.h: * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): Deleted. * svg/SVGEllipseElement.h: LayoutTests: turns cx and cy to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length-expected.txt: * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:38:10 +00:00
<circle cx="100" cy="100" r="100" class="init" id="cx"/>
<circle cx="100" cy="100" r="100" class="init" id="cy"/>
Turn r/rx/ry to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135978 Patch by Dirk Schulze <krit@webkit.org> on 2014-08-15 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and Source/WebCore: turns rx, ry and r to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 Extended existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSPropertyNames.in: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setR): (WebCore::SVGRenderStyle::setRx): (WebCore::SVGRenderStyle::setRy): (WebCore::SVGRenderStyle::r): (WebCore::SVGRenderStyle::rx): (WebCore::SVGRenderStyle::ry): * rendering/style/SVGRenderStyleDefs.cpp: (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: * rendering/svg/RenderSVGEllipse.cpp: (WebCore::RenderSVGEllipse::calculateRadiiAndCenter): * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromCircleElement): (WebCore::updatePathFromEllipseElement): (WebCore::updatePathFromRectElement): (WebCore::updatePathFromLineElement): Deleted. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): * svg/SVGElement.cpp: (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): LayoutTests: turns r, rx and ry to presentation attributes as well: ​http://trac.webkit.org/changeset/171341 * svg/css/parse-length.html: * transitions/svg-layout-transition-expected.txt: * transitions/svg-layout-transition.html: Canonical link: https://commits.webkit.org/153838@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-08-15 19:42:38 +00:00
<circle cx="100" cy="100" r="100" class="init" id="r"/>
<ellipse cx="100" cy="100" rx="100" ry="100" class="init" id="rx"/>
<ellipse cx="100" cy="100" rx="100" ry="100" class="init" id="ry"/>
Turn x/y to presentation attributes https://bugs.webkit.org/show_bug.cgi?id=135215 Source/WebCore: Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. This follows the patch for width and height presentation attributes and turns x and y to presentation attributes as well: http://trac.webkit.org/changeset/171341 Tests: svg/css/parse-length.html transitions/svg-layout-transition.html Added copyright where I forgot it in previous patch. * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isSimpleLengthPropertyID): Add x and y to list. * css/DeprecatedStyleBuilder.cpp: (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Parse x and y property. * css/SVGCSSPropertyNames.in: Add x and y to list of names. * css/StyleResolver.h: * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length. (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * rendering/style/RenderStyle.h: Add x and y setters and getters. * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData. (WebCore::SVGRenderStyle::SVGRenderStyle): (WebCore::SVGRenderStyle::operator==): (WebCore::SVGRenderStyle::copyNonInheritedFrom): (WebCore::SVGRenderStyle::diff): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::setX): (WebCore::SVGRenderStyle::setY): (WebCore::SVGRenderStyle::x): (WebCore::SVGRenderStyle::y): * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing. (WebCore::StyleLayoutData::StyleLayoutData): (WebCore::StyleLayoutData::copy): (WebCore::StyleLayoutData::operator==): * rendering/style/SVGRenderStyleDefs.h: (WebCore::StyleLayoutData::create): (WebCore::StyleLayoutData::operator!=): * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::updateShapeFromElement): * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values. (WebCore::updatePathFromRectElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection. * svg/SVGElement.cpp: Add x and y to the relevant property lists. (WebCore::populateAttributeNameToCSSPropertyIDMap): (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): * svg/SVGFilterElement.cpp: Style update on change of x and y. (WebCore::SVGFilterElement::svgAttributeChanged): * svg/SVGMaskElement.cpp: Ditto. (WebCore::SVGMaskElement::svgAttributeChanged): * svg/SVGPatternElement.cpp: Ditto. (WebCore::SVGPatternElement::svgAttributeChanged): * svg/SVGRectElement.cpp: Ditto. (WebCore::SVGRectElement::svgAttributeChanged): * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they are lists instead of individual values. Solution about to be discussed in the WG. Keep current behavior for now. (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): (WebCore::SVGTextPositioningElement::isPresentationAttribute): * svg/SVGTextPositioningElement.h: LayoutTests: Test parsing of x and y attributes. Rendering and SVG animation covered by existing tests. CSS Transition test, test transition from specified attribute value to new property value. Patch by Dirk Schulze <krit@webkit.org> on 2014-07-24 Reviewed by Dean Jackson. * svg/css/parse-length-expected.txt: Added. * svg/css/parse-length.html: Renamed from LayoutTests/svg/css/parse-width.html. * svg/css/parse-width-expected.txt: Removed. * transitions/svg-layout-transition-expected.txt: Added. * transitions/svg-layout-transition.html: Added. Canonical link: https://commits.webkit.org/153179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-07-25 09:52:25 +00:00
<rect x="100" y="100" width="100" height="100" class="init" id="x"/>
<rect x="100" y="100" width="100" height="100" class="init" id="y"/>
<rect x="100" y="100" width="100" height="100" class="init" id="width"/>
<rect x="100" y="100" width="100" height="100" class="init" id="height"/>
</svg>
<div id="result">
</div>
</body>
</html>