[webkit-reviews] review granted: [Bug 183768] Expose content attributes on _WKLinkIconParameters : [Attachment 336162] Use vector
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 20 17:52:00 PDT 2018
Alex Christensen <achristensen at apple.com> has granted Ryosuke Niwa
<rniwa at webkit.org>'s request for review:
Bug 183768: Expose content attributes on _WKLinkIconParameters
https://bugs.webkit.org/show_bug.cgi?id=183768
Attachment 336162: Use vector
https://bugs.webkit.org/attachment.cgi?id=336162&action=review
--- Comment #10 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 336162
--> https://bugs.webkit.org/attachment.cgi?id=336162
Use vector
View in context: https://bugs.webkit.org/attachment.cgi?id=336162&action=review
> Source/WebCore/html/LinkIconCollector.cpp:111
> +
attributes.uncheckedAppend(std::make_pair(attribute.localName(),
attribute.value()));
Can we use an initializer list instead of make_pair?
> Source/WebCore/html/LinkIconCollector.cpp:114
> + icons.append({ url, iconType, linkElement.type(), iconSize,
attributes });
WTFMove(attributes). Otherwise this does an unnecessary Vector copy, right?
> Source/WebKit/UIProcess/API/Cocoa/_WKLinkIconParameters.mm:66
> + _attributes.get()[(NSString *)attributePair.first] = (NSString
*)attributePair.second;
Are the explicit (NSString *)s necessary?
More information about the webkit-reviews
mailing list