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 4029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4040 if ((isInline() && !isMarquee()) || !avoidsFloats() || isFloating()) | 4040 if ((isInline() && !isMarquee()) || !avoidsFloats() || isFloating()) |
4041 return false; | 4041 return false; |
4042 | 4042 |
4043 // Only auto width objects can possibly shrink to avoid floats. | 4043 // Only auto width objects can possibly shrink to avoid floats. |
4044 return style()->width().isAuto(); | 4044 return style()->width().isAuto(); |
4045 } | 4045 } |
4046 | 4046 |
4047 static bool isReplacedElement(Node* node) | 4047 static bool isReplacedElement(Node* node) |
4048 { | 4048 { |
4049 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats(). | 4049 // Checkboxes and radioboxes are not isReplaced() nor do they have their own renderer in which to override avoidFloats(). |
4050 return node && node->isElementNode() && toElement(node)->isFormControlElemen t(); | 4050 return node && node->isElementNode() && (toElement(node)->isFormControlEleme nt() || isHTMLImageElement(toElement(node))); |
esprehn
2014/09/05 00:47:52
Can we break this up into a series of return state
| |
4051 } | 4051 } |
4052 | 4052 |
4053 bool RenderBox::avoidsFloats() const | 4053 bool RenderBox::avoidsFloats() const |
4054 { | 4054 { |
4055 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); | 4055 return isReplaced() || isReplacedElement(node()) || hasOverflowClip() || isH R() || isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated(); |
4056 } | 4056 } |
4057 | 4057 |
4058 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO bject& paintInvalidationContainer, | 4058 InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO bject& paintInvalidationContainer, |
4059 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) | 4059 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec t& newBounds, const LayoutPoint& newLocation) |
4060 { | 4060 { |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4750 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4750 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
4751 { | 4751 { |
4752 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4752 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
4753 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4753 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
4754 ASSERT(hasBackground == style.hasBackground()); | 4754 ASSERT(hasBackground == style.hasBackground()); |
4755 hasBorder = style.hasBorder(); | 4755 hasBorder = style.hasBorder(); |
4756 hasAppearance = style.hasAppearance(); | 4756 hasAppearance = style.hasAppearance(); |
4757 } | 4757 } |
4758 | 4758 |
4759 } // namespace blink | 4759 } // namespace blink |
OLD | NEW |