aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-05-27 13:32:05 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-05-27 13:32:05 -0400
commit3cb8af20c24ea0972220fa3fa7cbfcbd99c0848e (patch)
tree4012cf37e6c594149bc8fe7e19b097c7518156e8 /components/script/dom
parent4ebc065cba15184c8f63a28f128ec833fffccef7 (diff)
downloadservo-3cb8af20c24ea0972220fa3fa7cbfcbd99c0848e.tar.gz
servo-3cb8af20c24ea0972220fa3fa7cbfcbd99c0848e.zip
Remove empty lines following braces.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/blob.rs3
-rw-r--r--components/script/dom/bluetooth.rs1
-rw-r--r--components/script/dom/bluetoothdevice.rs1
-rw-r--r--components/script/dom/bluetoothremotegattcharacteristic.rs1
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs1
-rw-r--r--components/script/dom/bluetoothremotegattserver.rs1
-rw-r--r--components/script/dom/bluetoothuuid.rs1
-rw-r--r--components/script/dom/canvasrenderingcontext2d.rs1
-rw-r--r--components/script/dom/cssstyledeclaration.rs1
-rw-r--r--components/script/dom/dedicatedworkerglobalscope.rs1
-rw-r--r--components/script/dom/document.rs2
-rw-r--r--components/script/dom/domquad.rs1
-rw-r--r--components/script/dom/element.rs3
-rw-r--r--components/script/dom/file.rs1
-rw-r--r--components/script/dom/filereader.rs4
-rw-r--r--components/script/dom/forcetouchevent.rs1
-rw-r--r--components/script/dom/htmlanchorelement.rs1
-rw-r--r--components/script/dom/htmlcanvaselement.rs1
-rw-r--r--components/script/dom/htmlinputelement.rs2
-rw-r--r--components/script/dom/node.rs2
-rw-r--r--components/script/dom/nodeiterator.rs1
-rw-r--r--components/script/dom/performancetiming.rs1
-rw-r--r--components/script/dom/pluginarray.rs1
-rw-r--r--components/script/dom/validitystate.rs1
-rw-r--r--components/script/dom/websocket.rs2
-rw-r--r--components/script/dom/window.rs1
26 files changed, 1 insertions, 36 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs
index 47d758d3028..19fe0f4fdc2 100644
--- a/components/script/dom/blob.rs
+++ b/components/script/dom/blob.rs
@@ -94,7 +94,6 @@ pub struct Blob {
}
impl Blob {
-
pub fn new(global: GlobalRef, slice: DataSlice, typeString: &str) -> Root<Blob> {
let boxed_blob = box Blob::new_inherited(slice, typeString);
reflect_dom_object(boxed_blob, global, BlobBinding::Wrap)
@@ -114,7 +113,6 @@ impl Blob {
blobParts: Option<Vec<BlobOrString>>,
blobPropertyBag: &BlobBinding::BlobPropertyBag)
-> Fallible<Root<Blob>> {
-
// TODO: accept other blobParts types - ArrayBuffer or ArrayBufferView
let bytes: Vec<u8> = match blobParts {
None => Vec::new(),
@@ -160,7 +158,6 @@ impl BlobMethods for Blob {
end: Option<i64>,
contentType: Option<DOMString>)
-> Root<Blob> {
-
let relativeContentType = match contentType {
None => DOMString::new(),
Some(mut str) => {
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs
index 3afc31d71a7..9617dad4485 100644
--- a/components/script/dom/bluetooth.rs
+++ b/components/script/dom/bluetooth.rs
@@ -128,7 +128,6 @@ fn convert_request_device_options(options: &RequestDeviceOptions,
}
impl BluetoothMethods for Bluetooth {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetooth-requestdevice
fn RequestDevice(&self, option: &RequestDeviceOptions) -> Fallible<Root<BluetoothDevice>> {
let (sender, receiver) = ipc::channel().unwrap();
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index ad575b47e18..d82901b03de 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -49,7 +49,6 @@ impl BluetoothDevice {
}
impl BluetoothDeviceMethods for BluetoothDevice {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-id
fn Id(&self) -> DOMString {
self.id.clone()
diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs
index 5ad8d89c25b..cb1585b559f 100644
--- a/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -75,7 +75,6 @@ impl BluetoothRemoteGATTCharacteristic {
}
impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteristic {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-properties
fn Properties(&self) -> Root<BluetoothCharacteristicProperties> {
self.properties.get()
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index f7ed72ee0a8..03de0a52dd6 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -68,7 +68,6 @@ impl BluetoothRemoteGATTDescriptor {
}
impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-characteristic
fn Characteristic(&self) -> Root<BluetoothRemoteGATTCharacteristic> {
self.characteristic.get()
diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs
index 6935f0207eb..4813aa77183 100644
--- a/components/script/dom/bluetoothremotegattserver.rs
+++ b/components/script/dom/bluetoothremotegattserver.rs
@@ -49,7 +49,6 @@ impl BluetoothRemoteGATTServer {
}
impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-device
fn Device(&self) -> Root<BluetoothDevice> {
self.device.get()
diff --git a/components/script/dom/bluetoothuuid.rs b/components/script/dom/bluetoothuuid.rs
index ab51d37c6e7..dafda71a12b 100644
--- a/components/script/dom/bluetoothuuid.rs
+++ b/components/script/dom/bluetoothuuid.rs
@@ -270,7 +270,6 @@ const DESCRIPTOR_PREFIX: &'static str = "org.bluetooth.descriptor";
const VALID_UUID_REGEX: &'static str = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
impl BluetoothUUID {
-
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-canonicaluuid
pub fn CanonicalUUID(_: GlobalRef, alias: u32) -> UUID {
DOMString::from(format!("{:08x}", &alias) + BASE_UUID)
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs
index 88d11c78205..6507d013010 100644
--- a/components/script/dom/canvasrenderingcontext2d.rs
+++ b/components/script/dom/canvasrenderingcontext2d.rs
@@ -1040,7 +1040,6 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
sw: Finite<f64>,
sh: Finite<f64>)
-> Fallible<Root<ImageData>> {
-
if !self.origin_is_clean() {
return Err(Error::Security)
}
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs
index dac16d72bcf..4da0b1a019c 100644
--- a/components/script/dom/cssstyledeclaration.rs
+++ b/components/script/dom/cssstyledeclaration.rs
@@ -182,7 +182,6 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
if shorthand.longhands().iter()
.map(|&longhand| self.GetPropertyPriority(DOMString::from(longhand)))
.all(|priority| priority == "important") {
-
return DOMString::from("important");
}
// Step 3
diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs
index d02c57845ea..295b0029cb3 100644
--- a/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/components/script/dom/dedicatedworkerglobalscope.rs
@@ -167,7 +167,6 @@ impl DedicatedWorkerGlobalScope {
timer_event_chan: IpcSender<TimerEvent>,
timer_event_port: Receiver<(TrustedWorkerAddress, TimerEvent)>)
-> DedicatedWorkerGlobalScope {
-
DedicatedWorkerGlobalScope {
workerglobalscope: WorkerGlobalScope::new_inherited(init,
worker_url,
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 00dec5d995f..cda64a2070d 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -600,7 +600,6 @@ impl Document {
/// Reassign the focus context to the element that last requested focus during this
/// transaction, or none if no elements requested it.
pub fn commit_focus_transaction(&self, focus_type: FocusType) {
-
if let Some(ref elem) = self.focused.get() {
let node = elem.upcast::<Node>();
elem.set_focus_state(false);
@@ -755,7 +754,6 @@ impl Document {
client_point: Point2D<f32>,
pressure: f32,
phase_now: TouchpadPressurePhase) {
-
let phase_before = self.touchpad_pressure_phase.get();
self.touchpad_pressure_phase.set(phase_now);
diff --git a/components/script/dom/domquad.rs b/components/script/dom/domquad.rs
index a53464739dc..a9af14d3d69 100644
--- a/components/script/dom/domquad.rs
+++ b/components/script/dom/domquad.rs
@@ -28,7 +28,6 @@ impl DOMQuad {
p3: &DOMPoint,
p4: &DOMPoint)
-> DOMQuad {
-
DOMQuad {
reflector_: Reflector::new(),
p1: JS::from_ref(p1),
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index cf40c038c81..2d92c5995e3 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -758,7 +758,6 @@ impl Element {
pub fn update_inline_style(&self,
declarations: Vec<PropertyDeclaration>,
style_priority: StylePriority) {
-
fn update(element: &Element, mut declarations: Vec<PropertyDeclaration>, style_priority: StylePriority) {
let mut inline_declarations = element.style_attribute().borrow_mut();
if let &mut Some(ref mut existing_declarations) = &mut *inline_declarations {
@@ -1285,7 +1284,6 @@ impl Element {
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
pub fn scroll(&self, x_: f64, y_: f64, behavior: ScrollBehavior) {
-
// Step 1.2 or 2.3
let x = if x_.is_finite() { x_ } else { 0.0f64 };
let y = if y_.is_finite() { y_ } else { 0.0f64 };
@@ -1476,7 +1474,6 @@ impl ElementMethods for Element {
});
if let Some(position) = position {
-
let old_attr = Root::from_ref(&*self.attrs.borrow()[position]);
// Step 3.
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs
index f566b4426b4..e8cdf89de54 100644
--- a/components/script/dom/file.rs
+++ b/components/script/dom/file.rs
@@ -80,7 +80,6 @@ impl File {
}
impl FileMethods for File {
-
// https://w3c.github.io/FileAPI/#dfn-name
fn Name(&self) -> DOMString {
self.name.clone()
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 175e771ffa7..58aa1dc1ba3 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -79,7 +79,7 @@ pub struct FileReader {
impl FileReader {
pub fn new_inherited() -> FileReader {
FileReader {
- eventtarget: EventTarget::new_inherited(),//?
+ eventtarget: EventTarget::new_inherited(),
ready_state: Cell::new(FileReaderReadyState::Empty),
error: MutNullableHeap::new(None),
result: DOMRefCell::new(None),
@@ -201,7 +201,6 @@ impl FileReader {
// https://w3c.github.io/FileAPI/#dfn-readAsText
fn perform_readastext(data: ReadMetaData, blob_bytes: &[u8])
-> DOMString {
-
let blob_label = &data.label;
let blob_type = &data.blobtype;
@@ -319,7 +318,6 @@ impl FileReaderMethods for FileReader {
impl FileReader {
fn dispatch_progress_event(&self, type_: Atom, loaded: u64, total: Option<u64>) {
-
let global = self.global();
let progressevent = ProgressEvent::new(global.r(),
type_, EventBubbles::DoesNotBubble, EventCancelable::NotCancelable,
diff --git a/components/script/dom/forcetouchevent.rs b/components/script/dom/forcetouchevent.rs
index 1bc8a966cc5..e982cfdf86e 100644
--- a/components/script/dom/forcetouchevent.rs
+++ b/components/script/dom/forcetouchevent.rs
@@ -39,7 +39,6 @@ impl ForceTouchEvent {
}
impl<'a> ForceTouchEventMethods for &'a ForceTouchEvent {
-
fn ServoForce(&self) -> Finite<f32> {
Finite::wrap(self.force)
}
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs
index 7807ad67870..37daa0ef6e0 100644
--- a/components/script/dom/htmlanchorelement.rs
+++ b/components/script/dom/htmlanchorelement.rs
@@ -516,7 +516,6 @@ impl Activatable for HTMLAnchorElement {
let mut ismap_suffix = None;
if let Some(element) = target.downcast::<Element>() {
if target.is::<HTMLImageElement>() && element.has_attribute(&atom!("ismap")) {
-
let target_node = element.upcast::<Node>();
let rect = window_from_node(target_node).content_box_query(
target_node.to_trusted_node_address());
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs
index cf36ee9673b..5bd8f77e630 100644
--- a/components/script/dom/htmlcanvaselement.rs
+++ b/components/script/dom/htmlcanvaselement.rs
@@ -254,7 +254,6 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
_context: *mut JSContext,
_mime_type: Option<DOMString>,
_arguments: Vec<HandleValue>) -> Fallible<DOMString> {
-
// Step 1.
if let Some(CanvasContext::Context2d(ref context)) = *self.context.borrow() {
if !context.origin_is_clean() {
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 8977d45048e..c9efb81ea7e 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -270,7 +270,6 @@ impl LayoutHTMLInputElementHelpers for LayoutJS<HTMLInputElement> {
}
impl HTMLInputElementMethods for HTMLInputElement {
-
// https://html.spec.whatwg.org/multipage/#dom-input-accept
make_getter!(Accept, "accept");
@@ -786,7 +785,6 @@ impl VirtualMethods for HTMLInputElement {
let new_value_mode = self.value_mode();
match (&old_value_mode, old_idl_value.is_empty(), new_value_mode) {
-
// Step 1
(&ValueMode::Value, false, ValueMode::Default) |
(&ValueMode::Value, false, ValueMode::DefaultOn) => {
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 711e0ba740c..71dccf4be27 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1638,7 +1638,6 @@ impl Node {
// https://dom.spec.whatwg.org/#concept-node-clone
pub fn clone(node: &Node, maybe_doc: Option<&Document>,
clone_children: CloneChildrenFlag) -> Root<Node> {
-
// Step 1.
let document = match maybe_doc {
Some(doc) => Root::from_ref(doc),
@@ -1994,7 +1993,6 @@ impl NodeMethods for Node {
// https://dom.spec.whatwg.org/#concept-node-replace
fn ReplaceChild(&self, node: &Node, child: &Node) -> Fallible<Root<Node>> {
-
// Step 1.
match self.type_id() {
NodeTypeId::Document(_) |
diff --git a/components/script/dom/nodeiterator.rs b/components/script/dom/nodeiterator.rs
index 2753465d49e..14b8f240fbb 100644
--- a/components/script/dom/nodeiterator.rs
+++ b/components/script/dom/nodeiterator.rs
@@ -166,7 +166,6 @@ impl NodeIteratorMethods for NodeIterator {
// Step 3-1.
for preceding_node in node.preceding_nodes(&self.root_node) {
-
// Step 3-2.
let result = try!(self.accept_node(preceding_node.r()));
diff --git a/components/script/dom/performancetiming.rs b/components/script/dom/performancetiming.rs
index 02da92f3b89..9fe012fbc1c 100644
--- a/components/script/dom/performancetiming.rs
+++ b/components/script/dom/performancetiming.rs
@@ -37,7 +37,6 @@ impl PerformanceTiming {
navigation_start: u64,
navigation_start_precise: f64)
-> Root<PerformanceTiming> {
-
let timing = PerformanceTiming::new_inherited(navigation_start,
navigation_start_precise,
window.Document().r());
diff --git a/components/script/dom/pluginarray.rs b/components/script/dom/pluginarray.rs
index 5cbf589b7e7..aabba4928a4 100644
--- a/components/script/dom/pluginarray.rs
+++ b/components/script/dom/pluginarray.rs
@@ -32,7 +32,6 @@ impl PluginArray {
impl PluginArrayMethods for PluginArray {
// https://html.spec.whatwg.org/multipage/#dom-pluginarray-refresh
fn Refresh(&self, _reload: bool) {
-
}
// https://html.spec.whatwg.org/multipage/#dom-pluginarray-length
diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs
index bd2cbb21aa7..7595566f275 100644
--- a/components/script/dom/validitystate.rs
+++ b/components/script/dom/validitystate.rs
@@ -53,7 +53,6 @@ impl ValidityState {
}
impl ValidityStateMethods for ValidityState {
-
// https://html.spec.whatwg.org/multipage/#dom-validitystate-valuemissing
fn ValueMissing(&self) -> bool {
false
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs
index 8735394a7a9..c947a587687 100644
--- a/components/script/dom/websocket.rs
+++ b/components/script/dom/websocket.rs
@@ -382,7 +382,6 @@ impl WebSocketMethods for WebSocket {
// https://html.spec.whatwg.org/multipage/#dom-websocket-send
fn Send(&self, data: USVString) -> ErrorResult {
-
let data_byte_len = data.0.as_bytes().len() as u64;
let send_data = try!(self.send_impl(data_byte_len));
@@ -397,7 +396,6 @@ impl WebSocketMethods for WebSocket {
// https://html.spec.whatwg.org/multipage/#dom-websocket-send
fn Send_(&self, blob: &Blob) -> ErrorResult {
-
/* As per https://html.spec.whatwg.org/multipage/#websocket
the buffered amount needs to be clamped to u32, even though Blob.Size() is u64
If the buffer limit is reached in the first place, there are likely other major problems
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 2cd6c4daf9e..d77645d49e9 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -1197,7 +1197,6 @@ impl Window {
// https://drafts.csswg.org/cssom-view/#dom-element-scroll
pub fn scroll_node(&self, node: TrustedNodeAddress,
x_: f64, y_: f64, behavior: ScrollBehavior) {
-
self.reflow(ReflowGoal::ForScriptQuery,
ReflowQueryType::NodeLayerIdQuery(node),
ReflowReason::Query);