Title: [122984] trunk/Source/WebCore
Revision
122984
Author
[email protected]
Date
2012-07-18 10:10:40 -0700 (Wed, 18 Jul 2012)

Log Message

Chrome/Skia: PDF print output does not have clickable links.
https://bugs.webkit.org/show_bug.cgi?id=91171

Patch by Steve VanDeBogart <[email protected]> on 2012-07-18
Reviewed by Stephen White.

Connect GraphicsContext::setURLForRect to Skia's new API for annotations.

Printing is not generally testable.

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::setURLForRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122983 => 122984)


--- trunk/Source/WebCore/ChangeLog	2012-07-18 16:51:13 UTC (rev 122983)
+++ trunk/Source/WebCore/ChangeLog	2012-07-18 17:10:40 UTC (rev 122984)
@@ -1,3 +1,17 @@
+2012-07-18  Steve VanDeBogart  <[email protected]>
+
+        Chrome/Skia: PDF print output does not have clickable links.
+        https://bugs.webkit.org/show_bug.cgi?id=91171
+
+        Reviewed by Stephen White.
+
+        Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
+
+        Printing is not generally testable.
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::setURLForRect):
+
 2012-07-18  Philippe Normand  <[email protected]>
 
         [GStreamer] 0.11 build broken

Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (122983 => 122984)


--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-07-18 16:51:13 UTC (rev 122983)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-07-18 17:10:40 UTC (rev 122984)
@@ -37,14 +37,17 @@
 #include "Gradient.h"
 #include "ImageBuffer.h"
 #include "IntRect.h"
+#include "KURL.h"
 #include "NativeImageSkia.h"
 #include "NotImplemented.h"
 #include "PlatformContextSkia.h"
 
+#include "SkAnnotation.h"
 #include "SkBitmap.h"
 #include "SkBlurMaskFilter.h"
 #include "SkColorFilter.h"
 #include "SkCornerPathEffect.h"
+#include "SkData.h"
 #include "SkLayerDrawLooper.h"
 #include "SkShader.h"
 #include "SkiaUtils.h"
@@ -994,6 +997,11 @@
 
 void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
 {
+    if (paintingDisabled())
+        return;
+
+    SkAutoDataUnref url(SkData::NewWithCString(link.string().utf8().data()));
+    SkAnnotateRectWithURL(platformContext()->canvas(), destRect, url.get());
 }
 
 void GraphicsContext::setPlatformShouldAntialias(bool enable)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to