[Webkit-unassigned] [Bug 76948] min-width is not implemented on <table> for table-layout: fixed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 16 12:11:33 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76948





--- Comment #10 from Max Vujovic <mvujovic at adobe.com>  2012-02-16 12:11:34 PST ---
(In reply to comment #9)
> Method :- "RenderTable::computeLogicalWidth"
> // Ensure we aren't smaller than our min-width style.
> Length styleMinLogicalWidth = style()->logicalMinWidth();
> if (styleMinLogicalWidth.isSpecified() && styleMinLogicalWidth.isPositive())
>      setLogicalWidth(max(logicalWidth(), ConvertStyleLogicalWidthToComputedWidth(styleMinLogicalWidth, availableLogicalWidth)));
> 
> 
> 
> > > And if the code in "RenderTable::computeLogicalWidth" does not have any specific use case can we remove this.
> > 
> > Which lines are you talking about specifically?
> 
> Same code as mentioned above. I was just thinking if this is not doing any specific job, then can we remove it place code similar as "AutotableLayout" (which sets the min-width ) in fixedtablelayout.cpp. 

That code is necessary for the percent min-width case (e.g. min-width: 50%). The code calls convertStyleLogicalWidthToComputedWidth(styleMinLogicalWidth, availableLogicalWidth), which computes the percent min-width in layout units. If the min-width is a fixed value (e.g. min-width: 400px), it just returns that value.

I think the very first step for this bug is to find a case when min-width on table-layout: fixed fails. This is probably harder than the fix. To do that, I would look at the test cases that fail when we remove similar code for the width style in FixedTableLayout or AutoTableLayout, and if possible adapt those failing test cases to use min-width instead of width and see if an unexpected result occurs.

This is related to what I said before:
"""
However, if you comment out that code in AutoTableLayout::computePreferredLogicalWidths like this:

    if (tableLogicalWidth.isFixed() && tableLogicalWidth.isPositive()) {
        //minWidth = max<int>(minWidth, tableLogicalWidth.value());
        //maxWidth = minWidth;
    } else if (!remainingPercent && maxNonPercent) {

You will see that these tests fail:

  fast/table/028-vertical.html
  fast/table/029.html
  fast/table/auto-100-percent-width.html
  fast/table/colspan-with-all-percent-cells.html 
"""

If we can understand what those test cases are trying to do, perhaps we can craft similar test cases for min-width and fixed table layout to prove that it there is a failure in the first place.

> Thanks a lot for your time.

You're welcome. Thanks for working on this!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list