Bug 231830, crash on style.display = 'none' for select element when event onchange occurs [@ nsStyleContext::GetRuleNode ][@ nsIFrame::Invalidate ], r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@207128 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1933,7 +1933,7 @@ nsListControlFrame::ToggleOptionSelectedFromFrame(PRInt32 aIndex)
|
||||
|
||||
|
||||
// Dispatch event and such
|
||||
void
|
||||
PRBool
|
||||
nsListControlFrame::UpdateSelection()
|
||||
{
|
||||
if (mIsAllFramesHere) {
|
||||
@@ -1943,9 +1943,12 @@ nsListControlFrame::UpdateSelection()
|
||||
}
|
||||
// if it's a listbox, fire on change
|
||||
else if (mIsAllContentHere) {
|
||||
nsWeakFrame weakFrame(this);
|
||||
FireOnChange();
|
||||
return weakFrame.IsAlive();
|
||||
}
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3054,7 +3057,10 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
nsCaseInsensitiveStringComparator())) {
|
||||
PRBool wasChanged = PerformSelection(index, isShift, isControl);
|
||||
if (wasChanged) {
|
||||
UpdateSelection(); // dispatch event, update combobox, etc.
|
||||
// dispatch event, update combobox, etc.
|
||||
if (!UpdateSelection()) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3088,7 +3094,10 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent)
|
||||
wasChanged = PerformSelection(newIndex, isShift, isControl);
|
||||
}
|
||||
if (wasChanged) {
|
||||
UpdateSelection(); // dispatch event, update combobox, etc.
|
||||
// dispatch event, update combobox, etc.
|
||||
if (!UpdateSelection()) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
#ifdef ACCESSIBILITY
|
||||
if (charcode != ' ') {
|
||||
|
||||
Reference in New Issue
Block a user