Commit 309dae88 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Initial value for border-outset is 0, not 0px.

Makes wpt tests for css-backgrounds pass.

Bug: 959763
Change-Id: I7baefb3697bdb66ab55baf181abd630b621fc350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906406
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754883}
parent 115ca244
......@@ -143,7 +143,7 @@ To<Longhand>(resolved_property).{{apply_call}};
{# Check for equality in case we can bail out before creating a new NinePieceImage. #}
{% if modifier_type == 'Outset' %}
if (style_building_utils::BorderImageLengthMatchesAllSides(current_image.Outset(),
BorderImageLength(Length::Fixed(0))))
BorderImageLength(0)))
return;
{% elif modifier_type == 'Repeat' %}
if (current_image.HorizontalRule() == kStretchImageRule &&
......@@ -172,7 +172,7 @@ To<Longhand>(resolved_property).{{apply_call}};
{% endif %}
NinePieceImage image(current_image);
{% if modifier_type == 'Outset' %}
image.SetOutset(Length::Fixed(0));
image.SetOutset(0);
{% elif modifier_type == 'Repeat' %}
image.SetHorizontalRule(kStretchImageRule);
image.SetVerticalRule(kStretchImageRule);
......
......@@ -64,10 +64,7 @@ NinePieceImageData::NinePieceImageData()
Length::Percent(100),
Length::Percent(100)),
border_slices(1.0, 1.0, 1.0, 1.0),
outset(Length::Fixed(0),
Length::Fixed(0),
Length::Fixed(0),
Length::Fixed(0)) {}
outset(0, 0, 0, 0) {}
bool NinePieceImageData::operator==(const NinePieceImageData& other) const {
return DataEquivalent(image, other.image) &&
......
......@@ -38,14 +38,14 @@ assertInterpolation({
assertInterpolation({
property: '-webkit-mask-box-image-outset',
from: 'initial',
to: '20px',
to: '20',
}, [
{at: -0.3, is: '0px'},
{at: 0, is: '0px'},
{at: 0.4, is: '8px'},
{at: 0.6, is: '12px'},
{at: 1, is: '20px'},
{at: 1.5, is: '30px'},
{at: -0.3, is: '0'},
{at: 0, is: '0'},
{at: 0.4, is: '8'},
{at: 0.6, is: '12'},
{at: 1, is: '20'},
{at: 1.5, is: '30'},
]);
assertInterpolation({
......@@ -64,14 +64,14 @@ assertInterpolation({
assertInterpolation({
property: '-webkit-mask-box-image-outset',
from: 'unset',
to: '20px',
to: '20',
}, [
{at: -0.3, is: '0px'},
{at: 0, is: '0px'},
{at: 0.4, is: '8px'},
{at: 0.6, is: '12px'},
{at: 1, is: '20px'},
{at: 1.5, is: '30px'},
{at: -0.3, is: '0'},
{at: 0, is: '0'},
{at: 0.4, is: '8'},
{at: 0.6, is: '12'},
{at: 1, is: '20'},
{at: 1.5, is: '30'},
]);
assertInterpolation({
......
......@@ -6,5 +6,5 @@ Test calling getPropertyValue on computed styles for -webkit-border-image proper
-webkit-box-reflect: below calc(5px) linear-gradient(white, black) 25 25 25 25 stretch stretch;
-webkit-box-reflect
getPropertyValue: below 5px linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / auto / 0px stretch
getPropertyValue: below 5px linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / auto / 0 stretch
This is a testharness.js-based test.
Found 64 tests; 63 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Property background-attachment has initial value scroll
PASS Property background-attachment does not inherit
PASS Property background-clip has initial value border-box
PASS Property background-clip does not inherit
PASS Property background-color has initial value rgba(0, 0, 0, 0)
PASS Property background-color does not inherit
PASS Property background-image has initial value none
PASS Property background-image does not inherit
PASS Property background-origin has initial value padding-box
PASS Property background-origin does not inherit
PASS Property background-position has initial value 0% 0%
PASS Property background-position does not inherit
PASS Property background-position-x has initial value 0%
PASS Property background-position-x does not inherit
PASS Property background-position-y has initial value 0%
PASS Property background-position-y does not inherit
PASS Property background-repeat has initial value repeat
PASS Property background-repeat does not inherit
PASS Property background-size has initial value auto
PASS Property background-size does not inherit
PASS Property border-bottom-color has initial value rgb(2, 3, 4)
PASS Property border-bottom-color does not inherit
PASS Property border-bottom-left-radius has initial value 0px
PASS Property border-bottom-left-radius does not inherit
PASS Property border-bottom-right-radius has initial value 0px
PASS Property border-bottom-right-radius does not inherit
PASS Property border-bottom-style has initial value none
PASS Property border-bottom-style does not inherit
PASS Property border-bottom-width has initial value 3px
PASS Property border-bottom-width does not inherit
FAIL Property border-image-outset has initial value 0 assert_equals: expected "0" but got "0px"
PASS Property border-image-outset does not inherit
PASS Property border-image-repeat has initial value stretch
PASS Property border-image-repeat does not inherit
PASS Property border-image-slice has initial value 100%
PASS Property border-image-slice does not inherit
PASS Property border-image-source has initial value none
PASS Property border-image-source does not inherit
PASS Property border-image-width has initial value 1
PASS Property border-image-width does not inherit
PASS Property border-left-color has initial value rgb(2, 3, 4)
PASS Property border-left-color does not inherit
PASS Property border-left-style has initial value none
PASS Property border-left-style does not inherit
PASS Property border-left-width has initial value 3px
PASS Property border-left-width does not inherit
PASS Property border-right-color has initial value rgb(2, 3, 4)
PASS Property border-right-color does not inherit
PASS Property border-right-style has initial value none
PASS Property border-right-style does not inherit
PASS Property border-right-width has initial value 3px
PASS Property border-right-width does not inherit
PASS Property border-top-color has initial value rgb(2, 3, 4)
PASS Property border-top-color does not inherit
PASS Property border-top-left-radius has initial value 0px
PASS Property border-top-left-radius does not inherit
PASS Property border-top-right-radius has initial value 0px
PASS Property border-top-right-radius does not inherit
PASS Property border-top-style has initial value none
PASS Property border-top-style does not inherit
PASS Property border-top-width has initial value 3px
PASS Property border-top-width does not inherit
PASS Property box-shadow has initial value none
PASS Property box-shadow does not inherit
Harness: the test ran to completion.
......@@ -22,7 +22,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
-webkit-line-clamp: none
-webkit-locale: auto
-webkit-mask-box-image: none
-webkit-mask-box-image-outset: 0px
-webkit-mask-box-image-outset: 0
-webkit-mask-box-image-repeat: stretch
-webkit-mask-box-image-slice: 0 fill
-webkit-mask-box-image-source: none
......@@ -83,7 +83,7 @@ border-bottom-right-radius: 0px
border-bottom-style: none
border-bottom-width: 0px
border-collapse: separate
border-image-outset: 0px
border-image-outset: 0
border-image-repeat: stretch
border-image-slice: 100%
border-image-source: none
......
......@@ -22,7 +22,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
-webkit-line-clamp: none
-webkit-locale: auto
-webkit-mask-box-image: none
-webkit-mask-box-image-outset: 0px
-webkit-mask-box-image-outset: 0
-webkit-mask-box-image-repeat: stretch
-webkit-mask-box-image-slice: 0 fill
-webkit-mask-box-image-source: none
......@@ -83,7 +83,7 @@ border-bottom-right-radius: 0px
border-bottom-style: none
border-bottom-width: 0px
border-collapse: separate
border-image-outset: 0px
border-image-outset: 0
border-image-repeat: stretch
border-image-slice: 100%
border-image-source: none
......
......@@ -6,17 +6,17 @@ Test calling getPropertyValue on computed styles for -webkit-border-image proper
-webkit-border-image: linear-gradient(white, black) 25 25 25 25 stretch stretch;
-webkit-border-image
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / 1 / 0px stretch
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / 1 / 0 stretch
-webkit-border-image: linear-gradient(white, black) 50 repeat;
-webkit-border-image
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 50 fill / 1 / 0px repeat
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 50 fill / 1 / 0 repeat
-webkit-border-image: linear-gradient(white, black) 25 25 25 25 / 20 20 20 20 repeat;
-webkit-border-image
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / 20 / 0px repeat
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / 20 / 0 repeat
-webkit-border-image: linear-gradient(white, black) 50 / 20 stretch stretch;
-webkit-border-image
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 50 fill / 20 / 0px stretch
getPropertyValue: linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 50 fill / 20 / 0 stretch
......@@ -14,5 +14,5 @@ Test calling getPropertyValue on computed styles for -webkit-border-image proper
-webkit-box-reflect: below 5px linear-gradient(white, black) 25 25 25 25 stretch stretch;
-webkit-box-reflect
getPropertyValue: below 5px linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / auto / 0px stretch
getPropertyValue: below 5px linear-gradient(rgb(255, 255, 255), rgb(0, 0, 0)) 25 fill / auto / 0 stretch
......@@ -33,7 +33,7 @@ color: rgb(255, 0, 0);
red - #main injected stylesheet
display: block;
block - div user agent stylesheet
-webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) 100% / 1 / 0px stretch;
-webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) 100% / 1 / 0 stretch;
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAiElEQVR42r2RsQrDMAxEBRdl8SDcX8lQPGg1GBI6lvz/h7QyRRXV0qUULwfvwZ1tenw5PxToRPWMC52eA9+WDnlh3HFQ/xBQl86NFYJqeGflkiogrOvVlIFhqURFVho3x1moGAa3deMs+LS30CAhBN5nNxeT5hbJ1zwmji2k+aF6NENIPf/hs54f0sZFUVAMigAAAABJRU5ErkJggg==) - #main injected stylesheet
[expanded]
element.style { ()
......
......@@ -22,7 +22,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
-webkit-line-clamp: none
-webkit-locale: auto
-webkit-mask-box-image: none
-webkit-mask-box-image-outset: 0px
-webkit-mask-box-image-outset: 0
-webkit-mask-box-image-repeat: stretch
-webkit-mask-box-image-slice: 0 fill
-webkit-mask-box-image-source: none
......@@ -83,7 +83,7 @@ border-bottom-right-radius: 0px
border-bottom-style: none
border-bottom-width: 0px
border-collapse: separate
border-image-outset: 0px
border-image-outset: 0
border-image-repeat: stretch
border-image-slice: 100%
border-image-source: none
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment