Skip to content

Commit 1d8f39e

Browse files
committed
Bug 1455676 part 12. Remove use of nsIDOMNode from xpcom/. r=qdot
1 parent 5fa76e7 commit 1d8f39e

File tree

5 files changed

+44
-44
lines changed

5 files changed

+44
-44
lines changed

xpcom/tests/SizeTest01.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Test01.cpp
22

3-
#include "nsIDOMNode.h"
3+
#include "nsINode.h"
44
#include "nsCOMPtr.h"
55
#include "nsString.h"
66

7-
NS_DEF_PTR(nsIDOMNode);
7+
NS_DEF_PTR(nsINode);
88

99
/*
1010
This test file compares the generated code size of similar functions between raw
@@ -40,7 +40,7 @@ NS_DEF_PTR(nsIDOMNode);
4040
*/
4141

4242
void
43-
Test01_raw( nsIDOMNode* aDOMNode, nsString* aResult )
43+
Test01_raw( nsINode* aDOMNode, nsString* aResult )
4444
// m140, w34
4545
{
4646
/*
@@ -49,7 +49,7 @@ Test01_raw( nsIDOMNode* aDOMNode, nsString* aResult )
4949
one of them is |nullptr|. Similarly: |Test01_nsCOMPtr00|, and |Test01_nsIPtr00|.
5050
*/
5151

52-
nsIDOMNode* node = aDOMNode;
52+
nsINode* node = aDOMNode;
5353
NS_IF_ADDREF(node);
5454

5555
if ( node )
@@ -59,7 +59,7 @@ Test01_raw( nsIDOMNode* aDOMNode, nsString* aResult )
5959
}
6060

6161
void
62-
Test01_raw_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
62+
Test01_raw_optimized( nsINode* aDOMNode, nsString* aResult )
6363
// m112, w31
6464
{
6565
/*
@@ -79,29 +79,29 @@ Test01_raw_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
7979
// if ( !aDOMNode )
8080
// return;
8181

82-
nsIDOMNode* node = aDOMNode;
82+
nsINode* node = aDOMNode;
8383
NS_ADDREF(node);
8484
node->GetNodeName(*aResult);
8585
NS_RELEASE(node);
8686
}
8787

8888
void
89-
Test01_nsCOMPtr( nsIDOMNode* aDOMNode, nsString* aResult )
89+
Test01_nsCOMPtr( nsINode* aDOMNode, nsString* aResult )
9090
// m120, w46/34
9191
{
92-
nsCOMPtr<nsIDOMNode> node = aDOMNode;
92+
nsCOMPtr<nsINode> node = aDOMNode;
9393

9494
if ( node )
9595
node->GetNodeName(*aResult);
9696
}
9797

9898
void
99-
Test01_nsCOMPtr_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
99+
Test01_nsCOMPtr_optimized( nsINode* aDOMNode, nsString* aResult )
100100
// m112, w42/38
101101
{
102102
// if ( !aDOMNode )
103103
// return;
104104

105-
nsCOMPtr<nsIDOMNode> node = aDOMNode;
105+
nsCOMPtr<nsINode> node = aDOMNode;
106106
node->GetNodeName(*aResult);
107107
}

xpcom/tests/SizeTest02.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Test02.cpp
22

3-
#include "nsIDOMNode.h"
3+
#include "nsINode.h"
44
#include "nsCOMPtr.h"
55
#include "nsString.h"
66

7-
NS_DEF_PTR(nsIDOMNode);
7+
NS_DEF_PTR(nsINode);
88

99
/*
1010
This test file compares the generated code size of similar functions between raw
@@ -44,8 +44,8 @@ Test02_Raw00( nsISupports* aDOMNode, nsString* aResult )
4444
// if ( !aDOMNode )
4545
// return NS_ERROR_NULL_POINTER;
4646

47-
nsIDOMNode* node = 0;
48-
nsresult status = aDOMNode->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)&node);
47+
nsINode* node = 0;
48+
nsresult status = aDOMNode->QueryInterface(NS_GET_IID(nsINode), (void**)&node);
4949
if ( NS_SUCCEEDED(status) )
5050
{
5151
node->GetNodeName(*aResult);
@@ -63,8 +63,8 @@ Test02_Raw01( nsISupports* aDOMNode, nsString* aResult )
6363
// if ( !aDOMNode )
6464
// return NS_ERROR_NULL_POINTER;
6565

66-
nsIDOMNode* node;
67-
nsresult status = aDOMNode->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)&node);
66+
nsINode* node;
67+
nsresult status = aDOMNode->QueryInterface(NS_GET_IID(nsINode), (void**)&node);
6868
if ( NS_SUCCEEDED(status) )
6969
{
7070
node->GetNodeName(*aResult);
@@ -79,7 +79,7 @@ Test02_nsCOMPtr( nsISupports* aDOMNode, nsString* aResult )
7979
// m120, w63/68
8080
{
8181
nsresult status;
82-
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aDOMNode, &status);
82+
nsCOMPtr<nsINode> node = do_QueryInterface(aDOMNode, &status);
8383

8484
if ( node )
8585
node->GetNodeName(*aResult);

xpcom/tests/SizeTest03.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Test03.cpp
22

3-
#include "nsIDOMNode.h"
3+
#include "nsINode.h"
44
#include "nsCOMPtr.h"
55
#include "nsString.h"
66

7-
NS_DEF_PTR(nsIDOMNode);
7+
NS_DEF_PTR(nsINode);
88

99
/*
1010
Windows:
@@ -22,7 +22,7 @@ NS_DEF_PTR(nsIDOMNode);
2222
*/
2323

2424
void // nsresult
25-
Test03_raw( nsIDOMNode* aDOMNode, nsString* aResult )
25+
Test03_raw( nsINode* aDOMNode, nsString* aResult )
2626
// m140, w62
2727
{
2828
// -- the following code is assumed, but is commented out so we compare only
@@ -31,7 +31,7 @@ Test03_raw( nsIDOMNode* aDOMNode, nsString* aResult )
3131
// if ( !aDOMNode || !aResult )
3232
// return NS_ERROR_NULL_POINTER;
3333

34-
nsIDOMNode* parent = 0;
34+
nsINode* parent = 0;
3535
nsresult status = aDOMNode->GetParentNode(&parent);
3636

3737
if ( NS_SUCCEEDED(status) )
@@ -46,13 +46,13 @@ Test03_raw( nsIDOMNode* aDOMNode, nsString* aResult )
4646

4747

4848
void // nsresult
49-
Test03_raw_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
49+
Test03_raw_optimized( nsINode* aDOMNode, nsString* aResult )
5050
// m124, w48
5151
{
5252
// if ( !aDOMNode || !aResult )
5353
// return NS_ERROR_NULL_POINTER;
5454

55-
nsIDOMNode* parent;
55+
nsINode* parent;
5656
nsresult status = aDOMNode->GetParentNode(&parent);
5757

5858
if ( NS_SUCCEEDED(status) )
@@ -66,13 +66,13 @@ Test03_raw_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
6666

6767

6868
void // nsresult
69-
Test03_nsCOMPtr( nsIDOMNode* aDOMNode, nsString* aResult )
69+
Test03_nsCOMPtr( nsINode* aDOMNode, nsString* aResult )
7070
// m144, w54/59
7171
{
7272
// if ( !aDOMNode || !aResult )
7373
// return NS_ERROR_NULL_POINTER;
7474

75-
nsCOMPtr<nsIDOMNode> parent;
75+
nsCOMPtr<nsINode> parent;
7676
nsresult status = aDOMNode->GetParentNode( getter_AddRefs(parent) );
7777
if ( parent )
7878
parent->GetNodeName(*aResult);
@@ -81,15 +81,15 @@ Test03_nsCOMPtr( nsIDOMNode* aDOMNode, nsString* aResult )
8181
}
8282

8383
void // nsresult
84-
Test03_nsCOMPtr_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
84+
Test03_nsCOMPtr_optimized( nsINode* aDOMNode, nsString* aResult )
8585
// m112, w50/45
8686
{
8787
// if ( !aDOMNode || !aResult )
8888
// return NS_ERROR_NULL_POINTER;
8989

90-
nsIDOMNode* temp;
90+
nsINode* temp;
9191
nsresult status = aDOMNode->GetParentNode(&temp);
92-
nsCOMPtr<nsIDOMNode> parent( dont_AddRef(temp) );
92+
nsCOMPtr<nsINode> parent( dont_AddRef(temp) );
9393
if ( parent )
9494
parent->GetNodeName(*aResult);
9595

xpcom/tests/SizeTest04.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Test04.cpp
22

3-
#include "nsIDOMNode.h"
3+
#include "nsINode.h"
44
#include "nsCOMPtr.h"
55

6-
NS_DEF_PTR(nsIDOMNode);
6+
NS_DEF_PTR(nsINode);
77

88
/*
99
Windows:
@@ -21,10 +21,10 @@ class Test04_Raw
2121
Test04_Raw();
2222
~Test04_Raw();
2323

24-
void /*nsresult*/ SetNode( nsIDOMNode* newNode );
24+
void /*nsresult*/ SetNode( nsINode* newNode );
2525

2626
private:
27-
nsIDOMNode* mNode;
27+
nsINode* mNode;
2828
};
2929

3030
Test04_Raw::Test04_Raw()
@@ -39,7 +39,7 @@ Test04_Raw::~Test04_Raw()
3939
}
4040

4141
void // nsresult
42-
Test04_Raw::SetNode( nsIDOMNode* newNode )
42+
Test04_Raw::SetNode( nsINode* newNode )
4343
// m120, w36
4444
{
4545
NS_IF_ADDREF(newNode);
@@ -54,14 +54,14 @@ Test04_Raw::SetNode( nsIDOMNode* newNode )
5454
class Test04_nsCOMPtr
5555
{
5656
public:
57-
void /*nsresult*/ SetNode( nsIDOMNode* newNode );
57+
void /*nsresult*/ SetNode( nsINode* newNode );
5858

5959
private:
60-
nsCOMPtr<nsIDOMNode> mNode;
60+
nsCOMPtr<nsINode> mNode;
6161
};
6262

6363
void // nsresult
64-
Test04_nsCOMPtr::SetNode( nsIDOMNode* newNode )
64+
Test04_nsCOMPtr::SetNode( nsINode* newNode )
6565
// m36, w13/13
6666
{
6767
mNode = newNode;

xpcom/tests/SizeTest05.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Test05.cpp
22

3-
#include "nsIDOMNode.h"
3+
#include "nsINode.h"
44
#include "nsCOMPtr.h"
55

6-
NS_DEF_PTR(nsIDOMNode);
6+
NS_DEF_PTR(nsINode);
77

88
/*
99
Windows:
@@ -19,10 +19,10 @@ class Test05_Raw
1919
Test05_Raw();
2020
~Test05_Raw();
2121

22-
void /*nsresult*/ GetNode( nsIDOMNode** aNode );
22+
void /*nsresult*/ GetNode( nsINode** aNode );
2323

2424
private:
25-
nsIDOMNode* mNode;
25+
nsINode* mNode;
2626
};
2727

2828
Test05_Raw::Test05_Raw()
@@ -37,7 +37,7 @@ Test05_Raw::~Test05_Raw()
3737
}
3838

3939
void // nsresult
40-
Test05_Raw::GetNode( nsIDOMNode** aNode )
40+
Test05_Raw::GetNode( nsINode** aNode )
4141
// m64, w21
4242
{
4343
// if ( !aNode )
@@ -54,14 +54,14 @@ Test05_Raw::GetNode( nsIDOMNode** aNode )
5454
class Test05_nsCOMPtr
5555
{
5656
public:
57-
void /*nsresult*/ GetNode( nsIDOMNode** aNode );
57+
void /*nsresult*/ GetNode( nsINode** aNode );
5858

5959
private:
60-
nsCOMPtr<nsIDOMNode> mNode;
60+
nsCOMPtr<nsINode> mNode;
6161
};
6262

6363
void // nsresult
64-
Test05_nsCOMPtr::GetNode( nsIDOMNode** aNode )
64+
Test05_nsCOMPtr::GetNode( nsINode** aNode )
6565
// m64, w21
6666
{
6767
// if ( !aNode )

0 commit comments

Comments
 (0)