diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 59ffbf9246b..ae6fec51ec4 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4128,14 +4128,15 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, tag.get() == nsXULAtoms::treeitem)) { // Walk up to the outermost tree row group frame and tell it that // content was added. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) { @@ -4345,14 +4346,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, tag.get() == nsXULAtoms::treeitem)) { // Walk up to the outermost tree row group frame and tell it that // content was added. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) { @@ -4665,14 +4667,15 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, // has been removed (so that we can update the scrollbar state). // Walk up to the outermost tree row group frame and tell it that // content was removed. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) { diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 59ffbf9246b..ae6fec51ec4 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -4128,14 +4128,15 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, tag.get() == nsXULAtoms::treeitem)) { // Walk up to the outermost tree row group frame and tell it that // content was added. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) { @@ -4345,14 +4346,15 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, tag.get() == nsXULAtoms::treeitem)) { // Walk up to the outermost tree row group frame and tell it that // content was added. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) { @@ -4665,14 +4667,15 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, // has been removed (so that we can update the scrollbar state). // Walk up to the outermost tree row group frame and tell it that // content was removed. - nsCOMPtr parent = dont_QueryInterface(aContainer); + nsCOMPtr parent; nsCOMPtr child = dont_QueryInterface(aContainer); + child->GetParent(*getter_AddRefs(parent)); while (parent) { - child->GetParent(*getter_AddRefs(parent)); parent->GetTag(*getter_AddRefs(tag)); if (tag.get() == nsXULAtoms::tree) break; child = parent; + child->GetParent(*getter_AddRefs(parent)); } if (parent) {