зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1576817 - Simplify some code added in bug 1490974. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D43743 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c1e8b487e0
Коммит
dd3b1b3b40
|
@ -165,16 +165,12 @@ static bool SkipNode(const nsIContent* aContent) {
|
|||
|
||||
// Skip option nodes if their select is a combo box, or if they
|
||||
// have no select (somehow).
|
||||
if (content->IsHTMLElement(nsGkAtoms::option)) {
|
||||
const HTMLOptionElement* option = HTMLOptionElement::FromNode(content);
|
||||
if (option) {
|
||||
HTMLSelectElement* select =
|
||||
HTMLSelectElement::FromNodeOrNull(option->GetParent());
|
||||
if (!select || select->IsCombobox()) {
|
||||
DEBUG_FIND_PRINTF("Skipping node: ");
|
||||
DumpNode(content);
|
||||
return true;
|
||||
}
|
||||
if (const auto* option = HTMLOptionElement::FromNode(content)) {
|
||||
auto* select = HTMLSelectElement::FromNodeOrNull(option->GetParent());
|
||||
if (!select || select->IsCombobox()) {
|
||||
DEBUG_FIND_PRINTF("Skipping node: ");
|
||||
DumpNode(content);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче