Changeset 66843 in webkit


Ignore:
Timestamp:
Sep 6, 2010 12:11:00 PM (14 years ago)
Author:
robert@webkit.org
Message:

2010-09-06 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

[Qt] utf8 encoding of console() messages

Unskip:
http/tests/security/xssAuditor/embed-tag-null-char.html
http/tests/security/xssAuditor/object-embed-tag-null-char.html

Both tests failed because Qt's implementation of String::format()
is casting a utf8 result to String, which assumes latin1 in
its constructor. So instead of casting a QString to a String, use
StringImpl::create() instead. Unfortunately, this involves a lot
of extra casts but the end result is correct.

https://bugs.webkit.org/show_bug.cgi?id=45240

  • wtf/text/WTFString.cpp: (WTF::String::format):

2010-09-06 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

[Qt] utf8 encoding of console() messages

Unskip:
http/tests/security/xssAuditor/embed-tag-null-char.html
http/tests/security/xssAuditor/object-embed-tag-null-char.html

Both tests failed because Qt's implementation of String::format()
is casting a utf8 result to String, which assumes latin1 in
its constructor. So instead of casting a QString to a String, use
StringImpl::create() instead. Unfortunately, this involves a lot
of extra casts but the end result is correct.

https://bugs.webkit.org/show_bug.cgi?id=45240

  • platform/qt/Skipped:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r66741 r66843  
     12010-09-06  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] utf8 encoding of console() messages
     6
     7        Unskip:
     8        http/tests/security/xssAuditor/embed-tag-null-char.html
     9        http/tests/security/xssAuditor/object-embed-tag-null-char.html
     10
     11        Both tests failed because Qt's implementation of String::format()
     12        is casting a utf8 result to String, which assumes latin1 in
     13        its constructor. So instead of casting a QString to a String, use
     14        StringImpl::create() instead. Unfortunately, this involves a lot
     15        of extra casts but the end result is correct.
     16
     17        https://bugs.webkit.org/show_bug.cgi?id=45240
     18
     19        * wtf/text/WTFString.cpp:
     20        (WTF::String::format):
     21
    1222010-09-03  Alexey Proskuryakov  <ap@apple.com>
    223
  • trunk/JavaScriptCore/wtf/text/WTFString.cpp

    r66401 r66843  
    336336    va_end(args);
    337337
    338     return buffer;
     338    return StringImpl::create(buffer.constData(), buffer.length());
    339339
    340340#elif OS(WINCE)
  • trunk/LayoutTests/ChangeLog

    r66842 r66843  
     12010-09-06  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] utf8 encoding of console() messages
     6
     7        Unskip:
     8        http/tests/security/xssAuditor/embed-tag-null-char.html
     9        http/tests/security/xssAuditor/object-embed-tag-null-char.html
     10
     11        Both tests failed because Qt's implementation of String::format()
     12        is casting a utf8 result to String, which assumes latin1 in
     13        its constructor. So instead of casting a QString to a String, use
     14        StringImpl::create() instead. Unfortunately, this involves a lot
     15        of extra casts but the end result is correct.
     16
     17        https://bugs.webkit.org/show_bug.cgi?id=45240
     18
     19        * platform/qt/Skipped:
     20
    1212010-09-06  Justin Schuh  <jschuh@chromium.org>
    222
  • trunk/LayoutTests/platform/qt/Skipped

    r66803 r66843  
    181181# missing origin header
    182182http/tests/security/originHeader/origin-header-for-empty.html
    183 
    184 # Possibly related to https://bugs.webkit.org/show_bug.cgi?id=35263
    185 # are we utf-encoding a string twice over?
    186 http/tests/security/xssAuditor/embed-tag-null-char.html
    187 http/tests/security/xssAuditor/object-embed-tag-null-char.html
    188183
    189184# Disabled HTTP subdirs for now, needs investigation.
Note: See TracChangeset for help on using the changeset viewer.