| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. | 3 * Copyright (C) 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 if (containsFiles()) { | 150 if (containsFiles()) { |
| 151 // FIXME: Implement this. Should be pretty simple to make some HTML | 151 // FIXME: Implement this. Should be pretty simple to make some HTML |
| 152 // and call createFragmentFromMarkup. | 152 // and call createFragmentFromMarkup. |
| 153 } | 153 } |
| 154 | 154 |
| 155 if (m_platformDragData->types().contains(mimeTypeTextHTML)) { | 155 if (m_platformDragData->types().contains(mimeTypeTextHTML)) { |
| 156 String html; | 156 String html; |
| 157 KURL baseURL; | 157 KURL baseURL; |
| 158 m_platformDragData->htmlAndBaseURL(html, baseURL); | 158 m_platformDragData->htmlAndBaseURL(html, baseURL); |
| 159 if (RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(frame->
document(), html, baseURL, DisallowScriptingAndPluginContent)) | 159 ASSERT(frame->document()); |
| 160 if (RefPtr<DocumentFragment> fragment = createFragmentFromMarkup(*frame-
>document(), html, baseURL, DisallowScriptingAndPluginContent)) |
| 160 return fragment.release(); | 161 return fragment.release(); |
| 161 } | 162 } |
| 162 | 163 |
| 163 return 0; | 164 return 0; |
| 164 } | 165 } |
| 165 | 166 |
| 166 String DragData::droppedFileSystemId() const | 167 String DragData::droppedFileSystemId() const |
| 167 { | 168 { |
| 168 DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_pl
atformDragData); | 169 DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_pl
atformDragData); |
| 169 if (!filesystem) | 170 if (!filesystem) |
| 170 return String(); | 171 return String(); |
| 171 return filesystem->filesystemId(); | 172 return filesystem->filesystemId(); |
| 172 } | 173 } |
| 173 | 174 |
| 174 } // namespace WebCore | 175 } // namespace WebCore |
| OLD | NEW |