Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: Source/core/page/DragController.cpp

Issue 202153005: Add isHTMLPlugInElement() helpers for consistency with other HTML elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep virtual function Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 return false; 547 return false;
548 548
549 result = m_page->mainFrame()->eventHandler().hitTestResultAtPoint(point); 549 result = m_page->mainFrame()->eventHandler().hitTestResultAtPoint(point);
550 550
551 if (!result.innerNonSharedNode()) 551 if (!result.innerNonSharedNode())
552 return false; 552 return false;
553 553
554 if (dragData->containsFiles() && asFileInput(result.innerNonSharedNode())) 554 if (dragData->containsFiles() && asFileInput(result.innerNonSharedNode()))
555 return true; 555 return true;
556 556
557 if (result.innerNonSharedNode()->isPluginElement()) { 557 if (isHTMLPlugInElement(*result.innerNonSharedNode())) {
558 HTMLPlugInElement* plugin = toHTMLPlugInElement(result.innerNonSharedNod e()); 558 HTMLPlugInElement* plugin = toHTMLPlugInElement(result.innerNonSharedNod e());
559 if (!plugin->canProcessDrag() && !result.innerNonSharedNode()->rendererI sEditable()) 559 if (!plugin->canProcessDrag() && !result.innerNonSharedNode()->rendererI sEditable())
560 return false; 560 return false;
561 } else if (!result.innerNonSharedNode()->rendererIsEditable()) 561 } else if (!result.innerNonSharedNode()->rendererIsEditable())
562 return false; 562 return false;
563 563
564 if (m_didInitiateDrag && m_documentUnderMouse == m_dragInitiator && result.i sSelected()) 564 if (m_didInitiateDrag && m_documentUnderMouse == m_dragInitiator && result.i sSelected())
565 return false; 565 return false;
566 566
567 return true; 567 return true;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 #else 958 #else
959 return keyState & PlatformEvent::CtrlKey; 959 return keyState & PlatformEvent::CtrlKey;
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
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698