Bug 45488

Summary: Use String::fromUTF8 instead of UTF8Encoding().decode in the libxml XMLDocumentParser
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: XMLAssignee: Patrick R. Gansterer <paroga>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 43085, 49581    
Attachments:
Description Flags
Patch
none
Patch #2 none

Description Patrick R. Gansterer 2010-09-09 13:27:06 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-09 13:31:00 PDT
Created attachment 67087 [details]
Patch
Comment 2 Darin Adler 2010-09-09 14:24:22 PDT
Why?
Comment 3 Patrick R. Gansterer 2010-09-09 14:36:46 PDT
(In reply to comment #2)
> Why?
bug 43085
IMHO String::fromUTF8 avoids the TextEncoding overhead?

I also want to replace most of the toString calls with a new toAtomicString method. QualifiedName (used for elements and attributes) takes AtomicString as arguments. Creating AtomicString instead of String can avoid many memcpy operations IMHO.
If we implement a AtomicString::fromUTF8 which works directly with the utf8 data for hash and compare we can avoid many convertUTF8ToUTF16 operations too.
Comment 4 Darin Adler 2010-09-09 14:39:24 PDT
(In reply to comment #3)
> IMHO String::fromUTF8 avoids the TextEncoding overhead?

OK. Next time you can just say so in the code or change log, and save a round of questioning ;-)
Comment 5 WebKit Commit Bot 2010-09-10 10:45:18 PDT
Comment on attachment 67087 [details]
Patch

Clearing flags on attachment: 67087

Committed r67214: <http://trac.webkit.org/changeset/67214>
Comment 6 WebKit Commit Bot 2010-09-10 10:45:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Patrick R. Gansterer 2010-11-20 01:22:07 PST
Created attachment 74475 [details]
Patch #2

Missed the second toString in the first patch.
Comment 8 WebKit Commit Bot 2010-11-20 09:39:11 PST
The commit-queue encountered the following flaky tests while processing attachment 74475 [details]:

inspector/styles-source-offsets.html

Please file bugs against the tests.  These tests were authored by apavlov@chromium.org and pfeldman@chromium.org.  The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2010-11-20 09:40:23 PST
Comment on attachment 74475 [details]
Patch #2

Clearing flags on attachment: 74475

Committed r72476: <http://trac.webkit.org/changeset/72476>
Comment 10 WebKit Commit Bot 2010-11-20 09:40:28 PST
All reviewed patches have been landed.  Closing bug.