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

Support controlling interface and member visibility via preferences #10081

Merged
merged 8 commits into from May 2, 2016

Conversation

@jdm
Copy link
Member

jdm commented Mar 18, 2016

This was easier to throw together than per-attribute/method support, and it gets rid of some nonstandard properties from our globals.

Fixes #7626.

r? @Ms2ger


This change is Reviewable

@jdm
Copy link
Member Author

jdm commented Mar 18, 2016

I discovered that in the case of:

[Pref="foo"]
interface Parent {}

interface Child : Parent {}

Parent still gets defined in the current implementation even if foo is false. What should we do in this case?

@nox
Copy link
Member

nox commented Mar 19, 2016

Do you mean that Child still gets defined? Anyway whether it is parent or child I don't think either of them should be visible.

@jdm
Copy link
Member Author

jdm commented Mar 19, 2016

No, I mean that window.Parent is still defined even if the preference controlling it's visibility is false.

@nox
Copy link
Member

nox commented Mar 20, 2016

Well that's obviously wrong, no?

@paulrouget paulrouget mentioned this pull request Mar 21, 2016
@larsbergstrom
Copy link
Contributor

larsbergstrom commented Mar 23, 2016

👍 to `[Pref="dom.bluetooth.enabled"], and off by default.

cc @dati91

@jdm jdm force-pushed the jdm:interfacepref branch from e8f3b2e to 9afd906 Mar 23, 2016
@jdm
Copy link
Member Author

jdm commented Mar 23, 2016

This is ready for review.

@jdm jdm force-pushed the jdm:interfacepref branch from 41a29cc to 9cb157e Mar 23, 2016
@jdm
Copy link
Member Author

jdm commented Mar 24, 2016

This is still ready for review; I just got carried away and implemented the Pref annotation for members of interfaces as well.

@jdm jdm changed the title Support controlling interface visibility via preferences Support controlling interface and member visibility via preferences Mar 24, 2016
@jdm jdm force-pushed the jdm:interfacepref branch 2 times, most recently from 83e93ac to e06f60d Mar 24, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2016

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

@paulrouget
Copy link
Contributor

paulrouget commented Mar 29, 2016

Can we get a review on that?

@jdm
Copy link
Member Author

jdm commented Apr 27, 2016

This has been ignored for more than a month. I would really appreciate if someone would take responsibility for reviewing my work :(

@nox
Copy link
Member

nox commented Apr 29, 2016

On it.

Could you give more details about what you meant by "This was easier to throw together than per-attribute/method support"?

@nox
Copy link
Member

nox commented Apr 29, 2016

@jdm I think you are cursed.

capture d ecran 2016-04-29 a 11 05 07

@pkaminski
Copy link

pkaminski commented Apr 29, 2016

Hey @jdm, how did you make that happen? Reviewable thinks that somehow there's a discussion attached to a file that doesn't exist in the review, hence boom.


Comments from Reviewable

@pkaminski
Copy link

pkaminski commented Apr 29, 2016

I mean @nox, sorry.


Comments from Reviewable

@nox
Copy link
Member

nox commented Apr 29, 2016

@pkaminski I just clicked on the Reviewable button and it failed to load.

@jdm I don't get the purpose of avoiding JS_DefineProperties and friends, they just loop over items and call JS_DefineProperty sequentially. Couldn't we just rewrite JS_DefineProperties ourselves, putting a new field in JSPropertySpec or a similar structure?

else:
properties[arrayName] = "&[]"
properties[arrayName] = array.variableName()

This comment has been minimized.

Copy link
@nox

nox Apr 29, 2016

Member

Please revert this. It worked before and you didn't even document EMPTY_CONSTANTS.

@highfive
Copy link

highfive commented May 2, 2016

  ▶ Unexpected subtest result in /_mozilla/mozilla/preferences.html:
  │ FAIL [expected PASS] prefs
  │   → TestBinding is not defined
  │ 
  │ @http://web-platform.test:8000/_mozilla/mozilla/preferences.html:2:6
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ @http://web-platform.test:8000/_mozilla/mozilla/preferences.html:1:1
@jdm jdm force-pushed the jdm:interfacepref branch from 48b2b50 to 2a9bf70 May 2, 2016
@jdm
Copy link
Member Author

jdm commented May 2, 2016

@bors-servo: r=nox

@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

📌 Commit 2a9bf70 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

Testing commit 2a9bf70 with merge 8255e74...

bors-servo added a commit that referenced this pull request May 2, 2016
Support controlling interface and member visibility via preferences

This was easier to throw together than per-attribute/method support, and it gets rid of some nonstandard properties from our globals.

Fixes #7626.

r? @Ms2ger

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10081)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented May 2, 2016

  ▶ FAIL [expected PASS] /_mozilla/css/iframe/mozbrowser_navigation.html
  └   → /_mozilla/css/iframe/mozbrowser_navigation.html e60785ff75153e5d215bd0f65141fbb13cfbc61b
/_mozilla/css/iframe/mozbrowser_navigation_ref.html 8250706e506ad24231cc23be315b9b868387c598
Testing e60785ff75153e5d215bd0f65141fbb13cfbc61b == 8250706e506ad24231cc23be315b9b868387c598
@cbrewster
Copy link
Member

cbrewster commented May 2, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented May 2, 2016

@bors-servo bors-servo merged commit 2a9bf70 into servo:master May 2, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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

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