Bug 96710 - The collapsing border code needs direction-aware border getters
Summary: The collapsing border code needs direction-aware border getters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks: 79272
  Show dependency treegraph
 
Reported: 2012-09-13 17:22 PDT by Julien Chaffraix
Modified: 2012-09-19 17:58 PDT (History)
6 users (show)

See Also:


Attachments
Proposed refactoring. Introduce several new helper functions. (14.95 KB, patch)
2012-09-14 17:17 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Proposed change 2. Forgot to update the column code too. (21.93 KB, patch)
2012-09-18 14:20 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff
v3: Fixed Mac build, removed unused parameter in RenderTableCol functions. (21.98 KB, patch)
2012-09-19 10:51 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-09-13 17:22:11 PDT
Currently most of the code makes the assumption that cells have the same alignment as their section. This is wrong and caused bug 79272.

Example from RenderTableCell::computeCollapsedStartBorder:
 
CollapsedBorderValue prevCellBorder = CollapsedBorderValue(prevCell->style()->borderEnd(), includeColor ? prevCell->style()->visitedDependentColor(endColorProperty) : Color(), BCELL);

This assumes that |prevCell| has the same direction as |this| or this will pick up the wrong border.

The idea of this refactoring is to introduce some new direction-aware function to get adjoining borders.
Comment 1 Julien Chaffraix 2012-09-14 17:17:21 PDT
Created attachment 164253 [details]
Proposed refactoring. Introduce several new helper functions.
Comment 2 Julien Chaffraix 2012-09-18 14:20:51 PDT
Created attachment 164620 [details]
Proposed change 2. Forgot to update the column code too.
Comment 3 Build Bot 2012-09-18 15:42:45 PDT
Comment on attachment 164620 [details]
Proposed change 2. Forgot to update the column code too.

Attachment 164620 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13897299
Comment 4 Julien Chaffraix 2012-09-19 10:51:53 PDT
Created attachment 164756 [details]
v3: Fixed Mac build, removed unused parameter in RenderTableCol functions.
Comment 5 Ojan Vafai 2012-09-19 14:09:53 PDT
Comment on attachment 164756 [details]
v3: Fixed Mac build, removed unused parameter in RenderTableCol functions.

I find the names all very similar, but different in subtle ways. I couldn't think of any better names though. :(
Comment 6 Julien Chaffraix 2012-09-19 17:47:35 PDT
Comment on attachment 164756 [details]
v3: Fixed Mac build, removed unused parameter in RenderTableCol functions.

Thanks Ojan! The Qt bots are b0rken, based on previous patches not breaking Qt, this patch should be fine to land.
Comment 7 WebKit Review Bot 2012-09-19 17:58:36 PDT
Comment on attachment 164756 [details]
v3: Fixed Mac build, removed unused parameter in RenderTableCol functions.

Clearing flags on attachment: 164756

Committed r129078: <http://trac.webkit.org/changeset/129078>
Comment 8 WebKit Review Bot 2012-09-19 17:58:40 PDT
All reviewed patches have been landed.  Closing bug.