mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
script/compositor: Handle cursor updates from script (#38518)
Instead of using WebRender hit testing to update the cursor, base it on layout hit tests. This allows removing the majority of WebRender hit test items and finally opens up the possibility of adding support for custom cursors. In addition, this change fixes an issue where cursors were not set properly on areas of the viewport that extended past the page content. Testing: This is difficult to test as verifying that the cursor changed properly is beyond the capabilities of Servo's test harnesses. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
87538282db
commit
6651f37c05
21 changed files with 279 additions and 259 deletions
|
@ -31,7 +31,7 @@ use embedder_traits::{
|
|||
CompositorHitTestResult, FocusSequenceNumber, InputEvent, JavaScriptEvaluationId,
|
||||
MediaSessionActionType, Theme, ViewportDetails, WebDriverScriptCommand,
|
||||
};
|
||||
use euclid::{Rect, Scale, Size2D, UnknownUnit};
|
||||
use euclid::{Point2D, Rect, Scale, Size2D, UnknownUnit};
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use keyboard_types::Modifiers;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
|
@ -145,6 +145,9 @@ pub enum ScriptThreadMessage {
|
|||
ExitScriptThread,
|
||||
/// Sends a DOM event.
|
||||
SendInputEvent(PipelineId, ConstellationInputEvent),
|
||||
/// Ask that the given pipeline refreshes the cursor (after a display list render) based
|
||||
/// on the hit test at the given point.
|
||||
RefreshCursor(PipelineId, Point2D<f32, CSSPixel>),
|
||||
/// Notifies script of the viewport.
|
||||
Viewport(PipelineId, Rect<f32, UnknownUnit>),
|
||||
/// Requests that the script thread immediately send the constellation the title of a pipeline.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue