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

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

Issue 1348503003: One AXObjectCache per frame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated or deleted layout tests 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9d708509afd13473ba6435c070254941081a3ec8..19b24fb15909a94498c317fc0d3b31d76adc7cd8 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2233,12 +2233,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);
dcheng 2015/09/17 21:54:08 If this method can return a mutable ref to this, i
dmazzoni 2015/09/17 22:11:57 Yeah, note that topDocument() is doing a const_cas
}
void Document::clearAXObjectCache()
@@ -3528,7 +3527,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());

Powered by Google App Engine
This is Rietveld 408576698