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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2775503005: Editing: queryCommandValue("stylewithcss") should always return an empty string. (Closed)
Patch Set: . Created 3 years, 9 months 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 | « third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/underline-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/external/wpt/editing/run/underline-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698