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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1348503003: One AXObjectCache per frame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix issues in AutomationApiTest.Events Created 5 years, 3 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 | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 98cd8dd6a9e2cff06694ae5b82d463c4df0a3985..0ffed934991ab3043156260707ee2bc28a9f61c9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2245,12 +2245,11 @@ void Document::removeAllEventListeners()
Document& Document::axObjectCacheOwner() const
{
- Document& top = topDocument();
- if (top.frame() && top.frame()->pagePopupOwner()) {
- ASSERT(!top.m_axObjectCache);
- return top.frame()->pagePopupOwner()->document().axObjectCacheOwner();
+ if (frame() && frame()->pagePopupOwner()) {
+ ASSERT(!m_axObjectCache);
+ return frame()->pagePopupOwner()->document().axObjectCacheOwner();
}
- return top;
+ return *const_cast<Document*>(this);
}
void Document::clearAXObjectCache()
@@ -3542,7 +3541,7 @@ bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl
}
}
- if (!focusChangeBlocked && m_focusedElement) {
+ if (!focusChangeBlocked) {
// Create the AXObject cache in a focus change because Chromium relies on it.
if (AXObjectCache* cache = axObjectCache())
cache->handleFocusedUIElementChanged(oldFocusedElement.get(), newFocusedElement.get());
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698