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

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

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move interfaces on to Element Created 6 years 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: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 5b26c23442273a9edda00c8c8584103880b59d26..b36d67624d48faa5951512c1d589b759541a0d80 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -970,6 +970,20 @@ IntRect Element::screenRect() const
return document().view()->contentsToScreen(renderer()->absoluteBoundingBoxRectIgnoringTransforms());
}
+const AtomicString& Element::computedRole()
+{
+ document().updateLayoutIgnorePendingStylesheets();
+ ScopedAXObjectCache cache(document());
+ return cache->computedRoleForNode(this);
+}
+
+const String Element::computedName()
adamk 2014/12/16 01:54:48 ditto, no need for const here
aboxhall 2014/12/16 04:15:26 Done
+{
+ document().updateLayoutIgnorePendingStylesheets();
+ ScopedAXObjectCache cache(document());
+ return cache->computedNameForNode(this);
+}
+
const AtomicString& Element::getAttribute(const AtomicString& localName) const
{
if (!elementData())

Powered by Google App Engine
This is Rietveld 408576698