[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:55:48 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 22f4918af1b4a5cfcf3702e3cedd945a9058765a
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 9 22:42:56 2003 +0000
WebKit:
Fixed 3414988. Don't store absolute path to home directory.
Reviewed by Chris Blumenberg.
Fixed 3414319. Send correct WebView back as parameter to webViewShow:
Review by Darin.
Fixed 3095029. Draw a frame's border in WebFrameView, instead of WebHTMLView, and correctly inset the frame's scrollview to account for the border. Mostly written by Darin.
Reviewed by Darin (and Richard).
* Misc.subproj/WebIconDatabase.m:
(-[WebIconDatabase _createFileDatabase]):
Store @"~/Library/Icon" instead of absolute path, and always try to tilde expand stored path.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge setHasBorder:]):
* WebView.subproj/WebFrameView.m:
(-[WebFrameView drawRect:]):
(-[WebFrameView setFrameSize:]):
* WebView.subproj/WebFrameViewPrivate.h:
* WebView.subproj/WebFrameViewPrivate.m:
(-[WebFrameView _isMainFrame]):
(-[WebFrameView _tile]):
(-[WebFrameView _drawBorder]):
(-[WebFrameView _shouldDrawBorder]):
(-[WebFrameView _setHasBorder:]):
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView drawRect:]):
Changes to correct draw border in WebFrameView instead of WebHTMLView.
* WebView.subproj/WebViewPrivate.m:
(-[WebView _openNewWindowWithRequest:]):
Send correct parameter (returned from webView:createWebViewWithRequest:), rather than self, to webViewShow:.
WebCore:
Fix for 3095029. Written by Darin.
Reviewed by Richard.
* kwq/KWQFrame.h:
* kwq/KWQFrame.mm:
(QFrame::setFrameStyle):
Doesn't need to be virtual.
(QFrame::frameWidth):
Tweaks.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge adjustViewSize]):
Remove frameBorderStyle, no longer needed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b1cb7e2..3498af9 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,38 @@
+2003-09-09 Richard Williamson <rjw at apple.com>
+
+ Fixed 3414988. Don't store absolute path to home directory.
+ Reviewed by Chris Blumenberg.
+
+ Fixed 3414319. Send correct WebView back as parameter to webViewShow:
+ Review by Darin.
+
+ Fixed 3095029. Draw a frame's border in WebFrameView, instead of WebHTMLView, and correctly inset the frame's scrollview to account for the border. Mostly written by Darin.
+ Reviewed by Darin (and Richard).
+
+ * Misc.subproj/WebIconDatabase.m:
+ (-[WebIconDatabase _createFileDatabase]):
+ Store @"~/Library/Icon" instead of absolute path, and always try to tilde expand stored path.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge setHasBorder:]):
+ * WebView.subproj/WebFrameView.m:
+ (-[WebFrameView drawRect:]):
+ (-[WebFrameView setFrameSize:]):
+ * WebView.subproj/WebFrameViewPrivate.h:
+ * WebView.subproj/WebFrameViewPrivate.m:
+ (-[WebFrameView _isMainFrame]):
+ (-[WebFrameView _tile]):
+ (-[WebFrameView _drawBorder]):
+ (-[WebFrameView _shouldDrawBorder]):
+ (-[WebFrameView _setHasBorder:]):
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView drawRect:]):
+ Changes to correct draw border in WebFrameView instead of WebHTMLView.
+
+ * WebView.subproj/WebViewPrivate.m:
+ (-[WebView _openNewWindowWithRequest:]):
+ Send correct parameter (returned from webView:createWebViewWithRequest:), rather than self, to webViewShow:.
+
2003-09-09 Chris Blumenberg <cblu at apple.com>
Fixed: <rdar://problem/3412380>: REGRESSION (85-98): www.minoltan.com is decoded incorrectly on Japanese system
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index b709b59..54342f8 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -224,9 +224,10 @@ NSSize WebIconLargeSize = {128, 128};
NSString *databaseDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebIconDatabaseDirectoryDefaultsKey];
if (!databaseDirectory) {
- databaseDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Icons"];
+ databaseDirectory = @"~/Library/Icons";
[[NSUserDefaults standardUserDefaults] setObject:databaseDirectory forKey:WebIconDatabaseDirectoryDefaultsKey];
}
+ databaseDirectory = [databaseDirectory stringByExpandingTildeInPath];
_private->fileDatabase = [[WebFileDatabase alloc] initWithPath:databaseDirectory];
[_private->fileDatabase setSizeLimit:20000000];
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 238035a..338dc33 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -937,4 +937,9 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
[[frame parentFrame] _removeChild:frame];
}
+- (void)setHasBorder:(BOOL)hasBorder
+{
+ [[_frame frameView] _setHasBorder:hasBorder];
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 0854e34..9cbd272 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -4,6 +4,7 @@
#import <WebKit/WebFrameView.h>
+#import <WebKit/WebBridge.h>
#import <WebKit/WebClipView.h>
#import <WebKit/WebCookieAdapter.h>
#import <WebKit/WebDataSource.h>
@@ -11,7 +12,7 @@
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFrameViewPrivate.h>
-#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebImageRenderer.h>
#import <WebKit/WebImageRendererFactory.h>
#import <WebKit/WebImageView.h>
@@ -121,6 +122,8 @@ enum {
}
#endif
}
+
+ [self _drawBorder];
}
- (void)setFrameSize:(NSSize)size
@@ -129,6 +132,7 @@ enum {
[[self _scrollView] setDrawsBackground:YES];
}
[super setFrameSize:size];
+ [self _tile];
}
- (void)keyDown:(NSEvent *)event
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 9c15c9f..be15284 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -22,11 +22,13 @@
NSArray *draggingTypes;
BOOL inNextValidKeyView;
+ BOOL hasBorder;
}
@end
@interface WebFrameView (WebPrivate)
+
- (WebView *)_webView;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
@@ -51,5 +53,9 @@
+ (BOOL)_canShowMIMETypeAsHTML:(NSString *)MIMEType;
- (BOOL)_isMainFrame;
- (NSScrollView *)_scrollView;
+- (void)_setHasBorder:(BOOL)hasBorder;
+- (void)_tile;
+- (void)_drawBorder;
+- (BOOL)_shouldDrawBorder;
@end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 9c15c9f..be15284 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -22,11 +22,13 @@
NSArray *draggingTypes;
BOOL inNextValidKeyView;
+ BOOL hasBorder;
}
@end
@interface WebFrameView (WebPrivate)
+
- (WebView *)_webView;
- (void)_setDocumentView:(NSView <WebDocumentView> *)view;
- (NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
@@ -51,5 +53,9 @@
+ (BOOL)_canShowMIMETypeAsHTML:(NSString *)MIMEType;
- (BOOL)_isMainFrame;
- (NSScrollView *)_scrollView;
+- (void)_setHasBorder:(BOOL)hasBorder;
+- (void)_tile;
+- (void)_drawBorder;
+- (BOOL)_shouldDrawBorder;
@end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index b26720c..ef8b336 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -4,10 +4,11 @@
#import <WebKit/WebFrameViewPrivate.h>
+#import <WebKit/WebBridge.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
-#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebImageView.h>
#import <WebKit/WebTextView.h>
#import <WebKit/WebViewPrivate.h>
@@ -314,4 +315,69 @@ static NSMutableDictionary *viewTypes;
return [_private->webView mainFrame] == [self webFrame];
}
+- (void)_tile
+{
+ NSRect scrollViewFrame = [self bounds];
+ // The border drawn by WebFrameView is 1 pixel on the left and right,
+ // two pixels on top and bottom. Shrink the scroll view to accomodate
+ // the border.
+ if ([self _shouldDrawBorder]){
+ scrollViewFrame = NSInsetRect (scrollViewFrame, 1, 2);
+ }
+ [_private->frameScrollView setFrame:scrollViewFrame];
+}
+
+- (void)_drawBorder
+{
+ if ([self _shouldDrawBorder]){
+ NSRect vRect = [self frame];
+
+ // Left, black
+ [[NSColor blackColor] set];
+ NSRectFill(NSMakeRect(0,0,1,vRect.size.height));
+
+ // Top, light gray, black
+ [[NSColor lightGrayColor] set];
+ NSRectFill(NSMakeRect(0,0,vRect.size.width,1));
+ [[NSColor whiteColor] set];
+ NSRectFill(NSMakeRect(1,1,vRect.size.width-2,1));
+
+ // Right, light gray
+ [[NSColor lightGrayColor] set];
+ NSRectFill(NSMakeRect(vRect.size.width-1,1,1,vRect.size.height-2));
+
+ // Bottom, light gray, white
+ [[NSColor blackColor] set];
+ NSRectFill(NSMakeRect(0,vRect.size.height-1,vRect.size.width,1));
+ [[NSColor lightGrayColor] set];
+ NSRectFill(NSMakeRect(1,vRect.size.height-2,vRect.size.width-2,1));
+ }
+}
+
+- (BOOL)_shouldDrawBorder
+{
+ if (!_private->hasBorder)
+ return NO;
+
+ // Only draw a border for frames that request a border and the frame does
+ // not contain a frameset. Additionally we should (post-panther) not draw
+ // a border (left, right, top or bottom) if the frame edge abutts the window frame.
+ NSView *docV = [self documentView];
+ if ([docV isKindOfClass:[WebHTMLView class]]){
+ if ([[(WebHTMLView *)docV _bridge] isFrameSet]){
+ return NO;
+ }
+ }
+ return YES;
+}
+
+- (void)_setHasBorder:(BOOL)hasBorder
+{
+ if (_private->hasBorder == hasBorder) {
+ return;
+ }
+ _private->hasBorder = hasBorder;
+ [self _tile];
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index f3e560c..4508b80 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -458,69 +458,6 @@
_private->needsToApplyStyles = flag;
}
-- (void)_drawBorder: (int)type
-{
- switch (type){
- case SunkenFrameBorder:
- {
- NSRect vRect = [self frame];
-
- // Left, light gray, black
- [[NSColor lightGrayColor] set];
- NSRectFill(NSMakeRect(0,0,1,vRect.size.height));
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(0,1,1,vRect.size.height-2));
-
- // Top, light gray, black
- [[NSColor lightGrayColor] set];
- NSRectFill(NSMakeRect(0,0,vRect.size.width,1));
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(1,1,vRect.size.width-2,1));
-
- // Right, light gray, white
- [[NSColor whiteColor] set];
- NSRectFill(NSMakeRect(vRect.size.width,0,1,vRect.size.height));
- [[NSColor lightGrayColor] set];
- NSRectFill(NSMakeRect(vRect.size.width-1,1,1,vRect.size.height-2));
-
- // Bottom, light gray, white
- [[NSColor whiteColor] set];
- NSRectFill(NSMakeRect(0,vRect.size.height-1,vRect.size.width,1));
- [[NSColor lightGrayColor] set];
- NSRectFill(NSMakeRect(1,vRect.size.height-2,vRect.size.width-2,1));
- break;
- }
-
- case PlainFrameBorder:
- {
- // Not used yet, but will need for 'focusing' frames.
- NSRect vRect = [self frame];
-
- // Left, black
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(0,0,2,vRect.size.height));
-
- // Top, black
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(0,0,vRect.size.width,2));
-
- // Right, black
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(vRect.size.width,0,2,vRect.size.height));
-
- // Bottom, black
- [[NSColor blackColor] set];
- NSRectFill(NSMakeRect(0,vRect.size.height-2,vRect.size.width,2));
- break;
- }
-
- case NoFrameBorder:
- default:
- {
- }
- }
-}
-
- (void)drawRect:(NSRect)rect
{
LOG(View, "%@ drawing", self);
@@ -591,8 +528,6 @@
[(WebClipView *)[self superview] resetAdditionalClip];
- [self _drawBorder: [[self _bridge] frameBorderStyle]];
-
[NSGraphicsContext restoreGraphicsState];
} NS_HANDLER {
[(WebClipView *)[self superview] resetAdditionalClip];
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 8e25f21..d6d946c 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -313,7 +313,7 @@ NSString *_WebMainFrameURLKey = @"mainFrameURL";
newWindowWebView = [[WebDefaultUIDelegate sharedUIDelegate] webView:self createWebViewWithRequest: request];
}
- [[newWindowWebView _UIDelegateForwarder] webViewShow: self];
+ [[newWindowWebView _UIDelegateForwarder] webViewShow: newWindowWebView];
return newWindowWebView;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list