From a7b977fa312f9f87fb188a0df16952457052b391 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 11 Oct 2010 17:32:42 -0400 Subject: check for columns before looking at column data Also, fix some debug info to sync up with latest webkit. Change-Id: Iea8f019619b701fc2d3267228b9412379334b66e http://b/3074179 --- WebKit/android/nav/CacheBuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'WebKit') diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 399c253..1175e8a 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -488,7 +488,7 @@ void CacheBuilder::Debug::groups() { 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->columnInfo()->columnCount(), renderBlock->columnGap(), renderBlock->style()->direction(), renderer->hasOverflowClip(), oRect.x(), oRect.y(), oRect.width(), oRect.height()); newLine(); @@ -582,7 +582,7 @@ void CacheBuilder::Debug::groups() { mIndex += snprintf(&mBuffer[mIndex], mBufferSize - mIndex, ", %d, %d, %d", 0 /*textBox->spaceAdd()*/, textBox->start(), 0 /*textBox->textPos()*/); mIndex += snprintf(&mBuffer[mIndex], mBufferSize - mIndex, ", %d, %d, %d, %d", - textBox->x(), textBox->y(), textBox->width(), textBox->height()); + textBox->x(), textBox->y(), textBox->logicalWidth(), textBox->logicalHeight()); int baseline = textBox->renderer()->style(textBox->isFirstLineStyle())->font().ascent(); mIndex += snprintf(&mBuffer[mIndex], mBufferSize - mIndex, ", %d }, // %d ", baseline, ++rectIndex); @@ -785,6 +785,8 @@ CacheBuilder::CacheBuilder() void CacheBuilder::adjustForColumns(const ClipColumnTracker& track, CachedNode* node, IntRect* bounds, RenderBlock* renderer) { + if (!renderer->hasColumns()) + return; int x = 0; int y = 0; int tx = track.mBounds.x(); -- cgit v1.1