WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46958
Add additional WKString API
https://bugs.webkit.org/show_bug.cgi?id=46958
Summary
Add additional WKString API
Sam Weinig
Reported
2010-09-30 20:53:30 PDT
Add additional WKString API to make it a bit more useful.
Attachments
Patch
(4.65 KB, patch)
2010-09-30 20:55 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Updated, now includes tests!
(11.26 KB, patch)
2010-10-01 13:51 PDT
,
Sam Weinig
kenneth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2010-09-30 20:55:57 PDT
Created
attachment 69418
[details]
Patch
Sam Weinig
Comment 2
2010-10-01 13:51:48 PDT
Created
attachment 69511
[details]
Updated, now includes tests! Updated to include tests. (I am not thrilled with the test, it doesn't do any fancy utf8 stuff, but it is a first step).
WebKit Review Bot
Comment 3
2010-10-01 14:00:29 PDT
Attachment 69511
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKitTools/TestWebKitAPI/Tests/WebKit2/WKString.cpp:26: Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] WebKitTools/TestWebKitAPI/Tests/WebKit2/WKString.cpp:45: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Roben (:aroben)
Comment 4
2010-10-01 14:02:58 PDT
This seems to be duplicating some work that's being done in
bug 45393
Kenneth Rohde Christiansen
Comment 5
2010-10-01 14:41:57 PDT
Comment on
attachment 69511
[details]
Updated, now includes tests! View in context:
https://bugs.webkit.org/attachment.cgi?id=69511&action=review
Looks good. r=me
> WebKit2/Shared/WebString.h:62 > + WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF16ToUTF8(&d, d + m_string.length(), &p, p + bufferSize - 1, true);
What does the true mean? maybe add a comment like /* ... */ in front of it?
> WebKitTools/TestWebKitAPI/Tests/WebKit2/WKString.cpp:34 > + WKStringRef string = WKStringCreateWithUTF8CString("hello");
Shouldn't you try constructing it using a "string" containing UTF8 specific chars?
Sam Weinig
Comment 6
2010-10-01 14:47:47 PDT
(In reply to
comment #5
)
> (From update of
attachment 69511
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=69511&action=review
> > Looks good. r=me > > > WebKit2/Shared/WebString.h:62 > > + WTF::Unicode::ConversionResult result = WTF::Unicode::convertUTF16ToUTF8(&d, d + m_string.length(), &p, p + bufferSize - 1, true); > > What does the true mean? maybe add a comment like /* ... */ in front of it? > > > WebKitTools/TestWebKitAPI/Tests/WebKit2/WKString.cpp:34 > > + WKStringRef string = WKStringCreateWithUTF8CString("hello"); > > Shouldn't you try constructing it using a "string" containing UTF8 specific chars?
Yep. I should. I am going to ask ap to help me construct some more test cases (he is quite good at that).
Sam Weinig
Comment 7
2010-10-01 15:00:12 PDT
Landed in
r68930
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug