diff options
author | Nicolas Roard <nicolas@android.com> | 2010-01-07 14:22:22 +0000 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2010-01-14 21:09:00 +0000 |
commit | 388e461f3d6bf782b3cfb4bb21bc6264cef9323c (patch) | |
tree | 05bc536e78cf8385a91ceda4cb52cbd67eed2fa6 /WebCore/platform/graphics/android/LayerAndroid.h | |
parent | 29b325cb949b1a41ac8bdeaa77977fcd342aec31 (diff) | |
download | external_webkit-388e461f3d6bf782b3cfb4bb21bc6264cef9323c.zip external_webkit-388e461f3d6bf782b3cfb4bb21bc6264cef9323c.tar.gz external_webkit-388e461f3d6bf782b3cfb4bb21bc6264cef9323c.tar.bz2 |
Add proper support for fixed position elements
this is two-part change, see http://android-git.corp.google.com/g/#change,37092 for the java counterpart.
This CL implements fixed position elements (css position: fixed) using layers, supporting pixels and percent lengths.
It addresses http://b/1914365
Diffstat (limited to 'WebCore/platform/graphics/android/LayerAndroid.h')
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index 284185d..467c7dd 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -25,6 +25,7 @@ #include "FloatSize.h" #include "GraphicsContext.h" #include "GraphicsLayer.h" +#include "Length.h" #include "RefPtr.h" #include "StringHash.h" #include "Vector.h" @@ -64,7 +65,7 @@ public: void setBackgroundColor(const Color& color); void setIsRootLayer(bool isRootLayer) { m_isRootLayer = isRootLayer; } - void paintOn(float scrollX, float scrollY, float scale, SkCanvas*); + void paintOn(int scrollX, int scrollY, int width, int height, float scale, SkCanvas*); GraphicsContext* paintContext(); void removeAllChildren() { m_children.clear(); } void addChildren(LayerAndroid* layer) { m_children.append(layer); } @@ -77,7 +78,7 @@ public: FloatPoint translation() { return m_translation; } FloatSize size() { return m_size; } - void setFixedPosition(FloatPoint position); + void setFixedPosition(Length left, Length top, Length right, Length bottom); void addAnimation(PassRefPtr<AndroidAnimation> anim); void removeAnimation(const String& name); Vector<RefPtr<AndroidAnimationValue> >* evaluateAnimations() const; @@ -87,11 +88,13 @@ public: private: - void paintChildren(float scrollX, float scrollY, + void paintChildren(int scrollX, int scrollY, + int width, int height, float scale, SkCanvas* canvas, float opacity); - void paintMe(float scrollX, float scrollY, + void paintMe(int scrollX, int scrollY, + int width, int height, float scale, SkCanvas* canvas, float opacity); @@ -110,10 +113,14 @@ private: FloatSize m_size; FloatPoint m_position; FloatPoint m_translation; - FloatPoint m_fixedPosition; FloatPoint3D m_anchorPoint; FloatPoint3D m_scale; + Length m_fixedLeft; + Length m_fixedTop; + Length m_fixedRight; + Length m_fixedBottom; + SkPicture* m_recordingPicture; Color m_backgroundColor; |