summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-10-27 15:15:48 -0700
committerGrace Kloba <klobag@google.com>2009-10-27 15:15:48 -0700
commit8e7024d69d9885dc2d064817dae1acd41badc23f (patch)
tree89e83a454f9f0ce3af70253ea9b37e43c73d98b5
parent64d1f380c954e4c93433fae705c6f27607f1d922 (diff)
downloadexternal_webkit-8e7024d69d9885dc2d064817dae1acd41badc23f.zip
external_webkit-8e7024d69d9885dc2d064817dae1acd41badc23f.tar.gz
external_webkit-8e7024d69d9885dc2d064817dae1acd41badc23f.tar.bz2
We were excluding device-width to fix http://b/issue?id=1331654.
But some mobile sites will have minimum pref width wider than the screen width, like in http://www.boygeniusreport.com/2009/10/23/motorola-droid-preview/. Now we are checking width() > screenWidth before wrapping at line 958, there is no need to exclude the device-width case. Remove the checking and both bugs should be fixed.
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 9142953..14e7dce 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -847,14 +847,13 @@ 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,
+ // if we are in fitColumnToScreen mode
// 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.
const Settings* settings = document()->settings();
- bool doTextWrap = settings && settings->viewportWidth() != 0 &&
- settings->layoutAlgorithm() == Settings::kLayoutFitColumnToScreen;
+ bool doTextWrap = settings && settings->layoutAlgorithm() == Settings::kLayoutFitColumnToScreen;
if (doTextWrap) {
int ta = style()->textAlign();
int dir = style()->direction();