Commit 5c08ceb0 authored by aroben's avatar aroben
Browse files

Addressed some of Geoff's comments.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::handleContextMenuEvent): Added a
FIXME.
* platform/ContextMenu.cpp:
(WebCore::ContextMenu::addInspectElementItem): Null-check
frame->page().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 007c6565
......@@ -19,6 +19,17 @@
Return "", not nil. This function never used to return nil, so let's not
start now. I've filed <rdar://problem/5283271> to cover the documentation bug,
 
2007-06-20 Adam Roben <aroben@apple.com>
Addressed some of Geoff's comments.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::handleContextMenuEvent): Added a
FIXME.
* platform/ContextMenu.cpp:
(WebCore::ContextMenu::addInspectElementItem): Null-check
frame->page().
2007-06-20 Adam Roben <aroben@apple.com>
 
Fix crash in fast/dom/dir-no-body.html
......@@ -94,6 +94,9 @@ void ContextMenuController::handleContextMenuEvent(Event* event)
m_contextMenu->populate();
PlatformMenuDescription customMenu = m_client->getCustomMenuFromDefaultItems(m_contextMenu.get());
m_contextMenu->setPlatformDescription(customMenu);
// FIXME: We should be asking Settings whether to include the Inspect
// Element item, rather than our client.
if (m_client->shouldIncludeInspectElementItem())
m_contextMenu->addInspectElementItem();
event->setDefaultHandled();
......
......@@ -387,11 +387,14 @@ void ContextMenu::addInspectElementItem()
if (!frame)
return;
if (!frame->page()->inspectorController())
Page* page = frame->page();
if (!page)
return;
if (!page->inspectorController())
return;
ContextMenuItem InspectElementItem(ActionType, ContextMenuItemTagInspectElement, contextMenuItemTagInspectElement());
// FIXME: Need to only add this if the developer tools preference is set
appendItem(*separatorItem());
appendItem(InspectElementItem);
}
......
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