| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2008 Google Inc. | 3  * Copyright (C) 2008 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 159     Document& document = context->ownerDocument(); | 159     Document& document = context->ownerDocument(); | 
| 160     if (dragData->containsCompatibleContent()) { | 160     if (dragData->containsCompatibleContent()) { | 
| 161         if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(frame, 
     context, allowPlainText, chosePlainText)) | 161         if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(frame, 
     context, allowPlainText, chosePlainText)) | 
| 162             return fragment; | 162             return fragment; | 
| 163 | 163 | 
| 164         if (dragData->containsURL(DragData::DoNotConvertFilenames)) { | 164         if (dragData->containsURL(DragData::DoNotConvertFilenames)) { | 
| 165             String title; | 165             String title; | 
| 166             String url = dragData->asURL(DragData::DoNotConvertFilenames, &title
     ); | 166             String url = dragData->asURL(DragData::DoNotConvertFilenames, &title
     ); | 
| 167             if (!url.isEmpty()) { | 167             if (!url.isEmpty()) { | 
| 168                 RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(doc
     ument); | 168                 RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(doc
     ument); | 
| 169                 anchor->setHref(url); | 169                 anchor->setHref(AtomicString(url)); | 
| 170                 if (title.isEmpty()) { | 170                 if (title.isEmpty()) { | 
| 171                     // Try the plain text first because the url might be normali
     zed or escaped. | 171                     // Try the plain text first because the url might be normali
     zed or escaped. | 
| 172                     if (dragData->containsPlainText()) | 172                     if (dragData->containsPlainText()) | 
| 173                         title = dragData->asPlainText(); | 173                         title = dragData->asPlainText(); | 
| 174                     if (title.isEmpty()) | 174                     if (title.isEmpty()) | 
| 175                         title = url; | 175                         title = url; | 
| 176                 } | 176                 } | 
| 177                 RefPtr<Node> anchorText = document.createTextNode(title); | 177                 RefPtr<Node> anchorText = document.createTextNode(title); | 
| 178                 anchor->appendChild(anchorText); | 178                 anchor->appendChild(anchorText); | 
| 179                 RefPtr<DocumentFragment> fragment = document.createDocumentFragm
     ent(); | 179                 RefPtr<DocumentFragment> fragment = document.createDocumentFragm
     ent(); | 
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 959     return false; | 959     return false; | 
| 960 #endif | 960 #endif | 
| 961 } | 961 } | 
| 962 | 962 | 
| 963 void DragController::cleanupAfterSystemDrag() | 963 void DragController::cleanupAfterSystemDrag() | 
| 964 { | 964 { | 
| 965 } | 965 } | 
| 966 | 966 | 
| 967 } // namespace WebCore | 967 } // namespace WebCore | 
| 968 | 968 | 
| OLD | NEW | 
|---|