mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
layout_2020: Add support for transitions and animations
This commit is contained in:
parent
c183f95297
commit
a238597a18
7 changed files with 54 additions and 18 deletions
|
@ -20,6 +20,7 @@ cssparser = "0.27"
|
|||
embedder_traits = { path = "../embedder_traits" }
|
||||
euclid = "0.20"
|
||||
fnv = "1.0"
|
||||
fxhash = "0.2"
|
||||
gfx = { path = "../gfx" }
|
||||
gfx_traits = { path = "../gfx_traits" }
|
||||
html5ever = "0.25"
|
||||
|
|
|
@ -26,6 +26,7 @@ use crate::style_ext::{Display, DisplayGeneratingBox};
|
|||
use crate::DefiniteContainingBlock;
|
||||
use app_units::Au;
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use fxhash::FxHashSet;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use script_layout_interface::wrapper_traits::LayoutNode;
|
||||
use script_layout_interface::{LayoutElementType, LayoutNodeType};
|
||||
|
@ -303,6 +304,15 @@ impl FragmentTree {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn remove_nodes_in_fragment_tree_from_set(&self, set: &mut FxHashSet<OpaqueNode>) {
|
||||
self.find(|fragment, _| {
|
||||
if let Some(tag) = fragment.tag().as_ref() {
|
||||
set.remove(tag);
|
||||
}
|
||||
None::<()>
|
||||
});
|
||||
}
|
||||
|
||||
pub fn get_content_box_for_node(&self, requested_node: OpaqueNode) -> Rect<Au> {
|
||||
let mut bounding_box = PhysicalRect::zero();
|
||||
self.find(|fragment, containing_block| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue