| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 void RenderReplaced::computePreferredLogicalWidths() | 426 void RenderReplaced::computePreferredLogicalWidths() |
| 427 { | 427 { |
| 428 ASSERT(preferredLogicalWidthsDirty()); | 428 ASSERT(preferredLogicalWidthsDirty()); |
| 429 | 429 |
| 430 LayoutUnit borderAndPadding = borderAndPaddingWidth(); | 430 LayoutUnit borderAndPadding = borderAndPaddingWidth(); |
| 431 m_maxPreferredLogicalWidth = computeReplacedLogicalWidth(false) + borderAndP
adding; | 431 m_maxPreferredLogicalWidth = computeReplacedLogicalWidth(false) + borderAndP
adding; |
| 432 | 432 |
| 433 if (style()->maxWidth().isFixed()) | 433 if (style()->maxWidth().isFixed()) |
| 434 m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, style()->ma
xWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0))
; | 434 m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, style()->ma
xWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : 0))
; |
| 435 | 435 |
| 436 if (style()->width().isPercent() || style()->height().isPercent() | 436 if (hasRelativeDimensions()) |
| 437 || style()->maxWidth().isPercent() || style()->maxHeight().isPercent() | |
| 438 || style()->minWidth().isPercent() || style()->minHeight().isPercent()) | |
| 439 m_minPreferredLogicalWidth = 0; | 437 m_minPreferredLogicalWidth = 0; |
| 440 else | 438 else |
| 441 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; | 439 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth; |
| 442 | 440 |
| 443 setPreferredLogicalWidthsDirty(false); | 441 setPreferredLogicalWidthsDirty(false); |
| 444 } | 442 } |
| 445 | 443 |
| 446 VisiblePosition RenderReplaced::positionForPoint(const LayoutPoint& point) | 444 VisiblePosition RenderReplaced::positionForPoint(const LayoutPoint& point) |
| 447 { | 445 { |
| 448 // FIXME: This code is buggy if the replaced element is relative positioned. | 446 // FIXME: This code is buggy if the replaced element is relative positioned. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 | 562 |
| 565 if (style()) { | 563 if (style()) { |
| 566 if (v) | 564 if (v) |
| 567 r.inflate(style()->outlineSize()); | 565 r.inflate(style()->outlineSize()); |
| 568 } | 566 } |
| 569 computeRectForRepaint(repaintContainer, r); | 567 computeRectForRepaint(repaintContainer, r); |
| 570 return r; | 568 return r; |
| 571 } | 569 } |
| 572 | 570 |
| 573 } | 571 } |
| OLD | NEW |