summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-10-12 04:57:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-12 04:57:55 -0700
commita39c13e25b52556c223922cee179cd711a0a89ee (patch)
tree945154b7a864f08e2fd76887ce3c2def8caeb6cb
parent7e2f12dad5ba480c29a57745a53b6e5252b8f4a3 (diff)
parenta7b977fa312f9f87fb188a0df16952457052b391 (diff)
downloadexternal_webkit-a39c13e25b52556c223922cee179cd711a0a89ee.zip
external_webkit-a39c13e25b52556c223922cee179cd711a0a89ee.tar.gz
external_webkit-a39c13e25b52556c223922cee179cd711a0a89ee.tar.bz2
Merge "check for columns before looking at column data"
-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();