mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
auto merge of #2087 : Ms2ger/servo/vtable2, r=jdm
Fixes #1527. Does *not* include the code for #1528. (Originally by @jdm in #1688 and #1866.)
This commit is contained in:
commit
9d2a6b7824
9 changed files with 274 additions and 148 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::HTMLElementBinding;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLElementDerived;
|
||||
use dom::bindings::js::JS;
|
||||
use dom::bindings::error::{ErrorResult, Fallible};
|
||||
|
@ -10,6 +11,7 @@ use dom::document::Document;
|
|||
use dom::element::{Element, ElementTypeId, HTMLElementTypeId};
|
||||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
use dom::node::{Node, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsval::{JSVal, NullValue};
|
||||
use servo_util::namespace;
|
||||
|
@ -161,3 +163,10 @@ impl HTMLElement {
|
|||
0
|
||||
}
|
||||
}
|
||||
|
||||
impl VirtualMethods for JS<HTMLElement> {
|
||||
fn super_type(&self) -> Option<~VirtualMethods:> {
|
||||
let element: JS<Element> = ElementCast::from(self);
|
||||
Some(~element as ~VirtualMethods:)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue