Closed
Bug 156554
Opened 23 years ago
Closed 23 years ago
Make nsRange QI directly
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: caillon, Assigned: caillon)
Details
Attachments
(1 file)
|
4.83 KB,
patch
|
sicking
:
review+
caillon
:
superreview+
|
Details | Diff | Splinter Review |
Right now there are silly helper functions that nsRange uses to do QIs. We
should just remove those and QI directly.
| Assignee | ||
Comment 1•23 years ago
|
||
Comment on attachment 90682 [details] [diff] [review]
Simple patch.
> if (theRange)
> {
>- nsCOMPtr<nsIDOMNode> domNode;
>- res = GetDOMNodeFromContent(cN, address_of(domNode));
>+ nsCOMPtr<nsIDOMNode> domNode(do_QueryInterface(cN));
> NS_POSTCONDITION(NS_SUCCEEDED(res), "error updating range
> NS_POSTCONDITION(domNode, "error updating range list");
you should either use do_QueryInterface(cN, res) or remove the first
postcondition. I'd prefer the latter.
>@@ -2463,16 +2438,11 @@
>
> nsCOMPtr<nsIContent> parent( do_QueryInterface(aParentNode) );
> nsCOMPtr<nsIContent> replaced( do_QueryInterface(aReplacedNode) );
>- nsCOMPtr<nsIDOMNode> parentDomNode;
>- nsresult res;
>-
>- res = GetDOMNodeFromContent(parent, address_of(parentDomNode));
>- if (NS_FAILED(res)) return res;
>+ nsCOMPtr<nsIDOMNode> parentDomNode( do_QueryInterface(parent) );
what's up with the extra spaces?
r=sicking
Attachment #90682 -
Flags: review+
| Assignee | ||
Comment 3•23 years ago
|
||
Comment on attachment 90682 [details] [diff] [review]
Simple patch.
Ben says sr=ben
Attachment #90682 -
Flags: superreview+
| Assignee | ||
Comment 4•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•