servo: Merge #13307 - Code refactoring (from bubbles231:code_refactor); r=Manishearth
authorArthur Marble <arthur@info9.net>
Sun, 18 Sep 2016 22:57:59 -0500
changeset 339701 dbcf032de5c6dbd4334f11a3da2d7dcec501d478
parent 339700 dc8ec4e4eb1a7588fe04dc053540fa2a1e4b67e2
child 339702 1dcc510b1d608e05e667a31a2f41282fda18cf9d
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersManishearth
servo: Merge #13307 - Code refactoring (from bubbles231:code_refactor); r=Manishearth <!-- Please describe your changes on the following line: --> The code was refactored to follow Rust naming conventions better. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes help fix #12379. <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because logic was not changed. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 5457b80233f9ce6773711c7189230d9a0a63d93a
servo/components/script/dom/activation.rs
servo/components/script/dom/blob.rs
servo/components/script/dom/bluetoothadvertisingdata.rs
servo/components/script/dom/bluetoothcharacteristicproperties.rs
servo/components/script/dom/bluetoothdevice.rs
servo/components/script/dom/bluetoothremotegattcharacteristic.rs
servo/components/script/dom/bluetoothremotegattdescriptor.rs
servo/components/script/dom/bluetoothremotegattservice.rs
servo/components/script/dom/canvasrenderingcontext2d.rs
servo/components/script/dom/closeevent.rs
servo/components/script/dom/console.rs
servo/components/script/dom/document.rs
servo/components/script/dom/file.rs
servo/components/script/dom/htmlanchorelement.rs
servo/components/script/dom/htmlappletelement.rs
servo/components/script/dom/htmlareaelement.rs
servo/components/script/dom/htmlaudioelement.rs
servo/components/script/dom/htmlbaseelement.rs
servo/components/script/dom/htmlbodyelement.rs
servo/components/script/dom/htmlbrelement.rs
servo/components/script/dom/htmlbuttonelement.rs
servo/components/script/dom/htmlcanvaselement.rs
servo/components/script/dom/htmldataelement.rs
servo/components/script/dom/htmldatalistelement.rs
servo/components/script/dom/htmldetailselement.rs
servo/components/script/dom/htmldialogelement.rs
servo/components/script/dom/htmldirectoryelement.rs
servo/components/script/dom/htmldivelement.rs
servo/components/script/dom/htmldlistelement.rs
servo/components/script/dom/htmlelement.rs
servo/components/script/dom/htmlembedelement.rs
servo/components/script/dom/htmlfieldsetelement.rs
servo/components/script/dom/htmlfontelement.rs
servo/components/script/dom/htmlformelement.rs
servo/components/script/dom/htmlframeelement.rs
servo/components/script/dom/htmlframesetelement.rs
servo/components/script/dom/htmlheadelement.rs
servo/components/script/dom/htmlheadingelement.rs
servo/components/script/dom/htmlhrelement.rs
servo/components/script/dom/htmliframeelement.rs
servo/components/script/dom/htmlimageelement.rs
servo/components/script/dom/htmlinputelement.rs
servo/components/script/dom/htmllabelelement.rs
servo/components/script/dom/htmllegendelement.rs
servo/components/script/dom/htmllielement.rs
servo/components/script/dom/htmllinkelement.rs
servo/components/script/dom/htmlmapelement.rs
servo/components/script/dom/htmlmetaelement.rs
servo/components/script/dom/htmlmeterelement.rs
servo/components/script/dom/htmlmodelement.rs
servo/components/script/dom/htmlobjectelement.rs
servo/components/script/dom/htmlolistelement.rs
servo/components/script/dom/htmloptgroupelement.rs
servo/components/script/dom/htmloptionelement.rs
servo/components/script/dom/htmloutputelement.rs
servo/components/script/dom/htmlparagraphelement.rs
servo/components/script/dom/htmlparamelement.rs
servo/components/script/dom/htmlpreelement.rs
servo/components/script/dom/htmlprogresselement.rs
servo/components/script/dom/htmlquoteelement.rs
servo/components/script/dom/htmlscriptelement.rs
servo/components/script/dom/htmlselectelement.rs
servo/components/script/dom/htmlsourceelement.rs
servo/components/script/dom/htmlspanelement.rs
servo/components/script/dom/htmlstyleelement.rs
servo/components/script/dom/htmltablecaptionelement.rs
servo/components/script/dom/htmltablecolelement.rs
servo/components/script/dom/htmltabledatacellelement.rs
servo/components/script/dom/htmltableelement.rs
servo/components/script/dom/htmltableheadercellelement.rs
servo/components/script/dom/htmltablerowelement.rs
servo/components/script/dom/htmltablesectionelement.rs
servo/components/script/dom/htmltemplateelement.rs
servo/components/script/dom/htmltextareaelement.rs
servo/components/script/dom/htmltimeelement.rs
servo/components/script/dom/htmltitleelement.rs
servo/components/script/dom/htmltrackelement.rs
servo/components/script/dom/htmlulistelement.rs
servo/components/script/dom/htmlunknownelement.rs
servo/components/script/dom/htmlvideoelement.rs
servo/components/script/dom/keyboardevent.rs
servo/components/script/dom/mouseevent.rs
servo/components/script/dom/navigator.rs
servo/components/script/dom/node.rs
servo/components/script/dom/performance.rs
servo/components/script/dom/performancetiming.rs
servo/components/script/dom/storageevent.rs
servo/components/script/dom/touchevent.rs
servo/components/script/dom/urlhelper.rs
servo/components/script/script_runtime.rs
--- a/servo/components/script/dom/activation.rs
+++ b/servo/components/script/dom/activation.rs
@@ -26,17 +26,17 @@ pub trait Activatable {
 
     // https://html.spec.whatwg.org/multipage/#run-canceled-activation-steps
     fn canceled_activation(&self);
 
     // https://html.spec.whatwg.org/multipage/#run-post-click-activation-steps
     fn activation_behavior(&self, event: &Event, target: &EventTarget);
 
     // https://html.spec.whatwg.org/multipage/#implicit-submission
-    fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool);
+    fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, meta_key: bool);
 
     // https://html.spec.whatwg.org/multipage/#concept-selector-active
     fn enter_formal_activation_state(&self) {
         self.as_element().set_active_state(true);
 
         let win = window_from_node(self.as_element());
         win.reflow(ReflowGoal::ForDisplay,
                    ReflowQueryType::NoQuery,
@@ -57,20 +57,20 @@ pub trait Activatable {
 #[derive(PartialEq)]
 pub enum ActivationSource {
     FromClick,
     NotFromClick,
 }
 
 // https://html.spec.whatwg.org/multipage/#run-synthetic-click-activation-steps
 pub fn synthetic_click_activation(element: &Element,
-                                  ctrlKey: bool,
-                                  shiftKey: bool,
-                                  altKey: bool,
-                                  metaKey: bool,
+                                  ctrl_key: bool,
+                                  shift_key: bool,
+                                  alt_key: bool,
+                                  meta_key: bool,
                                   source: ActivationSource) {
     // Step 1
     if element.click_in_progress() {
         return;
     }
     // Step 2
     element.set_click_in_progress(true);
     // Step 3
@@ -88,20 +88,20 @@ pub fn synthetic_click_activation(elemen
                                 EventBubbles::DoesNotBubble,
                                 EventCancelable::NotCancelable,
                                 Some(win.r()),
                                 1,
                                 0,
                                 0,
                                 0,
                                 0,
-                                ctrlKey,
-                                shiftKey,
-                                altKey,
-                                metaKey,
+                                ctrl_key,
+                                shift_key,
+                                alt_key,
+                                meta_key,
                                 0,
                                 None);
     let event = mouse.upcast::<Event>();
     if source == ActivationSource::FromClick {
         event.set_trusted(false);
     }
     target.dispatch_event(event);
 
--- a/servo/components/script/dom/blob.rs
+++ b/servo/components/script/dom/blob.rs
@@ -68,59 +68,59 @@ impl BlobImpl {
 
 // https://w3c.github.io/FileAPI/#blob
 #[dom_struct]
 pub struct Blob {
     reflector_: Reflector,
     #[ignore_heap_size_of = "No clear owner"]
     blob_impl: DOMRefCell<BlobImpl>,
     /// content-type string
-    typeString: String,
-    isClosed_: Cell<bool>,
+    type_string: String,
+    is_closed: Cell<bool>,
 }
 
 impl Blob {
     #[allow(unrooted_must_root)]
     pub fn new(global: GlobalRef, blob_impl: BlobImpl, typeString: String) -> Root<Blob> {
         let boxed_blob = box Blob::new_inherited(blob_impl, typeString);
         reflect_dom_object(boxed_blob, global, BlobBinding::Wrap)
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new_inherited(blob_impl: BlobImpl, typeString: String) -> Blob {
+    pub fn new_inherited(blob_impl: BlobImpl, type_string: String) -> Blob {
         Blob {
             reflector_: Reflector::new(),
             blob_impl: DOMRefCell::new(blob_impl),
             // NOTE: Guarding the format correctness here,
             // https://w3c.github.io/FileAPI/#dfn-type
-            typeString: normalize_type_string(&typeString),
-            isClosed_: Cell::new(false),
+            type_string: normalize_type_string(&type_string),
+            is_closed: Cell::new(false),
         }
     }
 
     #[allow(unrooted_must_root)]
     fn new_sliced(parent: &Blob, rel_pos: RelativePos,
-                  relativeContentType: DOMString) -> Root<Blob> {
+                  relative_content_type: DOMString) -> Root<Blob> {
         let global = parent.global();
         let blob_impl = match *parent.blob_impl.borrow() {
             BlobImpl::File(_) => {
                 // Create new parent node
                 BlobImpl::Sliced(JS::from_ref(parent), rel_pos)
             }
             BlobImpl::Memory(_) => {
                 // Create new parent node
                 BlobImpl::Sliced(JS::from_ref(parent), rel_pos)
             }
             BlobImpl::Sliced(ref grandparent, ref old_rel_pos) => {
                 // Adjust the slicing position, using same parent
                 BlobImpl::Sliced(grandparent.clone(), old_rel_pos.slice_inner(&rel_pos))
             }
         };
 
-        Blob::new(global.r(), blob_impl, relativeContentType.into())
+        Blob::new(global.r(), blob_impl, relative_content_type.into())
     }
 
     // https://w3c.github.io/FileAPI/#constructorBlob
     pub fn Constructor(global: GlobalRef,
                        blobParts: Option<Vec<BlobOrString>>,
                        blobPropertyBag: &BlobBinding::BlobPropertyBag)
                        -> Fallible<Root<Blob>> {
         // TODO: accept other blobParts types - ArrayBuffer or ArrayBufferView
@@ -217,17 +217,17 @@ impl Blob {
             BlobImpl::Memory(ref mut bytes_in) => mem::swap(bytes_in, &mut bytes),
         };
 
         let global = self.global();
         let origin = get_blob_origin(&global.r().get_url());
 
         let blob_buf = BlobBuf {
             filename: None,
-            type_string: self.typeString.clone(),
+            type_string: self.type_string.clone(),
             size: bytes.len() as u64,
             bytes: bytes.to_vec(),
         };
 
         let (tx, rx) = ipc::channel().unwrap();
         let msg = FileManagerThreadMsg::PromoteMemory(blob_buf, set_valid, tx, origin.clone());
         self.send_to_file_manager(msg);
 
@@ -361,43 +361,43 @@ impl BlobMethods for Blob {
             BlobImpl::Memory(ref v) => v.len() as u64,
             BlobImpl::Sliced(ref parent, ref rel_pos) =>
                 rel_pos.to_abs_range(parent.Size() as usize).len() as u64,
          }
     }
 
     // https://w3c.github.io/FileAPI/#dfn-type
     fn Type(&self) -> DOMString {
-        DOMString::from(self.typeString.clone())
+        DOMString::from(self.type_string.clone())
     }
 
     // https://w3c.github.io/FileAPI/#slice-method-algo
     fn Slice(&self,
              start: Option<i64>,
              end: Option<i64>,
-             contentType: Option<DOMString>)
+             content_type: Option<DOMString>)
              -> Root<Blob> {
         let rel_pos = RelativePos::from_opts(start, end);
-        Blob::new_sliced(self, rel_pos, contentType.unwrap_or(DOMString::from("")))
+        Blob::new_sliced(self, rel_pos, content_type.unwrap_or(DOMString::from("")))
     }
 
     // https://w3c.github.io/FileAPI/#dfn-isClosed
     fn IsClosed(&self) -> bool {
-        self.isClosed_.get()
+        self.is_closed.get()
     }
 
     // https://w3c.github.io/FileAPI/#dfn-close
     fn Close(&self) {
         // Step 1
-        if self.isClosed_.get() {
+        if self.is_closed.get() {
             return;
         }
 
         // Step 2
-        self.isClosed_.set(true);
+        self.is_closed.set(true);
 
         // Step 3
         self.clean_up_file_resource();
     }
 }
 
 /// Get the normalized, MIME-parsable type string
 /// https://w3c.github.io/FileAPI/#dfn-type
--- a/servo/components/script/dom/bluetoothadvertisingdata.rs
+++ b/servo/components/script/dom/bluetoothadvertisingdata.rs
@@ -8,29 +8,29 @@ use dom::bindings::global::GlobalRef;
 use dom::bindings::js::Root;
 use dom::bindings::reflector::{Reflector, reflect_dom_object};
 
 // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothadvertisingdata
 #[dom_struct]
 pub struct BluetoothAdvertisingData {
     reflector_: Reflector,
     appearance: Option<u16>,
-    txPower: Option<i8>,
+    tx_power: Option<i8>,
     rssi: Option<i8>,
 }
 
 impl BluetoothAdvertisingData {
     pub fn new_inherited(appearance: Option<u16>,
-                         txPower: Option<i8>,
+                         tx_power: Option<i8>,
                          rssi: Option<i8>)
                          -> BluetoothAdvertisingData {
         BluetoothAdvertisingData {
             reflector_: Reflector::new(),
             appearance: appearance,
-            txPower: txPower,
+            tx_power: tx_power,
             rssi: rssi,
         }
     }
 
     pub fn new(global: GlobalRef,
                appearance: Option<u16>,
                txPower: Option<i8>,
                rssi: Option<i8>)
@@ -46,16 +46,16 @@ impl BluetoothAdvertisingData {
 impl BluetoothAdvertisingDataMethods for BluetoothAdvertisingData {
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingdata-appearance
     fn GetAppearance(&self) -> Option<u16> {
         self.appearance
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingdata-txpower
     fn GetTxPower(&self) -> Option<i8> {
-        self.txPower
+        self.tx_power
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingdata-rssi
     fn GetRssi(&self) -> Option<i8> {
         self.rssi
     }
 }
--- a/servo/components/script/dom/bluetoothcharacteristicproperties.rs
+++ b/servo/components/script/dom/bluetoothcharacteristicproperties.rs
@@ -10,47 +10,47 @@ use dom::bindings::js::Root;
 use dom::bindings::reflector::{Reflector, reflect_dom_object};
 
 // https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
  #[dom_struct]
 pub struct BluetoothCharacteristicProperties {
     reflector_: Reflector,
     broadcast: bool,
     read: bool,
-    writeWithoutResponse: bool,
+    write_without_response: bool,
     write: bool,
     notify: bool,
     indicate: bool,
-    authenticatedSignedWrites: bool,
-    reliableWrite: bool,
-    writableAuxiliaries: bool,
+    authenticated_signed_writes: bool,
+    reliable_write: bool,
+    writable_auxiliaries: bool,
 }
 
 impl BluetoothCharacteristicProperties {
     pub fn new_inherited(broadcast: bool,
                          read: bool,
-                         writeWithoutResponse: bool,
+                         write_without_response: bool,
                          write: bool,
                          notify: bool,
                          indicate: bool,
-                         authenticatedSignedWrites: bool,
-                         reliableWrite: bool,
-                         writableAuxiliaries: bool)
+                         authenticated_signed_writes: bool,
+                         reliable_write: bool,
+                         writable_auxiliaries: bool)
                          -> BluetoothCharacteristicProperties {
         BluetoothCharacteristicProperties {
             reflector_: Reflector::new(),
             broadcast: broadcast,
             read: read,
-            writeWithoutResponse: writeWithoutResponse,
+            write_without_response: write_without_response,
             write: write,
             notify: notify,
             indicate: indicate,
-            authenticatedSignedWrites: authenticatedSignedWrites,
-            reliableWrite: reliableWrite,
-            writableAuxiliaries: writableAuxiliaries,
+            authenticated_signed_writes: authenticated_signed_writes,
+            reliable_write: reliable_write,
+            writable_auxiliaries: writable_auxiliaries,
         }
     }
 
     pub fn new(global: GlobalRef,
                broadcast: bool,
                read: bool,
                writeWithoutResponse: bool,
                write: bool,
@@ -82,17 +82,17 @@ impl BluetoothCharacteristicPropertiesMe
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-read
     fn Read(&self) -> bool {
         self.read
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-writewithoutresponse
     fn WriteWithoutResponse(&self) -> bool {
-        self.writeWithoutResponse
+        self.write_without_response
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-write
     fn Write(&self) -> bool {
         self.write
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-notify
@@ -102,21 +102,21 @@ impl BluetoothCharacteristicPropertiesMe
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-indicate
     fn Indicate(&self) -> bool {
         self.indicate
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-authenticatedsignedwrites
     fn AuthenticatedSignedWrites(&self) -> bool {
-        self.authenticatedSignedWrites
+        self.authenticated_signed_writes
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-reliablewrite
     fn ReliableWrite(&self) -> bool {
-        self.reliableWrite
+        self.reliable_write
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothcharacteristicproperties-writableauxiliaries
     fn WritableAuxiliaries(&self) -> bool {
-        self.writableAuxiliaries
+        self.writable_auxiliaries
     }
 }
--- a/servo/components/script/dom/bluetoothdevice.rs
+++ b/servo/components/script/dom/bluetoothdevice.rs
@@ -12,30 +12,30 @@ use dom::bluetoothadvertisingdata::Bluet
 use dom::bluetoothremotegattserver::BluetoothRemoteGATTServer;
 
 // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice
 #[dom_struct]
 pub struct BluetoothDevice {
     reflector_: Reflector,
     id: DOMString,
     name: Option<DOMString>,
-    adData: MutHeap<JS<BluetoothAdvertisingData>>,
+    ad_data: MutHeap<JS<BluetoothAdvertisingData>>,
     gatt: MutNullableHeap<JS<BluetoothRemoteGATTServer>>,
 }
 
 impl BluetoothDevice {
     pub fn new_inherited(id: DOMString,
                          name: Option<DOMString>,
-                         adData: &BluetoothAdvertisingData)
+                         ad_data: &BluetoothAdvertisingData)
                          -> BluetoothDevice {
         BluetoothDevice {
             reflector_: Reflector::new(),
             id: id,
             name: name,
-            adData: MutHeap::new(adData),
+            ad_data: MutHeap::new(ad_data),
             gatt: Default::default(),
         }
     }
 
     pub fn new(global: GlobalRef,
                id: DOMString,
                name: Option<DOMString>,
                adData: &BluetoothAdvertisingData)
@@ -56,16 +56,16 @@ impl BluetoothDeviceMethods for Bluetoot
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-name
     fn GetName(&self) -> Option<DOMString> {
         self.name.clone()
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-addata
     fn AdData(&self) -> Root<BluetoothAdvertisingData> {
-        self.adData.get()
+        self.ad_data.get()
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-gatt
     fn Gatt(&self) -> Root<BluetoothRemoteGATTServer> {
         self.gatt.or_init(|| BluetoothRemoteGATTServer::new(self.global().r(), self))
     }
 }
--- a/servo/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/servo/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -32,32 +32,32 @@ pub const MAXIMUM_ATTRIBUTE_LENGTH: usiz
 // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
 #[dom_struct]
 pub struct BluetoothRemoteGATTCharacteristic {
     reflector_: Reflector,
     service: MutHeap<JS<BluetoothRemoteGATTService>>,
     uuid: DOMString,
     properties: MutHeap<JS<BluetoothCharacteristicProperties>>,
     value: DOMRefCell<Option<ByteString>>,
-    instanceID: String,
+    instance_id: String,
 }
 
 impl BluetoothRemoteGATTCharacteristic {
     pub fn new_inherited(service: &BluetoothRemoteGATTService,
                          uuid: DOMString,
                          properties: &BluetoothCharacteristicProperties,
-                         instanceID: String)
+                         instance_id: String)
                          -> BluetoothRemoteGATTCharacteristic {
         BluetoothRemoteGATTCharacteristic {
             reflector_: Reflector::new(),
             service: MutHeap::new(service),
             uuid: uuid,
             properties: MutHeap::new(properties),
             value: DOMRefCell::new(None),
-            instanceID: instanceID,
+            instance_id: instance_id,
         }
     }
 
     pub fn new(global: GlobalRef,
                service: &BluetoothRemoteGATTService,
                uuid: DOMString,
                properties: &BluetoothCharacteristicProperties,
                instanceID: String)
@@ -72,17 +72,17 @@ impl BluetoothRemoteGATTCharacteristic {
 
     fn get_bluetooth_thread(&self) -> IpcSender<BluetoothMethodMsg> {
         let global_root = self.global();
         let global_ref = global_root.r();
         global_ref.as_window().bluetooth_thread()
     }
 
     fn get_instance_id(&self) -> String {
-        self.instanceID.clone()
+        self.instance_id.clone()
     }
 }
 
 impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteristic {
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-properties
     fn Properties(&self) -> Root<BluetoothCharacteristicProperties> {
         self.properties.get()
     }
--- a/servo/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/servo/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -23,30 +23,30 @@ use net_traits::bluetooth_thread::Blueto
 
 // http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
 #[dom_struct]
 pub struct BluetoothRemoteGATTDescriptor {
     reflector_: Reflector,
     characteristic: MutHeap<JS<BluetoothRemoteGATTCharacteristic>>,
     uuid: DOMString,
     value: DOMRefCell<Option<ByteString>>,
-    instanceID: String,
+    instance_id: String,
 }
 
 impl BluetoothRemoteGATTDescriptor {
     pub fn new_inherited(characteristic: &BluetoothRemoteGATTCharacteristic,
                          uuid: DOMString,
-                         instanceID: String)
+                         instance_id: String)
                          -> BluetoothRemoteGATTDescriptor {
         BluetoothRemoteGATTDescriptor {
             reflector_: Reflector::new(),
             characteristic: MutHeap::new(characteristic),
             uuid: uuid,
             value: DOMRefCell::new(None),
-            instanceID: instanceID,
+            instance_id: instance_id,
         }
     }
 
     pub fn new(global: GlobalRef,
                characteristic: &BluetoothRemoteGATTCharacteristic,
                uuid: DOMString,
                instanceID: String)
                -> Root<BluetoothRemoteGATTDescriptor>{
@@ -59,17 +59,17 @@ impl BluetoothRemoteGATTDescriptor {
 
     fn get_bluetooth_thread(&self) -> IpcSender<BluetoothMethodMsg> {
         let global_root = self.global();
         let global_ref = global_root.r();
         global_ref.as_window().bluetooth_thread()
     }
 
     fn get_instance_id(&self) -> String {
-        self.instanceID.clone()
+        self.instance_id.clone()
     }
 }
 
 impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-characteristic
     fn Characteristic(&self) -> Root<BluetoothRemoteGATTCharacteristic> {
        self.characteristic.get()
     }
--- a/servo/components/script/dom/bluetoothremotegattservice.rs
+++ b/servo/components/script/dom/bluetoothremotegattservice.rs
@@ -19,32 +19,32 @@ use ipc_channel::ipc::{self, IpcSender};
 use net_traits::bluetooth_thread::BluetoothMethodMsg;
 
 // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
 #[dom_struct]
 pub struct BluetoothRemoteGATTService {
     reflector_: Reflector,
     device: MutHeap<JS<BluetoothDevice>>,
     uuid: DOMString,
-    isPrimary: bool,
-    instanceID: String,
+    is_primary: bool,
+    instance_id: String,
 }
 
 impl BluetoothRemoteGATTService {
     pub fn new_inherited(device: &BluetoothDevice,
                          uuid: DOMString,
-                         isPrimary: bool,
-                         instanceID: String)
+                         is_primary: bool,
+                         instance_id: String)
                          -> BluetoothRemoteGATTService {
         BluetoothRemoteGATTService {
             reflector_: Reflector::new(),
             device: MutHeap::new(device),
             uuid: uuid,
-            isPrimary: isPrimary,
-            instanceID: instanceID,
+            is_primary: is_primary,
+            instance_id: instance_id,
         }
     }
 
     pub fn new(global: GlobalRef,
                device: &BluetoothDevice,
                uuid: DOMString,
                isPrimary: bool,
                instanceID: String)
@@ -59,29 +59,29 @@ impl BluetoothRemoteGATTService {
 
     fn get_bluetooth_thread(&self) -> IpcSender<BluetoothMethodMsg> {
         let global_root = self.global();
         let global_ref = global_root.r();
         global_ref.as_window().bluetooth_thread()
     }
 
     fn get_instance_id(&self) -> String {
-        self.instanceID.clone()
+        self.instance_id.clone()
     }
 }
 
 impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-device
     fn Device(&self) -> Root<BluetoothDevice> {
         self.device.get()
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-isprimary
     fn IsPrimary(&self) -> bool {
-        self.isPrimary
+        self.is_primary
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-uuid
     fn Uuid(&self) -> DOMString {
         self.uuid.clone()
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-getcharacteristic
--- a/servo/components/script/dom/canvasrenderingcontext2d.rs
+++ b/servo/components/script/dom/canvasrenderingcontext2d.rs
@@ -1091,26 +1091,26 @@ impl CanvasRenderingContext2DMethods for
                            Finite::wrap(imagedata.Height() as f64))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-context-2d-putimagedata
     fn PutImageData_(&self,
                      imagedata: &ImageData,
                      dx: Finite<f64>,
                      dy: Finite<f64>,
-                     dirtyX: Finite<f64>,
-                     dirtyY: Finite<f64>,
-                     dirtyWidth: Finite<f64>,
-                     dirtyHeight: Finite<f64>) {
+                     dirty_x: Finite<f64>,
+                     dirty_y: Finite<f64>,
+                     dirty_width: Finite<f64>,
+                     dirty_height: Finite<f64>) {
         let data = imagedata.get_data_array();
         let offset = Point2D::new(*dx, *dy);
         let image_data_size = Size2D::new(imagedata.Width() as f64, imagedata.Height() as f64);
 
-        let dirty_rect = Rect::new(Point2D::new(*dirtyX, *dirtyY),
-                                   Size2D::new(*dirtyWidth, *dirtyHeight));
+        let dirty_rect = Rect::new(Point2D::new(*dirty_x, *dirty_y),
+                                   Size2D::new(*dirty_width, *dirty_height));
         let msg = CanvasMsg::Canvas2d(Canvas2dMsg::PutImageData(data,
                                                                 offset,
                                                                 image_data_size,
                                                                 dirty_rect));
         self.ipc_renderer.send(msg).unwrap();
         self.mark_as_dirty();
     }
 
--- a/servo/components/script/dom/closeevent.rs
+++ b/servo/components/script/dom/closeevent.rs
@@ -12,26 +12,26 @@ use dom::bindings::js::Root;
 use dom::bindings::reflector::reflect_dom_object;
 use dom::bindings::str::DOMString;
 use dom::event::{Event, EventBubbles, EventCancelable};
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct CloseEvent {
     event: Event,
-    wasClean: bool,
+    was_clean: bool,
     code: u16,
     reason: DOMString,
 }
 
 impl CloseEvent {
-    pub fn new_inherited(wasClean: bool, code: u16, reason: DOMString) -> CloseEvent {
+    pub fn new_inherited(was_clean: bool, code: u16, reason: DOMString) -> CloseEvent {
         CloseEvent {
             event: Event::new_inherited(),
-            wasClean: wasClean,
+            was_clean: was_clean,
             code: code,
             reason: reason,
         }
     }
 
     pub fn new_uninitialized(global: GlobalRef) -> Root<CloseEvent> {
         reflect_dom_object(box CloseEvent::new_inherited(false, 0, DOMString::new()),
                            global,
@@ -72,17 +72,17 @@ impl CloseEvent {
                            init.reason.clone()))
     }
 
 }
 
 impl CloseEventMethods for CloseEvent {
     // https://html.spec.whatwg.org/multipage/#dom-closeevent-wasclean
     fn WasClean(&self) -> bool {
-        self.wasClean
+        self.was_clean
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-closeevent-code
     fn Code(&self) -> u16 {
         self.code
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-closeevent-reason
--- a/servo/components/script/dom/console.rs
+++ b/servo/components/script/dom/console.rs
@@ -96,21 +96,21 @@ impl Console {
         };
     }
 }
 
 fn timestamp_in_ms(time: Timespec) -> u64 {
     (time.sec * 1000 + (time.nsec / 1000000) as i64) as u64
 }
 
-fn prepare_message(logLevel: LogLevel, message: DOMString) -> ConsoleMessage {
+fn prepare_message(log_level: LogLevel, message: DOMString) -> ConsoleMessage {
     // TODO: Sending fake values for filename, lineNumber and columnNumber in LogMessage; adjust later
     ConsoleMessage {
         message: String::from(message),
-        logLevel: logLevel,
+        logLevel: log_level,
         filename: "test".to_owned(),
         lineNumber: 1,
         columnNumber: 1,
     }
 }
 
 #[derive(HeapSizeOf, JSTraceable)]
 pub struct TimerSet(DOMRefCell<HashMap<DOMString, u64>>);
--- a/servo/components/script/dom/document.rs
+++ b/servo/components/script/dom/document.rs
@@ -728,23 +728,23 @@ impl Document {
             }
 
             self.begin_focus_transaction();
         }
 
         // https://w3c.github.io/uievents/#event-type-click
         let client_x = client_point.x as i32;
         let client_y = client_point.y as i32;
-        let clickCount = 1;
+        let click_count = 1;
         let event = MouseEvent::new(&self.window,
                                     DOMString::from(mouse_event_type_string),
                                     EventBubbles::Bubbles,
                                     EventCancelable::Cancelable,
                                     Some(&self.window),
-                                    clickCount,
+                                    click_count,
                                     client_x,
                                     client_y,
                                     client_x,
                                     client_y, // TODO: Get real screen coordinates?
                                     false,
                                     false,
                                     false,
                                     false,
@@ -799,26 +799,26 @@ impl Document {
 
             // Calculate distance between this click and the previous click.
             let line = click_pos - last_pos;
             let dist = (line.dot(line) as f64).sqrt();
 
             if  now.duration_since(last_time) < DBL_CLICK_TIMEOUT &&
                 dist < DBL_CLICK_DIST_THRESHOLD as f64 {
                 // A double click has occurred if this click is within a certain time and dist. of previous click.
-                let clickCount = 2;
+                let click_count = 2;
                 let client_x = click_pos.x as i32;
                 let client_y = click_pos.y as i32;
 
                 let event = MouseEvent::new(&self.window,
                                             DOMString::from("dblclick"),
                                             EventBubbles::Bubbles,
                                             EventCancelable::Cancelable,
                                             Some(&self.window),
-                                            clickCount,
+                                            click_count,
                                             client_x,
                                             client_y,
                                             client_x,
                                             client_y,
                                             false,
                                             false,
                                             false,
                                             false,
@@ -1612,28 +1612,28 @@ impl Document {
         self.load_event_start.get()
     }
 
     pub fn get_load_event_end(&self) -> u64 {
         self.load_event_end.get()
     }
 
     // https://html.spec.whatwg.org/multipage/#fire-a-focus-event
-    fn fire_focus_event(&self, focus_event_type: FocusEventType, node: &Node, relatedTarget: Option<&EventTarget>) {
+    fn fire_focus_event(&self, focus_event_type: FocusEventType, node: &Node, related_target: Option<&EventTarget>) {
         let (event_name, does_bubble) = match focus_event_type {
             FocusEventType::Focus => (DOMString::from("focus"), EventBubbles::DoesNotBubble),
             FocusEventType::Blur => (DOMString::from("blur"), EventBubbles::DoesNotBubble),
         };
         let event = FocusEvent::new(&self.window,
                                     event_name,
                                     does_bubble,
                                     EventCancelable::NotCancelable,
                                     Some(&self.window),
                                     0i32,
-                                    relatedTarget);
+                                    related_target);
         let event = event.upcast::<Event>();
         event.set_trusted(true);
         let target = node.upcast();
         event.fire(target);
     }
 
     /// https://html.spec.whatwg.org/multipage/#cookie-averse-document-object
     pub fn is_cookie_averse(&self) -> bool {
@@ -2375,57 +2375,57 @@ impl DocumentMethods for Document {
     // https://dom.spec.whatwg.org/#dom-document-createrange
     fn CreateRange(&self) -> Root<Range> {
         Range::new_with_doc(self)
     }
 
     // https://dom.spec.whatwg.org/#dom-document-createnodeiteratorroot-whattoshow-filter
     fn CreateNodeIterator(&self,
                           root: &Node,
-                          whatToShow: u32,
+                          what_to_show: u32,
                           filter: Option<Rc<NodeFilter>>)
                           -> Root<NodeIterator> {
-        NodeIterator::new(self, root, whatToShow, filter)
+        NodeIterator::new(self, root, what_to_show, filter)
     }
 
     // https://w3c.github.io/touch-events/#idl-def-Document
     fn CreateTouch(&self,
                    window: &Window,
                    target: &EventTarget,
                    identifier: i32,
-                   pageX: Finite<f64>,
-                   pageY: Finite<f64>,
-                   screenX: Finite<f64>,
-                   screenY: Finite<f64>)
+                   page_x: Finite<f64>,
+                   page_y: Finite<f64>,
+                   screen_x: Finite<f64>,
+                   screen_y: Finite<f64>)
                    -> Root<Touch> {
-        let clientX = Finite::wrap(*pageX - window.PageXOffset() as f64);
-        let clientY = Finite::wrap(*pageY - window.PageYOffset() as f64);
+        let client_x = Finite::wrap(*page_x - window.PageXOffset() as f64);
+        let client_y = Finite::wrap(*page_y - window.PageYOffset() as f64);
         Touch::new(window,
                    identifier,
                    target,
-                   screenX,
-                   screenY,
-                   clientX,
-                   clientY,
-                   pageX,
-                   pageY)
+                   screen_x,
+                   screen_y,
+                   client_x,
+                   client_y,
+                   page_x,
+                   page_y)
     }
 
     // https://w3c.github.io/touch-events/#idl-def-document-createtouchlist(touch...)
     fn CreateTouchList(&self, touches: &[&Touch]) -> Root<TouchList> {
         TouchList::new(&self.window, &touches)
     }
 
     // https://dom.spec.whatwg.org/#dom-document-createtreewalker
     fn CreateTreeWalker(&self,
                         root: &Node,
-                        whatToShow: u32,
+                        what_to_show: u32,
                         filter: Option<Rc<NodeFilter>>)
                         -> Root<TreeWalker> {
-        TreeWalker::new(self, root, whatToShow, filter)
+        TreeWalker::new(self, root, what_to_show, filter)
     }
 
     // https://html.spec.whatwg.org/multipage/#document.title
     fn Title(&self) -> DOMString {
         let title = self.GetDocumentElement().and_then(|root| {
             if root.namespace() == &ns!(svg) && root.local_name() == &atom!("svg") {
                 // Step 1.
                 root.upcast::<Node>()
--- a/servo/components/script/dom/file.rs
+++ b/servo/components/script/dom/file.rs
@@ -20,19 +20,19 @@ pub struct File {
     blob: Blob,
     name: DOMString,
     modified: i64,
 }
 
 impl File {
     #[allow(unrooted_must_root)]
     fn new_inherited(blob_impl: BlobImpl, name: DOMString,
-                     modified: Option<i64>, typeString: &str) -> File {
+                     modified: Option<i64>, type_string: &str) -> File {
         File {
-            blob: Blob::new_inherited(blob_impl, typeString.to_owned()),
+            blob: Blob::new_inherited(blob_impl, type_string.to_owned()),
             name: name,
             // https://w3c.github.io/FileAPI/#dfn-lastModified
             modified: match modified {
                 Some(m) => m,
                 None => {
                     let time = time::get_time();
                     time.sec * 1000 + (time.nsec / 1000000) as i64
                 }
--- a/servo/components/script/dom/htmlanchorelement.rs
+++ b/servo/components/script/dom/htmlanchorelement.rs
@@ -34,32 +34,32 @@ use util::prefs::PREFS;
 #[dom_struct]
 pub struct HTMLAnchorElement {
     htmlelement: HTMLElement,
     rel_list: MutNullableHeap<JS<DOMTokenList>>,
     url: DOMRefCell<Option<Url>>,
 }
 
 impl HTMLAnchorElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLAnchorElement {
         HTMLAnchorElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             rel_list: Default::default(),
             url: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLAnchorElement> {
-        Node::reflect_node(box HTMLAnchorElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLAnchorElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLAnchorElementBinding::Wrap)
     }
 
     // https://html.spec.whatwg.org/multipage/#concept-hyperlink-url-set
     fn set_url(&self) {
         let attribute = self.upcast::<Element>().get_attribute(&ns!(), &atom!("href"));
         *self.url.borrow_mut() = attribute.and_then(|attribute| {
@@ -535,17 +535,17 @@ impl Activatable for HTMLAnchorElement {
         }
 
         // Step 4.
         //TODO: Download the link is `download` attribute is set.
         follow_hyperlink(element, ismap_suffix);
     }
 
     //TODO:https://html.spec.whatwg.org/multipage/#the-a-element
-    fn implicit_submission(&self, _ctrlKey: bool, _shiftKey: bool, _altKey: bool, _metaKey: bool) {
+    fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _alt_key: bool, _meta_key: bool) {
     }
 }
 
 /// https://html.spec.whatwg.org/multipage/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
 fn is_current_browsing_context(target: DOMString) -> bool {
     target.is_empty() || target == "_self"
 }
 
--- a/servo/components/script/dom/htmlappletelement.rs
+++ b/servo/components/script/dom/htmlappletelement.rs
@@ -15,30 +15,30 @@ use string_cache::Atom;
 use style::attr::AttrValue;
 
 #[dom_struct]
 pub struct HTMLAppletElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLAppletElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLAppletElement {
         HTMLAppletElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLAppletElement> {
-        Node::reflect_node(box HTMLAppletElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLAppletElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLAppletElementBinding::Wrap)
     }
 }
 
 impl HTMLAppletElementMethods for HTMLAppletElement {
     // https://html.spec.whatwg.org/multipage/#the-applet-element:dom-applet-name
     make_getter!(Name, "name");
--- a/servo/components/script/dom/htmlareaelement.rs
+++ b/servo/components/script/dom/htmlareaelement.rs
@@ -18,28 +18,28 @@ use style::attr::AttrValue;
 
 #[dom_struct]
 pub struct HTMLAreaElement {
     htmlelement: HTMLElement,
     rel_list: MutNullableHeap<JS<DOMTokenList>>,
 }
 
 impl HTMLAreaElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAreaElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLAreaElement {
         HTMLAreaElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             rel_list: Default::default(),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLAreaElement> {
-        Node::reflect_node(box HTMLAreaElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLAreaElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLAreaElementBinding::Wrap)
     }
 }
 
 impl VirtualMethods for HTMLAreaElement {
     fn super_type(&self) -> Option<&VirtualMethods> {
         Some(self.upcast::<HTMLElement>() as &VirtualMethods)
--- a/servo/components/script/dom/htmlaudioelement.rs
+++ b/servo/components/script/dom/htmlaudioelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLAudioElement {
     htmlmediaelement: HTMLMediaElement
 }
 
 impl HTMLAudioElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLAudioElement {
         HTMLAudioElement {
             htmlmediaelement:
-                HTMLMediaElement::new_inherited(localName, prefix, document)
+                HTMLMediaElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLAudioElement> {
-        Node::reflect_node(box HTMLAudioElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLAudioElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLAudioElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlbaseelement.rs
+++ b/servo/components/script/dom/htmlbaseelement.rs
@@ -18,27 +18,27 @@ use style::attr::AttrValue;
 use url::Url;
 
 #[dom_struct]
 pub struct HTMLBaseElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLBaseElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBaseElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBaseElement {
         HTMLBaseElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLBaseElement> {
-        Node::reflect_node(box HTMLBaseElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLBaseElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLBaseElementBinding::Wrap)
     }
 
     /// https://html.spec.whatwg.org/multipage/#frozen-base-url
     pub fn frozen_base_url(&self) -> Url {
         let href = self.upcast::<Element>().get_attribute(&ns!(), &atom!("href"))
             .expect("The frozen base url is only defined for base elements \
--- a/servo/components/script/dom/htmlbodyelement.rs
+++ b/servo/components/script/dom/htmlbodyelement.rs
@@ -27,27 +27,27 @@ use url::Url;
 const INITIAL_REFLOW_DELAY: u64 = 200_000_000;
 
 #[dom_struct]
 pub struct HTMLBodyElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLBodyElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                      -> HTMLBodyElement {
         HTMLBodyElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                -> Root<HTMLBodyElement> {
-        Node::reflect_node(box HTMLBodyElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLBodyElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLBodyElementBinding::Wrap)
     }
 
     /// https://drafts.csswg.org/cssom-view/#the-html-body-element
     pub fn is_the_html_body_element(&self) -> bool {
         let self_node = self.upcast::<Node>();
         let root_elem = self.upcast::<Element>().root_element();
--- a/servo/components/script/dom/htmlbrelement.rs
+++ b/servo/components/script/dom/htmlbrelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLBRElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLBRElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBRElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLBRElement {
         HTMLBRElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLBRElement> {
-        Node::reflect_node(box HTMLBRElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLBRElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLBRElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlbuttonelement.rs
+++ b/servo/components/script/dom/htmlbuttonelement.rs
@@ -38,32 +38,32 @@ enum ButtonType {
 
 #[dom_struct]
 pub struct HTMLButtonElement {
     htmlelement: HTMLElement,
     button_type: Cell<ButtonType>
 }
 
 impl HTMLButtonElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLButtonElement {
         HTMLButtonElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
-                                                      localName, prefix, document),
+                                                      local_name, prefix, document),
             button_type: Cell::new(ButtonType::Submit)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLButtonElement> {
-        Node::reflect_node(box HTMLButtonElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLButtonElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLButtonElementBinding::Wrap)
     }
 }
 
 impl HTMLButtonElementMethods for HTMLButtonElement {
     // https://html.spec.whatwg.org/multipage/#dom-cva-validity
     fn Validity(&self) -> Root<ValidityState> {
@@ -278,26 +278,26 @@ impl Activatable for HTMLButtonElement {
                 }
             }
             _ => (),
         }
     }
 
     // https://html.spec.whatwg.org/multipage/#implicit-submission
     #[allow(unsafe_code)]
-    fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
+    fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, meta_key: bool) {
         let doc = document_from_node(self);
         let node = doc.upcast::<Node>();
         let owner = self.form_owner();
         if owner.is_none() || self.upcast::<Element>().click_in_progress() {
             return;
         }
         node.query_selector_iter(DOMString::from("button[type=submit]")).unwrap()
             .filter_map(Root::downcast::<HTMLButtonElement>)
             .find(|r| r.form_owner() == owner)
             .map(|s| synthetic_click_activation(s.r().as_element(),
-                                                ctrlKey,
-                                                shiftKey,
-                                                altKey,
-                                                metaKey,
+                                                ctrl_key,
+                                                shift_key,
+                                                alt_key,
+                                                meta_key,
                                                 ActivationSource::NotFromClick));
     }
 }
--- a/servo/components/script/dom/htmlcanvaselement.rs
+++ b/servo/components/script/dom/htmlcanvaselement.rs
@@ -51,30 +51,30 @@ impl HeapGCValue for CanvasContext {}
 
 #[dom_struct]
 pub struct HTMLCanvasElement {
     htmlelement: HTMLElement,
     context: DOMRefCell<Option<CanvasContext>>,
 }
 
 impl HTMLCanvasElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLCanvasElement {
         HTMLCanvasElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             context: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLCanvasElement> {
-        Node::reflect_node(box HTMLCanvasElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLCanvasElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLCanvasElementBinding::Wrap)
     }
 
     fn recreate_contexts(&self) {
         let size = self.get_size();
         if let Some(ref context) = *self.context.borrow() {
             match *context {
--- a/servo/components/script/dom/htmldataelement.rs
+++ b/servo/components/script/dom/htmldataelement.rs
@@ -12,29 +12,29 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDataElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLDataElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDataElement {
         HTMLDataElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDataElement> {
-        Node::reflect_node(box HTMLDataElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDataElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDataElementBinding::Wrap)
     }
 }
 
 impl HTMLDataElementMethods for HTMLDataElement {
     // https://html.spec.whatwg.org/multipage/#dom-data-value
     make_getter!(Value, "value");
--- a/servo/components/script/dom/htmldatalistelement.rs
+++ b/servo/components/script/dom/htmldatalistelement.rs
@@ -16,30 +16,30 @@ use dom::node::{Node, window_from_node};
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDataListElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLDataListElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDataListElement {
         HTMLDataListElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDataListElement> {
-        Node::reflect_node(box HTMLDataListElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDataListElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDataListElementBinding::Wrap)
     }
 }
 
 impl HTMLDataListElementMethods for HTMLDataListElement {
     // https://html.spec.whatwg.org/multipage/#dom-datalist-options
     fn Options(&self) -> Root<HTMLCollection> {
--- a/servo/components/script/dom/htmldetailselement.rs
+++ b/servo/components/script/dom/htmldetailselement.rs
@@ -23,31 +23,31 @@ use task_source::TaskSource;
 
 #[dom_struct]
 pub struct HTMLDetailsElement {
     htmlelement: HTMLElement,
     toggle_counter: Cell<u32>
 }
 
 impl HTMLDetailsElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDetailsElement {
         HTMLDetailsElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             toggle_counter: Cell::new(0)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDetailsElement> {
-        Node::reflect_node(box HTMLDetailsElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDetailsElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDetailsElementBinding::Wrap)
     }
 
     pub fn check_toggle_count(&self, number: u32) -> bool {
         number == self.toggle_counter.get()
     }
 }
--- a/servo/components/script/dom/htmldialogelement.rs
+++ b/servo/components/script/dom/htmldialogelement.rs
@@ -17,31 +17,31 @@ use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDialogElement {
     htmlelement: HTMLElement,
     return_value: DOMRefCell<DOMString>,
 }
 
 impl HTMLDialogElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDialogElement {
         HTMLDialogElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             return_value: DOMRefCell::new(DOMString::new()),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDialogElement> {
-        Node::reflect_node(box HTMLDialogElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDialogElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDialogElementBinding::Wrap)
     }
 }
 
 impl HTMLDialogElementMethods for HTMLDialogElement {
     // https://html.spec.whatwg.org/multipage/#dom-dialog-open
     make_bool_getter!(Open, "open");
--- a/servo/components/script/dom/htmldirectoryelement.rs
+++ b/servo/components/script/dom/htmldirectoryelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDirectoryElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLDirectoryElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDirectoryElement {
         HTMLDirectoryElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDirectoryElement> {
-        Node::reflect_node(box HTMLDirectoryElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDirectoryElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDirectoryElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmldivelement.rs
+++ b/servo/components/script/dom/htmldivelement.rs
@@ -11,29 +11,29 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDivElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLDivElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLDivElement {
         HTMLDivElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDivElement> {
-        Node::reflect_node(box HTMLDivElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDivElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDivElementBinding::Wrap)
     }
 }
 
 impl HTMLDivElementMethods for HTMLDivElement {
     // https://html.spec.whatwg.org/multipage/#dom-div-align
     make_getter!(Align, "align");
--- a/servo/components/script/dom/htmldlistelement.rs
+++ b/servo/components/script/dom/htmldlistelement.rs
@@ -11,24 +11,24 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLDListElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLDListElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDListElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLDListElement {
         HTMLDListElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLDListElement> {
-        Node::reflect_node(box HTMLDListElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLDListElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLDListElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlelement.rs
+++ b/servo/components/script/dom/htmlelement.rs
@@ -57,18 +57,18 @@ impl HTMLElement {
             element:
                 Element::new_inherited_with_state(state, tag_name, ns!(html), prefix, document),
             style_decl: Default::default(),
             dataset: Default::default(),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> {
-        Node::reflect_node(box HTMLElement::new_inherited(localName, prefix, document),
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> {
+        Node::reflect_node(box HTMLElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLElementBinding::Wrap)
     }
 
     fn is_body_or_frameset(&self) -> bool {
         let eventtarget = self.upcast::<EventTarget>();
         eventtarget.is::<HTMLBodyElement>() || eventtarget.is::<HTMLFrameSetElement>()
     }
--- a/servo/components/script/dom/htmlembedelement.rs
+++ b/servo/components/script/dom/htmlembedelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLEmbedElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLEmbedElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLEmbedElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLEmbedElement {
         HTMLEmbedElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLEmbedElement> {
-        Node::reflect_node(box HTMLEmbedElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLEmbedElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLEmbedElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlfieldsetelement.rs
+++ b/servo/components/script/dom/htmlfieldsetelement.rs
@@ -21,31 +21,31 @@ use string_cache::Atom;
 use style::element_state::*;
 
 #[dom_struct]
 pub struct HTMLFieldSetElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLFieldSetElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLFieldSetElement {
         HTMLFieldSetElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
-                                                      localName, prefix, document)
+                                                      local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLFieldSetElement> {
-        Node::reflect_node(box HTMLFieldSetElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLFieldSetElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLFieldSetElementBinding::Wrap)
     }
 }
 
 impl HTMLFieldSetElementMethods for HTMLFieldSetElement {
     // https://html.spec.whatwg.org/multipage/#dom-fieldset-elements
     fn Elements(&self) -> Root<HTMLCollection> {
--- a/servo/components/script/dom/htmlfontelement.rs
+++ b/servo/components/script/dom/htmlfontelement.rs
@@ -20,27 +20,27 @@ use style::values::specified;
 
 #[dom_struct]
 pub struct HTMLFontElement {
     htmlelement: HTMLElement,
 }
 
 
 impl HTMLFontElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFontElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFontElement {
         HTMLFontElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLFontElement> {
-        Node::reflect_node(box HTMLFontElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLFontElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLFontElementBinding::Wrap)
     }
 }
 
 impl HTMLFontElementMethods for HTMLFontElement {
     // https://html.spec.whatwg.org/multipage/#dom-font-color
     make_getter!(Color, "color");
--- a/servo/components/script/dom/htmlformelement.rs
+++ b/servo/components/script/dom/htmlformelement.rs
@@ -60,32 +60,32 @@ pub struct GenerationId(u32);
 pub struct HTMLFormElement {
     htmlelement: HTMLElement,
     marked_for_reset: Cell<bool>,
     elements: MutNullableHeap<JS<HTMLFormControlsCollection>>,
     generation_id: Cell<GenerationId>
 }
 
 impl HTMLFormElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLFormElement {
         HTMLFormElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             marked_for_reset: Cell::new(false),
             elements: Default::default(),
             generation_id: Cell::new(GenerationId(0))
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLFormElement> {
-        Node::reflect_node(box HTMLFormElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLFormElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLFormElementBinding::Wrap)
     }
 
     pub fn generation_id(&self) -> GenerationId {
         self.generation_id.get()
     }
 }
--- a/servo/components/script/dom/htmlframeelement.rs
+++ b/servo/components/script/dom/htmlframeelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLFrameElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLFrameElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFrameElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLFrameElement {
         HTMLFrameElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLFrameElement> {
-        Node::reflect_node(box HTMLFrameElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLFrameElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLFrameElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlframesetelement.rs
+++ b/servo/components/script/dom/htmlframesetelement.rs
@@ -14,30 +14,30 @@ use dom::node::{Node, window_from_node};
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLFrameSetElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLFrameSetElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLFrameSetElement {
         HTMLFrameSetElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLFrameSetElement> {
-        Node::reflect_node(box HTMLFrameSetElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLFrameSetElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLFrameSetElementBinding::Wrap)
     }
 }
 
 impl HTMLFrameSetElementMethods for HTMLFrameSetElement {
     // https://html.spec.whatwg.org/multipage/#windoweventhandlers
     window_event_handlers!(ForwardToWindow);
--- a/servo/components/script/dom/htmlheadelement.rs
+++ b/servo/components/script/dom/htmlheadelement.rs
@@ -17,29 +17,29 @@ use dom::virtualmethods::VirtualMethods;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLHeadElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLHeadElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLHeadElement {
         HTMLHeadElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLHeadElement> {
-        Node::reflect_node(box HTMLHeadElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLHeadElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLHeadElementBinding::Wrap)
     }
 
     /// https://html.spec.whatwg.org/multipage/#meta-referrer
     pub fn set_document_referrer(&self) {
         let doc = document_from_node(self);
 
--- a/servo/components/script/dom/htmlheadingelement.rs
+++ b/servo/components/script/dom/htmlheadingelement.rs
@@ -22,29 +22,29 @@ pub enum HeadingLevel {
 
 #[dom_struct]
 pub struct HTMLHeadingElement {
     htmlelement: HTMLElement,
     level: HeadingLevel,
 }
 
 impl HTMLHeadingElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document,
                      level: HeadingLevel) -> HTMLHeadingElement {
         HTMLHeadingElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             level: level,
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document,
                level: HeadingLevel) -> Root<HTMLHeadingElement> {
-        Node::reflect_node(box HTMLHeadingElement::new_inherited(localName, prefix, document, level),
+        Node::reflect_node(box HTMLHeadingElement::new_inherited(local_name, prefix, document, level),
                            document,
                            HTMLHeadingElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlhrelement.rs
+++ b/servo/components/script/dom/htmlhrelement.rs
@@ -16,27 +16,27 @@ use string_cache::Atom;
 use style::attr::{AttrValue, LengthOrPercentageOrAuto};
 
 #[dom_struct]
 pub struct HTMLHRElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLHRElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLHRElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLHRElement {
         HTMLHRElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLHRElement> {
-        Node::reflect_node(box HTMLHRElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLHRElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLHRElementBinding::Wrap)
     }
 }
 
 impl HTMLHRElementMethods for HTMLHRElement {
     // https://html.spec.whatwg.org/multipage/#dom-hr-align
     make_getter!(Align, "align");
--- a/servo/components/script/dom/htmliframeelement.rs
+++ b/servo/components/script/dom/htmliframeelement.rs
@@ -168,34 +168,34 @@ impl HTMLIFrameElement {
         self.pipeline_id.set(Some(new_pipeline_id));
 
         let mut blocker = self.load_blocker.borrow_mut();
         LoadBlocker::terminate(&mut blocker);
 
         self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
     }
 
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLIFrameElement {
         HTMLIFrameElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             pipeline_id: Cell::new(None),
             sandbox: Default::default(),
             sandbox_allowance: Cell::new(None),
             load_blocker: DOMRefCell::new(None),
             visibility: Cell::new(true),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLIFrameElement> {
-        Node::reflect_node(box HTMLIFrameElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLIFrameElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLIFrameElementBinding::Wrap)
     }
 
     #[inline]
     pub fn pipeline_id(&self) -> Option<PipelineId> {
         self.pipeline_id.get()
     }
@@ -483,17 +483,17 @@ impl HTMLIFrameElementMethods for HTMLIF
     }
 
     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goForward
     fn GoForward(&self) -> ErrorResult {
         Navigate(self, TraversalDirection::Forward(1))
     }
 
     // https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/reload
-    fn Reload(&self, _hardReload: bool) -> ErrorResult {
+    fn Reload(&self, _hard_reload: bool) -> ErrorResult {
         if self.Mozbrowser() {
             if self.upcast::<Node>().is_in_doc() {
                 self.navigate_or_reload_child_browsing_context(None);
             }
             Ok(())
         } else {
             debug!("this frame is not mozbrowser: mozbrowser attribute missing, or not a top
                 level window, or mozbrowser preference not set (use --pref dom.mozbrowser.enabled)");
--- a/servo/components/script/dom/htmlimageelement.rs
+++ b/servo/components/script/dom/htmlimageelement.rs
@@ -189,19 +189,19 @@ impl HTMLImageElement {
                         src: src.into(),
                     };
                     let task = window.dom_manipulation_task_source();
                     let _ = task.queue(runnable, GlobalRef::Window(window));
                 }
             }
         }
     }
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement {
         HTMLImageElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             current_request: DOMRefCell::new(ImageRequest {
                 state: State::Unavailable,
                 parsed_url: None,
                 source_url: None,
                 image: None,
                 metadata: None
             }),
             pending_request: DOMRefCell::new(ImageRequest {
@@ -210,20 +210,20 @@ impl HTMLImageElement {
                 source_url: None,
                 image: None,
                 metadata: None
             }),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLImageElement> {
-        Node::reflect_node(box HTMLImageElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLImageElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLImageElementBinding::Wrap)
     }
 
     pub fn Image(global: GlobalRef,
                  width: Option<u32>,
                  height: Option<u32>) -> Fallible<Root<HTMLImageElement>> {
         let document = global.as_window().Document();
--- a/servo/components/script/dom/htmlinputelement.rs
+++ b/servo/components/script/dom/htmlinputelement.rs
@@ -120,40 +120,40 @@ impl InputActivationState {
         }
     }
 }
 
 static DEFAULT_INPUT_SIZE: u32 = 20;
 static DEFAULT_MAX_LENGTH: i32 = -1;
 
 impl HTMLInputElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLInputElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLInputElement {
         let chan = document.window().constellation_chan().clone();
         HTMLInputElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE | IN_READ_WRITE_STATE,
-                                                      localName, prefix, document),
+                                                      local_name, prefix, document),
             input_type: Cell::new(InputType::InputText),
             placeholder: DOMRefCell::new(DOMString::new()),
             checked_changed: Cell::new(false),
             value_changed: Cell::new(false),
             maxlength: Cell::new(DEFAULT_MAX_LENGTH),
             size: Cell::new(DEFAULT_INPUT_SIZE),
             textinput: DOMRefCell::new(TextInput::new(Single, DOMString::new(), chan, None, SelectionDirection::None)),
             activation_state: DOMRefCell::new(InputActivationState::new()),
             value_dirty: Cell::new(false),
             filelist: MutNullableHeap::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLInputElement> {
-        Node::reflect_node(box HTMLInputElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLInputElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLInputElementBinding::Wrap)
     }
 
     pub fn type_(&self) -> Atom {
         self.upcast::<Element>()
             .get_attribute(&ns!(), &atom!("type"))
             .map_or_else(|| atom!(""), |a| a.value().as_atom().to_owned())
@@ -1270,17 +1270,17 @@ impl Activatable for HTMLInputElement {
             },
             InputType::InputFile => self.select_files(None),
             _ => ()
         }
     }
 
     // https://html.spec.whatwg.org/multipage/#implicit-submission
     #[allow(unsafe_code)]
-    fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
+    fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, meta_key: bool) {
         let doc = document_from_node(self);
         let node = doc.upcast::<Node>();
         let owner = self.form_owner();
         let form = match owner {
             None => return,
             Some(ref f) => f
         };
 
@@ -1290,20 +1290,20 @@ impl Activatable for HTMLInputElement {
         let submit_button;
         submit_button = node.query_selector_iter(DOMString::from("input[type=submit]")).unwrap()
             .filter_map(Root::downcast::<HTMLInputElement>)
             .find(|r| r.form_owner() == owner);
         match submit_button {
             Some(ref button) => {
                 if button.is_instance_activatable() {
                     synthetic_click_activation(button.as_element(),
-                                               ctrlKey,
-                                               shiftKey,
-                                               altKey,
-                                               metaKey,
+                                               ctrl_key,
+                                               shift_key,
+                                               alt_key,
+                                               meta_key,
                                                ActivationSource::NotFromClick)
                 }
             }
             None => {
                 let inputs = node.query_selector_iter(DOMString::from("input")).unwrap()
                     .filter_map(Root::downcast::<HTMLInputElement>)
                     .filter(|input| {
                         input.form_owner() == owner && match input.type_() {
--- a/servo/components/script/dom/htmllabelelement.rs
+++ b/servo/components/script/dom/htmllabelelement.rs
@@ -20,30 +20,30 @@ use string_cache::Atom;
 use style::attr::AttrValue;
 
 #[dom_struct]
 pub struct HTMLLabelElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLLabelElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLLabelElement {
         HTMLLabelElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLLabelElement> {
-        Node::reflect_node(box HTMLLabelElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLLabelElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLLabelElementBinding::Wrap)
     }
 }
 
 impl Activatable for HTMLLabelElement {
     fn as_element(&self) -> &Element {
         self.upcast::<Element>()
@@ -71,17 +71,17 @@ impl Activatable for HTMLLabelElement {
                                        false,
                                        false,
                                        false,
                                        ActivationSource::NotFromClick);
         }
     }
 
     // https://html.spec.whatwg.org/multipage/#implicit-submission
-    fn implicit_submission(&self, _ctrlKey: bool, _shiftKey: bool, _altKey: bool, _metaKey: bool) {
+    fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _alt_key: bool, _meta_key: bool) {
         //FIXME: Investigate and implement implicit submission for label elements
         // Issue filed at https://github.com/servo/servo/issues/8263
     }
 
 
 }
 
 impl HTMLLabelElementMethods for HTMLLabelElement {
--- a/servo/components/script/dom/htmllegendelement.rs
+++ b/servo/components/script/dom/htmllegendelement.rs
@@ -18,29 +18,29 @@ use dom::virtualmethods::VirtualMethods;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLLegendElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLLegendElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document)
                      -> HTMLLegendElement {
-        HTMLLegendElement { htmlelement: HTMLElement::new_inherited(localName, prefix, document) }
+        HTMLLegendElement { htmlelement: HTMLElement::new_inherited(local_name, prefix, document) }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document)
                -> Root<HTMLLegendElement> {
-        Node::reflect_node(box HTMLLegendElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLLegendElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLLegendElementBinding::Wrap)
     }
 }
 
 impl VirtualMethods for HTMLLegendElement {
     fn super_type(&self) -> Option<&VirtualMethods> {
         Some(self.upcast::<HTMLElement>() as &VirtualMethods)
--- a/servo/components/script/dom/htmllielement.rs
+++ b/servo/components/script/dom/htmllielement.rs
@@ -15,27 +15,27 @@ use string_cache::Atom;
 use style::attr::AttrValue;
 
 #[dom_struct]
 pub struct HTMLLIElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLLIElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLLIElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLLIElement {
         HTMLLIElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLLIElement> {
-        Node::reflect_node(box HTMLLIElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLLIElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLLIElementBinding::Wrap)
     }
 }
 
 impl HTMLLIElementMethods for HTMLLIElement {
     // https://html.spec.whatwg.org/multipage/#dom-li-value
     make_int_getter!(Value, "value");
--- a/servo/components/script/dom/htmllinkelement.rs
+++ b/servo/components/script/dom/htmllinkelement.rs
@@ -52,32 +52,32 @@ pub struct HTMLLinkElement {
     rel_list: MutNullableHeap<JS<DOMTokenList>>,
     stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
 
     /// https://html.spec.whatwg.org/multipage/#a-style-sheet-that-is-blocking-scripts
     parser_inserted: Cell<bool>,
 }
 
 impl HTMLLinkElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document,
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document,
                      creator: ElementCreator) -> HTMLLinkElement {
         HTMLLinkElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             rel_list: Default::default(),
             parser_inserted: Cell::new(creator == ElementCreator::ParserCreated),
             stylesheet: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document,
                creator: ElementCreator) -> Root<HTMLLinkElement> {
-        Node::reflect_node(box HTMLLinkElement::new_inherited(localName, prefix, document, creator),
+        Node::reflect_node(box HTMLLinkElement::new_inherited(local_name, prefix, document, creator),
                            document,
                            HTMLLinkElementBinding::Wrap)
     }
 
     pub fn get_stylesheet(&self) -> Option<Arc<Stylesheet>> {
         self.stylesheet.borrow().clone()
     }
 }
--- a/servo/components/script/dom/htmlmapelement.rs
+++ b/servo/components/script/dom/htmlmapelement.rs
@@ -11,25 +11,25 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLMapElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLMapElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLMapElement {
         HTMLMapElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLMapElement> {
-        Node::reflect_node(box HTMLMapElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLMapElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLMapElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlmetaelement.rs
+++ b/servo/components/script/dom/htmlmetaelement.rs
@@ -26,30 +26,30 @@ use style::viewport::ViewportRule;
 
 #[dom_struct]
 pub struct HTMLMetaElement {
     htmlelement: HTMLElement,
     stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
 }
 
 impl HTMLMetaElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLMetaElement {
         HTMLMetaElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             stylesheet: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLMetaElement> {
-        Node::reflect_node(box HTMLMetaElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLMetaElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLMetaElementBinding::Wrap)
     }
 
     pub fn get_stylesheet(&self) -> Option<Arc<Stylesheet>> {
         self.stylesheet.borrow().clone()
     }
 
--- a/servo/components/script/dom/htmlmeterelement.rs
+++ b/servo/components/script/dom/htmlmeterelement.rs
@@ -13,29 +13,29 @@ use dom::nodelist::NodeList;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLMeterElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLMeterElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLMeterElement {
         HTMLMeterElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLMeterElement> {
-        Node::reflect_node(box HTMLMeterElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLMeterElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLMeterElementBinding::Wrap)
     }
 }
 
 impl HTMLMeterElementMethods for HTMLMeterElement {
     // https://html.spec.whatwg.org/multipage/#dom-lfe-labels
     fn Labels(&self) -> Root<NodeList> {
--- a/servo/components/script/dom/htmlmodelement.rs
+++ b/servo/components/script/dom/htmlmodelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLModElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLModElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLModElement {
         HTMLModElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLModElement> {
-        Node::reflect_node(box HTMLModElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLModElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLModElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlobjectelement.rs
+++ b/servo/components/script/dom/htmlobjectelement.rs
@@ -23,31 +23,31 @@ use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLObjectElement {
     htmlelement: HTMLElement,
     image: DOMRefCell<Option<Arc<Image>>>,
 }
 
 impl HTMLObjectElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLObjectElement {
         HTMLObjectElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             image: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLObjectElement> {
-        Node::reflect_node(box HTMLObjectElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLObjectElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLObjectElementBinding::Wrap)
     }
 }
 
 trait ProcessDataURL {
     fn process_data_url(&self);
 }
--- a/servo/components/script/dom/htmlolistelement.rs
+++ b/servo/components/script/dom/htmlolistelement.rs
@@ -11,25 +11,25 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLOListElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLOListElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLOListElement {
         HTMLOListElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLOListElement> {
-        Node::reflect_node(box HTMLOListElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLOListElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLOListElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmloptgroupelement.rs
+++ b/servo/components/script/dom/htmloptgroupelement.rs
@@ -18,31 +18,31 @@ use string_cache::Atom;
 use style::element_state::*;
 
 #[dom_struct]
 pub struct HTMLOptGroupElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLOptGroupElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLOptGroupElement {
         HTMLOptGroupElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
-                                                      localName, prefix, document)
+                                                      local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLOptGroupElement> {
-        Node::reflect_node(box HTMLOptGroupElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLOptGroupElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLOptGroupElementBinding::Wrap)
     }
 }
 
 impl HTMLOptGroupElementMethods for HTMLOptGroupElement {
     // https://html.spec.whatwg.org/multipage/#dom-optgroup-disabled
     make_bool_getter!(Disabled, "disabled");
--- a/servo/components/script/dom/htmloptionelement.rs
+++ b/servo/components/script/dom/htmloptionelement.rs
@@ -34,33 +34,33 @@ pub struct HTMLOptionElement {
     /// https://html.spec.whatwg.org/multipage/#attr-option-selected
     selectedness: Cell<bool>,
 
     /// https://html.spec.whatwg.org/multipage/#concept-option-dirtiness
     dirtiness: Cell<bool>,
 }
 
 impl HTMLOptionElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLOptionElement {
         HTMLOptionElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
-                                                      localName, prefix, document),
+                                                      local_name, prefix, document),
             selectedness: Cell::new(false),
             dirtiness: Cell::new(false),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLOptionElement> {
-        Node::reflect_node(box HTMLOptionElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLOptionElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLOptionElementBinding::Wrap)
     }
 
     pub fn set_selectedness(&self, selected: bool) {
         self.selectedness.set(selected);
     }
 
--- a/servo/components/script/dom/htmloutputelement.rs
+++ b/servo/components/script/dom/htmloutputelement.rs
@@ -16,30 +16,30 @@ use dom::validitystate::ValidityState;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLOutputElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLOutputElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLOutputElement {
         HTMLOutputElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLOutputElement> {
-        Node::reflect_node(box HTMLOutputElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLOutputElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLOutputElementBinding::Wrap)
     }
 }
 
 impl HTMLOutputElementMethods for HTMLOutputElement {
     // https://html.spec.whatwg.org/multipage/#dom-cva-validity
     fn Validity(&self) -> Root<ValidityState> {
--- a/servo/components/script/dom/htmlparagraphelement.rs
+++ b/servo/components/script/dom/htmlparagraphelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLParagraphElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLParagraphElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLParagraphElement {
         HTMLParagraphElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLParagraphElement> {
-        Node::reflect_node(box HTMLParagraphElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLParagraphElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLParagraphElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlparamelement.rs
+++ b/servo/components/script/dom/htmlparamelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLParamElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLParamElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLParamElement {
         HTMLParamElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLParamElement> {
-        Node::reflect_node(box HTMLParamElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLParamElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLParamElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlpreelement.rs
+++ b/servo/components/script/dom/htmlpreelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLPreElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLPreElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLPreElement {
         HTMLPreElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLPreElement> {
-        Node::reflect_node(box HTMLPreElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLPreElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLPreElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlprogresselement.rs
+++ b/servo/components/script/dom/htmlprogresselement.rs
@@ -13,30 +13,30 @@ use dom::nodelist::NodeList;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLProgressElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLProgressElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLProgressElement {
         HTMLProgressElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLProgressElement> {
-        Node::reflect_node(box HTMLProgressElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLProgressElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLProgressElementBinding::Wrap)
     }
 }
 
 impl HTMLProgressElementMethods for HTMLProgressElement {
     // https://html.spec.whatwg.org/multipage/#dom-lfe-labels
     fn Labels(&self) -> Root<NodeList> {
--- a/servo/components/script/dom/htmlquoteelement.rs
+++ b/servo/components/script/dom/htmlquoteelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLQuoteElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLQuoteElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLQuoteElement {
         HTMLQuoteElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLQuoteElement> {
-        Node::reflect_node(box HTMLQuoteElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLQuoteElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLQuoteElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlscriptelement.rs
+++ b/servo/components/script/dom/htmlscriptelement.rs
@@ -59,34 +59,34 @@ pub struct HTMLScriptElement {
     /// Document of the parser that created this element
     parser_document: JS<Document>,
 
     /// The source this script was loaded from
     load: DOMRefCell<Option<Result<ScriptOrigin, NetworkError>>>,
 }
 
 impl HTMLScriptElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document,
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document,
                      creator: ElementCreator) -> HTMLScriptElement {
         HTMLScriptElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             already_started: Cell::new(false),
             parser_inserted: Cell::new(creator == ElementCreator::ParserCreated),
             non_blocking: Cell::new(creator != ElementCreator::ParserCreated),
             ready_to_be_parser_executed: Cell::new(false),
             parser_document: JS::from_ref(document),
             load: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document,
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document,
                creator: ElementCreator) -> Root<HTMLScriptElement> {
-        Node::reflect_node(box HTMLScriptElement::new_inherited(localName, prefix, document, creator),
+        Node::reflect_node(box HTMLScriptElement::new_inherited(local_name, prefix, document, creator),
                            document,
                            HTMLScriptElementBinding::Wrap)
     }
 }
 
 
 /// Supported script types as defined by
 /// <https://html.spec.whatwg.org/multipage/#javascript-mime-type>.
--- a/servo/components/script/dom/htmlselectelement.rs
+++ b/servo/components/script/dom/htmlselectelement.rs
@@ -29,31 +29,31 @@ use style::element_state::*;
 #[dom_struct]
 pub struct HTMLSelectElement {
     htmlelement: HTMLElement
 }
 
 static DEFAULT_SELECT_SIZE: u32 = 0;
 
 impl HTMLSelectElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLSelectElement {
         HTMLSelectElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
-                                                      localName, prefix, document)
+                                                      local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLSelectElement> {
-        Node::reflect_node(box HTMLSelectElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLSelectElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLSelectElementBinding::Wrap)
     }
 
     // https://html.spec.whatwg.org/multipage/#ask-for-a-reset
     pub fn ask_for_reset(&self) {
         if self.Multiple() {
             return;
--- a/servo/components/script/dom/htmlsourceelement.rs
+++ b/servo/components/script/dom/htmlsourceelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLSourceElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLSourceElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLSourceElement {
         HTMLSourceElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLSourceElement> {
-        Node::reflect_node(box HTMLSourceElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLSourceElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLSourceElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlspanelement.rs
+++ b/servo/components/script/dom/htmlspanelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLSpanElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLSpanElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLSpanElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLSpanElement {
         HTMLSpanElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLSpanElement> {
-        Node::reflect_node(box HTMLSpanElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLSpanElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLSpanElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlstyleelement.rs
+++ b/servo/components/script/dom/htmlstyleelement.rs
@@ -23,30 +23,30 @@ use style::stylesheets::{Stylesheet, Ori
 
 #[dom_struct]
 pub struct HTMLStyleElement {
     htmlelement: HTMLElement,
     stylesheet: DOMRefCell<Option<Arc<Stylesheet>>>,
 }
 
 impl HTMLStyleElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLStyleElement {
         HTMLStyleElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             stylesheet: DOMRefCell::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLStyleElement> {
-        Node::reflect_node(box HTMLStyleElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLStyleElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLStyleElementBinding::Wrap)
     }
 
     pub fn parse_own_css(&self) {
         let node = self.upcast::<Node>();
         let element = self.upcast::<Element>();
         assert!(node.is_in_doc());
--- a/servo/components/script/dom/htmltablecaptionelement.rs
+++ b/servo/components/script/dom/htmltablecaptionelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTableCaptionElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLTableCaptionElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTableCaptionElement {
         HTMLTableCaptionElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTableCaptionElement> {
-        Node::reflect_node(box HTMLTableCaptionElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableCaptionElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableCaptionElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmltablecolelement.rs
+++ b/servo/components/script/dom/htmltablecolelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTableColElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLTableColElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTableColElement {
         HTMLTableColElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTableColElement> {
-        Node::reflect_node(box HTMLTableColElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableColElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableColElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmltabledatacellelement.rs
+++ b/servo/components/script/dom/htmltabledatacellelement.rs
@@ -11,27 +11,27 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTableDataCellElement {
     htmltablecellelement: HTMLTableCellElement,
 }
 
 impl HTMLTableDataCellElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTableDataCellElement {
         HTMLTableDataCellElement {
             htmltablecellelement:
-                HTMLTableCellElement::new_inherited(localName, prefix, document)
+                HTMLTableCellElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                -> Root<HTMLTableDataCellElement> {
-        Node::reflect_node(box HTMLTableDataCellElement::new_inherited(localName,
+        Node::reflect_node(box HTMLTableDataCellElement::new_inherited(local_name,
                                                                        prefix,
                                                                        document),
                            document,
                            HTMLTableDataCellElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmltableelement.rs
+++ b/servo/components/script/dom/htmltableelement.rs
@@ -44,30 +44,30 @@ impl CollectionFilter for TableRowFilter
     fn filter(&self, elem: &Element, root: &Node) -> bool {
         elem.is::<HTMLTableRowElement>() &&
             (root.is_parent_of(elem.upcast())
                 || self.sections.iter().any(|ref section| section.is_parent_of(elem.upcast())))
     }
 }
 
 impl HTMLTableElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                      -> HTMLTableElement {
         HTMLTableElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             border: Cell::new(None),
             cellspacing: Cell::new(None),
             tbodies: Default::default(),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                -> Root<HTMLTableElement> {
-        Node::reflect_node(box HTMLTableElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableElementBinding::Wrap)
     }
 
     pub fn get_border(&self) -> Option<u32> {
         self.border.get()
     }
 
--- a/servo/components/script/dom/htmltableheadercellelement.rs
+++ b/servo/components/script/dom/htmltableheadercellelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTableHeaderCellElement {
     htmltablecellelement: HTMLTableCellElement,
 }
 
 impl HTMLTableHeaderCellElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTableHeaderCellElement {
         HTMLTableHeaderCellElement {
             htmltablecellelement:
-                HTMLTableCellElement::new_inherited(localName, prefix, document)
+                HTMLTableCellElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTableHeaderCellElement> {
-        Node::reflect_node(box HTMLTableHeaderCellElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableHeaderCellElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableHeaderCellElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmltablerowelement.rs
+++ b/servo/components/script/dom/htmltablerowelement.rs
@@ -35,28 +35,28 @@ impl CollectionFilter for CellsFilter {
 
 #[dom_struct]
 pub struct HTMLTableRowElement {
     htmlelement: HTMLElement,
     cells: MutNullableHeap<JS<HTMLCollection>>,
 }
 
 impl HTMLTableRowElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                      -> HTMLTableRowElement {
         HTMLTableRowElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
             cells: Default::default(),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                -> Root<HTMLTableRowElement> {
-        Node::reflect_node(box HTMLTableRowElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableRowElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableRowElementBinding::Wrap)
     }
 
     /// Determine the index for this `HTMLTableRowElement` within the given
     /// `HTMLCollection`. Returns `-1` if not found within collection.
     fn row_index(&self, collection: Root<HTMLCollection>) -> i32 {
         collection.elements_iter()
--- a/servo/components/script/dom/htmltablesectionelement.rs
+++ b/servo/components/script/dom/htmltablesectionelement.rs
@@ -20,27 +20,27 @@ use string_cache::Atom;
 use style::attr::AttrValue;
 
 #[dom_struct]
 pub struct HTMLTableSectionElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLTableSectionElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                      -> HTMLTableSectionElement {
         HTMLTableSectionElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document),
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom, prefix: Option<DOMString>, document: &Document)
+    pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document)
                -> Root<HTMLTableSectionElement> {
-        Node::reflect_node(box HTMLTableSectionElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTableSectionElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTableSectionElementBinding::Wrap)
     }
 }
 
 #[derive(JSTraceable)]
 struct RowsFilter;
 impl CollectionFilter for RowsFilter {
--- a/servo/components/script/dom/htmltemplateelement.rs
+++ b/servo/components/script/dom/htmltemplateelement.rs
@@ -20,31 +20,31 @@ use string_cache::Atom;
 pub struct HTMLTemplateElement {
     htmlelement: HTMLElement,
 
     /// https://html.spec.whatwg.org/multipage/#template-contents
     contents: MutNullableHeap<JS<DocumentFragment>>,
 }
 
 impl HTMLTemplateElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTemplateElement {
         HTMLTemplateElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document),
+                HTMLElement::new_inherited(local_name, prefix, document),
             contents: MutNullableHeap::new(None),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTemplateElement> {
-        Node::reflect_node(box HTMLTemplateElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTemplateElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTemplateElementBinding::Wrap)
     }
 }
 
 impl HTMLTemplateElementMethods for HTMLTemplateElement {
     /// https://html.spec.whatwg.org/multipage/#dom-template-content
     fn Content(&self) -> Root<DocumentFragment> {
--- a/servo/components/script/dom/htmltextareaelement.rs
+++ b/servo/components/script/dom/htmltextareaelement.rs
@@ -91,35 +91,35 @@ impl LayoutHTMLTextAreaElementHelpers fo
 
 // https://html.spec.whatwg.org/multipage/#attr-textarea-cols-value
 static DEFAULT_COLS: u32 = 20;
 
 // https://html.spec.whatwg.org/multipage/#attr-textarea-rows-value
 static DEFAULT_ROWS: u32 = 2;
 
 impl HTMLTextAreaElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLTextAreaElement {
         let chan = document.window().constellation_chan().clone();
         HTMLTextAreaElement {
             htmlelement:
                 HTMLElement::new_inherited_with_state(IN_ENABLED_STATE | IN_READ_WRITE_STATE,
-                                                      localName, prefix, document),
+                                                      local_name, prefix, document),
             textinput: DOMRefCell::new(TextInput::new(
                     Lines::Multiple, DOMString::new(), chan, None, SelectionDirection::None)),
             value_changed: Cell::new(false),
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTextAreaElement> {
-        Node::reflect_node(box HTMLTextAreaElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTextAreaElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTextAreaElementBinding::Wrap)
     }
 }
 
 impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
     // TODO A few of these attributes have default values and additional
     // constraints
--- a/servo/components/script/dom/htmltimeelement.rs
+++ b/servo/components/script/dom/htmltimeelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTimeElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLTimeElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTimeElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTimeElement {
         HTMLTimeElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTimeElement> {
-        Node::reflect_node(box HTMLTimeElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTimeElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTimeElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmltitleelement.rs
+++ b/servo/components/script/dom/htmltitleelement.rs
@@ -17,27 +17,27 @@ use dom::virtualmethods::VirtualMethods;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTitleElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLTitleElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTitleElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTitleElement {
         HTMLTitleElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTitleElement> {
-        Node::reflect_node(box HTMLTitleElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTitleElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTitleElementBinding::Wrap)
     }
 }
 
 impl HTMLTitleElementMethods for HTMLTitleElement {
     // https://html.spec.whatwg.org/multipage/#dom-title-text
     fn Text(&self) -> DOMString {
--- a/servo/components/script/dom/htmltrackelement.rs
+++ b/servo/components/script/dom/htmltrackelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLTrackElement {
     htmlelement: HTMLElement,
 }
 
 impl HTMLTrackElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTrackElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLTrackElement {
         HTMLTrackElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLTrackElement> {
-        Node::reflect_node(box HTMLTrackElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLTrackElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLTrackElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlulistelement.rs
+++ b/servo/components/script/dom/htmlulistelement.rs
@@ -11,23 +11,23 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLUListElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLUListElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLUListElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLUListElement {
         HTMLUListElement {
-            htmlelement: HTMLElement::new_inherited(localName, prefix, document)
+            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLUListElement> {
-        Node::reflect_node(box HTMLUListElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLUListElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLUListElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlunknownelement.rs
+++ b/servo/components/script/dom/htmlunknownelement.rs
@@ -11,26 +11,26 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLUnknownElement {
     htmlelement: HTMLElement
 }
 
 impl HTMLUnknownElement {
-    fn new_inherited(localName: Atom,
+    fn new_inherited(local_name: Atom,
                      prefix: Option<DOMString>,
                      document: &Document) -> HTMLUnknownElement {
         HTMLUnknownElement {
             htmlelement:
-                HTMLElement::new_inherited(localName, prefix, document)
+                HTMLElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLUnknownElement> {
-        Node::reflect_node(box HTMLUnknownElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLUnknownElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLUnknownElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/htmlvideoelement.rs
+++ b/servo/components/script/dom/htmlvideoelement.rs
@@ -11,24 +11,24 @@ use dom::node::Node;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct HTMLVideoElement {
     htmlmediaelement: HTMLMediaElement
 }
 
 impl HTMLVideoElement {
-    fn new_inherited(localName: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement {
+    fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement {
         HTMLVideoElement {
             htmlmediaelement:
-                HTMLMediaElement::new_inherited(localName, prefix, document)
+                HTMLMediaElement::new_inherited(local_name, prefix, document)
         }
     }
 
     #[allow(unrooted_must_root)]
-    pub fn new(localName: Atom,
+    pub fn new(local_name: Atom,
                prefix: Option<DOMString>,
                document: &Document) -> Root<HTMLVideoElement> {
-        Node::reflect_node(box HTMLVideoElement::new_inherited(localName, prefix, document),
+        Node::reflect_node(box HTMLVideoElement::new_inherited(local_name, prefix, document),
                            document,
                            HTMLVideoElementBinding::Wrap)
     }
 }
--- a/servo/components/script/dom/keyboardevent.rs
+++ b/servo/components/script/dom/keyboardevent.rs
@@ -63,46 +63,46 @@ impl KeyboardEvent {
     pub fn new_uninitialized(window: &Window) -> Root<KeyboardEvent> {
         reflect_dom_object(box KeyboardEvent::new_inherited(),
                            GlobalRef::Window(window),
                            KeyboardEventBinding::Wrap)
     }
 
     pub fn new(window: &Window,
                type_: DOMString,
-               canBubble: bool,
+               can_bubble: bool,
                cancelable: bool,
                view: Option<&Window>,
                _detail: i32,
                ch: Option<char>,
                key: Option<Key>,
                key_string: DOMString,
                code: DOMString,
                location: u32,
                repeat: bool,
-               isComposing: bool,
-               ctrlKey: bool,
-               altKey: bool,
-               shiftKey: bool,
-               metaKey: bool,
+               is_composing: bool,
+               ctrl_key: bool,
+               alt_key: bool,
+               shift_key: bool,
+               meta_key: bool,
                char_code: Option<u32>,
                key_code: u32) -> Root<KeyboardEvent> {
         let ev = KeyboardEvent::new_uninitialized(window);
-        ev.InitKeyboardEvent(type_, canBubble, cancelable, view, key_string, location,
+        ev.InitKeyboardEvent(type_, can_bubble, cancelable, view, key_string, location,
                              DOMString::new(), repeat, DOMString::new());
         ev.key.set(key);
         *ev.code.borrow_mut() = code;
-        ev.ctrl.set(ctrlKey);
-        ev.alt.set(altKey);
-        ev.shift.set(shiftKey);
-        ev.meta.set(metaKey);
+        ev.ctrl.set(ctrl_key);
+        ev.alt.set(alt_key);
+        ev.shift.set(shift_key);
+        ev.meta.set(meta_key);
         ev.char_code.set(char_code);
         ev.printable.set(ch);
         ev.key_code.set(key_code);
-        ev.is_composing.set(isComposing);
+        ev.is_composing.set(is_composing);
         ev
     }
 
     pub fn Constructor(global: GlobalRef,
                        type_: DOMString,
                        init: &KeyboardEventBinding::KeyboardEventInit) -> Fallible<Root<KeyboardEvent>> {
         let event = KeyboardEvent::new(global.as_window(), type_,
                                        init.parent.parent.parent.bubbles,
@@ -754,33 +754,33 @@ impl KeyEventProperties {
     pub fn is_printable(&self) -> bool {
         self.char_code.is_some()
     }
 }
 
 impl KeyboardEventMethods for KeyboardEvent {
     // https://w3c.github.io/uievents/#widl-KeyboardEvent-initKeyboardEvent
     fn InitKeyboardEvent(&self,
-                         typeArg: DOMString,
-                         canBubbleArg: bool,
-                         cancelableArg: bool,
-                         viewArg: Option<&Window>,
-                         keyArg: DOMString,
-                         locationArg: u32,
-                         _modifiersListArg: DOMString,
+                         type_arg: DOMString,
+                         can_bubble_arg: bool,
+                         cancelable_arg: bool,
+                         view_arg: Option<&Window>,
+                         key_arg: DOMString,
+                         location_arg: u32,
+                         _modifiers_list_arg: DOMString,
                          repeat: bool,
                          _locale: DOMString) {
         if self.upcast::<Event>().dispatching() {
             return;
         }
 
         self.upcast::<UIEvent>()
-            .InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0);
-        *self.key_string.borrow_mut() = keyArg;
-        self.location.set(locationArg);
+            .InitUIEvent(type_arg, can_bubble_arg, cancelable_arg, view_arg, 0);
+        *self.key_string.borrow_mut() = key_arg;
+        self.location.set(location_arg);
         self.repeat.set(repeat);
     }
 
     // https://w3c.github.io/uievents/#widl-KeyboardEvent-key
     fn Key(&self) -> DOMString {
         self.key_string.borrow().clone()
     }
 
@@ -820,18 +820,18 @@ impl KeyboardEventMethods for KeyboardEv
     }
 
     // https://w3c.github.io/uievents/#widl-KeyboardEvent-isComposing
     fn IsComposing(&self) -> bool {
         self.is_composing.get()
     }
 
     // https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
-    fn GetModifierState(&self, keyArg: DOMString) -> bool {
-        match &*keyArg {
+    fn GetModifierState(&self, key_arg: DOMString) -> bool {
+        match &*key_arg {
             "Ctrl" => self.CtrlKey(),
             "Alt" => self.AltKey(),
             "Shift" => self.ShiftKey(),
             "Meta" => self.MetaKey(),
             "AltGraph" | "CapsLock" | "NumLock" | "ScrollLock" | "Accel" |
             "Fn" | "FnLock" | "Hyper" | "OS" | "Symbol" | "SymbolLock" => false, //FIXME
             _ => false,
         }
--- a/servo/components/script/dom/mouseevent.rs
+++ b/servo/components/script/dom/mouseevent.rs
@@ -54,36 +54,36 @@ impl MouseEvent {
     pub fn new_uninitialized(window: &Window) -> Root<MouseEvent> {
         reflect_dom_object(box MouseEvent::new_inherited(),
                            GlobalRef::Window(window),
                            MouseEventBinding::Wrap)
     }
 
     pub fn new(window: &Window,
                type_: DOMString,
-               canBubble: EventBubbles,
+               can_bubble: EventBubbles,
                cancelable: EventCancelable,
                view: Option<&Window>,
                detail: i32,
-               screenX: i32,
-               screenY: i32,
-               clientX: i32,
-               clientY: i32,
-               ctrlKey: bool,
-               altKey: bool,
-               shiftKey: bool,
-               metaKey: bool,
+               screen_x: i32,
+               screen_y: i32,
+               client_x: i32,
+               client_y: i32,
+               ctrl_key: bool,
+               alt_key: bool,
+               shift_key: bool,
+               meta_key: bool,
                button: i16,
-               relatedTarget: Option<&EventTarget>) -> Root<MouseEvent> {
+               related_target: Option<&EventTarget>) -> Root<MouseEvent> {
         let ev = MouseEvent::new_uninitialized(window);
-        ev.InitMouseEvent(type_, bool::from(canBubble), bool::from(cancelable),
+        ev.InitMouseEvent(type_, bool::from(can_bubble), bool::from(cancelable),
                           view, detail,
-                          screenX, screenY, clientX, clientY,
-                          ctrlKey, altKey, shiftKey, metaKey,
-                          button, relatedTarget);
+                          screen_x, screen_y, client_x, client_y,
+                          ctrl_key, alt_key, shift_key, meta_key,
+                          button, related_target);
         ev
     }
 
     pub fn Constructor(global: GlobalRef,
                        type_: DOMString,
                        init: &MouseEventBinding::MouseEventInit) -> Fallible<Root<MouseEvent>> {
         let bubbles = EventBubbles::from(init.parent.parent.parent.bubbles);
         let cancelable = EventCancelable::from(init.parent.parent.parent.cancelable);
@@ -161,46 +161,46 @@ impl MouseEventMethods for MouseEvent {
             (self.button.get() + 1) as i32
         } else {
             0
         }
     }
 
     // https://w3c.github.io/uievents/#widl-MouseEvent-initMouseEvent
     fn InitMouseEvent(&self,
-                      typeArg: DOMString,
-                      canBubbleArg: bool,
-                      cancelableArg: bool,
-                      viewArg: Option<&Window>,
-                      detailArg: i32,
-                      screenXArg: i32,
-                      screenYArg: i32,
-                      clientXArg: i32,
-                      clientYArg: i32,
-                      ctrlKeyArg: bool,
-                      altKeyArg: bool,
-                      shiftKeyArg: bool,
-                      metaKeyArg: bool,
-                      buttonArg: i16,
-                      relatedTargetArg: Option<&EventTarget>) {
+                      type_arg: DOMString,
+                      can_bubble_arg: bool,
+                      cancelable_arg: bool,
+                      view_arg: Option<&Window>,
+                      detail_arg: i32,
+                      screen_x_arg: i32,
+                      screen_y_arg: i32,
+                      client_x_arg: i32,
+                      client_y_arg: i32,
+                      ctrl_key_arg: bool,
+                      alt_key_arg: bool,
+                      shift_key_arg: bool,
+                      meta_key_arg: bool,
+                      button_arg: i16,
+                      related_target_arg: Option<&EventTarget>) {
         if self.upcast::<Event>().dispatching() {
             return;
         }
 
         self.upcast::<UIEvent>()
-            .InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
-        self.screen_x.set(screenXArg);
-        self.screen_y.set(screenYArg);
-        self.client_x.set(clientXArg);
-        self.client_y.set(clientYArg);
-        self.ctrl_key.set(ctrlKeyArg);
-        self.alt_key.set(altKeyArg);
-        self.shift_key.set(shiftKeyArg);
-        self.meta_key.set(metaKeyArg);
-        self.button.set(buttonArg);
-        self.related_target.set(relatedTargetArg);
+            .InitUIEvent(type_arg, can_bubble_arg, cancelable_arg, view_arg, detail_arg);
+        self.screen_x.set(screen_x_arg);
+        self.screen_y.set(screen_y_arg);
+        self.client_x.set(client_x_arg);
+        self.client_y.set(client_y_arg);
+        self.ctrl_key.set(ctrl_key_arg);
+        self.alt_key.set(alt_key_arg);
+        self.shift_key.set(shift_key_arg);
+        self.meta_key.set(meta_key_arg);
+        self.button.set(button_arg);
+        self.related_target.set(related_target_arg);
     }
 
     // https://dom.spec.whatwg.org/#dom-event-istrusted
     fn IsTrusted(&self) -> bool {
         self.uievent.IsTrusted()
     }
 }
--- a/servo/components/script/dom/navigator.rs
+++ b/servo/components/script/dom/navigator.rs
@@ -16,27 +16,27 @@ use dom::serviceworkercontainer::Service
 use dom::window::Window;
 
 #[dom_struct]
 pub struct Navigator {
     reflector_: Reflector,
     bluetooth: MutNullableHeap<JS<Bluetooth>>,
     plugins: MutNullableHeap<JS<PluginArray>>,
     mime_types: MutNullableHeap<JS<MimeTypeArray>>,
-    serviceWorker: MutNullableHeap<JS<ServiceWorkerContainer>>,
+    service_worker: MutNullableHeap<JS<ServiceWorkerContainer>>,
 }
 
 impl Navigator {
     fn new_inherited() -> Navigator {
         Navigator {
             reflector_: Reflector::new(),
             bluetooth: Default::default(),
             plugins: Default::default(),
             mime_types: Default::default(),
-            serviceWorker: Default::default(),
+            service_worker: Default::default(),
         }
     }
 
     pub fn new(window: &Window) -> Root<Navigator> {
         reflect_dom_object(box Navigator::new_inherited(),
                            GlobalRef::Window(window),
                            NavigatorBinding::Wrap)
     }
@@ -100,17 +100,17 @@ impl NavigatorMethods for Navigator {
 
     // https://html.spec.whatwg.org/multipage/#dom-navigator-javaenabled
     fn JavaEnabled(&self) -> bool {
         false
     }
 
     // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-attribute
     fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> {
-        self.serviceWorker.or_init(|| ServiceWorkerContainer::new(self.global().r()))
+        self.service_worker.or_init(|| ServiceWorkerContainer::new(self.global().r()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-navigator-cookieenabled
     fn CookieEnabled(&self) -> bool {
         true
     }
 
 }
--- a/servo/components/script/dom/node.rs
+++ b/servo/components/script/dom/node.rs
@@ -791,20 +791,20 @@ impl Node {
         }
     }
 
     pub fn unique_id(&self) -> String {
         self.unique_id.borrow().simple().to_string()
     }
 
     pub fn summarize(&self) -> NodeInfo {
-        let USVString(baseURI) = self.BaseURI();
+        let USVString(base_uri) = self.BaseURI();
         NodeInfo {
             uniqueId: self.unique_id(),
-            baseURI: baseURI,
+            baseURI: base_uri,
             parent: self.GetParentNode().map_or("".to_owned(), |node| node.unique_id()),
             nodeType: self.NodeType(),
             namespaceURI: String::new(), //FIXME
             nodeName: String::from(self.NodeName()),
             numChildren: self.ChildNodes().Length() as usize,
 
             //FIXME doctype nodes only
             name: String::new(),
@@ -2291,18 +2291,18 @@ impl NodeMethods for Node {
             // Step 1.
             None => false,
             // Step 2-6.
             Some(node) => is_equal_node(self, node)
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-node-issamenode
-    fn IsSameNode(&self, otherNode: Option<&Node>) -> bool {
-        match otherNode {
+    fn IsSameNode(&self, other_node: Option<&Node>) -> bool {
+        match other_node {
             Some(node) => self == node,
             None => false,
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-node-comparedocumentposition
     fn CompareDocumentPosition(&self, other: &Node) -> u16 {
         if self == other {
--- a/servo/components/script/dom/performance.rs
+++ b/servo/components/script/dom/performance.rs
@@ -46,13 +46,13 @@ impl Performance {
 impl PerformanceMethods for Performance {
     // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#performance-timing-attribute
     fn Timing(&self) -> Root<PerformanceTiming> {
         Root::from_ref(&*self.timing)
     }
 
     // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html#dom-performance-now
     fn Now(&self) -> DOMHighResTimeStamp {
-        let navStart = self.timing.NavigationStartPrecise();
-        let now = (time::precise_time_ns() as f64 - navStart) / 1000000 as f64;
+        let nav_start = self.timing.navigation_start_precise();
+        let now = (time::precise_time_ns() as f64 - nav_start) / 1000000 as f64;
         Finite::wrap(now)
     }
 }
--- a/servo/components/script/dom/performancetiming.rs
+++ b/servo/components/script/dom/performancetiming.rs
@@ -9,30 +9,30 @@ use dom::bindings::global::GlobalRef;
 use dom::bindings::js::{JS, Root};
 use dom::bindings::reflector::{Reflector, reflect_dom_object};
 use dom::document::Document;
 use dom::window::Window;
 
 #[dom_struct]
 pub struct PerformanceTiming {
     reflector_: Reflector,
-    navigationStart: u64,
-    navigationStartPrecise: f64,
+    navigation_start: u64,
+    navigation_start_precise: f64,
     document: JS<Document>,
 }
 
 impl PerformanceTiming {
-    fn new_inherited(navStart: u64,
-                     navStartPrecise: f64,
+    fn new_inherited(nav_start: u64,
+                     nav_start_precise: f64,
                      document: &Document)
                          -> PerformanceTiming {
         PerformanceTiming {
             reflector_: Reflector::new(),
-            navigationStart: navStart,
-            navigationStartPrecise: navStartPrecise,
+            navigation_start: nav_start,
+            navigation_start_precise: nav_start_precise,
             document: JS::from_ref(document),
         }
     }
 
     #[allow(unrooted_must_root)]
     pub fn new(window: &Window,
                navigation_start: u64,
                navigation_start_precise: f64)
@@ -43,17 +43,17 @@ impl PerformanceTiming {
         reflect_dom_object(box timing, GlobalRef::Window(window),
                            PerformanceTimingBinding::Wrap)
     }
 }
 
 impl PerformanceTimingMethods for PerformanceTiming {
     // https://w3c.github.io/navigation-timing/#widl-PerformanceTiming-navigationStart
     fn NavigationStart(&self) -> u64 {
-        self.navigationStart
+        self.navigation_start
     }
 
     // https://w3c.github.io/navigation-timing/#widl-PerformanceTiming-domLoading
     fn DomLoading(&self) -> u64 {
         self.document.get_dom_loading()
     }
 
     // https://w3c.github.io/navigation-timing/#widl-PerformanceTiming-domInteractive
@@ -84,12 +84,12 @@ impl PerformanceTimingMethods for Perfor
     // https://w3c.github.io/navigation-timing/#widl-PerformanceTiming-loadEventEnd
     fn LoadEventEnd(&self) -> u64 {
         self.document.get_load_event_end()
     }
 }
 
 
 impl PerformanceTiming {
-    pub fn NavigationStartPrecise(&self) -> f64 {
-        self.navigationStartPrecise
+    pub fn navigation_start_precise(&self) -> f64 {
+        self.navigation_start_precise
     }
 }
--- a/servo/components/script/dom/storageevent.rs
+++ b/servo/components/script/dom/storageevent.rs
@@ -15,36 +15,36 @@ use dom::event::{Event, EventBubbles, Ev
 use dom::storage::Storage;
 use dom::window::Window;
 use string_cache::Atom;
 
 #[dom_struct]
 pub struct StorageEvent {
     event: Event,
     key: Option<DOMString>,
-    oldValue: Option<DOMString>,
-    newValue: Option<DOMString>,
+    old_value: Option<DOMString>,
+    new_value: Option<DOMString>,
     url: DOMString,
-    storageArea: MutNullableHeap<JS<Storage>>
+    storage_area: MutNullableHeap<JS<Storage>>
 }
 
 
 impl StorageEvent {
     pub fn new_inherited(key: Option<DOMString>,
-                         oldValue: Option<DOMString>,
-                         newValue: Option<DOMString>,
+                         old_value: Option<DOMString>,
+                         new_value: Option<DOMString>,
                          url: DOMString,
-                         storageArea: Option<&Storage>) -> StorageEvent {
+                         storage_area: Option<&Storage>) -> StorageEvent {
         StorageEvent {
             event: Event::new_inherited(),
             key: key,
-            oldValue: oldValue,
-            newValue: newValue,
+            old_value: old_value,
+            new_value: new_value,
             url: url,
-            storageArea: MutNullableHeap::new(storageArea)
+            storage_area: MutNullableHeap::new(storage_area)
         }
     }
 
     pub fn new_uninitialized(window: &Window,
                              url: DOMString) -> Root<StorageEvent> {
         reflect_dom_object(box StorageEvent::new_inherited(None, None, None, url, None),
                            GlobalRef::Window(window),
                            StorageEventBinding::Wrap)
@@ -91,31 +91,31 @@ impl StorageEvent {
 impl StorageEventMethods for StorageEvent {
     // https://html.spec.whatwg.org/multipage/#dom-storageevent-key
     fn GetKey(&self) -> Option<DOMString> {
         self.key.clone()
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-storageevent-oldvalue
     fn GetOldValue(&self) -> Option<DOMString> {
-        self.oldValue.clone()
+        self.old_value.clone()
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-storageevent-newvalue
     fn GetNewValue(&self) -> Option<DOMString> {
-        self.newValue.clone()
+        self.new_value.clone()
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-storageevent-url
     fn Url(&self) -> DOMString {
         self.url.clone()
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-storageevent-storagearea
     fn GetStorageArea(&self) -> Option<Root<Storage>> {
-        self.storageArea.get()
+        self.storage_area.get()
     }
 
     // https://dom.spec.whatwg.org/#dom-event-istrusted
     fn IsTrusted(&self) -> bool {
         self.event.IsTrusted()
     }
 }
--- a/servo/components/script/dom/touchevent.rs
+++ b/servo/components/script/dom/touchevent.rs
@@ -50,36 +50,36 @@ impl TouchEvent {
                      target_touches: &TouchList) -> Root<TouchEvent> {
         reflect_dom_object(box TouchEvent::new_inherited(touches, changed_touches, target_touches),
                            GlobalRef::Window(window),
                            TouchEventBinding::Wrap)
     }
 
     pub fn new(window: &Window,
                type_: DOMString,
-               canBubble: EventBubbles,
+               can_bubble: EventBubbles,
                cancelable: EventCancelable,
                view: Option<&Window>,
                detail: i32,
                touches: &TouchList,
                changed_touches: &TouchList,
                target_touches: &TouchList,
-               ctrlKey: bool,
-               altKey: bool,
-               shiftKey: bool,
-               metaKey: bool) -> Root<TouchEvent> {
+               ctrl_key: bool,
+               alt_key: bool,
+               shift_key: bool,
+               meta_key: bool) -> Root<TouchEvent> {
         let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
         ev.upcast::<UIEvent>().InitUIEvent(type_,
-                                           bool::from(canBubble),
+                                           bool::from(can_bubble),
                                            bool::from(cancelable),
                                            view, detail);
-        ev.ctrl_key.set(ctrlKey);
-        ev.alt_key.set(altKey);
-        ev.shift_key.set(shiftKey);
-        ev.meta_key.set(metaKey);
+        ev.ctrl_key.set(ctrl_key);
+        ev.alt_key.set(alt_key);
+        ev.shift_key.set(shift_key);
+        ev.meta_key.set(meta_key);
         ev
     }
 }
 
 impl<'a> TouchEventMethods for &'a TouchEvent {
     /// https://w3c.github.io/touch-events/#widl-TouchEvent-ctrlKey
     fn CtrlKey(&self) -> bool {
         self.ctrl_key.get()
--- a/servo/components/script/dom/urlhelper.rs
+++ b/servo/components/script/dom/urlhelper.rs
@@ -5,17 +5,17 @@
 use dom::bindings::str::USVString;
 use std::borrow::ToOwned;
 use url::{Url, quirks};
 
 #[derive(HeapSizeOf)]
 pub struct UrlHelper;
 
 impl UrlHelper {
-    pub fn SameOrigin(urlA: &Url, urlB: &Url) -> bool { urlA.origin() == urlB.origin() }
+    pub fn SameOrigin(url_a: &Url, url_b: &Url) -> bool { url_a.origin() == url_b.origin() }
     pub fn Origin(url: &Url) -> USVString { USVString(quirks::origin(url)) }
     pub fn Href(url: &Url) -> USVString { USVString(quirks::href(url).to_owned()) }
     pub fn Hash(url: &Url) -> USVString { USVString(quirks::hash(url).to_owned()) }
     pub fn Host(url: &Url) -> USVString { USVString(quirks::host(url).to_owned()) }
     pub fn Port(url: &Url) -> USVString { USVString(quirks::port(url).to_owned()) }
     pub fn Search(url: &Url) -> USVString { USVString(quirks::search(url).to_owned()) }
     pub fn Hostname(url: &Url) -> USVString { USVString(quirks::hostname(url).to_owned()) }
     pub fn Password(url: &Url) -> USVString { USVString(quirks::password(url).to_owned()) }
--- a/servo/components/script/script_runtime.rs
+++ b/servo/components/script/script_runtime.rs
@@ -365,21 +365,21 @@ unsafe extern "C" fn gc_slice_callback(_
                 let dur = now() - start.get().unwrap();
                 start.set(None);
                 println!("GC cycle ended: duration={}", dur);
             })
         },
     };
     if !desc.is_null() {
         let desc: &GCDescription = &*desc;
-        let invocationKind = match desc.invocationKind_ {
+        let invocation_kind = match desc.invocationKind_ {
             JSGCInvocationKind::GC_NORMAL => "GC_NORMAL",
             JSGCInvocationKind::GC_SHRINK => "GC_SHRINK",
         };
-        println!("  isCompartment={}, invocationKind={}", desc.isCompartment_, invocationKind);
+        println!("  isCompartment={}, invocation_kind={}", desc.isCompartment_, invocation_kind);
     }
     let _ = stdout().flush();
 }
 
 #[allow(unsafe_code)]
 unsafe extern "C" fn debug_gc_callback(_rt: *mut JSRuntime, status: JSGCStatus, _data: *mut os::raw::c_void) {
     match status {
         JSGCStatus::JSGC_BEGIN => thread_state::enter(thread_state::IN_GC),