Changeset 172973 in webkit


Ignore:
Timestamp:
Aug 26, 2014 1:12:57 PM (10 years ago)
Author:
zoltan@webkit.org
Message:

[CSS Shapes] Positioned polygon reftests failing
https://bugs.webkit.org/show_bug.cgi?id=135925

Reviewed by David Hyatt.

Source/WebCore:

We didn't respect the shape-margin before a positioned polygon, since we checked
the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior,
removes the tests from the skipped list and updates 1 test, which was incorrect.

Updated existing test and removed tests from skipped list.

  • rendering/shapes/PolygonShape.cpp:

(WebCore::clippedCircleXRange):
(WebCore::PolygonShape::getExcludedInterval):

LayoutTests:

  • TestExpectations: Remove passing tests.
  • css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html: Fix test behavior.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r172961 r172973  
     12014-08-26  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Shapes] Positioned polygon reftests failing
     4        https://bugs.webkit.org/show_bug.cgi?id=135925
     5
     6        Reviewed by David Hyatt.
     7
     8        * TestExpectations: Remove passing tests.
     9        * css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html: Fix test behavior.
     10
    1112014-08-26  Commit Queue  <commit-queue@webkit.org>
    212
  • trunk/LayoutTests/TestExpectations

    r172797 r172973  
    150150webkit.org/b/135923 css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html [ ImageOnlyFailure ]
    151151
    152 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html [ ImageOnlyFailure ]
    153 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-013.html [ ImageOnlyFailure ]
    154 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-014.html [ ImageOnlyFailure ]
    155 webkit.org/b/135925 css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-015.html [ ImageOnlyFailure ]
    156 
    157152webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-010.html [ ImageOnlyFailure ]
    158153webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-011.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/css3/shapes/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html

    r172733 r172973  
    5252        #ref-2 {
    5353            top: 150px;
    54             left: 170px;
    55             width: 80px;
     54            left: 150px;
     55            width: 100px;
    5656            height: 20px;
    5757        }
     
    6767    <div id="container">
    6868        <div id="test-shape"></div>
    69         XXXXXXXXXXXX XXX XXX XXX XXX XXXXXXXX XXXXXX XXXXXX XXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX
     69        XXXXXXXXXXXX XXX XXX XXX XXX XXXXxXX XXXXXX XXXXXX XXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX
    7070    </div>
    7171    <div id="ref-1" class="ref-shape"></div>
  • trunk/Source/WebCore/ChangeLog

    r172970 r172973  
     12014-08-26  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Shapes] Positioned polygon reftests failing
     4        https://bugs.webkit.org/show_bug.cgi?id=135925
     5
     6        Reviewed by David Hyatt.
     7
     8        We didn't respect the shape-margin before a positioned polygon, since we checked
     9        the shape-margin for only 1 vertex for a polygon edge. This patch fixes the behavior,
     10        removes the tests from the skipped list and updates 1 test, which was incorrect.
     11
     12        Updated existing test and removed tests from skipped list.
     13
     14        * rendering/shapes/PolygonShape.cpp:
     15        (WebCore::clippedCircleXRange):
     16        (WebCore::PolygonShape::getExcludedInterval):
     17
    1182014-08-26  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/rendering/shapes/PolygonShape.cpp

    r172357 r172973  
    9898static FloatShapeInterval clippedCircleXRange(const FloatPoint& center, float radius, float y1, float y2)
    9999{
    100     if (y1 > center.y() + radius || y2 < center.y() - radius)
     100    if (y1 >= center.y() + radius || y2 <= center.y() - radius)
    101101        return FloatShapeInterval();
    102102
     
    141141            excludedInterval.unite(OffsetPolygonEdge(edge, inwardEdgeNormal(edge) * shapeMargin()).clippedEdgeXRange(y1, y2));
    142142            excludedInterval.unite(clippedCircleXRange(edge.vertex1(), shapeMargin(), y1, y2));
     143            excludedInterval.unite(clippedCircleXRange(edge.vertex2(), shapeMargin(), y1, y2));
    143144        }
    144145    }
Note: See TracChangeset for help on using the changeset viewer.