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

Unified Diff: Source/core/dom/Document.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 | « no previous file | Source/core/editing/Editor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index fed99da27b200b5a3b9ffe4f27ed8f3376f14c85..6e899c5e0532d7fbbe253e0a9d109bfb31e6a342 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4336,19 +4336,19 @@ KURL Document::completeURLWithOverride(const String& url, const KURL& baseURLOve
// Support for Javascript execCommand, and related methods
-static Editor::Command command(Document* document, const String& commandName, bool userInterface = false)
+static Editor::Command command(Document* document, const String& commandName)
{
LocalFrame* frame = document->frame();
if (!frame || frame->document() != document)
return Editor::Command();
document->updateRenderTreeIfNeeded();
- return frame->editor().command(commandName, userInterface ? CommandFromDOMWithUserInterface : CommandFromDOM);
+ return frame->editor().command(commandName, CommandFromDOM);
}
-bool Document::execCommand(const String& commandName, bool userInterface, const String& value)
+bool Document::execCommand(const String& commandName, bool, const String& value)
{
- // We don't allow recusrive |execCommand()| to protect against attack code.
+ // We don't allow recursive |execCommand()| to protect against attack code.
// Recursive call of |execCommand()| could be happened by moving iframe
// with script triggered by insertion, e.g. <iframe src="javascript:...">
// <iframe onload="...">. This usage is valid as of the specification
@@ -4364,7 +4364,7 @@ bool Document::execCommand(const String& commandName, bool userInterface, const
// Postpone DOM mutation events, which can execute scripts and change
// DOM tree against implementation assumption.
EventQueueScope eventQueueScope;
- Editor::Command editorCommand = command(this, commandName, userInterface);
+ Editor::Command editorCommand = command(this, commandName);
Platform::current()->histogramSparse("WebCore.Document.execCommand", editorCommand.idForHistogram());
return editorCommand.execute(value);
}
« no previous file with comments | « no previous file | Source/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698