diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 10:37:44 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 16:59:04 +0200 |
commit | 2a028f66a2e7ab56094cf856ebdc20bc49ab7d4d (patch) | |
tree | a87e4210d6aa606574dbb628a9f888ef7000e6d0 /components/script/parse/html.rs | |
parent | aa83643507c7b5022852c06826dfc1cbc48d3a6f (diff) | |
download | servo-2a028f66a2e7ab56094cf856ebdc20bc49ab7d4d.tar.gz servo-2a028f66a2e7ab56094cf856ebdc20bc49ab7d4d.zip |
Remove AttributeHandlers
On components/script/*.rs:
# Remove imports.
/^ *use dom::element::\{.*AttributeHandlers/ {
s/\{AttributeHandlers, /\{/
s/, AttributeHandlers//g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::element::\{?AttributeHandlers\}?;$/d
# Remove AttributeHandlers.
/^pub trait AttributeHandlers \{$/,/^\}$/D
# Patch AttributeHandlers methods.
/^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ {
s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/
/^ *fn /s/\(self([,)])/\(\&self\1/
/^ *fn.*\(&self/s/fn/pub fn/
}
The few error cases were then fixed by hand.
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r-- | components/script/parse/html.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs index e2a6e483ea6..a2dd0109ed1 100644 --- a/components/script/parse/html.rs +++ b/components/script/parse/html.rs @@ -18,7 +18,7 @@ use dom::comment::Comment; use dom::document::Document; use dom::document::{DocumentSource, IsHTMLDocument}; use dom::documenttype::DocumentType; -use dom::element::{Element, AttributeHandlers, ElementCreator}; +use dom::element::{Element, ElementCreator}; use dom::htmlscriptelement::HTMLScriptElement; use dom::node::{Node, NodeTypeId}; use dom::node::{document_from_node, window_from_node}; |