mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Fix build warnings.
This commit is contained in:
parent
0298c92670
commit
d4888dbd4d
7 changed files with 8 additions and 10 deletions
|
@ -3,13 +3,12 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#![feature(arc_weak)]
|
#![feature(arc_weak)]
|
||||||
#![feature(box_raw)]
|
#![cfg_attr(any(target_os="linux", target_os = "android"), feature(box_raw))]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(custom_attribute)]
|
#![feature(custom_attribute)]
|
||||||
#![feature(custom_derive)]
|
#![feature(custom_derive)]
|
||||||
#![feature(float_consts)]
|
|
||||||
#![feature(hashmap_hasher)]
|
#![feature(hashmap_hasher)]
|
||||||
#![feature(heap_api)]
|
#![cfg_attr(any(target_os="linux", target_os = "android"), feature(heap_api))]
|
||||||
#![feature(iter_cmp)]
|
#![feature(iter_cmp)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(str_char)]
|
#![feature(str_char)]
|
||||||
|
|
|
@ -590,7 +590,7 @@ impl<'a> PaintContext<'a> {
|
||||||
bounds.origin.y + radii.top_right),
|
bounds.origin.y + radii.top_right),
|
||||||
radii.top_right,
|
radii.top_right,
|
||||||
1.5f32 * f32::consts::FRAC_PI_2,
|
1.5f32 * f32::consts::FRAC_PI_2,
|
||||||
f32::consts::PI_2,
|
2.0f32 * f32::consts::PI,
|
||||||
false); // 3
|
false); // 3
|
||||||
path_builder.line_to(Point2D::new(bounds.max_x(), bounds.max_y() - radii.bottom_right)); // 4
|
path_builder.line_to(Point2D::new(bounds.max_x(), bounds.max_y() - radii.bottom_right)); // 4
|
||||||
path_builder.arc(Point2D::new(bounds.max_x() - radii.bottom_right,
|
path_builder.arc(Point2D::new(bounds.max_x() - radii.bottom_right,
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
for operation in operations {
|
for operation in operations {
|
||||||
let matrix = match operation {
|
let matrix = match operation {
|
||||||
&transform::ComputedOperation::Rotate(ax, ay, az, theta) => {
|
&transform::ComputedOperation::Rotate(ax, ay, az, theta) => {
|
||||||
let theta = f32::consts::PI_2 - theta.radians();
|
let theta = 2.0f32 * f32::consts::PI - theta.radians();
|
||||||
Matrix4::create_rotation(ax, ay, az, theta)
|
Matrix4::create_rotation(ax, ay, az, theta)
|
||||||
}
|
}
|
||||||
&transform::ComputedOperation::Perspective(d) => {
|
&transform::ComputedOperation::Perspective(d) => {
|
||||||
|
|
|
@ -63,7 +63,6 @@ use std::collections::HashMap;
|
||||||
use std::collections::hash_state::DefaultState;
|
use std::collections::hash_state::DefaultState;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::ptr;
|
|
||||||
use std::sync::mpsc::{channel, Sender, Receiver, Select};
|
use std::sync::mpsc::{channel, Sender, Receiver, Select};
|
||||||
use std::sync::{Arc, Mutex, MutexGuard};
|
use std::sync::{Arc, Mutex, MutexGuard};
|
||||||
use style::computed_values::{filter, mix_blend_mode};
|
use style::computed_values::{filter, mix_blend_mode};
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#![feature(arc_unique)]
|
#![feature(arc_unique)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(filling_drop)]
|
#![feature(filling_drop)]
|
||||||
#![feature(float_consts)]
|
|
||||||
#![feature(hashmap_hasher)]
|
#![feature(hashmap_hasher)]
|
||||||
#![feature(heap_api)]
|
#![feature(heap_api)]
|
||||||
#![feature(mpsc_select)]
|
#![feature(mpsc_select)]
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub use self::Stolen::{Empty, Abort, Data};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::rt::heap::{allocate, deallocate};
|
use std::rt::heap::{allocate, deallocate};
|
||||||
use std::marker;
|
use std::marker;
|
||||||
use std::mem::{forget, min_align_of, size_of, transmute};
|
use std::mem::{forget, align_of, size_of, transmute};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
@ -354,7 +354,7 @@ fn buffer_alloc_size<T>(log_size: usize) -> usize {
|
||||||
impl<T> Buffer<T> {
|
impl<T> Buffer<T> {
|
||||||
unsafe fn new(log_size: usize) -> Buffer<T> {
|
unsafe fn new(log_size: usize) -> Buffer<T> {
|
||||||
let size = buffer_alloc_size::<T>(log_size);
|
let size = buffer_alloc_size::<T>(log_size);
|
||||||
let buffer = allocate(size, min_align_of::<T>());
|
let buffer = allocate(size, align_of::<T>());
|
||||||
if buffer.is_null() { ::alloc::oom() }
|
if buffer.is_null() { ::alloc::oom() }
|
||||||
Buffer {
|
Buffer {
|
||||||
storage: buffer as *const T,
|
storage: buffer as *const T,
|
||||||
|
@ -403,6 +403,6 @@ impl<T> Drop for Buffer<T> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// It is assumed that all buffers are empty on drop.
|
// It is assumed that all buffers are empty on drop.
|
||||||
let size = buffer_alloc_size::<T>(self.log_size);
|
let size = buffer_alloc_size::<T>(self.log_size);
|
||||||
unsafe { deallocate(self.storage as *mut u8, size, min_align_of::<T>()) }
|
unsafe { deallocate(self.storage as *mut u8, size, align_of::<T>()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ const CMD_OR_ALT : constellation_msg::KeyModifiers = SUPER;
|
||||||
const CMD_OR_ALT : constellation_msg::KeyModifiers = ALT;
|
const CMD_OR_ALT : constellation_msg::KeyModifiers = ALT;
|
||||||
|
|
||||||
// This should vary by zoom level and maybe actual text size (focused or under cursor)
|
// This should vary by zoom level and maybe actual text size (focused or under cursor)
|
||||||
|
#[cfg(feature = "window")]
|
||||||
const LINE_HEIGHT : f32 = 38.0;
|
const LINE_HEIGHT : f32 = 38.0;
|
||||||
|
|
||||||
/// The type of a window.
|
/// The type of a window.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue