mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1179078 - Recover from parse errors inside image values in border-image properly. r=dholbert
This commit is contained in:
parent
c77a743583
commit
10e8f744a3
8
layout/reftests/bugs/1179078-1-ref.html
Normal file
8
layout/reftests/bugs/1179078-1-ref.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
p {
|
||||
border: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, orange, blue) 1 1;
|
||||
}
|
||||
</style>
|
||||
<p>This paragraph must have an orange/blue gradient border.</p>
|
9
layout/reftests/bugs/1179078-1.html
Normal file
9
layout/reftests/bugs/1179078-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
p {
|
||||
border: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, orange, blue) 1 1;
|
||||
border-image: linear-gradient(to right, garbage) 1 1;
|
||||
}
|
||||
</style>
|
||||
<p>This paragraph must have an orange/blue gradient border.</p>
|
@ -1927,4 +1927,5 @@ skip-if(B2G||Mulet) == 1150021-1.xul 1150021-1-ref.xul
|
||||
== 1155828-1.html 1155828-1-ref.html
|
||||
== 1156129-1.html 1156129-1-ref.html
|
||||
== 1169331-1.html 1169331-1-ref.html
|
||||
== 1179078-1.html 1179078-1-ref.html
|
||||
fuzzy(1,74) == 1174332-1.html 1174332-1-ref.html
|
||||
|
@ -104,6 +104,7 @@ default-preferences pref(layout.css.variables.enabled,true)
|
||||
== variable-reference-37.html variable-reference-37-ref.html
|
||||
== variable-reference-38.html variable-reference-38-ref.html
|
||||
== variable-reference-39.html support/color-green-ref.html
|
||||
== variable-reference-40.html variable-reference-40-ref.html
|
||||
== variable-supports-01.html support/color-green-ref.html
|
||||
== variable-supports-02.html support/color-green-ref.html
|
||||
== variable-supports-03.html support/color-green-ref.html
|
||||
|
@ -0,0 +1,14 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<title>CSS Reftest Reference</title>
|
||||
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
|
||||
<style>
|
||||
p {
|
||||
border: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, orange, blue) 1 1;
|
||||
}
|
||||
</style>
|
||||
<p>This paragraph must have an orange/blue gradient border.</p>
|
@ -0,0 +1,17 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<title>CSS Test: Test that a variable reference within a gradient value in a border-image shorthand parses correctly.</title>
|
||||
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
|
||||
<link rel="help" href="http://www.w3.org/TR/css-variables-1/#using-variables">
|
||||
<link rel="match" href="variable-reference-40-ref.html">
|
||||
<style>
|
||||
p {
|
||||
--orange: orange;
|
||||
border: 2px solid transparent;
|
||||
border-image: linear-gradient(to right, var(--orange), blue) 1 1;
|
||||
}
|
||||
</style>
|
||||
<p>This paragraph must have an orange/blue gradient border.</p>
|
@ -11347,10 +11347,14 @@ CSSParserImpl::ParseBorderImage()
|
||||
nsCSSValue imageSourceValue;
|
||||
while (!CheckEndProperty()) {
|
||||
// <border-image-source>
|
||||
if (!foundSource && ParseVariant(imageSourceValue, VARIANT_IMAGE, nullptr)) {
|
||||
AppendValue(eCSSProperty_border_image_source, imageSourceValue);
|
||||
foundSource = true;
|
||||
continue;
|
||||
if (!foundSource) {
|
||||
nsAutoCSSParserInputStateRestorer stateRestorer(this);
|
||||
if (ParseVariant(imageSourceValue, VARIANT_IMAGE, nullptr)) {
|
||||
AppendValue(eCSSProperty_border_image_source, imageSourceValue);
|
||||
foundSource = true;
|
||||
stateRestorer.DoNotRestore();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// <border-image-slice>
|
||||
|
Loading…
Reference in New Issue
Block a user