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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:52:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0c93b3dd6e32b4ececbc97a9593458ccf638ef33
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 22 22:13:25 2002 +0000

    	Make the panel position itself above the main window.
    	Too bad we can't use a sheet, but this is better than a random position.
    
            * WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m:
            (-[WebJavaScriptTextInputPanel initWithPrompt:text:]):
    	Use the new [NSWindow sizeToFitAndAdjustWindowHeight]
    	and [NSControl sizeToFitAndAdjustWindowHeight].
    
            * Misc.subproj/WebNSControlExtras.h: Added.
            * Misc.subproj/WebNSControlExtras.m: Added.
            * Misc.subproj/WebNSWindowExtras.h: Added.
            * Misc.subproj/WebNSWindowExtras.m: Added.
            * WebKit.pbproj/project.pbxproj: Added above files.
    
            * English.lproj/StringsNotToBeLocalized.txt: Update.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e40ee20..a7c4ce5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-10-22  Darin Adler  <darin at apple.com>
+
+	Make the panel position itself above the main window.
+	Too bad we can't use a sheet, but this is better than a random position.
+
+        * WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m:
+        (-[WebJavaScriptTextInputPanel initWithPrompt:text:]):
+	Use the new [NSWindow sizeToFitAndAdjustWindowHeight]
+	and [NSControl sizeToFitAndAdjustWindowHeight].
+
+        * Misc.subproj/WebNSControlExtras.h: Added.
+        * Misc.subproj/WebNSControlExtras.m: Added.
+        * Misc.subproj/WebNSWindowExtras.h: Added.
+        * Misc.subproj/WebNSWindowExtras.m: Added.
+        * WebKit.pbproj/project.pbxproj: Added above files.
+
+        * English.lproj/StringsNotToBeLocalized.txt: Update.
+
 2002-10-22  Ken Kocienda  <kocienda at apple.com>
 
         * Misc.subproj/WebKitErrors.h: Add new error code to signify that a location
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e40ee20..a7c4ce5 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-10-22  Darin Adler  <darin at apple.com>
+
+	Make the panel position itself above the main window.
+	Too bad we can't use a sheet, but this is better than a random position.
+
+        * WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m:
+        (-[WebJavaScriptTextInputPanel initWithPrompt:text:]):
+	Use the new [NSWindow sizeToFitAndAdjustWindowHeight]
+	and [NSControl sizeToFitAndAdjustWindowHeight].
+
+        * Misc.subproj/WebNSControlExtras.h: Added.
+        * Misc.subproj/WebNSControlExtras.m: Added.
+        * Misc.subproj/WebNSWindowExtras.h: Added.
+        * Misc.subproj/WebNSWindowExtras.m: Added.
+        * WebKit.pbproj/project.pbxproj: Added above files.
+
+        * English.lproj/StringsNotToBeLocalized.txt: Update.
+
 2002-10-22  Ken Kocienda  <kocienda at apple.com>
 
         * Misc.subproj/WebKitErrors.h: Add new error code to signify that a location
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index d861ee2..de3bae0 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -81,6 +81,7 @@
 "WebIconNotificationUserInfoSiteURLKey"
 "WebIconURLToSiteURLs"
 "WebIconsOnDisk"
+"WebJavaScriptTextInputPanel"
 "WebKitAllowAnimatedImageLoopingPreferenceKey"
 "WebKitAllowAnimatedImagesPreferenceKey"
 "WebKitCursiveFont"
@@ -111,6 +112,10 @@
 "WebMethodNotYetImplemented"
 "WebModalDialogPretendWindow"
 "WebModifiedBookmarkKey"
+"WebPluginAttributes"
+"WebPluginBaseURL"
+"WebPluginContainer"
+"WebPluginDefaultView"
 "WebPreviousFrameState"
 "WebRuntimeError"
 "WebSiteURLToIconURLKey"
@@ -157,7 +162,7 @@ History.subproj/WebHistoryItem.m:"title"
 Misc.subproj/WebIconDatabase.m:"Experiments"
 Misc.subproj/WebIconDatabase.m:"icon:%@"
 Misc.subproj/WebKitLogging.m
-Plugins.subproj/WebPlugin.m:"main"
+Plugins.subproj/WebNetscapePluginPackage.m:"main"
 WebCoreSupport.subproj/WebCookieAdapter.m:"Cookie"
 WebCoreSupport.subproj/WebTextRenderer.m:"YES"
 WebView.subproj/WebPreferences.m:"latin1"
diff --git a/WebKit/Misc.subproj/WebNSControlExtras.h b/WebKit/Misc.subproj/WebNSControlExtras.h
new file mode 100644
index 0000000..9c08f1f
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSControlExtras.h
@@ -0,0 +1,13 @@
+//
+//  WebNSControlExtras.h
+//  WebKit
+//
+//  Created by Darin Adler on Tue Oct 22 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at interface NSControl (WebExtras)
+- (void)sizeToFitAndAdjustWindowHeight;
+ at end
diff --git a/WebKit/Misc.subproj/WebNSControlExtras.m b/WebKit/Misc.subproj/WebNSControlExtras.m
new file mode 100644
index 0000000..b2b0769
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSControlExtras.m
@@ -0,0 +1,31 @@
+//
+//  WebNSControlExtras.m
+//  WebKit
+//
+//  Created by Darin Adler on Tue Oct 22 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "WebNSControlExtras.h"
+
+
+ at implementation NSControl (WebExtras)
+
+- (void)sizeToFitAndAdjustWindowHeight
+{
+    float heightBefore = [self frame].size.height;
+    
+    [self sizeToFit];
+    
+    NSRect frame = [self frame];
+    float heightDelta = frame.size.height - heightBefore;
+    
+    frame.origin.y -= heightDelta;
+    [self setFrameOrigin:frame.origin];
+    
+    NSRect windowFrame = [[self window] frame];
+    windowFrame.size.height += heightDelta;
+    [[self window] setFrame:windowFrame display:NO];
+}
+
+ at end
diff --git a/WebKit/Misc.subproj/WebNSWindowExtras.h b/WebKit/Misc.subproj/WebNSWindowExtras.h
new file mode 100644
index 0000000..4a3dc7f
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSWindowExtras.h
@@ -0,0 +1,13 @@
+//
+//  WebNSWindowExtras.h
+//  WebKit
+//
+//  Created by Darin Adler on Tue Oct 22 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at interface NSWindow (WebExtras)
+- (void)centerOverMainWindow; // centers "visually", putting 1/3 of the remaining space above, and 2/3 below
+ at end
diff --git a/WebKit/Misc.subproj/WebNSWindowExtras.m b/WebKit/Misc.subproj/WebNSWindowExtras.m
new file mode 100644
index 0000000..6b3f223
--- /dev/null
+++ b/WebKit/Misc.subproj/WebNSWindowExtras.m
@@ -0,0 +1,32 @@
+//
+//  WebNSWindowExtras.m
+//  WebKit
+//
+//  Created by Darin Adler on Tue Oct 22 2002.
+//  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import "WebNSWindowExtras.h"
+
+ at implementation NSWindow (WebExtras)
+
+- (void)centerOverMainWindow
+{
+    NSRect frameToCenterOver;
+    if ([NSApp mainWindow]) {
+        frameToCenterOver = [[NSApp mainWindow] frame];
+    } else {
+        frameToCenterOver = [[NSScreen mainScreen] visibleFrame];
+    }
+    
+    NSSize size = [self frame].size;
+    NSPoint origin;
+    origin.y = NSMaxY(frameToCenterOver)
+        - (frameToCenterOver.size.height - size.height) / 3
+        - size.height;
+    origin.x = frameToCenterOver.origin.x
+        + (frameToCenterOver.size.width - size.width) / 2;
+    [self setFrameOrigin:origin];
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m b/WebKit/WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m
index 9c478bf..093b378 100644
--- a/WebKit/WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m
+++ b/WebKit/WebCoreSupport.subproj/WebJavaScriptTextInputPanel.m
@@ -10,6 +10,9 @@
 
 #import <WebFoundation/WebAssertions.h>
 
+#import <WebKit/WebNSControlExtras.h>
+#import <WebKit/WebNSWindowExtras.h>
+
 @implementation WebJavaScriptTextInputPanel
 
 - (id)initWithPrompt:(NSString *)p text:(NSString *)t
@@ -17,23 +20,15 @@
     [self initWithWindowNibName:@"WebJavaScriptTextInputPanel"];
     NSWindow *window = [self window];
     
-    // This must be done after the first call to [self window], because
+    // This must be done after the call to [self window], because
     // until then, prompt and textInput will be nil.
     ASSERT(prompt);
     ASSERT(textInput);
     [prompt setStringValue:p];
     [textInput setStringValue:t];
 
-    // Resize the prompt field, then the window, to account for the prompt text.
-    float promptHeightBefore = [prompt frame].size.height;
-    [prompt sizeToFit];
-    NSRect promptFrame = [prompt frame];
-    float heightDelta = promptFrame.size.height - promptHeightBefore;
-    promptFrame.origin.y -= heightDelta;
-    [prompt setFrame:promptFrame];
-    NSRect windowFrame = [window frame];
-    windowFrame.size.height += heightDelta;
-    [window setFrame:windowFrame display:NO];
+    [prompt sizeToFitAndAdjustWindowHeight];
+    [window centerOverMainWindow];
     
     return self;
 }
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 3d055a4..24ef589 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -285,6 +285,8 @@
 				83402EF8035A588900BE770A,
 				83402EFC035A58D100BE770A,
 				9345D4EC0365C5B2008635CE,
+				9345DDB00365FB27008635CE,
+				9345DDB40365FFD0008635CE,
 				848DFF870365FE6A00CA2ACA,
 				848DFF880365FE6A00CA2ACA,
 				848DFF890365FE6A00CA2ACA,
@@ -387,6 +389,8 @@
 				83402EF9035A588900BE770A,
 				83402EFD035A58D100BE770A,
 				9345D4ED0365C5B2008635CE,
+				9345DDB10365FB27008635CE,
+				9345DDB50365FFD0008635CE,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -463,12 +467,16 @@
 				2568C72C0174912D0ECA149E,
 				F5927D4E02D26C5E01CA2DBB,
 				F5C283730284676D018635CA,
+				9345DDB20365FFD0008635CE,
+				9345DDB30365FFD0008635CE,
 				8398847A03426FB000BC5F5E,
 				8398847B03426FB000BC5F5E,
 				ED2B2474033A2DA800C1A526,
 				ED2B2475033A2DA800C1A526,
 				F508946902B71D59018A9CD4,
 				F508946A02B71D59018A9CD4,
+				9345DDAE0365FB27008635CE,
+				9345DDAF0365FB27008635CE,
 				F560BEBC030DAF4401C1A526,
 				F560BEBD030DAF4401C1A526,
 				F59668C802AD2923018635CA,
@@ -1644,6 +1652,54 @@
 			settings = {
 			};
 		};
+		9345DDAE0365FB27008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSWindowExtras.h;
+			refType = 4;
+		};
+		9345DDAF0365FB27008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSWindowExtras.m;
+			refType = 4;
+		};
+		9345DDB00365FB27008635CE = {
+			fileRef = 9345DDAE0365FB27008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9345DDB10365FB27008635CE = {
+			fileRef = 9345DDAF0365FB27008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9345DDB20365FFD0008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSControlExtras.h;
+			refType = 4;
+		};
+		9345DDB30365FFD0008635CE = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			path = WebNSControlExtras.m;
+			refType = 4;
+		};
+		9345DDB40365FFD0008635CE = {
+			fileRef = 9345DDB20365FFD0008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		9345DDB50365FFD0008635CE = {
+			fileRef = 9345DDB30365FFD0008635CE;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		9367C636034E9F00008635C5 = {
 			fileEncoding = 4;
 			isa = PBXFileReference;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list