aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-10-10 14:11:33 -0600
committerbors-servo <metajack+bors@gmail.com>2015-10-10 14:11:33 -0600
commitbabeed998d297d2d7badc06ba9c8f90e42239b4f (patch)
treeb73e20cc2110efe10a415fa253e9f1a6bbac2677 /components/script
parent04266f237a807ed3abbb678cbda0f5a8439171c7 (diff)
parent55c65d319272b84197cb80edce388fd5ae601ed8 (diff)
downloadservo-babeed998d297d2d7badc06ba9c8f90e42239b4f.tar.gz
servo-babeed998d297d2d7badc06ba9c8f90e42239b4f.zip
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 -->
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/htmldivelement.rs10
-rw-r--r--components/script/dom/webidls/HTMLDivElement.webidl2
2 files changed, 10 insertions, 2 deletions
diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs
index d5979f2c16b..b2e6a2882bf 100644
--- a/components/script/dom/htmldivelement.rs
+++ b/components/script/dom/htmldivelement.rs
@@ -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");
+}
diff --git a/components/script/dom/webidls/HTMLDivElement.webidl b/components/script/dom/webidls/HTMLDivElement.webidl
index 733561d5c39..cd86d9e9330 100644
--- a/components/script/dom/webidls/HTMLDivElement.webidl
+++ b/components/script/dom/webidls/HTMLDivElement.webidl
@@ -10,5 +10,5 @@ interface HTMLDivElement : HTMLElement {
// https://html.spec.whatwg.org/multipage/#HTMLDivElement-partial
partial interface HTMLDivElement {
- // attribute DOMString align;
+ attribute DOMString align;
};