| Index: Source/core/rendering/TextAutosizer.cpp
|
| diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp
|
| index 6fd64b6f333e69ad97f40c075fee6f03a8277bd6..287a82701bc675069b5d1c890af5ec469d32d58e 100644
|
| --- a/Source/core/rendering/TextAutosizer.cpp
|
| +++ b/Source/core/rendering/TextAutosizer.cpp
|
| @@ -375,6 +375,9 @@ bool TextAutosizer::containerShouldBeAutosized(const RenderBlock* container)
|
| if (containerIsRowOfLinks(container))
|
| return false;
|
|
|
| + if (containerIsTextArea(container))
|
| + return false;
|
| +
|
| // Don't autosize block-level text that can't wrap (as it's likely to
|
| // expand sideways and break the page's layout).
|
| if (!container->style()->autoWrap())
|
| @@ -438,6 +441,14 @@ bool TextAutosizer::containerIsRowOfLinks(const RenderObject* container)
|
| return (linkCount >= 3);
|
| }
|
|
|
| +bool TextAutosizer::containerIsTextArea(const RenderBlock* container)
|
| +{
|
| + // Don't autosize textareas to prevent annoying oscillation when the entered texts exceeds
|
| + // 4 lines and the text inside the area suddenly gets boosted.
|
| + const RenderObject* parentBlock = (container->parent()) ? container->parent() : container;
|
| + return parentBlock->isTextArea();
|
| +}
|
| +
|
| bool TextAutosizer::contentHeightIsConstrained(const RenderBlock* container)
|
| {
|
| // FIXME: Propagate constrainedness down the tree, to avoid inefficiently walking back up from each box.
|
|
|