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

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

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Set upstream correctly 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/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index b6a41e05c0776e04a007a9613f98db44ba72ccca..16ec7a5759e091fef7be5fedaf839a06adda0038 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -75,6 +75,7 @@
#include "core/events/UIEvent.h"
#include "core/events/WheelEvent.h"
#include "core/frame/EventHandlerRegistry.h"
+#include "core/frame/FrameView.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
@@ -1418,6 +1419,20 @@ void Node::setTextContent(const String& text)
ASSERT_NOT_REACHED();
}
+const AtomicString& Node::computedRole()
+{
+ document().topDocument().view()->updateLayoutAndStyleIfNeededRecursive();
+ ScopedAXObjectCache cache(document());
+ return cache->computedRoleForNode(this);
+}
+
+const String Node::computedText()
+{
+ document().topDocument().view()->updateLayoutAndStyleIfNeededRecursive();
+ ScopedAXObjectCache cache(document());
+ return cache->computedTextForNode(this);
+}
+
bool Node::offsetInCharacters() const
{
return false;

Powered by Google App Engine
This is Rietveld 408576698