summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-07-02 07:47:47 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-02 07:47:47 -0700
commitfcc4a0b80dc057862783fba22081954b6569a4b3 (patch)
treeeb7d2a3c12c38891fb53ace3ac9124c7d22b4e35
parent114830cf3874d82c64572150a188f6bbb3ea07de (diff)
parent88c81ae2263ae20fe63c346d9237d285cc12e84b (diff)
downloadexternal_webkit-fcc4a0b80dc057862783fba22081954b6569a4b3.zip
external_webkit-fcc4a0b80dc057862783fba22081954b6569a4b3.tar.gz
external_webkit-fcc4a0b80dc057862783fba22081954b6569a4b3.tar.bz2
Merge "don't walk off the end of the DOM when looking for text"
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 9ad9b71..1c8af5e 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -412,7 +412,7 @@ void CacheBuilder::Debug::groups() {
comma(scratch);
Element* element = static_cast<Element*>(node);
if (node->isElementNode() && element->hasID())
- wideString(element->getIDAttribute());
+ wideString(element->getIdAttribute());
else if (node->isTextNode()) {
#if 01 // set to one to abbreviate text that can be omitted from the address detection code
if (rect.isEmpty() && node->textContent().length() > 100) {
@@ -475,7 +475,7 @@ void CacheBuilder::Debug::groups() {
" visibility=%s hasBackGround=%d"
" tapHighlightColor().alpha()=0x%02x",
style->visibility() == HIDDEN ? "HIDDEN" : "VISIBLE",
- style->hasBackground(), style->tapHighlightColor().alpha());
+ renderer->hasBackground(), style->tapHighlightColor().alpha());
newLine();
print(scratch);
RenderBlock* renderBlock = static_cast<RenderBlock*>(renderer);
@@ -2709,7 +2709,8 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
do {
do {
do {
- node = node->traverseNextNode();
+ if (node)
+ node = node->traverseNextNode();
if (node == NULL || node->hasTagName(HTMLNames::aTag)
|| node->hasTagName(HTMLNames::inputTag)
|| node->hasTagName(HTMLNames::textareaTag)) {