Summary: | WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Wyatt <Daniel.Wyatt> | ||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | adam, cgarcia, commit-queue, Daniel.Wyatt, gustavo, zan | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Daniel Wyatt
2014-01-24 13:06:17 PST
Just going to add that this is also reproducible in Source/Programs/MiniBrowser. It seems WebProcessProxy::willAcquireUniversalFileReadSandboxExtension must be called for drag-and-drop to work. In MiniBrowser, for example, you can manually type a local file URL (file:///something.html) which will end up calling willAcquireUniversalFileReadSandboxExtension. Subsequently, drag-and-drop will work. Created attachment 236349 [details]
Patch
Created attachment 236350 [details]
Patch
Fix a typo in the changelog entry
Comment on attachment 236350 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236350&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1369 > + if (dragData.containsURL(nullptr)) > + m_process->assumeReadAccessToBaseURL(dragData.asURL(nullptr)); This is correct, but I would do something like this: String url = dragData.asURL(nullptr); if (!url.isEmpty()) m_process->assumeReadAccessToBaseURL(url); To avoid building the string URL twice, since containsURL() is indeed !asURL().isEmpty(). Created attachment 236599 [details]
Patch
Comment on attachment 236599 [details]
Patch
Thanks!
Comment on attachment 236599 [details] Patch Clearing flags on attachment: 236599 Committed r172592: <http://trac.webkit.org/changeset/172592> All reviewed patches have been landed. Closing bug. |