| Index: Source/core/layout/LayoutTextControlSingleLine.cpp
|
| diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp
|
| index ea0a51c6b1e54f8cee33459444cddfc78e2af6f7..68385b95dbe5999df005aa36e89641a9513e23a8 100644
|
| --- a/Source/core/layout/LayoutTextControlSingleLine.cpp
|
| +++ b/Source/core/layout/LayoutTextControlSingleLine.cpp
|
| @@ -390,7 +390,10 @@ LayoutUnit LayoutTextControlSingleLine::scrollWidth() const
|
| // Adjust scrollWidth to inculde input element horizontal paddings and
|
| // decoration width
|
| LayoutUnit adjustment = clientWidth() - inner->clientWidth();
|
| - return innerEditorElement()->scrollWidth() + adjustment;
|
| + // TODO(leviw): We floor to avoid breaking JS that tries to scroll to
|
| + // scrollWidth - clientWidth.
|
| + // TODO(leviw): These values are broken when zooming. crbug.com/471412
|
| + return inner->scrollWidth().floor() + adjustment;
|
| }
|
| return LayoutBlockFlow::scrollWidth();
|
| }
|
| @@ -401,7 +404,10 @@ LayoutUnit LayoutTextControlSingleLine::scrollHeight() const
|
| // Adjust scrollHeight to include input element vertical paddings and
|
| // decoration height
|
| LayoutUnit adjustment = clientHeight() - inner->clientHeight();
|
| - return innerEditorElement()->scrollHeight() + adjustment;
|
| + // TODO(leviw): We floor to avoid breaking JS that tries to scroll to
|
| + // scrollHeight - clientHeight.
|
| + // TODO(leviw): These values are broken when zooming. crbug.com/471412
|
| + return inner->scrollHeight().floor() + adjustment;
|
| }
|
| return LayoutBlockFlow::scrollHeight();
|
| }
|
|
|