[Webkit-unassigned] [Bug 174816] [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 8 07:46:27 PST 2018


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

--- Comment #21 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Also: there is a comment in URLParser::internationalDomainNameTranscoder that needs to be deleted now, since we'll be removing this code from Epiphany.

(In reply to Carlos Garcia Campos from comment #19)
> I disagree, there's no point on duplicating the code. The fact that it's
> cocoa only doesn't mean that the code is 100% cocoa specific. It converts
> NSURL to NSString probably because it's more convenient, being cocoa
> specific code, but maybe we can share 99% of the implementation. I would
> check it first.

I was going to say "looks like a lot of code to just reimplement g_uri_unescape_string()", but at the bottom it also does some map hostnames thing... then I scrolled up... and, OK, the mapping is a similar calculation to what Gabriel has done here. So you're right: it would be better to share this code with Mac, rather than to implement our own version with a separate set of bugs that won't get updated in the future. It looks like WebCoreNSURLExtras implements even more checks than ours, or at least different checks.

So, Gabriel, sharing the code with Mac will probably consume the rest of your project hours. Do you think you have enough hours left to work on this? It won't be easy, because you probably don't have a Mac to be able to run the Objective C++ code, and who knows how all these NS APIs work... the cost of having solved hard problems in the past is that people then give you more hard problems. :P I guess the goal would be to (a) understand how WebCore::userVisibleString in WebCoreNSURLExtras.mm works, (b) move the code into either WebCore::URL (or maybe WebCore::URLParser?), eliminating the use of Objective C++ and the NS dependencies, and (c) decide how to handle the differences between its implementation and yours. Then (d) move your test to Tools/TestWebKitAPI/Tests/WebCore/URL.cpp (or maybe URLParser.cpp).

I see Carlos has already CCed Alex Christensen from Apple on this bug. He wrote URLParser and is an expert on these URL classes, so if you have questions, he might know the answer.

-- 
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/20180108/090fac4c/attachment.html>


More information about the webkit-unassigned mailing list