Closed
Bug 1416080
Opened 8 years ago
Closed 8 years ago
Don't use virtual function for CreateBR
Categories
(Core :: DOM: Editor, enhancement, P3)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: m_kato, Assigned: m_kato)
Details
Attachments
(2 files)
No description provided.
| Assignee | ||
Updated•8 years ago
|
Priority: -- → P3
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8932026 [details]
Bug 1416080 - Part 1. Move all CreateBR methods to TextEditor.
https://reviewboard.mozilla.org/r/203094/#review208400
Attachment #8932026 -
Flags: review?(masayuki) → review+
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8932027 [details]
Bug 1416080 - Part 2. CreateMozBR should use native dom node.
https://reviewboard.mozilla.org/r/203096/#review208402
::: editor/libeditor/TextEditRules.cpp:1631
(Diff revision 1)
> -TextEditRules::CreateBRInternal(nsIDOMNode* inParent,
> +TextEditRules::CreateBRInternal(nsINode& inParent,
> int32_t inOffset,
> bool aMozBR,
> - nsIDOMNode** outBRNode)
> + Element** aOutBRElement)
> {
> - NS_ENSURE_TRUE(inParent, NS_ERROR_NULL_POINTER);
> -
> - nsCOMPtr<nsIDOMNode> brNode;
> NS_ENSURE_STATE(mTextEditor);
> - nsresult rv = mTextEditor->CreateBR(inParent, inOffset, address_of(brNode));
> + RefPtr<Element> brElem = mTextEditor->CreateBR(&inParent, inOffset);
Could you make this method hold mTextEditor with local variable and use it instead of mTextEditor in this method? CreateBR() may be intercepted by mutation observers.
Attachment #8932027 -
Flags: review?(masayuki) → review+
| Comment hidden (mozreview-request) |
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/971d5eac56e4
Part 1. Move all CreateBR methods to TextEditor. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/70581f6aeb1d
Part 2. CreateMozBR should use native dom node. r=masayuki
Comment 7•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/971d5eac56e4
https://hg.mozilla.org/mozilla-central/rev/70581f6aeb1d
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•