зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #20479 - style: Add a fast path to each_anonymous_content_child (from emilio:anon-child-bit); r=upsuper
If we know that we don't have anon children it is pointless to go through FFI. Source-Repo: https://github.com/servo/servo Source-Revision: 107fd47b93e5e8586ca27293052b9fedc75b88e4 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : c7cb1f3136acb43480759412d087f2b48c332bb5
This commit is contained in:
Родитель
380d69baeb
Коммит
2663a71223
|
@ -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) };
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче