• 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
..
animation-test-helpers.js Loading commit data...
blue-100.png Loading commit data...
dynamic-stylesheet-insertion-inserted.css Loading commit data...
dynamic-stylesheet-insertion-main.css Loading commit data...
green-100.png Loading commit data...
keyframes.css Loading commit data...
page-cache-helper.html Loading commit data...
stop-animation-on-suspend-subframe.html Loading commit data...
stripes-100.png Loading commit data...