diff options
Diffstat (limited to 'WebKit/android/nav/CachedInput.cpp')
-rw-r--r-- | WebKit/android/nav/CachedInput.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/WebKit/android/nav/CachedInput.cpp b/WebKit/android/nav/CachedInput.cpp index 52d2066..d7b96e3 100644 --- a/WebKit/android/nav/CachedInput.cpp +++ b/WebKit/android/nav/CachedInput.cpp @@ -38,18 +38,23 @@ CachedInput* CachedInput::Debug::base() const { return nav; } -void CachedInput::Debug::print() const -{ - CachedInput* b = base(); +static void printWebCoreString(const char* label, + const WebCore::String& string) { char scratch[256]; - size_t index = snprintf(scratch, sizeof(scratch), "// char* mName=\""); - const UChar* ch = b->mName.characters(); + size_t index = snprintf(scratch, sizeof(scratch), label); + const UChar* ch = string.characters(); while (ch && *ch && index < sizeof(scratch)) { UChar c = *ch++; if (c < ' ' || c >= 0x7f) c = ' '; scratch[index++] = c; } DUMP_NAV_LOGD("%.*s\"\n", index, scratch); +} + +void CachedInput::Debug::print() const +{ + CachedInput* b = base(); + printWebCoreString("// char* mName=\"", b->mName); DUMP_NAV_LOGD("// void* mForm=%p;", b->mForm); DUMP_NAV_LOGD("// int mMaxLength=%d;\n", b->mMaxLength); DUMP_NAV_LOGD("// int mTextSize=%d;\n", b->mTextSize); |