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
878b8582
Commit
878b8582
authored
Oct 11, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved creating HTML element to separated function.
parent
62c0c7b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
13 deletions
+20
-13
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-13
htmlelem.c
dlls/mshtml/htmlelem.c
+18
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
878b8582
...
...
@@ -1033,24 +1033,12 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
IHTMLElement
**
newElem
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
HTMLDocumentNode
*
doc_node
;
nsIDOMHTMLElement
*
nselem
;
HTMLElement
*
elem
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
eTag
),
newElem
);
/* Use owner doc if called on document fragment */
doc_node
=
This
->
doc_node
;
if
(
!
doc_node
->
nsdoc
)
doc_node
=
doc_node
->
node
.
doc
;
hres
=
create_nselem
(
doc_node
,
eTag
,
&
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
HTMLElement_Create
(
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
elem
);
nsIDOMHTMLElement_Release
(
nselem
);
hres
=
create_element
(
This
->
doc_node
,
eTag
,
&
elem
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/mshtml/htmlelem.c
View file @
878b8582
...
...
@@ -199,6 +199,24 @@ HRESULT create_nselem(HTMLDocumentNode *doc, const WCHAR *tag, nsIDOMHTMLElement
return
S_OK
;
}
HRESULT
create_element
(
HTMLDocumentNode
*
doc
,
const
WCHAR
*
tag
,
HTMLElement
**
ret
)
{
nsIDOMHTMLElement
*
nselem
;
HRESULT
hres
;
/* Use owner doc if called on document fragment */
if
(
!
doc
->
nsdoc
)
doc
=
doc
->
node
.
doc
;
hres
=
create_nselem
(
doc
,
tag
,
&
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
HTMLElement_Create
(
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
ret
);
nsIDOMHTMLElement_Release
(
nselem
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLElement_QueryInterface
(
IHTMLElement
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
dlls/mshtml/mshtml_private.h
View file @
878b8582
...
...
@@ -838,6 +838,7 @@ HRESULT get_node_text(HTMLDOMNode*,BSTR*) DECLSPEC_HIDDEN;
HRESULT
replace_node_by_html
(
nsIDOMHTMLDocument
*
,
nsIDOMNode
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_nselem
(
HTMLDocumentNode
*
,
const
WCHAR
*
,
nsIDOMHTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_element
(
HTMLDocumentNode
*
,
const
WCHAR
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLDOMTextNode_Create
(
HTMLDocumentNode
*
,
nsIDOMNode
*
,
HTMLDOMNode
**
)
DECLSPEC_HIDDEN
;
...
...
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