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
c1afef34
Commit
c1afef34
authored
Dec 21, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_isTextEdit implementation.
parent
278daad3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
6 deletions
+79
-6
htmlbody.c
dlls/mshtml/htmlbody.c
+7
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+6
-2
htmlinput.c
dlls/mshtml/htmlinput.c
+35
-2
htmltextarea.c
dlls/mshtml/htmltextarea.c
+7
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+23
-0
No files found.
dlls/mshtml/htmlbody.c
View file @
c1afef34
...
...
@@ -833,6 +833,11 @@ static event_target_t **HTMLBodyElement_get_event_target(HTMLDOMNode *iface)
:
&
This
->
textcont
.
element
.
node
.
event_target
;
}
static
BOOL
HTMLBodyElement_is_text_edit
(
HTMLDOMNode
*
iface
)
{
return
TRUE
;
}
static
const
cpc_entry_t
HTMLBodyElement_cpc
[]
=
{
{
&
DIID_HTMLTextContainerEvents
},
{
&
IID_IPropertyNotifySink
},
...
...
@@ -857,7 +862,8 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
NULL
,
NULL
,
HTMLBodyElement_traverse
,
HTMLBodyElement_unlink
HTMLBodyElement_unlink
,
HTMLBodyElement_is_text_edit
};
static
const
tid_t
HTMLBodyElement_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlelem.c
View file @
c1afef34
...
...
@@ -1665,8 +1665,12 @@ static HRESULT WINAPI HTMLElement_get_parentTextEdit(IHTMLElement *iface, IHTMLE
static
HRESULT
WINAPI
HTMLElement_get_isTextEdit
(
IHTMLElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
This
->
node
.
vtbl
->
is_text_edit
&&
This
->
node
.
vtbl
->
is_text_edit
(
&
This
->
node
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_click
(
IHTMLElement
*
iface
)
...
...
dlls/mshtml/htmlinput.c
View file @
c1afef34
...
...
@@ -1260,6 +1260,32 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO
return
IHTMLInputElement_get_disabled
(
&
This
->
IHTMLInputElement_iface
,
p
);
}
static
BOOL
HTMLInputElement_is_text_edit
(
HTMLDOMNode
*
iface
)
{
HTMLInputElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
const
PRUnichar
*
type
;
nsAString
nsstr
;
nsresult
nsres
;
BOOL
ret
=
FALSE
;
static
const
WCHAR
buttonW
[]
=
{
'b'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
hiddenW
[]
=
{
'h'
,
'i'
,
'd'
,
'd'
,
'e'
,
'n'
,
0
};
static
const
WCHAR
passwordW
[]
=
{
'p'
,
'a'
,
's'
,
's'
,
'w'
,
'o'
,
'r'
,
'd'
,
0
};
static
const
WCHAR
resetW
[]
=
{
'r'
,
'e'
,
's'
,
'e'
,
't'
,
0
};
static
const
WCHAR
submitW
[]
=
{
's'
,
'u'
,
'b'
,
'm'
,
'i'
,
't'
,
0
};
static
const
WCHAR
textW
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
0
};
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLInputElement_GetType
(
This
->
nsinput
,
&
nsstr
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_GetData
(
&
nsstr
,
&
type
);
ret
=
!
strcmpW
(
type
,
buttonW
)
||
!
strcmpW
(
type
,
hiddenW
)
||
!
strcmpW
(
type
,
passwordW
)
||
!
strcmpW
(
type
,
resetW
)
||
!
strcmpW
(
type
,
submitW
)
||
!
strcmpW
(
type
,
textW
);
}
nsAString_Finish
(
&
nsstr
);
return
ret
;
}
static
void
HTMLInputElement_traverse
(
HTMLDOMNode
*
iface
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLInputElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
...
...
@@ -1297,7 +1323,8 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
NULL
,
NULL
,
HTMLInputElement_traverse
,
HTMLInputElement_unlink
HTMLInputElement_unlink
,
HTMLInputElement_is_text_edit
};
static
const
tid_t
HTMLInputElement_iface_tids
[]
=
{
...
...
@@ -1764,6 +1791,11 @@ static HRESULT HTMLButtonElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BO
return
IHTMLButtonElement_get_disabled
(
&
This
->
IHTMLButtonElement_iface
,
p
);
}
static
BOOL
HTMLButtonElement_is_text_edit
(
HTMLDOMNode
*
iface
)
{
return
TRUE
;
}
static
void
HTMLButtonElement_traverse
(
HTMLDOMNode
*
iface
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLButtonElement
*
This
=
button_from_HTMLDOMNode
(
iface
);
...
...
@@ -1801,7 +1833,8 @@ static const NodeImplVtbl HTMLButtonElementImplVtbl = {
NULL
,
NULL
,
HTMLButtonElement_traverse
,
HTMLButtonElement_unlink
HTMLButtonElement_unlink
,
HTMLButtonElement_is_text_edit
};
static
const
tid_t
HTMLButtonElement_iface_tids
[]
=
{
...
...
dlls/mshtml/htmltextarea.c
View file @
c1afef34
...
...
@@ -437,6 +437,11 @@ static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_
return
IHTMLTextAreaElement_get_disabled
(
&
This
->
IHTMLTextAreaElement_iface
,
p
);
}
static
BOOL
HTMLTextAreaElement_is_text_edit
(
HTMLDOMNode
*
iface
)
{
return
TRUE
;
}
static
void
HTMLTextAreaElement_traverse
(
HTMLDOMNode
*
iface
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLTextAreaElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
...
...
@@ -474,7 +479,8 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
NULL
,
NULL
,
HTMLTextAreaElement_traverse
,
HTMLTextAreaElement_unlink
HTMLTextAreaElement_unlink
,
HTMLTextAreaElement_is_text_edit
};
static
const
tid_t
HTMLTextAreaElement_iface_tids
[]
=
{
...
...
dlls/mshtml/mshtml_private.h
View file @
c1afef34
...
...
@@ -646,6 +646,7 @@ typedef struct {
HRESULT
(
*
bind_to_tree
)(
HTMLDOMNode
*
);
void
(
*
traverse
)(
HTMLDOMNode
*
,
nsCycleCollectionTraversalCallback
*
);
void
(
*
unlink
)(
HTMLDOMNode
*
);
BOOL
(
*
is_text_edit
)(
HTMLDOMNode
*
);
}
NodeImplVtbl
;
struct
HTMLDOMNode
{
...
...
dlls/mshtml/tests/dom.c
View file @
c1afef34
...
...
@@ -2538,6 +2538,18 @@ static void _test_elem_contains(unsigned line, IHTMLElement *elem, IHTMLElement
ok_
(
__FILE__
,
line
)(
b
==
exval
,
"contains returned %x, expected %x
\n
"
,
b
,
exval
);
}
#define test_elem_istextedit(a,b) _test_elem_istextedit(__LINE__,a,b)
static
void
_test_elem_istextedit
(
unsigned
line
,
IHTMLElement
*
elem
,
VARIANT_BOOL
exval
)
{
VARIANT_BOOL
b
;
HRESULT
hres
;
b
=
100
;
hres
=
IHTMLElement_get_isTextEdit
(
elem
,
&
b
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"isTextEdit failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
b
==
exval
,
"isTextEdit = %x
\n
"
,
b
);
}
#define get_first_child(n) _get_first_child(__LINE__,n)
static
IHTMLDOMNode
*
_get_first_child
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -6122,6 +6134,8 @@ static void test_defaults(IHTMLDocument2 *doc)
test_body_funs
(
body
);
IHTMLBodyElement_Release
(
body
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
hres
=
IHTMLElement_get_style
(
elem
,
&
style
);
ok
(
hres
==
S_OK
,
"get_style failed: %08x
\n
"
,
hres
);
...
...
@@ -6264,6 +6278,8 @@ static void test_button_elem(IHTMLElement *elem)
{
test_button_name
(
elem
,
NULL
);
set_button_name
(
elem
,
"button name"
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
}
#define test_tr_possess(e,r,l,i) _test_tr_possess(__LINE__,e,r,l,i)
...
...
@@ -7351,6 +7367,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_plugins_col
(
doc
);
elem
=
get_doc_elem
(
doc
);
test_elem_istextedit
(
elem
,
VARIANT_FALSE
);
test_elem_all
((
IUnknown
*
)
elem
,
all_types
+
1
,
sizeof
(
all_types
)
/
sizeof
(
all_types
[
0
])
-
1
);
IHTMLElement_Release
(
elem
);
...
...
@@ -7370,6 +7387,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_tabindex
((
IUnknown
*
)
elem
,
0
);
test_elem_set_tabindex
((
IUnknown
*
)
elem
,
1
);
test_elem_filters
((
IUnknown
*
)
elem
);
test_elem_istextedit
(
elem
,
VARIANT_FALSE
);
node
=
test_node_get_parent
((
IUnknown
*
)
elem
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
...
...
@@ -7430,6 +7448,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_select_elem
(
select
);
test_elem_istextedit
(
elem
,
VARIANT_FALSE
);
test_elem_title
((
IUnknown
*
)
select
,
NULL
);
test_elem_set_title
((
IUnknown
*
)
select
,
"Title"
);
test_elem_title
((
IUnknown
*
)
select
,
"Title"
);
...
...
@@ -7467,6 +7486,7 @@ static void test_elems(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"Could not get IHTMLScriptElement interface: %08x
\n
"
,
hres
);
test_elem_language
(
elem
,
NULL
);
test_elem_istextedit
(
elem
,
VARIANT_FALSE
);
if
(
hres
==
S_OK
)
{
...
...
@@ -7530,6 +7550,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_get_disabled
(
input
,
VARIANT_FALSE
);
test_elem_client_size
((
IUnknown
*
)
elem
);
test_input_type
(
input
,
"text"
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
test_node_put_value_str
((
IUnknown
*
)
elem
,
"test"
);
...
...
@@ -8122,6 +8143,8 @@ static void test_elems2(IHTMLDocument2 *doc)
form
=
get_textarea_form
((
IUnknown
*
)
elem
);
ok
(
!
form
,
"form = %p
\n
"
,
form
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
IHTMLElement_Release
(
elem
);
}
...
...
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