Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2750533006: Initial skeleton of Accessibility Object Model Phase 1 (Closed)
Patch Set: Add comment about ugly AXObjectCache interface Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 8043437642a66ddd4e39c358b0e55fdb7fd1a707..38409cb11e99af9aa8617025a98f2dd62983fac2 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1188,6 +1188,24 @@ String Element::computedName() {
return cache->get()->computedNameForNode(this);
}
+AccessibleNode* Element::existingAccessibleNode() const {
+ if (!RuntimeEnabledFeatures::accessibilityObjectModelEnabled())
+ return nullptr;
+
+ if (!hasRareData())
+ return nullptr;
+
+ return elementRareData()->accessibleNode();
+}
+
+AccessibleNode* Element::accessibleNode() {
+ if (!RuntimeEnabledFeatures::accessibilityObjectModelEnabled())
+ return nullptr;
+
+ ElementRareData& rareData = ensureElementRareData();
+ return rareData.ensureAccessibleNode(this);
+}
+
const AtomicString& Element::getAttribute(const AtomicString& localName) const {
if (!elementData())
return nullAtom;

Powered by Google App Engine
This is Rietveld 408576698