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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 clearDragDataTransfer(); 2599 clearDragDataTransfer();
2600 dragState().m_dragSrc = nullptr; 2600 dragState().m_dragSrc = nullptr;
2601 // In case the drag was ended due to an escape key press we need to ensure 2601 // In case the drag was ended due to an escape key press we need to ensure
2602 // that consecutive mousemove events don't reinitiate the drag and drop. 2602 // that consecutive mousemove events don't reinitiate the drag and drop.
2603 m_mouseDownMayStartDrag = false; 2603 m_mouseDownMayStartDrag = false;
2604 } 2604 }
2605 2605
2606 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle ment) 2606 void EventHandler::updateDragStateAfterEditDragIfNeeded(Element* rootEditableEle ment)
2607 { 2607 {
2608 // If inserting the dragged contents removed the drag source, we still want to fire dragend at the root editble element. 2608 // If inserting the dragged contents removed the drag source, we still want to fire dragend at the root editble element.
2609 if (dragState().m_dragSrc && !dragState().m_dragSrc->inShadowIncludingDocume nt()) 2609 if (dragState().m_dragSrc && !dragState().m_dragSrc->isConnected())
2610 dragState().m_dragSrc = rootEditableElement; 2610 dragState().m_dragSrc = rootEditableElement;
2611 } 2611 }
2612 2612
2613 // returns if we should continue "default processing", i.e., whether eventhandle r canceled 2613 // returns if we should continue "default processing", i.e., whether eventhandle r canceled
2614 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event Type, const PlatformMouseEvent& event) 2614 WebInputEventResult EventHandler::dispatchDragSrcEvent(const AtomicString& event Type, const PlatformMouseEvent& event)
2615 { 2615 {
2616 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag State().m_dragDataTransfer.get()); 2616 return dispatchDragEvent(eventType, dragState().m_dragSrc.get(), event, drag State().m_dragDataTransfer.get());
2617 } 2617 }
2618 2618
2619 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni tiator initiator) 2619 bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni tiator initiator)
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 2852
2853 FrameHost* EventHandler::frameHost() const 2853 FrameHost* EventHandler::frameHost() const
2854 { 2854 {
2855 if (!m_frame->page()) 2855 if (!m_frame->page())
2856 return nullptr; 2856 return nullptr;
2857 2857
2858 return &m_frame->page()->frameHost(); 2858 return &m_frame->page()->frameHost();
2859 } 2859 }
2860 2860
2861 } // namespace blink 2861 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698