[webkit-reviews] review granted: [Bug 220904] Clean up CharacterData : [Attachment 418241] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 25 17:56:19 PST 2021
Ryosuke Niwa <rniwa at webkit.org> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 220904: Clean up CharacterData
https://bugs.webkit.org/show_bug.cgi?id=220904
Attachment 418241: Patch
https://bugs.webkit.org/attachment.cgi?id=418241&action=review
--- Comment #3 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 418241
--> https://bugs.webkit.org/attachment.cgi?id=418241
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=418241&action=review
> Source/WebCore/dom/CharacterData.cpp:179
> + NodeType nodeType = this->nodeType();
nodeType is a virtual function. Let's not use that?
> Source/WebCore/dom/CharacterData.cpp:187
> - if (is<Text>(*this) && parentNode())
> + if (nodeType == TEXT_NODE && parentNode())
Keep the old code. is<Text>(*this) is a node flag check (bit flag).
> Source/WebCore/dom/CharacterData.cpp:190
> - if (is<ProcessingInstruction>(*this))
> + if (nodeType == PROCESSING_INSTRUCTION_NODE)
Let's just add ProcessingInstruction as a node flag too. We've got quite a few
bits available in node flags now.
> Source/WebCore/dom/Text.h:61
> + // Like appendData, but optimized for the parser (e.g., no mutation
events).
> + // Returns how much could be added before length limit was met.
I don't think this comment is necessary.
More information about the webkit-reviews
mailing list