[Webkit-unassigned] [Bug 79272] "border-collapse: collapse; " made table rendering going wrong on RTL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 12:47:00 PDT 2012


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


Shezan Baig <shezbaig.wk at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |shezbaig.wk at gmail.com
                   |kit.org                     |
                 CC|                            |hyatt at apple.com




--- Comment #3 from Shezan Baig <shezbaig.wk at gmail.com>  2012-04-16 12:46:57 PST ---
CC'ing David Hyatt to this ticket to get some advice.

The root cause of the bug is that the text direction on the table->style() is different from the text direction on the cell style.

In RenderTableCell, 'computeCollapsed[Start/End/Before/After]Border' use the text direction from 'table->style()' to determine the color component of the border, but use the text direction from 'style()' to determine the other components of the border.  Additionally, in 'paintCollapsedBorders', it uses the text direction from 'table->style()' when looking up the cached collapsed borders.

In order to fix this, we need to make sure the text direction is obtained from the same style object in all these places.  There are 2 ways I can think of to fix this bug, but I'm not sure which would be more "correct":

1. Change 'computeCollapsed*Border' to use 'style()' when computing the color
   component of the border.  Also change 'paintCollapsedBorder' to use 
   'style()' when looking up the cached collapsed borders.

2. Change 'computerCollapsed*Border' to use 'table->style()' when determining
   all the other components of the border.  This would involve adding methods
   like:

    const BorderValue& borderBefore(RenderStyle* tableStyle) const;
    const BorderValue& borderAfter(RenderStyle* tableStyle) const;
    const BorderValue& borderStart(RenderStyle* tableStyle) const;
    const BorderValue& borderEnd(RenderStyle* tableStyle) const;

   to the RenderTable[Cell|Col|Section] classes.


I'm leaning towards option (1), but the fact that tableStyle is explicitly used in the cached border lookups makes me wonder whether there is a reason table->style() needs to override the cell's style?

-- 
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