Commit 784db486 authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Use new downcast helper for blink::HTMLBDIElement

This CL use IsA<HTMLBDIElement>(element) in place of
IsHTMLBDIElement(element)

Bug: 891908
Change-Id: I46e044864bfbc347655e74134fd7e0d02d005646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899636Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#713155}
parent 20ec7788
...@@ -1090,7 +1090,7 @@ HTMLFormElement* HTMLElement::FindFormAncestor() const { ...@@ -1090,7 +1090,7 @@ HTMLFormElement* HTMLElement::FindFormAncestor() const {
static inline bool ElementAffectsDirectionality(const Node* node) { static inline bool ElementAffectsDirectionality(const Node* node) {
auto* html_element = DynamicTo<HTMLElement>(node); auto* html_element = DynamicTo<HTMLElement>(node);
return html_element && (IsHTMLBDIElement(*html_element) || return html_element && (IsA<HTMLBDIElement>(*html_element) ||
html_element->FastHasAttribute(html_names::kDirAttr)); html_element->FastHasAttribute(html_names::kDirAttr));
} }
...@@ -1103,7 +1103,7 @@ bool HTMLElement::HasDirectionAuto() const { ...@@ -1103,7 +1103,7 @@ bool HTMLElement::HasDirectionAuto() const {
// <bdi> defaults to dir="auto" // <bdi> defaults to dir="auto"
// https://html.spec.whatwg.org/C/#the-bdi-element // https://html.spec.whatwg.org/C/#the-bdi-element
const AtomicString& direction = FastGetAttribute(html_names::kDirAttr); const AtomicString& direction = FastGetAttribute(html_names::kDirAttr);
return (IsHTMLBDIElement(*this) && direction == g_null_atom) || return (IsA<HTMLBDIElement>(*this) && direction == g_null_atom) ||
DeprecatedEqualIgnoringCase(direction, "auto"); DeprecatedEqualIgnoringCase(direction, "auto");
} }
......
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