Auto merge of #7898 - frewsxcv:htmlfontelement-size-attribute-setter, r=nox

Use the correct IDL setter for <font>.size

Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7898)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-07 07:04:28 -06:00
commit 60a77defe5
2 changed files with 15 additions and 2 deletions

View file

@ -20,6 +20,11 @@ var sizes = ["0", "1", "2", "3", "4", "5", "6", "7", "8"];
var testSize = function (attrValue) {
elem.setAttribute("size", attrValue);
assert_equals(elem.getAttribute("size"), attrValue);
assert_equals(elem.size, attrValue);
elem.size = attrValue;
assert_equals(elem.getAttribute("size"), attrValue);
assert_equals(elem.size, attrValue);
}
var args = [];