Commit 11e6902a authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Remove unnecessary code from LayoutTextControl::ComputeIntrinsicLogicalWidths()

InnerEditor's paddings are always zero.  Web authors can't customize
InnerEditor's style.

This CL has no behavior changes.

Change-Id: Ida6e95a07c3c7c2f2d6700a54c5c40cf06835e99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2449095
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813642}
parent 4f213b39
...@@ -230,13 +230,7 @@ MinMaxSizes LayoutTextControl::ComputeIntrinsicLogicalWidths() const { ...@@ -230,13 +230,7 @@ MinMaxSizes LayoutTextControl::ComputeIntrinsicLogicalWidths() const {
// Use average character width. Matches IE. // Use average character width. Matches IE.
sizes.max_size += PreferredContentLogicalWidth(GetAvgCharWidth(StyleRef())); sizes.max_size += PreferredContentLogicalWidth(GetAvgCharWidth(StyleRef()));
if (InnerEditorElement()) {
if (LayoutBox* inner_editor_layout_box =
InnerEditorElement()->GetLayoutBox()) {
sizes.max_size += inner_editor_layout_box->PaddingStart() +
inner_editor_layout_box->PaddingEnd();
}
}
if (!StyleRef().LogicalWidth().IsPercentOrCalc()) if (!StyleRef().LogicalWidth().IsPercentOrCalc())
sizes.min_size = sizes.max_size; sizes.min_size = sizes.max_size;
return sizes; return sizes;
......
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