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

Conversation

@notriddle
Copy link
Contributor

notriddle commented Sep 7, 2016

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


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

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!
@pcwalton
Copy link
Contributor

pcwalton commented Sep 7, 2016

Could you add a reftest for this? Thanks!

@notriddle
Copy link
Contributor Author

notriddle commented Sep 7, 2016

@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

bors-servo commented Sep 7, 2016

📌 Commit ff5aa87 has been approved by pcwalton,emilio

@highfive highfive assigned pcwalton and unassigned jdm Sep 7, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Sep 7, 2016

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

  • There's another pull request that is currently being tested, blocking this pull request: #13190
@bors-servo
Copy link
Contributor

bors-servo commented Sep 7, 2016

📌 Commit ff5aa87 has been approved by pcwalton,emilio

@bors-servo
Copy link
Contributor

bors-servo commented Sep 7, 2016

Testing commit ff5aa87 with merge 1815802...

bors-servo added 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

bors-servo commented Sep 7, 2016

💔 Test failed - mac-rel-wpt

@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

notriddle commented Sep 7, 2016

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.

@notriddle
Copy link
Contributor Author

notriddle commented Sep 7, 2016

There, thanks for asking for a spec reference.

@notriddle
Copy link
Contributor Author

notriddle commented Sep 8, 2016

bors-servo added 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

bors-servo commented Sep 8, 2016

Trying commit 516adfa with merge 2f8ba13...

@bors-servo
Copy link
Contributor

bors-servo commented Sep 8, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Sep 8, 2016

  ▶ PASS [expected FAIL] /css21_dev/html4/floats-149.htm
@highfive highfive removed the S-tests-failed label Sep 8, 2016
@pcwalton
Copy link
Contributor

pcwalton commented Sep 9, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

📌 Commit 102ea5a has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

Testing commit 102ea5a with merge 2d13178...

bors-servo added 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

bors-servo commented Sep 9, 2016

💔 Test failed - mac-rel-wpt

@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
@notriddle
Copy link
Contributor Author

notriddle commented Sep 9, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

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

bors-servo commented Sep 9, 2016

@bors-servo bors-servo merged commit 102ea5a into servo:master Sep 9, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.