• betravis@adobe.com's avatar
    [CSS Shapes] Basic shapes' computed position should be a horizontal and vertical offset · 02b3f42a
    betravis@adobe.com authored
    https://bugs.webkit.org/show_bug.cgi?id=127010
    
    Reviewed by Rob Buis.
    
    Source/WebCore:
    
    This patch updates the computed position values used for blending to be a horizontal
    left offset and a vertical top offset. When positions include a center, bottom, or
    right position offset, it is converted to the appropriate top/left coordinate as
    a calc expression. Serialized values still use the original bottom/right directions
    when present, and also omit the top/left keywords where possible.
    
    Updated parsing and animation tests.
    
    * css/BasicShapeFunctions.cpp:
    (WebCore::valueForCenterCoordinate): Use the simplified BasicShapeCenterCoordinate,
    which includes an offset and whether the direction is from the top/left or bottom/right.
    (WebCore::valueForBasicShape): Ditto.
    (WebCore::convertToCenterCoordinate): Ditto.
    (WebCore::basicShapeForValue): Ditto.
    (WebCore::floatValueForCenterCoordinate): Ditto.
    * page/animation/CSSPropertyAnimation.cpp:
    (WebCore::blendFunc): Remove the RenderBox parameter, which is no longer needed.
    * rendering/style/BasicShapes.cpp:
    (WebCore::BasicShapeCenterCoordinate::updateComputedLength): Calculate the computed
    position offset for this center coordinate.
    (WebCore::BasicShapeRectangle::blend): Remove the RenderBox parameter.
    (WebCore::DeprecatedBasicShapeCircle::blend): Ditto.
    (WebCore::BasicShapeCircle::blend): Ditto.
    (WebCore::DeprecatedBasicShapeEllipse::blend): Ditto.
    (WebCore::BasicShapeEllipse::blend): Ditto.
    (WebCore::BasicShapePolygon::blend): Ditto.
    (WebCore::BasicShapeInsetRectangle::blend): Ditto.
    (WebCore::BasicShapeInset::blend): Ditto.
    * rendering/style/BasicShapes.h:
    (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate): Simplify
    BasicShapeCenterCoordinate to contain an offset and a direction. Also add a
    computed length, which is an offset from the top/left direction.
    (WebCore::BasicShapeCenterCoordinate::direction):
    (WebCore::BasicShapeCenterCoordinate::computedLength):
    (WebCore::BasicShapeCenterCoordinate::blend):
    
    LayoutTests:
    
    Update existing parsing and animation tests. For parsing tests, top / left keywords
    are omitted whenever possible. For animation tests, animations to bottom / right
    offsets will use calc values based from the top / left direction.
    
    * animations/resources/animation-test-helpers.js:
    (parseBasicShape): Parse non-numerical arguments to the shape function.
    (basicShapeParametersMatch): Match non-numerical arguments to the shape function.
    * fast/shapes/parsing/parsing-shape-inside-expected.txt: Update serialized values
    to omit top / left keywords when possible.
    * fast/shapes/parsing/parsing-shape-outside-expected.txt: Update serialized values
    to omit top / left keywords when possible.
    * fast/shapes/parsing/parsing-test-utils.js: Modify shape parsing test expectations.
    * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt: Ditto.
    * fast/shapes/shape-outside-floats/shape-outside-animation.html: Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    02b3f42a
Name
Last commit
Last update
..
3d Loading commit data...
resources Loading commit data...
script-tests Loading commit data...
added-while-suspended-expected.txt Loading commit data...
added-while-suspended.html Loading commit data...
additive-transform-animations-expected.png Loading commit data...
additive-transform-animations.html Loading commit data...
animation-add-events-in-handler-expected.txt Loading commit data...
animation-add-events-in-handler.html Loading commit data...
animation-border-overflow-expected.txt Loading commit data...
animation-border-overflow.html Loading commit data...
animation-controller-drt-api-expected.txt Loading commit data...
animation-controller-drt-api.html Loading commit data...
animation-css-rule-types-expected.txt Loading commit data...
animation-css-rule-types.html Loading commit data...
animation-delay-changed-expected.txt Loading commit data...
animation-delay-changed.html Loading commit data...
animation-direction-alternate-reverse-expected.txt Loading commit data...
animation-direction-alternate-reverse.html Loading commit data...
animation-direction-expected.txt Loading commit data...
animation-direction-normal-expected.png Loading commit data...
animation-direction-normal-expected.txt Loading commit data...
animation-direction-normal.html Loading commit data...
animation-direction-reverse-expected.txt Loading commit data...
animation-direction-reverse-fill-mode-expected.txt Loading commit data...
animation-direction-reverse-fill-mode-hardware-expected.txt Loading commit data...
animation-direction-reverse-fill-mode-hardware.html Loading commit data...
animation-direction-reverse-fill-mode.html Loading commit data...
animation-direction-reverse-hardware-expected.txt Loading commit data...
animation-direction-reverse-hardware-opacity-expected.txt Loading commit data...
animation-direction-reverse-hardware-opacity.html Loading commit data...
animation-direction-reverse-hardware.html Loading commit data...
animation-direction-reverse-non-hardware-expected.txt Loading commit data...
animation-direction-reverse-non-hardware.html Loading commit data...
animation-direction-reverse-timing-functions-expected.txt Loading commit data...
animation-direction-reverse-timing-functions-hardware-expected.txt Loading commit data...
animation-direction-reverse-timing-functions-hardware.html Loading commit data...
animation-direction-reverse-timing-functions.html Loading commit data...
animation-direction-reverse.html Loading commit data...
animation-direction.html Loading commit data...
animation-end-event-destroy-renderer-expected.txt Loading commit data...
animation-end-event-destroy-renderer.html Loading commit data...
animation-end-event-short-iterations-expected.txt Loading commit data...
animation-end-event-short-iterations.html Loading commit data...
animation-events-create-expected.txt Loading commit data...
animation-events-create.html Loading commit data...
animation-hit-test-expected.txt Loading commit data...
animation-hit-test-transform-expected.txt Loading commit data...
animation-hit-test-transform.html Loading commit data...
animation-hit-test.html Loading commit data...
animation-internals-api-expected.txt Loading commit data...
animation-internals-api-multiple-keyframes-expected.txt Loading commit data...
animation-internals-api-multiple-keyframes.html Loading commit data...
animation-internals-api.html Loading commit data...
animation-iteration-event-destroy-renderer-expected.txt Loading commit data...
animation-iteration-event-destroy-renderer.html Loading commit data...
animation-matrix-negative-scale-unmatrix-expected.txt Loading commit data...
animation-matrix-negative-scale-unmatrix.html Loading commit data...
animation-offscreen-to-onscreen-expected.png Loading commit data...
animation-offscreen-to-onscreen-expected.txt Loading commit data...
animation-offscreen-to-onscreen.html Loading commit data...
animation-on-inline-crash-expected.txt Loading commit data...
animation-on-inline-crash.html Loading commit data...
animation-shorthand-expected.txt Loading commit data...
animation-shorthand-name-order-expected.txt Loading commit data...
animation-shorthand-name-order.html Loading commit data...
animation-shorthand-overriding-expected.txt Loading commit data...
animation-shorthand-overriding.html Loading commit data...
animation-shorthand-removed-expected.txt Loading commit data...
animation-shorthand-removed.html Loading commit data...
animation-shorthand.html Loading commit data...
animation-start-event-destroy-renderer-expected.txt Loading commit data...
animation-start-event-destroy-renderer.html Loading commit data...
animation-welcome-safari-expected.txt Loading commit data...
animation-welcome-safari.html Loading commit data...
big-rotation-expected.txt Loading commit data...
big-rotation.html Loading commit data...
body-removal-crash-expected.txt Loading commit data...
body-removal-crash.html Loading commit data...
change-keyframes-expected.txt Loading commit data...
change-keyframes-name-expected.txt Loading commit data...
change-keyframes-name.html Loading commit data...
change-keyframes.html Loading commit data...
change-one-anim-expected.txt Loading commit data...
change-one-anim.html Loading commit data...
change-transform-style-during-animation-expected.png Loading commit data...
change-transform-style-during-animation-expected.txt Loading commit data...
change-transform-style-during-animation.html Loading commit data...
combo-transform-rotate+scale-expected.txt Loading commit data...
combo-transform-rotate+scale.html Loading commit data...
combo-transform-translate+scale-expected.txt Loading commit data...
combo-transform-translate+scale.html Loading commit data...
computed-style-expected.txt Loading commit data...
computed-style.html Loading commit data...
cross-fade-background-image-expected.html Loading commit data...
cross-fade-background-image.html Loading commit data...
cross-fade-border-image-source.html Loading commit data...
cross-fade-list-style-image.html Loading commit data...
cross-fade-webkit-mask-box-image.html Loading commit data...
cross-fade-webkit-mask-image.html Loading commit data...
duplicated-keyframes-name-expected.txt Loading commit data...
duplicated-keyframes-name.html Loading commit data...
dynamic-stylesheet-loading-expected.txt Loading commit data...
dynamic-stylesheet-loading.html Loading commit data...
empty-keyframes-expected.txt Loading commit data...
empty-keyframes.html Loading commit data...
fill-mode-expected.txt Loading commit data...
fill-mode-forwards-expected.txt Loading commit data...
fill-mode-forwards.html Loading commit data...
fill-mode-forwards2-expected.txt Loading commit data...
fill-mode-forwards2.html Loading commit data...
fill-mode-iteration-count-non-integer-expected.txt Loading commit data...
fill-mode-iteration-count-non-integer.html Loading commit data...
fill-mode-missing-from-to-keyframes-expected.txt Loading commit data...
fill-mode-missing-from-to-keyframes.html Loading commit data...
fill-mode-multiple-keyframes-expected.txt Loading commit data...
fill-mode-multiple-keyframes.html Loading commit data...
fill-mode-removed-expected.txt Loading commit data...
fill-mode-removed.html Loading commit data...
fill-mode-reverse-expected.txt Loading commit data...
fill-mode-reverse.html Loading commit data...
fill-mode-transform-expected.txt Loading commit data...
fill-mode-transform.html Loading commit data...
fill-mode.html Loading commit data...
fill-unset-properties-expected.txt Loading commit data...
fill-unset-properties.html Loading commit data...
font-size-using-ems-expected.txt Loading commit data...
font-size-using-ems.html-disabled Loading commit data...
generic-from-to-expected.txt Loading commit data...
generic-from-to.html Loading commit data...
import-crash-expected.txt Loading commit data...
import-crash.html Loading commit data...
import-expected.txt Loading commit data...
import.html Loading commit data...
keyframe-autoclose-brace-expected.txt Loading commit data...
keyframe-autoclose-brace.html Loading commit data...
keyframe-selector-negative-percentage-expected.txt Loading commit data...
keyframe-selector-negative-percentage.html Loading commit data...
keyframe-timing-functions-expected.txt Loading commit data...
keyframe-timing-functions-transform-expected.txt Loading commit data...
keyframe-timing-functions-transform.html Loading commit data...
keyframe-timing-functions.html Loading commit data...
keyframe-timing-functions2-expected.txt Loading commit data...
keyframe-timing-functions2.html Loading commit data...
keyframes-comma-separated-expected.txt Loading commit data...
keyframes-comma-separated.html Loading commit data...
keyframes-dynamic-expected.txt Loading commit data...
keyframes-dynamic.html Loading commit data...
keyframes-expected.txt Loading commit data...
keyframes-infinite-iterations-expected.txt Loading commit data...
keyframes-infinite-iterations.html Loading commit data...
keyframes-invalid-keys-expected.txt Loading commit data...
keyframes-invalid-keys.html Loading commit data...
keyframes-iteration-count-non-integer-expected.txt Loading commit data...
keyframes-iteration-count-non-integer.html Loading commit data...
keyframes-out-of-order-expected.txt Loading commit data...
keyframes-out-of-order.html Loading commit data...
keyframes-rule-expected.txt Loading commit data...
keyframes-rule.html Loading commit data...
keyframes.html Loading commit data...
lineheight-animation-expected.txt Loading commit data...
lineheight-animation.html Loading commit data...
longhand-timing-function-expected.txt Loading commit data...
longhand-timing-function.html Loading commit data...
matrix-anim-expected.txt Loading commit data...
matrix-anim.html Loading commit data...
missing-from-to-expected.txt Loading commit data...
missing-from-to-transforms-expected.txt Loading commit data...
missing-from-to-transforms.html Loading commit data...
missing-from-to.html Loading commit data...
missing-keyframe-properties-expected.txt Loading commit data...
missing-keyframe-properties-repeating-expected.txt Loading commit data...
missing-keyframe-properties-repeating.html Loading commit data...
missing-keyframe-properties-timing-function-expected.txt Loading commit data...
missing-keyframe-properties-timing-function.html Loading commit data...
missing-keyframe-properties.html Loading commit data...
missing-values-first-keyframe-expected.png Loading commit data...
missing-values-first-keyframe.html Loading commit data...
missing-values-last-keyframe-expected.png Loading commit data...
missing-values-last-keyframe.html Loading commit data...
multiple-animations-expected.txt Loading commit data...
multiple-animations-timing-function-expected.txt Loading commit data...
multiple-animations-timing-function.html Loading commit data...
multiple-animations.html Loading commit data...
multiple-keyframes-expected.txt Loading commit data...
multiple-keyframes.html Loading commit data...
negative-delay-expected.txt Loading commit data...
negative-delay.html Loading commit data...
opacity-transform-animation-expected.png Loading commit data...
opacity-transform-animation-expected.txt Loading commit data...
opacity-transform-animation.html Loading commit data...
pause-crash-expected.txt Loading commit data...
pause-crash.html Loading commit data...
play-state-expected.txt Loading commit data...
play-state-paused-expected.png Loading commit data...
play-state-paused-expected.txt Loading commit data...
play-state-paused.html Loading commit data...
play-state-suspend-expected.txt Loading commit data...
play-state-suspend.html Loading commit data...
play-state.html Loading commit data...
resume-after-page-cache-expected.txt Loading commit data...
resume-after-page-cache.html Loading commit data...
simultaneous-start-left-expected.txt Loading commit data...
simultaneous-start-left.html Loading commit data...
simultaneous-start-transform-expected.txt Loading commit data...
simultaneous-start-transform.html Loading commit data...
state-at-end-event.html Loading commit data...
stop-animation-on-suspend-expected.txt Loading commit data...
stop-animation-on-suspend.html Loading commit data...
suspend-resume-animation-events-expected.txt Loading commit data...
suspend-resume-animation-events.html Loading commit data...
suspend-resume-animation-expected.txt Loading commit data...
suspend-resume-animation.html Loading commit data...
suspend-transform-animation-expected.png Loading commit data...
suspend-transform-animation-expected.txt Loading commit data...
suspend-transform-animation.html Loading commit data...
timing-functions-expected.txt Loading commit data...
timing-functions.html Loading commit data...
transform-non-accelerated-expected.txt Loading commit data...
transform-non-accelerated.html Loading commit data...
transition-and-animation-1-expected.txt Loading commit data...
transition-and-animation-1.html Loading commit data...
transition-and-animation-2-expected.txt Loading commit data...
transition-and-animation-2.html Loading commit data...
transition-and-animation-3-expected.txt Loading commit data...
transition-and-animation-3.html Loading commit data...
unanimated-style-expected.txt Loading commit data...
unanimated-style.html Loading commit data...
width-using-ems-expected.txt Loading commit data...
width-using-ems.html Loading commit data...