Bug 46191 - Make collapsed borders in tables work with different block flows
Summary: Make collapsed borders in tables work with different block flows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 46417
  Show dependency treegraph
 
Reported: 2010-09-21 09:13 PDT by Dave Hyatt
Modified: 2010-11-03 11:04 PDT (History)
1 user (show)

See Also:


Attachments
Patch (43.56 KB, patch)
2010-11-03 10:24 PDT, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2010-09-21 09:13:42 PDT
The borderStart/End/Before/After methods are hardcoded to a specific block flow directionality for collapsed border tables.
Comment 1 mitz 2010-11-03 10:24:22 PDT
Created attachment 72838 [details]
Patch
Comment 2 Dave Hyatt 2010-11-03 10:58:19 PDT
Comment on attachment 72838 [details]
Patch

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

r=me

> WebCore/rendering/RenderTableCell.cpp:666
> +CollapsedBorderValue RenderTableCell::collapsedLeftBorder() const
> +{
> +    if (table()->style()->isHorizontalWritingMode())
> +        return table()->style()->isLeftToRightDirection() ? collapsedStartBorder() : collapsedEndBorder();
> +    return table()->style()->isFlippedBlocksWritingMode() ? collapsedAfterBorder() : collapsedBeforeBorder();

I would cache table()->style() in a local and then use it in the three places where you acccess it.  Ditto for collapsedRight/Top/BottomBorder.

> WebCore/rendering/RenderTableCell.cpp:743
> +int RenderTableCell::borderHalfRight(bool outer) const
> +{
> +    if (table()->style()->isHorizontalWritingMode())
> +        return table()->style()->isLeftToRightDirection() ? borderHalfEnd(outer) : borderHalfStart(outer);
> +    return table()->style()->isFlippedBlocksWritingMode() ? borderHalfBefore(outer) : borderHalfAfter(outer);

Same comment.  Cache table()->style() in a local.  Same for all of the borderHalf*** functions.
Comment 3 mitz 2010-11-03 11:04:38 PDT
Landed as <http://trac.webkit.org/projects/webkit/changeset/71251>.