Summary: | Add namespace prefix support in XML tokenizer | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vicki Pfau <jeffrey+webkit> | ||||||
Component: | New Bugs | Assignee: | Vicki Pfau <jeffrey+webkit> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 64396 | ||||||||
Attachments: |
|
Description
Vicki Pfau
2011-08-02 15:44:52 PDT
Created attachment 102707 [details]
Patch
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. (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. (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. Created attachment 102715 [details]
Patch for landing
Comment on attachment 102715 [details] Patch for landing Clearing flags on attachment: 102715 Committed r92249: <http://trac.webkit.org/changeset/92249> All reviewed patches have been landed. Closing bug. |