Bug 149286

Summary: De-template ContainerNodeAlgorithms
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, eric.carlson, esprehn+autocc, gyuyoung.kim, kangil.han, philipj, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 149400    
Bug Blocks:    
Attachments:
Description Flags
patch kling: review+

Description Antti Koivisto 2015-09-17 14:18:13 PDT
This is pointlessly generic.
Comment 1 Antti Koivisto 2015-09-17 14:32:10 PDT
Created attachment 261425 [details]
patch
Comment 2 Andreas Kling 2015-09-17 16:29:33 PDT
Comment on attachment 261425 [details]
patch

Nice. Next make it iterative? :)
Comment 3 Antti Koivisto 2015-09-17 16:54:33 PDT
http://trac.webkit.org/changeset/189945
Comment 4 Darin Adler 2015-09-19 15:15:36 PDT
Comment on attachment 261425 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=261425&action=review

> Source/WebCore/html/track/WebVTTParser.cpp:544
> +        auto child = Text::create(document, m_token.characters());
> +        m_currentNode->parserAppendChild(WTF::move(child));

If we did it on one line without the local variable then we wouldn’t need to call WTF::move.

> Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:1031
> +    auto newNode = CDATASection::create(m_currentNode->document(), toString(s, len));
> +    m_currentNode->parserAppendChild(WTF::move(newNode));

If we did it on one line without the local variable then we wouldn’t need to call WTF::move.

> Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:1047
> +    auto newNode = Comment::create(m_currentNode->document(), toString(s));
> +    m_currentNode->parserAppendChild(WTF::move(newNode));

If we did it on one line without the local variable then we wouldn’t need to call WTF::move.