Bug 716403 - Offset fixed layers so the toolbar doesn't obscure them. r=nrc,kats

Offset fixed layers in the compositor so that the toolbar in Firefox for Android
doesn't obscure them. This does not affect layout, so input on the elements in
said layers will appear broken.
This commit is contained in:
Chris Lord
2013-03-06 16:55:59 +00:00
parent fc8c86b63d
commit 5647557b0c
11 changed files with 175 additions and 17 deletions

View File

@@ -191,12 +191,17 @@ public:
float GetX(JNIEnv *env);
float GetY(JNIEnv *env);
float GetScale(JNIEnv *env);
void GetFixedLayerMargins(JNIEnv *env, gfx::Margin &aFixedLayerMargins);
private:
static jclass jViewTransformClass;
static jfieldID jXField;
static jfieldID jYField;
static jfieldID jScaleField;
static jfieldID jFixedLayerMarginLeft;
static jfieldID jFixedLayerMarginTop;
static jfieldID jFixedLayerMarginRight;
static jfieldID jFixedLayerMarginBottom;
};
class AndroidProgressiveUpdateData : public WrappedJavaObject {
@@ -257,7 +262,8 @@ public:
void SetFirstPaintViewport(const nsIntPoint& aOffset, float aZoom, const nsIntRect& aPageRect, const gfx::Rect& aCssPageRect);
void SetPageRect(const gfx::Rect& aCssPageRect);
void SyncViewportInfo(const nsIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated,
nsIntPoint& aScrollOffset, float& aScaleX, float& aScaleY);
nsIntPoint& aScrollOffset, float& aScaleX, float& aScaleY,
gfx::Margin& aFixedLayerMargins);
bool ProgressiveUpdateCallback(bool aHasPendingNewThebesContent, const gfx::Rect& aDisplayPort, float aDisplayResolution, bool aDrawingCritical, gfx::Rect& aViewport, float& aScaleX, float& aScaleY);
bool CreateFrame(AutoLocalJNIFrame *jniFrame, AndroidLayerRendererFrame& aFrame);
bool ActivateProgram(AutoLocalJNIFrame *jniFrame);