diff options
| author | Cary Clark <cary@android.com> | 2010-07-02 10:35:08 -0400 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-07-02 10:35:08 -0400 |
| commit | 88c81ae2263ae20fe63c346d9237d285cc12e84b (patch) | |
| tree | 193c169161ed9148d35655cc873e272ce4002366 /WebKit | |
| parent | 5a22f5d5a894759137cbc73b987cc21fe3dbcb2e (diff) | |
| download | external_webkit-88c81ae2263ae20fe63c346d9237d285cc12e84b.zip external_webkit-88c81ae2263ae20fe63c346d9237d285cc12e84b.tar.gz external_webkit-88c81ae2263ae20fe63c346d9237d285cc12e84b.tar.bz2 | |
don't walk off the end of the DOM when looking for text
Also, fix a couple of minor changes in debugging code to
stay sync'd with webkit.
Change-Id: If4263bab97715e2a2d12f06f2359554740bf5dbc
http://b/2816549
Diffstat (limited to 'WebKit')
| -rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 7 |
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)) { |
