Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Fix SetScaleToSize call for plugins

RESOLVED FIXED in mozilla15

Status

()

Core
Plug-ins
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bas, Assigned: bas)

Tracking

unspecified
mozilla15
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 627006 [details] [diff] [review]
Fix SetScaleToSize calling

The current code that calls SetScaleToSize calls !UseAsyncRendering to not call this on OS X for some cases. However that is incorrect, UseAsyncRendering actually pretty much returns true everywhere at the moment and thus SetScaleToSize never gets called. And for NPAPI Async drawing we don't get the right scaling when asynchronous surface changes are made by the plugin.

I don't know this code very well and it's hard to make the right decision, we cannot just always call SetScaleToSize as it's not strictly correct for the CoreAnimation drawing model and it's unsupported for OpenGL layer managers.

The best thing to do for now (as we'll want to fix support for NPAPI async drawing), seems to me to just call SetScaleToSize on windows. And use the container size for determining the size only when using the CoreAnimation drawing model.

I will make sure a follow-up bug is filed to find a more proper (cross-platform) way to address the issue before we start using the Async bitmap model on other platforms.
Attachment #627006 - Flags: review?(roc)
Comment on attachment 627006 [details] [diff] [review]
Fix SetScaleToSize calling

Review of attachment 627006 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/generic/nsObjectFrame.cpp
@@ +1522,4 @@
>      size = container->GetCurrentSize();
> +  } else
> +#endif
> +  size = gfxIntSize(window->width, window->height);

{} around this
Attachment #627006 - Flags: review?(roc) → review+
Seems to me we should just add support for SetScaleToSize to all layer managers and call SetScaleToSize always. Why wouldn't that be OK for the CoreAnimation drawing model?
(Assignee)

Comment 3

5 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #2)
> Seems to me we should just add support for SetScaleToSize to all layer
> managers and call SetScaleToSize always. Why wouldn't that be OK for the
> CoreAnimation drawing model?

From what I understand the scaling behavior of CoreAnimation isn't well defined. (i.e. it would at least change behavior from what it is now)
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4470d16d227

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/d4470d16d227
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
If by 'SetScaleToSize' you mean take the current frame and stretch it to fix the container I don't see anything wrong with that.

Updated

5 years ago
Depends on: 794836
You need to log in before you can comment on or make changes to this bug.