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
24b1b2bc
Commit
24b1b2bc
authored
Jun 12, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use the implementation of IHlink in hlink.dll instead of duplicating it.
parent
c846950e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
255 deletions
+3
-255
hlink.c
dlls/mshtml/hlink.c
+0
-252
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
navigate.c
dlls/mshtml/navigate.c
+3
-2
No files found.
dlls/mshtml/hlink.c
View file @
24b1b2bc
...
...
@@ -118,255 +118,3 @@ void HTMLDocument_Hlink_Init(HTMLDocument *This)
{
This
->
lpHlinkTargetVtbl
=
&
HlinkTargetVtbl
;
}
typedef
struct
{
const
IHlinkVtbl
*
lpHlinkVtbl
;
LONG
ref
;
IMoniker
*
mon
;
LPWSTR
location
;
}
Hlink
;
#define HLINK(x) ((IHlink*) &(x)->lpHlinkVtbl)
#define HLINK_THIS(iface) DEFINE_THIS(Hlink, Hlink, iface)
static
HRESULT
WINAPI
Hlink_QueryInterface
(
IHlink
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HLINK
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHlink
,
riid
))
{
TRACE
(
"(%p)->(IID_IHlink %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HLINK
(
This
);
}
if
(
*
ppv
)
{
IHlink_AddRef
(
HLINK
(
This
));
return
S_OK
;
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
Hlink_AddRef
(
IHlink
*
iface
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
Hlink_Release
(
IHlink
*
iface
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
mon
)
IMoniker_Release
(
This
->
mon
);
mshtml_free
(
This
->
location
);
mshtml_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
Hlink_SetHlinkSite
(
IHlink
*
iface
,
IHlinkSite
*
pihlSite
,
DWORD
dwSiteData
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%p %d)
\n
"
,
This
,
pihlSite
,
dwSiteData
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_GetHlinkSite
(
IHlink
*
iface
,
IHlinkSite
**
ppihlSite
,
DWORD
*
pdwSiteData
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
ppihlSite
,
pdwSiteData
);
*
ppihlSite
=
NULL
;
return
S_OK
;
}
static
HRESULT
WINAPI
Hlink_SetMonikerReference
(
IHlink
*
iface
,
DWORD
grfHLSETF
,
IMoniker
*
pimkTarget
,
LPCWSTR
pwzLocation
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
TRACE
(
"(%p)->(%08x %p %s)
\n
"
,
This
,
grfHLSETF
,
pimkTarget
,
debugstr_w
(
pwzLocation
));
if
(
grfHLSETF
)
FIXME
(
"unsupported grfHLSETF=%08x
\n
"
,
grfHLSETF
);
if
(
This
->
mon
)
IMoniker_Release
(
This
->
mon
);
mshtml_free
(
This
->
location
);
if
(
pimkTarget
)
IMoniker_AddRef
(
pimkTarget
);
This
->
mon
=
pimkTarget
;
if
(
pwzLocation
)
{
DWORD
len
=
strlenW
(
pwzLocation
)
+
1
;
This
->
location
=
mshtml_alloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
This
->
location
,
pwzLocation
,
len
*
sizeof
(
WCHAR
));
}
else
{
This
->
location
=
NULL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
Hlink_GetMonikerReference
(
IHlink
*
iface
,
DWORD
dwWhichRef
,
IMoniker
**
ppimkTarget
,
LPWSTR
*
ppwzLocation
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
TRACE
(
"(%p)->(%d %p %p)
\n
"
,
This
,
dwWhichRef
,
ppimkTarget
,
ppwzLocation
);
if
(
dwWhichRef
!=
1
)
FIXME
(
"upsupported dwWhichRef = %d
\n
"
,
dwWhichRef
);
if
(
This
->
mon
)
IMoniker_AddRef
(
This
->
mon
);
*
ppimkTarget
=
This
->
mon
;
if
(
This
->
location
)
{
DWORD
len
=
strlenW
(
This
->
location
)
+
1
;
*
ppwzLocation
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
*
ppwzLocation
,
This
->
location
,
len
*
sizeof
(
WCHAR
));
}
else
{
*
ppwzLocation
=
NULL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
Hlink_SetStringReference
(
IHlink
*
iface
,
DWORD
grfHLSETF
,
LPCWSTR
pwzTarget
,
LPCWSTR
pwzLocation
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%08x %s %s)
\n
"
,
This
,
grfHLSETF
,
debugstr_w
(
pwzTarget
),
debugstr_w
(
pwzLocation
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_GetStringReference
(
IHlink
*
iface
,
DWORD
dwWhichRef
,
LPWSTR
*
ppwzTarget
,
LPWSTR
*
ppwzLocation
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%d %p %p)
\n
"
,
This
,
dwWhichRef
,
ppwzTarget
,
ppwzLocation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_SetFriendlyName
(
IHlink
*
iface
,
LPCWSTR
pwzFriendlyName
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzFriendlyName
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_GetFriendlyName
(
IHlink
*
iface
,
DWORD
grfHLNAMEF
,
LPWSTR
*
ppwzFriendlyName
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
TRACE
(
"(%p)->(%08x %p)
\n
"
,
This
,
grfHLNAMEF
,
ppwzFriendlyName
);
*
ppwzFriendlyName
=
NULL
;
return
S_FALSE
;
}
static
HRESULT
WINAPI
Hlink_SetTargetFrameName
(
IHlink
*
iface
,
LPCWSTR
pwzTargetFrameName
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzTargetFrameName
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_GetTargetFrameName
(
IHlink
*
iface
,
LPWSTR
*
ppwzTargetFrameName
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppwzTargetFrameName
);
*
ppwzTargetFrameName
=
NULL
;
return
S_FALSE
;
}
static
HRESULT
WINAPI
Hlink_GetMiscStatus
(
IHlink
*
iface
,
DWORD
*
pdwStatus
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pdwStatus
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_Navigate
(
IHlink
*
iface
,
DWORD
grfHLNF
,
LPBC
pibc
,
IBindStatusCallback
*
pibsc
,
IHlinkBrowseContext
*
pihlbc
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%08x %p %p %p)
\n
"
,
This
,
grfHLNF
,
pibc
,
pibsc
,
pihlbc
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_SetAdditionalParams
(
IHlink
*
iface
,
LPCWSTR
pwzAdditionalParams
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzAdditionalParams
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Hlink_GetAdditionalParams
(
IHlink
*
iface
,
LPWSTR
*
ppwzAdditionalParams
)
{
Hlink
*
This
=
HLINK_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppwzAdditionalParams
);
return
E_NOTIMPL
;
}
#undef HLINK_THIS
static
const
IHlinkVtbl
HlinkVtbl
=
{
Hlink_QueryInterface
,
Hlink_AddRef
,
Hlink_Release
,
Hlink_SetHlinkSite
,
Hlink_GetHlinkSite
,
Hlink_SetMonikerReference
,
Hlink_GetMonikerReference
,
Hlink_SetStringReference
,
Hlink_GetStringReference
,
Hlink_SetFriendlyName
,
Hlink_GetFriendlyName
,
Hlink_SetTargetFrameName
,
Hlink_GetTargetFrameName
,
Hlink_GetMiscStatus
,
Hlink_Navigate
,
Hlink_SetAdditionalParams
,
Hlink_GetAdditionalParams
};
IHlink
*
Hlink_Create
(
void
)
{
Hlink
*
ret
=
mshtml_alloc
(
sizeof
(
Hlink
));
ret
->
lpHlinkVtbl
=
&
HlinkVtbl
;
ret
->
ref
=
1
;
ret
->
mon
=
NULL
;
ret
->
location
=
NULL
;
return
HLINK
(
ret
);
}
dlls/mshtml/mshtml_private.h
View file @
24b1b2bc
...
...
@@ -357,7 +357,6 @@ HRESULT load_stream(BSCallback*,IStream*);
void
set_document_bscallback
(
HTMLDocument
*
,
BSCallback
*
);
void
set_current_mon
(
HTMLDocument
*
,
IMoniker
*
);
IHlink
*
Hlink_Create
(
void
);
IHTMLSelectionObject
*
HTMLSelectionObject_Create
(
nsISelection
*
);
IHTMLTxtRange
*
HTMLTxtRange_Create
(
nsIDOMRange
*
);
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
);
...
...
dlls/mshtml/navigate.c
View file @
24b1b2bc
...
...
@@ -28,6 +28,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "hlguids.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -761,8 +762,8 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
return
;
}
h
link
=
Hlink_Create
(
);
if
(
!
hlink
)
{
h
r
=
CoCreateInstance
(
&
CLSID_StdHlink
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IHlink
,
(
LPVOID
*
)
&
hlink
);
if
(
FAILED
(
hr
)
)
{
IBindCtx_Release
(
bindctx
);
IBindStatusCallback_Release
(
STATUSCLB
(
callback
));
return
;
...
...
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