mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Remove remaining as_slice / as_mut_slice calls.
This commit is contained in:
parent
903305416a
commit
024323004d
3 changed files with 4 additions and 4 deletions
|
@ -149,7 +149,7 @@ impl<'a> CanvasPaintTask<'a> {
|
||||||
}
|
}
|
||||||
let image_rect = Rect(Point2D(0f64, 0f64), image_size);
|
let image_rect = Rect(Point2D(0f64, 0f64), image_size);
|
||||||
// rgba -> bgra
|
// rgba -> bgra
|
||||||
byte_swap(imagedata.as_mut_slice());
|
byte_swap(&mut imagedata);
|
||||||
self.write_pixels(&imagedata, image_size, image_rect, dest_rect, smoothing_enabled);
|
self.write_pixels(&imagedata, image_size, image_rect, dest_rect, smoothing_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,11 +242,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
|
||||||
let value = attr.value();
|
let value = attr.value();
|
||||||
let recreate = match attr.local_name() {
|
let recreate = match attr.local_name() {
|
||||||
&atom!("width") => {
|
&atom!("width") => {
|
||||||
self.width.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DEFAULT_WIDTH));
|
self.width.set(parse_unsigned_integer(value.chars()).unwrap_or(DEFAULT_WIDTH));
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
&atom!("height") => {
|
&atom!("height") => {
|
||||||
self.height.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DEFAULT_HEIGHT));
|
self.height.set(parse_unsigned_integer(value.chars()).unwrap_or(DEFAULT_HEIGHT));
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
_ => false,
|
_ => false,
|
||||||
|
|
|
@ -854,7 +854,7 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> {
|
||||||
.filter_map(HTMLInputElementCast::to_temporary)
|
.filter_map(HTMLInputElementCast::to_temporary)
|
||||||
.filter(|input| {
|
.filter(|input| {
|
||||||
let input = input.root();
|
let input = input.root();
|
||||||
input.r().form_owner() == owner && match input.r().Type().as_slice() {
|
input.r().form_owner() == owner && match &*input.r().Type() {
|
||||||
"text" | "search" | "url" | "tel" |
|
"text" | "search" | "url" | "tel" |
|
||||||
"email" | "password" | "datetime" |
|
"email" | "password" | "datetime" |
|
||||||
"date" | "month" | "week" | "time" |
|
"date" | "month" | "week" | "time" |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue