RESOLVED FIXED 89242
[File API] FileReader should work in sandbox iframe
https://bugs.webkit.org/show_bug.cgi?id=89242
Summary [File API] FileReader should work in sandbox iframe
Jian Li
Reported 2012-06-15 13:02:04 PDT
Now FileReader works in file URL document. We should also make it work in sandbox iframe.
Attachments
Patch (6.65 KB, patch)
2012-06-15 13:32 PDT, Jian Li
jianli: commit-queue-
Patch (6.63 KB, patch)
2012-06-15 14:03 PDT, Jian Li
jianli: commit-queue-
Patch (6.17 KB, patch)
2012-06-15 14:15 PDT, Jian Li
abarth: review+
jianli: commit-queue-
Jian Li
Comment 1 2012-06-15 13:32:02 PDT
Adam Barth
Comment 2 2012-06-15 13:51:47 PDT
Comment on attachment 147887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147887&action=review > Source/WebCore/page/SecurityOrigin.cpp:307 > + RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url); Should we really declare RefPtr<SecurityOrigin> here?
Adam Barth
Comment 3 2012-06-15 14:01:55 PDT
Won't that shadow the outer declaration?
Jian Li
Comment 4 2012-06-15 14:03:10 PDT
(In reply to comment #3) > Won't that shadow the outer declaration? My bad. Should remove this.
Jian Li
Comment 5 2012-06-15 14:03:54 PDT
Adam Barth
Comment 6 2012-06-15 14:05:45 PDT
Comment on attachment 147887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147887&action=review > Source/WebCore/page/SecurityOrigin.cpp:302 > + RefPtr<SecurityOrigin> targetOrigin = getCachedOrigin(url); I would actually write this function slightly different. Here's what I would do: if (m_universalAccess) return true; if (getCachedOrigin(url) == this) return true; ... then leave the rest of the function the same.
Adam Barth
Comment 7 2012-06-15 14:06:46 PDT
That's the smallest change to this function that has the desired effect.
Jian Li
Comment 8 2012-06-15 14:15:45 PDT
Created attachment 147897 [details] Patch Thanks for suggestion.
Adam Barth
Comment 9 2012-06-15 14:33:21 PDT
Comment on attachment 147897 [details] Patch Thanks!
Ahmad Saleem
Comment 10 2022-10-25 15:14:10 PDT
Landed and didn't backed out - https://github.com/WebKit/WebKit/commit/b9a27eaf7dd51ffc2fd80742bc435d179d80f17e Marking this as "RESOLVED FIXED".
Note You need to log in before you can comment on or make changes to this bug.