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

WR update: preserve-3d support #16775

Closed
wants to merge 2 commits into from
Closed

WR update: preserve-3d support #16775

wants to merge 2 commits into from

Conversation

@kvark
Copy link
Member

kvark commented May 8, 2017

This is WR update to servo/webrender@d335555 having new features:

Edit: the references to bincode serialization and border styles are removed from here, since they are already integrated into Servo.
Edit2: this is alternative/similar to #16801, based on @mrobinson code (see first commit).


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).

Related to #9087
Note that I'm unlocking a few tests as well as changing some related to preserve-3d. The changes come from common sense and comparison to Chromium. I'm ready to discuss them on a individual basis.

  • There are tests for these changes OR
  • These changes do not require tests because _____

There is still an investigation to do with regards to the differences of preserve3d logic between Blink and Gecko.


This change is Reviewable

@highfive
Copy link

highfive commented May 8, 2017

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @wafflespeanut (or someone else) soon.

@highfive
Copy link

highfive commented May 8, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/properties.mako.rs
  • @emilio: components/layout/display_list_builder.rs, components/layout/webrender_helpers.rs, components/style/properties/properties.mako.rs, components/layout/fragment.rs
@highfive
Copy link

highfive commented May 8, 2017

warning Warning warning

  • This pull request modifies the contents of
    tests/wpt/css-tests/, which are overwriten occasionally whenever the
    directory is synced from upstream.
@@ -2528,14 +2539,15 @@ impl InlineFlowDisplayListBuilding for InlineFlow {
fragment.stacking_context_id = fragment.stacking_context_id();

let current_stacking_context_id = state.current_stacking_context_id;
let current_scroll_root_id = state.current_scroll_root_id;
let stacking_context = fragment.create_stacking_context(
fragment.stacking_context_id,

This comment has been minimized.

Copy link
@emilio

emilio May 8, 2017

Member

nit: indentation seems weird here.

!effects.clip.is_auto() {
effects.mix_blend_mode != mix_blend_mode::T::normal ||
!effects.clip.is_auto() ||
effects.mix_blend_mode != mix_blend_mode::T::normal {
return transform_style::T::flat;

This comment has been minimized.

Copy link
@emilio

emilio May 8, 2017

Member

Oh, did this happen to do the right thing?

This comment has been minimized.

Copy link
@emilio

emilio May 8, 2017

Member

Well, no, i guess it didn't :)

This comment has been minimized.

Copy link
@kvark

kvark May 9, 2017

Author Member

Yeah, the old wording was really confusing. I think the old logic could be rewritten as

if effects.opacity < 1.0 ||
            !effects.filter.is_empty() ||
            !effects.clip.is_auto() {
            if effects.mix_blend_mode == mix_blend_mode::T::normal {
                return transform_style::T::flat;
            }
}

My assumption was that it's just a refactoring bug, where someone mixed the || with { at the end of the lines.

<div style="height: 100px; width: 50px; background: red;
transform: translateY(-100px) rotateX(45deg) rotateY(45deg);
transform-origin: right"></div>

This comment has been minimized.

Copy link
@emilio

emilio May 8, 2017

Member

I'm not suer if we can upstream this changes right now. @jdm?

This comment has been minimized.

Copy link
@emilio

emilio May 8, 2017

Member

Actually, given these tests are in wpt, I don't think we should change them at all. I guess these pass on both Blink and Gecko?

This comment has been minimized.

Copy link
@kvark

kvark May 8, 2017

Author Member

I think I'll revert them and keep disabled then

This comment has been minimized.

Copy link
@glennw

glennw May 8, 2017

Member

If we have tests that differ between gecko/chromium, or fail in WR due to incomplete features - we can disable them in the test metadata, for now.

This comment has been minimized.

Copy link
@jdm

jdm May 8, 2017

Member

Yeah, these change will need manual upstreaming.

@kvark kvark changed the title WR update: preserve-3d, new borders, bincode serialization WR update: preserve-3d support May 8, 2017
@@ -182,6 +182,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
enable_aa: opts.enable_text_antialiasing,
enable_profiler: opts.webrender_stats,
debug: opts.webrender_debug,
enable_batcher: false, //TEMP

This comment has been minimized.

Copy link
@glennw

glennw May 8, 2017

Member

We'll want to fix this up before any merging!

This comment has been minimized.

Copy link
@kvark

kvark May 8, 2017

Author Member

oops :) nicely spotted!

@kvark kvark force-pushed the kvark:preserve3d branch from b45faee to d26f124 May 8, 2017
@kvark kvark force-pushed the kvark:preserve3d branch 4 times, most recently from 57f8581 to af21ea2 May 11, 2017
@kvark
Copy link
Member Author

kvark commented May 13, 2017

@emilio thanks for taking a look! Everything should be addressed now.

@emilio
emilio approved these changes May 14, 2017
Copy link
Member

emilio left a comment

r=me with that.

Thanks!

@@ -0,0 +1,3 @@
[transform3d-sorting-004.htm]
type: reftest
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1362543

This comment has been minimized.

Copy link
@emilio

emilio May 14, 2017

Member

Do we really need to disable these?

We can just mark them as failing with a link to that bug.

This comment has been minimized.

Copy link
@kvark

kvark May 14, 2017

Author Member

I tried multiple things, didn't find how to add comments to those ini files

@kvark kvark force-pushed the kvark:preserve3d branch from af21ea2 to 3a511ee May 14, 2017
@kvark
Copy link
Member Author

kvark commented May 14, 2017

@emilio thanks!
@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented May 14, 2017

📌 Commit 3a511ee has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented May 14, 2017

Testing commit 3a511ee with merge 06c5424...

bors-servo added a commit that referenced this pull request May 14, 2017
WR update: preserve-3d support

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

This is WR update to servo/webrender@d335555 having new features:
  - limited "preserve-3d" support (servo/webrender#1169, servo/webrender#1208)
  - rayon thread pool (servo/webrender#1202)
  - further border rendering improvements

Edit: the references to bincode serialization and border styles are removed from here, since they are already integrated into Servo.
Edit2: this is alternative/similar to  #16801, based on @mrobinson code (see first commit).

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

Related to #9087
Note that I'm unlocking a few tests as well as changing some related to `preserve-3d`. The changes come from common sense and comparison to Chromium. I'm ready to discuss them on a individual basis.

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

There is still an investigation to do with regards to the differences of preserve3d logic between Blink and Gecko.

<!-- 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/16775)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 14, 2017

💔 Test failed - linux-rel-css

@emilio
Copy link
Member

emilio commented May 14, 2017

  ▶ PASS [expected FAIL] /compositing-1_dev/html/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-bottom-right-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-bottom-left-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-top-left-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-top-right-radius-010.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-3d-rotateY-stair-below-001.htm

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-3d-rotateY-stair-above-001.htm
  └   → /css-transforms-1_dev/html/transform-3d-rotateY-stair-above-001.htm f5edea3f9bcf9f3852f2959341726fa2da8225e0
/css-transforms-1_dev/html/reference/transform-3d-rotateY-stair-above-ref-001.htm 22397e5af63eece9a8c29e2619e2ec9e356aa97e
Testing f5edea3f9bcf9f3852f2959341726fa2da8225e0 == 22397e5af63eece9a8c29e2619e2ec9e356aa97e
@glennw
Copy link
Member

glennw commented May 14, 2017

Superseded by #16860

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

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