[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jhoneycutt at apple.com jhoneycutt at apple.com
Wed Apr 7 23:17:23 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f0138f158bc1f0b4b61cba2f69f6a83c5f84e044
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 31 00:51:27 2009 +0000

    Fix an issue that Adam noticed in DRT.
    
    Reviewed by Darin Adler.
    
    * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
    (AccessibilityUIElement::role):
    Get the length of the role text, and create a buffer dynamically.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50376 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 41b1de7..48d6f59 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-30  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Fix an issue that Adam noticed in DRT.
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        (AccessibilityUIElement::role):
+        Get the length of the role text, and create a buffer dynamically.
+
 2009-10-30  Eric Seidel  <eric at webkit.org>
 
         No review, rolling out r50105.
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index e89796c..2a8eaf6 100644
--- a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -156,9 +156,13 @@ JSStringRef AccessibilityUIElement::role()
 
     wstring result;
     if (V_VT(&vRole) == VT_I4) {
-        TCHAR roleText[64] = {0};
-        ::GetRoleText(V_I4(&vRole), roleText, ARRAYSIZE(roleText));
-        result = roleText;
+        unsigned roleTextLength = ::GetRoleText(V_I4(&vRole), 0, 0) + 1;
+
+        Vector<TCHAR> roleText(roleTextLength);
+
+        ::GetRoleText(V_I4(&vRole), roleText.data(), roleTextLength);
+
+        result = roleText.data();
     } else if (V_VT(&vRole) == VT_BSTR)
         result = wstring(V_BSTR(&vRole), ::SysStringLen(V_BSTR(&vRole)));
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list