mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Add a fast path to each_anonymous_content_child.
If we know that we don't have anon children it is pointless to go through FFI.
This commit is contained in:
parent
d232705106
commit
f815d2f9c6
1 changed files with 4 additions and 0 deletions
|
@ -1121,6 +1121,10 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
where
|
||||
F: FnMut(Self),
|
||||
{
|
||||
if !self.may_have_anonymous_children() {
|
||||
return;
|
||||
}
|
||||
|
||||
let array: *mut structs::nsTArray<*mut nsIContent> =
|
||||
unsafe { bindings::Gecko_GetAnonymousContentForElement(self.0) };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue