Closed
Bug 959223
Opened 10 years ago
Closed 10 years ago
Flash plugins are not resized correctly according to resolution
Categories
(Firefox for Android Graveyard :: Plugins, defect)
Tracking
(firefox26 wontfix, firefox27 fixed, firefox28 fixed, firefox29 fixed)
RESOLVED
FIXED
Firefox 29
People
(Reporter: snorp, Assigned: snorp)
Details
Attachments
(3 files, 3 obsolete files)
2.98 KB,
patch
|
snorp
:
review+
bajaj
:
approval-mozilla-aurora+
bajaj
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
1.53 KB,
patch
|
kats
:
review+
bajaj
:
approval-mozilla-aurora+
bajaj
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
5.40 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
When you zoom in on a page with a Flash plugin, the content is scaled accordingly but never resized to draw at the new resolution.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8359278 -
Flags: review+
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8359279 -
Flags: review?(bugmail.mozilla)
Comment 3•10 years ago
|
||
Comment on attachment 8359278 [details] [diff] [review] Add nsPresShell::GetCumulativeResolution (carry r+ from bug 947523) Review of attachment 8359278 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsIPresShell.h @@ +1254,5 @@ > virtual nsresult SetResolution(float aXResolution, float aYResolution) = 0; > gfxSize GetResolution() { return gfxSize(mXResolution, mYResolution); } > float GetXResolution() { return mXResolution; } > float GetYResolution() { return mYResolution; } > + virtual gfxSize GetCumulativeResolution() = 0; Make sure you bump the IID in this file.
Updated•10 years ago
|
Attachment #8359279 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3) > Comment on attachment 8359278 [details] [diff] [review] > Add nsPresShell::GetCumulativeResolution (carry r+ from bug 947523) > > Review of attachment 8359278 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: layout/base/nsIPresShell.h > @@ +1254,5 @@ > > virtual nsresult SetResolution(float aXResolution, float aYResolution) = 0; > > gfxSize GetResolution() { return gfxSize(mXResolution, mYResolution); } > > float GetXResolution() { return mXResolution; } > > float GetYResolution() { return mYResolution; } > > + virtual gfxSize GetCumulativeResolution() = 0; > > Make sure you bump the IID in this file. Weird, I thought I did that, but don't see it in the patch. Nice catch, thanks.
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef7bd965a6c6 https://hg.mozilla.org/integration/mozilla-inbound/rev/afb247393486
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8359278 [details] [diff] [review] Add nsPresShell::GetCumulativeResolution (carry r+ from bug 947523) [Approval Request Comment] Bug caused by (feature/regressing bug #): unknown User impact if declined: blurry Flash content Testing completed (on m-c, etc.): m-c for a day Risk to taking this patch (and alternatives if risky): None, only adds API String or IDL/UUID changes made by this patch: nsIPresShell UUID changed
Attachment #8359278 -
Flags: approval-mozilla-beta?
Attachment #8359278 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8359279 [details] [diff] [review] Correctly size plugins on Android according to resolution [Approval Request Comment] Bug caused by (feature/regressing bug #): unknown User impact if declined: blurry Flash content Testing completed (on m-c, etc.): m-c for a day Risk to taking this patch (and alternatives if risky): Low String or IDL/UUID changes made by this patch: None
Attachment #8359279 -
Flags: approval-mozilla-beta?
Attachment #8359279 -
Flags: approval-mozilla-aurora?
Comment 8•10 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #6) > Comment on attachment 8359278 [details] [diff] [review] > Add nsPresShell::GetCumulativeResolution (carry r+ from bug 947523) > > [Approval Request Comment] > Bug caused by (feature/regressing bug #): unknown > User impact if declined: blurry Flash content > Testing completed (on m-c, etc.): m-c for a day > Risk to taking this patch (and alternatives if risky): None, only adds API > String or IDL/UUID changes made by this patch: nsIPresShell UUID changed NI on :bsmedberg to see if we have any alternatives here or if this patch would is ok as the general rule is we do not allow UUID changes on beta.
Flags: needinfo?(benjamin)
Comment 9•10 years ago
|
||
I don't think we can take this on beta as-is. It's clear from all of the MOZILLA_INTERNAL_API #ifdefs in nsIPresShell.h that there are consumers who use this from outside libxul, so it's possible (and even likely) that extensions are using this and the changes here would break them. The "obvious" next step is to have a temporary nsIPresShell_MOZILLA27 interface with it's own IID and do a little QIing in the one place you need to call it. Since nsPresShell is the only implementer of nsIPresShell, I don't think that woul be a huge burden.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #9) > I don't think we can take this on beta as-is. It's clear from all of the > MOZILLA_INTERNAL_API #ifdefs in nsIPresShell.h that there are consumers who > use this from outside libxul, so it's possible (and even likely) that > extensions are using this and the changes here would break them. > > The "obvious" next step is to have a temporary nsIPresShell_MOZILLA27 > interface with it's own IID and do a little QIing in the one place you need > to call it. Since nsPresShell is the only implementer of nsIPresShell, I > don't think that woul be a huge burden. I don't actually don't need to query it by the ID. I already have a pointer instance. In that case maybe it's best to just leave the ID alone?
Comment 11•10 years ago
|
||
You can also inline the GetCumulativeResolution function into the call site and make it a branch-specific patch.
Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #11) > You can also inline the GetCumulativeResolution function into the call site > and make it a branch-specific patch. Yeah I think this may be the best way to go actually.
Assignee | ||
Comment 13•10 years ago
|
||
Ugh, it's apparently not really kosher to include nsPresShell.h from DOM. We need that to get the parent PresShell. NI on bsmedberg for just nuking the UUID change (comment #10)
Flags: needinfo?(benjamin)
Comment 14•10 years ago
|
||
If you add the virtual method on nsIPresShell you need to rev the IID. If you add it just to nsPresShell.h or to a new class nsIPresShell_MOZILLA27 then you can leave it alone.
Flags: needinfo?(benjamin)
Assignee | ||
Comment 15•10 years ago
|
||
Attachment #8363820 -
Flags: feedback?(benjamin)
Comment 16•10 years ago
|
||
Comment on attachment 8363820 [details] [diff] [review] New patch for Aurora/Beta I'm going to mark r+ with changes. >diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp > // NotifySize() causes Flash to do a bunch of stuff like ask for surfaces to render > // into, set y-flip flags, etc, so we do this at the beginning. >- float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution(); >- float yResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetYResolution(); >- ScreenSize screenSize = (r * LayoutDeviceToScreenScale(xResolution, yResolution)).Size(); >+ gfxSize resolution = reinterpret_cast<nsIPresShell_MOZILLA27*>(mObjectFrame->PresContext()->PresShell())->GetCumulativeResolution(); We need to replace the reinterpret_cast with a static_cast. reinterpret_cast is making assumptions about vtable layouts which aren't safe in this context. >diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h >+class nsIPresShell_MOZILLA27 { So this should inherit from nsIPresShell, e.g. class nsIPresShell_MOZILLA27 : public nsIPresShell > class PresShell : public nsIPresShell, >+ public nsIPresShell_MOZILLA27, And then this can just be "class PresShell : public nsIPresShell_MOZILLA27".
Attachment #8363820 -
Flags: feedback?(benjamin) → feedback+
Assignee | ||
Comment 17•10 years ago
|
||
Attachment #8363820 -
Attachment is obsolete: true
Attachment #8363905 -
Flags: review?(benjamin)
Assignee | ||
Comment 18•10 years ago
|
||
Oops.
Attachment #8363905 -
Attachment is obsolete: true
Attachment #8363905 -
Flags: review?(benjamin)
Attachment #8363912 -
Flags: review?(benjamin)
Comment 19•10 years ago
|
||
Comment on attachment 8363912 [details] [diff] [review] New patch for Aurora/Beta There's still a reinterpret_cast in nsPluginInstanceOwner.cpp which needs to be fixed. r=me with that
Attachment #8363912 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 20•10 years ago
|
||
bajaj, this should be ok to land on Aurora now. Not sure what you want to do about Beta.
Flags: needinfo?(bbajaj)
Comment 21•10 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #20) > bajaj, this should be ok to land on Aurora now. Not sure what you want to do > about Beta. Are you suggesting that the updated patch to accommodate acceptable UUID change as suggested in comment #10 do not apply to beta ?
Flags: needinfo?(bbajaj)
Assignee | ||
Comment 22•10 years ago
|
||
(In reply to bhavana bajaj [:bajaj] from comment #21) > (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #20) > > bajaj, this should be ok to land on Aurora now. Not sure what you want to do > > about Beta. > > Are you suggesting that the updated patch to accommodate acceptable UUID > change as suggested in comment #10 do not apply to beta ? No, it's fine for beta too, but wasn't sure if it was too late now. We can land it.
Assignee | ||
Comment 23•10 years ago
|
||
Apparently uploaded the wrong patch before.
Attachment #8363912 -
Attachment is obsolete: true
Attachment #8364132 -
Flags: review+
Assignee | ||
Comment 24•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/e8f6bdf8db3d https://hg.mozilla.org/releases/mozilla-beta/rev/85dea29cbde9
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
status-firefox26:
--- → wontfix
Updated•10 years ago
|
Attachment #8359278 -
Flags: approval-mozilla-beta?
Attachment #8359278 -
Flags: approval-mozilla-beta+
Attachment #8359278 -
Flags: approval-mozilla-aurora?
Attachment #8359278 -
Flags: approval-mozilla-aurora+
Updated•10 years ago
|
Attachment #8359279 -
Flags: approval-mozilla-beta?
Attachment #8359279 -
Flags: approval-mozilla-beta+
Attachment #8359279 -
Flags: approval-mozilla-aurora?
Attachment #8359279 -
Flags: approval-mozilla-aurora+
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Target Milestone: --- → Firefox 29
Updated•6 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•