Closed Bug 183508 Opened 22 years ago Closed 22 years ago

[AxPlugin] Hlink targetted links don't work

Categories

(Core Graveyard :: Embedding: ActiveX Wrapper, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adamlock, Assigned: adamlock)

Details

Attachments

(2 files, 3 obsolete files)

GET operations initiated by controls via the Hlink API are not being done in the
proper target frame. The IHlinkFrame::Navigate impl in the plugin is not told
via the supplied IHlink object or other means what the targetted frame name is
so it always opens in the current frame.

This might be a matter of the plugin not implementing something such as the
barely documented ITargetFrame interface.
Attached patch Patch (obsolete) — Splinter Review
Patch implements one method on the barely documented ITargetFrame interface so
that a target frame can be associated the Hlink navigate methods.
Attached patch Patch 2 (obsolete) — Splinter Review
Slightly cleaned up
Attachment #109562 - Attachment is obsolete: true
Comment on attachment 111064 [details] [diff] [review]
Patch 2

Hi David, can you r= this? This barely documented MS interface allows controls
that use Hlink* APIs to navigate to targetted windows to work. I've only
implemented the one method which is called - FindFrame and I use it to store
the name of the frame that isn't supplied in subsequently call to the
IHlinkFrame::Navigate method.

I'll attach a testcase too.
Attachment #111064 - Flags: superreview?(dbradley)
Comment on attachment 111064 [details] [diff] [review]
Patch 2

r=dbradley

I'm not a superreviewer.

Something to check, in FindFrame, I don't know the usage pattern here, but if
pszTargetName is not null on one call, and then null on a subsequent call,
mUseTarget won't get set to null. That may very well be the intent and correct
thing. Just wanted to double check.

One tiny nit, you can use STDMETHOD(foo) and STDMETHODIMP c::foo to reduce the
amount of text for method declarations and implementations. Up to you if you
want to fiddle with that before check-in
Attachment #111064 - Flags: superreview?(dbradley) → review+
Attached patch Patch 3 (obsolete) — Splinter Review
I've now got the proper definition of ITargetFrame, so I've updated the patch
with it. Nothing else has changed so assuming the r= is carried.
Attachment #111064 - Attachment is obsolete: true
Comment on attachment 112299 [details] [diff] [review]
Patch 3

Alec, can you sr this please? Thanks
Attachment #112299 - Flags: superreview?(alecf)
Comment on attachment 112299 [details] [diff] [review]
Patch 3

yuck, so we're more or less redefining the interface because most people
probably won't have it? Can't we #ifdef this somehow, like

#ifdef HAVE_ITARGETFRAME_H
#include "ITargetFrame.h"
#define IMozTargetFrame ITargetFrame
#else
MIDL_INTERFACE(...)

#endif

Look at configure.in for how we detect mmintrin.h to determine HAVE_MMINTRIN_H

Also, I'm inferring from the comments that this is what is going on.. the
comments should say explicitly that we're hijacking an interface IID and
copying the interface layout, banking on them matching.
I'm also slightly concerned that this is illegal, but IANAL.

other than that, sr=alecf..
My feeling is that few developers are going to have this interface. It has only
just appeared in the latest Platform SDK and you only get it then if you also
include the Internet SDK component too. I haven't even got it yet, since the
Platform SDK is a 150Mb download (I'm currently in the process of grabbing it
now). So the effort required to detect and #include what is an identical
definition as mine isn't worth it.

There should be no problem declaring it like this anyway since the interface is
frozen and obsolete and the IMozTarget is a straight cut and paste from the rare
htiframe.h containing the original. It will binary compatible with the
implementations found in IE.
Attached patch Patch 4Splinter Review
This patch addresses Alec's concerns. Makefile can #define USE_HTIFACE if it
wants to use the official version of this interface.
Attachment #112299 - Attachment is obsolete: true
Comment on attachment 112328 [details] [diff] [review]
Patch 4

Carrying r/sr over, requesting 1.3b checkin approval. Low risk, plugin is not
part of standard Mozilla build.

r=dbradley
sr=alecf
Attachment #112328 - Flags: superreview+
Attachment #112328 - Flags: review+
Attachment #112328 - Flags: approval1.3b?
Comment on attachment 112328 [details] [diff] [review]
Patch 4

a=asa (on behalf of drivers) for checkin to 1.3beta.
Attachment #112328 - Flags: approval1.3b? → approval1.3b+
Fix checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Attachment #112299 - Flags: superreview?(alecf)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: