Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for percentages in fixed table layout #13192

Merged
merged 3 commits into from Sep 9, 2016
Merged

Account for percentages in fixed table layout #13192

merged 3 commits into from Sep 9, 2016

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Sep 7, 2016

Don't just use the minimum length all the time.



This change is Reviewable

@highfive
Copy link

highfive commented Sep 7, 2016

warning Warning warning

  • These commits modify layout code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 7, 2016
@pcwalton
Copy link
Contributor

pcwalton commented Sep 7, 2016

Could you add a reftest for this? Thanks!

@notriddle
Copy link
Contributor Author

@pcwalton Done.

@emilio
Copy link
Member

emilio commented Sep 7, 2016

@bors-servo: r=pcwalton,emilio


Review status: 0 of 4 files reviewed at latest revision, 1 unresolved discussion.


components/layout/table.rs, line 376 [r1] (raw file):

                        });
                    }
                } else if num_unspecified_inline_sizes != 0 {

Could you convert this branch in an else if there are any other reftests to update?


Comments from Reviewable

@bors-servo
Copy link
Contributor

📌 Commit ff5aa87 has been approved by pcwalton,emilio

@highfive highfive assigned pcwalton and unassigned jdm Sep 7, 2016
@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 Sep 7, 2016
@bors-servo
Copy link
Contributor

💡 This pull request was already approved, no need to approve it again.

@bors-servo
Copy link
Contributor

📌 Commit ff5aa87 has been approved by pcwalton,emilio

@bors-servo
Copy link
Contributor

⌛ Testing commit ff5aa87 with merge 1815802...

bors-servo pushed a commit that referenced this pull request Sep 7, 2016
Account for percentages in fixed table layout

Don't just use the minimum length all the time.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13166 (github issue number if applicable).
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13192)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 7, 2016
@highfive
Copy link

highfive commented Sep 7, 2016

  ▶ TIMEOUT [expected OK] /webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html

@Ms2ger
Copy link
Contributor

Ms2ger commented Sep 7, 2016

Is there a spec for this?

@notriddle
Copy link
Contributor Author

notriddle commented Sep 7, 2016

I found the applicable spec.

@notriddle
Copy link
Contributor Author

I don't think this is actually correct, either (though it does fix Github and my testcase is correct). The actual rules for assigning column widths in fixed mode are this:

These rules [the rules for distributing excess width in automatic layout mode] do not apply when the table is laid out in fixed mode. In this case, the simpler rules that follow apply instead:

  • If there are any columns with no width specified, the excess width is distributed in equally to such columns
  • otherwise, if there are columns with non-zero length widths from the base assignment, the excess width is distributed proportionally to width among those columns
  • otherwise, if there are columns with non-zero percentage widths from the base assignment, the excess width is distributed proportionally to percentage width among those columns
  • otherwise, the excess width is distributed equally to the zero-sized columns

In other words, we need to count the number of columns with percentage widths, and follow step 2 if they're not zero.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 7, 2016
@notriddle
Copy link
Contributor Author

notriddle commented Sep 7, 2016

There, thanks for asking for a spec reference.

@notriddle
Copy link
Contributor Author

@bors-servo try

bors-servo pushed a commit that referenced this pull request Sep 8, 2016
Account for percentages in fixed table layout

Don't just use the minimum length all the time.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13166 (github issue number if applicable).
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13192)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

⌛ Trying commit 516adfa with merge 2f8ba13...

@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 8, 2016
@highfive
Copy link

highfive commented Sep 8, 2016

  ▶ PASS [expected FAIL] /css21_dev/html4/floats-149.htm

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Sep 8, 2016
@pcwalton
Copy link
Contributor

pcwalton commented Sep 9, 2016

@bors-servo: r+

@bors-servo
Copy link
Contributor

📌 Commit 102ea5a 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 Sep 9, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 102ea5a with merge 2d13178...

bors-servo pushed a commit that referenced this pull request Sep 9, 2016
Account for percentages in fixed table layout

Don't just use the minimum length all the time.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13166 (github issue number if applicable).
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13192)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 9, 2016
@highfive
Copy link

highfive commented Sep 9, 2016

  ▶ ERROR [expected OK] /webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html
  └   → gl.getProgramInfoLog is not a function

@bors-servo
Copy link
Contributor

⚡ Previous build results for arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, windows-dev are reusable. Rebuilding only mac-rel-wpt...

@bors-servo
Copy link
Contributor

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

@bors-servo bors-servo merged commit 102ea5a into servo:master Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github issue & pull request lists are squashed to the left
7 participants