RESOLVED FIXED 107811
[EFL][WK2] Use C API inside ewk_file_chooser_request
https://bugs.webkit.org/show_bug.cgi?id=107811
Summary [EFL][WK2] Use C API inside ewk_file_chooser_request
Chris Dumez
Reported 2013-01-24 05:09:54 PST
As per Bug 107657, we should start using the C API internally to avoid violating layering.
Attachments
Patch (10.24 KB, patch)
2013-01-24 06:10 PST, Chris Dumez
no flags
Patch (10.20 KB, patch)
2013-01-29 23:35 PST, Chris Dumez
no flags
Patch (10.22 KB, patch)
2013-01-30 02:46 PST, Chris Dumez
no flags
Patch (10.31 KB, patch)
2013-01-30 06:32 PST, Chris Dumez
no flags
Patch (10.26 KB, patch)
2013-01-30 06:36 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2013-01-24 06:10:20 PST
Chris Dumez
Comment 2 2013-01-29 23:35:16 PST
Created attachment 185406 [details] Patch Rebased on master.
Gyuyoung Kim
Comment 3 2013-01-29 23:45:56 PST
Comment on attachment 185406 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185406&action=review > Source/WebKit2/UIProcess/API/efl/ewk_file_chooser_request.cpp:128 > + String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); According to Benjamin's comment, it seems to me String Operators is enough in this case. https://bugs.webkit.org/show_bug.cgi?id=107363#c13
Chris Dumez
Comment 4 2013-01-29 23:50:18 PST
(In reply to comment #3) > (From update of attachment 185406 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185406&action=review > > > Source/WebKit2/UIProcess/API/efl/ewk_file_chooser_request.cpp:128 > > + String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); > > According to Benjamin's comment, it seems to me String Operators is enough in this case. > https://bugs.webkit.org/show_bug.cgi?id=107363#c13 Gyuyoung, I do not understand your comment. I'm using operator+ from String. Benjamin's comment is about not using StringBuilder (which I'm not using).
Benjamin Poulain
Comment 5 2013-01-30 00:20:07 PST
> > (From update of attachment 185406 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=185406&action=review > > > > > Source/WebKit2/UIProcess/API/efl/ewk_file_chooser_request.cpp:128 > > > + String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); > > > > According to Benjamin's comment, it seems to me String Operators is enough in this case. > > https://bugs.webkit.org/show_bug.cgi?id=107363#c13 > > Gyuyoung, I do not understand your comment. I'm using operator+ from String. Benjamin's comment is about not using StringBuilder (which I'm not using). Quick comment before going to bed :) Gyuyoung is right String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); is worse than String fileURL = "file://" + String::fromUTF8(url); but that's a bug and I am probably to blame for that. There is no StringTypeAdapter for ASCIILiteral. So your code will generate: String fileURL = StringAppend(String(ASCIILiteral("file://")), String::fromUTF8(url)); If you have 5 minutes, it would be great to make another patch adding a StringTypeAdapter for ASCIILiteral.
Chris Dumez
Comment 6 2013-01-30 02:42:07 PST
(In reply to comment #5) > > > (From update of attachment 185406 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=185406&action=review > > > > > > > Source/WebKit2/UIProcess/API/efl/ewk_file_chooser_request.cpp:128 > > > > + String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); > > > > > > According to Benjamin's comment, it seems to me String Operators is enough in this case. > > > https://bugs.webkit.org/show_bug.cgi?id=107363#c13 > > > > Gyuyoung, I do not understand your comment. I'm using operator+ from String. Benjamin's comment is about not using StringBuilder (which I'm not using). > > Quick comment before going to bed :) > > Gyuyoung is right > String fileURL = ASCIILiteral("file://") + String::fromUTF8(url); > is worse than > String fileURL = "file://" + String::fromUTF8(url); > but that's a bug and I am probably to blame for that. > > There is no StringTypeAdapter for ASCIILiteral. So your code will generate: > String fileURL = StringAppend(String(ASCIILiteral("file://")), String::fromUTF8(url)); > > If you have 5 minutes, it would be great to make another patch adding a StringTypeAdapter for ASCIILiteral. Yes. It sounds like a good idea to add a StringTypeAdapter for ASCIILiteral. I'll do that, thanks.
Chris Dumez
Comment 7 2013-01-30 02:46:14 PST
Created attachment 185446 [details] Patch Do not construct a ASCIILiteral anymore.
Gyuyoung Kim
Comment 8 2013-01-30 03:30:29 PST
(In reply to comment #6) > Yes. It sounds like a good idea to add a StringTypeAdapter for ASCIILiteral. I'll do that, thanks. +1, Good idea to me as well.
Chris Dumez
Comment 9 2013-01-30 06:32:27 PST
Created attachment 185490 [details] Patch Use ASCIILiteral in String concatenations.
Chris Dumez
Comment 10 2013-01-30 06:36:00 PST
Created attachment 185491 [details] Patch Make use of toCopiedURLAPI().
Build Bot
Comment 11 2013-01-30 20:06:48 PST
Chris Dumez
Comment 12 2013-01-30 22:46:08 PST
Comment on attachment 185491 [details] Patch win-ews seems to be in a bad state. False alarm.
Kenneth Rohde Christiansen
Comment 13 2013-02-01 07:19:18 PST
Comment on attachment 185491 [details] Patch LGTM
WebKit Review Bot
Comment 14 2013-02-02 16:16:15 PST
Comment on attachment 185491 [details] Patch Clearing flags on attachment: 185491 Committed r141709: <http://trac.webkit.org/changeset/141709>
WebKit Review Bot
Comment 15 2013-02-02 16:16:21 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.