Bug 1404789 - Stop reconstructing frames for the whole shadow root each time content is inserted in a shadow tree

* Cleanup a bit the ShadowRoot code
* Privatize ShadowRoot methods
* When the shadow tree distribution changes, post a restyle + reframe
* Simplify ShadowRoot::IsPooledNode
* Be a bit better at detecting distribution changes

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 06:41:00 -04:00 committed by Roy Tam
commit 1846dde168
7 changed files with 243 additions and 137 deletions

View file

@ -29,14 +29,7 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLContentElement,
nsGenericHTMLElement)
static HTMLContentElement* FromContent(nsIContent* aContent)
{
if (aContent->IsHTMLContentElement()) {
return static_cast<HTMLContentElement*>(aContent);
}
return nullptr;
}
NS_IMPL_FROMCONTENT_HELPER(HTMLContentElement, IsHTMLContentElement())
virtual bool IsHTMLContentElement() const override { return true; }