[webkit-changes] cvs commit: WebCore/khtml/ecma kjs_window.cpp

Adele adele at opensource.apple.com
Tue Jul 12 15:19:21 PDT 2005


adele       05/07/12 15:19:20

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               khtml/ecma Tag: Safari-2-0-branch kjs_window.cpp
  Log:
          Merged fix from TOT to Safari-2-0-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.4104.2.60 +13 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4104.2.59
  retrieving revision 1.4104.2.60
  diff -u -r1.4104.2.59 -r1.4104.2.60
  --- ChangeLog	12 Jul 2005 22:15:17 -0000	1.4104.2.59
  +++ ChangeLog	12 Jul 2005 22:19:14 -0000	1.4104.2.60
  @@ -1,6 +1,19 @@
   2005-07-12  Adele Peterson  <adele at apple.com>
   
           Merged fix from TOT to Safari-2-0-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-2-0-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.8.8 +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.8.7
  retrieving revision 1.146.8.8
  diff -u -r1.146.8.7 -r1.146.8.8
  --- kjs_window.cpp	12 Jul 2005 22:00:01 -0000	1.146.8.7
  +++ kjs_window.cpp	12 Jul 2005 22:19:20 -0000	1.146.8.8
  @@ -66,6 +66,12 @@
   
   #include "misc/htmltags.h"
   
  +// 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::ElementImpl;
  @@ -79,6 +85,8 @@
   
   using namespace KJS;
   
  +using std::isnan;
  +
   namespace KJS {
   
   ////////////////////// History Object ////////////////////////
  @@ -1697,7 +1705,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
  @@ -1709,7 +1717,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
  @@ -1721,7 +1729,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
  @@ -1737,7 +1745,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