Changeset 245686 in webkit
- Timestamp:
- May 23, 2019, 9:44:33 AM (7 years ago)
- Location:
- branches/safari-608.1.24.40-branch/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
-
branches/safari-608.1.24.40-branch/Source/WebKit/ChangeLog
r245591 r245686 1 2019-05-23 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245660. rdar://problem/50698533 4 5 REGRESSION (r240552): PDF contents are not exposed to Accessibility (VO, etc.) 6 https://bugs.webkit.org/show_bug.cgi?id=198146 7 <rdar://problem/50698533> 8 9 Reviewed by Simon Fraser. 10 11 * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: 12 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::didCommitLoad): 15 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 16 * WebProcess/WebPage/WebPage.h: 17 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: 18 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: 19 (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]): 20 (-[WKAccessibilityWebPageObjectBase setWebPage:]): 21 (-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]): 22 In r240552, we changed to only defer to the main frame PluginView's 23 accessibility tree if the cached "has a plugin" bit is true. That bit 24 was only updated in WebPage::platformInitialize, which is long before 25 we've actually loaded anything or have any clue if we're going to have 26 a plugin. 27 28 Instead, push updates every time we commit a load, which coincides 29 with when we make other decisions based on having a plugin or not. 30 Also, just use the existence of a PluginDocument to make the decision, 31 instead of actually digging in to see if there's a PluginView, since 32 PluginView comes in asynchronously. 33 34 35 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245660 268f45cc-cd09-0410-ab3c-d52691b4dbfc 36 37 2019-05-22 Tim Horton <timothy_horton@apple.com> 38 39 REGRESSION (r240552): PDF contents are not exposed to Accessibility (VO, etc.) 40 https://bugs.webkit.org/show_bug.cgi?id=198146 41 <rdar://problem/50698533> 42 43 Reviewed by Simon Fraser. 44 45 * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: 46 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 47 * WebProcess/WebPage/WebPage.cpp: 48 (WebKit::WebPage::didCommitLoad): 49 (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): 50 * WebProcess/WebPage/WebPage.h: 51 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: 52 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: 53 (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]): 54 (-[WKAccessibilityWebPageObjectBase setWebPage:]): 55 (-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]): 56 In r240552, we changed to only defer to the main frame PluginView's 57 accessibility tree if the cached "has a plugin" bit is true. That bit 58 was only updated in WebPage::platformInitialize, which is long before 59 we've actually loaded anything or have any clue if we're going to have 60 a plugin. 61 62 Instead, push updates every time we commit a load, which coincides 63 with when we make other decisions based on having a plugin or not. 64 Also, just use the existence of a PluginDocument to make the decision, 65 instead of actually digging in to see if there's a PluginView, since 66 PluginView comes in asynchronously. 67 1 68 2019-05-21 Kocsen Chung <kocsen_chung@apple.com> 2 69 -
branches/safari-608.1.24.40-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
r244893 r245686 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 -
branches/safari-608.1.24.40-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r245358 r245686 5743 5743 5744 5744 updateMainFrameScrollOffsetPinning(); 5745 5746 updateMockAccessibilityElementAfterCommittingLoad(); 5745 5747 } 5746 5748 … … 6707 6709 } 6708 6710 6711 #if !PLATFORM(COCOA) 6712 void WebPage::updateMockAccessibilityElementAfterCommittingLoad() 6713 { 6714 } 6715 #endif 6716 6709 6717 } // namespace WebKit 6710 6718 -
branches/safari-608.1.24.40-branch/Source/WebKit/WebProcess/WebPage/WebPage.h
r245358 r245686 1575 1575 bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const; 1576 1576 1577 void updateMockAccessibilityElementAfterCommittingLoad(); 1578 1577 1579 uint64_t m_pageID; 1578 1580 -
branches/safari-608.1.24.40-branch/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h
r241321 r245686 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; -
branches/safari-608.1.24.40-branch/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm
r243443 r245686 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.