Bug 873222 - check unit-type of font-synthesis value before use. r=dbaron

This commit is contained in:
John Daggett 2013-06-27 14:43:00 +09:00
parent 0456f8b637
commit 59939e8ef8
3 changed files with 19 additions and 0 deletions

View File

@ -592,6 +592,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const
featureSettings.GetUnit() != eCSSUnit_Normal ||
languageOverride.GetUnit() != eCSSUnit_Normal ||
fontKerning.GetIntValue() != NS_FONT_KERNING_AUTO ||
fontSynthesis.GetUnit() != eCSSUnit_Enumerated ||
fontSynthesis.GetIntValue() !=
(NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE) ||
fontVariantAlternates.GetUnit() != eCSSUnit_Normal ||

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<script>
function boom()
{
var r = document.documentElement;
r.style.font = "170% fantasy";
r.style.fontSynthesis = "none";
r.getAttribute("style");
}
</script>
</head>
<body onload="boom();"></body>
</html>

View File

@ -94,3 +94,4 @@ load 842134.html
load 862113.html
load 867487.html
load 880862.html
load 873222.html