[Webkit-unassigned] [Bug 228122] Expand URL class query parameter functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 26 12:18:30 PDT 2021


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

Alex Christensen <achristensen at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #434214|review?                     |review-
              Flags|                            |

--- Comment #4 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 434214
  --> https://bugs.webkit.org/attachment.cgi?id=434214
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434214&action=review

>> Source/WTF/wtf/URL.cpp:1269
>> +    String thisURLWithoutQuery = m_string.substring(0, thisPathLength);
> 
> Ditto.

You don't need to allocate and copy the substrings just to check if they are equal.  Use StringView.

> Source/WTF/wtf/URL.h:229
> +    WTF_EXPORT_PRIVATE std::optional<Vector<QueryParameter>> queryParameters() const;

This should probably just use URLParser::parseURLEncodedForm instead of adding this.  That also returns a URLEncodedForm, which basically makes your QueryParameter class unnecessary.

-- 
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/20210726/71fda78a/attachment.htm>


More information about the webkit-unassigned mailing list