Closed Bug 830233 Opened 11 years ago Closed 11 years ago

Remove nsITableEditor

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Details

Attachments

(1 file)

      No description provided.
Attached patch PatchSplinter Review
Attachment #701685 - Flags: review?(ehsan)
(In reply to David Zbarsky (:dzbarsky) from comment #1)
> Created attachment 701685 [details] [diff] [review]
> Patch

Wait ! This patch seems to remove entirely all script access to nsITableEditor
methods since I see no change to nsIHTMLEditor. I *strongly* object to this; these
methods are key to the editor and you'll break *all* wysiwyg editors based on Gecko
(Thunderbird, BlueGriffon, BlueGriffon EPUB, SeamonKey) with respect to tables if
you do that.

If I am correct under that assumption, then that's a clear r- from me; all
methods defined by nsITableEditor *must* remain scriptable.
Would you be happy if I move the methods to nsIHTMLEditor but change the signatures to use nsINode/Element instead of nsIDOMNode/nsIDOMElement?
As soon as all in nsITableEditor remains available from
script through nsIHTMLEditor or any other interface queryable from there
and using nodes or elements in JS, I'm fine with everything you want :-)
(In reply to Daniel Glazman (:glazou) from comment #2)
> (In reply to David Zbarsky (:dzbarsky) from comment #1)
> > Created attachment 701685 [details] [diff] [review]
> > Patch
> 
> Wait ! This patch seems to remove entirely all script access to
> nsITableEditor
> methods since I see no change to nsIHTMLEditor. I *strongly* object to this;
> these
> methods are key to the editor and you'll break *all* wysiwyg editors based
> on Gecko
> (Thunderbird, BlueGriffon, BlueGriffon EPUB, SeamonKey) with respect to
> tables if
> you do that.

Does BlueGriffon use nsITableEditor?  If yes, which parts of it does BG use?

(In reply to David Zbarsky (:dzbarsky) from comment #3)
> Would you be happy if I move the methods to nsIHTMLEditor but change the
> signatures to use nsINode/Element instead of nsIDOMNode/nsIDOMElement?

nsINode/Element are not accessible from script.
(In reply to :Ehsan Akhgari from comment #5)

> Does BlueGriffon use nsITableEditor?  If yes, which parts of it does BG use?

Sure it does! Modification of the table (number of rows, columns), joining
and splitting cells, turning cells into header cells, and *much* more. The
"Insert a table" dialog, the "Table Properties" dialog and the
Tables Layout add-on entirely rely on it. The "Import table from textual
data" menu also relies on it.

> nsINode/Element are not accessible from script.

Then that's a strict no-go for me, sorry.
Hmm, OK.  David, what was the original goal of your patch here?  Does it have something to do with the Web IDL bindings, or just cleanup?  If it's just cleanup, then perhaps you could modify the patch to move those methods to nsIHTMLEditor, but I'm not sure how much of an improvement that's going to be.  :/
Comment on attachment 701685 [details] [diff] [review]
Patch

Clearing the request for now...
Attachment #701685 - Flags: review?(ehsan)
(In reply to :Ehsan Akhgari from comment #7)
> Hmm, OK.  David, what was the original goal of your patch here?  Does it
> have something to do with the Web IDL bindings, or just cleanup?  If it's
> just cleanup, then perhaps you could modify the patch to move those methods
> to nsIHTMLEditor, but I'm not sure how much of an improvement that's going
> to be.  :/

Just trying to use less nsIDOM interfaces.  I guess we could rewrite editor to use WebIDL and then use this patch, but it's not worth it yet.
(In reply to David Zbarsky (:dzbarsky) from comment #9)

> Just trying to use less nsIDOM interfaces.  I guess we could rewrite editor
> to use WebIDL and then use this patch, but it's not worth it yet.

It could be interesting to ping the users of the editor (I am speaking of
embedders here, not front-end users) to know if the projected change is
meaningful _BEFORE_ investing time on code itself.

Seamonkey, Thunderbird, BlueGriffon, Postbox and a few more.

I think this bug should be closed as WONTFIX for the time being.
(In reply to Daniel Glazman (:glazou) from comment #10)
> (In reply to David Zbarsky (:dzbarsky) from comment #9)
> 
> > Just trying to use less nsIDOM interfaces.  I guess we could rewrite editor
> > to use WebIDL and then use this patch, but it's not worth it yet.
> 
> It could be interesting to ping the users of the editor (I am speaking of
> embedders here, not front-end users) to know if the projected change is
> meaningful _BEFORE_ investing time on code itself.
> 
> Seamonkey, Thunderbird, BlueGriffon, Postbox and a few more.

SM and Thunderbird we can investigate by looking at comm-central.  For BG I'll always ask you.  For Postbox, I'm not sure if I have any contact that I can talk to for these kinds of changes.  (Please let me know if you do.)

> I think this bug should be closed as WONTFIX for the time being.

Yeah agreed that this is not worth fixing right now.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: