diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-14 21:50:13 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-14 21:50:13 -0400 |
commit | bebec8fcb84dba6b684dfe1cc6c8a1e7741df374 (patch) | |
tree | 682329072ca4d617d06295c6576ba1c45c3db78e /dom/base/ElementInlines.h | |
parent | 5352b69a9286223272c0ed072900b4c78ba2ed7c (diff) | |
download | UXP-bebec8fcb84dba6b684dfe1cc6c8a1e7741df374.tar UXP-bebec8fcb84dba6b684dfe1cc6c8a1e7741df374.tar.gz UXP-bebec8fcb84dba6b684dfe1cc6c8a1e7741df374.tar.lz UXP-bebec8fcb84dba6b684dfe1cc6c8a1e7741df374.tar.xz UXP-bebec8fcb84dba6b684dfe1cc6c8a1e7741df374.zip |
Bug 1321284 - Crash in nsCSSFrameConstructor::GetInsertionPrevSibling when trying to reframe native anonymous content
* Make StyleChildrenIterator skip NAC generated by root element primary frame ancestors.
* Add nsINode::GetFlattenedTreeParentNodeForStyle.
* Add iterator class to find all restyle roots.
NOTE: Parts 1, 2, and "4.2"
Tag #1375
Diffstat (limited to 'dom/base/ElementInlines.h')
-rw-r--r-- | dom/base/ElementInlines.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dom/base/ElementInlines.h b/dom/base/ElementInlines.h index c68bd012e..df2cc2e24 100644 --- a/dom/base/ElementInlines.h +++ b/dom/base/ElementInlines.h @@ -25,6 +25,17 @@ Element::UnregisterActivityObserver() OwnerDoc()->UnregisterActivityObserver(this); } +inline Element* +Element::GetFlattenedTreeParentElementForStyle() const +{ + nsINode* parentNode = GetFlattenedTreeParentNodeForStyle(); + if MOZ_LIKELY(parentNode && parentNode->IsElement()) { + return parentNode->AsElement(); + } + + return nullptr; +} + } // namespace dom } // namespace mozilla |