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 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3749 if (isInline() || !avoidsFloats() || isFloating()) | 3749 if (isInline() || !avoidsFloats() || isFloating()) |
3750 return false; | 3750 return false; |
3751 | 3751 |
3752 // Only auto width objects can possibly shrink to avoid floats. | 3752 // Only auto width objects can possibly shrink to avoid floats. |
3753 return style()->width().isAuto(); | 3753 return style()->width().isAuto(); |
3754 } | 3754 } |
3755 | 3755 |
3756 static bool isReplacedElement(Node* node) | 3756 static bool isReplacedElement(Node* node) |
3757 { | 3757 { |
3758 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). | 3758 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). |
3759 return node && node->isElementNode() && toElement(node)->isFormControlElemen
t(); | 3759 return node && node->isElementNode() && (toElement(node)->isFormControlEleme
nt() || isHTMLImageElement(toElement(node))); |
3760 } | 3760 } |
3761 | 3761 |
3762 bool RenderBox::avoidsFloats() const | 3762 bool RenderBox::avoidsFloats() const |
3763 { | 3763 { |
3764 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); | 3764 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH
R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); |
3765 } | 3765 } |
3766 | 3766 |
3767 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode
lObject& paintInvalidationContainer, | 3767 PaintInvalidationReason RenderBox::paintInvalidationReason(const RenderLayerMode
lObject& paintInvalidationContainer, |
3768 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const | 3768 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const |
3769 { | 3769 { |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4439 | 4439 |
4440 setLogicalTop(oldLogicalTop); | 4440 setLogicalTop(oldLogicalTop); |
4441 setLogicalWidth(oldLogicalWidth); | 4441 setLogicalWidth(oldLogicalWidth); |
4442 setMarginLeft(oldMarginLeft); | 4442 setMarginLeft(oldMarginLeft); |
4443 setMarginRight(oldMarginRight); | 4443 setMarginRight(oldMarginRight); |
4444 | 4444 |
4445 return borderBox; | 4445 return borderBox; |
4446 } | 4446 } |
4447 | 4447 |
4448 } // namespace blink | 4448 } // namespace blink |
OLD | NEW |