summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-03-24 13:41:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-03-24 13:41:14 -0700
commit4cc15eff86db25951350751a7089e3985bc94a8c (patch)
tree43186a362f28acf34e9903594024778555684304 /WebCore/platform
parent05c48163969164e8c80eba17081d5c9f1c7efb51 (diff)
parent84b2cee4185865d37e64bb3cc7a9e1bd6051eb7c (diff)
downloadexternal_webkit-4cc15eff86db25951350751a7089e3985bc94a8c.zip
external_webkit-4cc15eff86db25951350751a7089e3985bc94a8c.tar.gz
external_webkit-4cc15eff86db25951350751a7089e3985bc94a8c.tar.bz2
Merge "Mark positioned elements as needing a relayout when checking for hit test. This is necessary when using composited fixed layers, as the layers position may have moved UI-side, while the webkit's related position of those layers may not have been updated yet."
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp8
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index fa4a180..3571a49 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -115,6 +115,7 @@ GraphicsLayerAndroid::GraphicsLayerAndroid(GraphicsLayerClient* client) :
m_needsNotifyClient(false),
m_haveContents(false),
m_haveImage(false),
+ m_hasFixedLayers(false),
m_translateX(0),
m_translateY(0),
m_currentTranslateX(0),
@@ -253,6 +254,13 @@ void GraphicsLayerAndroid::updateFixedPosition()
offsetFromRenderer().width(),
offsetFromRenderer().height(),
w, h);
+
+ GraphicsLayerAndroid* rootGraphicsLayer = this;
+
+ while (rootGraphicsLayer->parent())
+ rootGraphicsLayer = static_cast<GraphicsLayerAndroid*>(rootGraphicsLayer->parent());
+
+ rootGraphicsLayer->setHasFixedLayers(true);
}
}
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.h b/WebCore/platform/graphics/android/GraphicsLayerAndroid.h
index 25f70b4..d0347a7 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.h
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.h
@@ -121,6 +121,9 @@ public:
void sendImmediateRepaint();
LayerAndroid* contentLayer() { return m_contentLayer; }
+ bool hasFixedLayers() const { return m_hasFixedLayers; }
+ void setHasFixedLayers(bool val) { m_hasFixedLayers = val; }
+
static int instancesCount();
private:
@@ -139,6 +142,8 @@ private:
bool m_haveContents;
bool m_haveImage;
+ bool m_hasFixedLayers;
+
float m_translateX;
float m_translateY;
float m_currentTranslateX;