[webkit-reviews] review granted: [Bug 234745] Fractional td width is not rendering correctly : [Attachment 449270] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 15 14:16:32 PST 2022

Darin Adler <darin at apple.com> has granted zalan <zalan at apple.com>'s request for
Bug 234745: Fractional td width is not rendering correctly

Attachment 449270: Patch


--- Comment #7 from Darin Adler <darin at apple.com> ---
Comment on attachment 449270
  --> https://bugs.webkit.org/attachment.cgi?id=449270

View in context: https://bugs.webkit.org/attachment.cgi?id=449270&action=review

> Source/WebCore/ChangeLog:12
> +	   WinIE compatibility is probably no longer a valid reason to fail
sizing table cells with width values between 0 and 1.

This is a misleading remark. The correct thing to say would be more like this:

    The code that ignores a width of zero was incorrectly parsing as an integer
and ignoring trailing junk.
    That means that a width of "0.5" would be ignored by code that claimed it
was ignoring width of zero.
    Seems unlikely that was ever desired, even "for compatibility with WinIE".

> Source/WebCore/html/HTMLTableCellElement.cpp:-106
> -	   if (parseHTMLInteger(value).value_or(0) > 0) // width="0" is ignored
for compatibility with WinIE.

This comment about width="0" shouldn’t necessarily be deleted. The new code
still ignores widths of zero, doing it by passing AllowZeroValue::No, and it’s
not obviously good to delete the comment that attempts to explain why.

But maybe the reason is now obvious? Maybe this is in the HTML or CSS
specification now? Or maybe it’s still "for compatibility with WinIE"?

More information about the webkit-reviews mailing list