Commit a1c6ff9b authored by levin@chromium.org's avatar levin@chromium.org

Fix strict OwnPtrs in ContextMenuController.cpp

https://bugs.webkit.org/show_bug.cgi?id=59375

Reviewed by Kenneth Russell.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::createContextMenu):
(WebCore::separatorItem):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dbef3248
2011-04-25 David Levin <levin@chromium.org>
Reviewed by Kenneth Russell.
Fix strict OwnPtrs in ContextMenuController.cpp
https://bugs.webkit.org/show_bug.cgi?id=59375
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::createContextMenu):
(WebCore::separatorItem):
2011-04-25 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
......@@ -123,7 +123,7 @@ void ContextMenuController::showContextMenu(Event* event, PassRefPtr<ContextMenu
PassOwnPtr<ContextMenu> ContextMenuController::createContextMenu(Event* event)
{
if (!event->isMouseEvent())
return 0;
return PassOwnPtr<ContextMenu>();
MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
HitTestResult result(mouseEvent->absoluteLocation());
......@@ -132,11 +132,11 @@ PassOwnPtr<ContextMenu> ContextMenuController::createContextMenu(Event* event)
result = frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false);
if (!result.innerNonSharedNode())
return 0;
return PassOwnPtr<ContextMenu>();
m_hitTestResult = result;
return new ContextMenu;
return adoptPtr(new ContextMenu);
}
void ContextMenuController::showContextMenu(Event* event)
......@@ -433,7 +433,7 @@ void ContextMenuController::appendItem(ContextMenuItem& menuItem, ContextMenu* p
static PassOwnPtr<ContextMenuItem> separatorItem()
{
return new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String());
return adoptPtr(new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
}
void ContextMenuController::createAndAppendFontSubMenu(ContextMenuItem& fontMenuItem)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment