diff options
| -rw-r--r-- | WebCore/platform/PlatformTouchPoint.h | 1 | ||||
| -rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.h | 7 | ||||
| -rw-r--r-- | WebCore/platform/qt/PlatformTouchPointQt.cpp | 1 | ||||
| -rw-r--r-- | WebCore/rendering/RenderLayerCompositor.cpp | 13 | ||||
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 8 | ||||
| -rw-r--r-- | WebKit/android/jni/WebViewCore.h | 1 | ||||
| -rw-r--r-- | WebKit/android/nav/CachedPrefix.h | 7 |
7 files changed, 24 insertions, 14 deletions
diff --git a/WebCore/platform/PlatformTouchPoint.h b/WebCore/platform/PlatformTouchPoint.h index d4f855e..90a3ace 100644 --- a/WebCore/platform/PlatformTouchPoint.h +++ b/WebCore/platform/PlatformTouchPoint.h @@ -40,7 +40,6 @@ public: TouchReleased, TouchPressed, TouchMoved, - TouchStationary, TouchCancelled }; diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index e9416c1..ef6af3b 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -25,6 +25,13 @@ #include "StringHash.h" #include <wtf/HashMap.h> +#ifndef BZERO_DEFINED +#define BZERO_DEFINED +// http://www.opengroup.org/onlinepubs/000095399/functions/bzero.html +// For maximum portability, it is recommended to replace the function call to bzero() as follows: +#define bzero(b,len) (memset((b), '\0', (len)), (void) 0) +#endif + class SkCanvas; class SkMatrix; class SkPicture; diff --git a/WebCore/platform/qt/PlatformTouchPointQt.cpp b/WebCore/platform/qt/PlatformTouchPointQt.cpp index c293212..6afe4a1 100644 --- a/WebCore/platform/qt/PlatformTouchPointQt.cpp +++ b/WebCore/platform/qt/PlatformTouchPointQt.cpp @@ -35,7 +35,6 @@ PlatformTouchPoint::PlatformTouchPoint(const QTouchEvent::TouchPoint& point) case Qt::TouchPointReleased: m_state = TouchReleased; break; case Qt::TouchPointMoved: m_state = TouchMoved; break; case Qt::TouchPointPressed: m_state = TouchPressed; break; - case Qt::TouchPointStationary: m_state = TouchStationary; break; } m_screenPos = point.screenPos().toPoint(); m_pos = point.pos().toPoint(); diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp index 22118fe..8621c1e 100644 --- a/WebCore/rendering/RenderLayerCompositor.cpp +++ b/WebCore/rendering/RenderLayerCompositor.cpp @@ -462,6 +462,13 @@ bool RenderLayerCompositor::overlapsCompositedLayers(OverlapMap& overlapMap, con return false; } +#if ENABLE(COMPOSITED_FIXED_ELEMENTS) +static bool needsCompositingForFixedLayer(const RenderLayer* layer) +{ + return layer->isFixed() && layer->width() > 0 && layer->height() > 0; +} +#endif + // Recurse through the layers in z-index and overflow order (which is equivalent to painting order) // For the z-order children of a compositing layer: // If a child layers has a compositing layer, then all subsequent layers must @@ -505,7 +512,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O #if ENABLE(COMPOSITED_FIXED_ELEMENTS) // If we are a fixed layer, signal it to our siblings - if (layer->isFixed()) + if (needsCompositingForFixedLayer(layer)) compositingState.m_fixedSibling = true; if (!willBeComposited && compositingState.m_fixedSibling) @@ -547,7 +554,7 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O // subsequent siblings as we do for the normal flow // and positive z-order. for (size_t j = 0; j < listSize; ++j) { - if ((negZOrderList->at(j))->isFixed()) { + if (needsCompositingForFixedLayer(negZOrderList->at(j))) { childState.m_fixedSibling = true; break; } @@ -974,7 +981,7 @@ bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const // if an ancestor is fixed positioned, we need to be composited... const RenderLayer* currLayer = layer; while ((currLayer = currLayer->parent())) { - if (currLayer->isComposited() && currLayer->isFixed()) + if (currLayer->isComposited() && needsCompositingForFixedLayer(currLayer)) return true; } #endif diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 70e96cd..14fd44e 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -2075,14 +2075,6 @@ bool WebViewCore::handleTouchEvent(int action, int x, int y, int metaState) // Track previous touch and if stationary set the state. WebCore::IntPoint pt(x - m_scrollOffsetX, y - m_scrollOffsetY); -// handleTouchEvent() in EventHandler.cpp doesn't handle TouchStationary, which -// causes preventDefault be false when it returns. As our Java side may continue -// process the events if WebKit doesn't, it can cause unexpected result. -// if (type == WebCore::TouchMove && pt == m_lastTouchPoint) -// touchState = WebCore::PlatformTouchPoint::TouchStationary; - - m_lastTouchPoint = pt; - WebCore::PlatformTouchEvent te(pt, type, touchState, metaState); preventDefault = m_mainFrame->eventHandler()->handleTouchEvent(te); #endif diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 056dba1..4ed17bf 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -558,7 +558,6 @@ namespace android { #if ENABLE(TOUCH_EVENTS) bool m_forwardingTouchEvents; - IntPoint m_lastTouchPoint; #endif #if DEBUG_NAV_UI diff --git a/WebKit/android/nav/CachedPrefix.h b/WebKit/android/nav/CachedPrefix.h index b682288..73a5c2c 100644 --- a/WebKit/android/nav/CachedPrefix.h +++ b/WebKit/android/nav/CachedPrefix.h @@ -43,4 +43,11 @@ #define OFFSETOF(type, field) ((char*)&(((type*)1)->field) - (char*)1) // avoids gnu warning +#ifndef BZERO_DEFINED +#define BZERO_DEFINED +// http://www.opengroup.org/onlinepubs/000095399/functions/bzero.html +// For maximum portability, it is recommended to replace the function call to bzero() as follows: +#define bzero(b,len) (memset((b), '\0', (len)), (void) 0) +#endif + #endif |
