[css-contain] Apply optimization in SetText if text doesn't wrap

This is an extra case in which we can apply the SetText optimization
introduced in r578233.
If the text is longer than the container, but we know
it's not going to wrap, then we can apply the optimization anyway and
avoid the layout as we know it's not going to be split
in multiple lines.
Thanks to this patch the optimization will be applied in more cases.

The patch also removes the TODO about trying to avoid measuring
the text length. That was tried in
https://chromium-review.googlesource.com/1275848 but discarded
as it is not possible to avoid measuring the text
if we want to store proper values for widths.

Bug=805785
TEST=fast/css/containment/change-text-node-data-nowrap.html

Change-Id: Ifa708d2a40b95254420750672941de18f5a6f3c7
Reviewed-on: https://chromium-review.googlesource.com/c/1333750
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#607786}
3 files changed