diff options
author | Cary Clark <cary@android.com> | 2010-05-13 15:57:59 -0400 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-05-14 11:02:09 -0400 |
commit | 21d2e6a819424b1a73874b8e5a1bf031ced3c933 (patch) | |
tree | e2ced3b29ab2382446ed2e6821a7f261506318c4 | |
parent | 4ff1d8891d520763f17675827154340c7c740f90 (diff) | |
download | external_webkit-21d2e6a819424b1a73874b8e5a1bf031ced3c933.zip external_webkit-21d2e6a819424b1a73874b8e5a1bf031ced3c933.tar.gz external_webkit-21d2e6a819424b1a73874b8e5a1bf031ced3c933.tar.bz2 |
clean up nav cache debugging
This adds additional content to the nav cache dump,
and cleans up a few formatting problems. This has no
effect on code that does not have nav cache debugging
enabled.
Change-Id: Ice2c4bb33138a8ddc96739d95ead58fbe328bfa8
-rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 44 | ||||
-rw-r--r-- | WebKit/android/nav/CachedFrame.cpp | 1 | ||||
-rw-r--r-- | WebKit/android/nav/CachedInput.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedNode.cpp | 3 |
4 files changed, 39 insertions, 11 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index c5f7b12..09e5e59 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -469,22 +469,48 @@ void CacheBuilder::Debug::groups() { } } } - count++; - newLine(); -#if USE(ACCELERATED_COMPOSITING) - if (renderer && layer) { + if (renderer) { + RenderStyle* style = renderer->style(); + snprintf(scratch, sizeof(scratch), "// renderStyle:" + " visibility=%s hasBackGround=%d" + " tapHighlightColor().alpha()=0x%02x", + style->visibility() == HIDDEN ? "HIDDEN" : "VISIBLE", + style->hasBackground(), style->tapHighlightColor().alpha()); + newLine(); + print(scratch); + RenderBlock* renderBlock = static_cast<RenderBlock*>(renderer); + if (renderer->isRenderBlock() && renderBlock->hasColumns()) { + const RenderBox* box = static_cast<RenderBox*>(renderer); + const IntRect& oRect = box->visibleOverflowRect(); + snprintf(scratch, sizeof(scratch), "// renderBlock:" + " columnRects=%d columnGap=%d direction=%d" + " hasOverflowClip=%d overflow=(%d,%d,w=%d,h=%d)", + renderBlock->columnRects(), renderBlock->columnGap(), + renderBlock->style()->direction(), renderer->hasOverflowClip(), + oRect.x(), oRect.y(), oRect.width(), oRect.height()); + newLine(); + print(scratch); + } + } + #if USE(ACCELERATED_COMPOSITING) + if (renderer && renderer->hasLayer()) { + RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); RenderLayerBacking* back = layer->backing(); GraphicsLayerAndroid* grLayer = static_cast <GraphicsLayerAndroid*>(back ? back->graphicsLayer() : 0); LayerAndroid* aLayer = grLayer ? grLayer->contentLayer() : 0; const SkPicture* pict = aLayer ? aLayer->picture() : 0; + const IntRect& r = renderer->absoluteBoundingBoxRect(); snprintf(scratch, sizeof(scratch), "// layer:%p back:%p" - " gLayer:%p aLayer:%p pict:%p", layer, back, grLayer, - aLayer, pict); - print(scratch); + " gLayer:%p aLayer:%p pict:%p r:(%d,%d,w=%d,h=%d)", + layer, back, grLayer, aLayer, pict, r.x(), r.y(), + r.width(), r.height()); newLine(); - } -#endif + print(scratch); + } + #endif + count++; + newLine(); } while ((node = node->traverseNextNode()) != NULL); DUMP_NAV_LOGD("}; // focusables = %d\n", count - 1); DUMP_NAV_LOGD("\n"); diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp index ce5600b..ff13508 100644 --- a/WebKit/android/nav/CachedFrame.cpp +++ b/WebKit/android/nav/CachedFrame.cpp @@ -1390,6 +1390,7 @@ void CachedFrame::Debug::print() const const CachedInput* input = b->textInput(node); if (input) input->mDebug.print(); + DUMP_NAV_LOGD("\n"); } DUMP_NAV_LOGD("// }; // end of nodes\n"); #if USE(ACCELERATED_COMPOSITING) diff --git a/WebKit/android/nav/CachedInput.cpp b/WebKit/android/nav/CachedInput.cpp index dcd9ccd..608c41b 100644 --- a/WebKit/android/nav/CachedInput.cpp +++ b/WebKit/android/nav/CachedInput.cpp @@ -60,7 +60,7 @@ void CachedInput::Debug::print() const { CachedInput* b = base(); printWebCoreString("// char* mName=\"", b->mName); - DUMP_NAV_LOGD("// void* mForm=%p;", b->mForm); + DUMP_NAV_LOGD("// void* mForm=%p;\n", b->mForm); DUMP_NAV_LOGD("// int mMaxLength=%d;\n", b->mMaxLength); DUMP_NAV_LOGD("// int mTextSize=%d;\n", b->mTextSize); DUMP_NAV_LOGD("// int mInputType=%d;\n", b->mInputType); diff --git a/WebKit/android/nav/CachedNode.cpp b/WebKit/android/nav/CachedNode.cpp index 0c9d541..8fc5f5b 100644 --- a/WebKit/android/nav/CachedNode.cpp +++ b/WebKit/android/nav/CachedNode.cpp @@ -367,6 +367,8 @@ const char* CachedNode::Debug::type(android::CachedNodeType t) const case FRAME_CACHEDNODETYPE: return "FRAME"; break; case PLUGIN_CACHEDNODETYPE: return "PLUGIN"; break; case TEXT_INPUT_CACHEDNODETYPE: return "INPUT"; break; + case SELECT_CACHEDNODETYPE: return "SELECT"; break; + case CONTENT_EDITABLE_CACHEDNODETYPE: return "CONTENT_EDITABLE"; break; default: return "???"; } } @@ -419,7 +421,6 @@ void CachedNode::Debug::print() const DEBUG_PRINT_BOOL(mLast); DEBUG_PRINT_BOOL(mUseBounds); DEBUG_PRINT_BOOL(mUseHitBounds); - DUMP_NAV_LOGD("\n"); } #endif |