Bug 46417

Summary: Make tables work with vertical text
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 50658, 46191    
Bug Blocks: 46123    
Attachments:
Description Flags
Part 1: make column width allocation algorithms (auto and fixed) work with vertical layout
hyatt: review+
Part 2: layout and painting
hyatt: review+
Part 3: hit testing
hyatt: review+
Part 4: invalidation
none
Part 4: invalidation darin: review+

Description Dave Hyatt 2010-09-23 15:25:41 PDT
Make tables work with vertical text.
Comment 1 Dave Hyatt 2010-09-23 19:21:29 PDT
See https://bugs.webkit.org/show_bug.cgi?id=46442... have to remove that code for tables eventually...
Comment 2 Adele Peterson 2010-10-29 15:14:51 PDT
<rdar://problem/8612061>
Comment 3 mitz 2010-11-03 13:28:59 PDT
Created attachment 72859 [details]
Part 1: make column width allocation algorithms (auto and fixed) work with vertical layout
Comment 4 Dave Hyatt 2010-11-03 13:39:35 PDT
Comment on attachment 72859 [details]
Part 1: make column width allocation algorithms (auto and fixed) work with vertical layout

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

r=me

> WebCore/rendering/FixedTableLayout.cpp:223
> +    if (m_table->document()->inQuirksMode() && m_table->style()->width().isPercent() && maxWidth < TABLE_MAX_WIDTH)

Should this be m_table->style()->logicalWidth().isPercent()?

> WebCore/rendering/RenderTable.h:115
> -    int bordersPaddingAndSpacing() const
> +    int bordersPaddingAndSpacingInRowDirection() const
>      {
>          return borderLeft() + borderRight() +
>                 (collapseBorders() ? 0 : (paddingLeft() + paddingRight() + (numEffCols() + 1) * hBorderSpacing()));
>  

Did you want to go ahead and patch this or save it for another patch?  It's using left/right border and padding still.
Comment 5 mitz 2010-11-03 13:45:23 PDT
Part 1 landed as <http://trac.webkit.org/projects/webkit/changeset/71262>.
Comment 6 mitz 2010-11-03 19:51:57 PDT
Created attachment 72899 [details]
Part 2: layout and painting
Comment 7 Dave Hyatt 2010-11-04 14:19:52 PDT
Comment on attachment 72899 [details]
Part 2: layout and painting

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

r=me

> WebCore/rendering/RenderTable.h:60
> +        return style()->isFlippedBlocksWritingMode() ? borderAfter() : borderAfter();

This looks wrong.  One of them should be a borderBefore.

> WebCore/rendering/RenderTable.h:95
> +        return style()->isFlippedBlocksWritingMode() ? outerBorderAfter() : outerBorderAfter();

Same bug here.
Comment 8 mitz 2010-11-04 19:44:30 PDT
Part 2 landed as <http://trac.webkit.org/projects/webkit/changeset/71382>.
Comment 9 mitz 2010-11-09 12:04:17 PST
Created attachment 73397 [details]
Part 3: hit testing
Comment 10 Dave Hyatt 2010-11-09 12:07:10 PST
Comment on attachment 73397 [details]
Part 3: hit testing

r=me
Comment 11 Darin Adler 2010-11-09 12:08:10 PST
Comment on attachment 73397 [details]
Part 3: hit testing

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

> WebCore/rendering/RenderTableSection.cpp:1245
> +    // Now set hitRow to the index of to hit row, or 0.

This says "index of to hit row", but maybe means "index of the hit row" or "index of the row that was hit"? Maybe using two separate local variable would document this without a comment. The first one would be named something other than hitRow since it’s not the row that was hit yet.
Comment 12 mitz 2010-11-09 12:46:44 PST
Part 3 landed as <http://trac.webkit.org/projects/webkit/changeset/71668>.
Comment 13 mitz 2010-12-07 17:04:30 PST
Created attachment 75851 [details]
Part 4: invalidation
Comment 14 Simon Fraser (smfr) 2010-12-07 17:06:57 PST
Comment on attachment 75851 [details]
Part 4: invalidation

i can haz repaint test?
Comment 15 mitz 2010-12-07 17:21:01 PST
Created attachment 75852 [details]
Part 4: invalidation

With tests
Comment 16 mitz 2010-12-07 17:25:55 PST
Split perpendicular and flipped cells off into bug 50658.
Comment 17 mitz 2010-12-07 17:39:21 PST
Part 4 landed as <http://trac.webkit.org/changeset/73484>.