[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
sullivan
sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:53:17 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a2776188a1794bf329cccf5ac0c998d70585237a
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 21 21:05:54 2003 +0000
- fixed 3387950 -- REGRESSION (85-89): Standalone image in Safari prints much
smaller than in Jaguar
Reviewed by Chris.
* WebView.subproj/WebImageView.m:
(-[WebImageView adjustFrameSize]):
renamed from setFrameSizeUsingImage; now sets the frame size to exactly
the image size (as it did in Jaguar always) when we're not drawing to
the screen.
(-[WebImageView setFrameSize:]):
updated for name change
(-[WebImageView layout]):
ditto
(-[WebImageView beginDocument]):
adjust frame size (before printing)
(-[WebImageView endDocument]):
adjust frame size (after printing)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 183af69..692c793 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2003-08-21 John Sullivan <sullivan at apple.com>
+
+ - fixed 3387950 -- REGRESSION (85-89): Standalone image in Safari prints much
+ smaller than in Jaguar
+
+ Reviewed by Chris.
+
+ * WebView.subproj/WebImageView.m:
+ (-[WebImageView adjustFrameSize]):
+ renamed from setFrameSizeUsingImage; now sets the frame size to exactly
+ the image size (as it did in Jaguar always) when we're not drawing to
+ the screen.
+ (-[WebImageView setFrameSize:]):
+ updated for name change
+ (-[WebImageView layout]):
+ ditto
+ (-[WebImageView beginDocument]):
+ adjust frame size (before printing)
+ (-[WebImageView endDocument]):
+ adjust frame size (after printing)
+
2003-08-19 Richard Williamson <rjw at apple.com>
Fixed 3383623 (and 3384896). Remove our unbeknownst work-around for an NSImage bug that incorrectly flipped y coordinate when drawing a partial rect within the image. This has been fixed in Panther, making our work-around no longer necessary.
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 504cc4e..e89a62c 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -75,28 +75,46 @@
[[rep image] beginAnimationInRect:drawingRect fromRect:drawingRect];
}
-// Ensures that the view always fills the content area (so we draw over the previous page)
-// and that the view is at least as large as the image.
-- (void)setFrameSizeUsingImage
+- (void)adjustFrameSize
{
- NSSize size = [[self _web_superviewOfClass:[NSClipView class]] frame].size;
- NSSize imageSize = [[rep image] size];
- size.width = MAX(size.width, imageSize.width);
- size.height = MAX(size.height, imageSize.height);
+ NSSize size = [[rep image] size];
+
+ // When drawing on screen, ensure that the view always fills the content area
+ // (so we draw over the entire previous page), and that the view is at least
+ // as large as the image.. Otherwise we're printing, and we want the image to
+ // fill the view so that the printed size doesn't depend on the window size.
+ if ([NSGraphicsContext currentContextDrawingToScreen]) {
+ NSSize clipViewSize = [[self _web_superviewOfClass:[NSClipView class]] frame].size;
+ size.width = MAX(size.width, clipViewSize.width);
+ size.height = MAX(size.height, clipViewSize.height);
+ }
+
[super setFrameSize:size];
}
- (void)setFrameSize:(NSSize)size
{
- [self setFrameSizeUsingImage];
+ [self adjustFrameSize];
}
- (void)layout
{
- [self setFrameSizeUsingImage];
+ [self adjustFrameSize];
needsLayout = NO;
}
+- (void)beginDocument
+{
+ [self adjustFrameSize];
+ [super beginDocument];
+}
+
+- (void)endDocument
+{
+ [super endDocument];
+ [self adjustFrameSize];
+}
+
- (void)setDataSource:(WebDataSource *)dataSource
{
ASSERT(!rep);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list