mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #10535 - frewsxcv:hr-align, r=mbrubeck
Implement 'align' IDL attribute on '<hr>'. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10535) <!-- Reviewable:end -->
This commit is contained in:
commit
f9608022ca
7 changed files with 87 additions and 136 deletions
|
@ -37,6 +37,12 @@ impl HTMLHRElement {
|
|||
}
|
||||
|
||||
impl HTMLHRElementMethods for HTMLHRElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-hr-align
|
||||
make_getter!(Align, "align");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-hr-align
|
||||
make_atomic_setter!(SetAlign, "align");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-hr-color
|
||||
make_getter!(Color, "color");
|
||||
|
||||
|
@ -86,6 +92,7 @@ impl VirtualMethods for HTMLHRElement {
|
|||
|
||||
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&atom!("align") => AttrValue::from_dimension(value),
|
||||
&atom!("color") => AttrValue::from_legacy_color(value),
|
||||
&atom!("width") => AttrValue::from_dimension(value),
|
||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||
|
|
|
@ -10,7 +10,7 @@ interface HTMLHRElement : HTMLElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#HTMLHRElement-partial
|
||||
partial interface HTMLHRElement {
|
||||
// attribute DOMString align;
|
||||
attribute DOMString align;
|
||||
attribute DOMString color;
|
||||
// attribute boolean noShade;
|
||||
// attribute DOMString size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue