mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1046140 - bail if getSubpropertiesForCSSProperty param is a CSS variable. r=bz
This commit is contained in:
parent
fd4645e895
commit
aca1e4c415
@ -609,7 +609,8 @@ inDOMUtils::GetSubpropertiesForCSSProperty(const nsAString& aProperty,
|
||||
nsCSSProperty propertyID =
|
||||
nsCSSProps::LookupProperty(aProperty, nsCSSProps::eEnabledForAllContent);
|
||||
|
||||
if (propertyID == eCSSProperty_UNKNOWN) {
|
||||
if (propertyID == eCSSProperty_UNKNOWN ||
|
||||
propertyID == eCSSPropertyExtra_variable) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ support-files = bug856317.css
|
||||
[test_bug856317.html]
|
||||
[test_bug877690.html]
|
||||
[test_bug1006595.html]
|
||||
[test_bug1046140.html]
|
||||
[test_color_to_rgba.html]
|
||||
[test_css_property_is_valid.html]
|
||||
[test_get_all_style_sheets.html]
|
||||
|
34
layout/inspector/tests/test_bug1046140.html
Normal file
34
layout/inspector/tests/test_bug1046140.html
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1046140
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1046140</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
var utils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
|
||||
.getService(SpecialPowers.Ci.inIDOMUtils);
|
||||
|
||||
try {
|
||||
utils.getSubpropertiesForCSSProperty("--foo");
|
||||
ok(false, "expected an exception");
|
||||
} catch(e) {
|
||||
ok(true, "getSubpropertiesForCSSProperty throws when passed a CSS variable");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1046140">Mozilla Bug 1046140</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user