| Index: Source/core/page/DragController.cpp
|
| diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
|
| index 16512e01adb2dbf1c2af9d6a7094ca1e894e1b1e..42c5ce8282e3340320b82bfabe94c8cdcef3fd2d 100644
|
| --- a/Source/core/page/DragController.cpp
|
| +++ b/Source/core/page/DragController.cpp
|
| @@ -211,7 +211,7 @@ void DragController::dragExited(DragData* dragData)
|
| mouseMovedIntoDocument(0);
|
| if (m_fileInputElementUnderMouse)
|
| m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
|
| - m_fileInputElementUnderMouse = 0;
|
| + m_fileInputElementUnderMouse.clear();
|
| }
|
|
|
| DragSession DragController::dragUpdated(DragData* dragData)
|
| @@ -285,17 +285,17 @@ DragSession DragController::dragEnteredOrUpdated(DragData* dragData)
|
| return dragSession;
|
| }
|
|
|
| -static HTMLInputElement* asFileInput(Node* node)
|
| +static Result<HTMLInputElement> asFileInput(Node* node)
|
| {
|
| ASSERT(node);
|
|
|
| - HTMLInputElement* inputElement = node->toInputElement();
|
| + Handle<HTMLInputElement> inputElement = node->toInputElement();
|
|
|
| // If this is a button inside of the a file input, move up to the file input.
|
| if (inputElement && inputElement->isTextButton() && inputElement->treeScope()->rootNode()->isShadowRoot())
|
| inputElement = toShadowRoot(Handle<Node>(inputElement->treeScope()->rootNode()).raw())->host()->toInputElement();
|
|
|
| - return inputElement && inputElement->isFileUpload() ? inputElement : 0;
|
| + return inputElement && inputElement->isFileUpload() ? inputElement : nullptr;
|
| }
|
|
|
| // This can return null if an empty document is loaded.
|
| @@ -362,7 +362,7 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
|
| if (!element)
|
| return false;
|
|
|
| - HTMLInputElement* elementAsFileInput = asFileInput(element);
|
| + Handle<HTMLInputElement> elementAsFileInput = asFileInput(element);
|
| if (m_fileInputElementUnderMouse != elementAsFileInput) {
|
| if (m_fileInputElementUnderMouse)
|
| m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
|
| @@ -404,7 +404,7 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
|
| m_page->dragCaretController()->clear();
|
| if (m_fileInputElementUnderMouse)
|
| m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
|
| - m_fileInputElementUnderMouse = 0;
|
| + m_fileInputElementUnderMouse.clear();
|
| return false;
|
| }
|
|
|
| @@ -447,10 +447,10 @@ bool DragController::concludeEditDrag(DragData* dragData)
|
| {
|
| ASSERT(dragData);
|
|
|
| - RefPtr<HTMLInputElement> fileInput = m_fileInputElementUnderMouse;
|
| + Handle<HTMLInputElement> fileInput = m_fileInputElementUnderMouse;
|
| if (m_fileInputElementUnderMouse) {
|
| m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(false);
|
| - m_fileInputElementUnderMouse = 0;
|
| + m_fileInputElementUnderMouse.clear();
|
| }
|
|
|
| if (!m_documentUnderMouse)
|
|
|