Title: [275766] branches/safari-611-branch/Source/WebKit
- Revision
- 275766
- Author
- [email protected]
- Date
- 2021-04-09 10:19:05 -0700 (Fri, 09 Apr 2021)
Log Message
Cherry-pick r274377. rdar://problem/76412582
AX: PDF frame conversion routines need to be updated
https://bugs.webkit.org/show_bug.cgi?id=223138
Reviewed by Darin Adler.
PDF bounding boxes are wrong in WebKit because.
1) There's no way for PDF objects to get the primary screen height. So we need to be able to return the primary
screen height from an object in the PDF hierarchy.
2) The WKPDFPluginAccessibilityObject's position was not being converted correctly.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
(-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(WebKit::PDFPlugin::boundsOnScreen const):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-611-branch/Source/WebKit/ChangeLog (275765 => 275766)
--- branches/safari-611-branch/Source/WebKit/ChangeLog 2021-04-09 16:43:03 UTC (rev 275765)
+++ branches/safari-611-branch/Source/WebKit/ChangeLog 2021-04-09 17:19:05 UTC (rev 275766)
@@ -1,5 +1,47 @@
2021-04-08 Russell Epstein <[email protected]>
+ Cherry-pick r274377. rdar://problem/76412582
+
+ AX: PDF frame conversion routines need to be updated
+ https://bugs.webkit.org/show_bug.cgi?id=223138
+
+ Reviewed by Darin Adler.
+
+ PDF bounding boxes are wrong in WebKit because.
+ 1) There's no way for PDF objects to get the primary screen height. So we need to be able to return the primary
+ screen height from an object in the PDF hierarchy.
+ 2) The WKPDFPluginAccessibilityObject's position was not being converted correctly.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
+ (-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
+ (WebKit::PDFPlugin::boundsOnScreen const):
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-03-12 Chris Fleizach <[email protected]>
+
+ AX: PDF frame conversion routines need to be updated
+ https://bugs.webkit.org/show_bug.cgi?id=223138
+
+ Reviewed by Darin Adler.
+
+ PDF bounding boxes are wrong in WebKit because.
+ 1) There's no way for PDF objects to get the primary screen height. So we need to be able to return the primary
+ screen height from an object in the PDF hierarchy.
+ 2) The WKPDFPluginAccessibilityObject's position was not being converted correctly.
+
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
+ (-[WKPDFPluginAccessibilityObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
+ (WebKit::PDFPlugin::boundsOnScreen const):
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
+
+2021-04-08 Russell Epstein <[email protected]>
+
Cherry-pick r274491. rdar://problem/76374243
Terminate network process when making new WebProcessPool in Lutron App
Modified: branches/safari-611-branch/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (275765 => 275766)
--- branches/safari-611-branch/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2021-04-09 16:43:03 UTC (rev 275765)
+++ branches/safari-611-branch/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2021-04-09 17:19:05 UTC (rev 275766)
@@ -219,6 +219,8 @@
return @[ _pdfLayerController ];
if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
return NSAccessibilityGroupRole;
+ if ([attribute isEqualToString:NSAccessibilityPrimaryScreenHeightAttribute])
+ return [_parent accessibilityAttributeValue:NSAccessibilityPrimaryScreenHeightAttribute];
return 0;
}
@@ -265,7 +267,8 @@
NSAccessibilityPositionAttribute,
NSAccessibilityFocusedAttribute,
// PDFLayerController has its own accessibilityChildren.
- NSAccessibilityChildrenAttribute
+ NSAccessibilityChildrenAttribute,
+ NSAccessibilityPrimaryScreenHeightAttribute
];
[attributeNames retain];
}
@@ -2037,7 +2040,10 @@
FloatRect bounds = FloatRect(FloatPoint(), size());
FloatRect rectInRootViewCoordinates = m_rootViewToPluginTransform.inverse().valueOr(AffineTransform()).mapRect(bounds);
- return frameView->contentsToScreen(enclosingIntRect(rectInRootViewCoordinates));
+ auto* page = m_frame->coreFrame()->page();
+ if (!page)
+ return { };
+ return page->chrome().rootViewToScreen(enclosingIntRect(rectInRootViewCoordinates));
}
void PDFPlugin::visibilityDidChange(bool visible)
Modified: branches/safari-611-branch/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm (275765 => 275766)
--- branches/safari-611-branch/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm 2021-04-09 16:43:03 UTC (rev 275765)
+++ branches/safari-611-branch/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm 2021-04-09 17:19:05 UTC (rev 275766)
@@ -42,6 +42,7 @@
#import <WebCore/FrameView.h>
#import <WebCore/Page.h>
#import <WebCore/PageOverlayController.h>
+#import <WebCore/PlatformScreen.h>
#import <WebCore/ScrollView.h>
#import <WebCore/Scrollbar.h>
#import <WebCore/WebAccessibilityObjectWrapperMac.h>
@@ -185,7 +186,7 @@
return [self accessibilityAttributePositionValue];
if ([attribute isEqualToString:NSAccessibilityPrimaryScreenHeightAttribute])
- return [[self accessibilityRootObjectWrapper] accessibilityAttributeValue:attribute];
+ return @(WebCore::screenRectForPrimaryScreen().size().height());
if ([attribute isEqualToString:NSAccessibilitySizeAttribute])
return [self accessibilityAttributeSizeValue];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes