Commit 9bc6b673 authored by skobes@chromium.org's avatar skobes@chromium.org

Allow form inputs to be potential cluster roots.

We check for form inputs in blockSuppressesAutosizing, but the block
must be a potential cluster root to reach this check.

BUG=376012

Review URL: https://codereview.chromium.org/334333002

git-svn-id: svn://svn.chromium.org/blink/trunk@176251 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8c3f5b0a
<!DOCTYPE html>
<html style="font-size: 16px">
<head>
<meta name="viewport" content="width=800">
<style>
body {
width: 800px;
margin: 0;
overflow-y: hidden;
}
#i {
padding:6px 10px;
height:29px;
box-sizing:border-box;
}
</style>
</head>
<body style="font-size: 2.5rem">
This test passes if the input field is not autosized.
<br>
<span>
<input id="i" value="should not autosize" />
</span>
<br><br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</body>
</html>
<!DOCTYPE html>
<html style="font-size: 16px">
<head>
<meta name="viewport" content="width=800">
<style>
body {
width: 800px;
margin: 0;
overflow-y: hidden;
}
#i {
padding:6px 10px;
height:29px;
box-sizing:border-box;
}
</style>
<script src="resources/autosizingTest.js"></script>
</head>
<body>
This test passes if the input field is not autosized.
<br>
<span>
<input id="i" value="should not autosize" />
</span>
<br><br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
</body>
</html>
...@@ -158,9 +158,6 @@ static bool isPotentialClusterRoot(const RenderObject* renderer) ...@@ -158,9 +158,6 @@ static bool isPotentialClusterRoot(const RenderObject* renderer)
return false; return false;
if (renderer->isListItem()) if (renderer->isListItem())
return (renderer->isFloating() || renderer->isOutOfFlowPositioned()); return (renderer->isFloating() || renderer->isOutOfFlowPositioned());
// Avoid creating containers for text within form input.
if (isNonTextAreaFormControl(renderer->parent()))
return false;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment