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

Implement matchMedia and MediaQueryList #13453

Merged
merged 1 commit into from Nov 2, 2016

Conversation

@metajack
Copy link
Contributor

metajack commented Sep 27, 2016


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

Fixes #13376.


This change is Reviewable

@highfive
Copy link

highfive commented Sep 27, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/lib.rs, components/style/media_queries.rs
  • @KiChjang: components/script/dom/mod.rs, components/script/dom/webidls/MediaQueryList.webidl, components/script/dom/bindings/trace.rs, components/script/script_thread.rs, components/script/dom/window.rs, components/script/dom/webidls/Window.webidl, components/script/dom/mediaquerylist.rs
@metajack
Copy link
Contributor Author

metajack commented Sep 27, 2016

I suspect I will still need to update some test expectations.

@metajack metajack force-pushed the metajack:media-query-list branch from c6bba8b to eea339b Sep 27, 2016
@jdm
Copy link
Member

jdm commented Sep 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Sep 27, 2016

Trying commit eea339b with merge fcc8645...

bors-servo added a commit that referenced this pull request Sep 27, 2016
Implement matchMedia and MediaQueryList

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

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

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

Fixes #13376.

<!-- 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/13453)
<!-- Reviewable:end -->
@metajack
Copy link
Contributor Author

metajack commented Sep 27, 2016

@Ms2ger @jdm I need signoff from one of you one MediaQueryList in the global according to the WPT failure.

@bors-servo
Copy link
Contributor

bors-servo commented Sep 27, 2016

💔 Test failed - linux-dev


// https://drafts.csswg.org/cssom-view/#mediaquerylist

[Exposed=(Window,Worker)]

This comment has been minimized.

Copy link
@jdm

jdm Sep 27, 2016

Member

If we can get away with not exposing to the worker, that would be best.

@jdm
Copy link
Member

jdm commented Sep 27, 2016

You have my blessing for exposing the new interface.

@metajack metajack force-pushed the metajack:media-query-list branch from eea339b to 037e14d Sep 27, 2016
@metajack
Copy link
Contributor Author

metajack commented Sep 27, 2016

@bors-servo try

Tests and expectations updated, and I changed the exposure to just the window object.

@bors-servo
Copy link
Contributor

bors-servo commented Sep 27, 2016

Trying commit 037e14d with merge 30ff329...

bors-servo added a commit that referenced this pull request Sep 27, 2016
Implement matchMedia and MediaQueryList

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

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

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

Fixes #13376.

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

bors-servo commented Sep 27, 2016

💔 Test failed - linux-dev

@jdm
Copy link
Member

jdm commented Sep 27, 2016

If possible, try making Window only exposed to Window. Otherwise, re-expose MediaQueryList to Worker and update the appropriate test.

@metajack metajack force-pushed the metajack:media-query-list branch from 037e14d to c455bdf Sep 27, 2016
@metajack
Copy link
Contributor Author

metajack commented Sep 27, 2016

@bors-servo try

@jdm Even though it isn't implemented, adding the annotation to matchMedia is enough to satisfy the WebIDL parser, so I did that.

@bors-servo
Copy link
Contributor

bors-servo commented Sep 27, 2016

Trying commit c455bdf with merge cd6aaed...

bors-servo added a commit that referenced this pull request Sep 27, 2016
Implement matchMedia and MediaQueryList

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

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

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

Fixes #13376.

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

bors-servo commented Sep 27, 2016

💔 Test failed - linux-dev

@wafflespeanut
Copy link
Member

wafflespeanut commented Sep 28, 2016

r? @jdm

@metajack
Copy link
Contributor Author

metajack commented Nov 2, 2016

@jdm I have addressed all your comments except for deriving JSTraceable, which isn't possible since WeakVec doesn't implement it.

Ready for re-review.

@jdm
Copy link
Member

jdm commented Nov 2, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

📌 Commit 8c2b25b has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

Testing commit 8c2b25b with merge cd9b0b4...

bors-servo added a commit that referenced this pull request Nov 2, 2016
Implement matchMedia and MediaQueryList

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

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

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

Fixes #13376.

<!-- 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/13453)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

💔 Test failed - linux-rel-wpt

@KiChjang
Copy link
Member

KiChjang commented Nov 2, 2016

Tests with unexpected results:
  ▶ TIMEOUT [expected CRASH] /html/semantics/tabular-data/the-table-element/caption-methods.html
  │ 
  │ VMware, Inc.
  │ Gallium 0.4 on softpipe
  │ 3.3 (Core Profile) Mesa 12.0.1
  └ Insertion failed: HierarchyRequest (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(1) }, at ../src/libcore/result.rs:799)

  ▶ Unexpected subtest result in /_mozilla/css/matchMedia.html:
  └ PASS [expected FAIL] MediaQueryList.matches for "(min-width: 150px)"
@jdm
Copy link
Member

jdm commented Nov 2, 2016

Filed #14026 for the first failure, but the other needs to be updated.

Fixes #13376.
@metajack metajack force-pushed the metajack:media-query-list branch from 8c2b25b to 138a048 Nov 2, 2016
@metajack
Copy link
Contributor Author

metajack commented Nov 2, 2016

@bors-servo r=jdm

Updated test expectation.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

📌 Commit 138a048 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

Testing commit 138a048 with merge 6ef46ab...

bors-servo added a commit that referenced this pull request Nov 2, 2016
Implement matchMedia and MediaQueryList

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

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

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

Fixes #13376.

<!-- 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/13453)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 2, 2016

@bors-servo bors-servo merged commit 138a048 into servo:master Nov 2, 2016
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Nov 2, 2016
3 of 3 tasks complete
@metajack metajack deleted the metajack:media-query-list branch Nov 3, 2016
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.

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