mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Enable real DOM inspector support.
This commit is contained in:
parent
e9c4aa534d
commit
fa57fe890b
8 changed files with 265 additions and 94 deletions
|
@ -2,6 +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 devtools_traits::AttrInfo;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
use dom::bindings::codegen::InheritTypes::NodeCast;
|
||||
|
@ -149,6 +150,7 @@ pub trait AttrHelpers {
|
|||
fn set_value(&self, set_type: AttrSettingType, value: AttrValue);
|
||||
fn value<'a>(&'a self) -> Ref<'a, AttrValue>;
|
||||
fn local_name<'a>(&'a self) -> &'a Atom;
|
||||
fn summarize(&self) -> AttrInfo;
|
||||
}
|
||||
|
||||
impl<'a> AttrHelpers for JSRef<'a, Attr> {
|
||||
|
@ -184,6 +186,14 @@ impl<'a> AttrHelpers for JSRef<'a, Attr> {
|
|||
fn local_name<'a>(&'a self) -> &'a Atom {
|
||||
&self.local_name
|
||||
}
|
||||
|
||||
fn summarize(&self) -> AttrInfo {
|
||||
AttrInfo {
|
||||
namespace: self.GetNamespaceURI().unwrap_or("".to_string()),
|
||||
name: self.Name(),
|
||||
value: self.Value(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait AttrHelpersForLayout {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue