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); |
} |
void Document::clearAXObjectCache() |
@@ -3528,7 +3527,7 @@ bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl |
} |
} |
- if (!focusChangeBlocked && m_focusedElement) { |
+ if (!focusChangeBlocked) { |
aboxhall
2015/09/22 21:48:27
Why this change?
dmazzoni
2015/09/22 22:08:44
A consequence of this change is that when focus mo
|
// Create the AXObject cache in a focus change because Chromium relies on it. |
if (AXObjectCache* cache = axObjectCache()) |
cache->handleFocusedUIElementChanged(oldFocusedElement.get(), newFocusedElement.get()); |