diff options
| author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
| commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
| tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKit/mac/Misc/WebCoreStatistics.mm | |
| parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
| download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 | |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKit/mac/Misc/WebCoreStatistics.mm')
| -rw-r--r-- | WebKit/mac/Misc/WebCoreStatistics.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index bbe07d5..a5d5ae1 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -37,6 +37,7 @@ #import <WebCore/Frame.h> #import <WebCore/GCController.h> #import <WebCore/GlyphPageTreeNode.h> +#import <WebCore/GraphicsContext.h> #import <WebCore/IconDatabase.h> #import <WebCore/JSDOMWindow.h> #import <WebCore/PageCache.h> @@ -289,4 +290,15 @@ using namespace WebCore; { return PrintContext::pageSizeAndMarginsInPixels(_private->coreFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft); } + +- (void)printToCGContext:(CGContextRef)cgContext:(float)pageWidthInPixels:(float)pageHeightInPixels +{ + Frame* coreFrame = _private->coreFrame; + if (!coreFrame) + return; + + GraphicsContext graphicsContext(cgContext); + PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels)); +} + @end |
