fix webkit hidden cursor, address crash
http://b/issue?id=1918891
set cursor node hidden to 'true' to hide it
also fixing crash if detecting text address
runs out of text to look at
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index d8d8076..7644873 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -2884,7 +2884,7 @@
if ((int) textBox->end() >= start)
break;
} while ((textBox = textBox->nextTextBox()) != NULL);
- if (ConstructTextRect(node, textBox, start, relEnd,
+ if (textBox && ConstructTextRect(node, textBox, start, relEnd,
x, y, focusBounds, clipBounds, result) == false)
return false;
}
diff --git a/WebKit/android/nav/CachedNode.cpp b/WebKit/android/nav/CachedNode.cpp
index e7cab9e..cab1f15 100644
--- a/WebKit/android/nav/CachedNode.cpp
+++ b/WebKit/android/nav/CachedNode.cpp
@@ -211,7 +211,7 @@
CachedFrame* child = const_cast<CachedFrame*>(parent->hasFrame(this));
child->hideCursor();
}
- mIsHidden = false;
+ mIsHidden = true;
}
void CachedNode::init(WebCore::Node* node)