Auto merge of #7953 - frewsxcv:htmldivelement-align, r=mbrubeck

Implement 'align' attribute for <div> elements



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7953)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-10 14:11:33 -06:00
commit babeed998d
4 changed files with 10 additions and 137 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::HTMLDivElementBinding;
use dom::bindings::codegen::Bindings::HTMLDivElementBinding::{self, HTMLDivElementMethods};
use dom::bindings::codegen::InheritTypes::HTMLDivElementDerived;
use dom::bindings::js::Root;
use dom::document::Document;
@ -42,3 +42,11 @@ impl HTMLDivElement {
Node::reflect_node(box element, document, HTMLDivElementBinding::Wrap)
}
}
impl HTMLDivElementMethods for HTMLDivElement {
// https://html.spec.whatwg.org/multipage/#dom-div-align
make_getter!(Align);
// https://html.spec.whatwg.org/multipage/#dom-div-align
make_setter!(SetAlign, "align");
}

View file

@ -10,5 +10,5 @@ interface HTMLDivElement : HTMLElement {
// https://html.spec.whatwg.org/multipage/#HTMLDivElement-partial
partial interface HTMLDivElement {
// attribute DOMString align;
attribute DOMString align;
};