mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -6,7 +6,6 @@ use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
|||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::codegen::InheritTypes::NodeCast;
|
||||
use dom::bindings::js::{RootedReference};
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::htmlheadelement::HTMLHeadElement;
|
||||
use std::borrow::ToOwned;
|
||||
use std::fs::read_dir;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue