Closed Bug 720982 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(4 files)

Attached patch Patch v1Splinter Review
As in 2001: bug 68747.
Attachment #591411 - Flags: review?(ehsan)
Attached patch DiffSplinter Review
Difference between the implementations.
Attached patch Part b: InsertBRSplinter Review
Two for the price of one
Attachment #591413 - Flags: review?(ehsan)
Attached patch Diff bSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/d2fb1257034b
https://hg.mozilla.org/mozilla-central/rev/1e927f5cc830
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: