Changeset 245660 in webkit
- Timestamp:
- May 22, 2019, 5:07:22 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/Cocoa/WebPageCocoa.mm (modified) (2 diffs)
-
WebProcess/WebPage/WebPage.cpp (modified) (2 diffs)
-
WebProcess/WebPage/WebPage.h (modified) (1 diff)
-
WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h (modified) (1 diff)
-
WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245653 r245660 1 2019-05-22 Tim Horton <timothy_horton@apple.com> 2 3 REGRESSION (r240552): PDF contents are not exposed to Accessibility (VO, etc.) 4 https://bugs.webkit.org/show_bug.cgi?id=198146 5 <rdar://problem/50698533> 6 7 Reviewed by Simon Fraser. 8 9 * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: 10 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 11 * WebProcess/WebPage/WebPage.cpp: 12 (WebKit::WebPage::didCommitLoad): 13 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 14 * WebProcess/WebPage/WebPage.h: 15 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: 16 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: 17 (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]): 18 (-[WKAccessibilityWebPageObjectBase setWebPage:]): 19 (-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]): 20 In r240552, we changed to only defer to the main frame PluginView's 21 accessibility tree if the cached "has a plugin" bit is true. That bit 22 was only updated in WebPage::platformInitialize, which is long before 23 we've actually loaded anything or have any clue if we're going to have 24 a plugin. 25 26 Instead, push updates every time we commit a load, which coincides 27 with when we make other decisions based on having a plugin or not. 28 Also, just use the existence of a PluginDocument to make the decision, 29 instead of actually digging in to see if there's a PluginView, since 30 PluginView comes in asynchronously. 31 1 32 2019-05-22 Ryosuke Niwa <rniwa@webkit.org> 2 33 -
trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
r244893 r245660 31 31 #import "PluginView.h" 32 32 #import "RemoteObjectRegistry.h" 33 #import "WKAccessibilityWebPageObjectBase.h" 33 34 #import "WebPageProxyMessages.h" 34 35 #import "WebPaymentCoordinator.h" … … 225 226 m_remoteObjectRegistry = makeWeakPtr(registry); 226 227 } 228 229 void WebPage::updateMockAccessibilityElementAfterCommittingLoad() 230 { 231 auto* document = mainFrame()->document(); 232 [m_mockAccessibilityElement setHasMainFramePlugin:document ? document->isPluginDocument() : false]; 233 } 227 234 228 235 } // namespace WebKit -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r245595 r245660 5764 5764 5765 5765 updateMainFrameScrollOffsetPinning(); 5766 5767 updateMockAccessibilityElementAfterCommittingLoad(); 5766 5768 } 5767 5769 … … 6728 6730 } 6729 6731 6732 #if !PLATFORM(COCOA) 6733 void WebPage::updateMockAccessibilityElementAfterCommittingLoad() 6734 { 6735 } 6736 #endif 6737 6730 6738 } // namespace WebKit 6731 6739 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r245639 r245660 1587 1587 bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const; 1588 1588 1589 void updateMockAccessibilityElementAfterCommittingLoad(); 1590 1589 1591 uint64_t m_pageID; 1590 1592 -
trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h
r241321 r245660 35 35 uint64_t m_pageID; 36 36 id m_parent; 37 bool m_has Plugin;37 bool m_hasMainFramePlugin; 38 38 } 39 39 40 40 - (void)setWebPage:(WebKit::WebPage*)page; 41 41 - (void)setRemoteParent:(id)parent; 42 - (void)setHasMainFramePlugin:(bool)hasPlugin; 42 43 43 44 - (id)accessibilityRootObjectWrapper; -
trunk/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm
r243443 r245660 121 121 WebCore::AXObjectCache::enableAccessibility(); 122 122 123 if (m_has Plugin)123 if (m_hasMainFramePlugin) 124 124 return self.accessibilityPluginObject; 125 125 … … 142 142 { 143 143 m_page = page; 144 144 145 145 if (page) { 146 146 m_pageID = page->pageID(); 147 m_hasPlugin = page->accessibilityObjectForMainFramePlugin(); 147 148 auto* frame = page->mainFrame(); 149 m_hasMainFramePlugin = frame && frame->document() ? frame->document()->isPluginDocument() : false; 148 150 } else { 149 151 m_pageID = 0; 150 m_has Plugin = false;152 m_hasMainFramePlugin = false; 151 153 } 154 } 155 156 - (void)setHasMainFramePlugin:(bool)hasPlugin 157 { 158 m_hasMainFramePlugin = hasPlugin; 152 159 } 153 160
Note:
See TracChangeset
for help on using the changeset viewer.