summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderBlockLineLayout.cpp
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-05-28 18:06:43 -0700
committerGrace Kloba <klobag@google.com>2010-05-28 18:06:43 -0700
commitc05b3a990126a5a1de357c025e25e6acd4e4e185 (patch)
tree134668b4dcc0710c586921213fc5f7811f3121d6 /WebCore/rendering/RenderBlockLineLayout.cpp
parent27d79a6495971cad26199bdf5dc79abcb1ff1c9e (diff)
downloadexternal_webkit-c05b3a990126a5a1de357c025e25e6acd4e4e185.zip
external_webkit-c05b3a990126a5a1de357c025e25e6acd4e4e185.tar.gz
external_webkit-c05b3a990126a5a1de357c025e25e6acd4e4e185.tar.bz2
Code clean up, http://b/issue?id=2724743
Change Widget:screenWidth() to Widget:textWrapWidth() as the text wrap width may be different than the screen width after pinch zoom. Change AndroidWebHistoryBridge's m_screenWidthScale to m_textWrapScale to reflect its meaning. Remove unused screenWidth/screenHeight in PlatformBridge. Merge two restore methods to one. There is a matching CL in framework/base. Only setUseFixedLayout if layout width is different than screen width. Change from Node* to Ref<Node> to avoid a crash. Fix http://b/issue?id=2660396
Diffstat (limited to 'WebCore/rendering/RenderBlockLineLayout.cpp')
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index ec138b9..96b4c6e 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -677,12 +677,12 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
obj = obj->container();
}
if (!isConstrained) {
- int screenWidth = view()->frameView()->screenWidth();
+ int textWrapWidth = view()->frameView()->textWrapWidth();
int padding = paddingLeft() + paddingRight();
- if (screenWidth > 0 && width() > (screenWidth + padding)) {
+ if (textWrapWidth > 0 && width() > (textWrapWidth + padding)) {
// limit the content width (width excluding padding) to be
- // (screenWidth - 2 * ANDROID_FCTS_MARGIN_PADDING)
- int maxWidth = screenWidth - 2 * ANDROID_FCTS_MARGIN_PADDING + padding;
+ // (textWrapWidth - 2 * ANDROID_FCTS_MARGIN_PADDING)
+ int maxWidth = textWrapWidth - 2 * ANDROID_FCTS_MARGIN_PADDING + padding;
setWidth(min(width(), maxWidth));
m_minPrefWidth = min(m_minPrefWidth, maxWidth);
m_maxPrefWidth = min(m_maxPrefWidth, maxWidth);