<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@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=259369&action=diff" name="attach_259369" title="patch">attachment 259369</a> <a href="attachment.cgi?id=259369&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=259369&action=review">https://bugs.webkit.org/attachment.cgi?id=259369&action=review</a>
<span class="quote">> Source/WebCore/platform/network/DataURLDecoder.h:31
> +#include <wtf/text/WTFString.h></span >
Could use <wtf/Forward.h> instead.
<span class="quote">> Source/WebCore/platform/network/DataURLDecoder.h:46
> +void decode(const URL&, std::function<void (const Result*)>);</span >
Why a pointer rather than a reference?
<span class="quote">> Source/WebCore/platform/text/DecodeEscapeSequences.h:118
> - return (encoding.isValid() ? encoding : UTF8Encoding()).decode(buffer.data(), p - buffer.data());
> + if (encoding.isValid())
> + return encoding.decode(buffer.data(), p - buffer.data());
> + 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>