Title: [249812] trunk
- Revision
- 249812
- Author
- beid...@apple.com
- Date
- 2019-09-12 09:55:52 -0700 (Thu, 12 Sep 2019)
Log Message
PDF exporting on iOS should include URL rects.
<rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693
Reviewed by Tim Horton.
Source/WebCore:
Turns out that PDF exporting on iOS works fine.
Tracking back through history it was disabled at least pre-2014.
It was almost certainly disabled because it didn't work way back then,
but it works great now.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setURLForRect): Remove the iOS platform exclusion.
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
(TestWebKitAPI::TEST): Enable on iOS.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249811 => 249812)
--- trunk/Source/WebCore/ChangeLog 2019-09-12 16:39:02 UTC (rev 249811)
+++ trunk/Source/WebCore/ChangeLog 2019-09-12 16:55:52 UTC (rev 249812)
@@ -1,3 +1,20 @@
+2019-09-12 Brady Eidson <beid...@apple.com>
+
+ PDF exporting on iOS should include URL rects.
+ <rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693
+
+ Reviewed by Tim Horton.
+
+ Turns out that PDF exporting on iOS works fine.
+
+ Tracking back through history it was disabled at least pre-2014.
+
+ It was almost certainly disabled because it didn't work way back then,
+ but it works great now.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::setURLForRect): Remove the iOS platform exclusion.
+
2019-09-12 Adrian Perez de Castro <ape...@igalia.com>
[GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (249811 => 249812)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2019-09-12 16:39:02 UTC (rev 249811)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2019-09-12 16:55:52 UTC (rev 249812)
@@ -1635,8 +1635,6 @@
void GraphicsContext::setURLForRect(const URL& link, const FloatRect& destRect)
{
- // FIXME: <rdar://problem/54900133> PDF exporting on iOS should include URL rects
-#if !PLATFORM(IOS_FAMILY)
if (paintingDisabled())
return;
@@ -1656,10 +1654,6 @@
rect.intersect(CGContextGetClipBoundingBox(context));
CGPDFContextSetURLForRect(context, urlRef.get(), CGRectApplyAffineTransform(rect, CGContextGetCTM(context)));
-#else
- UNUSED_PARAM(link);
- UNUSED_PARAM(destRect);
-#endif
}
void GraphicsContext::setPlatformImageInterpolationQuality(InterpolationQuality mode)
Modified: trunk/Tools/ChangeLog (249811 => 249812)
--- trunk/Tools/ChangeLog 2019-09-12 16:39:02 UTC (rev 249811)
+++ trunk/Tools/ChangeLog 2019-09-12 16:55:52 UTC (rev 249812)
@@ -1,3 +1,13 @@
+2019-09-12 Brady Eidson <beid...@apple.com>
+
+ PDF exporting on iOS should include URL rects.
+ <rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
+ (TestWebKitAPI::TEST): Enable on iOS.
+
2019-09-12 Adrian Perez de Castro <ape...@igalia.com>
[GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm (249811 => 249812)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm 2019-09-12 16:39:02 UTC (rev 249811)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm 2019-09-12 16:55:52 UTC (rev 249812)
@@ -185,8 +185,6 @@
EXPECT_EQ(page->text()[0], 'C');
EXPECT_EQ(page->text()[7], 'e');
- // FIXME: iOS doesn't have link annotations yet.
-#if PLATFORM(MAC)
auto annotations = page->annotations();
EXPECT_EQ(annotations.size(), 1u);
if (annotations.size()) {
@@ -199,7 +197,6 @@
EXPECT_TRUE(CGRectContainsPoint(annotationBounds, cMidpoint));
}
-#endif
didTakeSnapshot = true;
}];
@@ -222,8 +219,8 @@
auto page = document->page(0);
EXPECT_NE(page, nullptr);
- // FIXME: There should be a link here, but due to the way we gather links for annotation using the RenderInline tree
- // it is missed.
+ // FIXME <rdar://problem/55086988>: There should be a link here, but due to the way we gather links for
+ // annotation using the RenderInline tree it is missed.
// auto annotations = page->annotations();
// EXPECT_EQ(annotations.size(), 1u);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes