RESOLVED FIXED Bug 65578
Add namespace prefix support in XML tokenizer
https://bugs.webkit.org/show_bug.cgi?id=65578
Summary Add namespace prefix support in XML tokenizer
Vicki Pfau
Reported 2011-08-02 15:44:52 PDT
Add namespace prefix support in XML tokenizer
Attachments
Patch (16.70 KB, patch)
2011-08-02 15:48 PDT, Vicki Pfau
no flags
Patch for landing (16.78 KB, patch)
2011-08-02 16:48 PDT, Vicki Pfau
no flags
Vicki Pfau
Comment 1 2011-08-02 15:48:31 PDT
Adam Barth
Comment 2 2011-08-02 16:11:13 PDT
Comment on attachment 102707 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102707&action=review > Source/WebCore/xml/parser/XMLToken.h:66 > + : m_hasStandalone(false) > + , m_hasEncoding(false) > + , m_standalone(false) Bad indent. :) > Source/WebCore/xml/parser/XMLToken.h:206 > + m_target.swap(m_data); Is this a copy? m_data is stored using inline capacity. It might be better to write directly into m_target.
Vicki Pfau
Comment 3 2011-08-02 16:21:15 PDT
(In reply to comment #2) > (From update of attachment 102707 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=102707&action=review > > > Source/WebCore/xml/parser/XMLToken.h:66 > > + : m_hasStandalone(false) > > + , m_hasEncoding(false) > > + , m_standalone(false) > > Bad indent. :) I keep doing this; you'd have thought I'd remember this by now :( > > Source/WebCore/xml/parser/XMLToken.h:206 > > + m_target.swap(m_data); > > Is this a copy? m_data is stored using inline capacity. It might be better to write directly into m_target. m_data needs to be cleared in the process, to make way for the local name of the tag. Would an assign and a clear make more sense than a swap? It might make sense to leave this in the back of our minds, but for now, it's functional.
Adam Barth
Comment 4 2011-08-02 16:24:15 PDT
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 102707 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=102707&action=review > > > > > Source/WebCore/xml/parser/XMLToken.h:206 > > > + m_target.swap(m_data); > > > > Is this a copy? m_data is stored using inline capacity. It might be better to write directly into m_target. > > m_data needs to be cleared in the process, to make way for the local name of the tag. Would an assign and a clear make more sense than a swap? It might make sense to leave this in the back of our minds, but for now, it's functional. Ah, the problem is you don't know ahead of time that this is a prefix, so you need to copy out. I'd add a FIXME to try to remove the copy. It could get expensive if every element and attribute has a prefix.
Vicki Pfau
Comment 5 2011-08-02 16:48:50 PDT
Created attachment 102715 [details] Patch for landing
WebKit Review Bot
Comment 6 2011-08-02 17:04:20 PDT
Comment on attachment 102715 [details] Patch for landing Clearing flags on attachment: 102715 Committed r92249: <http://trac.webkit.org/changeset/92249>
WebKit Review Bot
Comment 7 2011-08-02 17:04:25 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.