| Index: Source/core/dom/Node.cpp
|
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
|
| index b6a41e05c0776e04a007a9613f98db44ba72ccca..d40b1ae4f5776128ba4ab5a88cb4c1d8409c4093 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,46 @@ void Node::setTextContent(const String& text)
|
| ASSERT_NOT_REACHED();
|
| }
|
|
|
| +const AtomicString& Node::computedRole()
|
| +{
|
| + fprintf(stderr, "Node::computedRole()\n");
|
| + document().topDocument().view()->updateLayoutAndStyleIfNeededRecursive();
|
| + ScopedAXObjectCache cache(document());
|
| + fprintf(stderr, "got ScopedAXObjectCache\n");
|
| + PublicAXObject* axObj = cache->publicAXObjectForNode(this);
|
| + return axObj->computedRole();
|
| +}
|
| +
|
| +const String Node::computedText()
|
| +{
|
| + fprintf(stderr, "Node::computedText()\n");
|
| + document().topDocument().view()->updateLayoutAndStyleIfNeededRecursive();
|
| + ScopedAXObjectCache cache(document());
|
| + fprintf(stderr, "about to call %p->publicAXObjectForNode(%p)\n", cache.get(), this);
|
| + PublicAXObject* axObj = cache->publicAXObjectForNode(this);
|
| + fprintf(stderr, "about to call %p->computedText()\n", axObj);
|
| + String computedText = axObj->computedText();
|
| + fprintf(stderr, "got computedText: %s\n", computedText.characters8());
|
| + return computedText;
|
| + /*
|
| + Settings* settings = this->document().settings();
|
| + if (!settings)
|
| + return String();
|
| + settings->setAccessibilityEnabled(true);
|
| +
|
| + fprintf(stderr, "computedText()\n");
|
| + if (!document().topDocument().view())
|
| + return String();
|
| + AXObjectCache* cache = document().alwaysCreateAxObjectCache();
|
| + AXObjectCacheImpl* cacheImpl = toAXObjectCacheImpl(cache);
|
| + AXObject* axObj = cacheImpl->getOrCreate(this);
|
| + if (axObj == NULL)
|
| + return String();
|
| + // TODO(aboxhall): figure out why this is crashing
|
| + return axObj->title();
|
| + */
|
| +}
|
| +
|
| bool Node::offsetInCharacters() const
|
| {
|
| return false;
|
|
|