| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 } | 636 } |
| 637 if (dragMode == DRAG_AUTO) { | 637 if (dragMode == DRAG_AUTO) { |
| 638 if ((m_dragSourceAction & DragSourceActionImage) | 638 if ((m_dragSourceAction & DragSourceActionImage) |
| 639 && node->hasTagName(HTMLNames::imgTag) | 639 && node->hasTagName(HTMLNames::imgTag) |
| 640 && src->settings() | 640 && src->settings() |
| 641 && src->settings()->loadsImagesAutomatically()) { | 641 && src->settings()->loadsImagesAutomatically()) { |
| 642 state.m_dragType = static_cast<DragSourceAction>(state.m_dra
gType | DragSourceActionImage); | 642 state.m_dragType = static_cast<DragSourceAction>(state.m_dra
gType | DragSourceActionImage); |
| 643 return node; | 643 return node; |
| 644 } | 644 } |
| 645 if ((m_dragSourceAction & DragSourceActionLink) | 645 if ((m_dragSourceAction & DragSourceActionLink) |
| 646 && node->hasTagName(HTMLNames::aTag) | 646 && isHTMLAnchorElement(node) |
| 647 && static_cast<HTMLAnchorElement*>(node)->isLiveLink()) { | 647 && toHTMLAnchorElement(node)->isLiveLink()) { |
| 648 state.m_dragType = static_cast<DragSourceAction>(state.m_dra
gType | DragSourceActionLink); | 648 state.m_dragType = static_cast<DragSourceAction>(state.m_dra
gType | DragSourceActionLink); |
| 649 return node; | 649 return node; |
| 650 } | 650 } |
| 651 } | 651 } |
| 652 } | 652 } |
| 653 } | 653 } |
| 654 | 654 |
| 655 // We either have nothing to drag or we have a selection and we're not over
a draggable element. | 655 // We either have nothing to drag or we have a selection and we're not over
a draggable element. |
| 656 return (state.m_dragType & DragSourceActionSelection) ? startNode : 0; | 656 return (state.m_dragType & DragSourceActionSelection) ? startNode : 0; |
| 657 } | 657 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 return false; | 945 return false; |
| 946 #endif | 946 #endif |
| 947 } | 947 } |
| 948 | 948 |
| 949 void DragController::cleanupAfterSystemDrag() | 949 void DragController::cleanupAfterSystemDrag() |
| 950 { | 950 { |
| 951 } | 951 } |
| 952 | 952 |
| 953 } // namespace WebCore | 953 } // namespace WebCore |
| 954 | 954 |
| OLD | NEW |