author Brad Werth <bwerth@mozilla.com>
Wed, 14 Mar 2018 14:21:12 -0700
changeset 787958 d6061ae7c5bf4ee928455cdb0f4678d9cf8480c2
parent 787772 723a9f786923d9d3ca265f09f4bd7900b79e19af
permissions -rw-r--r--
Bug 1265342 Part 9: Update shape-outside ellipse tests to correct invalid use of only one radius parameter. https://www.w3.org/TR/css-shapes-1/#funcdef-ellipse states that the grammar for ellipse is: ellipse() = ellipse( [<shape-radius>{2}]? [at <position>]? ) This permits either 0 or 2 shape-radius tokens, but not 1. These two tests use 1 shape-radius token and do not parse correctly. https://www.w3.org/TR/css-shapes-1/#typedef-shape-radius states that omitted shape-radius values default to closest-side. This change updates these two tests to add the closest-side value for the missing shape-radius tokens. MozReview-Commit-ID: 9UKxJel1b50

<!DOCTYPE html>
        <title>CSS Test: left float, ellipse(farthest-side) + shape-margin + content-box</title>
        <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com">
        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-ellipse">
        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property">
        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property">
        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#farthest-side">
        <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#content-box">
        <link rel="match" href="reference/shape-outside-ellipse-013-ref.html">
        <meta name="flags" content="ahem" />
        <meta name="assert" content="The test verifies that text wraps around a
                                     left float with a shape-outside defined as
                                     a ellipse from the content box with only the rx defined
                                     as farthest-side and with a shape-margin.">
    body {
        margin: 0;
    #container {
        position: relative;
    #test-container {
        font: 40px/1 Ahem, sans-serif;
        width: 300px;
        height: 200px;
        color: green;
    #test-shape {
        float: left;
        width: 130px;
        height: 130px;
        margin: 10px;
        padding: 10px;
        border: 10px solid transparent;
        shape-margin: 10px;
        shape-outside: content-box ellipse(farthest-side closest-side);
    #line {
        position: absolute;
        top: 0px;
        left: 168px;
        width: 2px;
        height: 200px;
        border-left: 2px solid blue;
    #failure {
        position: absolute;
        top: 80px;
        left: 170px;
        width: 40px;
        height: 40px;
        background-color: red;
        z-index: -1;

    <p>The test passes if there is a green square to the right of the blue line. There should be no red.</p>
    <div id="container">
        <div id="test-container">
            <div id="test-shape"></div>
        <div id="line"></div>
        <div id="failure"></div>