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

Unified Diff: Source/core/page/DragController.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/DragController.h ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/page/DragController.h ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698