WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
223205
Add CSSValuePair.h in preparation for Pair.h refactor
https://bugs.webkit.org/show_bug.cgi?id=223205
Summary
Add CSSValuePair.h in preparation for Pair.h refactor
Tyler Wilcock
Reported
2021-03-15 12:06:52 PDT
See parent bug for the motivation behind this work:
https://bugs.webkit.org/show_bug.cgi?id=223204
Attachments
Patch
(17.08 KB, patch)
2021-03-15 12:54 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(17.14 KB, patch)
2021-03-15 16:23 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(16.97 KB, patch)
2021-03-16 11:03 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tyler Wilcock
Comment 1
2021-03-15 12:54:14 PDT
Created
attachment 423226
[details]
Patch
Tyler Wilcock
Comment 2
2021-03-15 16:23:39 PDT
Created
attachment 423260
[details]
Patch
Simon Fraser (smfr)
Comment 3
2021-03-16 09:20:56 PDT
Comment on
attachment 423260
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423260&action=review
> Source/WebCore/css/CSSValuePair.cpp:37 > + return first + separatorCssText() + second;
makeString() might be more efficient.
> Source/WebCore/css/CSSValuePair.h:36 > + * Intended to replace Pair.h, which is only capable of containing CSSPrimitiveValues, and is not a sub-class of > + * CSSValue itself. See
https://bugs.webkit.org/show_bug.cgi?id=223204
.
This comment won't be useful in the future when Pair.h is lost in the mists of time.
Tyler Wilcock
Comment 4
2021-03-16 11:03:52 PDT
Created
attachment 423358
[details]
Patch
Tyler Wilcock
Comment 5
2021-03-16 17:36:09 PDT
Thanks for the review, Simon. Marked this new patch with cq?
EWS
Comment 6
2021-03-16 19:12:17 PDT
Committed
r274546
: <
https://commits.webkit.org/r274546
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 423358
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-03-16 19:13:14 PDT
<
rdar://problem/75506725
>
Darin Adler
Comment 8
2021-03-16 19:18:35 PDT
Comment on
attachment 423358
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423358&action=review
> Source/WebCore/css/CSSValue.h:80 > + String separatorCssText() const;
For efficiency, this should return ASCIILiteral instead of String. It never needs to return a value that’s not an ASCII literal, and this saves some memory allocation. The name should be separatorCSSText, rather than separatorCssText.
> Source/WebCore/css/CSSValueList.cpp:89 > + String separator = separatorCssText();
If we change separatorCSSText to return an ASCIILiteral, that’s the type we’ll want for this local variable too. Could just use "auto".
Tyler Wilcock
Comment 9
2021-03-16 20:17:31 PDT
(In reply to Darin Adler from
comment #8
)
> Comment on
attachment 423358
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423358&action=review
> > > Source/WebCore/css/CSSValue.h:80 > > + String separatorCssText() const; > > For efficiency, this should return ASCIILiteral instead of String. It never > needs to return a value that’s not an ASCII literal, and this saves some > memory allocation. > > The name should be separatorCSSText, rather than separatorCssText. > > > Source/WebCore/css/CSSValueList.cpp:89 > > + String separator = separatorCssText(); > > If we change separatorCSSText to return an ASCIILiteral, that’s the type > we’ll want for this local variable too. Could just use "auto".
Good to know, thanks! I've made these changes here[1]. I'll mark this follow-up patch r? and cq? but feel free to wait to be sure EWS goes green first. [1]:
https://bugs.webkit.org/show_bug.cgi?id=223300
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug