[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:31:22 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit dcd9d2f06a06e89f4bb523fce2a8f15111859a16
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 25 01:13:19 2003 +0000

    WebCore:
    
            Reviewed by Richard.
    
    	- fixed 3083339 - significant top and side margin appended to new windows
    
            * kwq/KWQKHTMLPartBrowserExtension.mm:
            (KHTMLPartBrowserExtension::createNewWindow): Account for distinction between
    	frame and content rect.
    	* kwq/KWQStyle.h: Return 0 for the appropriate style to avoid
    	adding extra padding when making a new window from JavaScript.
            * kwq/WebCoreBridge.h: Prototype new methods.
    
    WebKit:
    
            Reviewed by Richard.
    
    	- fixed 3083339 - significant top and side margin appended to new windows
    
    	Part of the fix involves adding new window operation delegate methods.
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge setWindowFrame:]): Tweaked code a bit.
            (-[WebBridge windowFrame]): Added.
            (-[WebBridge setWindowContentRect:]): Added.
            (-[WebBridge windowContentRect]): Added.
            * WebView.subproj/WebDefaultWindowOperationsDelegate.m:
            (-[WebDefaultWindowOperationsDelegate webView:setContentRect:]): Implemented.
            (-[WebDefaultWindowOperationsDelegate webViewContentRect:]): Likewise.
            * WebView.subproj/WebWindowOperationsDelegate.h:
    
    WebBrowser:
    
            Reviewed by Richard.
    
    	- fixed 3083339 - significant top and side margin appended to new windows
    
            * BrowserWebController.m:
            (-[BrowserWebController webView:setFrame:]): Tweaked a bit.
            (-[BrowserWebController webViewFrame:]): Likewise.
            (-[BrowserWebController webView:setContentRect:]): Implemented.
            (-[BrowserWebController webViewContentRect:]): Likewise.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3910 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ac0381e..f38292c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-03-24  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Richard.
+
+	- fixed 3083339 - significant top and side margin appended to new windows
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Account for distinction between
+	frame and content rect.
+	* kwq/KWQStyle.h: Return 0 for the appropriate style to avoid
+	adding extra padding when making a new window from JavaScript.
+        * kwq/WebCoreBridge.h: Prototype new methods.
+
 2003-03-24  David Hyatt  <hyatt at apple.com>
 
 	Fix for crash on www.lnt.com.  3199929 is the bug number.  
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ac0381e..f38292c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-03-24  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Richard.
+
+	- fixed 3083339 - significant top and side margin appended to new windows
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Account for distinction between
+	frame and content rect.
+	* kwq/KWQStyle.h: Return 0 for the appropriate style to avoid
+	adding extra padding when making a new window from JavaScript.
+        * kwq/WebCoreBridge.h: Prototype new methods.
+
 2003-03-24  David Hyatt  <hyatt at apple.com>
 
 	Fix for crash on www.lnt.com.  3199929 is the bug number.  
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index 30a95eb..c1db50d 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -113,27 +113,26 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
     }
     
     if (winArgs.xSet || winArgs.ySet || winArgs.widthSet || winArgs.heightSet) {
-	NSRect frame = [[bridge window] frame];
-	
+	NSRect frame = [bridge windowFrame];
+	NSRect contentRect = [bridge windowContentRect];
+
 	if (winArgs.xSet) {
 	    frame.origin.x = winArgs.x;
 	}
 	
 	if (winArgs.ySet) {
 	    float heightForFlip = NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]);
-            if (winArgs.heightSet) {
-		frame.origin.y = heightForFlip - winArgs.y + frame.size.height - winArgs.height;
-	    } else {
-		frame.origin.y = heightForFlip - winArgs.y;
-	    }
+	    frame.origin.y = heightForFlip - winArgs.y;
 	}
 	
 	if (winArgs.widthSet) {
-	    frame.size.width = winArgs.width;
+	    frame.size.width += winArgs.width - contentRect.size.width;
 	}
 	
 	if (winArgs.heightSet) {
-	    frame.size.height = winArgs.height;
+	    float heightDelta = winArgs.height - contentRect.size.height;
+	    frame.size.height += heightDelta;
+	    frame.origin.y -= heightDelta;
 	}
 	
 	[bridge setWindowFrame:frame];
diff --git a/WebCore/kwq/KWQStyle.h b/WebCore/kwq/KWQStyle.h
index f1e9648..0e7d0a5 100644
--- a/WebCore/kwq/KWQStyle.h
+++ b/WebCore/kwq/KWQStyle.h
@@ -52,8 +52,8 @@ public:
 	case PM_IndicatorHeight:
 	case PM_ExclusiveIndicatorWidth:
 	case PM_ExclusiveIndicatorHeight:
-        case PM_DefaultFrameWidth:
             return 22; // FIXME! Shouldn't be hardcoded. Perhaps shouldn't all be same.
+        case PM_DefaultFrameWidth:
         case PM_ButtonMargin:
             return 0;
         }
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 98cc444..d709ab4 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -241,6 +241,9 @@ enum FrameBorderStyle {
 - (void)setScrollbarsVisible:(BOOL)visible;
 - (NSWindow *)window;
 - (void)setWindowFrame:(NSRect)frame;
+- (NSRect)windowFrame;
+- (void)setWindowContentRect:(NSRect)frame;
+- (NSRect)windowContentRect;
 
 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index dad474e..151bcac 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2003-03-24  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Richard.
+
+	- fixed 3083339 - significant top and side margin appended to new windows
+
+	Part of the fix involves adding new window operation delegate methods.
+	
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge setWindowFrame:]): Tweaked code a bit.
+        (-[WebBridge windowFrame]): Added. 
+        (-[WebBridge setWindowContentRect:]): Added.
+        (-[WebBridge windowContentRect]): Added.
+        * WebView.subproj/WebDefaultWindowOperationsDelegate.m:
+        (-[WebDefaultWindowOperationsDelegate webView:setContentRect:]): Implemented.
+        (-[WebDefaultWindowOperationsDelegate webViewContentRect:]): Likewise.
+        * WebView.subproj/WebWindowOperationsDelegate.h:
+
 2003-03-24  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: 3155489 - Seed: PostScript files display instead of downloading, often as a blank page
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 5997a18..5745a08 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -180,8 +180,29 @@
 - (void)setWindowFrame:(NSRect)frameRect
 {
     ASSERT(frame != nil);
-    WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c setFrame:frameRect];
+    WebView *webView = [frame webView];
+    [[webView _windowOperationsDelegateForwarder] webView:webView setFrame:frameRect];
+}
+
+- (NSRect)windowFrame
+{
+    ASSERT(frame != nil);
+    WebView *webView = [frame webView];
+    return [[webView _windowOperationsDelegateForwarder] webViewFrame:webView];
+}
+
+- (void)setWindowContentRect:(NSRect)contentRect
+{
+    ASSERT(frame != nil);
+    WebView *webView = [frame webView];
+    [[webView _windowOperationsDelegateForwarder] webView:webView setFrame:contentRect];
+}
+
+- (NSRect)windowContentRect
+{
+    ASSERT(frame != nil);
+    WebView *webView = [frame webView];
+    return [[webView _windowOperationsDelegateForwarder] webViewContentRect:webView];
 }
 
 - (NSWindow *)window
diff --git a/WebKit/WebView.subproj/WebDefaultUIDelegate.m b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
index 317d6db..832777d 100644
--- a/WebKit/WebView.subproj/WebDefaultUIDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
@@ -105,11 +105,22 @@ static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
 
 - (void)webView: (WebView *)wv setFrame:(NSRect)frame;
 {
+    [[wv window] setFrame:frame display:NO];
 }
 
 - (NSRect)webViewFrame: (WebView *)wv;
 {
-    return NSMakeRect (0,0,0,0);
+    return [[wv window] frame];
+}
+
+- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect
+{
+    [[webView window] setFrame:[NSWindow frameRectForContentRect:contentRect styleMask:[[webView window] styleMask]] display:NO];
+}
+
+- (NSRect)webViewContentRect:(WebView *)webView
+{
+    return [NSWindow contentRectForFrameRect:[[webView window] frame] styleMask:[[webView window] styleMask]];
 }
 
 - (void)webView: (WebView *)wv runJavaScriptAlertPanelWithMessage:(NSString *)message;
diff --git a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
index 317d6db..832777d 100644
--- a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
@@ -105,11 +105,22 @@ static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
 
 - (void)webView: (WebView *)wv setFrame:(NSRect)frame;
 {
+    [[wv window] setFrame:frame display:NO];
 }
 
 - (NSRect)webViewFrame: (WebView *)wv;
 {
-    return NSMakeRect (0,0,0,0);
+    return [[wv window] frame];
+}
+
+- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect
+{
+    [[webView window] setFrame:[NSWindow frameRectForContentRect:contentRect styleMask:[[webView window] styleMask]] display:NO];
+}
+
+- (NSRect)webViewContentRect:(WebView *)webView
+{
+    return [NSWindow contentRectForFrameRect:[[webView window] frame] styleMask:[[webView window] styleMask]];
 }
 
 - (void)webView: (WebView *)wv runJavaScriptAlertPanelWithMessage:(NSString *)message;
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index c958dc3..47e7538 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -210,6 +210,24 @@
 - (NSRect)webViewFrame: (WebView *)webView;
 
 /*!
+    @method webView:setContentRect:
+    @abstract Set the window's content rect
+    @param frame The new window content rect
+    @discussion Even though a caller could set the content rect
+    directly using the NSWindow, this method is provided so
+    implementors of this protocol can do special things on
+    programmatic move/resize, like avoiding autosaving of the size.
+*/
+- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect;
+
+/*!
+    @method webViewContentRect:
+    @abstract Return the window's content rect
+    @discussion 
+*/
+- (NSRect)webViewContentRect:(WebView *)webView;
+
+/*!
     @method runJavaScriptAlertPanelWithMessage:
     @abstract Display a JavaScript alert panel
     @param message The message to display
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
index c958dc3..47e7538 100644
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
@@ -210,6 +210,24 @@
 - (NSRect)webViewFrame: (WebView *)webView;
 
 /*!
+    @method webView:setContentRect:
+    @abstract Set the window's content rect
+    @param frame The new window content rect
+    @discussion Even though a caller could set the content rect
+    directly using the NSWindow, this method is provided so
+    implementors of this protocol can do special things on
+    programmatic move/resize, like avoiding autosaving of the size.
+*/
+- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect;
+
+/*!
+    @method webViewContentRect:
+    @abstract Return the window's content rect
+    @discussion 
+*/
+- (NSRect)webViewContentRect:(WebView *)webView;
+
+/*!
     @method runJavaScriptAlertPanelWithMessage:
     @abstract Display a JavaScript alert panel
     @param message The message to display

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list