JavaScriptCore:
authoralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 23:53:46 +0000 (23:53 +0000)
committeralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 23:53:46 +0000 (23:53 +0000)
        Reviewed by Sam Weinig.

        need to export ASCIICType.h for use in DRT

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * wtf/ASCIICType.h:
        (WTF::isASCIIUpper):

WebKitTools:

        Reviewed by Sam Weinig.

        fixing assertion hit with editing/selection/move-begin-end.html

        * DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h: Added.
        * DumpRenderTree/win/DumpRenderTree.vcproj:
        * DumpRenderTree/win/EventSender.cpp:
        (keyDownCallback):
        using isupper will cause an assertion for inputs outside of ascii range. use isASCIIUpper instead.

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

JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
JavaScriptCore/wtf/ASCIICType.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
WebKitTools/DumpRenderTree/win/EventSender.cpp

index cecea19963d60624b78bdfd5fffd7eb1b03d7b02..08793e31da666b7bfb1afaeb78e991f6318c5ad0 100644 (file)
@@ -1,3 +1,13 @@
+2008-01-02  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        need to export ASCIICType.h for use in DRT
+
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * wtf/ASCIICType.h:
+        (WTF::isASCIIUpper):
+
 2008-01-02  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Beth Dakin.
index 8a5d277544f6e1993b47b2291cd72ebeef4b00a3..efe2c729137aad052b26f460bb92cd1bcd0eaf99 100644 (file)
                        RelativePath="..\..\wtf\AlwaysInline.h"\r
                        >\r
                </File>\r
+               <File\r
+                       RelativePath="..\..\wtf\ASCIICType.h"\r
+                       >\r
+               </File>\r
                <File\r
                        RelativePath="..\..\wtf\Assertions.cpp"\r
                        >\r
index a9aa5e733622900229fb73d580726b1dad918c35..8f8e357688f4842a91e5400613903f77e7904764 100644 (file)
@@ -78,6 +78,13 @@ namespace WTF {
 #endif
     inline bool isASCIILower(int c) { return c >= 'a' && c <= 'z'; }
 
+    inline bool isASCIIUpper(char c) { return c >= 'A' && c <= 'Z'; }
+    inline bool isASCIIUpper(unsigned short c) { return c >= 'A' && c <= 'Z'; }
+#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
+    inline bool isASCIIUpper(wchar_t c) { return c >= 'A' && c <= 'Z'; }
+#endif
+    inline bool isASCIIUpper(int c) { return c >= 'A' && c <= 'Z'; }
+
     inline bool isASCIISpace(char c) { return c == '\t' || c == '\n' || c == '\v' || c =='\f' || c == '\r' || c == ' '; }
     inline bool isASCIISpace(unsigned short c) { return c == '\t' || c == '\n' || c == '\v' || c =='\f' || c == '\r' || c == ' '; }
 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
index 14e585dad3de6143e87ba2a0b5c3f98471b51c95..4c818b1a46ec9a6e15f39c4fd2139ff32044cdbf 100644 (file)
@@ -1,3 +1,15 @@
+2008-01-02  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        fixing assertion hit with editing/selection/move-begin-end.html
+
+        * DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h: Added.
+        * DumpRenderTree/win/DumpRenderTree.vcproj:
+        * DumpRenderTree/win/EventSender.cpp:
+        (keyDownCallback):
+        using isupper will cause an assertion for inputs outside of ascii range. use isASCIIUpper instead.
+
 2008-01-02  Darin Adler  <darin@apple.com>
 
         * Scripts/do-webcore-rename: Some more name change plans.
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h
new file mode 100644 (file)
index 0000000..f2258d2
--- /dev/null
@@ -0,0 +1 @@
+#include <JavaScriptCore/ASCIICType.h>
index b1fb21f3d1fc1ac95b8fe6bcbb99be95811c2b76..e10eed7ce6e99c2e40cc65885560a18c8ae62195 100644 (file)
@@ -25,6 +25,7 @@
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
@@ -41,7 +42,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
                                PreprocessorDefinitions="WIN32;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
@@ -94,7 +95,7 @@
                        />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
-                               CommandLine=""\r
+                               CommandLine="&#x0D;&#x0A;"\r
                        />\r
                </Configuration>\r
                <Configuration\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                        />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
-                               CommandLine=""\r
+                               CommandLine="&#x0D;&#x0A;"\r
                        />\r
                </Configuration>\r
                <Configuration\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_SCL_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCPostBuildEventTool"\r
-                               CommandLine=""\r
+                               CommandLine="&#x0D;&#x0A;"\r
                        />\r
                </Configuration>\r
        </Configurations>\r
index d648ce1f3804b145ace857118af14ba90c0a2589..7fec10ae6dc908196592bc043672be25d72a671f 100644 (file)
@@ -32,6 +32,7 @@
 #include "DraggingInfo.h"
 
 #include <WebCore/COMPtr.h>
+#include <wtf/ASCIICType.h>
 #include <wtf/Platform.h>
 #include <JavaScriptCore/JavaScriptCore.h>
 #include <JavaScriptCore/Assertions.h>
@@ -314,7 +315,7 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     else {
         charCode = JSStringGetCharactersPtr(character)[0];
         virtualKeyCode = LOBYTE(VkKeyScan(charCode));
-        if (isupper(charCode))
+        if (WTF::isASCIIUpper(charCode))
             needsShiftKeyModifier = true;
     }
     JSStringRelease(character);