mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -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