Closed
Bug 896358
Opened 12 years ago
Closed 8 years ago
Resize issue with npapi plugin embedded in firefox
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: abhisheksingh.vit2107, Unassigned)
References
Details
(Keywords: testcase-wanted)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212
Steps to reproduce:
Load any npapi plugin app
try to resize firefox window
the app does not fit the window
This issue was not seen till 17.0 version
---------------------------------------------------------------------
ome HINT:: whenever resized WM_PAINT (message 15 ) is send to application The code flow (pre 18.0 firefox version to embedded application)::
1) pWnd->WindowProc(nMsg, wParam, lParam)
2) CWnd::WindowProc ---> if (!OnWndMsg(message, wParam, lParam, &lResult))
lResult = DefWindowProc(message, wParam, lParam);
3) this in turn calls CView::OnPaint()
------------------------------------------------------------------------------------------------
Actual results:
No call is send from firefox to application to resize it.
But with and prior to 17.0 abhle to get window message (15 for WM_PAINT) which help to redraw according to latest firefox window.
reference https://support.mozilla.org/en-US/questions/964343#answer-458116
Expected results:
Might be firefox unable to send the callback as this is not seen in Chrome and safari browser (on windows) with same plugin
Comment 2•12 years ago
|
||
This is with a windowed plugin?
NPP_SetWindow() should be called when the plugins window size or clip-rect changes (see [1] & [2]) - is this happening?
[1] https://developer.mozilla.org/de/docs/NPP_SetWindow
[2] https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference/Drawing_and_Event_Handling
Updated•12 years ago
|
Flags: needinfo?(abhisheksingh.vit2107)
Keywords: testcase-wanted
| Reporter | ||
Comment 3•12 years ago
|
||
Can use it to test the issue. When browser resized the flash named XXX.swf does not takes the client rect (does not fit with the browser)
you can check the issue with pdf plugin also.
Flags: needinfo?(abhisheksingh.vit2107)
| Reporter | ||
Comment 4•12 years ago
|
||
:: Georg Fritzsche [:gfritzsche]
I am having LRESULT CALLBACK PluginWinProc---> under which I have case for
switch (message)
{
case WM_PAINT
Do you suggest to call NPP_SetWindow here.
Some more detail ::
<html>
<body>
<embed src="XXX.yyy" width="100%" height="100%" inplace=1 />
</body>
</html>
here .yyy is a MFC based application file.
| Reporter | ||
Comment 5•12 years ago
|
||
:: Georg Fritzsche [:gfritzsche]
I am having LRESULT CALLBACK PluginWinProc---> under which I have case for
switch (message)
{
case WM_PAINT
Do you suggest to call NPP_SetWindow here.
Some more detail ::
<html>
<body>
<embed src="XXX.yyy" width="100%" height="100%" inplace=1 />
</body>
</html>
here .yyy is a MFC based application file.
Updated•12 years ago
|
Attachment #780211 -
Attachment mime type: text/plain → text/html
Comment 6•12 years ago
|
||
(In reply to abhisheksingh.vit2107 from comment #3)
> Can use it to test the issue.
This isn't a complete test-case.
> When browser resized the flash named XXX.swf
> does not takes the client rect (does not fit with the browser)
You mean that the plugin windows size isn't always matching the window content size during resize?
But it is correctly sized when the resize ends?
> Do you suggest to call NPP_SetWindow here.
NPP_SetWindow() gets called on resizing etc. and should be handled by your plugin, see the linked documentation in comment 2. Is your plugin handling this?
See this section if you need specifics:
http://hg.mozilla.org/mozilla-central/annotate/9875c9400636/dom/plugins/test/testplugin/nptest.cpp#l1118
| Reporter | ||
Comment 7•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #6)
> (In reply to abhisheksingh.vit2107 from comment #3)
> > Can use it to test the issue.
>
> This isn't a complete test-case.
>
> > When browser resized the flash named XXX.swf
> > does not takes the client rect (does not fit with the browser)
>
> You mean that the plugin windows size isn't always matching the window
> content size during resize?
> But it is correctly sized when the resize ends?
>
> > Do you suggest to call NPP_SetWindow here.
>
> NPP_SetWindow() gets called on resizing etc. and should be handled by your
> plugin, see the linked documentation in comment 2. Is your plugin handling
> this?
> See this section if you need specifics:
> http://hg.mozilla.org/mozilla-central/annotate/9875c9400636/dom/plugins/test/
> testplugin/nptest.cpp#l1118
sorry for late reply.
Georg - the use case goes like that::
when we resize the browser-----> plugin app is not able to take up the size of browser and fit itself......simple example is play any youtube video and try to resize the browser ...the youtube player doesnot fit the browser screen.... my app pre 17.0 was working well and good but with latest mozilla version its giving issue.
And same plugin code is working fine for chrome browser.(all versions)
please let me know for any other detail.
| Reporter | ||
Comment 8•12 years ago
|
||
| Reporter | ||
Comment 9•12 years ago
|
||
Attached normal code flow. The issue is not with plugin if it would be it would have similar issue with all browser . But it's working fine with other browser apart from firefox (17.0 and later) version
Comment 10•12 years ago
|
||
(In reply to abhisheksingh.vit2107 from comment #7)
> when we resize the browser-----> plugin app is not able to take up the size
> of browser and fit itself......simple example is play any youtube video and
> try to resize the browser ...the youtube player doesnot fit the browser
> screen.... my app pre 17.0 was working well and good but with latest mozilla
> version its giving issue.
I tried with a simple SWF animation (eg http://www.up-shack.com/assets/up/10866121d68f8b9af608cb16b440c8b4.swf) and it resizes normally when I'm resizing the browser, see http://i.imgur.com/nAo336H.jpg (with FF25)
Comment 11•12 years ago
|
||
(In reply to abhisheksingh.vit2107 from comment #7)
> simple example is play any youtube video and try to resize the browser
> ...the youtube player doesnot fit the browser screen....
I don't see a problem with the Youtube behavior: they have a plugin element with a fixed size and if you resize the window to any size it continues drawing fine.
Are you maybe talking about behavior like bug 794836?
Perhaps you can provide screenshots or screencasts that showcase the issue and the expected behavior?
I'm also still interested in whether NPP_SetWindow() behaves as expected here.
Flags: needinfo?(abhisheksingh.vit2107)
| Reporter | ||
Comment 12•12 years ago
|
||
desired behaviour...works perfectly
Flags: needinfo?(abhisheksingh.vit2107)
| Reporter | ||
Comment 13•12 years ago
|
||
issue with latest firefox
| Reporter | ||
Comment 14•12 years ago
|
||
(In reply to Loic from comment #10)
> (In reply to abhisheksingh.vit2107 from comment #7)
> > when we resize the browser-----> plugin app is not able to take up the size
> > of browser and fit itself......simple example is play any youtube video and
> > try to resize the browser ...the youtube player doesnot fit the browser
> > screen.... my app pre 17.0 was working well and good but with latest mozilla
> > version its giving issue.
>
> I tried with a simple SWF animation (eg
> http://www.up-shack.com/assets/up/10866121d68f8b9af608cb16b440c8b4.swf) and
> it resizes normally when I'm resizing the browser, see
> http://i.imgur.com/nAo336H.jpg (with FF25)
==========================================================
Please refer attached webex for the issue with the latest firefox.
Loic, I was having the working same as shown by you but with latest firefox it is not consistent sometimes it redraws and many a time not.
Please have a look .... the resize in turn call my embedded API where I redraws it.
| Reporter | ||
Comment 15•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #11)
> (In reply to abhisheksingh.vit2107 from comment #7)
> > simple example is play any youtube video and try to resize the browser
> > ...the youtube player doesnot fit the browser screen....
>
> I don't see a problem with the Youtube behavior: they have a plugin element
> with a fixed size and if you resize the window to any size it continues
> drawing fine.
>
> Are you maybe talking about behavior like bug 794836?
> Perhaps you can provide screenshots or screencasts that showcase the issue
> and the expected behavior?
>
> I'm also still interested in whether NPP_SetWindow() behaves as expected
> here.
------------------------------------------------------------------------
Georg Fritzsche :: Attached webex video for the normal working with 12.0 version firefox (perfect_resize _12.0firefox.wrf)
and the one where i am facing issue (resize issue_22.0firefox.wrf)
please let me know for further information...
I'm also still interested in whether NPP_SetWindow() behaves as expected
here-------> just for concern if it would have issue with NPP_SetWindow() it would have not worked for any browser , but it's working fine for chrome . Might be I am predicting wrong .
Comment 16•12 years ago
|
||
Do your testcases need to install WebEx Player (http://www.webex.com/play-webex-recording.html) to be tested?
Comment 17•12 years ago
|
||
(In reply to abhisheksingh.vit2107 from comment #15)
> I'm also still interested in whether NPP_SetWindow() behaves as expected
> here-------> just for concern if it would have issue with NPP_SetWindow() it
> would have not worked for any browser , but it's working fine for chrome .
> Might be I am predicting wrong .
They might implement things differently such that it happens to work there. Can you please check if that works properly and you're invalidating as needed?
| Reporter | ||
Comment 18•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #17)
> (In reply to abhisheksingh.vit2107 from comment #15)
> > I'm also still interested in whether NPP_SetWindow() behaves as expected
> > here-------> just for concern if it would have issue with NPP_SetWindow() it
> > would have not worked for any browser , but it's working fine for chrome .
> > Might be I am predicting wrong .
>
> They might implement things differently such that it happens to work there.
> Can you please check if that works properly and you're invalidating as
> needed?
Yes Georg it's working fine with other browser .
One query what takes flow from plugin to app on window resize ( for WM_PAINT - message 15). It could also help me to zero down the issue.
| Reporter | ||
Comment 19•12 years ago
|
||
(In reply to Loic from comment #16)
> Do your testcases need to install WebEx Player
> (http://www.webex.com/play-webex-recording.html) to be tested?
Loic you might to ... Please do so , sorry for inconvenience.
Comment 20•12 years ago
|
||
(In reply to abhisheksingh.vit2107 from comment #18)
> (In reply to Georg Fritzsche [:gfritzsche] from comment #17)
> > (In reply to abhisheksingh.vit2107 from comment #15)
> > > I'm also still interested in whether NPP_SetWindow() behaves as expected
> > > here-------> just for concern if it would have issue with NPP_SetWindow() it
> > > would have not worked for any browser , but it's working fine for chrome .
> > > Might be I am predicting wrong .
> >
> > They might implement things differently such that it happens to work there.
> > Can you please check if that works properly and you're invalidating as
> > needed?
>
> Yes Georg it's working fine with other browser.
Right, what i meant is: can you check that you implemented this similar to [1] and that it behaves fine in Firefox?
Checking this first before checking into other possibilities makes the most sense.
> One query what takes flow from plugin to app on window resize ( for WM_PAINT
> - message 15). It could also help me to zero down the issue.
If i understand you right, you are looking for NPN_InvalidateRect() - see the section in [1].
[1] http://hg.mozilla.org/mozilla-central/annotate/9875c9400636/dom/plugins/test/testplugin/nptest.cpp#l1118
| Reporter | ||
Comment 21•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #20)
> (In reply to abhisheksingh.vit2107 from comment #18)
> > (In reply to Georg Fritzsche [:gfritzsche] from comment #17)
> > > (In reply to abhisheksingh.vit2107 from comment #15)
> > > > I'm also still interested in whether NPP_SetWindow() behaves as expected
> > > > here-------> just for concern if it would have issue with NPP_SetWindow() it
> > > > would have not worked for any browser , but it's working fine for chrome .
> > > > Might be I am predicting wrong .
> > >
> > > They might implement things differently such that it happens to work there.
> > > Can you please check if that works properly and you're invalidating as
> > > needed?
> >
> > Yes Georg it's working fine with other browser.
>
> Right, what i meant is: can you check that you implemented this similar to
> [1] and that it behaves fine in Firefox?
> Checking this first before checking into other possibilities makes the most
> sense.
>
> > One query what takes flow from plugin to app on window resize ( for WM_PAINT
> > - message 15). It could also help me to zero down the issue.
>
> If i understand you right, you are looking for NPN_InvalidateRect() - see
> the section in [1].
>
> [1]
> http://hg.mozilla.org/mozilla-central/annotate/9875c9400636/dom/plugins/test/
> testplugin/nptest.cpp#l1118
Please have a look how the code goes ......
static LRESULT CALLBACK PluginWinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
STACKTRACE
switch (message)
{
case WM_PAINT:
{
nsPluginInstance *plugin = (nsPluginInstance *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
plugin->ShowMyApp(hWnd);
}
break;
}
This in turn calls my application...where I take care of myApp to take current rect (firefox) and fit itself.
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•