зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1471095. Don't do extra work we don't need to in ReparentWrappersInSubtree. r=smaug
This commit is contained in:
Родитель
1a89c712a8
Коммит
fcb00cb36f
|
@ -1313,18 +1313,6 @@ ReparentWrappersInSubtree(nsIContent* aRoot)
|
|||
|
||||
JSContext* cx = jsapi.cx();
|
||||
|
||||
nsIGlobalObject* docGlobal = aRoot->OwnerDoc()->GetScopeObject();
|
||||
if (NS_WARN_IF(!docGlobal)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
JS::Rooted<JSObject*> rootedGlobal(cx, docGlobal->GetGlobalJSObject());
|
||||
if (NS_WARN_IF(!rootedGlobal)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
rootedGlobal = xpc::GetXBLScope(cx, rootedGlobal);
|
||||
|
||||
ErrorResult rv;
|
||||
JS::Rooted<JSObject*> reflector(cx);
|
||||
for (nsIContent* cur = aRoot; cur; cur = cur->GetNextNode(aRoot)) {
|
||||
|
|
|
@ -1916,6 +1916,11 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
|
|||
CreateGeneratedContent(aState, aParentContent, pseudoComputedStyle,
|
||||
contentIndex);
|
||||
if (content) {
|
||||
// We don't strictly have to set NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE
|
||||
// here; it would get set under AppendChildTo. But AppendChildTo might
|
||||
// think that we're going from not being anonymous to being anonymous and
|
||||
// do some extra work; setting the flag here avoids that.
|
||||
content->SetFlags(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE);
|
||||
container->AppendChildTo(content, false);
|
||||
if (content->IsElement()) {
|
||||
// If we created any children elements, Servo needs to traverse them, but
|
||||
|
|
Загрузка…
Ссылка в новой задаче