Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cursor and hit testing in 2020 #25280

Merged
merged 6 commits into from Dec 13, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add NodeExt::as_opaque

  • Loading branch information
nox committed Dec 13, 2019
commit fb1891f43602ac61ac61079467c9dbd7ef0513a5
@@ -14,7 +14,7 @@ use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
use servo_arc::Arc as ServoArc;
use std::marker::PhantomData as marker;
use std::sync::Arc;
use style::dom::TNode;
use style::dom::{OpaqueNode, TNode};
use style::properties::ComputedValues;
use style::selector_parser::PseudoElement;

@@ -307,6 +307,7 @@ pub(crate) trait NodeExt<'dom>: 'dom + Copy + LayoutNode + Send + Sync {
fn parent_node(self) -> Option<Self>;
fn style(self, context: &LayoutContext) -> ServoArc<ComputedValues>;

fn as_opaque(self) -> OpaqueNode;
fn layout_data_mut(&self) -> AtomicRefMut<LayoutDataForElement>;
fn element_box_slot(&self) -> BoxSlot<'dom>;
fn pseudo_element_box_slot(&self, which: WhichPseudoElement) -> BoxSlot<'dom>;
@@ -366,6 +367,10 @@ where
self.to_threadsafe().style(context.shared_context())
}

fn as_opaque(self) -> OpaqueNode {
self.opaque()
}

fn layout_data_mut(&self) -> AtomicRefMut<LayoutDataForElement> {
self.get_raw_data()
.map(|d| d.layout_data.borrow_mut())
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.