mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Use u32 for reflow ids.
This commit is contained in:
parent
6f05750956
commit
54c006d159
4 changed files with 6 additions and 6 deletions
|
@ -119,7 +119,7 @@ pub struct Window {
|
||||||
parent_info: Option<(PipelineId, SubpageId)>,
|
parent_info: Option<(PipelineId, SubpageId)>,
|
||||||
|
|
||||||
/// Unique id for last reflow request; used for confirming completion reply.
|
/// Unique id for last reflow request; used for confirming completion reply.
|
||||||
last_reflow_id: Cell<uint>,
|
last_reflow_id: Cell<u32>,
|
||||||
|
|
||||||
/// Global static data related to the DOM.
|
/// Global static data related to the DOM.
|
||||||
dom_static: GlobalStaticData,
|
dom_static: GlobalStaticData,
|
||||||
|
@ -460,7 +460,7 @@ pub trait WindowHelpers {
|
||||||
fn layout(&self) -> &LayoutRPC;
|
fn layout(&self) -> &LayoutRPC;
|
||||||
fn content_box_query(self, content_box_request: TrustedNodeAddress) -> Rect<Au>;
|
fn content_box_query(self, content_box_request: TrustedNodeAddress) -> Rect<Au>;
|
||||||
fn content_boxes_query(self, content_boxes_request: TrustedNodeAddress) -> Vec<Rect<Au>>;
|
fn content_boxes_query(self, content_boxes_request: TrustedNodeAddress) -> Vec<Rect<Au>>;
|
||||||
fn handle_reflow_complete_msg(self, reflow_id: uint);
|
fn handle_reflow_complete_msg(self, reflow_id: u32);
|
||||||
fn handle_resize_inactive_msg(self, new_size: WindowSizeData);
|
fn handle_resize_inactive_msg(self, new_size: WindowSizeData);
|
||||||
fn set_fragment_name(self, fragment: Option<String>);
|
fn set_fragment_name(self, fragment: Option<String>);
|
||||||
fn steal_fragment_name(self) -> Option<String>;
|
fn steal_fragment_name(self) -> Option<String>;
|
||||||
|
@ -631,7 +631,7 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
|
||||||
rects
|
rects
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_reflow_complete_msg(self, reflow_id: uint) {
|
fn handle_reflow_complete_msg(self, reflow_id: u32) {
|
||||||
let last_reflow_id = self.last_reflow_id.get();
|
let last_reflow_id = self.last_reflow_id.get();
|
||||||
if last_reflow_id == reflow_id {
|
if last_reflow_id == reflow_id {
|
||||||
*self.layout_join_port.borrow_mut() = None;
|
*self.layout_join_port.borrow_mut() = None;
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub struct Reflow {
|
||||||
/// The channel that we send a notification to.
|
/// The channel that we send a notification to.
|
||||||
pub script_join_chan: Sender<()>,
|
pub script_join_chan: Sender<()>,
|
||||||
/// Unique identifier
|
/// Unique identifier
|
||||||
pub id: uint,
|
pub id: u32,
|
||||||
/// The type of query if any to perform during this reflow.
|
/// The type of query if any to perform during this reflow.
|
||||||
pub query_type: ReflowQueryType,
|
pub query_type: ReflowQueryType,
|
||||||
/// A clipping rectangle for the page, an enlarged rectangle containing the viewport.
|
/// A clipping rectangle for the page, an enlarged rectangle containing the viewport.
|
||||||
|
|
|
@ -846,7 +846,7 @@ impl ScriptTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles a notification that reflow completed.
|
/// Handles a notification that reflow completed.
|
||||||
fn handle_reflow_complete_msg(&self, pipeline_id: PipelineId, reflow_id: uint) {
|
fn handle_reflow_complete_msg(&self, pipeline_id: PipelineId, reflow_id: u32) {
|
||||||
debug!("Script: Reflow {:?} complete for {:?}", reflow_id, pipeline_id);
|
debug!("Script: Reflow {:?} complete for {:?}", reflow_id, pipeline_id);
|
||||||
let page = self.root_page();
|
let page = self.root_page();
|
||||||
let page = page.find(pipeline_id).expect(
|
let page = page.find(pipeline_id).expect(
|
||||||
|
|
|
@ -61,7 +61,7 @@ pub enum ConstellationControlMsg {
|
||||||
/// Sends a DOM event.
|
/// Sends a DOM event.
|
||||||
SendEvent(PipelineId, CompositorEvent),
|
SendEvent(PipelineId, CompositorEvent),
|
||||||
/// Notifies script that reflow is finished.
|
/// Notifies script that reflow is finished.
|
||||||
ReflowComplete(PipelineId, uint),
|
ReflowComplete(PipelineId, u32),
|
||||||
/// Notifies script of the viewport.
|
/// Notifies script of the viewport.
|
||||||
Viewport(PipelineId, Rect<f32>),
|
Viewport(PipelineId, Rect<f32>),
|
||||||
/// Requests that the script task immediately send the constellation the title of a pipeline.
|
/// Requests that the script task immediately send the constellation the title of a pipeline.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue