WebKit Bugzilla
Attachment 370461 Details for
Bug 198146
: REGRESSION (r240552): PDF contents are not exposed to Accessibility (VO, etc.)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198146-20190522160823.patch (text/plain), 6.57 KB, created by
Tim Horton
on 2019-05-22 16:08:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-05-22 16:08:23 PDT
Size:
6.57 KB
patch
obsolete
>Subversion Revision: 245646 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 68ab6ecd00ff0bf2959c0b125a2b9442b7b75b59..fc7be34a7c1c54f38dfa6501bc37401615d475b1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,34 @@ >+2019-05-22 Tim Horton <timothy_horton@apple.com> >+ >+ REGRESSION (r240552): PDF contents are not exposed to Accessibility (VO, etc.) >+ https://bugs.webkit.org/show_bug.cgi?id=198146 >+ <rdar://problem/50698533> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: >+ (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::didCommitLoad): >+ (WebKit::WebPage::updateMockAccessibilityElementAfterCommittingLoad): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: >+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: >+ (-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]): >+ (-[WKAccessibilityWebPageObjectBase setWebPage:]): >+ (-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]): >+ In r240552, we changed to only defer to the main frame PluginView's >+ accessibility tree if the cached "has a plugin" bit is true. That bit >+ was only updated in WebPage::platformInitialize, which is long before >+ we've actually loaded anything or have any clue if we're going to have >+ a plugin. >+ >+ Instead, push updates every time we commit a load, which coincides >+ with when we make other decisions based on having a plugin or not. >+ Also, just use the existence of a PluginDocument to make the decision, >+ instead of actually digging in to see if there's a PluginView, since >+ PluginView comes in asynchronously. >+ > 2019-05-22 Antoine Quint <graouts@apple.com> > > [iOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown >diff --git a/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm b/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm >index 3b58dc13f8ca45d7f0f03097c54fe5417329bdb4..797e44b4673bde01659a574059501bccff3dd5d8 100644 >--- a/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm >+++ b/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm >@@ -30,6 +30,7 @@ > #import "LoadParameters.h" > #import "PluginView.h" > #import "RemoteObjectRegistry.h" >+#import "WKAccessibilityWebPageObjectBase.h" > #import "WebPageProxyMessages.h" > #import "WebPaymentCoordinator.h" > #import <WebCore/DictionaryLookup.h> >@@ -224,6 +225,11 @@ void WebPage::setRemoteObjectRegistry(RemoteObjectRegistry& registry) > { > m_remoteObjectRegistry = makeWeakPtr(registry); > } >+ >+void WebPage::updateMockAccessibilityElementAfterCommittingLoad() >+{ >+ [m_mockAccessibilityElement setHasMainFramePlugin:mainFrame()->document()->isPluginDocument()]; >+} > > } // namespace WebKit > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 57210cac8d3a98d542f0afdc17cde9958c09a99a..15c0c7171eff8ff33ddc0122bac7544a213237e4 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -5763,6 +5763,8 @@ void WebPage::didCommitLoad(WebFrame* frame) > WebProcess::singleton().updateActivePages(); > > updateMainFrameScrollOffsetPinning(); >+ >+ updateMockAccessibilityElementAfterCommittingLoad(); > } > > void WebPage::didFinishDocumentLoad(WebFrame& frame) >@@ -6727,6 +6729,12 @@ void WebPage::configureLoggingChannel(const String& channelName, WTFLogChannelSt > send(Messages::WebPageProxy::ConfigureLoggingChannel(channelName, state, level)); > } > >+#if !PLATFORM(COCOA) >+void WebPage::updateMockAccessibilityElementAfterCommittingLoad() >+{ >+} >+#endif >+ > } // namespace WebKit > > #undef RELEASE_LOG_IF_ALLOWED >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index c4b69264969ddc7fe51c42f1ca10568d6b943124..fb0cbdf0c318e354c199175b68c8f2c590d64da0 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1586,6 +1586,8 @@ private: > > bool shouldDispatchUpdateAfterFocusingElement(const WebCore::Element&) const; > >+ void updateMockAccessibilityElementAfterCommittingLoad(); >+ > uint64_t m_pageID; > > std::unique_ptr<WebCore::Page> m_page; >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >index 6ec130039be257d95473608f85c569120fda3032..301b139e1d2c16d89a2ab893cf85571073d8f51a 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >+++ b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >@@ -34,11 +34,12 @@ class WebPage; > WebKit::WebPage* m_page; > uint64_t m_pageID; > id m_parent; >- bool m_hasPlugin; >+ bool m_hasMainFramePlugin; > } > > - (void)setWebPage:(WebKit::WebPage*)page; > - (void)setRemoteParent:(id)parent; >+- (void)setHasMainFramePlugin:(bool)hasPlugin; > > - (id)accessibilityRootObjectWrapper; > - (id)accessibilityFocusedUIElement; >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >index ee15eb7cd7b5940f55ecc4e6b09daf0bdd28c80a..3d3f35553e6d4fbea55653478088806910f05009 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >@@ -120,7 +120,7 @@ - (id)accessibilityRootObjectWrapper > if (!WebCore::AXObjectCache::accessibilityEnabled()) > WebCore::AXObjectCache::enableAccessibility(); > >- if (m_hasPlugin) >+ if (m_hasMainFramePlugin) > return self.accessibilityPluginObject; > > #if ENABLE(ACCESSIBILITY_ISOLATED_TREE) >@@ -141,16 +141,23 @@ - (id)accessibilityRootObjectWrapper > - (void)setWebPage:(WebKit::WebPage*)page > { > m_page = page; >- >+ > if (page) { > m_pageID = page->pageID(); >- m_hasPlugin = page->accessibilityObjectForMainFramePlugin(); >+ >+ auto* frame = page->mainFrame(); >+ m_hasMainFramePlugin = frame && frame->document() ? frame->document()->isPluginDocument() : false; > } else { > m_pageID = 0; >- m_hasPlugin = false; >+ m_hasMainFramePlugin = false; > } > } > >+- (void)setHasMainFramePlugin:(bool)hasPlugin >+{ >+ m_hasMainFramePlugin = hasPlugin; >+} >+ > - (void)setRemoteParent:(id)parent > { > if (parent != m_parent) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198146
:
370461
|
370463