Skip to content
  • rwlbuis@webkit.org's avatar
    [css shapes] layout for new ellipse syntax · 4f519ba0
    rwlbuis@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=124621
    
    Source/WebCore:
    
    Reviewed by Dirk Schulze.
    
    Implement support for doing layout with the new ellipse shape syntax,
    including basic animation support.
    
    Test: fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000.html
    
    * rendering/shapes/Shape.cpp:
    (WebCore::Shape::createShape): Convert new ellipse to a layout shape.
    * rendering/style/BasicShapes.cpp:
    (WebCore::BasicShape::canBlend): Ignore ellipses with values that
        cannot be interpolated.
    (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Helper function to calculate
        either radiusX or radiusY, shared by clip-path and shape code paths.
    (WebCore::BasicShapeEllipse::path):
    * rendering/style/BasicShapes.h:
    
    LayoutTests:
    
    Add a new test for the new ellipse syntax. Also update existing shape-inside, animation, and clip-path tests to
    test the new ellipse syntax for clipping and shape-inside.
    
    Reviewed by Dirk Schulze.
    
    * animations/resources/animation-test-helpers.js:
    (parseBasicShape):
    * css3/masking/clip-path-animation-expected.txt:
    * css3/masking/clip-path-animation.html:
    * css3/masking/clip-path-ellipse.html:
    * fast/shapes/shape-inside/shape-inside-animation-expected.txt:
    * fast/shapes/shape-inside/shape-inside-animation.html:
    * fast/shapes/shape-inside/shape-inside-ellipse-padding.html:
    * fast/shapes/shape-inside/shape-inside-ellipse.html:
    * fast/shapes/shape-inside/shape-inside-empty-expected.html:
    * fast/shapes/shape-inside/shape-inside-empty.html:
    * fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
    * fast/shapes/shape-outside-floats/shape-outside-animation.html:
    * fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000-expected.html: Added.
    * fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4f519ba0