Changeset 178038 in webkit
- Timestamp:
- Jan 7, 2015, 8:55:10 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r178037 r178038 1 2015-01-07 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse + 149 4 https://bugs.webkit.org/show_bug.cgi?id=139929 5 6 Reviewed by Darin Adler. 7 8 * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: Added. 9 * accessibility/frame-disconnect-textmarker-cache-crash.html: Added. 10 * accessibility/resources/frameset.html: Added. 11 * accessibility/resources/inform-parent-of-load.html: Added. 12 * accessibility/resources/text.html: Added. 13 1 14 2015-01-07 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r178036 r178038 1 2015-01-07 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse + 149 4 https://bugs.webkit.org/show_bug.cgi?id=139929 5 6 Reviewed by Darin Adler. 7 8 When a frame is replaced, there were instances when it was not clearing its associated nodes in the accessibility text marker -> Node cache. 9 This caused dead Nodes to be left in the cache which would eventually be accessed when the cache was cleaned out at a later time. 10 11 To fix this we should be clearing out the cache in Document::prepareForDestruction, instead of Frame::disconnectOwnerElement. 12 13 While working on this, it also exposed a problem where when a frame goes away, it doesn't inform its parent to update its children, 14 which causes an ASSERT to be hit with this test as well. 15 16 Tests: accessibility/frame-disconnect-textmarker-cache-crash.html 17 18 * dom/Document.cpp: 19 (WebCore::Document::prepareForDestruction): 20 * page/Frame.cpp: 21 (WebCore::Frame::disconnectOwnerElement): 22 Remove cache management from here since it is superceded by code in Document::prepareForDestruction 23 * page/FrameView.cpp: 24 (WebCore::FrameView::removeFromAXObjectCache): 25 1 26 2015-01-07 Zan Dobersek <zdobersek@igalia.com> 2 27 -
trunk/Source/WebCore/dom/Document.cpp
r178013 r178038 2080 2080 #endif 2081 2081 2082 #if HAVE(ACCESSIBILITY) 2083 // Sub-frames need to cleanup Nodes in the text marker cache when the Document disappears. 2084 if (this != &topDocument()) { 2085 if (AXObjectCache* cache = existingAXObjectCache()) 2086 cache->clearTextMarkerNodesInUse(this); 2087 } 2088 #endif 2089 2082 2090 disconnectDescendantFrames(); 2083 2091 if (m_domWindow && m_frame) -
trunk/Source/WebCore/page/Frame.cpp
r177857 r178038 804 804 { 805 805 if (m_ownerElement) { 806 // We use the ownerElement's document to retrieve the cache, because the contentDocument for this807 // frame is already detached (and can't access the top level AX cache).808 // However, we pass in the current document to clearTextMarkerNodesInUse so we can identify the809 // nodes inside this document that need to be removed from the cache.810 811 // We don't clear the AXObjectCache here because we don't want to clear the top level cache812 // when a sub-frame is removed.813 #if HAVE(ACCESSIBILITY)814 if (AXObjectCache* cache = m_ownerElement->document().existingAXObjectCache())815 cache->clearTextMarkerNodesInUse(document());816 #endif817 818 806 m_ownerElement->clearContentFrame(); 819 807 if (m_page) -
trunk/Source/WebCore/page/FrameView.cpp
r178013 r178038 296 296 void FrameView::removeFromAXObjectCache() 297 297 { 298 if (AXObjectCache* cache = axObjectCache()) 298 if (AXObjectCache* cache = axObjectCache()) { 299 if (HTMLFrameOwnerElement* owner = frame().ownerElement()) 300 cache->childrenChanged(owner->renderer()); 299 301 cache->remove(this); 302 } 300 303 } 301 304
Note:
See TracChangeset
for help on using the changeset viewer.