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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
6 * All rights reserved. | 6 * All rights reserved. |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 cb->insertPositionedObject(this); | 232 cb->insertPositionedObject(this); |
233 } | 233 } |
234 } | 234 } |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
238 if (TextAutosizer* textAutosizer = document().textAutosizer()) | 238 if (TextAutosizer* textAutosizer = document().textAutosizer()) |
239 textAutosizer->record(this); | 239 textAutosizer->record(this); |
240 | 240 |
241 propagateStyleToAnonymousChildren(); | 241 propagateStyleToAnonymousChildren(); |
| 242 |
| 243 // The LayoutView is always a container of fixed positioned descendants. In |
| 244 // addition, SVG foreignObjects become such containers, so that descendants |
| 245 // of a foreignObject cannot escape it. Similarly, text controls let authors |
| 246 // select elements inside that are created by user agent shadow DOM, and we |
| 247 // have (C++) code that assumes that the elements are indeed contained by the |
| 248 // text control. So just make sure this is the case. Finally, computed style |
| 249 // may turn us into a container of all things, e.g. if the element is |
| 250 // transformed, or contain:paint is specified. |
242 setCanContainFixedPositionObjects(isLayoutView() || isSVGForeignObject() || | 251 setCanContainFixedPositionObjects(isLayoutView() || isSVGForeignObject() || |
| 252 isTextControl() || |
243 newStyle.canContainFixedPositionObjects()); | 253 newStyle.canContainFixedPositionObjects()); |
244 | 254 |
245 // It's possible for our border/padding to change, but for the overall logical | 255 // It's possible for our border/padding to change, but for the overall logical |
246 // width or height of the block to end up being the same. We keep track of | 256 // width or height of the block to end up being the same. We keep track of |
247 // this change so in layoutBlock, we can know to set relayoutChildren=true. | 257 // this change so in layoutBlock, we can know to set relayoutChildren=true. |
248 m_widthAvailableToChildrenChanged |= | 258 m_widthAvailableToChildrenChanged |= |
249 oldStyle && needsLayout() && | 259 oldStyle && needsLayout() && |
250 (diff.needsFullLayout() || borderOrPaddingLogicalDimensionChanged( | 260 (diff.needsFullLayout() || borderOrPaddingLogicalDimensionChanged( |
251 *oldStyle, newStyle, LogicalWidth)); | 261 *oldStyle, newStyle, LogicalWidth)); |
252 m_heightAvailableToChildrenChanged |= oldStyle && diff.needsFullLayout() && | 262 m_heightAvailableToChildrenChanged |= oldStyle && diff.needsFullLayout() && |
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 } | 2227 } |
2218 | 2228 |
2219 return availableHeight; | 2229 return availableHeight; |
2220 } | 2230 } |
2221 | 2231 |
2222 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2232 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
2223 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2233 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
2224 } | 2234 } |
2225 | 2235 |
2226 } // namespace blink | 2236 } // namespace blink |
OLD | NEW |