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


The following commit has been merged in the debian/unstable branch:
commit 10ea320dec3870e5e986a8bfaf2940036d8f7b88
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 2 18:55:26 2004 +0000

            Reviewed by Maciej.
    
            - use toInt32 where we really need an int, rather than toInteger,
              because toInteger needs to return an integral number as a double,
              not as an int
    
            * khtml/ecma/kjs_css.cpp:
            (DOMCSSStyleDeclarationProtoFunc::tryCall): Call toInt32 intead of toInteger.
            (DOMStyleSheetListFunc::tryCall): Ditto.
            (KJS::DOMMediaListProtoFunc::tryCall): Ditto.
            (DOMCSSStyleSheetProtoFunc::tryCall): Ditto.
            (DOMCSSRuleListFunc::tryCall): Ditto.
            (DOMCSSRuleFunc::tryCall): Ditto.
            (DOMCSSPrimitiveValueProtoFunc::tryCall): Ditto.
            (DOMCSSValueListFunc::tryCall): Ditto.
            * khtml/ecma/kjs_dom.cpp:
            (DOMCharacterDataProtoFunc::tryCall): Ditto.
            (DOMTextProtoFunc::tryCall): Ditto.
            * khtml/ecma/kjs_events.cpp:
            (DOMUIEventProtoFunc::tryCall): Ditto.
            (DOMMouseEventProtoFunc::tryCall): Ditto.
            (DOMKeyboardEventProtoFunc::tryCall): Ditto.
            (DOMMutationEventProtoFunc::tryCall): Ditto.
            * khtml/ecma/kjs_html.cpp:
            (KJS::HTMLElementFunction::tryCall): Ditto.
            (KJS::HTMLElement::putValue): Ditto.
            (KJS::HTMLSelectCollection::tryPut): Ditto.
            * khtml/ecma/kjs_range.cpp:
            (DOMRangeProtoFunc::tryCall): Ditto.
            * khtml/ecma/kjs_traversal.cpp: (JSNodeFilter::acceptNode): Ditto.
            * khtml/ecma/kjs_window.cpp:
            (WindowFunc::tryCall): Ditto.
            (HistoryFunc::tryCall): Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4dcafd3..5b4eaf6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,41 @@
 2004-02-02  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+        - use toInt32 where we really need an int, rather than toInteger,
+          because toInteger needs to return an integral number as a double,
+          not as an int
+
+        * khtml/ecma/kjs_css.cpp:
+        (DOMCSSStyleDeclarationProtoFunc::tryCall): Call toInt32 intead of toInteger.
+        (DOMStyleSheetListFunc::tryCall): Ditto.
+        (KJS::DOMMediaListProtoFunc::tryCall): Ditto.
+        (DOMCSSStyleSheetProtoFunc::tryCall): Ditto.
+        (DOMCSSRuleListFunc::tryCall): Ditto.
+        (DOMCSSRuleFunc::tryCall): Ditto.
+        (DOMCSSPrimitiveValueProtoFunc::tryCall): Ditto.
+        (DOMCSSValueListFunc::tryCall): Ditto.
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMCharacterDataProtoFunc::tryCall): Ditto.
+        (DOMTextProtoFunc::tryCall): Ditto.
+        * khtml/ecma/kjs_events.cpp:
+        (DOMUIEventProtoFunc::tryCall): Ditto.
+        (DOMMouseEventProtoFunc::tryCall): Ditto.
+        (DOMKeyboardEventProtoFunc::tryCall): Ditto.
+        (DOMMutationEventProtoFunc::tryCall): Ditto.
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElementFunction::tryCall): Ditto.
+        (KJS::HTMLElement::putValue): Ditto.
+        (KJS::HTMLSelectCollection::tryPut): Ditto.
+        * khtml/ecma/kjs_range.cpp:
+        (DOMRangeProtoFunc::tryCall): Ditto.
+        * khtml/ecma/kjs_traversal.cpp: (JSNodeFilter::acceptNode): Ditto.
+        * khtml/ecma/kjs_window.cpp:
+        (WindowFunc::tryCall): Ditto.
+        (HistoryFunc::tryCall): Ditto.
+
+2004-02-02  Darin Adler  <darin at apple.com>
+
         Reviewed by John.
 
         - fix at least some of <rdar://problem/3546393>: 10,000 leaks, many of DOM::AtomicString::add, after one run of cvs-base
diff --git a/WebCore/khtml/ecma/kjs_css.cpp b/WebCore/khtml/ecma/kjs_css.cpp
index d287ba2..ccfb0e3 100644
--- a/WebCore/khtml/ecma/kjs_css.cpp
+++ b/WebCore/khtml/ecma/kjs_css.cpp
@@ -216,7 +216,7 @@ Value DOMCSSStyleDeclarationProtoFunc::tryCall(ExecState *exec, Object &thisObj,
                             args[2].toString(exec).string());
       return Undefined();
     case DOMCSSStyleDeclaration::Item:
-      return getStringOrNull(styleDecl.item(args[0].toInteger(exec)));
+      return getStringOrNull(styleDecl.item(args[0].toInt32(exec)));
     default:
       return Undefined();
   }
@@ -395,7 +395,7 @@ Value DOMStyleSheetListFunc::tryCall(ExecState *exec, Object &thisObj, const Lis
   }
   DOM::StyleSheetList styleSheetList = static_cast<DOMStyleSheetList *>(thisObj.imp())->toStyleSheetList();
   if (id == DOMStyleSheetList::Item)
-    return getDOMStyleSheet(exec, styleSheetList.item(args[0].toInteger(exec)));
+    return getDOMStyleSheet(exec, styleSheetList.item(args[0].toInt32(exec)));
   return Undefined();
 }
 
@@ -464,7 +464,7 @@ Value KJS::DOMMediaListProtoFunc::tryCall(ExecState *exec, Object &thisObj, cons
   DOM::MediaList mediaList = static_cast<DOMMediaList *>(thisObj.imp())->toMediaList();
   switch (id) {
     case DOMMediaList::Item:
-      return getStringOrNull(mediaList.item(args[0].toInteger(exec)));
+      return getStringOrNull(mediaList.item(args[0].toInt32(exec)));
     case DOMMediaList::DeleteMedium:
       mediaList.deleteMedium(args[0].toString(exec).string());
       return Undefined();
@@ -527,10 +527,10 @@ Value DOMCSSStyleSheetProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
 
   switch (id) {
     case DOMCSSStyleSheet::InsertRule:
-      result = Number(styleSheet.insertRule(args[0].toString(exec).string(),(long unsigned int)args[1].toInteger(exec)));
+      result = Number(styleSheet.insertRule(args[0].toString(exec).string(),(long unsigned int)args[1].toInt32(exec)));
       break;
     case DOMCSSStyleSheet::DeleteRule:
-      styleSheet.deleteRule(args[0].toInteger(exec));
+      styleSheet.deleteRule(args[0].toInt32(exec));
       break;
     default:
       result = Undefined();
@@ -580,7 +580,7 @@ Value DOMCSSRuleListFunc::tryCall(ExecState *exec, Object &thisObj, const List &
   DOM::CSSRuleList cssRuleList = static_cast<DOMCSSRuleList *>(thisObj.imp())->toCSSRuleList();
   switch (id) {
     case DOMCSSRuleList::Item:
-      return getDOMCSSRule(exec,cssRuleList.item(args[0].toInteger(exec)));
+      return getDOMCSSRule(exec,cssRuleList.item(args[0].toInt32(exec)));
     default:
       return Undefined();
   }
@@ -784,9 +784,9 @@ Value DOMCSSRuleFunc::tryCall(ExecState *exec, Object &thisObj, const List &args
   if (cssRule.type() == DOM::CSSRule::MEDIA_RULE) {
     DOM::CSSMediaRule rule = static_cast<DOM::CSSMediaRule>(cssRule);
     if (id == DOMCSSRule::Media_InsertRule)
-      return Number(rule.insertRule(args[0].toString(exec).string(),args[1].toInteger(exec)));
+      return Number(rule.insertRule(args[0].toString(exec).string(),args[1].toInt32(exec)));
     else if (id == DOMCSSRule::Media_DeleteRule)
-      rule.deleteRule(args[0].toInteger(exec));
+      rule.deleteRule(args[0].toInt32(exec));
   }
 
   return Undefined();
@@ -985,12 +985,12 @@ Value DOMCSSPrimitiveValueProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
   DOM::CSSPrimitiveValue val = static_cast<DOMCSSPrimitiveValue *>(thisObj.imp())->toCSSPrimitiveValue();
   switch (id) {
     case DOMCSSPrimitiveValue::SetFloatValue:
-      val.setFloatValue(args[0].toInteger(exec),args[1].toNumber(exec));
+      val.setFloatValue(args[0].toInt32(exec),args[1].toNumber(exec));
       return Undefined();
     case DOMCSSPrimitiveValue::GetFloatValue:
-      return Number(val.getFloatValue(args[0].toInteger(exec)));
+      return Number(val.getFloatValue(args[0].toInt32(exec)));
     case DOMCSSPrimitiveValue::SetStringValue:
-      val.setStringValue(args[0].toInteger(exec),args[1].toString(exec).string());
+      val.setStringValue(args[0].toInt32(exec),args[1].toString(exec).string());
       return Undefined();
     case DOMCSSPrimitiveValue::GetStringValue:
       return getStringOrNull(val.getStringValue());
@@ -1099,7 +1099,7 @@ Value DOMCSSValueListFunc::tryCall(ExecState *exec, Object &thisObj, const List
   DOM::CSSValueList valueList = static_cast<DOMCSSValueList *>(thisObj.imp())->toValueList();
   switch (id) {
     case DOMCSSValueList::Item:
-      return getDOMCSSValue(exec,valueList.item(args[0].toInteger(exec)));
+      return getDOMCSSValue(exec,valueList.item(args[0].toInt32(exec)));
     default:
       return Undefined();
   }
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 3ef22fd..85eb8c0 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -1668,29 +1668,29 @@ Value DOMCharacterDataProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
   DOM::CharacterData data = static_cast<DOMCharacterData *>(thisObj.imp())->toData();
   switch(id) {
     case DOMCharacterData::SubstringData: {
-      const int count = args[1].toInteger(exec);
+      const int count = args[1].toInt32(exec);
       if (count < 0)
         throw DOMException(DOMException::INDEX_SIZE_ERR);
-      return getStringOrNull(data.substringData(args[0].toInteger(exec), count));
+      return getStringOrNull(data.substringData(args[0].toInt32(exec), count));
     }
     case DOMCharacterData::AppendData:
       data.appendData(args[0].toString(exec).string());
       return Undefined();
     case DOMCharacterData::InsertData:
-      data.insertData(args[0].toInteger(exec), args[1].toString(exec).string());
+      data.insertData(args[0].toInt32(exec), args[1].toString(exec).string());
       return Undefined();
     case DOMCharacterData::DeleteData: {
-      const int count = args[1].toInteger(exec);
+      const int count = args[1].toInt32(exec);
       if (count < 0)
         throw DOMException(DOMException::INDEX_SIZE_ERR);
-      data.deleteData(args[0].toInteger(exec), count);
+      data.deleteData(args[0].toInt32(exec), count);
       return Undefined();
     }
     case DOMCharacterData::ReplaceData: {
-      const int count = args[1].toInteger(exec);
+      const int count = args[1].toInt32(exec);
       if (count < 0)
         throw DOMException(DOMException::INDEX_SIZE_ERR);
-      data.replaceData(args[0].toInteger(exec), count, args[2].toString(exec).string());
+      data.replaceData(args[0].toInt32(exec), count, args[2].toString(exec).string());
       return Undefined();
     }
     default:
@@ -1732,7 +1732,7 @@ Value DOMTextProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &ar
   DOM::Text text = static_cast<DOMText *>(thisObj.imp())->toText();
   switch(id) {
     case DOMText::SplitText:
-      return getDOMNode(exec,text.splitText(args[0].toInteger(exec)));
+      return getDOMNode(exec,text.splitText(args[0].toInt32(exec)));
       break;
     default:
       return Undefined();
diff --git a/WebCore/khtml/ecma/kjs_events.cpp b/WebCore/khtml/ecma/kjs_events.cpp
index ed9997f..40e9dfb 100644
--- a/WebCore/khtml/ecma/kjs_events.cpp
+++ b/WebCore/khtml/ecma/kjs_events.cpp
@@ -523,7 +523,7 @@ Value DOMUIEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
                                                      args[1].toBoolean(exec),
                                                      args[2].toBoolean(exec),
                                                      v,
-                                                     args[4].toInteger(exec));
+                                                     args[4].toInt32(exec));
       }
       return Undefined();
   }
@@ -653,16 +653,16 @@ Value DOMMouseEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const Li
                                 args[1].toBoolean(exec), // canBubbleArg
                                 args[2].toBoolean(exec), // cancelableArg
                                 toAbstractView(args[3]), // viewArg
-                                args[4].toInteger(exec), // detailArg
-                                args[5].toInteger(exec), // screenXArg
-                                args[6].toInteger(exec), // screenYArg
-                                args[7].toInteger(exec), // clientXArg
-                                args[8].toInteger(exec), // clientYArg
+                                args[4].toInt32(exec), // detailArg
+                                args[5].toInt32(exec), // screenXArg
+                                args[6].toInt32(exec), // screenYArg
+                                args[7].toInt32(exec), // clientXArg
+                                args[8].toInt32(exec), // clientYArg
                                 args[9].toBoolean(exec), // ctrlKeyArg
                                 args[10].toBoolean(exec), // altKeyArg
                                 args[11].toBoolean(exec), // shiftKeyArg
                                 args[12].toBoolean(exec), // metaKeyArg
-                                args[13].toInteger(exec), // buttonArg
+                                args[13].toInt32(exec), // buttonArg
                                 toNode(args[14])); // relatedTargetArg
       return Undefined();
   }
@@ -746,7 +746,7 @@ Value DOMKeyboardEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
                               args[2].toBoolean(exec), // cancelableArg
                               toAbstractView(args[3]), // viewArg
                               args[4].toString(exec).string(), // keyIdentifier
-                              args[5].toInteger(exec), // keyLocationArg
+                              args[5].toInt32(exec), // keyLocationArg
                               args[6].toBoolean(exec), // ctrlKeyArg
                               args[7].toBoolean(exec), // altKeyArg
                               args[8].toBoolean(exec), // shiftKeyArg
@@ -847,7 +847,7 @@ Value DOMMutationEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
                                       args[4].toString(exec).string(), // prevValueArg
                                       args[5].toString(exec).string(), // newValueArg
                                       args[6].toString(exec).string(), // attrNameArg
-                                      args[7].toInteger(exec)); // attrChangeArg
+                                      args[7].toInt32(exec)); // attrChangeArg
       return Undefined();
   }
   return Undefined();
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 691bf1b..14059c9 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -2084,9 +2084,9 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
         return Undefined();
       }
       else if (id == KJS::HTMLElement::TableInsertRow)
-        return getDOMNode(exec,table.insertRow(args[0].toInteger(exec)));
+        return getDOMNode(exec,table.insertRow(args[0].toInt32(exec)));
       else if (id == KJS::HTMLElement::TableDeleteRow) {
-        table.deleteRow(args[0].toInteger(exec));
+        table.deleteRow(args[0].toInt32(exec));
         return Undefined();
       }
     }
@@ -2096,9 +2096,9 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
     case ID_TFOOT: {
       DOM::HTMLTableSectionElement tableSection = element;
       if (id == KJS::HTMLElement::TableSectionInsertRow)
-        return getDOMNode(exec,tableSection.insertRow(args[0].toInteger(exec)));
+        return getDOMNode(exec,tableSection.insertRow(args[0].toInt32(exec)));
       else if (id == KJS::HTMLElement::TableSectionDeleteRow) {
-        tableSection.deleteRow(args[0].toInteger(exec));
+        tableSection.deleteRow(args[0].toInt32(exec));
         return Undefined();
       }
     }
@@ -2106,9 +2106,9 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
     case ID_TR: {
       DOM::HTMLTableRowElement tableRow = element;
       if (id == KJS::HTMLElement::TableRowInsertCell)
-        return getDOMNode(exec,tableRow.insertCell(args[0].toInteger(exec)));
+        return getDOMNode(exec,tableRow.insertCell(args[0].toInt32(exec)));
       else if (id == KJS::HTMLElement::TableRowDeleteCell) {
-        tableRow.deleteCell(args[0].toInteger(exec));
+        tableRow.deleteCell(args[0].toInt32(exec));
         return Undefined();
       }
     }
@@ -2284,9 +2284,9 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
               if (docimpl)
                   docimpl->updateLayout();
               if (token == BodyScrollLeft)
-                  sview->setContentsPos(value.toInteger(exec), sview->contentsY());
+                  sview->setContentsPos(value.toInt32(exec), sview->contentsY());
               else
-                  sview->setContentsPos(sview->contentsX(), value.toInteger(exec));
+                  sview->setContentsPos(sview->contentsX(), value.toInt32(exec));
           }
           return;
         }
@@ -2311,7 +2311,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       DOM::HTMLSelectElement select = element;
       switch (token) {
       // read-only: type
-      case SelectSelectedIndex:   { select.setSelectedIndex(value.toInteger(exec)); return; }
+      case SelectSelectedIndex:   { select.setSelectedIndex(value.toInt32(exec)); return; }
       case SelectValue:           { select.setValue(str); return; }
       case SelectLength:          { // read-only according to the NS spec, but webpages need it writeable
                                          Object coll = Object::dynamicCast( getSelectHTMLCollection(exec, select.options(), select) );
@@ -2324,8 +2324,8 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case SelectDisabled:        { select.setDisabled(value.toBoolean(exec)); return; }
       case SelectMultiple:        { select.setMultiple(value.toBoolean(exec)); return; }
       case SelectName:            { select.setName(str); return; }
-      case SelectSize:            { select.setSize(value.toInteger(exec)); return; }
-      case SelectTabIndex:        { select.setTabIndex(value.toInteger(exec)); return; }
+      case SelectSize:            { select.setSize(value.toInt32(exec)); return; }
+      case SelectTabIndex:        { select.setTabIndex(value.toInt32(exec)); return; }
       }
     }
     break;
@@ -2380,12 +2380,12 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case InputAlt:             { input.setAlt(str); return; }
       case InputChecked:         { input.setChecked(value.toBoolean(exec)); return; }
       case InputDisabled:        { input.setDisabled(value.toBoolean(exec)); return; }
-      case InputMaxLength:       { input.setMaxLength(value.toInteger(exec)); return; }
+      case InputMaxLength:       { input.setMaxLength(value.toInt32(exec)); return; }
       case InputName:            { input.setName(str); return; }
       case InputReadOnly:        { input.setReadOnly(value.toBoolean(exec)); return; }
       case InputSize:            { input.setSize(str); return; }
       case InputSrc:             { input.setSrc(str); return; }
-      case InputTabIndex:        { input.setTabIndex(value.toInteger(exec)); return; }
+      case InputTabIndex:        { input.setTabIndex(value.toInt32(exec)); return; }
       case InputType:            { input.setType(str); return; }
       case InputUseMap:          { input.setUseMap(str); return; }
       case InputValue:           { input.setValue(str); return; }
@@ -2398,12 +2398,12 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case TextAreaDefaultValue:    { textarea.setDefaultValue(str); return; }
       // read-only: form
       case TextAreaAccessKey:       { textarea.setAccessKey(str); return; }
-      case TextAreaCols:            { textarea.setCols(value.toInteger(exec)); return; }
+      case TextAreaCols:            { textarea.setCols(value.toInt32(exec)); return; }
       case TextAreaDisabled:        { textarea.setDisabled(value.toBoolean(exec)); return; }
       case TextAreaName:            { textarea.setName(str); return; }
       case TextAreaReadOnly:        { textarea.setReadOnly(value.toBoolean(exec)); return; }
-      case TextAreaRows:            { textarea.setRows(value.toInteger(exec)); return; }
-      case TextAreaTabIndex:        { textarea.setTabIndex(value.toInteger(exec)); return; }
+      case TextAreaRows:            { textarea.setRows(value.toInt32(exec)); return; }
+      case TextAreaTabIndex:        { textarea.setTabIndex(value.toInt32(exec)); return; }
       // read-only: type
       case TextAreaValue:           { textarea.setValue(str); return; }
       }
@@ -2416,7 +2416,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case ButtonAccessKey:       { button.setAccessKey(str); return; }
       case ButtonDisabled:        { button.setDisabled(value.toBoolean(exec)); return; }
       case ButtonName:            { button.setName(str); return; }
-      case ButtonTabIndex:        { button.setTabIndex(value.toInteger(exec)); return; }
+      case ButtonTabIndex:        { button.setTabIndex(value.toInt32(exec)); return; }
       // read-only: type
       case ButtonValue:           { button.setValue(str); return; }
       }
@@ -2457,7 +2457,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       DOM::HTMLOListElement oList = element;
       switch (token) {
       case OListCompact:         { oList.setCompact(value.toBoolean(exec)); return; }
-      case OListStart:           { oList.setStart(value.toInteger(exec)); return; }
+      case OListStart:           { oList.setStart(value.toInt32(exec)); return; }
       case OListType:            { oList.setType(str); return; }
       }
     }
@@ -2487,7 +2487,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       DOM::HTMLLIElement li = element;
       switch (token) {
       case LIType:            { li.setType(str); return; }
-      case LIValue:           { li.setValue(value.toInteger(exec)); return; }
+      case LIValue:           { li.setValue(value.toInt32(exec)); return; }
       }
     }
     break;
@@ -2534,7 +2534,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
     case ID_PRE: {
       DOM::HTMLPreElement pre = element;
       switch (token) {
-      case PreWidth:           { pre.setWidth(value.toInteger(exec)); return; }
+      case PreWidth:           { pre.setWidth(value.toInt32(exec)); return; }
       }
     }
     break;
@@ -2594,7 +2594,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case AnchorRel:             { anchor.setRel(str); return; }
       case AnchorRev:             { anchor.setRev(str); return; }
       case AnchorShape:           { anchor.setShape(str); return; }
-      case AnchorTabIndex:        { anchor.setTabIndex(value.toInteger(exec)); return; }
+      case AnchorTabIndex:        { anchor.setTabIndex(value.toInt32(exec)); return; }
       case AnchorTarget:          { anchor.setTarget(str); return; }
       case AnchorType:            { anchor.setType(str); return; }
       }
@@ -2606,15 +2606,15 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case ImageName:            { image.setName(str); return; }
       case ImageAlign:           { image.setAlign(str); return; }
       case ImageAlt:             { image.setAlt(str); return; }
-      case ImageBorder:          { image.setBorder(value.toInteger(exec)); return; }
-      case ImageHeight:          { image.setHeight(value.toInteger(exec)); return; }
-      case ImageHspace:          { image.setHspace(value.toInteger(exec)); return; }
+      case ImageBorder:          { image.setBorder(value.toInt32(exec)); return; }
+      case ImageHeight:          { image.setHeight(value.toInt32(exec)); return; }
+      case ImageHspace:          { image.setHspace(value.toInt32(exec)); return; }
       case ImageIsMap:           { image.setIsMap(value.toBoolean(exec)); return; }
       case ImageLongDesc:        { image.setLongDesc(str); return; }
       case ImageSrc:             { image.setSrc(str); return; }
       case ImageUseMap:          { image.setUseMap(str); return; }
-      case ImageVspace:          { image.setVspace(value.toInteger(exec)); return; }
-      case ImageWidth:           { image.setWidth(value.toInteger(exec)); return; }
+      case ImageVspace:          { image.setVspace(value.toInt32(exec)); return; }
+      case ImageWidth:           { image.setWidth(value.toInt32(exec)); return; }
       }
     }
     break;
@@ -2635,7 +2635,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case ObjectHspace:          { object.setHspace(str); return; }
       case ObjectName:            { object.setName(str); return; }
       case ObjectStandby:         { object.setStandby(str); return; }
-      case ObjectTabIndex:        { object.setTabIndex(value.toInteger(exec)); return; }
+      case ObjectTabIndex:        { object.setTabIndex(value.toInt32(exec)); return; }
       case ObjectType:            { object.setType(str); return; }
       case ObjectUseMap:          { object.setUseMap(str); return; }
       case ObjectVspace:          { object.setVspace(str); return; }
@@ -2687,7 +2687,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case AreaHref:            { area.setHref(str); return; }
       case AreaNoHref:          { area.setNoHref(value.toBoolean(exec)); return; }
       case AreaShape:           { area.setShape(str); return; }
-      case AreaTabIndex:        { area.setTabIndex(value.toInteger(exec)); return; }
+      case AreaTabIndex:        { area.setTabIndex(value.toInt32(exec)); return; }
       case AreaTarget:          { area.setTarget(str); return; }
       }
     }
@@ -2738,7 +2738,7 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case TableColAlign:           { tableCol.setAlign(str); return; }
       case TableColCh:              { tableCol.setCh(str); return; }
       case TableColChOff:           { tableCol.setChOff(str); return; }
-      case TableColSpan:            { tableCol.setSpan(value.toInteger(exec)); return; }
+      case TableColSpan:            { tableCol.setSpan(value.toInt32(exec)); return; }
       case TableColVAlign:          { tableCol.setVAlign(str); return; }
       case TableColWidth:           { tableCol.setWidth(str); return; }
       }
@@ -2782,11 +2782,11 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
       case TableCellBgColor:         { tableCell.setBgColor(str); return; }
       case TableCellCh:              { tableCell.setCh(str); return; }
       case TableCellChOff:           { tableCell.setChOff(str); return; }
-      case TableCellColSpan:         { tableCell.setColSpan(value.toInteger(exec)); return; }
+      case TableCellColSpan:         { tableCell.setColSpan(value.toInt32(exec)); return; }
       case TableCellHeaders:         { tableCell.setHeaders(str); return; }
       case TableCellHeight:          { tableCell.setHeight(str); return; }
       case TableCellNoWrap:          { tableCell.setNoWrap(value.toBoolean(exec)); return; }
-      case TableCellRowSpan:         { tableCell.setRowSpan(value.toInteger(exec)); return; }
+      case TableCellRowSpan:         { tableCell.setRowSpan(value.toInt32(exec)); return; }
       case TableCellScope:           { tableCell.setScope(str); return; }
       case TableCellVAlign:          { tableCell.setVAlign(str); return; }
       case TableCellWidth:           { tableCell.setWidth(str); return; }
@@ -3101,7 +3101,7 @@ void KJS::HTMLSelectCollection::tryPut(ExecState *exec, const Identifier &proper
   kdDebug(6070) << "KJS::HTMLSelectCollection::tryPut " << propertyName.qstring() << endl;
 #endif
   if ( propertyName == "selectedIndex" ) {
-    element.setSelectedIndex( value.toInteger( exec ) );
+    element.setSelectedIndex( value.toInt32( exec ) );
     return;
   }
   // resize ?
diff --git a/WebCore/khtml/ecma/kjs_range.cpp b/WebCore/khtml/ecma/kjs_range.cpp
index 0d1b600..c538b28 100644
--- a/WebCore/khtml/ecma/kjs_range.cpp
+++ b/WebCore/khtml/ecma/kjs_range.cpp
@@ -111,11 +111,11 @@ Value DOMRangeProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &a
 
   switch (id) {
     case DOMRange::SetStart:
-      range.setStart(toNode(args[0]),args[1].toInteger(exec));
+      range.setStart(toNode(args[0]),args[1].toInt32(exec));
       result = Undefined();
       break;
     case DOMRange::SetEnd:
-      range.setEnd(toNode(args[0]),args[1].toInteger(exec));
+      range.setEnd(toNode(args[0]),args[1].toInt32(exec));
       result = Undefined();
       break;
     case DOMRange::SetStartBefore:
@@ -147,7 +147,7 @@ Value DOMRangeProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &a
       result = Undefined();
       break;
     case DOMRange::CompareBoundaryPoints:
-      result = Number(range.compareBoundaryPoints(static_cast<DOM::Range::CompareHow>(args[0].toInteger(exec)),toRange(args[1])));
+      result = Number(range.compareBoundaryPoints(static_cast<DOM::Range::CompareHow>(args[0].toInt32(exec)),toRange(args[1])));
       break;
     case DOMRange::DeleteContents:
       range.deleteContents();
diff --git a/WebCore/khtml/ecma/kjs_traversal.cpp b/WebCore/khtml/ecma/kjs_traversal.cpp
index 8a18069..e0b0d5c 100644
--- a/WebCore/khtml/ecma/kjs_traversal.cpp
+++ b/WebCore/khtml/ecma/kjs_traversal.cpp
@@ -316,7 +316,7 @@ short JSNodeFilter::acceptNode(const DOM::Node &n)
       List args;
       args.append(getDOMNode(exec,n));
       Value result = acceptNodeFunc.call(exec,filter,args);
-      return result.toInteger(exec);
+      return result.toInt32(exec);
     }
   }
 
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index c173f99..dad8e88 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1259,7 +1259,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
               bool ok;
               double d = val.toDouble(&ok);
               if (d != 0 || ok) {
+#if !APPLE_CHANGES
                 d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+#endif
 	        if (d > screen.height())  // should actually check workspace
 		  d = screen.height();
                 if (d < 100)
@@ -1273,7 +1275,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
               bool ok;
               double d = val.toDouble(&ok);
               if (d != 0 || ok) {
+#if !APPLE_CHANGES
                 d += 2*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+#endif
 	        if (d > screen.width())    // should actually check workspace
 		  d = screen.width();
                 if (d < 100)
@@ -2109,11 +2113,6 @@ Value HistoryFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
   }
   History *history = static_cast<History *>(thisObj.imp());
 
-  Value v = args[0];
-  Number n;
-  if(!v.isNull())
-    n = v.toInteger(exec);
-
   int steps;
   switch (id) {
   case History::Back:
@@ -2123,7 +2122,7 @@ Value HistoryFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
     steps = 1;
     break;
   case History::Go:
-    steps = n.intValue();
+    steps = args[0].toInt32(exec);
     break;
   default:
     return Undefined();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list