- fixed the build, this time for sure
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Feb 2006 16:41:21 +0000 (16:41 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Feb 2006 16:41:21 +0000 (16:41 +0000)
        * bindings/js/JSDOMCore.cpp: Touch this file, since the project doesn't get
        the dependencies right.
        * bindings/js/JSDOMEvents.cpp: Ditto.

        * bridge/mac/WebCoreFrameBridge.mm: (aeDescFromJSValue): Fix an uninitialized
        variable warning and also tightened the code for Boolean, String, and Number
        up a bit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/js/JSDOMCore.cpp
WebCore/bindings/js/JSDOMEvents.cpp
WebCore/bridge/mac/WebCoreFrameBridge.mm

index d820eb8aa39d2f895dc9f9f89d530901f714497b..7b31982993e90ea4088c49364804842be7f14dfe 100644 (file)
@@ -1,3 +1,15 @@
+2006-02-10  Darin Adler  <darin@apple.com>
+
+        - fixed the build, this time for sure
+
+        * bindings/js/JSDOMCore.cpp: Touch this file, since the project doesn't get
+        the dependencies right.
+        * bindings/js/JSDOMEvents.cpp: Ditto.
+
+        * bridge/mac/WebCoreFrameBridge.mm: (aeDescFromJSValue): Fix an uninitialized
+        variable warning and also tightened the code for Boolean, String, and Number
+        up a bit.
+
 2006-02-10  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by eric.
index 6895212c2d5117f1ddcac296f7d9d874c75b6e8b..8f8b5a413b7516483f6f5797198d8ece6460befa 100644 (file)
@@ -1,6 +1,7 @@
 #include "config.h"
 
 // These are generated files.
+// I keep modifying and rewording this line here to make the file rebuild.
 
 #include "JSAttr.cpp"
 #include "JSCharacterData.cpp"
index 9f5b808cf3c388c0fce91854d40b906df574cbbb..07bb5c5bbe7886a0253368c1c8a23e644634f29d 100644 (file)
@@ -1,6 +1,7 @@
 #include "config.h"
 
-// These are generated files
+// These are generated files.
+// I keep modifying and rewording this line here to make the file rebuild.
 
 #include "JSMutationEvent.cpp"
 #include "JSWheelEvent.cpp"
index 99ec69b45505f003394309a35a65f2d9c693905a..6bdc44930cea46b56fe1b2c005118df7c9ae3594 100644 (file)
@@ -206,20 +206,14 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue* jsVal
 {
     NSAppleEventDescriptor* aeDesc = 0;
     switch (jsValue->type()) {
-        case BooleanType: {
-            bool value;
-            jsValue->getBoolean(value);
-            aeDesc = [NSAppleEventDescriptor descriptorWithBoolean:value];
+        case BooleanType:
+            aeDesc = [NSAppleEventDescriptor descriptorWithBoolean:jsValue->getBoolean()];
             break;
-        }
-        case StringType: {
-            UString value = jsValue->getString();
-            NSString* str = [NSString stringWithCharacters:reinterpret_cast<const unichar *>(value.data()) length:value.size()];
-            aeDesc = [NSAppleEventDescriptor descriptorWithString:str];
+        case StringType:
+            aeDesc = [NSAppleEventDescriptor descriptorWithString:jsValue->getString().domString()];
             break;
-        }
         case NumberType: {
-            double value = jsValue->getNumber();
+            Float64 value = jsValue->getNumber();
             aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeIEEE64BitFloatingPoint bytes:&value length:sizeof(value)];
             break;
         }
@@ -229,16 +223,13 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue* jsVal
                 DateInstance* date = static_cast<DateInstance*>(object);
                 double ms = 0;
                 int tzOffset = 0;
-
                 if (date->getTime(ms, tzOffset)) {
-                    CFAbsoluteTime utcSeconds = ms/1000 - kCFAbsoluteTimeIntervalSince1970;
-
+                    CFAbsoluteTime utcSeconds = ms / 1000 - kCFAbsoluteTimeIntervalSince1970;
                     LongDateTime ldt;
                     if (noErr == UCConvertCFAbsoluteTimeToLongDateTime(utcSeconds, &ldt))
                         aeDesc = [NSAppleEventDescriptor descriptorWithDescriptorType:typeLongDateTime bytes:&ldt length:sizeof(ldt)];
                 }
             }
-            
             if (!aeDesc) {
                 JSValue* primitive = object->toPrimitive(exec);
                 if (exec->hadException()) {
@@ -247,7 +238,6 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue* jsVal
                 }
                 return aeDescFromJSValue(exec, primitive);
             }
-
             break;
         }
         default: