From 1a8ec29fc0211a6b5c53a8cd9ce20be5e630b005 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Wed, 26 Jan 2011 14:32:43 -0500 Subject: Fix hit testing inside layers. A new webkit merge added a couple methods to ClipRects that were not copying the hit test rect. This make the clip rect empty during hit testing which was clipping out all nodes in scrollable layers. When tracking a layer, use the foreground layer if present as it will contain the right nodes. When looking for a scrollable layer, traverse the children in reverse drawing order to find the top-most visible layer. This allows orkut.com to scroll. Remove a couple of casts and headers. Use relaxAdoptionRequirement() to avoid a RefCounted assert. Swap the texture owner hash set during deletion as release can modify the iterator concurrently. Update the scrollbars (even though we don't have any) when scrolling a layer to keep the scroll position of the scrollbar in sync with the layer. Rewrite a little bit of PluginPackageAndroid. m_module may be non-null during load. If it is null, load the library and store it in m_module. Follow the regular path assuming m_module is not null. Bug: 3373179 Change-Id: If07ec9735b30c1e98e363667378a8d253a841a45 --- WebKit/android/nav/CacheBuilder.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'WebKit/android/nav/CacheBuilder.cpp') diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 40b2711..135bacc 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -36,7 +36,6 @@ #include "FrameTree.h" #include "FrameView.h" //#include "GraphicsContext.h" -#include "GraphicsLayerAndroid.h" #include "HTMLAreaElement.h" #include "HTMLImageElement.h" #include "HTMLInputElement.h" @@ -47,6 +46,7 @@ #include "HTMLTextAreaElement.h" #include "InlineTextBox.h" #include "KURL.h" +#include "LayerAndroid.h" #include "PluginView.h" #include "RegisteredEventListener.h" #include "RenderImage.h" @@ -508,9 +508,8 @@ void CacheBuilder::Debug::groups() { if (renderer && renderer->hasLayer()) { RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); RenderLayerBacking* back = layer->backing(); - GraphicsLayerAndroid* grLayer = static_cast - (back ? back->graphicsLayer() : 0); - LayerAndroid* aLayer = grLayer ? grLayer->contentLayer() : 0; + GraphicsLayer* grLayer = back ? back->graphicsLayer() : 0; + LayerAndroid* aLayer = grLayer ? grLayer->platformLayer() : 0; const SkPicture* pict = aLayer ? aLayer->picture() : 0; const IntRect& r = renderer->absoluteBoundingBoxRect(); snprintf(scratch, sizeof(scratch), "// layer:%p back:%p" @@ -2906,11 +2905,12 @@ void CacheBuilder::TrackLayer(WTF::Vector& layerTracker, RenderLayerBacking* back = layer->backing(); if (!back) return; - GraphicsLayerAndroid* grLayer = static_cast - (back->graphicsLayer()); + GraphicsLayer* grLayer = back->graphicsLayer(); + if (back->hasContentsLayer()) + grLayer = back->foregroundLayer(); if (!grLayer) return; - LayerAndroid* aLayer = grLayer->contentLayer(); + LayerAndroid* aLayer = grLayer->platformLayer(); if (!aLayer) return; IntPoint scroll(layer->scrollXOffset(), layer->scrollYOffset()); -- cgit v1.1