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
fbe98458
Commit
fbe98458
authored
Aug 11, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_outerHTML implementation.
parent
60db5eda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
htmlelem.c
dlls/mshtml/htmlelem.c
+20
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
nsembed.c
dlls/mshtml/nsembed.c
+14
-12
No files found.
dlls/mshtml/htmlelem.c
View file @
fbe98458
...
...
@@ -931,8 +931,26 @@ static HRESULT WINAPI HTMLElement_put_outerHTML(IHTMLElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLElement_get_outerHTML
(
IHTMLElement
*
iface
,
BSTR
*
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
html_str
;
HRESULT
hres
;
WARN
(
"(%p)->(%p) semi-stub
\n
"
,
This
,
p
);
nsAString_Init
(
&
html_str
,
NULL
);
hres
=
nsnode_to_nsstring
(
This
->
node
.
nsnode
,
&
html_str
);
if
(
SUCCEEDED
(
hres
))
{
const
PRUnichar
*
html
;
nsAString_GetData
(
&
html_str
,
&
html
);
*
p
=
SysAllocString
(
html
);
if
(
!*
p
)
hres
=
E_OUTOFMEMORY
;
}
nsAString_Finish
(
&
html_str
);
TRACE
(
"ret %s
\n
"
,
debugstr_w
(
*
p
));
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_put_outerText
(
IHTMLElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/mshtml_private.h
View file @
fbe98458
...
...
@@ -562,7 +562,7 @@ void nsAString_Finish(nsAString*);
nsIInputStream
*
create_nsstream
(
const
char
*
,
PRInt32
);
nsICommandParams
*
create_nscommand_params
(
void
);
void
nsnode_to_nsstring
(
nsIDOMNode
*
,
nsAString
*
);
HRESULT
nsnode_to_nsstring
(
nsIDOMNode
*
,
nsAString
*
);
void
get_editor_controller
(
NSContainer
*
);
void
init_nsevents
(
NSContainer
*
);
void
add_nsevent_listener
(
NSContainer
*
,
LPCWSTR
);
...
...
dlls/mshtml/nsembed.c
View file @
fbe98458
...
...
@@ -633,7 +633,7 @@ nsresult get_nsinterface(nsISupports *iface, REFIID riid, void **ppv)
return
nsres
;
}
static
void
nsnode_to_nsstring_rec
(
nsIContentSerializer
*
serializer
,
nsIDOMNode
*
nsnode
,
nsAString
*
str
)
static
HRESULT
nsnode_to_nsstring_rec
(
nsIContentSerializer
*
serializer
,
nsIDOMNode
*
nsnode
,
nsAString
*
str
)
{
nsIDOMNodeList
*
node_list
=
NULL
;
PRBool
has_children
=
FALSE
;
...
...
@@ -645,7 +645,7 @@ static void nsnode_to_nsstring_rec(nsIContentSerializer *serializer, nsIDOMNode
nsres
=
nsIDOMNode_GetNodeType
(
nsnode
,
&
type
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetType failed: %08x
\n
"
,
nsres
);
return
;
return
E_FAIL
;
}
switch
(
type
)
{
...
...
@@ -711,35 +711,37 @@ static void nsnode_to_nsstring_rec(nsIContentSerializer *serializer, nsIDOMNode
nsIContentSerializer_AppendElementEnd
(
serializer
,
nselem
,
str
);
nsIDOMElement_Release
(
nselem
);
}
return
S_OK
;
}
void
nsnode_to_nsstring
(
nsIDOMNode
*
nsdoc
,
nsAString
*
str
)
HRESULT
nsnode_to_nsstring
(
nsIDOMNode
*
nsnode
,
nsAString
*
str
)
{
nsIContentSerializer
*
serializer
;
nsIDOMNode
*
nsnode
;
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIComponentManager_CreateInstanceByContractID
(
pCompMgr
,
NS_HTMLSERIALIZER_CONTRACTID
,
NULL
,
&
IID_nsIContentSerializer
,
(
void
**
)
&
serializer
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIContentSerializer: %08x
\n
"
,
nsres
);
return
;
return
E_FAIL
;
}
nsres
=
nsIContentSerializer_Init
(
serializer
,
0
,
100
,
NULL
,
FALSE
,
FALSE
/* FIXME */
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Init failed: %08x
\n
"
,
nsres
);
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMNode
,
(
void
**
)
&
nsnode
);
nsnode_to_nsstring_rec
(
serializer
,
nsnode
,
str
);
nsIDOMNode_Release
(
nsnode
);
nsres
=
nsIContentSerializer_Flush
(
serializer
,
str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Flush failed: %08x
\n
"
,
nsres
);
hres
=
nsnode_to_nsstring_rec
(
serializer
,
nsnode
,
str
);
if
(
SUCCEEDED
(
hres
))
{
nsres
=
nsIContentSerializer_Flush
(
serializer
,
str
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Flush failed: %08x
\n
"
,
nsres
);
}
nsIContentSerializer_Release
(
serializer
);
return
hres
;
}
void
get_editor_controller
(
NSContainer
*
This
)
...
...
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