Ignore:
Timestamp:
Mar 17, 2021, 10:22:43 AM (4 years ago)
Author:
[email protected]
Message:

Use ASCIILiteral over String for CSSValue::separatorCSSText() to avoid allocation
https://bugs.webkit.org/show_bug.cgi?id=223300

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-03-17
Reviewed by Yusuke Suzuki.

Use ASCIILiteral over String for CSSValue::separatorCSSText() to avoid
allocation, since we know this function will always return an
ASCII string. Also rename separatorCssText to separatorCSSText.

These changes were requested in this comment:
https://bugs.webkit.org/show_bug.cgi?id=223205#c8

  • css/CSSValue.cpp:

(WebCore::CSSValue::separatorCSSText const):
(WebCore::CSSValue::separatorCssText const):
Rename function separatorCssText to separatorCSSText.

  • css/CSSValue.h:

String CSSValue::separatorCssText --> ASCIILiteral CSSValue::separatorCSSText

  • css/CSSValueList.cpp:

(WebCore::CSSValueList::customCSSText const):
Use auto to capture result of separatorCSSText().

  • css/CSSValuePair.cpp:

(WebCore::CSSValuePair::customCSSText const):
Function separatorCssText was renamed to separatorCSSText.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.