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
7c1fa88c
Commit
7c1fa88c
authored
Mar 31, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::put_outerText implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca3178d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
3 deletions
+59
-3
htmlbody.c
dlls/mshtml/htmlbody.c
+13
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+45
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmlbody.c
View file @
7c1fa88c
...
...
@@ -25,6 +25,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtmdid.h"
#include "wine/debug.h"
...
...
@@ -838,6 +839,16 @@ static BOOL HTMLBodyElement_is_text_edit(HTMLDOMNode *iface)
return
TRUE
;
}
static
BOOL
HTMLBodyElement_is_settable
(
HTMLDOMNode
*
iface
,
DISPID
dispid
)
{
switch
(
dispid
)
{
case
DISPID_IHTMLELEMENT_OUTERTEXT
:
return
FALSE
;
default:
return
TRUE
;
}
}
static
const
cpc_entry_t
HTMLBodyElement_cpc
[]
=
{
{
&
DIID_HTMLTextContainerEvents
},
{
&
IID_IPropertyNotifySink
},
...
...
@@ -863,7 +874,8 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
NULL
,
HTMLBodyElement_traverse
,
HTMLBodyElement_unlink
,
HTMLBodyElement_is_text_edit
HTMLBodyElement_is_text_edit
,
HTMLBodyElement_is_settable
};
static
const
tid_t
HTMLBodyElement_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlelem.c
View file @
7c1fa88c
...
...
@@ -1552,8 +1552,51 @@ static HRESULT WINAPI HTMLElement_get_outerHTML(IHTMLElement *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLElement_put_outerText
(
IHTMLElement
*
iface
,
BSTR
v
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsIDOMText
*
text_node
;
nsIDOMRange
*
range
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
This
->
node
.
vtbl
->
is_settable
&&
!
This
->
node
.
vtbl
->
is_settable
(
&
This
->
node
,
DISPID_IHTMLELEMENT_OUTERTEXT
))
{
WARN
(
"Called on element that does not support setting the property.
\n
"
);
return
0x800a0258
;
/* undocumented error code */
}
if
(
!
This
->
node
.
doc
->
nsdoc
)
{
FIXME
(
"NULL nsdoc
\n
"
);
return
E_FAIL
;
}
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
node
.
doc
->
nsdoc
,
&
nsstr
,
&
text_node
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed
\n
"
);
return
E_FAIL
;
}
nsres
=
nsIDOMHTMLDocument_CreateRange
(
This
->
node
.
doc
->
nsdoc
,
&
range
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsres
=
nsIDOMRange_SelectNode
(
range
,
This
->
node
.
nsnode
);
if
(
NS_SUCCEEDED
(
nsres
))
nsres
=
nsIDOMRange_DeleteContents
(
range
);
if
(
NS_SUCCEEDED
(
nsres
))
nsres
=
nsIDOMRange_InsertNode
(
range
,
(
nsIDOMNode
*
)
text_node
);
if
(
NS_SUCCEEDED
(
nsres
))
nsres
=
nsIDOMRange_SelectNodeContents
(
range
,
This
->
node
.
nsnode
);
if
(
NS_SUCCEEDED
(
nsres
))
nsres
=
nsIDOMRange_DeleteContents
(
range
);
nsIDOMRange_Release
(
range
);
}
nsIDOMText_Release
(
text_node
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"failed to set text: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_outerText
(
IHTMLElement
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/mshtml_private.h
View file @
7c1fa88c
...
...
@@ -677,6 +677,7 @@ typedef struct {
void
(
*
traverse
)(
HTMLDOMNode
*
,
nsCycleCollectionTraversalCallback
*
);
void
(
*
unlink
)(
HTMLDOMNode
*
);
BOOL
(
*
is_text_edit
)(
HTMLDOMNode
*
);
BOOL
(
*
is_settable
)(
HTMLDOMNode
*
,
DISPID
);
}
NodeImplVtbl
;
struct
HTMLDOMNode
{
...
...
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