execCommand() insertImage/createLink should return false with empty value, not throw

RESOLVED FIXED in mozilla15

Status

()

Core
Editor
--
enhancement
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ayg, Assigned: ayg)

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The spec requires doing nothing here; we throw NS_ERROR_NOT_IMPLEMENTED.  (richtext2 tests this, but tests for the wrong result, so it will still fail even if we fix this.)
Created attachment 625485 [details] [diff] [review]
Patch v1

This returns false, like we already do for formatBlock and fontSize.  I changed createLink too while I was at it.  I just updated the spec (and spec tests) to require this behavior -- previously it required returning true here.

The updates to test_runtest.html.json are partly because of the test changes and partly because of the code changes -- there are new expected fails because we don't support the same set of commands for formatBlock as the spec requires, for example.  It's not because the patch actually causes any regressions (I think!).

Try: https://tbpl.mozilla.org/?tree=Try&rev=73e46d18eb1b
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Attachment #625485 - Flags: review?(ehsan)
Blocks: 751843
No longer blocks: 685931, 685931
Flags: in-testsuite+
Summary: execCommand("insertimage", false, "") should abort silently, not throw → execCommand() insertImage/createLink should return false with empty value, not throw
Attachment #625485 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/670ebafda11a
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/670ebafda11a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.