summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrace Kloba <>2009-03-30 09:39:43 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-30 09:39:43 -0700
commitdd1d24933cf84106bff331029e8b417c352cedad (patch)
tree6aa4f25ed5813e51a62921765cbee72e657f9240
parent3689604fc92dca580602379ccdbde80899a22fdf (diff)
downloadwebkit-cupcake.tar.gz
AI 143479: Skip fit-to-column if the block has float:right in LTR or float:left in RTL. This should fix the layout problem in the docomo site. The downside is that we will not trigger fit-to-column for this category any more.android-sdk-1.5_r3android-sdk-1.5_r1android-sdk-1.5-preandroid-1.5r4android-1.5r3android-1.5r2android-1.5cupcake-releasecupcake
BUG=1741810 Automated import of CL 143479
-rw-r--r--WebCore/rendering/bidi.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index accb32641..3b0e7c4be 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -801,6 +801,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
if (firstChild()) {
#ifdef ANDROID_LAYOUT
// if we are in fitColumnToScreen mode and viewport width is not device-width,
+ // and the current object is not float:right in LTR or not float:left in RTL,
// and text align is auto, or justify or left in LTR, or right in RTL, we
// will wrap text around screen width so that it doesn't need to scroll
// horizontally when reading a paragraph.
@@ -810,9 +811,12 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
if (doTextWrap) {
int ta = style()->textAlign();
int dir = style()->direction();
- doTextWrap = (ta == TAAUTO) || (ta == JUSTIFY) ||
+ EFloat cssfloat = style()->floating();
+ doTextWrap = ((dir == LTR && cssfloat != FRIGHT) ||
+ (dir == RTL && cssfloat != FLEFT)) &&
+ ((ta == TAAUTO) || (ta == JUSTIFY) ||
((ta == LEFT || ta == WEBKIT_LEFT) && (dir == LTR)) ||
- ((ta == RIGHT || ta == WEBKIT_RIGHT) && (dir == RTL));
+ ((ta == RIGHT || ta == WEBKIT_RIGHT) && (dir == RTL)));
}
bool hasTextToWrap = false;
#endif