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

Unified Diff: Source/core/editing/EditorCommand.cpp

Issue 769053004: Make the execCommand() userInterface argument explicitly do nothing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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/editing/Editor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditorCommand.cpp
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index 2fa80e46ba530c087de8005ef4f5c50161c8d8d1..f21739a2dd0691a403624350bc8a40a7659c54f3 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -110,7 +110,6 @@ static bool applyCommandToFrame(LocalFrame& frame, EditorCommandSource source, E
frame.editor().applyStyleToSelection(style, action);
return true;
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
frame.editor().applyStyle(style);
return true;
}
@@ -185,7 +184,6 @@ static bool executeApplyParagraphStyle(LocalFrame& frame, EditorCommandSource so
frame.editor().applyParagraphStyleToSelection(style.get(), action);
return true;
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
frame.editor().applyParagraphStyle(style.get());
return true;
}
@@ -304,7 +302,6 @@ static bool executeCopy(LocalFrame& frame, Event*, EditorCommandSource, const St
static bool executeCreateLink(LocalFrame& frame, Event*, EditorCommandSource, const String& value)
{
- // FIXME: If userInterface is true, we should display a dialog box to let the user enter a URL.
if (value.isEmpty())
return false;
ASSERT(frame.document());
@@ -337,7 +334,6 @@ static bool executeDelete(LocalFrame& frame, Event*, EditorCommandSource source,
return true;
}
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
// If the current selection is a caret, delete the preceding character. IE performs forwardDelete, but we currently side with Firefox.
// Doesn't scroll to make the selection visible, or modify the kill ring (this time, siding with IE, not Firefox).
ASSERT(frame.document());
@@ -473,7 +469,6 @@ static bool executeForwardDelete(LocalFrame& frame, Event*, EditorCommandSource
frame.editor().deleteWithDirection(DirectionForward, CharacterGranularity, false, true);
return true;
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
// Doesn't scroll to make the selection visible, or modify the kill ring.
// ForwardDelete is not implemented in IE or Firefox, so this behavior is only needed for
// backward compatibility with ourselves, and for consistency with Delete.
@@ -520,7 +515,6 @@ static bool executeInsertHTML(LocalFrame& frame, Event*, EditorCommandSource, co
static bool executeInsertImage(LocalFrame& frame, Event*, EditorCommandSource, const String& value)
{
- // FIXME: If userInterface is true, we should display a dialog box and let the user choose a local image.
ASSERT(frame.document());
RefPtrWillBeRawPtr<HTMLImageElement> image = HTMLImageElement::create(*frame.document());
image->setSrc(value);
@@ -533,7 +527,6 @@ static bool executeInsertLineBreak(LocalFrame& frame, Event* event, EditorComman
case CommandFromMenuOrKeyBinding:
return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\n", event, TextEventInputLineBreak);
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
// Doesn't scroll to make the selection visible, or modify the kill ring.
// InsertLineBreak is not implemented in IE or Firefox, so this behavior is only needed for
// backward compatibility with ourselves, and for consistency with other commands.
@@ -1256,7 +1249,6 @@ static bool enabledDelete(LocalFrame& frame, Event* event, EditorCommandSource s
case CommandFromMenuOrKeyBinding:
return frame.editor().canDelete();
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
// "Delete" from DOM is like delete/backspace keypress, affects selected range if non-empty,
// otherwise removes a character
return enabledInEditableText(frame, event, source);
@@ -1760,7 +1752,6 @@ bool Editor::Command::isSupported() const
case CommandFromMenuOrKeyBinding:
return true;
case CommandFromDOM:
- case CommandFromDOMWithUserInterface:
return m_command->isSupportedFromDOM(m_frame.get());
}
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/editing/Editor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698