mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Replace uses of libcore with libstd in components/script
This commit is contained in:
parent
99b052d3a6
commit
a819cfb0fa
8 changed files with 9 additions and 14 deletions
|
@ -9,7 +9,7 @@ use style::thread_state;
|
||||||
|
|
||||||
/// A mutable field in the DOM.
|
/// A mutable field in the DOM.
|
||||||
///
|
///
|
||||||
/// This extends the API of `core::cell::RefCell` to allow unsafe access in
|
/// This extends the API of `std::cell::RefCell` to allow unsafe access in
|
||||||
/// certain situations, with dynamic checking in debug builds.
|
/// certain situations, with dynamic checking in debug builds.
|
||||||
#[derive(Clone, Debug, Default, HeapSizeOf, PartialEq)]
|
#[derive(Clone, Debug, Default, HeapSizeOf, PartialEq)]
|
||||||
pub struct DomRefCell<T> {
|
pub struct DomRefCell<T> {
|
||||||
|
@ -57,7 +57,7 @@ impl<T> DomRefCell<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Functionality duplicated with `core::cell::RefCell`
|
// Functionality duplicated with `std::cell::RefCell`
|
||||||
// ===================================================
|
// ===================================================
|
||||||
impl<T> DomRefCell<T> {
|
impl<T> DomRefCell<T> {
|
||||||
/// Create a new `DomRefCell` containing `value`.
|
/// Create a new `DomRefCell` containing `value`.
|
||||||
|
|
|
@ -7,7 +7,6 @@ use bluetooth_traits::{BluetoothResponse, BluetoothResponseResult};
|
||||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||||
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
|
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
|
||||||
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
|
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
|
||||||
use core::clone::Clone;
|
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit};
|
use dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit};
|
||||||
use dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
|
use dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use body::{BodyOperations, BodyType, consume_body, consume_body_with_promise};
|
use body::{BodyOperations, BodyType, consume_body, consume_body_with_promise};
|
||||||
use core::cell::Cell;
|
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
|
use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
|
||||||
use dom::bindings::codegen::Bindings::ResponseBinding;
|
use dom::bindings::codegen::Bindings::ResponseBinding;
|
||||||
|
@ -24,7 +23,7 @@ use hyper::status::StatusCode;
|
||||||
use hyper_serde::Serde;
|
use hyper_serde::Serde;
|
||||||
use net_traits::response::{ResponseBody as NetTraitsResponseBody};
|
use net_traits::response::{ResponseBody as NetTraitsResponseBody};
|
||||||
use servo_url::ServoUrl;
|
use servo_url::ServoUrl;
|
||||||
use std::cell::Ref;
|
use std::cell::{Cell, Ref};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use canvas_traits::webgl::{webgl_channel, WebGLReceiver, WebVRCommand};
|
use canvas_traits::webgl::{webgl_channel, WebGLReceiver, WebVRCommand};
|
||||||
use core::ops::Deref;
|
|
||||||
use dom::bindings::callback::ExceptionHandling;
|
use dom::bindings::callback::ExceptionHandling;
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceBinding::PerformanceMethods;
|
use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceBinding::PerformanceMethods;
|
||||||
|
@ -38,6 +37,7 @@ use script_runtime::CommonScriptMsg;
|
||||||
use script_runtime::ScriptThreadEventCategory::WebVREvent;
|
use script_runtime::ScriptThreadEventCategory::WebVREvent;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
use std::ops::Deref;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use canvas_traits::webgl::WebGLVertexArrayId;
|
use canvas_traits::webgl::WebGLVertexArrayId;
|
||||||
use core::cell::Ref;
|
|
||||||
use core::iter::FromIterator;
|
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
|
use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
|
||||||
use dom::bindings::reflector::reflect_dom_object;
|
use dom::bindings::reflector::reflect_dom_object;
|
||||||
|
@ -13,8 +11,9 @@ use dom::globalscope::GlobalScope;
|
||||||
use dom::webglbuffer::WebGLBuffer;
|
use dom::webglbuffer::WebGLBuffer;
|
||||||
use dom::webglobject::WebGLObject;
|
use dom::webglobject::WebGLObject;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use std::cell::Cell;
|
use std::cell::{Cell, Ref};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::iter::FromIterator;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct WebGLVertexArrayObjectOES {
|
pub struct WebGLVertexArrayObjectOES {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use canvas_traits::webgl::WebGLError;
|
use canvas_traits::webgl::WebGLError;
|
||||||
use core::iter::FromIterator;
|
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
|
use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
|
||||||
use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
|
use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
|
||||||
|
@ -20,6 +19,7 @@ use js::jsval::JSVal;
|
||||||
use ref_filter_map::ref_filter_map;
|
use ref_filter_map::ref_filter_map;
|
||||||
use std::cell::Ref;
|
use std::cell::Ref;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::iter::FromIterator;
|
||||||
use super::{ext, WebGLExtension};
|
use super::{ext, WebGLExtension};
|
||||||
use super::wrapper::{WebGLExtensionWrapper, TypedWebGLExtensionWrapper};
|
use super::wrapper::{WebGLExtensionWrapper, TypedWebGLExtensionWrapper};
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@ use canvas_traits::webgl::{WebGLContextShareMode, WebGLCommand, WebGLError};
|
||||||
use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender, WebGLParameter, WebVRCommand};
|
use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSender, WebGLParameter, WebVRCommand};
|
||||||
use canvas_traits::webgl::WebGLError::*;
|
use canvas_traits::webgl::WebGLError::*;
|
||||||
use canvas_traits::webgl::webgl_channel;
|
use canvas_traits::webgl::webgl_channel;
|
||||||
use core::cell::Ref;
|
|
||||||
use core::iter::FromIterator;
|
|
||||||
use dom::bindings::cell::DomRefCell;
|
use dom::bindings::cell::DomRefCell;
|
||||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
|
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{self, WebGLContextAttributes};
|
||||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||||
|
@ -55,7 +53,8 @@ use net_traits::image_cache::ImageResponse;
|
||||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||||
use script_layout_interface::HTMLCanvasDataSource;
|
use script_layout_interface::HTMLCanvasDataSource;
|
||||||
use servo_config::prefs::PREFS;
|
use servo_config::prefs::PREFS;
|
||||||
use std::cell::Cell;
|
use std::cell::{Cell, Ref};
|
||||||
|
use std::iter::FromIterator;
|
||||||
use webrender_api;
|
use webrender_api;
|
||||||
|
|
||||||
type ImagePixelResult = Result<(Vec<u8>, Size2D<i32>, bool), ()>;
|
type ImagePixelResult = Result<(Vec<u8>, Size2D<i32>, bool), ()>;
|
||||||
|
|
|
@ -30,7 +30,6 @@ extern crate byteorder;
|
||||||
extern crate canvas_traits;
|
extern crate canvas_traits;
|
||||||
extern crate caseless;
|
extern crate caseless;
|
||||||
extern crate cookie as cookie_rs;
|
extern crate cookie as cookie_rs;
|
||||||
extern crate core;
|
|
||||||
#[macro_use] extern crate cssparser;
|
#[macro_use] extern crate cssparser;
|
||||||
#[macro_use] extern crate deny_public_fields;
|
#[macro_use] extern crate deny_public_fields;
|
||||||
extern crate devtools_traits;
|
extern crate devtools_traits;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue