Backed out changeset fdc2aa9e612f (bug 1027560) for failing w3 tests

This commit is contained in:
Carsten "Tomcat" Book
2015-05-26 13:13:48 +02:00
parent 6cc5e69a5c
commit b323c81289
3 changed files with 15 additions and 2 deletions

View File

@@ -3256,6 +3256,7 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID,
// if editing is not on, bail
if (!isCutCopy && !IsEditingOnAfterFlush()) {
rv.Throw(NS_ERROR_FAILURE);
return false;
}
@@ -3292,6 +3293,7 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID,
bool restricted = commandID.LowerCaseEqualsLiteral("paste");
if (restricted && !nsContentUtils::IsCallerChrome()) {
rv = NS_ERROR_DOM_SECURITY_ERR;
return false;
}
@@ -3388,6 +3390,7 @@ nsHTMLDocument::QueryCommandEnabled(const nsAString& commandID, ErrorResult& rv)
// if editing is not on, bail
if (!IsEditingOnAfterFlush()) {
rv.Throw(NS_ERROR_FAILURE);
return false;
}
@@ -3430,6 +3433,7 @@ nsHTMLDocument::QueryCommandIndeterm(const nsAString& commandID, ErrorResult& rv
// if editing is not on, bail
if (!IsEditingOnAfterFlush()) {
rv.Throw(NS_ERROR_FAILURE);
return false;
}
@@ -3490,6 +3494,7 @@ nsHTMLDocument::QueryCommandState(const nsAString& commandID, ErrorResult& rv)
// if editing is not on, bail
if (!IsEditingOnAfterFlush()) {
rv.Throw(NS_ERROR_FAILURE);
return false;
}
@@ -3602,6 +3607,7 @@ nsHTMLDocument::QueryCommandValue(const nsAString& commandID,
// if editing is not on, bail
if (!IsEditingOnAfterFlush()) {
rv.Throw(NS_ERROR_FAILURE);
return;
}