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
fb16633d
Commit
fb16633d
authored
Jun 29, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't use dynamic allocation for connection points.
parent
f75b86f0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
42 deletions
+37
-42
conpoint.c
dlls/mshtml/conpoint.c
+15
-35
mshtml_private.h
dlls/mshtml/mshtml_private.h
+18
-3
persist.c
dlls/mshtml/persist.c
+1
-1
task.c
dlls/mshtml/task.c
+3
-3
No files found.
dlls/mshtml/conpoint.c
View file @
fb16633d
...
...
@@ -36,21 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define CONPOINT(x) ((IConnectionPoint*) &(x)->lpConnectionPointVtbl);
struct
ConnectionPoint
{
const
IConnectionPointVtbl
*
lpConnectionPointVtbl
;
HTMLDocument
*
doc
;
union
{
IUnknown
*
unk
;
IDispatch
*
disp
;
IPropertyNotifySink
*
propnotif
;
}
*
sinks
;
DWORD
sinks_size
;
IID
iid
;
};
void
call_property_onchanged
(
ConnectionPoint
*
This
,
DISPID
dispid
)
{
DWORD
i
;
...
...
@@ -199,17 +184,13 @@ static const IConnectionPointVtbl ConnectionPointVtbl =
ConnectionPoint_EnumConnections
};
static
void
ConnectionPoint_
Create
(
HTMLDocument
*
doc
,
REFIID
riid
,
ConnectionPoint
*
*
cp
)
static
void
ConnectionPoint_
Init
(
HTMLDocument
*
doc
,
REFIID
riid
,
ConnectionPoint
*
cp
)
{
ConnectionPoint
*
ret
=
mshtml_alloc
(
sizeof
(
ConnectionPoint
));
ret
->
lpConnectionPointVtbl
=
&
ConnectionPointVtbl
;
ret
->
doc
=
doc
;
ret
->
sinks
=
NULL
;
ret
->
sinks_size
=
0
;
memcpy
(
&
ret
->
iid
,
riid
,
sizeof
(
IID
));
*
cp
=
ret
;
cp
->
lpConnectionPointVtbl
=
&
ConnectionPointVtbl
;
cp
->
doc
=
doc
;
cp
->
sinks
=
NULL
;
cp
->
sinks_size
=
0
;
cp
->
iid
=
*
riid
;
}
static
void
ConnectionPoint_Destroy
(
ConnectionPoint
*
This
)
...
...
@@ -222,7 +203,6 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
}
mshtml_free
(
This
->
sinks
);
mshtml_free
(
This
);
}
#define CONPTCONT_THIS(iface) DEFINE_THIS(HTMLDocument, ConnectionPointContainer, iface)
...
...
@@ -263,13 +243,13 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
if
(
IsEqualGUID
(
&
DIID_HTMLDocumentEvents
,
riid
))
{
TRACE
(
"(%p)->(DIID_HTMLDocumentEvents %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_htmldocevents
);
*
ppCP
=
CONPOINT
(
&
This
->
cp_htmldocevents
);
}
else
if
(
IsEqualGUID
(
&
DIID_HTMLDocumentEvents2
,
riid
))
{
TRACE
(
"(%p)->(DIID_HTMLDocumentEvents2 %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_htmldocevents2
);
*
ppCP
=
CONPOINT
(
&
This
->
cp_htmldocevents2
);
}
else
if
(
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
riid
))
{
TRACE
(
"(%p)->(IID_IPropertyNotifySink %p)
\n
"
,
This
,
ppCP
);
*
ppCP
=
CONPOINT
(
This
->
cp_propnotif
);
*
ppCP
=
CONPOINT
(
&
This
->
cp_propnotif
);
}
if
(
*
ppCP
)
{
...
...
@@ -295,14 +275,14 @@ void HTMLDocument_ConnectionPoints_Init(HTMLDocument *This)
{
This
->
lpConnectionPointContainerVtbl
=
&
ConnectionPointContainerVtbl
;
ConnectionPoint_
Create
(
This
,
&
IID_IPropertyNotifySink
,
&
This
->
cp_propnotif
);
ConnectionPoint_
Create
(
This
,
&
DIID_HTMLDocumentEvents
,
&
This
->
cp_htmldocevents
);
ConnectionPoint_
Create
(
This
,
&
DIID_HTMLDocumentEvents2
,
&
This
->
cp_htmldocevents2
);
ConnectionPoint_
Init
(
This
,
&
IID_IPropertyNotifySink
,
&
This
->
cp_propnotif
);
ConnectionPoint_
Init
(
This
,
&
DIID_HTMLDocumentEvents
,
&
This
->
cp_htmldocevents
);
ConnectionPoint_
Init
(
This
,
&
DIID_HTMLDocumentEvents2
,
&
This
->
cp_htmldocevents2
);
}
void
HTMLDocument_ConnectionPoints_Destroy
(
HTMLDocument
*
This
)
{
ConnectionPoint_Destroy
(
This
->
cp_propnotif
);
ConnectionPoint_Destroy
(
This
->
cp_htmldocevents
);
ConnectionPoint_Destroy
(
This
->
cp_htmldocevents2
);
ConnectionPoint_Destroy
(
&
This
->
cp_propnotif
);
ConnectionPoint_Destroy
(
&
This
->
cp_htmldocevents
);
ConnectionPoint_Destroy
(
&
This
->
cp_htmldocevents2
);
}
dlls/mshtml/mshtml_private.h
View file @
fb16633d
...
...
@@ -71,6 +71,21 @@ typedef enum {
EDITMODE
}
USERMODE
;
struct
ConnectionPoint
{
const
IConnectionPointVtbl
*
lpConnectionPointVtbl
;
HTMLDocument
*
doc
;
union
{
IUnknown
*
unk
;
IDispatch
*
disp
;
IPropertyNotifySink
*
propnotif
;
}
*
sinks
;
DWORD
sinks_size
;
IID
iid
;
};
struct
HTMLDocument
{
const
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
const
IHTMLDocument3Vtbl
*
lpHTMLDocument3Vtbl
;
...
...
@@ -120,9 +135,9 @@ struct HTMLDocument {
DWORD
update
;
ConnectionPoint
*
cp_htmldocevents
;
ConnectionPoint
*
cp_htmldocevents2
;
ConnectionPoint
*
cp_propnotif
;
ConnectionPoint
cp_htmldocevents
;
ConnectionPoint
cp_htmldocevents2
;
ConnectionPoint
cp_propnotif
;
HTMLDOMNode
*
nodes
;
};
...
...
dlls/mshtml/persist.c
View file @
fb16633d
...
...
@@ -177,7 +177,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
}
This
->
readystate
=
READYSTATE_LOADING
;
call_property_onchanged
(
This
->
cp_propnotif
,
DISPID_READYSTATE
);
call_property_onchanged
(
&
This
->
cp_propnotif
,
DISPID_READYSTATE
);
update_doc
(
This
,
UPDATE_TITLE
);
HTMLDocument_LockContainer
(
This
,
TRUE
);
...
...
dlls/mshtml/task.c
View file @
fb16633d
...
...
@@ -135,10 +135,10 @@ static void set_parsecomplete(HTMLDocument *doc)
if
(
doc
->
usermode
==
EDITMODE
)
init_editor
(
doc
);
call_property_onchanged
(
doc
->
cp_propnotif
,
1005
);
call_property_onchanged
(
&
doc
->
cp_propnotif
,
1005
);
doc
->
readystate
=
READYSTATE_INTERACTIVE
;
call_property_onchanged
(
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
call_property_onchanged
(
&
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
if
(
doc
->
client
)
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
...
...
@@ -163,7 +163,7 @@ static void set_parsecomplete(HTMLDocument *doc)
}
doc
->
readystate
=
READYSTATE_COMPLETE
;
call_property_onchanged
(
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
call_property_onchanged
(
&
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
if
(
doc
->
frame
)
{
static
const
WCHAR
wszDone
[]
=
{
'D'
,
'o'
,
'n'
,
'e'
,
0
};
...
...
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