Index: Source/core/editing/EditorCommand.cpp |
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp |
index 69e23abd25560ce05bbb70eb874db971de7a5d82..cdb82fdc73b6e7e769bd79d94e1538b3330c4556 100644 |
--- a/Source/core/editing/EditorCommand.cpp |
+++ b/Source/core/editing/EditorCommand.cpp |
@@ -1746,7 +1746,7 @@ bool Editor::Command::execute(Event* triggeringEvent) const |
return execute(String(), triggeringEvent); |
} |
-bool Editor::Command::isSupported() const |
+bool Editor::Command::isSupported(bool enabled) const |
{ |
if (!m_command) |
return false; |
@@ -1754,7 +1754,7 @@ bool Editor::Command::isSupported() const |
case CommandFromMenuOrKeyBinding: |
return true; |
case CommandFromDOM: |
- return m_command->isSupportedFromDOM(m_frame.get()); |
+ return enabled ? m_command->isSupportedFromDOM(m_frame.get()) : true; |
} |
ASSERT_NOT_REACHED(); |
return false; |
@@ -1762,7 +1762,7 @@ bool Editor::Command::isSupported() const |
bool Editor::Command::isEnabled(Event* triggeringEvent) const |
{ |
- if (!isSupported() || !m_frame) |
+ if (!isSupported(true) || !m_frame) |
return false; |
return m_command->isEnabled(*m_frame, triggeringEvent, m_source); |
} |