Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: Source/core/page/PrintContext.cpp

Issue 1172463002: Fix print context to work under slimming paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary RuntimeEnabledFeatures include. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/PrintContext.h ('k') | Source/core/page/PrintContextTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PrintContext.cpp
diff --git a/Source/core/page/PrintContext.cpp b/Source/core/page/PrintContext.cpp
index ec71f199c42bd10e267119a9697cd83d938dab12..97955e1c85c6f49469354d2b283fea56a9790417 100644
--- a/Source/core/page/PrintContext.cpp
+++ b/Source/core/page/PrintContext.cpp
@@ -24,7 +24,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/layout/LayoutView.h"
-#include "platform/graphics/GraphicsContext.h"
+#include "third_party/skia/include/core/SkAnnotation.h"
namespace blink {
@@ -230,7 +230,7 @@ void PrintContext::collectLinkedDestinations(Node* node)
}
}
-void PrintContext::outputLinkedDestinations(GraphicsContext& graphicsContext, const IntRect& pageRect)
+void PrintContext::outputLinkedDestinations(SkCanvas* canvas, const IntRect& pageRect)
{
if (!m_linkedDestinationsValid) {
// Collect anchors in the top-level frame only because our PrintContext
@@ -249,7 +249,8 @@ void PrintContext::outputLinkedDestinations(GraphicsContext& graphicsContext, co
continue;
IntPoint point = boundingBox.minXMinYCorner();
point.clampNegativeToZero();
- graphicsContext.addURLTargetAtPoint(entry.key, point);
+ SkAutoDataUnref nameData(SkData::NewWithCString(entry.key.utf8().data()));
+ SkAnnotateNamedDestination(canvas, SkPoint::Make(point.x(), point.y()), nameData);
}
}
« no previous file with comments | « Source/core/page/PrintContext.h ('k') | Source/core/page/PrintContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698