[Webkit-unassigned] [Bug 257084] Remove no-argument simplifyWhitespace

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 22 08:54:42 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=257084

--- Comment #3 from Anne van Kesteren <annevk at annevk.nl> ---
There's not many callers of simplifyWhiteSpace() so that might be doable. Already identified some dead code.

I'm kinda worried I will run into similar compiler issues when removing stripWhiteSpace(), but I'll investigate.

% git grep simplifyWhiteSpace Source            
Source/WTF/wtf/text/StringImpl.cpp:Ref<StringImpl> StringImpl::simplifyWhiteSpace()
Source/WTF/wtf/text/StringImpl.cpp:Ref<StringImpl> StringImpl::simplifyWhiteSpace(CodeUnitMatchFunction isWhiteSpace)
Source/WTF/wtf/text/StringImpl.h:    WTF_EXPORT_PRIVATE Ref<StringImpl> simplifyWhiteSpace();
Source/WTF/wtf/text/StringImpl.h:    Ref<StringImpl> simplifyWhiteSpace(CodeUnitMatchFunction);
Source/WTF/wtf/text/WTFString.cpp:String String::simplifyWhiteSpace() const
Source/WTF/wtf/text/WTFString.cpp:    return m_impl ? m_impl->simplifyWhiteSpace() : String { };
Source/WTF/wtf/text/WTFString.cpp:String String::simplifyWhiteSpace(CodeUnitMatchFunction isWhiteSpace) const
Source/WTF/wtf/text/WTFString.cpp:    return m_impl ? m_impl->simplifyWhiteSpace(isWhiteSpace) : String { };
Source/WTF/wtf/text/WTFString.h:    WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN simplifyWhiteSpace() const;
Source/WTF/wtf/text/WTFString.h:    WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN simplifyWhiteSpace(CodeUnitMatchFunction) const;
Source/WebCore/accessibility/AccessibilityNodeObject.cpp:        String string = stringValue().stripWhiteSpace().simplifyWhiteSpace();
Source/WebCore/accessibility/AccessibilityNodeObject.cpp:    return builder.toString().stripWhiteSpace().simplifyWhiteSpace(isHTMLSpaceButNotLineBreak);
Source/WebCore/accessibility/AccessibilityNodeObject.cpp:        text = (element ? element->innerText() : node->textContent()).simplifyWhiteSpace();
Source/WebCore/html/HTMLMediaElement.cpp:    auto title = String(attributeWithoutSynchronization(titleAttr)).stripWhiteSpace().simplifyWhiteSpace();
Source/WebCore/html/HTMLMediaElement.cpp:    title = document().title().stripWhiteSpace().simplifyWhiteSpace();
Source/WebCore/html/HTMLOptGroupElement.cpp:    itemText = itemText.simplifyWhiteSpace();
Source/WebCore/html/HTMLOptionElement.cpp:    return stripLeadingAndTrailingHTMLSpaces(document().displayStringModifiedByEncoding(text)).simplifyWhiteSpace(isASCIIWhitespace);
Source/WebCore/html/HTMLOptionElement.cpp:    return stripLeadingAndTrailingHTMLSpaces(collectOptionInnerText()).simplifyWhiteSpace(isASCIIWhitespace);
Source/WebCore/html/HTMLOptionElement.cpp:    return stripLeadingAndTrailingHTMLSpaces(collectOptionInnerText()).simplifyWhiteSpace(isASCIIWhitespace);
Source/WebCore/html/HTMLOptionElement.cpp:        return stripLeadingAndTrailingHTMLSpaces(collectOptionInnerText()).simplifyWhiteSpace(isASCIIWhitespace);
Source/WebCore/page/DragController.cpp:        editor.copyURL(linkURL, hitTestResult->textContent().simplifyWhiteSpace(), pasteboard);
Source/WebCore/page/DragController.cpp:        String textContentWithSimplifiedWhiteSpace = hitTestResult->textContent().simplifyWhiteSpace();
Source/WebCore/platform/Length.cpp:    RefPtr<StringImpl> str = string.impl()->simplifyWhiteSpace();
Source/WebCore/svg/SVGDescElement.cpp:    return textContent().simplifyWhiteSpace();
Source/WebCore/xml/XPathFunctions.cpp:        return s.simplifyWhiteSpace(isXMLSpace);
Source/WebCore/xml/XPathFunctions.cpp:    return s.simplifyWhiteSpace(isXMLSpace);
Source/WebCore/xml/XPathValue.cpp:            const String& str = m_data->string.simplifyWhiteSpace();

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230522/33a77bb6/attachment-0001.htm>


More information about the webkit-unassigned mailing list