Closed Bug 1191354 Opened 4 years ago Closed 3 years ago

Clean up nsHTMLEditRules::GetHighestInlineParent, CheckInterlinePosition, InsertMozBRIfNeeded, etc.

Categories

(Core :: Editor, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: ayg, Assigned: ayg)

References

Details

Attachments

(13 files, 14 obsolete files)

4.63 KB, patch
Details | Diff | Splinter Review
5.36 KB, patch
Details | Diff | Splinter Review
4.41 KB, patch
Details | Diff | Splinter Review
7.69 KB, patch
Details | Diff | Splinter Review
5.33 KB, patch
Details | Diff | Splinter Review
21.06 KB, patch
Details | Diff | Splinter Review
8.67 KB, patch
Details | Diff | Splinter Review
69.10 KB, patch
Details | Diff | Splinter Review
8.22 KB, patch
Details | Diff | Splinter Review
1.67 KB, patch
Details | Diff | Splinter Review
21.42 KB, patch
Details | Diff | Splinter Review
12.25 KB, patch
Details | Diff | Splinter Review
8.48 KB, patch
Details | Diff | Splinter Review
No description provided.
Flags: in-testsuite-
Attachment #8644377 - Flags: review?(nfroyd) → review+
Attachment #8644357 - Flags: review?(ehsan) → review+
Comment on attachment 8644359 [details] [diff] [review]
Part 2 -- Clean up nsHTMLEditRules::CheckInterlinePosition

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

::: editor/libeditor/nsHTMLEditRules.cpp
@@ +7177,3 @@
>    }
>  
> +  NS_ENSURE_TRUE(mHTMLEditor, );

NS_ENSURE_TRUE_VOID, as before.  Here and elsewhere in all other patches.
Attachment #8644359 - Flags: review?(ehsan) → review+
Attachment #8644360 - Flags: review?(ehsan) → review+
Comment on attachment 8644362 [details] [diff] [review]
Part 4 -- Clean up nsHTMLEditRules::AlignBlock

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

::: editor/libeditor/nsHTMLEditRules.cpp
@@ +8353,5 @@
> +  nsCOMPtr<nsIEditor> kungFuDeathGrip(mHTMLEditor);
> +
> +  nsresult res = RemoveAlignment(aElement.AsDOMNode(), aAlignType,
> +                                 aContentsOnly == ContentsOnly::yes ? true
> +                                                                    : false);

Just aContentsOnly == ContentsOnly::yes is enough.
Attachment #8644362 - Flags: review?(ehsan) → review+
Comment on attachment 8644371 [details] [diff] [review]
Part 5 -- Clean up nsHTMLEditRules::IsEmptyInline

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

::: editor/libeditor/nsHTMLEditRules.cpp
@@ +7658,5 @@
> +  NS_ENSURE_TRUE(mHTMLEditor, false);
> +  nsCOMPtr<nsIEditor> kungFuDeathGrip(mHTMLEditor);
> +
> +  if (IsInlineNode(aNode.AsDOMNode()) && mHTMLEditor->IsContainer(&aNode)) {
> +    bool isEmpty;

Please initialize to true.
Attachment #8644371 - Flags: review?(ehsan) → review+
Attachment #8644372 - Flags: review?(ehsan) → review+
Attachment #8644374 - Flags: review?(ehsan) → review+
Attachment #8644375 - Flags: review?(ehsan) → review+
Attachment #8644376 - Flags: review?(ehsan) → review+
Attachment #8644378 - Flags: review?(ehsan) → review+
Attachment #8644379 - Flags: review?(ehsan) → review+
Attachment #8644380 - Flags: review?(ehsan) → review+
Attached patch Part 2 updatedSplinter Review
Attachment #8644359 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.