summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-01-27 11:33:06 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-27 11:33:06 -0800
commit39295ce017bf3b2649799e58ff07c52a02217b03 (patch)
tree4b1081f4313f141f8ef40fa7c7c83693bf4c1e41
parentfbd2688ec2a4d79adf95888484958ee80341a5a2 (diff)
parentc2af0ea11e14d459b597600184bf0e2a805a29ae (diff)
downloadexternal_webkit-39295ce017bf3b2649799e58ff07c52a02217b03.zip
external_webkit-39295ce017bf3b2649799e58ff07c52a02217b03.tar.gz
external_webkit-39295ce017bf3b2649799e58ff07c52a02217b03.tar.bz2
Merge "No text wrapping in FitToScreen mode when text has background image."
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 4d209de..e0d712c 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -854,6 +854,8 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
// horizontally when reading a paragraph.
// In case the line height is less than the font size, we skip
// the text wrapping since this will cause text overlapping.
+ // If a text has background image, we ignore text wrapping,
+ // otherwise the background will be potentially messed up.
const Settings* settings = document()->settings();
bool doTextWrap = settings && settings->layoutAlgorithm() == Settings::kLayoutFitColumnToScreen;
if (doTextWrap) {
@@ -867,7 +869,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
const int lineHeight = style()->computedLineHeight();
const int fontSize = style()->fontSize();
doTextWrap = autowrap && !positioned &&
- (fontSize <= lineHeight) &&
+ (fontSize <= lineHeight) && !style()->hasBackgroundImage() &&
(((dir == LTR && cssfloat != FRIGHT) ||
(dir == RTL && cssfloat != FLEFT)) &&
((ta == TAAUTO) || (ta == JUSTIFY) ||