Bug 128408 - XBL select widgets crash in embedding apps. Fixing the

select binding to load synchronously as it was intended to, and removing
usage of the outlinercols binding to ensure that the OutlinerColFrame is
constructed before the OutlinerBodyFrame.  r=varga, sr=shaver, a=roc.


git-svn-id: svn://10.0.0.236/trunk@115688 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%netscape.com 2002-03-03 23:31:26 +00:00
parent 52fa0a2506
commit af01c27e5a
9 changed files with 14 additions and 43 deletions

View File

@ -1110,9 +1110,11 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
nsCOMPtr<nsIAtom> tagName;
if (aBoundElement)
aBoundElement->GetTag(*getter_AddRefs(tagName));
if (!info && bindingManager && (tagName.get() != nsXULAtoms::scrollbar) &&
(tagName.get() != nsXULAtoms::thumb) && (tagName.get() != kInputAtom)
&& !aForceSyncLoad) {
if (!info && bindingManager &&
(tagName != nsXULAtoms::scrollbar) &&
(tagName != nsXULAtoms::thumb) &&
(tagName != kInputAtom) &&
(tagName != nsHTMLAtoms::select) && !aForceSyncLoad) {
// The third line of defense is to investigate whether or not the
// document is currently being loaded asynchronously. If so, there's no
// document yet, but we need to glom on our request so that it will be
@ -1315,8 +1317,9 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
if (aBoundElement)
aBoundElement->GetTag(*getter_AddRefs(tagName));
if (tagName.get() == nsXULAtoms::scrollbar || tagName.get() == nsXULAtoms::thumb ||
IsResourceURI(aURI))
if (tagName == nsXULAtoms::scrollbar ||
tagName == nsXULAtoms::thumb ||
tagName == nsHTMLAtoms::select || IsResourceURI(aURI))
aForceSyncLoad = PR_TRUE;
nsCOMPtr<nsIStreamListener> listener;

View File

@ -4478,15 +4478,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsIPresShell* aPresShell,
rv = ConstructTextControlFrame(aPresShell, aPresContext, newFrame, aContent);
}
else if (nsHTMLAtoms::select == aTag) {
if (UseXBLForms()) {
static PRBool loadedSelectBinding = PR_FALSE;
if (!loadedSelectBinding) {
loadedSelectBinding = PR_TRUE;
nsCOMPtr<nsIXBLBinding> binding;
nsCAutoString bindingUrl("chrome://forms/content/select.xml#select");
gXBLService->GetBinding(aContent, bindingUrl, getter_AddRefs(binding));
}
} else {
if (!UseXBLForms()) {
if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames
ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems);
}

View File

@ -137,9 +137,9 @@
<binding id="select-size" extends="xul:outliner">
<content>
<xul:outlinercols class="select-outlinercols">
<xul:hbox>
<xul:outlinercol class="select-outlinercol" flex="1"/>
</xul:outlinercols>
</xul:hbox>
<xul:outlinerrows class="select-outlinerrows outliner-rows" flex="1">
<xul:hbox flex="1" class="outliner-bodybox">
<xul:outlinerchildren class="select-outlinerbody">

View File

@ -62,10 +62,6 @@ xul|*.select-outlinercol {
padding: 0px !important;
}
xul|*.select-outlinercols > xul|outlinercolpicker {
display: none;
}
/* ::::: outliner rows ::::: */
xul|*.select-outlinerbody:-moz-outliner-row {

View File

@ -137,9 +137,9 @@
<binding id="select-size" extends="xul:outliner">
<content>
<xul:outlinercols class="select-outlinercols">
<xul:hbox>
<xul:outlinercol class="select-outlinercol" flex="1"/>
</xul:outlinercols>
</xul:hbox>
<xul:outlinerrows class="select-outlinerrows outliner-rows" flex="1">
<xul:hbox flex="1" class="outliner-bodybox">
<xul:outlinerchildren class="select-outlinerbody">

View File

@ -62,10 +62,6 @@ xul|*.select-outlinercol {
padding: 0px !important;
}
xul|*.select-outlinercols > xul|outlinercolpicker {
display: none;
}
/* ::::: outliner rows ::::: */
xul|*.select-outlinerbody:-moz-outliner-row {

View File

@ -4478,15 +4478,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsIPresShell* aPresShell,
rv = ConstructTextControlFrame(aPresShell, aPresContext, newFrame, aContent);
}
else if (nsHTMLAtoms::select == aTag) {
if (UseXBLForms()) {
static PRBool loadedSelectBinding = PR_FALSE;
if (!loadedSelectBinding) {
loadedSelectBinding = PR_TRUE;
nsCOMPtr<nsIXBLBinding> binding;
nsCAutoString bindingUrl("chrome://forms/content/select.xml#select");
gXBLService->GetBinding(aContent, bindingUrl, getter_AddRefs(binding));
}
} else {
if (!UseXBLForms()) {
if (!aState.mPseudoFrames.IsEmpty()) { // process pending pseudo frames
ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, aFrameItems);
}

View File

@ -62,10 +62,6 @@ xul|*.select-outlinercol {
padding: 0px !important;
}
xul|*.select-outlinercols > xul|outlinercolpicker {
display: none;
}
/* ::::: outliner rows ::::: */
xul|*.select-outlinerbody:-moz-outliner-row {

View File

@ -60,10 +60,6 @@ xul|*.select-outlinercol {
padding: 0px !important;
}
xul|*.select-outlinercols > xul|outlinercolpicker {
display: none;
}
/* ::::: outliner rows ::::: */
xul|*.select-outlinerbody:-moz-outliner-row {