[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 08:24:03 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 73dd112f7308b64e1d02f495581e58504318644b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 27 05:55:58 2004 +0000
Reviewed by Maciej.
- fixed <rdar://problem/3539414>: pop-up windows appear very narrow because of bogus width (carad.com/ebaymotors)
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check the "OK" result from toFloat in
window.open, and omit any parameters that can't be parsed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eaae9cf..23577c2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,15 @@
Reviewed by Maciej.
+ - fixed <rdar://problem/3539414>: pop-up windows appear very narrow because of bogus width (carad.com/ebaymotors)
+
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check the "OK" result from toFloat in
+ window.open, and omit any parameters that can't be parsed.
+
+2004-01-26 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
- fixed <rdar://problem/3537371>: REGRESSION (100-125): optgroup labels are no longer indented as they were before
* khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 45dde42..c173f99 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1232,37 +1232,57 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
QRect screen = QApplication::desktop()->screenGeometry(scnum);
if (key == "left" || key == "screenx") {
- 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
+ bool ok;
+ double d = val.toDouble(&ok);
+ if (d != 0 || ok) {
+ d += screen.x();
+ if (d < screen.x() || d > screen.right())
+ d = screen.x(); // only safe choice until size is determined
+ winargs.x = (int)d;
#if APPLE_CHANGES
- winargs.xSet = true;
+ winargs.xSet = true;
#endif
+ }
} else if (key == "top" || key == "screeny") {
- 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
+ bool ok;
+ double d = val.toDouble(&ok);
+ if (d != 0 || ok) {
+ d += screen.y();
+ if (d < screen.y() || d > screen.bottom())
+ d = screen.y(); // only safe choice until size is determined
+ winargs.y = (int)d;
#if APPLE_CHANGES
- winargs.ySet = true;
+ winargs.ySet = true;
#endif
+ }
} else if (key == "height") {
- 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)
- winargs.height = 100;
+ bool ok;
+ double d = val.toDouble(&ok);
+ if (d != 0 || ok) {
+ d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+ if (d > screen.height()) // should actually check workspace
+ d = screen.height();
+ if (d < 100)
+ d = 100;
+ winargs.height = (int)d;
#if APPLE_CHANGES
- winargs.heightSet = true;
+ winargs.heightSet = true;
#endif
+ }
} else if (key == "width") {
- 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)
- winargs.width = 100;
+ bool ok;
+ double d = val.toDouble(&ok);
+ if (d != 0 || ok) {
+ d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+ if (d > screen.width()) // should actually check workspace
+ d = screen.width();
+ if (d < 100)
+ d = 100;
+ winargs.width = (int)d;
#if APPLE_CHANGES
- winargs.widthSet = true;
+ winargs.widthSet = true;
#endif
+ }
} else {
goto boolargs;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list