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

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: Update webexposed/element-instance-property-listing.html and add some SVG test cases 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
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 5b26c23442273a9edda00c8c8584103880b59d26..ea8cf1eeb864e1f2b897c6a51e159b171eed4b5d 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);
+}
+
+String Element::computedName()
+{
+ document().updateLayoutIgnorePendingStylesheets();
+ ScopedAXObjectCache cache(document());
+ return cache->computedNameForNode(this);
+}
+
const AtomicString& Element::getAttribute(const AtomicString& localName) const
{
if (!elementData())
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698