[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 08:06:49 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bf31654d7d18c174cd767f3f2e8715d408042124
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 28 23:06:44 2003 +0000

            Reviewed by John.
    
    	- fixed 3421393 - window.open does not handle non-integral height/width (small window at saabusa.com)
    
            * khtml/ecma/kjs_window.cpp:
            (WindowFunc::tryCall): Parse width, height, top and left as
    	floating point and then cast to int instead of parsing as int to
    	match other browsers and avoid rejecting floating point numbers.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5786b48..587c44e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,17 @@
 
         Reviewed by John.
 
+	- fixed 3421393 - window.open does not handle non-integral height/width (small window at saabusa.com)
+	
+        * khtml/ecma/kjs_window.cpp:
+        (WindowFunc::tryCall): Parse width, height, top and left as
+	floating point and then cast to int instead of parsing as int to
+	match other browsers and avoid rejecting floating point numbers.
+
+2003-10-28  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by John.
+
 	- fixed 3464528 - addEventListener does not work for buttons, text areas, or inputs
 
         * khtml/rendering/render_form.cpp:
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 55c2eb3..f667d52 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1189,21 +1189,21 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 
 	    QRect screen = QApplication::desktop()->screenGeometry(scnum);
             if (key == "left" || key == "screenx") {
-              winargs.x = val.toInt() + screen.x();
+              winargs.x = (int)val.toFloat() + screen.x();
 	      if (winargs.x < screen.x() || winargs.x > screen.right())
 		  winargs.x = screen.x(); // only safe choice until size is determined
 #if APPLE_CHANGES
 	      winargs.xSet = true;
 #endif
             } else if (key == "top" || key == "screeny") {
-              winargs.y = val.toInt() + screen.y();
+              winargs.y = (int)val.toFloat() + screen.y();
 	      if (winargs.y < screen.y() || winargs.y > screen.bottom())
 		  winargs.y = screen.y(); // only safe choice until size is determined
 #if APPLE_CHANGES
 	      winargs.ySet = true;
 #endif
             } else if (key == "height") {
-              winargs.height = val.toInt() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+              winargs.height = (int)val.toFloat() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
 	      if (winargs.height > screen.height())  // should actually check workspace
 		  winargs.height = screen.height();
               if (winargs.height < 100)
@@ -1212,7 +1212,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 	      winargs.heightSet = true;
 #endif
             } else if (key == "width") {
-              winargs.width = val.toInt() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+              winargs.width = (int)val.toFloat() + 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
 	      if (winargs.width > screen.width())    // should actually check workspace
 		  winargs.width = screen.width();
               if (winargs.width < 100)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list