mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
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.
This commit is contained in:
parent
aa83643507
commit
2a028f66a2
30 changed files with 48 additions and 120 deletions
|
@ -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};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue