Changeset 49253 in webkit


Ignore:
Timestamp:
Oct 7, 2009 10:47:53 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-10-07 Evan Martin <evan@chromium.org>

Reviewed by Darin Adler.

Layout test for verifying that LC_NUMERIC setting doesn't affect
the way CSS properties are stringified.
https://bugs.webkit.org/show_bug.cgi?id=18994

  • fast/css/opacity-float-expected.txt: Added.
  • fast/css/opacity-float.html: Added.

2009-10-07 Evan Martin <evan@chromium.org>

Reviewed by Darin Adler.

Add API to LayoutTestController for re/setting the system locale.
https://bugs.webkit.org/show_bug.cgi?id=18994

  • DumpRenderTree/LayoutTestController.cpp: (setLocaleCallback): (LayoutTestController::staticFunctions): (LayoutTestController::setLocale):
  • DumpRenderTree/LayoutTestController.h:
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49230 r49253  
     12009-10-07  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Layout test for verifying that LC_NUMERIC setting doesn't affect
     6        the way CSS properties are stringified.
     7        https://bugs.webkit.org/show_bug.cgi?id=18994
     8
     9        * fast/css/opacity-float-expected.txt: Added.
     10        * fast/css/opacity-float.html: Added.
     11
    1122009-10-07  Xan Lopez  <xlopez@igalia.com>
    213
  • trunk/WebKitTools/ChangeLog

    r49246 r49253  
     12009-10-07  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Add API to LayoutTestController for re/setting the system locale.
     6        https://bugs.webkit.org/show_bug.cgi?id=18994
     7
     8        * DumpRenderTree/LayoutTestController.cpp:
     9        (setLocaleCallback):
     10        (LayoutTestController::staticFunctions):
     11        (LayoutTestController::setLocale):
     12        * DumpRenderTree/LayoutTestController.h:
     13
    1142009-10-06  Shinichiro Hamaji  <hamaji@chromium.org>
    215
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp

    r49091 r49253  
    721721    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
    722722    controller->setHandlesAuthenticationChallenges(JSValueToBoolean(context, arguments[0]));
     723
     724    return JSValueMakeUndefined(context);
     725}
     726
     727static JSValueRef setPOSIXLocaleCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     728{
     729    if (argumentCount < 1)
     730        return JSValueMakeUndefined(context);
     731
     732    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     733    JSRetainPtr<JSStringRef> locale(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     734    ASSERT(!*exception);
     735    controller->setPOSIXLocale(locale.get());
    723736
    724737    return JSValueMakeUndefined(context);
     
    11961209        { "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    11971210        { "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1211        { "setPOSIXLocale", setPOSIXLocaleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    11981212        { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    11991213        { "setJavaScriptProfilingEnabled", setJavaScriptProfilingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     
    12821296    m_geolocationPermission = allow;
    12831297}
     1298
     1299void LayoutTestController::setPOSIXLocale(JSStringRef locale)
     1300{
     1301    char localeBuf[32];
     1302    JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf));
     1303    setlocale(LC_ALL, localeBuf);
     1304}
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.h

    r49091 r49253  
    208208    void evaluateInWebInspector(long callId, JSStringRef script);
    209209
     210    void setPOSIXLocale(JSStringRef locale);
     211
    210212private:
    211213    bool m_dumpAsPDF;
  • trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r48791 r49253  
    335335
    336336    webkit_reset_origin_access_white_lists();
     337
     338    setlocale(LC_ALL, "");
    337339}
    338340
  • trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm

    r48914 r49253  
    444444
    445445    [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
     446
     447    setlocale(LC_ALL, "");
    446448}
    447449
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

    r49189 r49253  
    287287    m_controller->reset();
    288288    QWebSecurityOrigin::resetOriginAccessWhiteLists();
     289
     290    setlocale(LC_ALL, "");
    289291}
    290292
  • trunk/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp

    r48861 r49253  
    744744    }
    745745    setAlwaysAcceptCookies(false);
     746
     747    setlocale(LC_ALL, "");
    746748}
    747749
Note: See TracChangeset for help on using the changeset viewer.