summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Misc
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-06-28 16:42:48 +0100
committerKristian Monsen <kristianm@google.com>2010-07-02 10:29:56 +0100
commit06ea8e899e48f1f2f396b70e63fae369f2f23232 (patch)
tree20c1428cd05c76f32394ab354ea35ed99acd86d8 /WebKit/mac/Misc
parent72aad67af14193199e29cdd5c4ddc095a8b9a8a8 (diff)
downloadexternal_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.zip
external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.gz
external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.bz2
Merge WebKit at r61871: Initial merge by git.
Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
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];