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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { | 163 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { |
164 view()->setShouldDoFullPaintInvalidation(); | 164 view()->setShouldDoFullPaintInvalidation(); |
165 | 165 |
166 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi
xedBackground()) | 166 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi
xedBackground()) |
167 view()->compositor()->setNeedsUpdateFixedBackground(); | 167 view()->compositor()->setNeedsUpdateFixedBackground(); |
168 } | 168 } |
169 | 169 |
170 // When a layout hint happens and an object's position style changes, we
have to do a layout | 170 // When a layout hint happens and an object's position style changes, we
have to do a layout |
171 // to dirty the layout tree using the old position value now. | 171 // to dirty the layout tree using the old position value now. |
172 if (diff.needsFullLayout() && parent() && oldStyle->position() != newSty
le.position()) { | 172 if (diff.needsFullLayout() && parent() && oldStyle->position() != newSty
le.position()) { |
173 markContainerChainForLayout(); | 173 if (!oldStyle->hasOutOfFlowPosition() && newStyle.hasOutOfFlowPositi
on()) { |
| 174 // We're about to go out of flow. Before that takes place, we ne
ed to mark the |
| 175 // current containing block chain for preferred widths recalcula
tion. |
| 176 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::Styl
eChange); |
| 177 } else { |
| 178 markContainerChainForLayout(); |
| 179 } |
174 if (oldStyle->position() == StaticPosition) | 180 if (oldStyle->position() == StaticPosition) |
175 setShouldDoFullPaintInvalidation(); | 181 setShouldDoFullPaintInvalidation(); |
176 else if (newStyle.hasOutOfFlowPosition()) | 182 else if (newStyle.hasOutOfFlowPosition()) |
177 parent()->setChildNeedsLayout(); | 183 parent()->setChildNeedsLayout(); |
178 if (isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlo
wPosition()) | 184 if (isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlo
wPosition()) |
179 removeFloatingOrPositionedChildFromBlockLists(); | 185 removeFloatingOrPositionedChildFromBlockLists(); |
180 } | 186 } |
181 // FIXME: This branch runs when !oldStyle, which means that layout was never
called | 187 // FIXME: This branch runs when !oldStyle, which means that layout was never
called |
182 // so what's the point in invalidating the whole view that we never painted? | 188 // so what's the point in invalidating the whole view that we never painted? |
183 } else if (isBody()) { | 189 } else if (isBody()) { |
(...skipping 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4728 StyleImage* borderImage = style()->borderImage().image(); | 4734 StyleImage* borderImage = style()->borderImage().image(); |
4729 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4735 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4730 } | 4736 } |
4731 | 4737 |
4732 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4738 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4733 { | 4739 { |
4734 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4740 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4735 } | 4741 } |
4736 | 4742 |
4737 } // namespace blink | 4743 } // namespace blink |
OLD | NEW |