mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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
|
@ -37,7 +37,7 @@ use dom::comment::Comment;
|
|||
use dom::document::{Document, IsHTMLDocument, DocumentSource};
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::documenttype::DocumentType;
|
||||
use dom::element::{AttributeHandlers, Element, ElementCreator, ElementTypeId};
|
||||
use dom::element::{Element, ElementCreator, ElementTypeId};
|
||||
use dom::eventtarget::{EventTarget, EventTargetTypeId};
|
||||
use dom::htmlelement::HTMLElementTypeId;
|
||||
use dom::nodelist::NodeList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue