mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
This commit is contained in:
parent
2ff7cb5a37
commit
3d57c22e9c
133 changed files with 686 additions and 596 deletions
|
@ -17,7 +17,7 @@ cookie = "0.11"
|
|||
crossbeam-channel = "0.3"
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
embedder_traits = {path = "../embedder_traits"}
|
||||
euclid = "0.19"
|
||||
euclid = "0.20"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
http = "0.1"
|
||||
hyper = "0.12"
|
||||
|
|
|
@ -25,7 +25,10 @@ use canvas_traits::webgl::WebGLPipeline;
|
|||
use crossbeam_channel::{Receiver, RecvTimeoutError, Sender};
|
||||
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use embedder_traits::Cursor;
|
||||
use euclid::{Length, Point2D, Rect, TypedScale, TypedSize2D, Vector2D};
|
||||
use euclid::{
|
||||
default::{Point2D, Rect},
|
||||
Length, Scale, Size2D, Vector2D,
|
||||
};
|
||||
use gfx_traits::Epoch;
|
||||
use http::HeaderMap;
|
||||
use hyper::Method;
|
||||
|
@ -58,7 +61,7 @@ use std::sync::Arc;
|
|||
use std::time::Duration;
|
||||
use style_traits::CSSPixel;
|
||||
use style_traits::SpeculativePainter;
|
||||
use webrender_api::units::{DeviceIntSize, DevicePixel};
|
||||
use webrender_api::units::{DeviceIntSize, DevicePixel, LayoutPixel};
|
||||
use webrender_api::{DocumentId, ExternalScrollId, ImageKey, RenderApiSender};
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
||||
|
@ -295,7 +298,10 @@ pub enum ConstellationControlMsg {
|
|||
/// Notifies script of the viewport.
|
||||
Viewport(PipelineId, Rect<f32>),
|
||||
/// Notifies script of a new set of scroll offsets.
|
||||
SetScrollState(PipelineId, Vec<(UntrustedNodeAddress, Vector2D<f32>)>),
|
||||
SetScrollState(
|
||||
PipelineId,
|
||||
Vec<(UntrustedNodeAddress, Vector2D<f32, LayoutPixel>)>,
|
||||
),
|
||||
/// Requests that the script thread immediately send the constellation the title of a pipeline.
|
||||
GetTitle(PipelineId),
|
||||
/// Notifies script thread of a change to one of its document's activity
|
||||
|
@ -753,7 +759,7 @@ pub struct ScrollState {
|
|||
/// The ID of the scroll root.
|
||||
pub scroll_id: ExternalScrollId,
|
||||
/// The scrolling offset of this stacking context.
|
||||
pub scroll_offset: Vector2D<f32>,
|
||||
pub scroll_offset: Vector2D<f32, LayoutPixel>,
|
||||
}
|
||||
|
||||
/// Data about the window size.
|
||||
|
@ -761,10 +767,10 @@ pub struct ScrollState {
|
|||
pub struct WindowSizeData {
|
||||
/// The size of the initial layout viewport, before parsing an
|
||||
/// <http://www.w3.org/TR/css-device-adapt/#initial-viewport>
|
||||
pub initial_viewport: TypedSize2D<f32, CSSPixel>,
|
||||
pub initial_viewport: Size2D<f32, CSSPixel>,
|
||||
|
||||
/// The resolution of the window in dppx, not including any "pinch zoom" factor.
|
||||
pub device_pixel_ratio: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
pub device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
}
|
||||
|
||||
/// The type of window size change.
|
||||
|
@ -953,8 +959,8 @@ pub trait Painter: SpeculativePainter {
|
|||
/// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image>
|
||||
fn draw_a_paint_image(
|
||||
&self,
|
||||
size: TypedSize2D<f32, CSSPixel>,
|
||||
zoom: TypedScale<f32, CSSPixel, DevicePixel>,
|
||||
size: Size2D<f32, CSSPixel>,
|
||||
zoom: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: Vec<(Atom, String)>,
|
||||
arguments: Vec<String>,
|
||||
) -> Result<DrawAPaintImageResult, PaintWorkletError>;
|
||||
|
|
|
@ -14,7 +14,8 @@ use crate::WorkerScriptLoadOrigin;
|
|||
use canvas_traits::canvas::{CanvasId, CanvasMsg};
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use euclid::{Size2D, TypedSize2D};
|
||||
use euclid::default::Size2D as UntypedSize2D;
|
||||
use euclid::Size2D;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
|
||||
|
@ -35,7 +36,7 @@ pub struct IFrameSize {
|
|||
/// The child browsing context for this iframe.
|
||||
pub id: BrowsingContextId,
|
||||
/// The size of the iframe.
|
||||
pub size: TypedSize2D<f32, CSSPixel>,
|
||||
pub size: Size2D<f32, CSSPixel>,
|
||||
}
|
||||
|
||||
/// An iframe sizing operation.
|
||||
|
@ -126,7 +127,10 @@ pub enum ScriptMsg {
|
|||
ChangeRunningAnimationsState(AnimationState),
|
||||
/// Requests that a new 2D canvas thread be created. (This is done in the constellation because
|
||||
/// 2D canvases may use the GPU and we don't want to give untrusted content access to the GPU.)
|
||||
CreateCanvasPaintThread(Size2D<u64>, IpcSender<(IpcSender<CanvasMsg>, CanvasId)>),
|
||||
CreateCanvasPaintThread(
|
||||
UntypedSize2D<u64>,
|
||||
IpcSender<(IpcSender<CanvasMsg>, CanvasId)>,
|
||||
),
|
||||
/// Notifies the constellation that this frame has received focus.
|
||||
Focus,
|
||||
/// Get the top-level browsing context info for a given browsing context.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#![allow(missing_docs)]
|
||||
|
||||
use cookie::Cookie;
|
||||
use euclid::Rect;
|
||||
use euclid::default::Rect;
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::BrowsingContextId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue