Bug 371083: Second installment in our exiting series 'deCOMtaminate the XBL code'. r/sr=jst
This commit is contained in:
@@ -6078,12 +6078,10 @@ nsCSSFrameConstructor::ConstructXULFrame(nsFrameConstructorState& aState,
|
||||
if (!newFrame->IsLeaf()) {
|
||||
// XXXbz don't we need calls to ShouldBuildChildFrames
|
||||
// elsewhere too? Why only for XUL?
|
||||
PRBool processChildren = PR_TRUE;
|
||||
mDocument->BindingManager()->ShouldBuildChildFrames(aContent,
|
||||
&processChildren);
|
||||
if (processChildren)
|
||||
if (mDocument->BindingManager()->ShouldBuildChildFrames(aContent)) {
|
||||
rv = ProcessChildren(aState, aContent, newFrame, PR_FALSE,
|
||||
childItems, PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
CreateAnonymousFrames(aTag, aState, aContent, newFrame, PR_FALSE,
|
||||
@@ -7025,10 +7023,10 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsFrameConstructorState& aState,
|
||||
|
||||
PRBool parentIsSVG = PR_FALSE;
|
||||
if (aParentFrame && aParentFrame->GetContent()) {
|
||||
nsCOMPtr<nsIAtom> parentTag;
|
||||
PRInt32 parentNSID;
|
||||
mDocument->BindingManager()->ResolveTag(aParentFrame->GetContent(),
|
||||
&parentNSID, getter_AddRefs(parentTag));
|
||||
nsIAtom* parentTag =
|
||||
mDocument->BindingManager()->ResolveTag(aParentFrame->GetContent(),
|
||||
&parentNSID);
|
||||
|
||||
parentIsSVG = parentNSID == kNameSpaceID_SVG
|
||||
#ifdef MOZ_SVG_FOREIGNOBJECT
|
||||
@@ -7415,10 +7413,10 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsFrameConstructorState& aState,
|
||||
display = styleContext->GetStyleDisplay();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> baseTag;
|
||||
PRInt32 nameSpaceID;
|
||||
xblService->ResolveTag(aContent, &nameSpaceID, getter_AddRefs(baseTag));
|
||||
|
||||
nsCOMPtr<nsIAtom> baseTag =
|
||||
mDocument->BindingManager()->ResolveTag(aContent, &nameSpaceID);
|
||||
|
||||
if (baseTag != aTag || aNameSpaceID != nameSpaceID) {
|
||||
// Construct the frame using the XBL base tag.
|
||||
rv = ConstructFrameInternal(aState,
|
||||
@@ -8193,10 +8191,9 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
if (aContainer) {
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
PRInt32 namespaceID;
|
||||
mDocument->BindingManager()->ResolveTag(aContainer, &namespaceID,
|
||||
getter_AddRefs(tag));
|
||||
nsIAtom* tag =
|
||||
mDocument->BindingManager()->ResolveTag(aContainer, &namespaceID);
|
||||
|
||||
// Just ignore tree tags, anyway we don't create any frames for them.
|
||||
if (tag == nsGkAtoms::treechildren ||
|
||||
@@ -8226,20 +8223,15 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
|
||||
PRBool hasInsertion = PR_FALSE;
|
||||
if (!multiple) {
|
||||
nsBindingManager *bindingManager = nsnull;
|
||||
nsIDocument* document = nsnull;
|
||||
nsIContent *firstAppendedChild =
|
||||
aContainer->GetChildAt(aNewIndexInContainer);
|
||||
if (firstAppendedChild) {
|
||||
document = firstAppendedChild->GetDocument();
|
||||
}
|
||||
if (document)
|
||||
bindingManager = document->BindingManager();
|
||||
if (bindingManager) {
|
||||
nsCOMPtr<nsIContent> insParent;
|
||||
bindingManager->GetInsertionParent(firstAppendedChild, getter_AddRefs(insParent));
|
||||
if (insParent)
|
||||
hasInsertion = PR_TRUE;
|
||||
if (document &&
|
||||
document->BindingManager()->GetInsertionParent(firstAppendedChild)) {
|
||||
hasInsertion = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8696,10 +8688,9 @@ PRBool NotifyListBoxBody(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
PRInt32 namespaceID;
|
||||
aDocument->BindingManager()->ResolveTag(aContainer, &namespaceID,
|
||||
getter_AddRefs(tag));
|
||||
nsIAtom* tag =
|
||||
aDocument->BindingManager()->ResolveTag(aContainer, &namespaceID);
|
||||
|
||||
// Just ignore tree tags, anyway we don't create any frames for them.
|
||||
if (tag == nsGkAtoms::treechildren ||
|
||||
@@ -10043,9 +10034,8 @@ nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
||||
// happen otherwise).
|
||||
if (!primaryFrame && !reframe) {
|
||||
PRInt32 namespaceID;
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
mDocument->BindingManager()->ResolveTag(aContent, &namespaceID,
|
||||
getter_AddRefs(tag));
|
||||
nsIAtom* tag =
|
||||
mDocument->BindingManager()->ResolveTag(aContent, &namespaceID);
|
||||
|
||||
if (namespaceID == kNameSpaceID_XUL &&
|
||||
(tag == nsGkAtoms::listitem ||
|
||||
@@ -10105,9 +10095,8 @@ nsCSSFrameConstructor::AttributeChanged(nsIContent* aContent,
|
||||
aModType != nsIDOMMutationEvent::REMOVAL) ||
|
||||
aAttribute == nsGkAtoms::menuactive)) {
|
||||
PRInt32 namespaceID;
|
||||
nsCOMPtr<nsIAtom> tag;
|
||||
mDocument->BindingManager()->ResolveTag(aContent, &namespaceID,
|
||||
getter_AddRefs(tag));
|
||||
nsIAtom* tag =
|
||||
mDocument->BindingManager()->ResolveTag(aContent, &namespaceID);
|
||||
|
||||
if (namespaceID == kNameSpaceID_XUL &&
|
||||
(tag == nsGkAtoms::menupopup || tag == nsGkAtoms::popup ||
|
||||
|
||||
Reference in New Issue
Block a user