icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -299,24 +299,10 @@ void HTMLSelectElement::InsertOptionsIntoList(nsIContent* aOptions,
|
|||
OnSelectionChanged();
|
||||
}
|
||||
|
||||
// Get the frame stuff for notification. No need to flush here
|
||||
// since if there's no frame for the select yet the select will
|
||||
// get into the right state once it's created.
|
||||
nsISelectControlFrame* selectFrame = nullptr;
|
||||
AutoWeakFrame weakSelectFrame;
|
||||
bool didGetFrame = false;
|
||||
|
||||
// Actually select the options if the added options warrant it
|
||||
for (int32_t i = aListIndex; i < insertIndex; i++) {
|
||||
// Notify the frame that the option is added
|
||||
if (!didGetFrame || (selectFrame && !weakSelectFrame.IsAlive())) {
|
||||
selectFrame = GetSelectFrame();
|
||||
weakSelectFrame = do_QueryFrame(selectFrame);
|
||||
didGetFrame = true;
|
||||
}
|
||||
|
||||
if (selectFrame) {
|
||||
selectFrame->AddOption(i);
|
||||
if (auto* frame = GetSelectFrame()) {
|
||||
frame->AddOption(i);
|
||||
}
|
||||
|
||||
RefPtr<HTMLOptionElement> option = Item(i);
|
||||
|
|
@ -332,7 +318,7 @@ void HTMLSelectElement::InsertOptionsIntoList(nsIContent* aOptions,
|
|||
// This is sort of a hack ... we need to notify that the option was
|
||||
// set and change selectedIndex even though we didn't really change
|
||||
// its value.
|
||||
OnOptionSelected(selectFrame, i, true, false, aNotify);
|
||||
OnOptionSelected(i, true, false, aNotify);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -715,8 +701,7 @@ bool HTMLSelectElement::IsOptionSelectedByIndex(int32_t aIndex) const {
|
|||
return option && option->Selected();
|
||||
}
|
||||
|
||||
void HTMLSelectElement::OnOptionSelected(nsISelectControlFrame* aSelectFrame,
|
||||
int32_t aIndex, bool aSelected,
|
||||
void HTMLSelectElement::OnOptionSelected(int32_t aIndex, bool aSelected,
|
||||
bool aChangeOptionState,
|
||||
bool aNotify) {
|
||||
// Set the selected index
|
||||
|
|
@ -736,8 +721,8 @@ void HTMLSelectElement::OnOptionSelected(nsISelectControlFrame* aSelectFrame,
|
|||
}
|
||||
|
||||
// Let the frame know too
|
||||
if (aSelectFrame) {
|
||||
aSelectFrame->OnOptionSelected(aIndex, aSelected);
|
||||
if (auto* frame = GetSelectFrame()) {
|
||||
frame->OnOptionSelected(aIndex, aSelected);
|
||||
}
|
||||
|
||||
UpdateSelectedOptions();
|
||||
|
|
@ -808,10 +793,6 @@ bool HTMLSelectElement::SetOptionsSelectedByIndex(int32_t aStartIndex,
|
|||
bool optionsSelected = false;
|
||||
bool optionsDeselected = false;
|
||||
|
||||
nsISelectControlFrame* selectFrame = nullptr;
|
||||
bool didGetFrame = false;
|
||||
AutoWeakFrame weakSelectFrame;
|
||||
|
||||
if (aOptionsMask.contains(OptionFlag::IsSelected)) {
|
||||
// Setting selectedIndex to an out-of-bounds index means -1. (HTML5)
|
||||
if (aStartIndex < 0 || AssertedCast<uint32_t>(aStartIndex) >= numItems ||
|
||||
|
|
@ -861,15 +842,7 @@ bool HTMLSelectElement::SetOptionsSelectedByIndex(int32_t aStartIndex,
|
|||
// the option has just been inserted we have to get in sync with it.
|
||||
if (option && (aOptionsMask.contains(OptionFlag::InsertingOptions) ||
|
||||
!option->Selected())) {
|
||||
// To notify the frame if anything gets changed. No need
|
||||
// to flush here, if there's no frame yet we don't need to
|
||||
// force it to be created just to notify it about a change
|
||||
// in the select.
|
||||
selectFrame = GetSelectFrame();
|
||||
weakSelectFrame = do_QueryFrame(selectFrame);
|
||||
didGetFrame = true;
|
||||
|
||||
OnOptionSelected(selectFrame, optIndex, true, !option->Selected(),
|
||||
OnOptionSelected(optIndex, true, !option->Selected(),
|
||||
aOptionsMask.contains(OptionFlag::Notify));
|
||||
optionsSelected = true;
|
||||
}
|
||||
|
|
@ -889,17 +862,7 @@ bool HTMLSelectElement::SetOptionsSelectedByIndex(int32_t aStartIndex,
|
|||
HTMLOptionElement* option = Item(optIndex);
|
||||
// If the index is already deselected, ignore it.
|
||||
if (option && option->Selected()) {
|
||||
if (!didGetFrame || (selectFrame && !weakSelectFrame.IsAlive())) {
|
||||
// To notify the frame if anything gets changed, don't
|
||||
// flush, if the frame doesn't exist we don't need to
|
||||
// create it just to tell it about this change.
|
||||
selectFrame = GetSelectFrame();
|
||||
weakSelectFrame = do_QueryFrame(selectFrame);
|
||||
|
||||
didGetFrame = true;
|
||||
}
|
||||
|
||||
OnOptionSelected(selectFrame, optIndex, false, true,
|
||||
OnOptionSelected(optIndex, false, true,
|
||||
aOptionsMask.contains(OptionFlag::Notify));
|
||||
optionsDeselected = true;
|
||||
|
||||
|
|
@ -923,17 +886,7 @@ bool HTMLSelectElement::SetOptionsSelectedByIndex(int32_t aStartIndex,
|
|||
|
||||
// If the index is already selected, ignore it.
|
||||
if (option && option->Selected()) {
|
||||
if (!didGetFrame || (selectFrame && !weakSelectFrame.IsAlive())) {
|
||||
// To notify the frame if anything gets changed, don't
|
||||
// flush, if the frame doesn't exist we don't need to
|
||||
// create it just to tell it about this change.
|
||||
selectFrame = GetSelectFrame();
|
||||
weakSelectFrame = do_QueryFrame(selectFrame);
|
||||
|
||||
didGetFrame = true;
|
||||
}
|
||||
|
||||
OnOptionSelected(selectFrame, optIndex, false, true,
|
||||
OnOptionSelected(optIndex, false, true,
|
||||
aOptionsMask.contains(OptionFlag::Notify));
|
||||
optionsDeselected = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue