Changeset 259562 in webkit


Ignore:
Timestamp:
Apr 5, 2020 9:14:17 PM (4 years ago)
Author:
Manuel Rego Casasnovas
Message:

Computed style for "outline-offset" is wrong when "outline-style" is "none"
https://bugs.webkit.org/show_bug.cgi?id=209913

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Imported css/css-ui/parsing/outline-offset-computed.html from WPT.
And update baselines for web-animations tests.

  • web-platform-tests/css/css-ui/parsing/outline-offset-computed-expected.txt: Added.
  • web-platform-tests/css/css-ui/parsing/outline-offset-computed.html: Added.
  • web-platform-tests/css/css-ui/parsing/w3c-import.log:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:

Source/WebCore:

Computed style for outline-offset was not returning the proper value
if "outline-style" was "none".
This was due to a check in RenderStyle::outlineOffset()
that this patch removes.

This code could be there because this is needed for "outline-width"
as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
however there's nothing about this on the "outline-offset" property.

Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::outlineOffset const):

LayoutTests:

Update baselines for web-animations tests.

  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
Location:
trunk
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259546 r259562  
     12020-04-05  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        Computed style for "outline-offset" is wrong when "outline-style" is "none"
     4        https://bugs.webkit.org/show_bug.cgi?id=209913
     5
     6        Reviewed by Daniel Bates.
     7
     8        Update baselines for web-animations tests.
     9
     10        * platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
     11        * platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
     12        * platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
     13
    1142020-04-05  Alexey Shvayka  <shvaikalesh@gmail.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r259532 r259562  
     12020-04-05  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        Computed style for "outline-offset" is wrong when "outline-style" is "none"
     4        https://bugs.webkit.org/show_bug.cgi?id=209913
     5
     6        Reviewed by Daniel Bates.
     7
     8        Imported css/css-ui/parsing/outline-offset-computed.html from WPT.
     9        And update baselines for web-animations tests.
     10
     11        * web-platform-tests/css/css-ui/parsing/outline-offset-computed-expected.txt: Added.
     12        * web-platform-tests/css/css-ui/parsing/outline-offset-computed.html: Added.
     13        * web-platform-tests/css/css-ui/parsing/w3c-import.log:
     14        * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
     15        * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
     16        * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
     17
    1182020-04-04  Antti Koivisto  <antti@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/w3c-import.log

    r232903 r259562  
    2525/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/outline-color-valid-optional.html
    2626/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/outline-invalid.html
     27/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html
    2728/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-invalid.html
    2829/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-valid.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt

    r251591 r259562  
    156156FAIL outline-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
    157157PASS outline-offset (type: length) has testAccumulation function
    158 FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
    159 FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
     158FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     159FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    160160PASS outline-width (type: length) has testAccumulation function
    161161FAIL outline-width: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt

    r251591 r259562  
    156156FAIL outline-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
    157157PASS outline-offset (type: length) has testAddition function
    158 FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
    159 FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
     158FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     159FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    160160PASS outline-width (type: length) has testAddition function
    161161FAIL outline-width: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt

    r252598 r259562  
    182182PASS outline-color supports animating as color of hsla()
    183183PASS outline-offset (type: length) has testInterpolation function
    184 FAIL outline-offset supports animating as a length assert_equals: The value should be 30px at 500ms expected "30px" but got "0px"
    185 FAIL outline-offset supports animating as a length of rem assert_equals: The value should be 30px at 500ms expected "30px" but got "0px"
     184PASS outline-offset supports animating as a length
     185PASS outline-offset supports animating as a length of rem
    186186PASS outline-width (type: length) has testInterpolation function
    187187PASS outline-width supports animating as a length
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt

    r251591 r259562  
    156156FAIL outline-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
    157157PASS outline-offset (type: length) has testAccumulation function
    158 FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
    159 FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
     158FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     159FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    160160PASS outline-width (type: length) has testAccumulation function
    161161FAIL outline-width: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt

    r251591 r259562  
    156156FAIL outline-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
    157157PASS outline-offset (type: length) has testAddition function
    158 FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
    159 FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "0px"
     158FAIL outline-offset: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
     159FAIL outline-offset: length of rem assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
    160160PASS outline-width (type: length) has testAddition function
    161161FAIL outline-width: length assert_equals: The value should be 20px at 0ms expected "20px" but got "10px"
  • trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt

    r252598 r259562  
    182182PASS outline-color supports animating as color of hsla()
    183183PASS outline-offset (type: length) has testInterpolation function
    184 FAIL outline-offset supports animating as a length assert_equals: The value should be 30px at 500ms expected "30px" but got "0px"
    185 FAIL outline-offset supports animating as a length of rem assert_equals: The value should be 30px at 500ms expected "30px" but got "0px"
     184PASS outline-offset supports animating as a length
     185PASS outline-offset supports animating as a length of rem
    186186PASS outline-width (type: length) has testInterpolation function
    187187PASS outline-width supports animating as a length
  • trunk/Source/WebCore/ChangeLog

    r259561 r259562  
     12020-04-05  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        Computed style for "outline-offset" is wrong when "outline-style" is "none"
     4        https://bugs.webkit.org/show_bug.cgi?id=209913
     5
     6        Reviewed by Daniel Bates.
     7
     8        Computed style for outline-offset was not returning the proper value
     9        if "outline-style" was "none".
     10        This was due to a check in RenderStyle::outlineOffset()
     11        that this patch removes.
     12
     13        This code could be there because this is needed for "outline-width"
     14        as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
     15        however there's nothing about this on the "outline-offset" property.
     16
     17        Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html
     18
     19        * rendering/style/RenderStyle.cpp:
     20        (WebCore::RenderStyle::outlineOffset const):
     21
    1222020-04-05  Peng Liu  <peng.liu6@apple.com>
    223
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r259532 r259562  
    24542454float RenderStyle::outlineOffset() const
    24552455{
    2456     if (m_backgroundData->outline.style() == BorderStyle::None)
    2457         return 0;
    24582456    if (outlineStyleIsAuto() == OutlineIsAuto::On)
    24592457        return (m_backgroundData->outline.offset() + RenderTheme::platformFocusRingOffset(outlineWidth()));
Note: See TracChangeset for help on using the changeset viewer.