Repository navigation
Table border-collapse fixes - #9826
Merged
Merged
Conversation
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.)
Contributor
|
@bors-servo: r+ Thanks! |
Contributor
|
📌 Commit 6c684a5 has been approved by |
Contributor
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 -->
Contributor
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_borderswhich 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_mutateAPIThis fixes a bug when recalculating border collapsing for an existing table row. The bug was caused by using
push_or_mutatewhich has no effect if there is already a value at the specified index.The fix switches incorrect
push_or_mutatecalls to usepush_or_setinstead. It also renamespush_or_mutatetoget_mut_or_pushwhich I think is a less-confusing name for this method.r? @pcwalton