The default bug view has changed. See this FAQ.

Duplicated code: nsHTMLEditor::CreateBRImpl / nsPlaintextEditor::CreateBRImpl

RESOLVED FIXED in mozilla13

Status

()

Core
Editor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Assignee)

Description

5 years ago
Created attachment 591411 [details] [diff] [review]
Patch v1

As in 2001: bug 68747.
Attachment #591411 - Flags: review?(ehsan)
(Assignee)

Comment 1

5 years ago
Created attachment 591412 [details] [diff] [review]
Diff

Difference between the implementations.
(Assignee)

Comment 2

5 years ago
Created attachment 591413 [details] [diff] [review]
Part b: InsertBR

Two for the price of one
Attachment #591413 - Flags: review?(ehsan)
(Assignee)

Comment 3

5 years ago
Created attachment 591414 [details] [diff] [review]
Diff b
Comment on attachment 591411 [details] [diff] [review]
Patch v1

Review of attachment 591411 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the below.

::: editor/libeditor/html/nsHTMLEditor.cpp
@@ +1386,5 @@
>                                           nsCOMPtr<nsIDOMNode> *outBRNode, 
>                                           EDirection aSelect)
>  {
> +  return nsPlaintextEditor::CreateBRImpl(aInOutParent, aInOutOffset, outBRNode,
> +                                         aSelect);

Why not just remove this function altogether?  :-)
Attachment #591411 - Flags: review?(ehsan) → review+
Comment on attachment 591413 [details] [diff] [review]
Part b: InsertBR

Review of attachment 591413 [details] [diff] [review]:
-----------------------------------------------------------------

::: editor/libeditor/html/nsHTMLEditor.cpp
@@ +1399,5 @@
>  }
>  
>  NS_IMETHODIMP nsHTMLEditor::InsertBR(nsCOMPtr<nsIDOMNode> *outBRNode)
>  {
> +  return nsPlaintextEditor::InsertBR(outBRNode);

Again, please just remove this method!
Attachment #591413 - Flags: review?(ehsan) → review+
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d2fb1257034b
https://hg.mozilla.org/mozilla-central/rev/1e927f5cc830
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.