Commit 09a09ebd authored by Chris Hall's avatar Chris Hall Committed by Commit Bot

Remove IsDefault from AXLayoutObject.

Mark AXNodeObject::IsDefault as final.

Written collaboratively with Aboxhall and Meredithl.

Change-Id: I201b2579fde618ab2858442f0ab8da7b88dc68f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2227724Reviewed-by: default avatarMeredith Lane <meredithl@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
Commit-Queue: Chris Hall <chrishall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774945}
parent 88d53f91
......@@ -319,21 +319,6 @@ static bool IsLinkable(const AXObject& object) {
object.GetLayoutObject()->IsText();
}
bool AXLayoutObject::IsDefault() const {
if (IsDetached())
return false;
// Checks for any kind of disabled, including aria-disabled.
if (Restriction() == kRestrictionDisabled ||
RoleValue() != ax::mojom::blink::Role::kButton) {
return false;
}
// Will only match :default pseudo class if it's the first default button in
// a form.
return GetElement()->MatchesDefaultPseudoClass();
}
// Requires layoutObject to be present because it relies on style
// user-modify. Don't move this logic to AXNodeObject.
bool AXLayoutObject::IsEditable() const {
......
......@@ -84,7 +84,6 @@ class MODULES_EXPORT AXLayoutObject : public AXNodeObject {
// Check object role or purpose.
bool IsAutofillAvailable() const override;
bool IsDefault() const final;
bool IsEditable() const override;
bool IsRichlyEditable() const override;
bool IsLineBreakingObject() const override;
......
......@@ -95,7 +95,7 @@ class MODULES_EXPORT AXNodeObject : public AXObject {
// Check object role or purpose.
bool IsControllingVideoElement() const;
bool IsDefault() const override;
bool IsDefault() const final;
bool IsMultiline() const override;
bool IsEditable() const override { return IsNativeTextControl(); }
bool ComputeIsEditableRoot() const override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment