Summary: | [Chromium] Call fileUtilities methods directly | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Pilgrim (Google) <pilgrim> | ||||||||||
Component: | WebKit Misc. | Assignee: | Mark Pilgrim (Google) <pilgrim> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | abarth, fishd, haraken, jamesr, webkit.review.bot | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 82948 | ||||||||||||
Attachments: |
|
Description
Mark Pilgrim (Google)
2012-05-30 07:39:46 PDT
Created attachment 144812 [details]
Patch
Please check the changes to DragDataChromium.cpp very carefully! I'm not sure I got the casts right. Comment on attachment 144812 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144812&action=review > Source/WebCore/platform/chromium/DragDataChromium.cpp:65 > + url = static_cast<KURL>(WebKit::Platform::current()->fileUtilities()->filePathToURL(static_cast<String>(WebKit::Platform::current()->fileUtilities()->getAbsolutePath(m_platformDragData->filenames()[0])))); This needs some temporaries at least - I can't tell if it's correct or not. static_cast<> is the wrong way to convert from, say, a WebString to a String - instead you want to call String(myWebString) Created attachment 144890 [details]
Patch
Comment on attachment 144890 [details]
Patch
Added intermediate variables, cast to String properly.
Comment on attachment 144890 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144890&action=review > Source/WebCore/platform/chromium/DragDataChromium.cpp:62 > + String path; You can move this declaration inside the "else if" since it's only used there. Created attachment 144904 [details]
Patch
Comment on attachment 144904 [details]
Patch
Moved variable declaration.
Comment on attachment 144904 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144904&action=review > Source/WebCore/platform/chromium/DragDataChromium.cpp:66 > + String path; > + path = String(WebKit::Platform::current()->fileUtilities()->getAbsolutePath(m_platformDragData->filenames()[0])); These can just be put on one line. Created attachment 144907 [details]
Patch
Comment on attachment 144907 [details] Patch Clearing flags on attachment: 144907 Committed r119024: <http://trac.webkit.org/changeset/119024> All reviewed patches have been landed. Closing bug. |