summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/mac/Misc')
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h4
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm19
-rw-r--r--WebKit/mac/Misc/WebNSAttributedStringExtras.mm4
3 files changed, 25 insertions, 2 deletions
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index a11c064..e357b72 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -87,4 +87,8 @@
- (NSString *)counterValueForElement:(DOMElement*)element;
- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
+- (NSString *)pageProperty:(const char*)propertyName:(int)pageNumber;
+- (bool)isPageBoxVisible:(int)pageNumber;
+- (NSString *)pageAreaRectInPixels:(int)pageNumber;
+- (NSString *)preferredPageSizeInPixels:(int)pageNumber;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index c3fc23e..9112d21 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -275,4 +275,23 @@ using namespace WebCore;
return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
}
+- (NSString *)pageProperty:(const char *)propertyName:(int)pageNumber
+{
+ return PrintContext::pageProperty(_private->coreFrame, propertyName, pageNumber);
+}
+
+- (bool)isPageBoxVisible:(int)pageNumber
+{
+ return PrintContext::isPageBoxVisible(_private->coreFrame, pageNumber);
+}
+
+- (NSString *)pageAreaRectInPixels:(int)pageNumber
+{
+ return PrintContext::pageAreaRectInPixels(_private->coreFrame, pageNumber);
+}
+
+- (NSString *)preferredPageSizeInPixels:(int)pageNumber;
+{
+ return PrintContext::preferredPageSizeInPixels(_private->coreFrame, pageNumber);
+}
@end
diff --git a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
index 35b2524..2469da8 100644
--- a/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
+++ b/WebKit/mac/Misc/WebNSAttributedStringExtras.mm
@@ -154,11 +154,11 @@ static NSFileWrapper *fileWrapperForElement(Element* e)
RenderStyle* style = renderer->style();
NSFont *font = style->font().primaryFont()->getNSFont();
[attrs.get() setObject:font forKey:NSFontAttributeName];
- if (style->visitedDependentColor(CSSPropertyColor).isValid())
+ if (style->visitedDependentColor(CSSPropertyColor).alpha())
[attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
else
[attrs.get() removeObjectForKey:NSForegroundColorAttributeName];
- if (style->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
+ if (style->visitedDependentColor(CSSPropertyBackgroundColor).alpha())
[attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
else
[attrs.get() removeObjectForKey:NSBackgroundColorAttributeName];