diff options
-rw-r--r-- | WebCore/platform/graphics/android/TextureOwner.cpp | 7 | ||||
-rw-r--r-- | WebCore/plugins/android/PluginPackageAndroid.cpp | 30 | ||||
-rw-r--r-- | WebCore/rendering/RenderLayer.h | 6 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp | 1 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 14 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/plugins/PluginTimer.cpp | 1 |
8 files changed, 38 insertions, 29 deletions
diff --git a/WebCore/platform/graphics/android/TextureOwner.cpp b/WebCore/platform/graphics/android/TextureOwner.cpp index 6a6845a..c4446d7 100644 --- a/WebCore/platform/graphics/android/TextureOwner.cpp +++ b/WebCore/platform/graphics/android/TextureOwner.cpp @@ -34,8 +34,11 @@ TextureOwner::~TextureOwner() { if (m_ownedTextures.size()) { // This TextureOwner owns textures still! - HashSet<BackedDoubleBufferedTexture*>::iterator it = m_ownedTextures.begin(); - for (; it != m_ownedTextures.end(); ++it) + HashSet<BackedDoubleBufferedTexture*> textures; + // Swap to a local copy because release will modify the iterator. + textures.swap(m_ownedTextures); + HashSet<BackedDoubleBufferedTexture*>::const_iterator it = textures.begin(); + for (; it != textures.end(); ++it) (*it)->release(this); } } diff --git a/WebCore/plugins/android/PluginPackageAndroid.cpp b/WebCore/plugins/android/PluginPackageAndroid.cpp index 97ec624..24de122 100644 --- a/WebCore/plugins/android/PluginPackageAndroid.cpp +++ b/WebCore/plugins/android/PluginPackageAndroid.cpp @@ -206,21 +206,23 @@ bool PluginPackage::load() m_loadCount++; PLUGIN_LOG("Already loaded, count now %d\n", m_loadCount); return true; - } - ASSERT(m_loadCount == 0); - ASSERT(m_module == NULL); + } else { + ASSERT(m_loadCount == 0); + ASSERT(m_module == NULL); - PLUGIN_LOG("Loading \"%s\"\n", m_path.utf8().data()); + PLUGIN_LOG("Loading \"%s\"\n", m_path.utf8().data()); - // Open the library - void *handle = dlopen(m_path.utf8().data(), RTLD_NOW); - if(!handle) { - PLUGIN_LOG("Couldn't load plugin library \"%s\": %s\n", - m_path.utf8().data(), dlerror()); - return false; + // Open the library + void *handle = dlopen(m_path.utf8().data(), RTLD_NOW); + if(!handle) { + PLUGIN_LOG("Couldn't load plugin library \"%s\": %s\n", + m_path.utf8().data(), dlerror()); + return false; + } + m_module = handle; + PLUGIN_LOG("Fetch Info Loaded %p\n", m_module); } - m_module = handle; - PLUGIN_LOG("Fetch Info Loaded %p\n", m_module); + // This object will call dlclose() and set m_module to NULL // when going out of scope. DynamicLibraryCloser dlCloser(&m_module); @@ -228,7 +230,7 @@ bool PluginPackage::load() NP_InitializeFuncPtr NP_Initialize; if(!getEntryPoint(m_module, "NP_Initialize", (void **) &NP_Initialize) || - !getEntryPoint(handle, "NP_Shutdown", (void **) &m_NPP_Shutdown)) { + !getEntryPoint(m_module, "NP_Shutdown", (void **) &m_NPP_Shutdown)) { PLUGIN_LOG("Couldn't find Initialize function\n"); return false; } @@ -254,8 +256,6 @@ bool PluginPackage::load() // Don't close the library - loaded OK. dlCloser.ok(); - // Retain the handle so we can close it in the future. - m_module = handle; m_isLoaded = true; ++m_loadCount; PLUGIN_LOG("Initial load ok, count now %d\n", m_loadCount); diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h index c3c9097..711d398 100644 --- a/WebCore/rendering/RenderLayer.h +++ b/WebCore/rendering/RenderLayer.h @@ -142,6 +142,9 @@ public: return m_overflowClipRect == other.overflowClipRect() && m_fixedClipRect == other.fixedClipRect() && m_posClipRect == other.posClipRect() && +#if ENABLE(ANDROID_OVERFLOW_SCROLL) + m_hitTestClip == other.hitTestClip() && +#endif m_fixed == other.fixed(); } @@ -150,6 +153,9 @@ public: m_overflowClipRect = other.overflowClipRect(); m_fixedClipRect = other.fixedClipRect(); m_posClipRect = other.posClipRect(); +#if ENABLE(ANDROID_OVERFLOW_SCROLL) + m_hitTestClip = other.hitTestClip(); +#endif m_fixed = other.fixed(); return *this; } diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp index cb1efe1..f0958d9 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp @@ -37,7 +37,6 @@ #include "FrameLoader.h" #include "FrameView.h" #include "Geolocation.h" -#include "GraphicsLayerAndroid.h" #include "Icon.h" #include "Page.h" #include "PopupMenuAndroid.h" diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 39f6f2d..fe1d0db 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -2964,7 +2964,7 @@ static void scrollLayer(WebCore::RenderObject* renderer, WebCore::IntPoint* pos) return; // The cache uses absolute coordinates when clicking on nodes and it assumes // the layer is not scrolled. - layer->scrollToOffset(0, 0, false, false); + layer->scrollToOffset(0, 0, true, false); WebCore::IntRect absBounds = renderer->absoluteBoundingBoxRect(); // Do not include the outline when moving the node's bounds. @@ -2974,7 +2974,7 @@ static void scrollLayer(WebCore::RenderObject* renderer, WebCore::IntPoint* pos) absBounds.move(-layerBounds.x(), -layerBounds.y()); // Scroll the layer to the node's position. - layer->scrollToOffset(absBounds.x(), absBounds.y(), false, true); + layer->scrollToOffset(absBounds.x(), absBounds.y(), true, true); // Update the mouse position to the layer offset. pos->move(-layer->scrollXOffset(), -layer->scrollYOffset()); 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 - <GraphicsLayerAndroid*>(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>& layerTracker, RenderLayerBacking* back = layer->backing(); if (!back) return; - GraphicsLayerAndroid* grLayer = static_cast - <GraphicsLayerAndroid*>(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()); diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 683c2a3..28babc0 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1022,8 +1022,8 @@ static const ScrollableLayerAndroid* findScrollableLayer( x -= bounds.fLeft; y -= bounds.fTop; int count = parent->countChildren(); - for (int i = 0; i < count; i++) { - const LayerAndroid* child = parent->getChild(i); + while (count--) { + const LayerAndroid* child = parent->getChild(count); const ScrollableLayerAndroid* result = findScrollableLayer(child, x, y, foundBounds); if (result) { diff --git a/WebKit/android/plugins/PluginTimer.cpp b/WebKit/android/plugins/PluginTimer.cpp index 23cac77..9ed6a80 100644 --- a/WebKit/android/plugins/PluginTimer.cpp +++ b/WebKit/android/plugins/PluginTimer.cpp @@ -48,6 +48,7 @@ namespace WebCore { } m_prev = 0; *list = this; + relaxAdoptionRequirement(); } PluginTimer::~PluginTimer() |