Bug 1585482 - Remove C++ special-casing of top-level <dialog> elements r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D53721

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kirk Steuber 2019-12-10 18:10:45 +00:00
parent 589b7532ea
commit b8ab278230
3 changed files with 1 additions and 12 deletions

View File

@ -80,16 +80,6 @@ ENameValueFlag RootAccessible::Name(nsString& aName) const {
return eNameOK;
}
role RootAccessible::NativeRole() const {
// If it's a <dialog>, use roles::DIALOG instead
dom::Element* rootElm = mDocumentNode->GetRootElement();
if (rootElm && rootElm->IsXULElement(nsGkAtoms::dialog)) {
return roles::DIALOG;
}
return DocAccessibleWrap::NativeRole();
}
// RootAccessible protected member
#ifdef MOZ_XUL
uint32_t RootAccessible::GetChromeFlags() const {

View File

@ -30,7 +30,6 @@ class RootAccessible : public DocAccessibleWrap, public nsIDOMEventListener {
virtual void Shutdown() override;
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName) const override;
virtual Relation RelationByType(RelationType aType) const override;
virtual mozilla::a11y::role NativeRole() const override;
virtual uint64_t NativeState() const override;
// RootAccessible

View File

@ -824,7 +824,7 @@ nsresult nsBoxFrame::AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
// Ignore 'width', 'height', 'screenX', 'screenY' and 'sizemode' on a
// <window>.
if (mContent->IsAnyOfXULElements(nsGkAtoms::window, nsGkAtoms::dialog) &&
if (mContent->IsXULElement(nsGkAtoms::window) &&
(nsGkAtoms::width == aAttribute || nsGkAtoms::height == aAttribute ||
nsGkAtoms::screenX == aAttribute || nsGkAtoms::screenY == aAttribute ||
nsGkAtoms::sizemode == aAttribute)) {