NPP_SetWindow is not called when the frame is scrolled

RESOLVED INVALID

Status

()

Core
Plug-ins
P3
normal
RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: Imad Jureidini, Assigned: Peter Lubczynski)

Tracking

Trunk
mozilla1.3beta
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PL2:NA])

(Reporter)

Description

15 years ago
I'm developing a browser plugin for MacOS 9.x and X, using Carbon.
It appears that Mozilla 1.1 final doesn't call NPP_SetWindow when the frame is 
scrolled.  As a result, the plugin is not notified of its new position and 
clipping rectangle.

Using:
CarbonLib 1.6
MacOS 10.2.1
CodeWarrior 8.2
Mac Powerbook G4/550.
The plugin SDK I found in the Mozilla tree

Comment 1

15 years ago
assigning to peterl
Assignee: beppe → peterl
Priority: -- → P3
Whiteboard: [PL2:NA]
Target Milestone: --- → mozilla1.3beta

Comment 2

15 years ago
Is the browser supposed to call NPP_SetWindow after scrolling??? I think only
nsPluginEventType_ScrollingBeginsEvent events are sent through NPP_HandleEvent
which should notify you when scrolling.

Comment 3

15 years ago
I am not aware of any requirement that SetWindow will be called. In fact, IMO,
SetWindow should only be called twice, once to give the plugin its window, and
again when the window (plugin) is shutdown.

Everytime the plugin is called the plugins coordinates and clipRect are set to
reflect its location on the screen.
(Reporter)

Comment 4

15 years ago
It appears that I incorrectly assumed that NPP_SetWindow was called anytime the 
clipping area or the plugin origin were changed in order to inform the plugin 
of this change.  Apparently one needs to copy the port origin and clip region 
at the time of an updateEvt in order to properly render to the port during an 
idle event (for animation).
Is it safe to keep the pointer to the NPWindow passed by NPP_SetWindow and 
simply refer to its contents to update the origin and clip rect at idle time?
In any case, I guess this bug can be closed.  Thanks.

Comment 5

15 years ago
Your window will not change during the exection of your plugin. So, yes, you can
cache that information.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.