Skip to content

layout: support tiled gradients - #19554

Merged
bors-servo merged 1 commit into
servo:masterfrom
pyfisch:tiled-gradients1
Dec 14, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
pyfisch:tiled-gradients1

Conversation

@pyfisch

@pyfisch pyfisch commented Dec 13, 2017 •

Copy link
Copy Markdown
Contributor

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of push_gradient are and want to ask the webrender team before building in "workarounds" for the missing gradients.
half-rhombes


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list_builder.rs, components/layout/webrender_helpers.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 13, 2017
@Manishearth

Copy link
Copy Markdown
Member

r? @mbrubeck

@emilio

emilio commented Dec 13, 2017

Copy link
Copy Markdown
Member

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit a6a7272 with merge 906bd96...

bors-servo pushed a commit that referenced this pull request Dec 13, 2017
layout: support tiled gradients

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of [`push_gradient`](https://doc.servo.org/webrender_api/struct.DisplayListBuilder.html#method.push_gradient) are and want to ask the webrender team before building in "workarounds" for the missing gradients.
![half-rhombes](https://user-images.githubusercontent.com/2781017/33958051-b16f964a-e043-11e7-8218-b28388e2cf8d.png)

<!-- 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/19554)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Dec 13, 2017
@pyfisch

pyfisch commented Dec 13, 2017

Copy link
Copy Markdown
Contributor Author

💔 Test failed - mac-dev-unit

error: error: Connection to server timed out Connection to server timed out

This is clearly unrelated.

@mbrubeck

Copy link
Copy Markdown
Contributor

Results from the linux-rel-css test:

Details
Ran 9450 tests finished in 697.0 seconds.
  • 9446 ran as expected. 1671 tests skipped.
  • 1 tests failed unexpectedly
  • 1 tests timed out unexpectedly
  • 1 tests passed unexpectedly
  • 1 tests had unexpected subtest results

Tests with unexpected results:
  ▶ PASS [expected FAIL] /css/css-variables/vars-background-shorthand-001.html

  ▶ FAIL [expected PASS] /_mozilla/mozilla/simple_scroll_to_fragment.html
  └   → /_mozilla/mozilla/simple_scroll_to_fragment.html 2d5103c1d79069b6628ffe931d05456e5b9244b2
/_mozilla/mozilla/simple_scroll_to_fragment_ref.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 2d5103c1d79069b6628ffe931d05456e5b9244b2 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ TIMEOUT [expected PASS] /_mozilla/css/iframe/hide_after_load.html
  │ 
  │ VMware, Inc.
  │ softpipe
  └ 3.3 (Core Profile) Mesa 17.3.0-devel

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(100 + 155), 255, 255) (quirks)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(100 + 155), 255, 255) (almost standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(100 + 155), 255, 255) (standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgba(calc(100 + 155), 255, 255, 001) (quirks)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgba(calc(100 + 155), 255, 255, 001) (almost standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgba(calc(100 + 155), 255, 255, 001) (standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsl(calc(050 + 050), 100%, 100%) (quirks)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsl(calc(050 + 050), 100%, 100%) (almost standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsl(calc(050 + 050), 100%, 100%) (standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsla(calc(050 + 050), 100%, 100%, 001) (quirks)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsla(calc(050 + 050), 100%, 100%, 001) (almost standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] hsla(calc(050 + 050), 100%, 100%, 001) (standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(/**/100/**/ + /**/155/**/), 255, 255) (quirks)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(/**/100/**/ + /**/155/**/), 255, 255) (almost standards)

  ▶ Unexpected subtest result in /quirks-mode/hashless-hex-color.html:
  └ PASS [expected FAIL] rgb(calc(/**/100/**/ + /**/155/**/), 255, 255) (standards)

Note: The simple_scroll_to_fragment.html failure is unrelated; see #19268.

@pyfisch

pyfisch commented Dec 13, 2017

Copy link
Copy Markdown
Contributor Author

Travis just timed out: The job exceeded the maximum time limit for jobs, and has been terminated.

I got really lucky with the CI builders this time. 😖

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Dec 13, 2017
@pyfisch

pyfisch commented Dec 13, 2017

Copy link
Copy Markdown
Contributor Author

Set one test to PASS that was FAIL before.

@bors-servo retry

@mbrubeck mbrubeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! r=mbrubeck with one optional suggestion below.

bounds.size.height = bounds.size.height - border.vertical();

let mut tile = bounds.size;
match bg_size {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be clearer as let tile = match bg_size { ... };

@KiChjang

Copy link
Copy Markdown
Contributor

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 18c26e4 with merge 73b1803...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
layout: support tiled gradients

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of [`push_gradient`](https://doc.servo.org/webrender_api/struct.DisplayListBuilder.html#method.push_gradient) are and want to ask the webrender team before building in "workarounds" for the missing gradients.
![half-rhombes](https://user-images.githubusercontent.com/2781017/33958051-b16f964a-e043-11e7-8218-b28388e2cf8d.png)

<!-- 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/19554)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

@KiChjang

Copy link
Copy Markdown
Contributor

@bors-servo r=mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 18c26e4 has been approved by mbrubeck

@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 Dec 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 18c26e4 with merge a4ba0e6...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
layout: support tiled gradients

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of [`push_gradient`](https://doc.servo.org/webrender_api/struct.DisplayListBuilder.html#method.push_gradient) are and want to ask the webrender team before building in "workarounds" for the missing gradients.
![half-rhombes](https://user-images.githubusercontent.com/2781017/33958051-b16f964a-e043-11e7-8218-b28388e2cf8d.png)

<!-- 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/19554)
<!-- Reviewable:end -->
@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Dec 14, 2017
@jdm

jdm commented Dec 14, 2017

Copy link
Copy Markdown
Member

@bors-servo: retry
#19563

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9502e9f with merge a8a4fd1...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
layout: support tiled gradients

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of [`push_gradient`](https://doc.servo.org/webrender_api/struct.DisplayListBuilder.html#method.push_gradient) are and want to ask the webrender team before building in "workarounds" for the missing gradients.
![half-rhombes](https://user-images.githubusercontent.com/2781017/33958051-b16f964a-e043-11e7-8218-b28388e2cf8d.png)

<!-- 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/19554)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - android

@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 Dec 14, 2017
@jdm

jdm commented Dec 14, 2017

Copy link
Copy Markdown
Member

@bors-servo: retry
#19563

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9502e9f with merge 6ee8e6a...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
layout: support tiled gradients

Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Resolves partially #19482. (See the mentioned website for example gradients with these features)
See also: #16657 and #10412

Some glitches can be seen in the attached file. I am unsure what the exact intended semantics of [`push_gradient`](https://doc.servo.org/webrender_api/struct.DisplayListBuilder.html#method.push_gradient) are and want to ask the webrender team before building in "workarounds" for the missing gradients.
![half-rhombes](https://user-images.githubusercontent.com/2781017/33958051-b16f964a-e043-11e7-8218-b28388e2cf8d.png)

<!-- 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/19554)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: mbrubeck
Pushing 6ee8e6a to master...

@bors-servo
bors-servo merged commit 9502e9f into servo:master Dec 14, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 14, 2017
@pyfisch
pyfisch deleted the tiled-gradients1 branch December 14, 2017 22:16
bors-servo pushed a commit that referenced this pull request Dec 14, 2017
Fixes the glitches mentioned in #19554.
Now gradient tiles are placed in the whole bounding box.
bors-servo pushed a commit that referenced this pull request Dec 14, 2017
layout: background-origin attribute for gradients

Fixes the glitches mentioned in #19554.
Now gradient tiles are placed in the whole bounding box.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19568)
<!-- Reviewable:end -->
pyfisch added a commit to pyfisch/servo that referenced this pull request Dec 15, 2017
Fixes the glitches mentioned in servo#19554.
Now gradient tiles are placed in the whole bounding box.
bors-servo pushed a commit that referenced this pull request Dec 15, 2017
layout: background-origin attribute for gradients

Fixes the glitches mentioned in #19554.
Now gradient tiles are placed in the whole bounding box.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19568)
<!-- Reviewable:end -->
pyfisch added a commit to pyfisch/servo that referenced this pull request Dec 15, 2017
Fixes the glitches mentioned in servo#19554.
Now gradient tiles are placed in the whole bounding box.
pyfisch added a commit to pyfisch/servo that referenced this pull request Dec 15, 2017
Fixes the glitches mentioned in servo#19554.
Now gradient tiles are placed in the whole bounding box.
bors-servo pushed a commit that referenced this pull request Dec 15, 2017
layout: background-origin attribute for gradients

Fixes the glitches mentioned in #19554.
Now gradient tiles are placed in the whole bounding box.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19568)
<!-- Reviewable:end -->
jdm pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 4, 2018
Use background-size, background-position properties to render
CSS gradients.

Some cleanup in display_list_builder.rs related to gradient
calculations.

Adds two wpt tests for tiled gradients.

Note: For now even gradients with background-repeat: no-repeat
are repeated. Sometimes the gradient is not repeated everywhere.

Enable vars-background-shorthand-001.html CSS test.

Upstreamed from servo/servo#19554 [ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants