mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
sort all uses
This commit is contained in:
parent
d3c7e31722
commit
ec07178b6f
269 changed files with 903 additions and 931 deletions
|
@ -6,8 +6,8 @@
|
|||
macro_rules! make_getter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self) -> DOMString {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
element.get_string_attribute(&Atom::from_slice($htmlname))
|
||||
|
@ -22,8 +22,8 @@ macro_rules! make_getter(
|
|||
macro_rules! make_bool_getter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self) -> bool {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not runtime.
|
||||
|
@ -39,8 +39,8 @@ macro_rules! make_bool_getter(
|
|||
macro_rules! make_uint_getter(
|
||||
($attr:ident, $htmlname:expr, $default:expr) => (
|
||||
fn $attr(self) -> u32 {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not runtime.
|
||||
|
@ -59,8 +59,8 @@ macro_rules! make_uint_getter(
|
|||
macro_rules! make_url_getter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self) -> DOMString {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not runtime.
|
||||
|
@ -77,8 +77,8 @@ macro_rules! make_url_getter(
|
|||
macro_rules! make_url_or_base_getter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self) -> DOMString {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::window::WindowHelpers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
|
@ -100,11 +100,11 @@ macro_rules! make_url_or_base_getter(
|
|||
macro_rules! make_enumerated_getter(
|
||||
( $attr:ident, $htmlname:expr, $default:expr, $(($choices: pat))|+) => (
|
||||
fn $attr(self) -> DOMString {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use string_cache::Atom;
|
||||
use std::borrow::ToOwned;
|
||||
use dom::element::AttributeHandlers;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
let mut val = element.get_string_attribute(&Atom::from_slice($htmlname));
|
||||
val.make_ascii_lowercase();
|
||||
|
@ -126,8 +126,8 @@ macro_rules! make_enumerated_getter(
|
|||
macro_rules! make_setter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self, value: DOMString) {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not at runtime.
|
||||
|
@ -140,8 +140,8 @@ macro_rules! make_setter(
|
|||
macro_rules! make_bool_setter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self, value: bool) {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not at runtime.
|
||||
|
@ -154,8 +154,8 @@ macro_rules! make_bool_setter(
|
|||
macro_rules! make_uint_setter(
|
||||
($attr:ident, $htmlname:expr, $default:expr) => (
|
||||
fn $attr(self, value: u32) {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let value = if value > 2147483647 {
|
||||
$default
|
||||
|
@ -176,8 +176,8 @@ macro_rules! make_uint_setter(
|
|||
macro_rules! make_limited_uint_setter(
|
||||
($attr:ident, $htmlname:expr, $default:expr) => (
|
||||
fn $attr(self, value: u32) -> $crate::dom::bindings::error::ErrorResult {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let value = if value == 0 {
|
||||
return Err($crate::dom::bindings::error::Error::IndexSize);
|
||||
|
@ -204,8 +204,8 @@ macro_rules! make_limited_uint_setter(
|
|||
macro_rules! make_atomic_setter(
|
||||
( $attr:ident, $htmlname:expr ) => (
|
||||
fn $attr(self, value: DOMString) {
|
||||
use dom::element::AttributeHandlers;
|
||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||
use dom::element::AttributeHandlers;
|
||||
use string_cache::Atom;
|
||||
let element = ElementCast::from_ref(self);
|
||||
// FIXME(pcwalton): Do this at compile time, not at runtime.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue