<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Decode data URLs in web process"
   href="https://bugs.webkit.org/show_bug.cgi?id=148128#c17">Comment # 17</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Decode data URLs in web process"
   href="https://bugs.webkit.org/show_bug.cgi?id=148128">bug 148128</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=259369&amp;action=diff" name="attach_259369" title="patch">attachment 259369</a> <a href="attachment.cgi?id=259369&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=259369&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=259369&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/platform/network/DataURLDecoder.h:31
&gt; +#include &lt;wtf/text/WTFString.h&gt;</span >

Could use &lt;wtf/Forward.h&gt; instead.

<span class="quote">&gt; Source/WebCore/platform/network/DataURLDecoder.h:46
&gt; +void decode(const URL&amp;, std::function&lt;void (const Result*)&gt;);</span >

Why a pointer rather than a reference?

<span class="quote">&gt; Source/WebCore/platform/text/DecodeEscapeSequences.h:118
&gt; -        return (encoding.isValid() ? encoding : UTF8Encoding()).decode(buffer.data(), p - buffer.data());
&gt; +        if (encoding.isValid())
&gt; +            return encoding.decode(buffer.data(), p - buffer.data());
&gt; +        return String(buffer.data(), p - buffer.data());</span >

What makes this behavior change OK? Maybe I am wrong, but I don’t think it’s OK! I have no objections to making a fast path which treats sequences as Latin-1 since that’s what we store in 8-bit WTF::String, but that’s not the same thing as treating sequences as UTF-8. The old contract was that we would treat the sequences as UTF-8 when no encoding was passed in.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>