Title: [123356] trunk/Source/WebCore
Revision
123356
Author
[email protected]
Date
2012-07-23 11:48:42 -0700 (Mon, 23 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-23
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 (123355 => 123356)


--- trunk/Source/WebCore/ChangeLog	2012-07-23 18:45:51 UTC (rev 123355)
+++ trunk/Source/WebCore/ChangeLog	2012-07-23 18:48:42 UTC (rev 123356)
@@ -1,3 +1,17 @@
+2012-07-23  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-23  Pierre Rossi  <[email protected]>
 
         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client

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


--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-07-23 18:45:51 UTC (rev 123355)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-07-23 18:48:42 UTC (rev 123356)
@@ -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"
@@ -998,6 +1001,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