mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #8260 - martiansideofthemoon:my-code-fix, r=Manishearth
Implementing activation behavior for <label> Attempt to resolve #8179 @Manishearth , could you give me some resources having more information about what each function in `Activatable` does? The code compiles on my machine but I guess a lot more is needed <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8260) <!-- Reviewable:end -->
This commit is contained in:
commit
53d8f04ac4
2 changed files with 42 additions and 0 deletions
|
@ -43,6 +43,7 @@ use dom::htmlfieldsetelement::HTMLFieldSetElement;
|
|||
use dom::htmlfontelement::HTMLFontElement;
|
||||
use dom::htmliframeelement::HTMLIFrameElement;
|
||||
use dom::htmlinputelement::{HTMLInputElement, RawLayoutHTMLInputElementHelpers};
|
||||
use dom::htmllabelelement::HTMLLabelElement;
|
||||
use dom::htmllegendelement::HTMLLegendElement;
|
||||
use dom::htmloptgroupelement::HTMLOptGroupElement;
|
||||
use dom::htmltablecellelement::{HTMLTableCellElement, HTMLTableCellElementLayoutHelpers};
|
||||
|
@ -1719,6 +1720,10 @@ impl Element {
|
|||
let element = self.downcast::<HTMLAnchorElement>().unwrap();
|
||||
Some(element as &Activatable)
|
||||
},
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLLabelElement)) => {
|
||||
let element = self.downcast::<HTMLLabelElement>().unwrap();
|
||||
Some(element as &Activatable)
|
||||
},
|
||||
_ => {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue