Closed
Bug 1476897
Opened 6 years ago
Closed 6 years ago
HTMLEditor should inherit nsIEditorMailSupport directly and TextEditor shouldn't inherit it
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(7 files, 1 obsolete file)
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
m_kato
:
review+
|
Details |
HTMLEditor now defines overrides of nsIEditorMailSupport methods with NS_DECL_NSIEDITORMAILSUPPORT. So, if we don't need to override some of them like Rewrap(), it just increases the binary size. So, HTMLEditor should override each of them only when it's necessary.
Assignee | ||
Comment 1•6 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•6 years ago
|
||
Comment on attachment 8993570 [details]
Bug 1476897 - Make HTMLEditor define overriding methods of nsIEditorMailSupport instead of using NS_DECL_NSIEDITORMAILSUPPORT
Sorry for the bug spam. I change my mind. We should make HTMLEditor inherits nsIEditorMailSupport directly instead of TextEditor.
Attachment #8993570 -
Flags: review?(m_kato)
Assignee | ||
Updated•6 years ago
|
Attachment #8993570 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Summary: HTMLEditor should define only necessary methods of nsIEditorMailSupport → HTMLEditor should inherit nsIEditorMailSupport directly and TextEditor shouldn't inherit it
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•6 years ago
|
||
mozreview-review |
Comment on attachment 8994140 [details]
Bug 1476897 - part 5: Move implementation of TextEditor::InsertAsQuotation() to new method
https://reviewboard.mozilla.org/r/258754/#review265640
Code analysis found 3 defects in this patch:
- 3 defects found by clang-tidy
You can run this analysis locally with:
- `./mach static-analysis check path/to/file.cpp` (C/C++)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1840
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> - selection->Collapse(newNode, 0);
> + rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1840
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> - selection->Collapse(newNode, 0);
> + rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1840
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> - selection->Collapse(newNode, 0);
> + rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
Comment 19•6 years ago
|
||
mozreview-review |
Comment on attachment 8994141 [details]
Bug 1476897 - part 6: Move implementation of both TextEditor::PasteAsQuotation() and HTMLEditor::PasteAsQuotation() to new virtual methods
https://reviewboard.mozilla.org/r/258756/#review265642
Code analysis found 3 defects in this patch:
- 3 defects found by clang-tidy
You can run this analysis locally with:
- `./mach static-analysis check path/to/file.cpp` (C/C++)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1853
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1853
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
::: editor/libeditor/HTMLEditorDataTransfer.cpp:1853
(Diff revision 1)
> newNode->SetAttr(kNameSpaceID_None, nsGkAtoms::style,
> NS_LITERAL_STRING("white-space: pre-wrap;"), true);
> }
>
> // and set the selection inside it:
> rv = selection->Collapse(newNode, 0);
Warning: Value stored to 'rv' is never read [clang-tidy: clang-analyzer-deadcode.DeadStores]
rv = selection->Collapse(newNode, 0);
^
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 23•6 years ago
|
||
Comment 24•6 years ago
|
||
mozreview-review |
Comment on attachment 8994136 [details]
Bug 1476897 - part 1: Implement nsIEditorMailSupport in HTMLEditor since it's never used with TextEditor instance
https://reviewboard.mozilla.org/r/258746/#review265966
Attachment #8994136 -
Flags: review?(m_kato) → review+
Comment 25•6 years ago
|
||
mozreview-review |
Comment on attachment 8994137 [details]
Bug 1476897 - part 2: Make TextEditor::GetEmbeddedObjects() just return NS_ERROR_NOT_IMPLEMENTED since it's never used
https://reviewboard.mozilla.org/r/258748/#review265968
No one uses getEmbeddedObjects without debugQAEditorOverlay.js? I cannot find any uses from m-c, c-c and bluegriffon.
Attachment #8994137 -
Flags: review?(m_kato) → review+
Comment 26•6 years ago
|
||
mozreview-review |
Comment on attachment 8994137 [details]
Bug 1476897 - part 2: Make TextEditor::GetEmbeddedObjects() just return NS_ERROR_NOT_IMPLEMENTED since it's never used
https://reviewboard.mozilla.org/r/258748/#review265970
Comment 27•6 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #25)
> Comment on attachment 8994137 [details]
> Bug 1476897 - part 2: Make TextEditor::GetEmbeddedObjects() just return
> NS_ERROR_NOT_IMPLEMENTED since it's never used
>
> https://reviewboard.mozilla.org/r/258748/#review265968
>
> No one uses getEmbeddedObjects without debugQAEditorOverlay.js? I cannot
> find any uses from m-c, c-c and bluegriffon.
Ah, nsMsgCompose.cpp uses it. Sorry.
Comment 28•6 years ago
|
||
(but we should move GetEmbeddedObjects to c-c since it doesn't depend on editor code.)
Comment 29•6 years ago
|
||
mozreview-review |
Comment on attachment 8994138 [details]
Bug 1476897 - part 3: Make TextEditor::InsertAsCitedQuotation() return NS_ERROR_NOT_IMPLEMENTED since nobody uses this method with TextEditor instances
https://reviewboard.mozilla.org/r/258750/#review265972
Attachment #8994138 -
Flags: review?(m_kato) → review+
Comment 30•6 years ago
|
||
mozreview-review |
Comment on attachment 8994139 [details]
Bug 1476897 - part 4: Make TextEditor::InsertTextWithQuotations() returns NS_ERROR_NOT_IMPLEMENTED since it's never used
https://reviewboard.mozilla.org/r/258752/#review265978
Attachment #8994139 -
Flags: review?(m_kato) → review+
Comment 31•6 years ago
|
||
mozreview-review |
Comment on attachment 8994140 [details]
Bug 1476897 - part 5: Move implementation of TextEditor::InsertAsQuotation() to new method
https://reviewboard.mozilla.org/r/258754/#review265986
Attachment #8994140 -
Flags: review?(m_kato) → review+
Comment 32•6 years ago
|
||
mozreview-review |
Comment on attachment 8994141 [details]
Bug 1476897 - part 6: Move implementation of both TextEditor::PasteAsQuotation() and HTMLEditor::PasteAsQuotation() to new virtual methods
https://reviewboard.mozilla.org/r/258756/#review266002
Attachment #8994141 -
Flags: review?(m_kato) → review+
Comment 33•6 years ago
|
||
mozreview-review |
Comment on attachment 8994142 [details]
Bug 1476897 - part 7: Drop nsIEditorMailSupport interface from TextEditor
https://reviewboard.mozilla.org/r/258758/#review266004
Attachment #8994142 -
Flags: review?(m_kato) → review+
Comment 34•6 years ago
|
||
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/07d193decac0
part 1: Implement nsIEditorMailSupport in HTMLEditor since it's never used with TextEditor instance r=m_kato
https://hg.mozilla.org/integration/autoland/rev/39ff01e6d729
part 2: Make TextEditor::GetEmbeddedObjects() just return NS_ERROR_NOT_IMPLEMENTED since it's never used r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e8d209654ba4
part 3: Make TextEditor::InsertAsCitedQuotation() return NS_ERROR_NOT_IMPLEMENTED since nobody uses this method with TextEditor instances r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e5c9e728940a
part 4: Make TextEditor::InsertTextWithQuotations() returns NS_ERROR_NOT_IMPLEMENTED since it's never used r=m_kato
https://hg.mozilla.org/integration/autoland/rev/2356492fb27c
part 5: Move implementation of TextEditor::InsertAsQuotation() to new method r=m_kato
https://hg.mozilla.org/integration/autoland/rev/62e18ecb29ea
part 6: Move implementation of both TextEditor::PasteAsQuotation() and HTMLEditor::PasteAsQuotation() to new virtual methods r=m_kato
https://hg.mozilla.org/integration/autoland/rev/2c8b3ee07751
part 7: Drop nsIEditorMailSupport interface from TextEditor r=m_kato
Comment 35•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/07d193decac0
https://hg.mozilla.org/mozilla-central/rev/39ff01e6d729
https://hg.mozilla.org/mozilla-central/rev/e8d209654ba4
https://hg.mozilla.org/mozilla-central/rev/e5c9e728940a
https://hg.mozilla.org/mozilla-central/rev/2356492fb27c
https://hg.mozilla.org/mozilla-central/rev/62e18ecb29ea
https://hg.mozilla.org/mozilla-central/rev/2c8b3ee07751
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment 36•6 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #28)
> (but we should move GetEmbeddedObjects to c-c since it doesn't depend on
> editor code.)
I file as bug 1478546
Assignee | ||
Updated•5 years ago
|
Blocks: redesign-editor-scriptable-API
You need to log in
before you can comment on or make changes to this bug.
Description
•