Skip to content

Table border-collapse fixes - #9826

Merged
bors-servo merged 2 commits into
servo:masterfrom
mbrubeck:table-row-iter
Mar 1, 2016
Merged

bors-servo merged 2 commits into
servo:masterfrom
mbrubeck:table-row-iter

Conversation

@mbrubeck

@mbrubeck mbrubeck commented Mar 1, 2016

Copy link
Copy Markdown
Contributor

Two related fixes for border-collapse:

  • Fix border collapsing across table-row-group flows

    This fixes the border-end calculation for table rows whose borders are collapsed with rows in different rowgroups. The border collapsing code now uses an iterator that yields all the rows as a flat sequence, regardless of how they are grouped in rowgroups. It gets rid of TableRowGroupFlow::preliminary_collapsed_borders which was never correct. (It was read but never written.)

    This may fix Intermittent failure in /_mozilla/css/border_collapse_simple_a.html #8120 but I'm not 100% certain. (I haven't managed to reproduce the intermittent failure locally, and my reduced test case still fails but in a different way.)

  • Fix confusing push_or_mutate API

    This fixes a bug when recalculating border collapsing for an existing table row. The bug was caused by using push_or_mutate which has no effect if there is already a value at the specified index.

    The fix switches incorrect push_or_mutate calls to use push_or_set instead. It also renames push_or_mutate to get_mut_or_push which I think is a less-confusing name for this method.

r? @pcwalton

Review on Reviewable

This fixes a bug when recalculating border collapsing for an existing table
now. The bug was caused by using `push_or_mutate` which has no effect if there
is already a value at the specified index.

The fix switches incorrect `push_or_mutate` calls to use `push_or_set`
instead. It also renames `push_or_mutate` to `get_mut_or_push` which I think
is a less-confusing name for this method.
This fixes the border-end calculation for table rows whose borders are
collapsed with rows in different rowgroups.  The border collapsing code now
uses an iterator that yields all the rows as a flat sequence, regardless of
how they are grouped in rowgroups.  It gets rid of
`TableRowGroupFlow::preliminary_collapsed_borders` which was never correct.
(It was read but never written.)

This may fix servo#8120 but I'm not 100% certain. (I haven't managed to reproduce
the intermittent failure locally, and my reduced test case still fails but in
a different way.)
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 1, 2016
@pcwalton

pcwalton commented Mar 1, 2016

Copy link
Copy Markdown
Contributor

@bors-servo: r+

Thanks!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 6c684a5 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 1, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6c684a5 with merge 1d6aece...

bors-servo pushed a commit that referenced this pull request Mar 1, 2016
Table border-collapse fixes

Two related fixes for border-collapse:

* Fix border collapsing across table-row-group flows

  This fixes the border-end calculation for table rows whose borders are collapsed with rows in different rowgroups.  The border collapsing code now uses an iterator that yields all the rows as a flat sequence, regardless of how they are grouped in rowgroups.  It gets rid of `TableRowGroupFlow::preliminary_collapsed_borders` which was never correct.  (It was read but never written.)

  This may fix #8120 but I'm not 100% certain. (I haven't managed to reproduce the intermittent failure locally, and my reduced test case still fails but in a different way.)

* Fix confusing `push_or_mutate` API

  This fixes a bug when recalculating border collapsing for an existing table row. The bug was caused by using `push_or_mutate` which has no effect if there is already a value at the specified index.

  The fix switches incorrect `push_or_mutate` calls to use `push_or_set` instead. It also renames `push_or_mutate` to `get_mut_or_push` which I think is a less-confusing name for this method.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9826)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 6c684a5 into servo:master Mar 1, 2016
@mbrubeck
mbrubeck deleted the table-row-iter branch May 17, 2016 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent failure in /_mozilla/css/border_collapse_simple_a.html

4 participants