[webkit-changes] cvs commit: WebCore/khtml/ecma kjs_window.cpp
Adele
adele at opensource.apple.com
Tue Jul 12 15:21:09 PDT 2005
adele 05/07/12 15:21:09
Modified: . Tag: Safari-1-3-branch ChangeLog
khtml/ecma Tag: Safari-1-3-branch kjs_window.cpp
Log:
Merged fix from TOT to Safari-1-3-branch
<rdar://problem/4164975>
2005-05-23 Adele Peterson <adele at apple.com>
Reviewed by Darin.
fix for <rdar://problem/4122661> Regression: 10.3.8-10.3.9: Next lesson doesn't work on Dale Carnegie Action Systems page
* khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::tryCall): added checks for NaN, in case it is passed into window.open for screenx, screeny, left, top, height, or width.
Revision Changes Path
No revision
No revision
1.4108.4.32 +13 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4108.4.31
retrieving revision 1.4108.4.32
diff -u -r1.4108.4.31 -r1.4108.4.32
--- ChangeLog 12 Jul 2005 22:14:33 -0000 1.4108.4.31
+++ ChangeLog 12 Jul 2005 22:21:02 -0000 1.4108.4.32
@@ -1,6 +1,19 @@
2005-07-12 Adele Peterson <adele at apple.com>
Merged fix from TOT to Safari-1-3-branch
+ <rdar://problem/4164975>
+
+ 2005-05-23 Adele Peterson <adele at apple.com>
+
+ Reviewed by Darin.
+
+ fix for <rdar://problem/4122661> Regression: 10.3.8-10.3.9: Next lesson doesn't work on Dale Carnegie Action Systems page
+
+ * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::tryCall): added checks for NaN, in case it is passed into window.open for screenx, screeny, left, top, height, or width.
+
+2005-07-12 Adele Peterson <adele at apple.com>
+
+ Merged fix from TOT to Safari-1-3-branch
<rdar://problem/4164969> A crash occurs when invoking assigned access key on a Button element (DOM::HTMLButtonElementImpl::click(bool) + 36)
2005-06-17 Geoffrey Garen <ggaren at apple.com>
No revision
No revision
1.146.6.5 +12 -4 WebCore/khtml/ecma/kjs_window.cpp
Index: kjs_window.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.146.6.4
retrieving revision 1.146.6.5
diff -u -r1.146.6.4 -r1.146.6.5
--- kjs_window.cpp 12 Jul 2005 21:59:03 -0000 1.146.6.4
+++ kjs_window.cpp 12 Jul 2005 22:21:08 -0000 1.146.6.5
@@ -68,6 +68,12 @@
#define IS_NAN(d) (!(d == d))
+// Must include <cmath> instead of <math.h> because of a bug in the
+// gcc 3.3 library version of <math.h> where if you include both
+// <cmath> and <math.h> the macros necessary for functions like
+// isnan are not defined.
+#include <cmath>
+
using DOM::DocumentImpl;
using DOM::DOMString;
using DOM::Node;
@@ -80,6 +86,8 @@
using namespace KJS;
+using std::isnan;
+
namespace KJS {
////////////////////// History Object ////////////////////////
@@ -1681,7 +1689,7 @@
if (key == "left" || key == "screenx") {
bool ok;
double d = val.toDouble(&ok);
- if (d != 0 || ok) {
+ if ((d != 0 || ok) && !isnan(d)) {
d += screen.x();
if (d < screen.x() || d > screen.right())
d = screen.x(); // only safe choice until size is determined
@@ -1693,7 +1701,7 @@
} else if (key == "top" || key == "screeny") {
bool ok;
double d = val.toDouble(&ok);
- if (d != 0 || ok) {
+ if ((d != 0 || ok) && !isnan(d)) {
d += screen.y();
if (d < screen.y() || d > screen.bottom())
d = screen.y(); // only safe choice until size is determined
@@ -1705,7 +1713,7 @@
} else if (key == "height") {
bool ok;
double d = val.toDouble(&ok);
- if (d != 0 || ok) {
+ if ((d != 0 || ok) && !isnan(d)) {
#if !APPLE_CHANGES
d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
#endif
@@ -1721,7 +1729,7 @@
} else if (key == "width") {
bool ok;
double d = val.toDouble(&ok);
- if (d != 0 || ok) {
+ if ((d != 0 || ok) && !isnan(d)) {
#if !APPLE_CHANGES
d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
#endif
More information about the webkit-changes
mailing list