mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1383988 - stylo: Ensure editor handle elements are styled before attempting to construct frames for them. r=hiro
MozReview-Commit-ID: 2T0ZjP00U7A --HG-- extra : rebase_source : 02e527baac50c2267afb3ed199aee91e72a08b02
This commit is contained in:
parent
bb0627f06b
commit
7b2f841ea9
@ -236,6 +236,12 @@ HTMLEditor::CreateAnonymousElement(nsIAtom* aTag,
|
||||
}
|
||||
nac->AppendElement(newContent);
|
||||
|
||||
// Must style the new element, otherwise the PostRecreateFramesFor call
|
||||
// below will do nothing.
|
||||
if (ServoStyleSet* styleSet = ps->StyleSet()->GetAsServo()) {
|
||||
styleSet->StyleNewSubtree(newContent);
|
||||
}
|
||||
|
||||
ElementDeletionObserver* observer =
|
||||
new ElementDeletionObserver(newContent, parentContent);
|
||||
NS_ADDREF(observer); // NodeWillBeDestroyed releases.
|
||||
|
Loading…
Reference in New Issue
Block a user