| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3815 if ((isInline() && !isMarquee()) || !avoidsFloats() || isFloating()) | 3815 if ((isInline() && !isMarquee()) || !avoidsFloats() || isFloating()) |
| 3816 return false; | 3816 return false; |
| 3817 | 3817 |
| 3818 // Only auto width objects can possibly shrink to avoid floats. | 3818 // Only auto width objects can possibly shrink to avoid floats. |
| 3819 return style()->width().isAuto(); | 3819 return style()->width().isAuto(); |
| 3820 } | 3820 } |
| 3821 | 3821 |
| 3822 static bool isReplacedElement(Node* node) | 3822 static bool isReplacedElement(Node* node) |
| 3823 { | 3823 { |
| 3824 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). | 3824 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). |
| 3825 return node && node->isElementNode() && toElement(node)->isFormControlElemen
t(); | 3825 return node && node->isElementNode() && (toElement(node)->isFormControlEleme
nt() || isHTMLImageElement(toElement(node))); |
| 3826 } | 3826 } |
| 3827 | 3827 |
| 3828 bool RenderBox::avoidsFloats() const | 3828 bool RenderBox::avoidsFloats() const |
| 3829 { | 3829 { |
| 3830 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); | 3830 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); |
| 3831 } | 3831 } |
| 3832 | 3832 |
| 3833 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO
bject& paintInvalidationContainer, | 3833 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO
bject& paintInvalidationContainer, |
| 3834 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) | 3834 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) |
| 3835 { | 3835 { |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4523 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4523 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
| 4524 | 4524 |
| 4525 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4525 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
| 4526 return m_rareData->m_previousBorderBoxSize; | 4526 return m_rareData->m_previousBorderBoxSize; |
| 4527 | 4527 |
| 4528 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4528 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
| 4529 return previousBoundsSize; | 4529 return previousBoundsSize; |
| 4530 } | 4530 } |
| 4531 | 4531 |
| 4532 } // namespace blink | 4532 } // namespace blink |
| OLD | NEW |