Rename replaceAllChildren to replaceAllChildrenWithNewText
Created attachment 406825 [details] Renamed the function
Comment on attachment 406825 [details] Renamed the function View in context: https://bugs.webkit.org/attachment.cgi?id=406825&action=review > Source/WebCore/dom/ContainerNode.h:62 > + void replaceAllChildrenWithNewText(Ref<Text>&&); Why not just take a String instead of requiring the caller make the text node?
(In reply to Darin Adler from comment #2) > Comment on attachment 406825 [details] > Renamed the function > > View in context: > https://bugs.webkit.org/attachment.cgi?id=406825&action=review > > > Source/WebCore/dom/ContainerNode.h:62 > > + void replaceAllChildrenWithNewText(Ref<Text>&&); > > Why not just take a String instead of requiring the caller make the text > node? That's a good point. Let's just do that.
Comment on attachment 406825 [details] Renamed the function View in context: https://bugs.webkit.org/attachment.cgi?id=406825&action=review > Source/WebCore/dom/ContainerNode.cpp:635 > // This function assumes the input node is not a DocumentFragment and is parentless to decrease complexity. I realized that there is one call site that *wishes* it could use this for DocumentFragment.
(In reply to Darin Adler from comment #4) > Comment on attachment 406825 [details] > Renamed the function > > View in context: > https://bugs.webkit.org/attachment.cgi?id=406825&action=review > > > Source/WebCore/dom/ContainerNode.cpp:635 > > // This function assumes the input node is not a DocumentFragment and is parentless to decrease complexity. > > I realized that there is one call site that *wishes* it could use this for > DocumentFragment. Yeah but now that I think about it more, that just needs a separate function.
Created attachment 406827 [details] Updated per Darin's comment
Committed r265844: <https://trac.webkit.org/changeset/265844>
<rdar://problem/67367468>