summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r--Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp19
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp42
2 files changed, 39 insertions, 22 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index 7ff5b19..ab5fcb0 100644
--- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -37,12 +37,15 @@
#include "FrameLoader.h"
#include "FrameView.h"
#include "Geolocation.h"
+#include "GraphicsLayerAndroid.h"
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#include "Icon.h"
#include "LayerAndroid.h"
#include "Page.h"
#include "PopupMenuAndroid.h"
+#include "RenderLayer.h"
+#include "RenderLayerCompositor.h"
#include "ScriptController.h"
#include "SearchPopupMenuAndroid.h"
#include "WebCoreFrameBridge.h"
@@ -64,7 +67,21 @@ static unsigned long long tryToReclaimDatabaseQuota(SecurityOrigin* originNeedin
WebCore::GraphicsLayer* ChromeClientAndroid::layersSync()
{
if (m_rootGraphicsLayer && m_needsLayerSync && m_webFrame) {
- if (FrameView* frameView = m_webFrame->page()->mainFrame()->view())
+ // We may have more than one frame, so let's first update all of them
+ // (webkit may want to update the GraphicsLayer tree, and we do *not* want
+ // to find this out when we are painting, as it means we could be summarily
+ // deallocated while painting...)
+ GraphicsLayerAndroid* rootLayer = static_cast<GraphicsLayerAndroid*>(m_rootGraphicsLayer);
+ Vector<const RenderLayer*> listRootLayers;
+ rootLayer->gatherRootLayers(listRootLayers);
+
+ for (unsigned int i = 0; i < listRootLayers.size(); i++) {
+ RenderLayer* layer = const_cast<RenderLayer*>(listRootLayers[i]);
+ layer->compositor()->updateCompositingLayers();
+ }
+
+ Frame* frame = m_webFrame->page()->mainFrame();
+ if (FrameView* frameView = frame->view())
frameView->syncCompositingStateIncludingSubframes();
}
m_needsLayerSync = false;
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 839c352..1e406b1 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -101,6 +101,7 @@
#include "RenderThemeAndroid.h"
#include "RenderView.h"
#include "ResourceRequest.h"
+#include "RuntimeEnabledFeatures.h"
#include "SchemeRegistry.h"
#include "SelectionController.h"
#include "Settings.h"
@@ -472,6 +473,12 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m
// initialisation.
v8::V8::Initialize();
#endif
+
+ // Configure any RuntimeEnabled features that we need to change from their default now.
+ // See WebCore/bindings/generic/RuntimeEnabledFeatures.h
+
+ // HTML5 History API
+ RuntimeEnabledFeatures::setPushStateEnabled(true);
}
WebViewCore::~WebViewCore()
@@ -666,10 +673,20 @@ void WebViewCore::recordPictureSet(PictureSet* content)
content->clear();
#if USE(ACCELERATED_COMPOSITING)
- // Detects if the content size has changed
- bool contentSizeChanged = false;
- if (content->width() != width || content->height() != height)
- contentSizeChanged = true;
+ // The invals are not always correct when the content size has changed. For
+ // now, let's just reset the inval so that it invalidates the entire content
+ // -- the pictureset will be fully repainted, tiles will be marked dirty and
+ // will have to be repainted.
+
+ // FIXME: the webkit invals ought to have been enough...
+ if (content->width() != width || content->height() != height) {
+ SkIRect r;
+ r.fLeft = 0;
+ r.fTop = 0;
+ r.fRight = width;
+ r.fBottom = height;
+ m_addInval.setRect(r);
+ }
#endif
content->setDimensions(width, height, &m_addInval);
@@ -693,23 +710,6 @@ void WebViewCore::recordPictureSet(PictureSet* content)
// Rebuild the pictureset (webkit repaint)
rebuildPictureSet(content);
-
-#if USE(ACCELERATED_COMPOSITING)
- // We repainted the pictureset, but the invals are not always correct when
- // the content size did change. For now, let's just reset the
- // inval we will pass to the UI so that it invalidates the entire
- // content -- tiles will be marked dirty and will have to be repainted.
- // FIXME: the webkit invals ought to have been enough...
- if (contentSizeChanged) {
- SkIRect r;
- r.fLeft = 0;
- r.fTop = 0;
- r.fRight = width;
- r.fBottom = height;
- m_addInval.setRect(r);
- }
-#endif
-
} // WebViewCoreRecordTimeCounter
WebCore::Node* oldFocusNode = currentFocus();