diff options
Diffstat (limited to 'WebKit/mac/Misc')
-rw-r--r-- | WebKit/mac/Misc/WebCoreStatistics.h | 1 | ||||
-rw-r--r-- | WebKit/mac/Misc/WebCoreStatistics.mm | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h index 7a189ae..6c45fb9 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.h +++ b/WebKit/mac/Misc/WebCoreStatistics.h @@ -84,4 +84,5 @@ @interface WebFrame (WebKitDebug) - (NSString *)renderTreeAsExternalRepresentation; - (NSString *)counterValueForElement:(DOMElement*)element; +- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels; @end diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index f204ddb..b18ee29 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -40,6 +40,7 @@ #import <WebCore/IconDatabase.h> #import <WebCore/JSDOMWindow.h> #import <WebCore/PageCache.h> +#import <WebCore/PrintContext.h> #import <WebCore/RenderTreeAsText.h> #import <WebCore/RenderView.h> @@ -250,4 +251,9 @@ using namespace WebCore; return counterValueForElement(core(element)); } +- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels +{ + return PrintContext::pageNumberForElement(core(element), FloatSize(pageWidthInPixels, pageHeightInPixels)); +} + @end |