Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eafbe884
Commit
eafbe884
authored
Nov 02, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use variant_bool helper where appropriate.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bbffabf1
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
25 additions
and
27 deletions
+25
-27
dispex.c
dlls/mshtml/dispex.c
+1
-1
htmlattr.c
dlls/mshtml/htmlattr.c
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+4
-4
htmlimg.c
dlls/mshtml/htmlimg.c
+3
-2
htmllink.c
dlls/mshtml/htmllink.c
+1
-1
htmlnode.c
dlls/mshtml/htmlnode.c
+1
-1
htmloption.c
dlls/mshtml/htmloption.c
+2
-2
htmlscript.c
dlls/mshtml/htmlscript.c
+1
-3
htmlselect.c
dlls/mshtml/htmlselect.c
+2
-2
htmlstyle.c
dlls/mshtml/htmlstyle.c
+3
-3
htmltextarea.c
dlls/mshtml/htmltextarea.c
+1
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
navigate.c
dlls/mshtml/navigate.c
+1
-1
No files found.
dlls/mshtml/dispex.c
View file @
eafbe884
...
...
@@ -971,7 +971,7 @@ static HRESULT change_type(VARIANT *dst, VARIANT *src, VARTYPE vt, IServiceProvi
case
VT_BOOL
:
if
(
V_VT
(
src
)
==
VT_BSTR
)
{
V_VT
(
dst
)
=
VT_BOOL
;
V_BOOL
(
dst
)
=
V_BSTR
(
src
)
&&
*
V_BSTR
(
src
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
V_BOOL
(
dst
)
=
variant_bool
(
V_BSTR
(
src
)
&&
*
V_BSTR
(
src
))
;
return
S_OK
;
}
break
;
...
...
dlls/mshtml/htmlattr.c
View file @
eafbe884
...
...
@@ -333,7 +333,7 @@ static HRESULT WINAPI HTMLDOMAttribute2_get_expando(IHTMLDOMAttribute2 *iface, V
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
!
This
->
elem
||
get_dispid_type
(
This
->
dispid
)
==
DISPEXPROP_BUILTIN
?
VARIANT_FALSE
:
VARIANT_TRUE
;
*
p
=
variant_bool
(
This
->
elem
&&
get_dispid_type
(
This
->
dispid
)
!=
DISPEXPROP_BUILTIN
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmldoc.c
View file @
eafbe884
...
...
@@ -2606,7 +2606,7 @@ static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL
nsres
=
nsIDOMHTMLDocument_HasFocus
(
This
->
doc_node
->
nsdoc
,
&
has_focus
);
assert
(
nsres
==
NS_OK
);
*
pfFocus
=
has_focus
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
pfFocus
=
variant_bool
(
has_focus
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlelem.c
View file @
eafbe884
...
...
@@ -1267,7 +1267,7 @@ static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pC
assert
(
nsres
==
NS_OK
);
}
*
pfResult
=
result
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
pfResult
=
variant_bool
(
result
)
;
return
S_OK
;
}
...
...
@@ -1777,8 +1777,7 @@ static HRESULT WINAPI HTMLElement_get_isTextEdit(IHTMLElement *iface, VARIANT_BO
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
;
*
p
=
variant_bool
(
This
->
node
.
vtbl
->
is_text_edit
&&
This
->
node
.
vtbl
->
is_text_edit
(
&
This
->
node
));
return
S_OK
;
}
...
...
dlls/mshtml/htmlevent.c
View file @
eafbe884
...
...
@@ -421,7 +421,7 @@ static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL
}
}
*
p
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
ret
)
;
return
S_OK
;
}
...
...
@@ -451,7 +451,7 @@ static HRESULT WINAPI HTMLEventObj_get_ctrlKey(IHTMLEventObj *iface, VARIANT_BOO
}
}
*
p
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
ret
)
;
return
S_OK
;
}
...
...
@@ -481,7 +481,7 @@ static HRESULT WINAPI HTMLEventObj_get_shiftKey(IHTMLEventObj *iface, VARIANT_BO
}
}
*
p
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
ret
)
;
return
S_OK
;
}
...
...
@@ -529,7 +529,7 @@ static HRESULT WINAPI HTMLEventObj_get_cancelBubble(IHTMLEventObj *iface, VARIAN
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
This
->
event
&&
This
->
event
->
stop_propagation
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
This
->
event
&&
This
->
event
->
stop_propagation
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlimg.c
View file @
eafbe884
...
...
@@ -131,7 +131,8 @@ static HRESULT WINAPI HTMLImgElement_get_isMap(IHTMLImgElement *iface, VARIANT_B
ERR
(
"Get IsMap failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
b
);
return
S_OK
;
}
...
...
@@ -391,7 +392,7 @@ static HRESULT WINAPI HTMLImgElement_get_complete(IHTMLImgElement *iface, VARIAN
return
E_FAIL
;
}
*
p
=
complete
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
complete
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmllink.c
View file @
eafbe884
...
...
@@ -302,7 +302,7 @@ static HRESULT WINAPI HTMLLinkElement_get_disabled(IHTMLLinkElement *iface, VARI
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
*
p
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
ret
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlnode.c
View file @
eafbe884
...
...
@@ -610,7 +610,7 @@ static HRESULT WINAPI HTMLDOMNode_hasChildNodes(IHTMLDOMNode *iface, VARIANT_BOO
if
(
NS_FAILED
(
nsres
))
ERR
(
"HasChildNodes failed: %08x
\n
"
,
nsres
);
*
fChildren
=
has_child
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
fChildren
=
variant_bool
(
has_child
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmloption.c
View file @
eafbe884
...
...
@@ -129,7 +129,7 @@ static HRESULT WINAPI HTMLOptionElement_get_selected(IHTMLOptionElement *iface,
return
E_FAIL
;
}
*
p
=
selected
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
selected
)
;
return
S_OK
;
}
...
...
@@ -211,7 +211,7 @@ static HRESULT WINAPI HTMLOptionElement_get_defaultSelected(IHTMLOptionElement *
return
E_FAIL
;
}
*
p
=
va
l
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
va
riant_bool
(
val
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlscript.c
View file @
eafbe884
...
...
@@ -258,9 +258,7 @@ static HRESULT WINAPI HTMLScriptElement_get_defer(IHTMLScriptElement *iface, VAR
ERR
(
"GetSrc failed: %08x
\n
"
,
nsres
);
}
*
p
=
defer
?
VARIANT_TRUE
:
VARIANT_FALSE
;
TRACE
(
"*p = %d
\n
"
,
*
p
);
*
p
=
variant_bool
(
defer
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlselect.c
View file @
eafbe884
...
...
@@ -198,7 +198,7 @@ static HRESULT WINAPI HTMLSelectElement_get_multiple(IHTMLSelectElement *iface,
nsres
=
nsIDOMHTMLSelectElement_GetMultiple
(
This
->
nsselect
,
&
val
);
assert
(
nsres
==
NS_OK
);
*
p
=
va
l
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
va
riant_bool
(
val
)
;
return
S_OK
;
}
...
...
@@ -364,7 +364,7 @@ static HRESULT WINAPI HTMLSelectElement_get_disabled(IHTMLSelectElement *iface,
return
E_FAIL
;
}
*
p
=
disabled
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
disabled
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlstyle.c
View file @
eafbe884
...
...
@@ -628,7 +628,7 @@ static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR ex
get_nsstyle_attr_nsval
(
This
->
nsstyle
,
sid
,
&
str_value
);
nsAString_GetData
(
&
str_value
,
&
value
);
*
p
=
strcmpW
(
value
,
exval
)
?
VARIANT_FALSE
:
VARIANT_TRUE
;
*
p
=
variant_bool
(
!
strcmpW
(
value
,
exval
))
;
nsAString_Finish
(
&
str_value
);
TRACE
(
"%s -> %x
\n
"
,
debugstr_w
(
style_tbl
[
sid
].
name
),
*
p
);
...
...
@@ -2927,7 +2927,7 @@ static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttri
/* filter property is a special case */
if
(
style_entry
->
dispid
==
DISPID_IHTMLSTYLE_FILTER
)
{
*
pfSuccess
=
This
->
elem
->
filter
&&
*
This
->
elem
->
filter
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
pfSuccess
=
variant_bool
(
This
->
elem
->
filter
&&
*
This
->
elem
->
filter
)
;
heap_free
(
This
->
elem
->
filter
);
This
->
elem
->
filter
=
NULL
;
update_filter
(
This
);
...
...
@@ -2940,7 +2940,7 @@ static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttri
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
ret
;
nsAString_GetData
(
&
ret_str
,
&
ret
);
*
pfSuccess
=
*
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
pfSuccess
=
variant_bool
(
*
ret
)
;
}
else
{
ERR
(
"RemoveProperty failed: %08x
\n
"
,
nsres
);
}
...
...
dlls/mshtml/htmltextarea.c
View file @
eafbe884
...
...
@@ -318,7 +318,7 @@ static HRESULT WINAPI HTMLTextAreaElement_get_readOnly(IHTMLTextAreaElement *ifa
return
E_FAIL
;
}
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
p
=
variant_bool
(
b
)
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlwindow.c
View file @
eafbe884
...
...
@@ -862,7 +862,7 @@ static BOOL notify_webbrowser_close(HTMLOuterWindow *window, HTMLDocumentObj *do
V_VT
(
args
)
=
VT_BYREF
|
VT_BOOL
;
V_BOOLREF
(
args
)
=
&
cancel
;
V_VT
(
args
+
1
)
=
VT_BOOL
;
V_BOOL
(
args
+
1
)
=
window
->
parent
?
VARIANT_TRUE
:
VARIANT_FALSE
;
V_BOOL
(
args
+
1
)
=
variant_bool
(
window
->
parent
!=
NULL
)
;
hres
=
IDispatch_Invoke
(
disp
,
DISPID_WINDOWCLOSING
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
IDispatch_Release
(
disp
);
if
(
FAILED
(
hres
))
...
...
dlls/mshtml/navigate.c
View file @
eafbe884
...
...
@@ -610,7 +610,7 @@ static HRESULT WINAPI BindCallbackRedirect_Redirect(IBindCallbackRedirect *iface
SysFreeString
(
frame_name
);
}
*
vbCancel
=
cancel
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
vbCancel
=
variant_bool
(
cancel
)
;
return
hres
;
}
...
...
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