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
9a0d0e86
Commit
9a0d0e86
authored
Nov 25, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't check for doc_node from the doc obj when it can't be NULL.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
b99c89f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
21 deletions
+9
-21
olecmd.c
dlls/mshtml/olecmd.c
+0
-4
oleobj.c
dlls/mshtml/oleobj.c
+8
-8
persist.c
dlls/mshtml/persist.c
+0
-8
view.c
dlls/mshtml/view.c
+1
-1
No files found.
dlls/mshtml/olecmd.c
View file @
9a0d0e86
...
...
@@ -991,8 +991,6 @@ static HRESULT WINAPI DocObjOleCommandTarget_QueryStatus(IOleCommandTarget *ifac
{
HTMLDocumentObj
*
This
=
HTMLDocumentObj_from_IOleCommandTarget
(
iface
);
if
(
!
This
->
doc_node
)
return
E_UNEXPECTED
;
return
IOleCommandTarget_QueryStatus
(
&
This
->
doc_node
->
IOleCommandTarget_iface
,
pguidCmdGroup
,
cCmds
,
prgCmds
,
pCmdText
);
}
...
...
@@ -1002,8 +1000,6 @@ static HRESULT WINAPI DocObjOleCommandTarget_Exec(IOleCommandTarget *iface, cons
{
HTMLDocumentObj
*
This
=
HTMLDocumentObj_from_IOleCommandTarget
(
iface
);
if
(
!
This
->
doc_node
)
return
E_UNEXPECTED
;
return
IOleCommandTarget_Exec
(
&
This
->
doc_node
->
IOleCommandTarget_iface
,
pguidCmdGroup
,
nCmdID
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
}
...
...
dlls/mshtml/oleobj.c
View file @
9a0d0e86
...
...
@@ -2169,37 +2169,37 @@ static HRESULT WINAPI DocObj##iface##_Invoke(I##iface *_0, DISPID dispIdMember,
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_0(iface, method) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface)
; \
}
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_1(iface, method, a) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1)
; \
}
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_2(iface, method, a,b) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2)
; \
}
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_3(iface, method, a,b,c) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3)
; \
}
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_4(iface, method, a,b,c,d) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4)
; \
}
#define HTMLDOCUMENTOBJ_FWD_TO_NODE_5(iface, method, a,b,c,d,e) static HRESULT WINAPI DocObj##iface##_##method(I##iface *_0, a _1, b _2, c _3, d _4, e _5) \
{ \
HTMLDocumentObj *This = CONTAINING_RECORD(_0, HTMLDocumentObj, I##iface##_iface); \
return This->doc_node
? This->doc_node->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4, _5) : E_UNEXPECTED
; \
return This->doc_node
->I##iface##_iface.lpVtbl->method(&This->doc_node->I##iface##_iface, _1, _2, _3, _4, _5)
; \
}
/**********************************************************
...
...
@@ -3618,7 +3618,7 @@ static void HTMLDocumentObj_on_advise(IUnknown *iface, cp_static_data_t *cp)
{
HTMLDocumentObj
*
This
=
impl_from_IUnknown
(
iface
);
if
(
This
->
window
&&
This
->
doc_node
)
if
(
This
->
window
)
update_doc_cp_events
(
This
->
doc_node
,
cp
);
}
...
...
@@ -3704,7 +3704,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
doc
->
window
=
doc
->
nscontainer
->
content_window
;
IHTMLWindow2_AddRef
(
&
doc
->
window
->
base
.
IHTMLWindow2_iface
);
if
(
!
doc
->
doc_node
&&
doc
->
window
->
base
.
inner_window
->
doc
)
{
if
(
!
doc
->
doc_node
)
{
doc
->
doc_node
=
doc
->
window
->
base
.
inner_window
->
doc
;
IHTMLDOMNode_AddRef
(
&
doc
->
doc_node
->
node
.
IHTMLDOMNode_iface
);
}
...
...
dlls/mshtml/persist.c
View file @
9a0d0e86
...
...
@@ -1008,10 +1008,6 @@ static HRESULT WINAPI DocObjPersistFile_Save(IPersistFile *iface, LPCOLESTR pszF
{
HTMLDocumentObj
*
This
=
HTMLDocumentObj_from_IPersistFile
(
iface
);
if
(
!
This
->
doc_node
)
{
FIXME
(
"No doc_node
\n
"
);
return
E_UNEXPECTED
;
}
return
IPersistFile_Save
(
&
This
->
doc_node
->
IPersistFile_iface
,
pszFileName
,
fRemember
);
}
...
...
@@ -1202,10 +1198,6 @@ static HRESULT WINAPI DocObjPersistStreamInit_Save(IPersistStreamInit *iface, IS
{
HTMLDocumentObj
*
This
=
HTMLDocumentObj_from_IPersistStreamInit
(
iface
);
if
(
!
This
->
doc_node
)
{
FIXME
(
"No doc_node
\n
"
);
return
E_UNEXPECTED
;
}
return
IPersistStreamInit_Save
(
&
This
->
doc_node
->
IPersistStreamInit_iface
,
pStm
,
fClearDirty
);
}
...
...
dlls/mshtml/view.c
View file @
9a0d0e86
...
...
@@ -446,7 +446,7 @@ static void send_unload_events_impl(HTMLInnerWindow *window)
static
void
send_unload_events
(
HTMLDocumentObj
*
doc
)
{
if
(
!
doc
->
doc_node
||
!
doc
->
window
||
!
doc
->
doc_node
->
content_ready
)
if
(
!
doc
->
window
||
!
doc
->
doc_node
->
content_ready
)
return
;
send_unload_events_impl
(
doc
->
window
->
base
.
inner_window
);
...
...
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