⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 293257 in webkit


Ignore:
Timestamp:
Apr 22, 2022, 3:05:47 PM (4 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r291724. rdar://problem/91975589

Expose the AX tree of PDFs loaded via iframes on the Mac
https://bugs.webkit.org/show_bug.cgi?id=238168

Reviewed by Chris Fleizach.

Source/WebKit:

Given this markup:

<iframe src="/path/to/paystub.pdf">

An accessibility tree is built for paystub.pdf, but we don't expose it
to AX clients, making the PDF entirely inaccessible.

This happens because we were setting the AX parent to be the webpage
for full-frame PDF plugins (which an iframe with this markup is).
This behavior is correct only for main-frame (i.e. not iframe)
full-frame plugins, so this patch adds an extra condition to that logic.

Test: accessibility/mac/iframe-pdf.html

  • WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin):

LayoutTests:

  • accessibility/mac/iframe-pdf-expected.txt: Added.
  • accessibility/mac/iframe-pdf.html: Added.
  • platform/mac-wk1/TestExpectations: Skip new test as it always times out in WK1 (similar to accessibility/mac/basic-embed-pdf-accessibility.html)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291724 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-613.2.7.0-branch
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.2.7.0-branch/LayoutTests/ChangeLog

    r293133 r293257  
     12022-04-22  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r291724. rdar://problem/91975589
     4
     5    Expose the AX tree of PDFs loaded via iframes on the Mac
     6    https://bugs.webkit.org/show_bug.cgi?id=238168
     7   
     8    Reviewed by Chris Fleizach.
     9   
     10    Source/WebKit:
     11   
     12    Given this markup:
     13   
     14    <iframe src="/path/to/paystub.pdf">
     15   
     16    An accessibility tree is built for paystub.pdf, but we don't expose it
     17    to AX clients, making the PDF entirely inaccessible.
     18   
     19    This happens because we were setting the AX parent to be the webpage
     20    for full-frame PDF plugins (which an iframe with this markup is).
     21    This behavior is correct only for main-frame (i.e. not iframe)
     22    full-frame plugins, so this patch adds an extra condition to that logic.
     23   
     24    Test: accessibility/mac/iframe-pdf.html
     25   
     26    * WebProcess/Plugins/PDF/PDFPlugin.mm:
     27    (WebKit::PDFPlugin::PDFPlugin):
     28   
     29    LayoutTests:
     30   
     31    * accessibility/mac/iframe-pdf-expected.txt: Added.
     32    * accessibility/mac/iframe-pdf.html: Added.
     33    * platform/mac-wk1/TestExpectations:
     34    Skip new test as it always times out in WK1 (similar to
     35    accessibility/mac/basic-embed-pdf-accessibility.html)
     36   
     37   
     38    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     39
     40    2022-03-22  Tyler Wilcock  <tyler_w@apple.com>
     41
     42            Expose the AX tree of PDFs loaded via iframes on the Mac
     43            https://bugs.webkit.org/show_bug.cgi?id=238168
     44
     45            Reviewed by Chris Fleizach.
     46
     47            * accessibility/mac/iframe-pdf-expected.txt: Added.
     48            * accessibility/mac/iframe-pdf.html: Added.
     49            * platform/mac-wk1/TestExpectations:
     50            Skip new test as it always times out in WK1 (similar to
     51            accessibility/mac/basic-embed-pdf-accessibility.html)
     52
    1532022-04-19  Alan Coon  <alancoon@apple.com>
    254
  • branches/safari-613.2.7.0-branch/LayoutTests/platform/mac-wk1/TestExpectations

    r293078 r293257  
    617617# Skip because the embedded plugin never resolves in WK1, resulting in a timeout.
    618618accessibility/mac/basic-embed-pdf-accessibility.html [ Skip ]
     619accessibility/mac/iframe-pdf.html [ Skip ]
    619620
    620621# rdar://problem/26478296
  • branches/safari-613.2.7.0-branch/Source/WebKit/ChangeLog

    r293255 r293257  
     12022-04-22  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r291724. rdar://problem/91975589
     4
     5    Expose the AX tree of PDFs loaded via iframes on the Mac
     6    https://bugs.webkit.org/show_bug.cgi?id=238168
     7   
     8    Reviewed by Chris Fleizach.
     9   
     10    Source/WebKit:
     11   
     12    Given this markup:
     13   
     14    <iframe src="/path/to/paystub.pdf">
     15   
     16    An accessibility tree is built for paystub.pdf, but we don't expose it
     17    to AX clients, making the PDF entirely inaccessible.
     18   
     19    This happens because we were setting the AX parent to be the webpage
     20    for full-frame PDF plugins (which an iframe with this markup is).
     21    This behavior is correct only for main-frame (i.e. not iframe)
     22    full-frame plugins, so this patch adds an extra condition to that logic.
     23   
     24    Test: accessibility/mac/iframe-pdf.html
     25   
     26    * WebProcess/Plugins/PDF/PDFPlugin.mm:
     27    (WebKit::PDFPlugin::PDFPlugin):
     28   
     29    LayoutTests:
     30   
     31    * accessibility/mac/iframe-pdf-expected.txt: Added.
     32    * accessibility/mac/iframe-pdf.html: Added.
     33    * platform/mac-wk1/TestExpectations:
     34    Skip new test as it always times out in WK1 (similar to
     35    accessibility/mac/basic-embed-pdf-accessibility.html)
     36   
     37   
     38    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     39
     40    2022-03-22  Tyler Wilcock  <tyler_w@apple.com>
     41
     42            Expose the AX tree of PDFs loaded via iframes on the Mac
     43            https://bugs.webkit.org/show_bug.cgi?id=238168
     44
     45            Reviewed by Chris Fleizach.
     46
     47            Given this markup:
     48
     49            <iframe src="/path/to/paystub.pdf">
     50
     51            An accessibility tree is built for paystub.pdf, but we don't expose it
     52            to AX clients, making the PDF entirely inaccessible.
     53
     54            This happens because we were setting the AX parent to be the webpage
     55            for full-frame PDF plugins (which an iframe with this markup is).
     56            This behavior is correct only for main-frame (i.e. not iframe)
     57            full-frame plugins, so this patch adds an extra condition to that logic.
     58
     59            Test: accessibility/mac/iframe-pdf.html
     60
     61            * WebProcess/Plugins/PDF/PDFPlugin.mm:
     62            (WebKit::PDFPlugin::PDFPlugin):
     63
    1642022-04-22  Alan Coon  <alancoon@apple.com>
    265
  • branches/safari-613.2.7.0-branch/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm

    r289335 r293257  
    674674    m_accessibilityObject = adoptNS([[WKPDFPluginAccessibilityObject alloc] initWithPDFPlugin:this andElement:pluginElement]);
    675675    [m_accessibilityObject setPdfLayerController:m_pdfLayerController.get()];
    676     if (isFullFrame)
     676    if (isFullFrame && frame.isMainFrame())
    677677        [m_accessibilityObject setParent:frame.page()->accessibilityRemoteObject()];
    678     // If the plugin is not full-frame, we'll need to set the parent later after the AXObjectCache for the document has been initialized.
     678    // If this is not a main-frame (e.g. it originated from an iframe) full-frame plugin, we'll need to set the parent later after the AXObjectCache has been initialized.
    679679
    680680    [m_containerLayer addSublayer:m_contentLayer.get()];
Note: See TracChangeset for help on using the changeset viewer.