| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 // FIXME: Propagate constrainedness down the tree, to avoid inefficiently wa
lking back up from each box. | 220 // FIXME: Propagate constrainedness down the tree, to avoid inefficiently wa
lking back up from each box. |
| 221 // FIXME: This code needs to take into account vertical writing modes. | 221 // FIXME: This code needs to take into account vertical writing modes. |
| 222 // FIXME: Consider additional heuristics, such as ignoring fixed heights if
the content is already overflowing before autosizing kicks in. | 222 // FIXME: Consider additional heuristics, such as ignoring fixed heights if
the content is already overflowing before autosizing kicks in. |
| 223 for (; block; block = block->containingBlock()) { | 223 for (; block; block = block->containingBlock()) { |
| 224 const ComputedStyle& style = block->styleRef(); | 224 const ComputedStyle& style = block->styleRef(); |
| 225 if (style.overflowY() >= OSCROLL) | 225 if (style.overflowY() >= OSCROLL) |
| 226 return false; | 226 return false; |
| 227 if (style.height().isSpecified() || style.maxHeight().isSpecified() || b
lock->isOutOfFlowPositioned()) { | 227 if (style.height().isSpecified() || style.maxHeight().isSpecified() || b
lock->isOutOfFlowPositioned()) { |
| 228 // Some sites (e.g. wikipedia) set their html and/or body elements t
o height:100%, | 228 // Some sites (e.g. wikipedia) set their html and/or body elements t
o height:100%, |
| 229 // without intending to constrain the height of the content within t
hem. | 229 // without intending to constrain the height of the content within t
hem. |
| 230 return !block->isDocumentElement() && !block->isBody(); | 230 return !block->isDocumentElement() && !block->isBody() && !block->is
LayoutView(); |
| 231 } | 231 } |
| 232 if (block->isFloating()) | 232 if (block->isFloating()) |
| 233 return false; | 233 return false; |
| 234 } | 234 } |
| 235 return false; | 235 return false; |
| 236 } | 236 } |
| 237 | 237 |
| 238 static bool blockOrImmediateChildrenAreFormControls(const LayoutBlock* block) | 238 static bool blockOrImmediateChildrenAreFormControls(const LayoutBlock* block) |
| 239 { | 239 { |
| 240 if (isNonTextAreaFormControl(block)) | 240 if (isNonTextAreaFormControl(block)) |
| (...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 } | 1168 } |
| 1169 return computedSize; | 1169 return computedSize; |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 DEFINE_TRACE(TextAutosizer) | 1172 DEFINE_TRACE(TextAutosizer) |
| 1173 { | 1173 { |
| 1174 visitor->trace(m_document); | 1174 visitor->trace(m_document); |
| 1175 } | 1175 } |
| 1176 | 1176 |
| 1177 } // namespace blink | 1177 } // namespace blink |
| OLD | NEW |