summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp1
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp1
-rw-r--r--WebKit/android/jni/WebViewCore.cpp4
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp14
-rw-r--r--WebKit/android/nav/WebView.cpp4
-rw-r--r--WebKit/android/plugins/ANPOpenGLInterface.cpp21
-rw-r--r--WebKit/android/plugins/ANPOpenGL_npapi.h6
-rw-r--r--WebKit/android/plugins/PluginTimer.cpp1
8 files changed, 39 insertions, 13 deletions
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/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index 5468a1e..476f017 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -539,7 +539,6 @@ WebFrame::loadStarted(WebCore::Frame* frame)
WebCore::FrameLoadType loadType = frame->loader()->loadType();
if (loadType == WebCore::FrameLoadTypeReplace ||
- loadType == WebCore::FrameLoadTypeSame ||
(loadType == WebCore::FrameLoadTypeRedirectWithLockedBackForwardList &&
!isMainFrame))
return;
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 6322acd..0163376 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -3233,7 +3233,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.
@@ -3243,7 +3243,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 b11dc69..046b354 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -1015,8 +1015,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/ANPOpenGLInterface.cpp b/WebKit/android/plugins/ANPOpenGLInterface.cpp
index 55eb3e0..8f5f9b4 100644
--- a/WebKit/android/plugins/ANPOpenGLInterface.cpp
+++ b/WebKit/android/plugins/ANPOpenGLInterface.cpp
@@ -30,6 +30,11 @@
#include "PluginView.h"
#include "PluginWidgetAndroid.h"
#include "MediaLayer.h"
+#include "WebViewCore.h"
+#include "Frame.h"
+#include "Page.h"
+#include "Chrome.h"
+#include "ChromeClient.h"
using namespace android;
@@ -84,6 +89,21 @@ static void anp_releaseTexture(NPP instance, const ANPTextureInfo* textureInfo)
texture->producerReleaseAndSwap();
}
+static void anp_invertPluginContent(NPP instance, bool isContentInverted) {
+ WebCore::PluginView* pluginView = pluginViewForInstance(instance);
+ PluginWidgetAndroid* pluginWidget = pluginView->platformPluginWidget();
+ WebCore::MediaLayer* mediaLayer = pluginWidget->getLayer();
+
+ mediaLayer->invertContents(isContentInverted);
+
+ //force the layer to sync to the UI thread
+ WebViewCore* wvc = pluginWidget->webViewCore();
+ if (wvc)
+ wvc->mainFrame()->page()->chrome()->client()->scheduleCompositingLayerSync();
+}
+
+
+
///////////////////////////////////////////////////////////////////////////////
#define ASSIGN(obj, name) (obj)->name = anp_##name
@@ -94,4 +114,5 @@ void ANPOpenGLInterfaceV0_Init(ANPInterface* v) {
ASSIGN(i, acquireContext);
ASSIGN(i, lockTexture);
ASSIGN(i, releaseTexture);
+ ASSIGN(i, invertPluginContent);
}
diff --git a/WebKit/android/plugins/ANPOpenGL_npapi.h b/WebKit/android/plugins/ANPOpenGL_npapi.h
index bfca0dd..5aabbc4 100644
--- a/WebKit/android/plugins/ANPOpenGL_npapi.h
+++ b/WebKit/android/plugins/ANPOpenGL_npapi.h
@@ -52,6 +52,12 @@ struct ANPOpenGLInterfaceV0 : ANPInterface {
/**
*/
void (*releaseTexture)(NPP instance, const ANPTextureInfo*);
+
+ /**
+ * Invert the contents of the plugin on the y-axis.
+ * default is to not be inverted (i.e. use OpenGL coordinates)
+ */
+ void (*invertPluginContent)(NPP instance, bool isContentInverted);
};
#endif //ANPOpenGL_npapi_H
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()