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

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

Issue 1053773002: Add WebScopedAXContext to allow a one-time snapshot of accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update other callers of ScopedAXObjectCache to use RefPtr Created 5 years, 8 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
« no previous file with comments | « Source/core/dom/AXObjectCache.h ('k') | Source/modules/accessibility/InspectorAccessibilityAgent.cpp » ('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 71191c2d41e13f567b68072831047999af2ca051..23a2b4a474c6833dee043aecdf0bf259d81ed879 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1038,15 +1038,15 @@ IntRect Element::screenRect() const
const AtomicString& Element::computedRole()
{
document().updateLayoutIgnorePendingStylesheets();
- ScopedAXObjectCache cache(document());
- return cache->computedRoleForNode(this);
+ RefPtr<ScopedAXObjectCache> cache(adoptRef(new ScopedAXObjectCache(document())));
+ return (*cache)->computedRoleForNode(this);
}
String Element::computedName()
{
document().updateLayoutIgnorePendingStylesheets();
- ScopedAXObjectCache cache(document());
- return cache->computedNameForNode(this);
+ RefPtr<ScopedAXObjectCache> cache(adoptRef(new ScopedAXObjectCache(document())));
+ return (*cache)->computedNameForNode(this);
}
const AtomicString& Element::getAttribute(const AtomicString& localName) const
« no previous file with comments | « Source/core/dom/AXObjectCache.h ('k') | Source/modules/accessibility/InspectorAccessibilityAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698