| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and
one for Layout 2020. As part of cleaning up and simplifying the
wrappers, this change parameterizes them on the specific layout data
they contain. This allows them to be shared again. In addition, various
small cleanups are included.
Fixes #29691.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During layout it is often useful, for various specification reasons, to
know if an element is the `<body>` element of an `<html>` element root. There
are a couple places where a brittle heuristic is used to detect `<body>`
elements. This information is going to be even more important to
properly handle `<html>` elements that inherit their overflow property from
their `<body>` children.
Implementing this properly requires updating the DOM wrapper interface.
This check does reach up to the parent of thread-safe nodes, but this is
essentially the same kind of operation that `parent_style()` does, so is
ostensibly safe.
This change should not change any behavior and is just a preparation
step for properly handle `<body>` overflow.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change extends the DocumentAnimationSet to hold animations for
pseudo-elements. Since pseudo-elements in Servo are not in the DOM like
in Gecko, they need to be handled a bit carefully in stylo. When a
pseudo-element has an animation, recascade the style. Finally, this
change passes the pseudo-element string properly to animation events.
Fixes: #10316
|
|
|
|
|
|
|
| |
This will be used in order to hold animations for pseudo elements in the
DocumentAnimationSet. Also no longer store the OpaqueNode in the
animation and transition data structures. This is already part of the
DocumentAnimationSet key.
|
|
|
|
|
|
| |
Instead of applying animations and transitions to styled elements,
include them in the cascade. This allows them to interact properly with
things like font-size and !important rules.
|
|
|
|
|
|
|
|
|
| |
This begins to address #26625 by properly applying CSS variables during
keyframe computation and no longer using `apply_declarations`. Instead,
walk the declarations, combining them into IntermediateComputedKeyframe,
maintaining declarations that modify CSS custom properties. Then compute
a set of AnimationValues for each keyframe and use those to produce
interpolated animation values.
|
|
|
|
|
|
|
|
| |
Instead of recalculating the animation style every tick of an animation,
cache the computed values when animations change. In addition to being
more efficient, this will allow us to return animation rules as property
declarations because we don't need to consult the final style to produce
them.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetLayoutData::get_style_and_layout_data becomes
GetOpaqueStyleAndLayoutData::get_opaque_style_and_layout_data.
GetRawData::get_raw_data becomes GetStyleAndLayoutData::get_style_and_layout_data.
LayoutNode::init_style_and_layout_data becomes
LayoutNode::init_opaque_style_and_layout_data.
LayoutNode::take_style_and_layout_data becomes
LayoutNode::take_opaque_style_and_layout_data.
|
|\
| |
| |
| | |
Kill ServoLayoutElement::note_dirty_descendant
|
| |
| |
| |
| |
| |
| | |
There is no need to set the dirty descendants flag unsafely from the layout side
for elements with pending restyles, we can do that on the DOM side when draining
the restyles from the Document.
|
| |
| |
| |
| | |
The previous Cell was a lie.
|
| |
| |
| |
| | |
This lets us experiment with how we store this data on the DOM side.
|
|/
|
|
| |
It now stores a NonNull<dyn Any>.
|
|
|
|
| |
That return type is Sync, which thus means that the method can be safe.
|
| |
|
|
|
|
| |
StyleSharedRwLock is Sync.
|
|
|
|
|
|
| |
For clarity, I introduce <LayoutDom<Element>>::parent_node_ref to contain
the remaining unsafety bits out of composed_parent_node_ref which is more
complex than just a field access.
|
| |
|
| |
|
|
|
|
| |
Just like Castable::is.
|
|
|
|
|
|
| |
They don't do anything fancy so there is no additional unsafety calling them
compared to using LayoutDom in the first place, the usual story of all
those changes.
|
|
|
|
| |
The other methods are actually unsafe.
|
| |
|
|
|
|
|
|
| |
This safe method is the basic block to access element attributes from layout.
We reuse it in the other attr-related layout methods to remove a pretty big
source of rampant unsafe code between script and layout.
|
| |
|
| |
|
| |
|
|
|
|
| |
Parameter E is unused and the result should be bound by 'dom.
|
| |
|
| |
|
|
|
|
|
| |
Binding the scope of the ServoLayoutNode value to the originating
TrustedNodeAddress is just theater.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|