Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fdf676ac
Commit
fdf676ac
authored
Jun 19, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Initialize node object from child node's constructors.
parent
bb1190a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
25 deletions
+33
-25
htmlcomment.c
dlls/mshtml/htmlcomment.c
+2
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+5
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+20
-18
htmltextnode.c
dlls/mshtml/htmltextnode.c
+2
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-3
No files found.
dlls/mshtml/htmlcomment.c
View file @
fdf676ac
...
...
@@ -190,7 +190,7 @@ static dispex_static_data_t HTMLCommentElement_dispex = {
HTMLCommentElement_iface_tids
};
HTMLElement
*
HTMLCommentElement_Create
(
nsIDOMNode
*
nsnode
)
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
{
HTMLCommentElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
...
...
@@ -199,6 +199,7 @@ HTMLElement *HTMLCommentElement_Create(nsIDOMNode *nsnode)
init_dispex
(
&
ret
->
element
.
node
.
dispex
,
(
IUnknown
*
)
HTMLCOMMENT
(
ret
),
&
HTMLCommentElement_dispex
);
HTMLElement_Init
(
&
ret
->
element
);
HTMLDOMNode_Init
(
doc
,
&
ret
->
element
.
node
,
nsnode
);
return
&
ret
->
element
;
}
dlls/mshtml/htmlelem.c
View file @
fdf676ac
...
...
@@ -1388,7 +1388,7 @@ void HTMLElement_Init(HTMLElement *This)
init_dispex
(
&
This
->
node
.
dispex
,
(
IUnknown
*
)
HTMLELEM
(
This
),
&
HTMLElement_dispex
);
}
HTMLElement
*
HTMLElement_Create
(
nsIDOMNode
*
nsnode
)
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
{
nsIDOMHTMLElement
*
nselem
;
HTMLElement
*
ret
=
NULL
;
...
...
@@ -1438,11 +1438,14 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
ret
=
heap_alloc_zero
(
sizeof
(
HTMLElement
));
HTMLElement_Init
(
ret
);
ret
->
node
.
vtbl
=
&
HTMLElementImplVtbl
;
}
}
TRACE
(
"%s ret %p
\n
"
,
debugstr_w
(
class_name
),
ret
);
nsAString_Finish
(
&
class_name_str
);
ret
->
nselem
=
nselem
;
HTMLDOMNode_Init
(
doc
,
&
ret
->
node
,
(
nsIDOMNode
*
)
nselem
);
return
ret
;
}
...
...
dlls/mshtml/htmlnode.c
View file @
fdf676ac
...
...
@@ -705,6 +705,20 @@ static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
HTMLDOMNode_destructor
};
void
HTMLDOMNode_Init
(
HTMLDocument
*
doc
,
HTMLDOMNode
*
node
,
nsIDOMNode
*
nsnode
)
{
node
->
lpHTMLDOMNodeVtbl
=
&
HTMLDOMNodeVtbl
;
node
->
lpHTMLDOMNode2Vtbl
=
&
HTMLDOMNode2Vtbl
;
node
->
ref
=
1
;
node
->
doc
=
doc
;
nsIDOMNode_AddRef
(
nsnode
);
node
->
nsnode
=
nsnode
;
node
->
next
=
doc
->
nodes
;
doc
->
nodes
=
node
;
}
static
HTMLDOMNode
*
create_node
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
{
HTMLDOMNode
*
ret
;
...
...
@@ -714,27 +728,20 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
switch
(
node_type
)
{
case
ELEMENT_NODE
:
ret
=
&
HTMLElement_Create
(
nsnode
)
->
node
;
ret
=
&
HTMLElement_Create
(
doc
,
nsnode
)
->
node
;
break
;
case
TEXT_NODE
:
ret
=
HTMLDOMTextNode_Create
(
nsnode
);
ret
=
HTMLDOMTextNode_Create
(
doc
,
nsnode
);
break
;
case
COMMENT_NODE
:
ret
=
&
HTMLCommentElement_Create
(
nsnode
)
->
node
;
ret
=
&
HTMLCommentElement_Create
(
doc
,
nsnode
)
->
node
;
break
;
default:
ret
=
heap_alloc_zero
(
sizeof
(
HTMLDOMNode
));
ret
->
vtbl
=
&
HTMLDOMNodeImplVtbl
;
HTMLDOMNode_Init
(
doc
,
ret
,
nsnode
);
}
ret
->
lpHTMLDOMNodeVtbl
=
&
HTMLDOMNodeVtbl
;
ret
->
lpHTMLDOMNode2Vtbl
=
&
HTMLDOMNode2Vtbl
;
ret
->
ref
=
1
;
ret
->
doc
=
doc
;
nsIDOMNode_AddRef
(
nsnode
);
ret
->
nsnode
=
nsnode
;
TRACE
(
"type %d ret %p
\n
"
,
node_type
,
ret
);
return
ret
;
...
...
@@ -748,7 +755,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
HTMLDOMNode
*
get_node
(
HTMLDocument
*
This
,
nsIDOMNode
*
nsnode
,
BOOL
create
)
{
HTMLDOMNode
*
iter
=
This
->
nodes
,
*
ret
;
HTMLDOMNode
*
iter
=
This
->
nodes
;
while
(
iter
)
{
if
(
iter
->
nsnode
==
nsnode
)
...
...
@@ -759,12 +766,7 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode, BOOL create)
if
(
iter
||
!
create
)
return
iter
;
ret
=
create_node
(
This
,
nsnode
);
ret
->
next
=
This
->
nodes
;
This
->
nodes
=
ret
;
return
ret
;
return
create_node
(
This
,
nsnode
);
}
void
release_nodes
(
HTMLDocument
*
This
)
...
...
dlls/mshtml/htmltextnode.c
View file @
fdf676ac
...
...
@@ -198,7 +198,7 @@ static dispex_static_data_t HTMLDOMTextNode_dispex = {
HTMLDOMTextNode_iface_tids
};
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
nsIDOMNode
*
nsnode
)
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
*
doc
,
nsIDOMNode
*
nsnode
)
{
HTMLDOMTextNode
*
ret
;
...
...
@@ -207,6 +207,7 @@ HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode)
ret
->
lpIHTMLDOMTextNodeVtbl
=
&
HTMLDOMTextNodeVtbl
;
init_dispex
(
&
ret
->
node
.
dispex
,
(
IUnknown
*
)
HTMLTEXT
(
ret
),
&
HTMLDOMTextNode_dispex
);
HTMLDOMNode_Init
(
doc
,
&
ret
->
node
,
nsnode
);
return
&
ret
->
node
;
}
dlls/mshtml/mshtml_private.h
View file @
fdf676ac
...
...
@@ -519,10 +519,10 @@ IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetLis
void
detach_selection
(
HTMLDocument
*
);
void
detach_ranges
(
HTMLDocument
*
);
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
nsIDOMNode
*
);
HTMLDOMNode
*
HTMLDOMTextNode_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLElement_Create
(
nsIDOMNode
*
);
HTMLElement
*
HTMLCommentElement_Create
(
nsIDOMNode
*
);
HTMLElement
*
HTMLElement_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLImgElement_Create
(
nsIDOMHTMLElement
*
);
...
...
@@ -533,6 +533,7 @@ HTMLElement *HTMLSelectElement_Create(nsIDOMHTMLElement*);
HTMLElement
*
HTMLTable_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLTextAreaElement_Create
(
nsIDOMHTMLElement
*
);
void
HTMLDOMNode_Init
(
HTMLDocument
*
,
HTMLDOMNode
*
,
nsIDOMNode
*
);
void
HTMLElement_Init
(
HTMLElement
*
);
void
HTMLElement2_Init
(
HTMLElement
*
);
void
HTMLTextContainer_Init
(
HTMLTextContainer
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment