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
|
@ -24,7 +24,7 @@ use base::id::{BrowsingContextId, PipelineId, WebViewId};
|
|||
use bitflags::bitflags;
|
||||
use compositing_traits::CrossProcessCompositorApi;
|
||||
use constellation_traits::LoadData;
|
||||
use embedder_traits::{Theme, UntrustedNodeAddress, ViewportDetails};
|
||||
use embedder_traits::{Cursor, Theme, UntrustedNodeAddress, ViewportDetails};
|
||||
use euclid::Point2D;
|
||||
use euclid::default::{Point2D as UntypedPoint2D, Rect};
|
||||
use fnv::FnvHashMap;
|
||||
|
@ -613,6 +613,9 @@ pub struct ElementsFromPointResult {
|
|||
/// The [`Point2D`] of the original query point relative to the
|
||||
/// node fragment rectangle.
|
||||
pub point_in_target: Point2D<f32, CSSPixel>,
|
||||
/// The [`Cursor`] that's defined on the item that is hit by this
|
||||
/// hit test result.
|
||||
pub cursor: Cursor,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue