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

layout_2020: Implement support for backface-visibility #26537

Merged
merged 1 commit into from May 16, 2020

Conversation

@mrobinson
Copy link
Member

mrobinson commented May 15, 2020


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes
// TODO(mrobinson): We should pass the hit test information here and not create
// so many hit test display items.
Comment on lines 74 to 75

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin May 15, 2020

Member

The problem is that we want hit testing to be always present for each fragment, and always based on the border edge of the fragment. Some fragments do not have a border or background and thus do not generate a display item other than the hit-testing one. Some have backgrounds, but with the background-clip property such that the rectangle is not the one appropriate for hit testing.

We can still reduce the number of display items dedicated to hit testing when there happens to be another display item with the appropriate rectangle, but it’s not as straightforward as this comment suggests. Please reword it to indicate that.

This comment has been minimized.

Copy link
@mrobinson

mrobinson May 15, 2020

Author Member

Sure. I'll update the comment to be a bit clearer.

if self.get_box().backface_visibility == BackfaceVisiblity::Visible {
wr::PrimitiveFlags::default()
} else {
wr::PrimitiveFlags::empty()
}
Comment on lines 369 to 388

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin May 15, 2020

Member

Nit: please use match instead of == so that the compiler reminds us to update this code in case a new variant is ever added to the enum. (I suspect it is very unlikely that the backface-visibility property will ever get a new value, but making more common a pattern that can help elsewhere seems good.)

This comment has been minimized.

Copy link
@mrobinson

mrobinson May 15, 2020

Author Member

This is also fewer lines of code, so it makes a lot of sense.

@mrobinson mrobinson force-pushed the mrobinson:backface branch from 4ec97b1 to 84fc2c0 May 15, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 15, 2020

Thanks for the review. I've pushed a new version of the branch that addresses the issue you've identified.

@SimonSapin
Copy link
Member

SimonSapin commented May 15, 2020

Looks good, thanks!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

📌 Commit 84fc2c0 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

Testing commit 84fc2c0 with merge d7af9d8...

bors-servo added a commit that referenced this pull request May 15, 2020
layout_2020: Implement support for backface-visibility

<!-- 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
- [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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

💔 Test failed - status-taskcluster

@mrobinson
Copy link
Member Author

mrobinson commented May 15, 2020

1 unexpected results that are NOT known-intermittents:
  ▶ PASS [expected FAIL] /css/css-transforms/composited-under-rotateY-180deg-clip-perspective.html

I'll fix the expectation and submit this again.

@mrobinson mrobinson force-pushed the mrobinson:backface branch from 84fc2c0 to d36197c May 15, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 15, 2020

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

📌 Commit d36197c has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

The latest upstream changes (presumably #26414) made this pull request unmergeable. Please resolve the merge conflicts.

@mrobinson mrobinson force-pushed the mrobinson:backface branch from d36197c to 7f5056e May 15, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 15, 2020

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 15, 2020

📌 Commit 7f5056e has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 16, 2020

Testing commit 7f5056e with merge a2d010d...

bors-servo added a commit that referenced this pull request May 16, 2020
layout_2020: Implement support for backface-visibility

<!-- 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
- [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. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 16, 2020

💔 Test failed - status-taskcluster

@mrobinson mrobinson force-pushed the mrobinson:backface branch from 7f5056e to c287548 May 16, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 16, 2020

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 16, 2020

📌 Commit c287548 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented May 16, 2020

Testing commit c287548 with merge afc4e7e...

@bors-servo
Copy link
Contributor

bors-servo commented May 16, 2020

☀️ Test successful - status-taskcluster
Approved by: SimonSapin
Pushing afc4e7e to master...

@bors-servo bors-servo merged commit afc4e7e into servo:master May 16, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@mrobinson mrobinson deleted the mrobinson:backface branch May 16, 2020
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.

None yet

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