OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 5660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5671 oldAutoWrap = autoWrap; | 5671 oldAutoWrap = autoWrap; |
5672 } | 5672 } |
5673 | 5673 |
5674 if (styleToUse->collapseWhiteSpace()) | 5674 if (styleToUse->collapseWhiteSpace()) |
5675 stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild); | 5675 stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild); |
5676 | 5676 |
5677 updatePreferredWidth(m_minPreferredLogicalWidth, inlineMin); | 5677 updatePreferredWidth(m_minPreferredLogicalWidth, inlineMin); |
5678 updatePreferredWidth(m_maxPreferredLogicalWidth, inlineMax); | 5678 updatePreferredWidth(m_maxPreferredLogicalWidth, inlineMax); |
5679 } | 5679 } |
5680 | 5680 |
5681 // Use a very large value (in effect infinite). | |
5682 #define BLOCK_MAX_WIDTH 15000 | |
5683 | |
5684 void RenderBlock::computeBlockPreferredLogicalWidths() | 5681 void RenderBlock::computeBlockPreferredLogicalWidths() |
5685 { | 5682 { |
5686 RenderStyle* styleToUse = style(); | 5683 RenderStyle* styleToUse = style(); |
5687 bool nowrap = styleToUse->whiteSpace() == NOWRAP; | 5684 bool nowrap = styleToUse->whiteSpace() == NOWRAP; |
5688 | 5685 |
5689 RenderObject* child = firstChild(); | 5686 RenderObject* child = firstChild(); |
5690 RenderBlock* containingBlock = this->containingBlock(); | 5687 RenderBlock* containingBlock = this->containingBlock(); |
5691 LayoutUnit floatLeftWidth = 0, floatRightWidth = 0; | 5688 LayoutUnit floatLeftWidth = 0, floatRightWidth = 0; |
5692 while (child) { | 5689 while (child) { |
5693 // Positioned children don't affect the min/max width | 5690 // Positioned children don't affect the min/max width |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7385 } | 7382 } |
7386 | 7383 |
7387 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7384 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
7388 { | 7385 { |
7389 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi
xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX
(), floatingObject->pixelSnappedMaxY()); | 7386 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi
xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX
(), floatingObject->pixelSnappedMaxY()); |
7390 } | 7387 } |
7391 | 7388 |
7392 #endif | 7389 #endif |
7393 | 7390 |
7394 } // namespace WebCore | 7391 } // namespace WebCore |
OLD | NEW |