mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
compositing: Implement cursor
per CSS3-UI § 8.1.1 in the CEF/Mac port.
I'm not sure how we want to handle Linux cursors, and GLFW has no ability to set cursors (short of disabling it and managing it yourself).
This commit is contained in:
parent
636641f905
commit
7371e0b8e3
23 changed files with 564 additions and 171 deletions
|
@ -13,15 +13,13 @@ use flow_ref::FlowRef;
|
|||
use traversal::{RecalcStyleForNode, ConstructFlows};
|
||||
use traversal::{BubbleISizes, AssignISizes, AssignBSizesAndStoreOverflow};
|
||||
use traversal::{ComputeAbsolutePositions, BuildDisplayList};
|
||||
use url::Url;
|
||||
use util::{LayoutDataAccess, LayoutDataWrapper};
|
||||
use wrapper::{layout_node_to_unsafe_layout_node, layout_node_from_unsafe_layout_node, LayoutNode};
|
||||
use wrapper::{PostorderNodeMutTraversal, UnsafeLayoutNode};
|
||||
use wrapper::{PreorderDomTraversal, PostorderDomTraversal};
|
||||
|
||||
use servo_util::opts;
|
||||
use servo_util::time::{TimeProfilerChan, profile, TimerMetadataFrameType, TimerMetadataReflowType};
|
||||
use servo_util::time;
|
||||
use servo_util::time::{mod, ProfilerMetadata, TimeProfilerChan, profile};
|
||||
use servo_util::workqueue::{WorkQueue, WorkUnit, WorkerProxy};
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
@ -422,9 +420,7 @@ pub fn traverse_dom_preorder(root: LayoutNode,
|
|||
}
|
||||
|
||||
pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
||||
url: &Url,
|
||||
iframe: TimerMetadataFrameType,
|
||||
reflow_type: TimerMetadataReflowType,
|
||||
profiler_metadata: ProfilerMetadata,
|
||||
time_profiler_chan: TimeProfilerChan,
|
||||
shared_layout_context: &SharedLayoutContext,
|
||||
queue: &mut WorkQueue<*const SharedLayoutContext,UnsafeFlow>) {
|
||||
|
@ -436,7 +432,7 @@ pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
|||
|
||||
queue.data = shared_layout_context as *const _;
|
||||
|
||||
profile(time::LayoutParallelWarmupCategory, Some((url, iframe, reflow_type)), time_profiler_chan, || {
|
||||
profile(time::LayoutParallelWarmupCategory, profiler_metadata, time_profiler_chan, || {
|
||||
queue.push(WorkUnit {
|
||||
fun: assign_inline_sizes,
|
||||
data: mut_owned_flow_to_unsafe_flow(root),
|
||||
|
@ -449,15 +445,13 @@ pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
|||
}
|
||||
|
||||
pub fn build_display_list_for_subtree(root: &mut FlowRef,
|
||||
url: &Url,
|
||||
iframe: TimerMetadataFrameType,
|
||||
reflow_type: TimerMetadataReflowType,
|
||||
profiler_metadata: ProfilerMetadata,
|
||||
time_profiler_chan: TimeProfilerChan,
|
||||
shared_layout_context: &SharedLayoutContext,
|
||||
queue: &mut WorkQueue<*const SharedLayoutContext,UnsafeFlow>) {
|
||||
queue.data = shared_layout_context as *const _;
|
||||
|
||||
profile(time::LayoutParallelWarmupCategory, Some((url, iframe, reflow_type)), time_profiler_chan, || {
|
||||
profile(time::LayoutParallelWarmupCategory, profiler_metadata, time_profiler_chan, || {
|
||||
queue.push(WorkUnit {
|
||||
fun: compute_absolute_positions,
|
||||
data: mut_owned_flow_to_unsafe_flow(root),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue