Chrome ignores the nowrap on <td nowrap="nowrap">, if an absolute width is specified |
||
Issue descriptionChrome Version: 66.0.3359.26 (Official Build) dev (64-bit) OS: Ubuntu 18.04 (prerelease) What steps will reproduce the problem? (1) Load https://jsfiddle.net/b87re0vw/ What is the expected result? None of the text inside the tables should wrap. What happens instead? The text inside the second table *does* wrap, for no clear reason. Please use labels and text to provide additional information. In both cases, there is a <td nowrap="nowrap">. In the first table, that gives the descendant div a computed "white-space" of "nowrap". But in the second table, it does not, for some reason. The only difference is that the second table has an explicit width on its <td> element (which in this example is quite large, so it's not causing wrapping by being the thing that constrains the width). Devtools shows me that this nowrap="nowrap" behavior involves the following UA stylesheet rule: > td[Attributes Style] { > white-space: -webkit-nowrap; > } And apparently -webkit-nowrap has some magic "width" dependence, or something...? not sure. Anyway, Firefox and Edge are consistent on this -- they render both tables with no line wrapping. This causes an interop bug on this very bug tracker, too :) See https://bugzilla.mozilla.org/show_bug.cgi?id=1445634
,
Mar 14 2018
Oh, I thought that would auto link https://bugs.chromium.org/p/monorail/issues/detail?id=3585
,
Mar 14 2018
Sure! For reference, I also filed a WebKit version of this bug: https://bugs.webkit.org/show_bug.cgi?id=183642
,
Mar 15 2018
Please include testing with child elements of the style "white-space: nowrap;"
,
Mar 16 2018
,
Nov 12
This works fine with "nowrap", probably that "-webkit-nowrap" thing should be killed if possible. Dunno about what's that, but checking the code "-webkit-nowrap" and "nowrap" are not equivalent, which is really confusing. The relevant code for this issue seems to be here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/resolver/style_adjuster.cc?sq=package:chromium&dr=C&g=0&l=248 And also here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/html_table_cell_element.cc?l=100 |
||
►
Sign in to add a comment |
||
Comment 1 by dgro...@chromium.org
, Mar 14 2018