зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1558686 - Enable XUL default button behavior for any doc that allows XUL. r=Jamie
Fixes test 'accessible/tests/mochitest/relations/test_general.xul' when loaded as XHTML. Differential Revision: https://phabricator.services.mozilla.com/D34655 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d3868c05b8
Коммит
da359a0016
|
@ -1741,11 +1741,10 @@ Relation Accessible::RelationByType(RelationType aType) const {
|
|||
// In XUL, use first <button default="true" .../> in the document
|
||||
dom::Document* doc = mContent->OwnerDoc();
|
||||
nsIContent* buttonEl = nullptr;
|
||||
if (doc->IsXULDocument()) {
|
||||
dom::XULDocument* xulDoc = doc->AsXULDocument();
|
||||
if (doc->AllowXULXBL()) {
|
||||
nsCOMPtr<nsIHTMLCollection> possibleDefaultButtons =
|
||||
xulDoc->GetElementsByAttribute(NS_LITERAL_STRING("default"),
|
||||
NS_LITERAL_STRING("true"));
|
||||
doc->GetElementsByAttribute(NS_LITERAL_STRING("default"),
|
||||
NS_LITERAL_STRING("true"));
|
||||
if (possibleDefaultButtons) {
|
||||
uint32_t length = possibleDefaultButtons->Length();
|
||||
// Check for button in list of default="true" elements
|
||||
|
|
Загрузка…
Ссылка в новой задаче