diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc b/chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc index ef3a634471d..33ec87c2d86 100644 --- a/chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc +++ b/chromium/third_party/blink/renderer/core/layout/layout_text_control_multi_line.cc @@ -108,4 +108,20 @@ LayoutObject* LayoutTextControlMultiLine::LayoutSpecialExcludedChild( return placeholder_layout_object; } +LayoutUnit LayoutTextControlMultiLine::ScrollWidth() const { + // If in preview state, fake the scroll width to prevent that any information + // about the suggested content can be derived from the size. + if (!GetTextControlElement()->SuggestedValue().IsEmpty()) + return ClientWidth(); + return LayoutTextControl::ScrollWidth(); +} + +LayoutUnit LayoutTextControlMultiLine::ScrollHeight() const { + // If in preview state, fake the scroll height to prevent that any information + // about the suggested content can be derived from the size. + if (!GetTextControlElement()->SuggestedValue().IsEmpty()) + return ClientHeight(); + return LayoutTextControl::ScrollHeight(); +} + } // namespace blink |