Closed Bug 531871 Opened 10 years ago Closed 10 years ago

Clipping problem with some flash

Categories

(Firefox for Android Graveyard :: General, defect, critical)

ARM
Maemo
defect
Not set
critical

Tracking

(fennec1.0+)

VERIFIED FIXED
Tracking Status
fennec 1.0+ ---

People

(Reporter: dougt, Assigned: stechz)

Details

Attachments

(1 file)

Steps to reproduce:

1) load http://people.mozilla.org/~dougt/flash_test.html
2) pan right and up such that the plugin is partially clipped by the url bar
3) pan down such that the plugin is completely in view.

Expected result:

The plugin to draw completely and not be clipped

Actual result:

When panning down such that the plugin is in view, we maintain the clip and do not draw the upper part of the plugin.


Here are the calls to setAbsoluteScreenPosition:

loading the page:

*** setAbsoluteScreenPosition  [8,80,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [8,80,0,0] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [262,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,80,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [262,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,80,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [262,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,80,250,100] ,  [0,0,250,100] 
*** setAbsoluteScreenPosition  [262,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,80,250,100] ,  [0,0,250,100] 


panning the plugin offscreen:

*** setAbsoluteScreenPosition  [262,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,80,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [262,112,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,12,250,100] ,  [0,0,250,100] 
*** setAbsoluteScreenPosition  [262,112,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [8,12,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [409,112,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [155,12,250,100] ,  [0,64,250,36] 


panning the plugin back in view:

*** setAbsoluteScreenPosition  [409,112,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [155,12,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [409,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [155,80,250,100] ,  [0,64,250,36] 
*** setAbsoluteScreenPosition  [409,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [155,80,250,100] ,  [-8,-8,0,0] 
*** setAbsoluteScreenPosition  [409,180,0,0] ,  [-262,-108,0,0] 
*** setAbsoluteScreenPosition  [155,80,250,100] ,  [0,64,250,36]
tracking-fennec: --- → ?
tracking-fennec: ? → 1.0+
Assignee: nobody → webapps
The math was just wrong.

The problem boiled down to this: the critical region is represented in viewport coordinates (origin is at tile-container top left).  crit is (0, 0, ..., ...) whether the urlbar is being shown or not.

After mapping to client coordinates, it then makes sense to subtract the urlbar area in client coordinates.  I added a comment that explains what we are conceptually doing with the Math.max magic.
Attachment #415253 - Flags: review?(mark.finkle)
Comment on attachment 415253 [details] [diff] [review]
Do urlbar subtraction after mapping into client coordinates

>diff --git a/chrome/content/browser.js b/chrome/content/browser.js

>   updateEmbedRegions: function updateEmbedRegions(objects, crit) {

>       oprivate = objects[i].QueryInterface(nsIObjectLoadingContent);

Just realized that you might be able to QI this when you add to the objects array. That way you save some time when updating.
Attachment #415253 - Flags: review?(mark.finkle) → review+
Pushed: http://hg.mozilla.org/mobile-browser/rev/d002eaaf4528
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
verified FIXED on build:

Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2b5pre) Gecko/20091202 Firefox/3.6b5pre Fennec/1.0b6pre
Status: RESOLVED → VERIFIED
Component: Linux/Maemo → General
QA Contact: maemo-linux → general
You need to log in before you can comment on or make changes to this bug.