Closed
Bug 1312991
Opened 8 years ago
Closed 8 years ago
Get rid of nsIHTMLEditor.setDocumentTitle()
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: masayuki, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
If we will stop supporting undoable document title change via a call of nsIHTMLEditor.setDocumentTitle() (bug 1312989), we don't need to keep supporting nsIHTMLEditor.setDocumentTitle() anymore because |document.title = "foo";| is available. I also want to ask ni? to Thunderbird and SeaMonkey guys if they have some trouble if we'll remove them. Same as bug 1312989, I'd like to remove it in 53 (after next ESR).
Flags: needinfo?(neil)
Flags: needinfo?(jorgk)
Comment 1•8 years ago
|
||
We use editor.setDocumentTitle(title); a few times here https://dxr.mozilla.org/comm-central/search?q=setDocumentTitle&redirect=false So instead of GetCurrentEditor().setDocumentTitle(title); we'd have to dig out the document and set its title instead, right? I haven't seen Neil in ages, so I'm forwarding this to Ian.
Flags: needinfo?(neil)
Flags: needinfo?(jorgk)
Flags: needinfo?(iann_bugzilla)
Reporter | ||
Comment 2•8 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #1) > We use editor.setDocumentTitle(title); a few times here > https://dxr.mozilla.org/comm-central/search?q=setDocumentTitle&redirect=false > > So instead of > GetCurrentEditor().setDocumentTitle(title); > we'd have to dig out the document and set its title instead, right? I think that |GetCurrentEditorElement().ownerDocument.title = title;| is enough. > I haven't seen Neil in ages, so I'm forwarding this to Ian. Thanks! I referred module owners of SeaMonkey, though.
Comment 3•8 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #2) > I think that |GetCurrentEditorElement().ownerDocument.title = title;| is > enough. That works now, right? So we could make the change now. TB also has a few of these: this.setDocumentTitle(tab); https://dxr.mozilla.org/comm-central/rev/7c2e6b4b08219dc2e2c2278d0fc645678166145e/mail/base/content/tabmail.xml#587 but I guess that 'this' is the document.
As all is left is TB use, clearing NI
Flags: needinfo?(iann_bugzilla)
Comment 5•8 years ago
|
||
We've removed the use of nsIHTMLEditor.setDocumentTitle() in C-C in bug 1313033. There is a method by the same name in mail/base/content/tabmail.xml https://dxr.mozilla.org/comm-central/search?q=setDocumentTitle&redirect=false but that's unrelated.
(In reply to Jorg K (GMT+1) from comment #5) > We've removed the use of nsIHTMLEditor.setDocumentTitle() in C-C in bug > 1313033. BlueGriffon used it.
Reporter | ||
Comment 7•8 years ago
|
||
(In reply to Daniel Glazman (:glazou) from comment #6) > (In reply to Jorg K (GMT+1) from comment #5) > > We've removed the use of nsIHTMLEditor.setDocumentTitle() in C-C in bug > > 1313033. > > BlueGriffon used it. Do you disagree with removing nsIHTMLEditor.setDocumentTitle()? As I mentioned in bug 1312989, it doesn't make sense we keep supporting "undoable" document title change.
Flags: needinfo?(daniel)
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #7) > Do you disagree with removing nsIHTMLEditor.setDocumentTitle()? As I > mentioned in bug 1312989, it doesn't make sense we keep supporting > "undoable" document title change. It's done so no need to argue here, but making it undoable was not difficult, I would have preferred that way of doing. *Anything* the user does through UI should be undoable, including when "Document properties" are tweaked.
Flags: needinfo?(daniel)
Updated•8 years ago
|
Priority: -- → P3
Reporter | ||
Comment 9•8 years ago
|
||
(In reply to Daniel Glazman (:glazou) from comment #8) > (In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #7) > > > Do you disagree with removing nsIHTMLEditor.setDocumentTitle()? As I > > mentioned in bug 1312989, it doesn't make sense we keep supporting > > "undoable" document title change. > > It's done so no need to argue here, but making it undoable was not > difficult, I would have preferred that way of doing. *Anything* > the user does through UI should be undoable, including when > "Document properties" are tweaked. The difficult point of this is, changing document title is not "pure" user operation. I mean that it needs helper UI and such UI tries to modify the document title with JS API. Such change can be done without user operation. So, document title change in undo stack may not be expected by user. So, that's same as other DOM tree changes from JS. I wonder, editor should be undoable even with changed by JS because modern web apps override default behavior with their script. Although, I have no idea how we should do that.
Reporter | ||
Comment 10•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fcd9353db3fc
Comment hidden (mozreview-request) |
Comment 12•8 years ago
|
||
mozreview-review |
Comment on attachment 8821867 [details] Bug 1312991 Get rid of nsIHTMLEditor::SetDocumentTitle() and mozilla::SetDocumentTitleTransaction https://reviewboard.mozilla.org/r/100978/#review101618 This is a type of patch where MozReview fails badly, since it doesn't show the contents of the removed files.
Attachment #8821867 -
Flags: review?(bugs) → review+
Comment 13•8 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/032db7cba775 Get rid of nsIHTMLEditor::SetDocumentTitle() and mozilla::SetDocumentTitleTransaction r=smaug
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/032db7cba775
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Updated•4 years ago
|
Blocks: redesign-editor-scriptable-API
You need to log in
before you can comment on or make changes to this bug.
Description
•