Changeset 273478 in webkit


Ignore:
Timestamp:
Feb 25, 2021 12:31:26 AM (17 months ago)
Author:
graouts@webkit.org
Message:

border-image-outset doesn't handle float values
https://bugs.webkit.org/show_bug.cgi?id=222389

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Pass an extra 28 WPT tests for border-image-outset.

  • web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt:

Source/WebCore:

We would get the int values rather than float values for the CSSValue created while parsing
the border-image-outset property.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapNinePieceImageQuad):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r273467 r273478  
     12021-02-25  Antoine Quint  <graouts@webkit.org>
     2
     3        border-image-outset doesn't handle float values
     4        https://bugs.webkit.org/show_bug.cgi?id=222389
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Pass an extra 28 WPT tests for border-image-outset.
     9
     10        * web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt:
     11
    1122021-02-24  Imanol Fernandez  <ifernandez@igalia.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt

    r272904 r273478  
    2626FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    2727PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0) should be [0]
    28 FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    29 FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     28PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
     29PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
    3030PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (1) should be [2]
    3131PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
    3232FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    3333PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0) should be [0]
    34 FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    35 FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     34PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
     35PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
    3636PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (1) should be [2]
    3737PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
    3838FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    3939PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0) should be [0]
    40 FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    41 FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     40PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
     41PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
    4242PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (1) should be [2]
    4343PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
    4444FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    4545PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0) should be [0]
    46 FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    47 FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     46PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
     47PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
    4848PASS Web Animations: property <border-image-outset> from [initial] to [2] at (1) should be [2]
    4949PASS Web Animations: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
     
    7474FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    7575PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0) should be [0]
    76 FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    77 FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     76PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
     77PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
    7878PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (1) should be [2]
    7979PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
    8080FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    8181PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0) should be [0]
    82 FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    83 FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     82PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
     83PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
    8484PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (1) should be [2]
    8585PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
    8686FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    8787PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0) should be [0]
    88 FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    89 FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     88PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
     89PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
    9090PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (1) should be [2]
    9191PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
    9292FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
    9393PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0) should be [0]
    94 FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
    95 FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
     94PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
     95PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
    9696PASS Web Animations: property <border-image-outset> from [unset] to [2] at (1) should be [2]
    9797PASS Web Animations: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
     
    122122FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
    123123PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0) should be [0]
    124 FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
    125 FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
     124PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
     125PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
    126126PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (1) should be [1]
    127 FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
     127PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
    128128FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
    129129PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0) should be [0]
    130 FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
    131 FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
     130PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
     131PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
    132132PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1) should be [1]
    133 FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
     133PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
    134134FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
    135135PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0) should be [0]
    136 FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
    137 FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
     136PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
     137PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
    138138PASS CSS Animations: property <border-image-outset> from [0] to [1] at (1) should be [1]
    139 FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
     139PASS CSS Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
    140140FAIL Web Animations: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
    141141PASS Web Animations: property <border-image-outset> from [0] to [1] at (0) should be [0]
    142 FAIL Web Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
    143 FAIL Web Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
     142PASS Web Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
     143PASS Web Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
    144144PASS Web Animations: property <border-image-outset> from [0] to [1] at (1) should be [1]
    145 FAIL Web Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
     145PASS Web Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
    146146FAIL CSS Transitions: property <border-image-outset> from [1 2 3px 4px] to [101 102 103px 104px] at (-0.3) should be [0 0 0px 0px] assert_equals: expected "0 0 0px 0px " but got "- 29 - 28 - 27px - 26px "
    147147PASS CSS Transitions: property <border-image-outset> from [1 2 3px 4px] to [101 102 103px 104px] at (0) should be [1 2 3px 4px]
  • trunk/Source/WebCore/ChangeLog

    r273477 r273478  
     12021-02-25  Antoine Quint  <graouts@webkit.org>
     2
     3        border-image-outset doesn't handle float values
     4        https://bugs.webkit.org/show_bug.cgi?id=222389
     5
     6        Reviewed by Antti Koivisto.
     7
     8        We would get the int values rather than float values for the CSSValue created while parsing
     9        the border-image-outset property.
     10
     11        * css/CSSToStyleMap.cpp:
     12        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
     13
    1142021-02-25  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Source/WebCore/css/CSSToStyleMap.cpp

    r272805 r273478  
    594594    Quad* slices = borderWidths.quadValue();
    595595    if (slices->top()->isNumber())
    596         box.top() = Length(slices->top()->intValue(), LengthType::Relative);
     596        box.top() = Length(slices->top()->floatValue(), LengthType::Relative);
    597597    else if (slices->top()->isPercentage())
    598598        box.top() = Length(slices->top()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     
    601601
    602602    if (slices->right()->isNumber())
    603         box.right() = Length(slices->right()->intValue(), LengthType::Relative);
     603        box.right() = Length(slices->right()->floatValue(), LengthType::Relative);
    604604    else if (slices->right()->isPercentage())
    605605        box.right() = Length(slices->right()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     
    608608
    609609    if (slices->bottom()->isNumber())
    610         box.bottom() = Length(slices->bottom()->intValue(), LengthType::Relative);
     610        box.bottom() = Length(slices->bottom()->floatValue(), LengthType::Relative);
    611611    else if (slices->bottom()->isPercentage())
    612612        box.bottom() = Length(slices->bottom()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     
    615615
    616616    if (slices->left()->isNumber())
    617         box.left() = Length(slices->left()->intValue(), LengthType::Relative);
     617        box.left() = Length(slices->left()->floatValue(), LengthType::Relative);
    618618    else if (slices->left()->isPercentage())
    619619        box.left() = Length(slices->left()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
Note: See TracChangeset for help on using the changeset viewer.