| 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 3773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3784 if (isInline() || !avoidsFloats() || isFloating()) | 3784 if (isInline() || !avoidsFloats() || isFloating()) |
| 3785 return false; | 3785 return false; |
| 3786 | 3786 |
| 3787 // Only auto width objects can possibly shrink to avoid floats. | 3787 // Only auto width objects can possibly shrink to avoid floats. |
| 3788 return style()->width().isAuto(); | 3788 return style()->width().isAuto(); |
| 3789 } | 3789 } |
| 3790 | 3790 |
| 3791 static bool isReplacedElement(Node* node) | 3791 static bool isReplacedElement(Node* node) |
| 3792 { | 3792 { |
| 3793 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). | 3793 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). |
| 3794 return node && node->isElementNode() && toElement(node)->isFormControlElemen
t(); | 3794 return node && node->isElementNode() && (toElement(node)->isFormControlEleme
nt() || isHTMLImageElement(toElement(node))); |
| 3795 } | 3795 } |
| 3796 | 3796 |
| 3797 bool RenderBox::avoidsFloats() const | 3797 bool RenderBox::avoidsFloats() const |
| 3798 { | 3798 { |
| 3799 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); | 3799 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); |
| 3800 } | 3800 } |
| 3801 | 3801 |
| 3802 bool RenderBox::hasNonCompositedScrollbars() const | 3802 bool RenderBox::hasNonCompositedScrollbars() const |
| 3803 { | 3803 { |
| 3804 if (RenderLayer* layer = this->layer()) { | 3804 if (RenderLayer* layer = this->layer()) { |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4484 computedValues.m_margins.m_end = marginEnd(); | 4484 computedValues.m_margins.m_end = marginEnd(); |
| 4485 | 4485 |
| 4486 setLogicalTop(oldLogicalTop); | 4486 setLogicalTop(oldLogicalTop); |
| 4487 setLogicalWidth(oldLogicalWidth); | 4487 setLogicalWidth(oldLogicalWidth); |
| 4488 setLogicalLeft(oldLogicalLeft); | 4488 setLogicalLeft(oldLogicalLeft); |
| 4489 setMarginLeft(oldMarginLeft); | 4489 setMarginLeft(oldMarginLeft); |
| 4490 setMarginRight(oldMarginRight); | 4490 setMarginRight(oldMarginRight); |
| 4491 } | 4491 } |
| 4492 | 4492 |
| 4493 } // namespace blink | 4493 } // namespace blink |
| OLD | NEW |