| 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 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3449 // Floating objects don't shrink. Objects that don't avoid floats don't shr
ink. Marquees don't shrink. | 3449 // Floating objects don't shrink. Objects that don't avoid floats don't shr
ink. Marquees don't shrink. |
| 3450 if (isInline() || !avoidsFloats() || isFloating()) | 3450 if (isInline() || !avoidsFloats() || isFloating()) |
| 3451 return false; | 3451 return false; |
| 3452 | 3452 |
| 3453 // Only auto width objects can possibly shrink to avoid floats. | 3453 // Only auto width objects can possibly shrink to avoid floats. |
| 3454 return style()->width().isAuto(); | 3454 return style()->width().isAuto(); |
| 3455 } | 3455 } |
| 3456 | 3456 |
| 3457 static bool isReplacedElement(Node* node) | 3457 static bool isReplacedElement(Node* node) |
| 3458 { | 3458 { |
| 3459 // Checkboxes and radioboxes are not isReplaced() nor do they have their own
renderer in which to override avoidFloats(). | 3459 // FIXME(sky): Remove this. |
| 3460 return node && node->isElementNode() && toElement(node)->isFormControlElemen
t(); | 3460 return false; |
| 3461 } | 3461 } |
| 3462 | 3462 |
| 3463 bool RenderBox::avoidsFloats() const | 3463 bool RenderBox::avoidsFloats() const |
| 3464 { | 3464 { |
| 3465 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isF
lexItemIncludingDeprecated(); | 3465 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isF
lexItemIncludingDeprecated(); |
| 3466 } | 3466 } |
| 3467 | 3467 |
| 3468 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO
bject& paintInvalidationContainer, | 3468 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO
bject& paintInvalidationContainer, |
| 3469 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) | 3469 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) |
| 3470 { | 3470 { |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3977 | 3977 |
| 3978 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3978 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3979 { | 3979 { |
| 3980 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3980 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3981 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3981 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3982 ASSERT(hasBackground == style.hasBackground()); | 3982 ASSERT(hasBackground == style.hasBackground()); |
| 3983 hasBorder = style.hasBorder(); | 3983 hasBorder = style.hasBorder(); |
| 3984 } | 3984 } |
| 3985 | 3985 |
| 3986 } // namespace blink | 3986 } // namespace blink |
| OLD | NEW |