Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
index 92361081d6e1325c3822f2ac6e559fe131611154..1d6c3ecd17ef9db3c9b0056c1a5eb4933fde263b 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
@@ -2203,6 +2203,13 @@ static String valueNull(LocalFrame&, Event*) { |
return String(); |
} |
+// The command has no value. |
+// https://w3c.github.io/editing/execCommand.html#querycommandvalue() |
+// > ... or has no value, return the empty string. |
+static String valueNo(LocalFrame&, Event*) { |
+ return emptyString; |
+} |
+ |
static String valueBackColor(LocalFrame& frame, Event*) { |
return valueStyle(frame, CSSPropertyBackgroundColor); |
} |
@@ -2657,7 +2664,7 @@ static const EditorInternalCommand* internalCommand(const String& commandName) { |
enabledInRichlyEditableText, stateStrikethrough, valueNull, |
notTextInsertion, doNotAllowExecutionWhenDisabled}, |
{WebEditingCommandType::StyleWithCSS, executeStyleWithCSS, supported, |
- enabled, stateStyleWithCSS, valueNull, notTextInsertion, |
+ enabled, stateStyleWithCSS, valueNo, notTextInsertion, |
doNotAllowExecutionWhenDisabled}, |
{WebEditingCommandType::Subscript, executeSubscript, supported, |
enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion, |