summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-10-11 17:32:42 -0400
committerCary Clark <cary@android.com>2010-10-11 17:32:42 -0400
commita7b977fa312f9f87fb188a0df16952457052b391 (patch)
tree8d52dd59c3ae4621ea6a505ffa34b6a85b7f19ca /WebKit/android
parent54b541647c8a934868c6c0f00665611569c9e4b8 (diff)
downloadexternal_webkit-a7b977fa312f9f87fb188a0df16952457052b391.zip
external_webkit-a7b977fa312f9f87fb188a0df16952457052b391.tar.gz
external_webkit-a7b977fa312f9f87fb188a0df16952457052b391.tar.bz2
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
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp6
1 files changed, 4 insertions, 2 deletions
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();