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
593e8976
Commit
593e8976
authored
Aug 22, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use IPropertyNotifySink connection point.
parent
02bd4ad4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
0 deletions
+80
-0
conpoint.c
dlls/mshtml/conpoint.c
+10
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
olecmd.c
dlls/mshtml/olecmd.c
+2
-0
persist.c
dlls/mshtml/persist.c
+2
-0
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+64
-0
No files found.
dlls/mshtml/conpoint.c
View file @
593e8976
...
...
@@ -51,6 +51,16 @@ struct ConnectionPoint {
IID
iid
;
};
void
call_property_onchanged
(
ConnectionPoint
*
This
,
DISPID
dispid
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
This
->
sinks_size
;
i
++
)
{
if
(
This
->
sinks
[
i
].
propnotif
)
IPropertyNotifySink_OnChanged
(
This
->
sinks
[
i
].
propnotif
,
dispid
);
}
}
#define CONPOINT_THIS(iface) DEFINE_THIS(ConnectionPoint, ConnectionPoint, iface)
static
HRESULT
WINAPI
ConnectionPoint_QueryInterface
(
IConnectionPoint
*
iface
,
...
...
dlls/mshtml/mshtml_private.h
View file @
593e8976
...
...
@@ -298,6 +298,8 @@ void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
void
hlink_frame_navigate
(
HTMLDocument
*
,
IHlinkFrame
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
);
void
*
nsalloc
(
size_t
);
void
nsfree
(
void
*
);
...
...
dlls/mshtml/olecmd.c
View file @
593e8976
...
...
@@ -397,6 +397,8 @@ static HRESULT exec_editmode(HTMLDocument *This)
if
(
This
->
nscontainer
)
setup_ns_editing
(
This
->
nscontainer
);
call_property_onchanged
(
This
->
cp_propnotif
,
DISPID_READYSTATE
);
return
S_OK
;
}
...
...
dlls/mshtml/persist.c
View file @
593e8976
...
...
@@ -191,6 +191,8 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
}
}
call_property_onchanged
(
This
->
cp_propnotif
,
DISPID_READYSTATE
);
HTMLDocument_LockContainer
(
This
,
TRUE
);
hres
=
IMoniker_GetDisplayName
(
pimkName
,
pibc
,
NULL
,
&
url
);
...
...
dlls/mshtml/tests/htmldoc.c
View file @
593e8976
...
...
@@ -103,6 +103,7 @@ DEFINE_EXPECT(GetDropTarget);
DEFINE_EXPECT
(
UpdateUI
);
DEFINE_EXPECT
(
Navigate
);
DEFINE_EXPECT
(
OnFrameWindowActivate
);
DEFINE_EXPECT
(
OnChanged_READYSTATE
);
static
BOOL
expect_LockContainer_fLock
;
static
BOOL
expect_SetActiveObject_active
;
...
...
@@ -212,6 +213,56 @@ static const IHlinkFrameVtbl HlinkFrameVtbl = {
static
IHlinkFrame
HlinkFrame
=
{
&
HlinkFrameVtbl
};
static
HRESULT
WINAPI
PropertyNotifySink_QueryInterface
(
IPropertyNotifySink
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
riid
))
{
*
ppv
=
iface
;
return
S_OK
;
}
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
PropertyNotifySink_AddRef
(
IPropertyNotifySink
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
PropertyNotifySink_Release
(
IPropertyNotifySink
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
PropertyNotifySink_OnChanged
(
IPropertyNotifySink
*
iface
,
DISPID
dispID
)
{
switch
(
dispID
)
{
case
DISPID_READYSTATE
:
CHECK_EXPECT
(
OnChanged_READYSTATE
);
return
S_OK
;
}
ok
(
0
,
"unexpected id %ld
\n
"
,
dispID
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
PropertyNotifySink_OnRequestEdit
(
IPropertyNotifySink
*
iface
,
DISPID
dispID
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
IPropertyNotifySinkVtbl
PropertyNotifySinkVtbl
=
{
PropertyNotifySink_QueryInterface
,
PropertyNotifySink_AddRef
,
PropertyNotifySink_Release
,
PropertyNotifySink_OnChanged
,
PropertyNotifySink_OnRequestEdit
};
static
IPropertyNotifySink
PropertyNotifySink
=
{
&
PropertyNotifySinkVtbl
};
static
HRESULT
WINAPI
OleContainer_QueryInterface
(
IOleContainer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
QueryInterface
(
riid
,
ppv
);
...
...
@@ -1293,6 +1344,13 @@ static void test_ConnectionPoint(IConnectionPointContainer *container, REFIID ri
hres
=
IConnectionPoint_GetConnectionPointContainer
(
cp
,
NULL
);
ok
(
hres
==
E_POINTER
,
"GetConnectionPointContainer failed: %08lx, expected E_POINTER
\n
"
,
hres
);
if
(
IsEqualGUID
(
&
IID_IPropertyNotifySink
,
riid
))
{
DWORD
cookie
;
hres
=
IConnectionPoint_Advise
(
cp
,
(
IUnknown
*
)
&
PropertyNotifySink
,
&
cookie
);
ok
(
hres
==
S_OK
,
"Advise failed: %08lx
\n
"
,
hres
);
}
IConnectionPoint_Release
(
cp
);
}
...
...
@@ -1344,6 +1402,7 @@ static void test_Load(IPersistMoniker *persist)
SET_EXPECT
(
Invoke_AMBIENT_SILENT
);
SET_EXPECT
(
Invoke_AMBIENT_USERAGENT
);
SET_EXPECT
(
Invoke_AMBIENT_PALETTE
);
SET_EXPECT
(
OnChanged_READYSTATE
);
SET_EXPECT
(
GetContainer
);
SET_EXPECT
(
LockContainer
);
SET_EXPECT
(
Exec_ShellDocView_37
);
...
...
@@ -1367,6 +1426,7 @@ static void test_Load(IPersistMoniker *persist)
CHECK_CALLED
(
Invoke_AMBIENT_SILENT
);
CHECK_CALLED
(
Invoke_AMBIENT_USERAGENT
);
CHECK_CALLED
(
Invoke_AMBIENT_PALETTE
);
CHECK_CALLED
(
OnChanged_READYSTATE
);
CHECK_CALLED
(
GetContainer
);
CHECK_CALLED
(
LockContainer
);
CHECK_CALLED
(
Exec_ShellDocView_37
);
...
...
@@ -1624,6 +1684,7 @@ static void test_exec_editmode(IUnknown *unk)
SET_EXPECT
(
GetHostInfo
);
SET_EXPECT
(
Invoke_AMBIENT_SILENT
);
SET_EXPECT
(
Invoke_AMBIENT_OFFLINEIFNOTCONNECTED
);
SET_EXPECT
(
OnChanged_READYSTATE
);
expect_status_text
=
NULL
;
hres
=
IOleCommandTarget_Exec
(
cmdtrg
,
&
CGID_MSHTML
,
IDM_EDITMODE
,
...
...
@@ -1635,6 +1696,7 @@ static void test_exec_editmode(IUnknown *unk)
CHECK_CALLED
(
GetHostInfo
);
CHECK_CALLED
(
Invoke_AMBIENT_SILENT
);
CHECK_CALLED
(
Invoke_AMBIENT_OFFLINEIFNOTCONNECTED
);
CHECK_CALLED
(
OnChanged_READYSTATE
);
IOleCommandTarget_Release
(
cmdtrg
);
}
...
...
@@ -2149,6 +2211,7 @@ static void test_HTMLDocument_hlink(void)
if
(
FAILED
(
hres
))
return
;
test_ConnectionPointContainer
(
unk
);
test_Persist
(
unk
);
test_Navigate
(
unk
);
...
...
@@ -2185,6 +2248,7 @@ static void test_editing_mode(void)
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"Could not get IOleObject: %08lx
\n
"
,
hres
);
test_ConnectionPointContainer
(
unk
);
test_ClientSite
(
oleobj
,
CLIENTSITE_EXPECTPATH
);
test_DoVerb
(
oleobj
);
...
...
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