summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-07-24 16:43:17 -0700
committerNicolas Roard <nicolasroard@google.com>2012-07-24 16:54:23 -0700
commit0ae81fdfa7e1edcfba6e71ee2dd83fb24a5225ec (patch)
tree813ab290b0712332f949166394ee1c7f2efcf5b5 /Source/WebCore/platform/graphics/android/context
parenteb8e22896b89fd99a56a0e70888838ca22a558cf (diff)
downloadexternal_webkit-0ae81fdfa7e1edcfba6e71ee2dd83fb24a5225ec.zip
external_webkit-0ae81fdfa7e1edcfba6e71ee2dd83fb24a5225ec.tar.gz
external_webkit-0ae81fdfa7e1edcfba6e71ee2dd83fb24a5225ec.tar.bz2
Fix bounds not being correctly propagated...
Change-Id: I81421e45e07eddc4153996797cd9bddda9c2b8c7
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context')
-rw-r--r--Source/WebCore/platform/graphics/android/context/RTree.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/RTree.cpp b/Source/WebCore/platform/graphics/android/context/RTree.cpp
index 69ecf29..c6b9854 100644
--- a/Source/WebCore/platform/graphics/android/context/RTree.cpp
+++ b/Source/WebCore/platform/graphics/android/context/RTree.cpp
@@ -316,6 +316,7 @@ void Node::add(Node* node)
m_children[m_nbChildren] = node;
m_nbChildren++;
Node* NN = 0;
+
if (m_nbChildren > m_tree->m_maxChildren)
NN = split();
else
@@ -354,6 +355,10 @@ void Node::destroy(int index)
void Node::removeAll()
{
m_nbChildren = 0;
+ m_minX = 0;
+ m_maxX = 0;
+ m_minY = 0;
+ m_maxY = 0;
}
Node* Node::split()
@@ -464,11 +469,13 @@ void Node::adjustTree(Node* N, Node* NN)
if (N->isRoot())
return;
- if (N->m_parent)
+ if (N->m_parent) {
N->m_parent->tighten();
-
- if (NN && N->m_parent)
- N->m_parent->add(NN);
+ if (NN)
+ N->m_parent->add(NN);
+ else
+ adjustTree(N->m_parent, 0);
+ }
}
#ifdef DEBUG