Last Comment Bug 748310 - execCommand() insertImage/createLink should return false with empty value, not throw
: execCommand() insertImage/createLink should return false with empty value, no...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla15
Assigned To: Aryeh Gregor (:ayg) (away until October 25)
:
:
Mentors:
Depends on:
Blocks: editingspectests
  Show dependency treegraph
 
Reported: 2012-04-24 05:23 PDT by Aryeh Gregor (:ayg) (away until October 25)
Modified: 2012-05-26 05:11 PDT (History)
2 users (show)
ayg: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (134.79 KB, patch)
2012-05-20 05:43 PDT, Aryeh Gregor (:ayg) (away until October 25)
ehsan: review+
Details | Diff | Splinter Review

Description Aryeh Gregor (:ayg) (away until October 25) 2012-04-24 05:23:10 PDT
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.)
Comment 1 Aryeh Gregor (:ayg) (away until October 25) 2012-05-20 05:43:36 PDT
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
Comment 2 Aryeh Gregor (:ayg) (away until October 25) 2012-05-25 05:02:51 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/670ebafda11a
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-05-26 05:11:21 PDT
https://hg.mozilla.org/mozilla-central/rev/670ebafda11a

Note You need to log in before you can comment on or make changes to this bug.