Closed
Bug 718170
Opened 13 years ago
Closed 13 years ago
Use nsINode in IsEmptyNodeImpl/IsVisTextNode/IsEmptyCell
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: Ms2ger, Assigned: Ms2ger)
Details
Attachments
(3 files)
20.73 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
13.64 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
5.09 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #588611 -
Flags: review?(ehsan)
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #588612 -
Flags: review?(ehsan)
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #588613 -
Flags: review?(ehsan)
Updated•13 years ago
|
Attachment #588611 -
Flags: review?(ehsan) → review+
Comment 3•13 years ago
|
||
Comment on attachment 588612 [details] [diff] [review]
Part b: IsVisTextNode
Review of attachment 588612 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/public/nsISelectionController.idl
@@ +50,5 @@
> interface nsIDOMNode;
> interface nsISelection;
> interface nsISelectionDisplay;
>
> [scriptable, uuid(cf30315f-b65d-44c3-8c57-557e36d18fd2)]
Rev the uuid please.
::: editor/libeditor/html/nsHTMLEditRules.cpp
@@ +2443,5 @@
> arrayOfNodes.RemoveObjectAt(0);
> // If something visible is deleted, no need to join.
> // Visible means all nodes except non-visible textnodes and breaks.
> if (join && origCollapsed) {
> + nsCOMPtr<nsINode> node = do_QueryInterface(somenode);
Couldn't you cast directly to nsIContent?
Attachment #588612 -
Flags: review?(ehsan) → review+
Updated•13 years ago
|
Attachment #588613 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 4•13 years ago
|
||
nsCOMPtr<nsIContent> content = do_QueryInterface(somenode);
if (!content) {
join = false;
} else if (content->NodeType() == nsIDOMNode::TEXT_NODE) {
mHTMLEditor->IsVisTextNode(content,
&join, true);
} else {
join = content->AsElement()->IsHTML(nsGkAtoms::br) &&
!mHTMLEditor->IsVisBreak(somenode);
}
then?
Assignee | ||
Comment 5•13 years ago
|
||
s/AsElement()->//
Comment 6•13 years ago
|
||
Yes!
Assignee | ||
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/46fce3248ec9
https://hg.mozilla.org/mozilla-central/rev/677e38a3838c
https://hg.mozilla.org/mozilla-central/rev/70991ab26e20
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in
before you can comment on or make changes to this bug.
Description
•