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

Make inline elements work in fullscreen mode #24034

Merged
merged 1 commit into from Sep 6, 2019

Conversation

@ferjm
Copy link
Member

ferjm commented Aug 22, 2019

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #22358

This change is Reviewable

@ferjm
Copy link
Member Author

ferjm commented Aug 22, 2019

r? @emilio I am not sure if this is the right fix. But this patch makes fullscreen mode work for video elements.

Copy link
Member

emilio left a comment

This goes against https://fullscreen.spec.whatwg.org/#user-agent-level-style-sheet-defaults.

Also, how does this even work when the video has a relatively-positioned ancestor?

@ferjm ferjm changed the title Make video elements work in fullscreen mode Make inline elements work in fullscreen mode Aug 29, 2019
@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from 90e0fa2 to 513ade6 Aug 29, 2019
@ferjm
Copy link
Member Author

ferjm commented Aug 29, 2019

r? @emilio

Copy link
Member

emilio left a comment

So I'm not a fan of this because this is just working around #19771.

If we were to do this, I'd rather either:

  • Rename the second argument of set_adjusted_display to something more meaningful, or...
  • (preferrably) move this hack to construct.rs, that is:
    • Remove the second argument of set_adjusted_display.
    • Make the munged_display stuff conditional on !self.style.is_top_layer() && parent.is_flex_container() && !element.is_root(). Or such.
@@ -219,9 +220,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
let display = self.style.get_box().clone_display();
let blockified_display = display.equivalent_block_display(is_root);
if display != blockified_display {
let is_fullscreen = self.style.get_box()._servo_top_layer == InTopLayer::Top;

This comment has been minimized.

Copy link
@emilio

emilio Aug 29, 2019

Member

I think this could be self.style.in_top_layer(), fwiw.

@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from 513ade6 to d6d7500 Sep 3, 2019
@ferjm
Copy link
Member Author

ferjm commented Sep 3, 2019

@bors-servo try=wpt

bors-servo added a commit that referenced this pull request Sep 3, 2019
Make inline elements work in fullscreen mode

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22358

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

bors-servo commented Sep 3, 2019

Trying commit d6d7500 with merge d0a2908...

@ferjm
Copy link
Member Author

ferjm commented Sep 3, 2019

r? @emilio

@emilio
emilio approved these changes Sep 3, 2019
Copy link
Member

emilio left a comment

This makes much more sense.

Adding a test for this would be pretty nice. The test-case in #19771 should be trivially convertible into a reftest, test without display: block, reftest with it, and same for inline-block below.

Another request: Please double-check that the element actually remains fixed to the viewport, file a followup if not?

And a final one: Please file a followup to cleanup / potentially remove the is_item_or_root stuff?

r=me with that and the comment addressed. Thank you!

components/layout/construct.rs Show resolved Hide resolved
@bors-servo
Copy link
Contributor

bors-servo commented Sep 3, 2019

💔 Test failed - linux-rel-wpt

@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from d6d7500 to 0883fd0 Sep 4, 2019
@highfive highfive removed the S-tests-failed label Sep 4, 2019
@ferjm
Copy link
Member Author

ferjm commented Sep 5, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Sep 5, 2019

Trying commit bdbb439 with merge 90e8362...

bors-servo added a commit that referenced this pull request Sep 5, 2019
Make inline elements work in fullscreen mode

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22358

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

bors-servo commented Sep 5, 2019

💔 Test failed - linux-rel-css

@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from bdbb439 to bb7517c Sep 5, 2019
@highfive highfive removed the S-tests-failed label Sep 5, 2019
@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from bb7517c to e53ddb5 Sep 5, 2019
@ferjm ferjm force-pushed the ferjm:video.fullscreen branch from e53ddb5 to aa0c055 Sep 5, 2019
@ferjm
Copy link
Member Author

ferjm commented Sep 6, 2019

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Sep 6, 2019

📌 Commit aa0c055 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Sep 6, 2019

Testing commit aa0c055 with merge e852d02...

bors-servo added a commit that referenced this pull request Sep 6, 2019
Make inline elements work in fullscreen mode

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22358

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

bors-servo commented Sep 6, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: emilio
Pushing e852d02 to master...

@bors-servo bors-servo merged commit aa0c055 into servo:master Sep 6, 2019
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
Taskcluster (pull_request) TaskGroup: success
Details
homu Test successful
Details
@ferjm ferjm deleted the ferjm:video.fullscreen branch Sep 6, 2019
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.

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