summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/bridge/jni/JavaMethodJobject.cpp20
-rw-r--r--Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp9
-rw-r--r--Source/WebCore/platform/graphics/android/LayerAndroid.cpp46
-rw-r--r--Source/WebCore/platform/graphics/android/LayerAndroid.h5
-rw-r--r--Source/WebCore/rendering/RenderBlockLineLayout.cpp2
5 files changed, 65 insertions, 17 deletions
diff --git a/Source/WebCore/bridge/jni/JavaMethodJobject.cpp b/Source/WebCore/bridge/jni/JavaMethodJobject.cpp
index 5bb873d..73cae54 100644
--- a/Source/WebCore/bridge/jni/JavaMethodJobject.cpp
+++ b/Source/WebCore/bridge/jni/JavaMethodJobject.cpp
@@ -130,13 +130,11 @@ const char* JavaMethodJobject::signature() const
appendClassName(signatureBuilder, javaClassName.data());
else {
signatureBuilder.append(signatureFromJavaType(type));
-#if PLATFORM(ANDROID) && USE(V8)
- // FIXME: Upstream to WebKit
- // https://bugs.webkit.org/show_bug.cgi?id=62389
- if (type == JavaTypeObject || type == JavaTypeString) {
-#else
- if (type == JavaTypeObject) {
+ if (type == JavaTypeObject
+#if USE(V8)
+ || type == JavaTypeString
#endif
+ ) {
appendClassName(signatureBuilder, javaClassName.data());
signatureBuilder.append(';');
}
@@ -149,13 +147,11 @@ const char* JavaMethodJobject::signature() const
appendClassName(signatureBuilder, returnType);
else {
signatureBuilder.append(signatureFromJavaType(m_returnType));
-#if PLATFORM(ANDROID) && USE(V8)
- // FIXME: Upstream to WebKit
- // https://bugs.webkit.org/show_bug.cgi?id=62389
- if (m_returnType == JavaTypeObject || m_returnType == JavaTypeString) {
-#else
- if (m_returnType == JavaTypeObject) {
+ if (m_returnType == JavaTypeObject
+#if USE(V8)
+ || m_returnType == JavaTypeString
#endif
+ ) {
appendClassName(signatureBuilder, returnType);
signatureBuilder.append(';');
}
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 095ada7..a09eb35 100644
--- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -332,11 +332,12 @@ bool BaseLayerAndroid::drawGL(LayerAndroid* compositedRoot,
compositedRoot->setScale(scale);
#ifdef DEBUG
- int size = compositedRoot->countTextureSize();
- int nbLayers = compositedRoot->nbLayers();
- XLOG("We are using %d Mb for %d layers", size / 1024 / 1024, nbLayers);
- compositedRoot->showLayers();
+ compositedRoot->showLayer(0);
+ XLOG("We have %d layers, %d textured",
+ compositedRoot->nbLayers(),
+ compositedRoot->nbTexturedLayers());
#endif
+
// Clean up GL textures for video layer.
TilesManager::instance()->videoLayerManager()->deleteUnusedTextures();
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
index 947a0fc..05cb85e 100644
--- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -659,6 +659,52 @@ IntRect LayerAndroid::clippedRect() const
return rect;
}
+int LayerAndroid::nbLayers()
+{
+ int nb = 0;
+ int count = this->countChildren();
+ for (int i = 0; i < count; i++)
+ nb += this->getChild(i)->nbLayers();
+ return nb+1;
+}
+
+int LayerAndroid::nbTexturedLayers()
+{
+ int nb = 0;
+ int count = this->countChildren();
+ for (int i = 0; i < count; i++)
+ nb += this->getChild(i)->nbTexturedLayers();
+ if (needsTexture())
+ nb++;
+ return nb;
+}
+
+void LayerAndroid::showLayer(int indent)
+{
+ char spaces[256];
+ memset(spaces, 0, 256);
+ for (unsigned int i = 0; i < indent; i++)
+ spaces[i] = ' ';
+
+ if (!indent)
+ XLOGC("\n\n--- LAYERS TREE ---");
+
+ IntRect r(0, 0, getWidth(), getHeight());
+ IntRect tr = m_drawTransform.mapRect(r);
+ XLOGC("%s [%d:0x%x] - %s - (%d, %d, %d, %d) %s prepareContext(%d), pic w: %d h: %d",
+ spaces, uniqueId(), m_owningLayer,
+ needsTexture() ? "needs a texture" : "no texture",
+ tr.x(), tr.y(), tr.width(), tr.height(),
+ contentIsScrollable() ? "SCROLLABLE" : "",
+ prepareContext(),
+ m_recordingPicture ? m_recordingPicture->width() : -1,
+ m_recordingPicture ? m_recordingPicture->height() : -1);
+
+ int count = this->countChildren();
+ for (int i = 0; i < count; i++)
+ this->getChild(i)->showLayer(indent + 1);
+}
+
void LayerAndroid::assignTexture(LayerAndroid* oldTree)
{
int count = this->countChildren();
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h
index 15c7e0f..c4ed9fe 100644
--- a/Source/WebCore/platform/graphics/android/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h
@@ -114,6 +114,11 @@ public:
virtual bool needsTexture();
+ // Debug helper methods
+ int nbLayers();
+ int nbTexturedLayers();
+ void showLayer(int indent);
+
void setScale(float scale);
float getScale() { return m_scale; }
virtual bool drawGL(GLWebViewState*, SkMatrix&);
diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
index 8eee581..d4e2aa3 100644
--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -780,7 +780,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintLogica
doTextWrap = autowrap && !positioned &&
(fontSize <= lineHeight) && !style()->hasBackground() &&
(((dir == LTR && cssfloat != FRIGHT) ||
- (dir == RTL && cssfloat != FLEFT)) &&
+ (dir == RTL && cssfloat != FNONE)) &&
((ta == TAAUTO) || (ta == JUSTIFY) ||
((ta == LEFT || ta == WEBKIT_LEFT) && (dir == LTR)) ||
((ta == RIGHT || ta == WEBKIT_RIGHT) && (dir == RTL))));