profile
viewpoint
Manish Goregaokar Manishearth @mozilla Berkeley, CA http://manishearth.github.io/ I work on @servo at @mozilla. <3 @rust-lang

immersive-web/webxr 1661

Repository for the WebXR Device API Specification.

laumann/compiletest-rs 146

An extraction of the compiletest utility from the Rust compiler

immersive-web/webxr-hands-input 26

A feature repo for working on hand input support in WebXR. Feature lead: Manish Goregaokar

Manishearth/array-init 26

Safe wrapper for initializing arrays

Manishearth/AnnoTabe 12

Annotations for tabs in Chrome

ByteCommander/ChatExchange6 6

Python2&3 API for talking to the StackExchange chat

Deependra-Patel/cs733 3

Distributed file system using Raft Consensus protocol

immersive-web/webxr-test-api 3

WPT testing API for WebXR

izgzhen/gsoc-file-support 2

Meta-tracker for my GSoC 2016 project

pull request commentservo/servo

Per fetch file token for blob url

@bors-servo r+

thanks!

gterzian

comment created time in 4 hours

pull request commentservo/servo

Remove XR canvas dirtying step.

If it failed during cleanup that means end() isn't working for some reason.

jdm

comment created time in 4 hours

create barnchManishearth/webxr

branch : status-interface

created branch time in 4 hours

PR opened immersive-web/webxr

Turn XRPermissionStatus into an interface

Unsure if I should use a FrozenArray or an any[] here, I think it's fine to use a frozen array even though the attribute can change because then the entire attribute will change (it's not [SameObject])

r? @toji

+2 -2

0 comment

1 changed file

pr created time in 4 hours

issue commentimmersive-web/webxr

XRPermissionStatus is a dictionary but inherits from an interface

Yikes, that is indeed an oversight.

stephenmcgruer

comment created time in 4 hours

issue commentprojectfluent/fluent-rs

Evaluate Send/Sync of FluentBundle

I would recommend this. parking_lot is a good crate, and Firefox already depends on it.

I personally would prefer to avoid having to add a dependency on parking_lot so std's RwLock and desugar the call into an immutable get+ mutable set to only require lock when needed

I mean, this is fine too, but it still involves multiple locks.

It might be worth making threadsafety an opt-in optional feature; people who need it can enable it and everyone else can continue with the existing system with less contention.

zbraniecki

comment created time in 4 hours

issue commentimmersive-web/layers

Define how input is handled

Oh, I was suggesting that we trigger select events on the layer, and we extend select events to also contain optional xy parameters when found on a layer. Or have an XRInputSourceLayerEvent: XRInputSourceEvent with xy coordinates. I like the former solution because we can use the same thing with screen space input.

cabanier

comment created time in 13 hours

issue commentservo/servo

Immersive "app" menu on hololens

Yeah, what I mean is that the WebXR backend should be aware that the menu is open (and when it closes) so that it can stop sending input information to JS

The idea is that JS should not be able to see interactions with this UI: we will need similar things for permissions prompts in XR as well

Manishearth

comment created time in 13 hours

issue commentservo/servo

Immersive mode doesn't reach 60fps

Current status: with IPC fixes, FPS is now hovering around 55. It sometimes wiggles a bunch, but usually doesn't go below 45, except during the first few seconds after load (where it can go down to 30), and when it first sees a hand (when it goes down to 20).

jdm

comment created time in 13 hours

Pull request review commentimmersive-web/webxr

Use permissions API for XR feature requests

 Each time the [=list of immersive XR devices=] changes the user agent should <df   1. [=Shut down the session|Shut down=] any active {{XRSession}}s.   1. Set the [=XR compatible=] boolean of all {{WebGLRenderingContextBase}} instances to <code>false</code>.   1. [=Queue a task=] to [=fire an event=] named {{devicechange!!event}} on the [=context object=].+  1. [=Queue a task=] to fire appropriate <code>change</code> events on any {{XRPermissionStatus}} objects who are affected by the change in the [=XR/immersive XR device=] or [=inline XR device=].

This is basically the fallout of making it no longer require an XRSession (which was definitely a good decision): features are still tied to devices, so changing the device can invalidate permissions.

It could be expanded to not require this, we can file a followup issue about that. There's some concern about how much permissions should persist between devices anyway.

Manishearth

comment created time in 13 hours

Pull request review commentimmersive-web/webxr

Use permissions API for XR feature requests

 When this method is invoked, the user agent MUST run the following steps:             1. Abort these steps.         1. Let |session| be a new {{XRSession}} object.         1. [=Initialize the session=] with |session|, |mode|, and |device|.-        1. [=Resolve the requested features=] given by |options|' {{XRSessionInit/requiredFeatures}} and |options|' {{XRSessionInit/optionalFeatures}} values for |session|, and let |resolved| be the returned value.-        1. If |resolved| is <code>false</code>, run the following steps:+        1. Let |descriptor| be an {{XRPermissionDescriptor}} initialized with |session|, |options|' {{XRSessionInit/requiredFeatures}}, and |options|' {{XRSessionInit/optionalFeatures}}.+        1. Let |status| be an {{XRPermissionStatus}}, initially <code>null</code>+        1. [=Request the xr permission=] with |descriptor| and |status|.

The media spec is using it incorrectly: it operates on the return value of the boolean permissions request algorithm, which does not exist, and it returns a value from its own permissions request algorithm, which according to the permissions spec should not exist. I'd be more than happy to clean this up but as written the permissions spec forces you to use an inout parameter. Perhaps it should be changed to use return values in many places so that it can be used in the way the media spec expects it to be.

image

Manishearth

comment created time in 13 hours

Pull request review commentimmersive-web/webxr

Use permissions API for XR feature requests

 The [=default allowlist=] for this feature is <code>["self"]</code>.  Note: If the document's origin is not allowed to use the <code>"xr-spatial-tracking"</code> feature policy any [=immersive sessions=] will be blocked, because all [=immersive sessions=] require some use of spatial tracking. [=Inline sessions=] will still be allowed, but restricted to only using the {{XRReferenceSpaceType/"viewer"}} {{XRReferenceSpace}}. ++Permissions API Integration {#permissions}+---------++The [[!permissions]] API provides a uniform way for websites to request permissions from users and query which permissions they have been granted. ++The <dfn enum-value for="PermissionName">"xr"</dfn> [=powerful feature=]’s permission-related algorithms and types are defined as follows: +++<dl>+<dt>[=permission descriptor type=]</dt>+<dd>++<pre class="idl">+dictionary XRPermissionDescriptor: PermissionDescriptor {+  XRSession session;+  sequence&lt;any&gt; requiredFeatures;+  sequence&lt;any&gt; optionalFeatures;+};+</pre>++{{PermissionDescriptor/name}} for {{XRPermissionDescriptor}} is {{PermissionName/"xr"}}.+++</dd>++<dt>[=permission result type=]</dt>+<dd>+<pre class=idl>+dictionary XRPermissionStatus: PermissionStatus {+  sequence&lt;any&gt; granted;

cc @toji opinions on naming?

Manishearth

comment created time in 14 hours

Pull request review commentimmersive-web/webxr

Use permissions API for XR feature requests

 Each time the [=list of immersive XR devices=] changes the user agent should <df   1. [=Shut down the session|Shut down=] any active {{XRSession}}s.   1. Set the [=XR compatible=] boolean of all {{WebGLRenderingContextBase}} instances to <code>false</code>.   1. [=Queue a task=] to [=fire an event=] named {{devicechange!!event}} on the [=context object=].+  1. [=Queue a task=] to fire appropriate <code>change</code> events on any {{XRPermissionStatus}} objects who are affected by the change in the [=XR/immersive XR device=] or [=inline XR device=].

Because permissions being granted is the intersection of the device supporting it and the user allowing it. This could be changed, but I was trying to keep the behavior of permissions as close to the existing features behavior as possible.

Manishearth

comment created time in 14 hours

Pull request review commentimmersive-web/webxr

Use permissions API for XR feature requests

 The [=default allowlist=] for this feature is <code>["self"]</code>.  Note: If the document's origin is not allowed to use the <code>"xr-spatial-tracking"</code> feature policy any [=immersive sessions=] will be blocked, because all [=immersive sessions=] require some use of spatial tracking. [=Inline sessions=] will still be allowed, but restricted to only using the {{XRReferenceSpaceType/"viewer"}} {{XRReferenceSpace}}. ++Permissions API Integration {#permissions}+---------++The [[!permissions]] API provides a uniform way for websites to request permissions from users and query which permissions they have been granted. ++The <dfn enum-value for="PermissionName">"xr"</dfn> [=powerful feature=]’s permission-related algorithms and types are defined as follows: +++<dl>+<dt>[=permission descriptor type=]</dt>+<dd>++<pre class="idl">+dictionary XRPermissionDescriptor: PermissionDescriptor {+  XRSession session;+  sequence&lt;any&gt; requiredFeatures;+  sequence&lt;any&gt; optionalFeatures;+};+</pre>++{{PermissionDescriptor/name}} for {{XRPermissionDescriptor}} is {{PermissionName/"xr"}}.+++</dd>++<dt>[=permission result type=]</dt>+<dd>+<pre class=idl>+dictionary XRPermissionStatus: PermissionStatus {+  sequence&lt;any&gt; granted;+};

No, this was part of the point of this change, see https://github.com/immersive-web/webxr/issues/794 . It's important for apps to know what optional features were granted.

Here, you should be able to check for permissions without a session.

This is already true, you don't need a session anymore.

Manishearth

comment created time in 14 hours

issue commentservo/servo

Immersive "app" menu on hololens

The receiver would probably have two potential responses: exit immersive session, and resume working (if the menu is exited)

Manishearth

comment created time in 20 hours

issue commentimmersive-web/webxr-input-profiles

Should we have a generic profile for hands?

generic-hand and generic-hand-squeeze seem fine to me.

Manishearth

comment created time in 21 hours

issue commentimmersive-web/layers

Define how input is handled

I feel like we could trigger select events with xy coordinates?

Having xy coordinates would be useful for screen-space select events as well.

cabanier

comment created time in 21 hours

issue commentservo/servo

Immersive "app" menu on hololens

Hmmmm. So the gesture recognition itself is pretty easy, we can use some dot products on the grip space unit vectors. Sending the signal out is tricky because the API servo uses is designed generically. What we could do is accept an optional struct on session creation with a trigger_menu_display() function, and have it contain an IPC sender. On creation, servo creates the receiver end hooks it up to the embedder.

Ideally the session would be unable to receive input during this time; what we might have to do is have this function return an Option<Receiver>, where the None case means that the menu was not opened, and the receiver is what lets us know we can resume receiving input.

Thoughts? cc @asajeffrey

Manishearth

comment created time in a day

pull request commentservo/webxr

Bump bindgen (WIP)

Oh, it might be.

nox

comment created time in a day

pull request commentservo/webxr

Use supported environment blend mode in openxr backend.

@bors-servo r+

jdm

comment created time in a day

issue commentrust-community/team

Community Team Meeting Agenda February 26, 2020

@flaki note that there is already an internal spreadsheet and mailing list of meetup organizers. We could potentially turn the spreadsheet into a page somewhere.

technetos

comment created time in a day

pull request commentservo/webxr

Bump bindgen (WIP)

cc @asajeffrey who has access to the headers to regenerate stuff with

nox

comment created time in a day

pull request commentservo/servo

Remove XR canvas dirtying step.

@bors-servo r+

jdm

comment created time in a day

push eventimmersive-web/webxr-input-profiles

Lachlan Ford

commit sha 9b5fec7965963207f29be8fc6bb4cdc9976caf41

Update valve-index.json

view details

Lachlan Ford

commit sha e38e6701ed9c3c2e85c2d78f1da5537c1ba7bfdc

Update valve-index.json

view details

Lachlan Ford

commit sha 3e006a74366808d33daf80178f3e0d6f4d3334cd

Update samsung-odyssey.json

view details

Lachlan Ford

commit sha d1a0c42c109d555e95b67212519c829a5640dcff

Update samsung-odyssey.json

view details

Lachlan Ford

commit sha a9e22dae828ad8839bb4e0ce86dcc9b2a2f638ae

Update htc-vive.json

view details

Lachlan Ford

commit sha 8b54c1c12e1638e9d462ddda0da14901423bdfd0

Update htc-vive.json

view details

Lachlan Ford

commit sha 80be8732db772588cddcfc0e939bedb3d1a1539a

Update oculus-touch.json

view details

Lachlan Ford

commit sha 4d122cef8dfafeaa3d5e8a67b5a96f3176f4f890

Update oculus-touch-v2.json

view details

Manish Goregaokar

commit sha 09407e15d8d5f86be2862aadb1ca2a1fb0a43a11

Merge pull request #158 from fordacious/master Updated input profiles to match current OpenXR Chromium implementation

view details

push time in a day

PR merged immersive-web/webxr-input-profiles

Updated input profiles to match current OpenXR Chromium implementation

Updated the input profiles to match what is currently implemented in the OpenXR implementation of WebXR for Chromium, which has input bindings for all PC VR controllers.

Each input profile has a menu button reserved by the browser.

+12 -12

0 comment

5 changed files

fordacious

pr closed time in a day

delete branch Manishearth/webxr

delete branch : consent-tracking

delete time in a day

push eventimmersive-web/webxr

Manish Goregaokar

commit sha ee370bd1f3b0a9055069b23dd2a2b43b59bdfbff

Use permissions API for XR feature requests

view details

Manish Goregaokar

commit sha c69936cc309f0c68defbb7a2270eb86ec4b494ca

remove duplicate line

view details

Manish Goregaokar

commit sha 82495dcb94a41c5cb291cc9c6dd68e56ae4bfa3f

Grant features for the session in the request algorithm

view details

Manish Goregaokar

commit sha 6914665b3b5404d5b9d5e0e603d157c61bc166d4

Review fixes

view details

Manish Goregaokar

commit sha e980903fc636bb34631ead865b36bfc4424b270b

Unconditionally null out |granted|

view details

Manish Goregaokar

commit sha 68670dc0135ce4cb3bea1fdc8a98bf591a2f57b9

Explicitly deal with permissions prompts and such

view details

Manish Goregaokar

commit sha 13babff893b2608a26dfe79f19c170f4231c55da

Use language from #request-permission-to-use

view details

Manish Goregaokar

commit sha 8a4a443e28042026e81f90d5fa4904c0f2a95497

Make permissions query stuff use devices, not sessions

view details

Manish Goregaokar

commit sha 41612a78285934222e279de08e792012bf676256

Merge pull request #900 from Manishearth/consent-tracking Use permissions API for XR feature requests

view details

push time in a day

PR merged immersive-web/webxr

Use permissions API for XR feature requests

Rendered

This makes our feature request algorithm reuse machinery from the Permissions API, making it possible to do things like query consent status.

We define a single "xr" feature, however the query is done through a new XRPermissionDescriptor type which contains additional information about the requested features and the session.

In the current implementation, requested features are not persisted across sessions (which enables sessions with different modes, and sessions using different devices to have different granted features). However, there is nothing stopping the user agent from persisting granted features where it feels it prudent, since the spec relies on there being a "clear signal of user intent".

I'm not 100% sure of this approach, and I suspect this may go through a bunch of changes, hence the draft PR.

r? @NellWaliczek @toji

/fixes #794, /fixes #722, /fixes #702, /fixes #725

(maybe also #725?)

+150 -45

8 comments

1 changed file

Manishearth

pr closed time in a day

issue closedimmersive-web/webxr

Should applications be able to determine that the user declined consent?

This issue tracks determining whether it is okay for the API to expose (directly) that the user declined a request for user consent or otherwise chose not to allow the application to use XR functionality - vs., for example, just didn't have support in their user agent or platform.

Allowing the application to query user consent status (#722) is a direct route, but this can also be leaked in other ways, even if consent is not persisted.

For example, if requestSession() returns a different DOMException when consent is not given, this can also be used as a direct signal. On the other hand, if requestSession() always rejects with "NotSupportedError", it would no longer be trivial to determine that the user denied the request vs. doesn't have hardware. (This same concern may apply to use of different DOMException codes - and messages - for other failures that might expose information about the user's configuration. This specific case might still be inferred via timing.)

For consent that is persisted, with a little knowledge about specific implementations, applications might also be able to infer that the user has previously visited the origin even if they have cleared site data. For example, if a site always requests geolocation, the fact that the query result is not "prompt" could be a good signal that the user has previously visited the site (unless they have this disabled for all sites in the user agent's settings).

The ability to silently querying various permissions might also provide data for fingerprinting, especially for tracking across multiple visits to the same origin even after clearing site data.

(This was originally discussed in item 5 of https://github.com/immersive-web/webxr/pull/689#issuecomment-502262866.)

closed time in a day

ddorwin

issue closedimmersive-web/webxr

Privacy: Interaction of existing permission-based features with WebXR feature consent

We should ensure that the feature selection and privacy design addresses the interaction of existing permission-based features with the WebXR feature and/or consent mechanism(s).

A concrete example involves AR, which involves rendering what the user sees, which may come from the camera, and existing camera-access APIs. The idea behind "AR Mode" and the entry interstitial was to be able to convey to the user the privacy implications and scope of consent. However, (unless we do something to prevent it) applications can still have access to camera via getUserMedia().

Thus:

  • If the origin already has camera access, the message displayed to the user is incorrect - the application could be recording the user's (visual) environment even though it's not WebXR that enabled this.
  • The application could request camera access from within the session, which could change the implications about which the user had been carefully informed when consenting to the session creation.
    • Worse yet, this camera access permission is likely to be persisted beyond the XR session (the scope about which the user was told).
    • This will become additionally confusing when aligned camera access is added to WebXR because the lifetimes of the consent will likely be different for the two APIs for which users will not understand the difference.
      • Furthermore, applications may thus be incentivized to use getUserMedia() inside AR sessions to avoid future prompts.
  • In both cases, users are unlikely to understand the implications of combining the various types of access. There is more discussion of this here.

Related to this, a aligned camera access API will need to decide whether it interacts with or is orthogonal to the existing camera permission (and policy-controlled feature).

closed time in a day

ddorwin

issue closedimmersive-web/webxr

Querying user consent status

[Disclaimer: This issue is one of several being filed to capture discussions that began either on #638, on #689, or at the most recent F2F]

This issue is dependent on the outcome of #720. If it is possible to request user consent in the middle of an immersive session, developers will likely need a way to determine if an API call will trigger a consent prompt so that they can explain to the end user that this will happen. For non-XR features, the Permissions API services this need via the query() API.

This issue tracks the need to determine if WebXR should allow for the ability to check if a prompt will be shown. It also track the discussion about what (if any) relationship WebXR should have with the existing Permissions API.

(Note, this issue will probably be one of the later ones that gets solved out of this batch as it is dependent on a number of others landing first)

closed time in a day

NellWaliczek

issue closedimmersive-web/webxr

Informing apps which optional features were granted?

If I'm reading the spec right, the requestSession algorithm includes list of enabled featues as an internal implementation detail, but as far as I can tell there's no direct way for an application to tell if a requested optional features was enabled or not?

At this time, the only defined features are reference space names, and for these the corresponding requestReferenceSpace call indicates if it's available, but this may not be a good fit for future optional features where there may not be an easy way to check if they are enabled, for example if they don't cause direct observable changes to existing APIs.

For example, some optional features may be be related to performance parameters, i.e. fixed-foveated rendering where the app may want to adjust its graphics when it's in effect. Or a hypothetical optional feature asking the UA to show instructions how to initiate tracking for handheld AR, where the app would need to know if the UA is doing so to decide if it it needs to show its own instructions instead.

Instead of having feature-specific "is this enabled" checks that may have large variations, would it help to have a common way to check for this?

One approach would be to expose the set of enabled features directly as a session property, i.e. a getEnabledFeatures call returning a list of strings or XRFeature objects.

Alternatively, a more specific isOptionalFeatureEnabled call could potentially return multiple values such as true / false / unknown / in progress / invalid, where for example "in progress" would mean that it's still indeterminate (i.e. "bounded" reference space is supported, but the device hasn't reported bounds yet, so a requestReferenceSpace promise would still be unresolved), and "invalid" could mean that this was rejected due to an unsupported combination of mode and features. This has some privacy implications, for example there presumably shouldn't be a "supported by device but declined by the user" state.

closed time in a day

klausw

issue closedimmersive-web/webxr

bug webVR webXR desktop app nwjs SDK

please see also the video below for more context. tanks

NWJS Version :

"{
	"node": "13.3.0",
	"v8": "7.9.317.31",
	"uv": "1.33.1",
	"zlib": "1.2.11",
	"brotli": "1.0.7",
	"ares": "1.15.0",
	"modules": "79",
	"nghttp2": "1.40.0",
	"napi": "5",
	"llhttp": "2.0.1",
	"openssl": "1.1.1d",
	"icu": "64.2",
	"unicode": "12.1",
	"nw": "0.43.0",
	"node-webkit": "0.43.0",
	"nw-commit-id": "a09cec1-c5d1d9e-da90f9f-6fd41d2",
	"nw-flavor": "sdk",
	"chromium": "79.0.3945.79"
}"

Expected behavior

We should see the app inside the VR headset or the WMR screen.

Actual behavior

Nothin appen, no error log .... just a infinite loading.

How to reproduce

Fork https://github.com/immersive-web/webxr-samples Download nwjs SDK Package.json

{
    "name": "helloworld",
    "main": "360-photos.html",
    "chromium-args": "--disable-raf-throttling --limit-fps=120 --remote-debugging-port=9222 --ignore-gpu-blacklist --force-gpu-mem-available-mb=14000 --enable-gpu-rasterization ",
    "js-flags": "--expose_gc --enable-webvr --webxr --enable-gamepad-extensions --enable-gamepad-vibration"
    
}

lauch.json

    "configurations": [
        {
            "type": "nwjs",
            "request": "launch",
            "name": "Launch NWjs",
            "nwjsVersion": "any",
            "runtimeExecutable": "${workspaceRoot}\\SDK\\nw.exe",
            "port": 9222,
            "webRoot": "${workspaceFolder}",
            "reloadAfterAttached": true
        }
    ]

than click launch nwjs. image


I made a little video to show the issue. You can see the app show nothing, but if i run from webbrowser it work fine. https://youtu.be/JtJhQI_fTwM


Or any help to fix this issue ? thank you so much and keep good job.

closed time in a day

djmisterjon

issue commentimmersive-web/webxr

bug webVR webXR desktop app nwjs SDK

(This is not a help forum for webXR, this is where we discuss the specification itself)

djmisterjon

comment created time in a day

issue commentrust-fuzz/libfuzzer

Feature request: integration with proptest and/or quickcheck

I've kinda wanted this for a while, however there's an important thing to note: Arbitrary works differently from quickcheck and proptest because those operate on an unlimited pool of entropy, and Arbitrary operates on a limited byte string (and has to try and not introduce too much obfuscation). Without this, fuzzing will be very slow and ineffective.

That said, the opposite direction is less of a problem: We can probably write a wrapper that takes anything that implements Arbitrary and gives you something that implements quickcheck::Arbitrary, and maybe something similar for proptest.

danwallach

comment created time in a day

push eventrust-lang/rust-clippy

GHA CI

commit sha 80e9cd87df92d8d71d3563df09d16bbc15b10afa

Automatic deploy to GitHub Pages: 2734e4e1f7faf59b4b7c9db7070626b8b7fd2145

view details

push time in 2 days

issue commentrust-community/team

Community Team Meeting Agenda Febuary 26, 2020

set up by the community team for projects that they weren't comfortable having under rust-lang

This isn't true: The org was set up for important-ish projects that were maintained by other folks that they weren't able to maintain anymore and wanted to hand off. It's kind of a holding ground for such projects to provide a basic maintainership backstop, and ideally grow them back into projects that others run.

Some of these projects could very well exist under rust-lang: too-many-lists probably should. awesome-rust definitely should not and is one of the reasons we went out of our way to clarify the org as unofficial crates.

technetos

comment created time in 2 days

pull request commentservo/servo

Add profiling to WebXR

@bors-servo retry

  • https://github.com/servo/servo/issues/25513
Manishearth

comment created time in 3 days

pull request commentservo/servo

refactor: rename XR to XRSystem

 0:08.38(B INFO(B Diffing old and new manifests /repo/tests/wpt/mozilla/meta/MANIFEST.json
 0:08.67(B WARNING(B Manifest /repo/tests/wpt/mozilla/meta/MANIFEST.json contains correct tests but file hashes changed.
 0:08.67(B ERROR(B Manifest /repo/tests/wpt/mozilla/meta/MANIFEST.json is outdated, use |./mach update-manifest| to fix.
 0:08.67(B INFO(B Diffing old and new manifests /repo/tests/wpt/webgl/meta/MANIFEST.json
 0:09.76(B INFO(B Diffing old and new manifests /repo/tests/wpt/metadata/MANIFEST.json

jsjoeio

comment created time in 3 days

push eventManishearth/triomphe

CAD97

commit sha 79427206da75d3383b8de0eb587a951b2a413890

Replace homegrown offset_of with memoffset

view details

Manish Goregaokar

commit sha 9a306f6234c005c7e3ac66c9a2443665d9e0c8a7

Merge branch 'master' into offestof

view details

Nika Layzell

commit sha cd0cdb2ac04fd0233b0371363af5acc916e936c3

Avoid miri-detected UB in from_header_with_iter

view details

Nika Layzell

commit sha fb9fb313db441f8b15df9e765bde97b51d7c2eff

Run tests under miri in CI

view details

Manish Goregaokar

commit sha 9ee8b2cffb52267a6bbf9c62b77a13742d8a2fcc

Merge pull request #4 from mystor/miri Fix miri-detected undefined behaviour

view details

push time in 3 days

PR merged Manishearth/triomphe

Fix miri-detected undefined behaviour

This builds on top of #3, as the implementation of offset_of! in this crate exhibits miri-detected UB.

The tests in this crate aren't very comprehensive, but with these changes miri no longer complains when running them.

+43 -78

0 comment

3 changed files

mystor

pr closed time in 3 days

push eventManishearth/triomphe

Manish Goregaokar

commit sha b2ceb67385d65fc0a043fb7a53cc667284830ce4

Update tests.yml

view details

push time in 3 days

pull request commentservo/servo

Add profiling to WebXR

@bors-servo r=jdm

Manishearth

comment created time in 3 days

push eventManishearth/servo

Manish Goregaokar

commit sha f3e1aba4e3bc1f715cebdca3d00734ab29b63d9b

Add profiling for WebXR

view details

push time in 3 days

push eventrust-unofficial/patterns

Kinsey Favre

commit sha 396ae01fdd31cc7fc4229066412b65ce21726bc1

Rewrite mentions of `try!` macro to use `?` operator The `try!` macro has been [deprecated since Rust 1.39.0][1] in favor of the `?` operator; update text using it to reflect this. [1]: https://doc.rust-lang.org/std/macro.try.html

view details

Manish Goregaokar

commit sha 41bfd4d4824e0b81b7292ac9406bc4cb7c6edd4f

Merge pull request #92 from kinseytamsin/question-mark-op Rewrite mentions of `try!` macro to use `?` operator

view details

push time in 3 days

PR merged rust-unofficial/patterns

Rewrite mentions of `try!` macro to use `?` operator

The try! macro has been deprecated since Rust 1.39.0 in favor of the ? operator; update text using it to reflect this.

+7 -7

0 comment

1 changed file

kinseytamsin

pr closed time in 3 days

pull request commentservo/servo

Add profiling to WebXR

@bors-servo r=jdm

Manishearth

comment created time in 3 days

push eventManishearth/servo

Manish Goregaokar

commit sha e1b9b98cd7fbfc900a474684d37abf6a0639e185

Add profiling for WebXR

view details

push time in 3 days

pull request commentservo/servo

Add profiling to WebXR

@bors-servo r=jdm

Manishearth

comment created time in 3 days

push eventManishearth/servo

Luka Zitnik

commit sha a15775bad72a28f967854b15390c8e983d6e7c12

Instruct intallation of python-vitualenv Fixes servo/servo#23210 Closes servo/servo#23212

view details

WPT Sync Bot

commit sha 7e7c8873e443f5960d23785d250e472027a0eef3

Update web-platform-tests to revision ac16628eb7eb601957382053011363d2bcf8ce44

view details

CYBAI

commit sha 8f9e7166a235a8f8abca70915d1a3ecbd5b3d6a4

Update to use assert_throws_* functions for mozilla tests

view details

Paul Rouget

commit sha 6ddde1a3e1284a91f3088bf48d72d9425505df12

Stop animations when window is hidden (API + UWP)

view details

Paul Rouget

commit sha e45af06863e662c2568258088e00e604e6cfab20

bump min target platform

view details

CYBAI

commit sha 55f0d5ade1ce18b98e0d7817e16a8673ee6967c5

Diff manifests with raw string After WPT moves to "Manifest path trie RFC", we don't have the `paths` field in manifest anymore. But, we still have file hash in the `items` field; the simplest way to diff between manifests is to compare the raw string value of the `items` field. When we have different manifests, we must have different items field in the manifest json.

view details

Josh Matthews

commit sha d1a1f007ed556193104a10162cda30af69b2f7f3

Remove uses of promise_rejects.

view details

Josh Matthews

commit sha dc051715684e1758b6d7b726acbad66968bc4714

Remove intermittent failure.

view details

Manish Goregaokar

commit sha 68589128e0b531bdc725a160975510dd00b2dde5

Thread vslatestinstalled feature to the top

view details

bors-servo

commit sha f5ff38b87559cd25db44fa7bc6f2a9c4cb2264e0

Auto merge of #25783 - servo-wpt-sync:wpt_update_17-02-2020, r=jdm Sync WPT with upstream (17-02-2020) Automated downstream sync of changes from upstream as of 17-02-2020. [no-wpt-sync] r? @servo-wpt-sync

view details

bors-servo

commit sha 7786464dad72a221e162ac56a7dba8b0223115ee

Auto merge of #25761 - luka-zitnik:python-virtualenv-missing, r=jdm Instruct intallation of python-virtualenv Fixes servo/servo#23210 Closes servo/servo#23212 <!-- Please describe your changes on the following line: --> (Re-)enable `./mach bootstrap` by requiring a separate installation step for packages python, python-pip and python-virtualenv. --- <!-- 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] These changes fix #23210 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because bootstrap command is not covered by tests <!-- 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. -->

view details

WPT Sync Bot

commit sha af74a5d2cfb3b4fc77527d9927e5307babfdada1

Update web-platform-tests to revision 993a932dca2b378a44dc55f4ee80812f65d8fb4e

view details

Gregory Terzian

commit sha 6c02e5da4d4b676210a4464ccdecdfb438ae2b20

expect dom syntax error in window postmessage sameorigin test

view details

Josh Matthews

commit sha 3fd3c23e17f0bae5d46069ff2a8f61cf4bd4aad7

Update ipc-channel and crossbeam-channel.

view details

Josh Matthews

commit sha d9c13b7f4246ce722c73d93515a21015c07e76f0

Update rayon.

view details

Josh Matthews

commit sha 86a0de88ca880ecada9549f3f300d933d1febc72

Update tokio-threadpool.

view details

Josh Matthews

commit sha 2445efc73bf1fa4f3954b8cd102f4466c1764f04

Update redox_users.

view details

Josh Matthews

commit sha 1a680f708be65171ead3b3ea0628f5c777a629e0

Update tokio-executor.

view details

Josh Matthews

commit sha 1b9045446ef45e00dd2c23d28e9e30fa2fcacffc

Update tokio-timer.

view details

Josh Matthews

commit sha b13a37db2857ec9c6c456c4e6313007847e97f99

Update duplicates.

view details

push time in 3 days

pull request commentservo/webxr

Add profiling feature

@bors-servo r=jdm

Manishearth

comment created time in 3 days

pull request commentservo/webxr

Add profiling feature

@bors-servo r=jdm

Manishearth

comment created time in 3 days

issue commenti18n-concept/rust-discuss

Unicode Charter

The charter looks good!

I agree with @filmil : A new repo under unicode-org makes sense to me, since this is rust-specific and it's not yet 100% decided if omnICU will be Rust :) But moving this repo under unicode-org with the same name seems fine to me as well.

sffc

comment created time in 3 days

issue commentimmersive-web/webxr

Timing of initial inputsourceschange event

Right, threejs is currently incorrect by making this assumption. Our options are:

  • document this possible issue very strongly and hope nobody else makes the same mistake as Three
  • change the spec so this isn't an issue anymore
  • do both: harden up implementations, but document the behavior as still possible, so the related issues of attaching listeners even later than resolve isn't a problem

I slightly prefer the second option because the failure mode of (1) is a very subtle race and I'm not certain that authors will notice it.

But I'm down for any of these options, I just want us to do something

Manishearth

comment created time in 4 days

Pull request review commentimmersive-web/webxr-hands-input

Add first draft of explainer

+# WebXR Device API - Hand Input++This document describes a design giving developers access to hand-tracking XR systems, building on top of the [WebXR device API](https://immersive-web.github.io/webxr/)++## Use cases and scope++This API primarily exposes the poses of hand skeleton joints. It can be used to render a hand model in VR scenarios, as well perform gesture detection with the hands. It does not provide access to a full hand mesh.++## Accessing this API++This API will only be accessible if a `"hand-tracking"` [XR feature](https://immersive-web.github.io/webxr/#feature-dependencies) is requested.++This API presents itself as an additional field on `XRInputSource`, `hand`. The `hand` attribute will be non-null if the input source supports hand tracking and the feature has been requested.++```js+navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(...);++function renderFrame(session, frame) {+   // ...++   for (inputSource of session.inputSources) {+      if (inputSource.hand) {+         // render a hand model+         // perform gesture detection+      }+   }+}+++```++## Hands and joints++Each hand is made up many bones, connected by _joints_. We name them with their connected bone, for example `INDEX_PHALANGE_DISTAL` is the joint closer to the wrist connected to the distal phalange bone of the index finger. The `*_PHALANGE_TIP` "joints" locate the tips of the fingers. The `WRIST` joint is located at the composite joint between the wrist and forearm.++The joints can be accessed via indexing, for example to access the middle knuckle joint one would use:++```js+let joint = inputSource.hand[MIDDLE_PHALANGE_PROXIMAL];+```++Not all devices support all joints, this indexing getter will return `null` when accessing a joint that is not supported by the current user agent or device. This will not change for a given input source. If a joint is supported but not currently being tracked, the getter will still produce the `XRJoint`, with its associated `space` returning `null` when run through `getPose` (etc).++Each joint has an `XRSpace` `space`, located at its center, with its `-Y` direction pointing perpendicular to the skin, outwards from the palm, and `+Z` direction pointing along their associated bone, away from the wrist. This space will return null poses when the joint loses tracking.

The orientation matches what openxr does, except for the sign of the Z axis.

Manishearth

comment created time in 4 days

pull request commentimmersive-web/webxr-hands-input

Add first draft of explainer

https://github.com/immersive-web/webxr-hands-input/pull/12

Manishearth

comment created time in 4 days

PR opened immersive-web/webxr-hands-input

Add first draft of explainer

It's a bit light on prose in some parts, but it contains most of the meat of the actual design, and should be easy to turn into spec text.

Fixes #4

cc @toji @cabanier @artyom7 @thetuvix @fordacious @raviramachandra

+208 -0

0 comment

1 changed file

pr created time in 4 days

push eventimmersive-web/webxr-hands-input

Manish Goregaokar

commit sha e72e8fd949bfea0d7546c60fda91c1edf03d58b6

Add first draft of explainer

view details

push time in 4 days

PR closed immersive-web/webxr-hands-input

Add first draft of explainer

Fixes #4

I still need to write a lot of prose for these sections, but I figured I'd get a rough API in place that we can work off of.

r? @Artyom07 @thetuvix @fordacious

+187 -0

2 comments

1 changed file

Manishearth

pr closed time in 4 days

pull request commentimmersive-web/webxr-hands-input

Add first draft of explainer

Actually, reopening the PR since I changed it so much

Manishearth

comment created time in 4 days

pull request commentimmersive-web/webxr-hands-input

Add first draft of explainer

This is ready for wider review! I'm missing some code examples, but it's mostly good to go!

cc @Artyom17 @cabanier @fordacious

Manishearth

comment created time in 4 days

push eventimmersive-web/webxr-hands-input

Manish Goregaokar

commit sha 2892b689c4e6ca216df1ad609aea65366174909a

Add first draft of explainer

view details

push time in 4 days

issue commentimmersive-web/webxr

Timing of initial inputsourceschange event

Yes, because there's a gap between when the session sets up its resources and when resolve(..) has its callbacks run

Manishearth

comment created time in 4 days

pull request commentservo/servo

Use new and new_inherited in messagechannel

@bors-servo r+

gterzian

comment created time in 4 days

issue commentimmersive-web/webxr

Visibility state behavior is not clearly specified for inline sessions

Make a PR? I also recall us mostly choosing to go with 2.

cabanier

comment created time in 4 days

issue commentrust-fuzz/arbitrary

Allow custom arbitrary methods for fields in the custom derive

No strong thoughts, we can allow multiple methods for overriding it perhaps.

fitzgen

comment created time in 4 days

issue closedimmersive-web/webxr

Chroma Key on VideoNode

Hi, I'm working on a project where I need to play videos and remove the green background (example below) but I can't seem to find anything related to this (only found stuff where they use canvas, but I can't use that since I'm on an AR session). I'm using VideoNode to play the video. Does anyone have an idea on how I could achieve this? Any help is appreciated, thanks in advance!

Screenshot_20200204-173411

closed time in 4 days

brazaoo4

issue commentrust-lang/rust-clippy

CLIPPY_FLAGS to pass options to clippy/ enable disable lints via env vars

I'd say we should wait for https://github.com/rust-lang/cargo/pull/7533 first

matthiaskrgr

comment created time in 4 days

Pull request review commentservo/servo

Implement Broadcastchannel

 impl GlobalScope {             .send(ScriptMsg::RerouteMessagePort(port_id, task));     } +    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn schedule_broadcast(&self, msg: BroadcastMsg, channel_id: &Uuid) {+        // First, broadcast locally.+        self.broadcast_message_event(msg.clone(), Some(channel_id));++        if let BroadcastChannelState::Managed(router_id, _) =+            &*self.broadcast_channel_state.borrow()+        {+            // Second, broadcast to other globals via the constellation.+            //+            // Note: for globals in the same script-thread,+            // we could skip the hop to the constellation.+            let _ = self+                .script_to_constellation_chan()+                .send(ScriptMsg::ScheduleBroadcast(router_id.clone(), msg));+        } else {+            panic!("Attemps to broadcast a message via global not managing any channels.");+        }+    }++    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn broadcast_message_event(&self, event: BroadcastMsg, channel_id: Option<&Uuid>) {+        let BroadcastMsg {+            data,+            origin,+            channel_name,+        } = event;++        // Steps 7, a few preliminary steps.++        // - Check the worker is not closing.+        if let Some(worker) = self.downcast::<WorkerGlobalScope>() {+            if worker.is_closing() {+                return;+            }+        }++        // - Check the associated document is fully-active.+        if let Some(window) = self.downcast::<Window>() {+            if !window.Document().is_fully_active() {+                return;+            }+        }++        let to_dispatch = if let BroadcastChannelState::Managed(_, channels) =+            &*self.broadcast_channel_state.borrow()+        {+            // Step 7: Check for a case-sensitive match for the name of the channel.+            let channel_name = DOMString::from_string(channel_name);+            let channels: Vec<DomRoot<BroadcastChannel>> = match channels.get(&channel_name) {+                Some(channels) => channels+                    .iter()+                    .filter(|ref channel| {+                        // Step 8.+                        // Filter out the sender.+                        if let Some(id) = channel_id {+                            !(channel.id() == id)+                        } else {+                            true+                        }+                    })+                    .map(|channel| DomRoot::from_ref(&**channel))+                    // Step 9, sort by creation order, done by using a queue.

Is that going to sort it in any way? That's just going to give it to you in iteration order, and we immediately iterate so the collect may not be necessary? Is it not already in creation order?

gterzian

comment created time in 4 days

push eventrust-lang/rust-clippy

GHA CI

commit sha 151cd9545cd9cb7d1494244afaf060a7cec42a22

Automatic deploy to GitHub Pages: e342047068c010bf503db2d018974b7c5198fb5b

view details

push time in 4 days

push eventrust-lang/rust-clippy

GHA CI

commit sha 5318384c30b4575519d4ed24558d5e348ccb069d

Automatic deploy to GitHub Pages: acfcbee4a2b10e5a3ac2fe3e29e79a2828720b70

view details

push time in 4 days

push eventrust-lang/rust-clippy

GHA CI

commit sha 8b921c53d43baf865149130c3907e17da53f15c3

Automatic deploy to GitHub Pages: 3fc24192a58b2c34ab3c91daafa22dc38c2a6903

view details

push time in 5 days

pull request commentrustwasm/wasm-bindgen

Webxrdevice

Basically: if the main concern is breaking changes, I wouldn't be too concerned. If the main concern is just not having anything that's not gone through the full w3c standards pipeline, that's understandable.

kevthecoder

comment created time in 5 days

pull request commentrustwasm/wasm-bindgen

Webxrdevice

@Pauan You don't need a flag to use it in Chrome (but it only works for some devices). It's shipped on Oculus Browser and Chrome, and Firefox Reality is shipping the same API very soon. Firefox planned to ship in December along with Chrome, but some issues cropped up on the Firefox side delaying it a bit.

Either way, the editors consider the API surface done (and we're gunning for CR soon, but the process takes time), and it would be extremely unlikely for any further changes to be breaking given that there is real world content using this API now. New APIs may of course be tacked on, but that's true of all web specs.

kevthecoder

comment created time in 5 days

issue commentservo/webxr

Add frame timing information

Annoyingly the framerate is down to 30 when i'm doing these measurements, so I can't quite grab the situation where it started out fast and went down over a period of 20ish seconds

jdm

comment created time in 5 days

issue commentservo/servo

Immersive mode doesn't reach 60fps

Timing data: https://gist.github.com/Manishearth/825799a98bf4dca0d9a7e55058574736

image

Getting good data visualization of this is tricky. A stacked line graph seems ideal, though it's worth noting that run_one_frame measures multiple already-measured timings. It's helpful to fiddle with the graph ordering and put different columns on the bottom to better see their effect. Also you need to truncate the Y axis to get anything useful due to some very large outliers.

Interesting things to note:

  • render time and execute time seem to be mostly steady but have spikes when there are large spikes overall. I suspect the large spikes come from just everything slowing down for whatever reason
  • The transmit time seems pretty well correlated with the overall shape
  • wait time is also part of the reason the overall shape is like that, it's very wavy
jdm

comment created time in 5 days

issue commentservo/webxr

Add frame timing information

Updated script, it can now generate a csv for graphing as well:

<details>


import sys
import re
REGEX = re.compile("WEBXR PROFILING \[(.*)\]:\s*([0-9.]+)ms")
lines = []
buckets = {}
with open(sys.argv[1]) as f:
    for line in f.readlines():
        if not line.startswith("WEBXR PROFILING"):
            continue
        result = REGEX.match(line)
        name = result.group(1)
        value = float(result.group(2))
        if name not in buckets:
            buckets[name] = []
        buckets[name] += [value]

def mean(numbers):
    return float(sum(numbers)) / max(len(numbers), 1)

def histo(numbers):
    buckets = [1, 2, 4, 8, 16, 32, 32]
    bucket_values = [0, 0, 0, 0, 0, 0, 0]
    for number in numbers:
        for (i, max_val) in enumerate(buckets):
            if number < max_val:
                bucket_values[i] += 1
                break
        else:
            bucket_values[-1] += 1
    return zip(buckets, bucket_values)

buckets["raf receive"].pop(0) # First timing information compares against 0 and is invalid

if sys.argv[2] == "csv":
    l = min(len(values) for (_, values) in buckets.iteritems())
    print(",".join([name for name in buckets]))
    for i in range(l):
        print(",".join([str(buckets[name][i]) for name in buckets]))

else:
    print("Name\t\tmin\t\tmax\t\tmean")
    for (name, values) in buckets.iteritems():
        print("%s\t%f\t%f\t%f" % (name, min(values), max(values), mean(values)))
        histogram = histo(values)
        for (i, (bucket, count)) in enumerate(histogram):
            print("%s%d%sms: %d" % ("<" if i != len(histogram) - 1 else "", bucket, "+" if i == len(histogram) - 1 else "", count))
        print

</details>

jdm

comment created time in 5 days

issue commentservo/servo

Immersive mode doesn't reach 60fps

Some new data. This is with the ANGLE upgrade, but not the IPC one.

$ python timing.py raw
Name		min		max		mean
raf queued	0.056198	5.673125	0.694902
<1ms: 335
<2ms: 26
<4ms: 17
<8ms: 7
<16ms: 0
<32ms: 0
32+ms: 0

raf transmitted	0.822917	36.582083	7.658619
<1ms: 1
<2ms: 4
<4ms: 31
<8ms: 181
<16ms: 158
<32ms: 8
32+ms: 1

raf wait	1.196615	39.707709	10.256875
<1ms: 0
<2ms: 32
<4ms: 93
<8ms: 67
<16ms: 107
<32ms: 68
32+ms: 17

raf execute	3.078438	532.205677	7.752839
<1ms: 0
<2ms: 0
<4ms: 37
<8ms: 290
<16ms: 52
<32ms: 2
32+ms: 3

raf receive	0.084375	9.053125	1.024403
<1ms: 276
<2ms: 71
<4ms: 27
<8ms: 9
<16ms: 1
<32ms: 0
32+ms: 0

swap request	0.004115	73.939479	0.611254
<1ms: 369
<2ms: 10
<4ms: 5
<8ms: 0
<16ms: 0
<32ms: 0
32+ms: 2

raf render	5.706198	233.459636	9.241698
<1ms: 0
<2ms: 0
<4ms: 0
<8ms: 183
<16ms: 190
<32ms: 10
32+ms: 1

run_one_frame	7.663333	2631.052969	28.035143
<1ms: 0
<2ms: 0
<4ms: 0
<8ms: 3
<16ms: 157
<32ms: 185
32+ms: 41

swap buffer	0.611927	8.521302	1.580279
<1ms: 127
<2ms: 169
<4ms: 74
<8ms: 15
<16ms: 1
<32ms: 0
32+ms: 0

swap complete	0.046511	2.446302	0.215040
<1ms: 375
<2ms: 6
<4ms: 3
<8ms: 0
<16ms: 0
<32ms: 0
32+ms: 0
jdm

comment created time in 5 days

issue commentservo/webxr

Add frame timing information

import sys
import re
REGEX = re.compile("WEBXR PROFILING \[(.*)\]:\s*([0-9.]+)ms")
lines = []
buckets = {}
with open(sys.argv[1]) as f:
    for line in f.readlines():
        if not line.startswith("WEBXR PROFILING"):
            continue
        result = REGEX.match(line)
        name = result.group(1)
        value = float(result.group(2))
        if name not in buckets:
            buckets[name] = []
        buckets[name] += [value]

def mean(numbers):
    return float(sum(numbers)) / max(len(numbers), 1)

def histo(numbers):
    buckets = [1, 2, 4, 8, 16, 32, 32]
    bucket_values = [0, 0, 0, 0, 0, 0, 0]
    for number in numbers:
        for (i, max_val) in enumerate(buckets):
            if number < max_val:
                bucket_values[i] += 1
                break
        else:
            bucket_values[-1] += 1
    return zip(buckets, bucket_values)

buckets["raf receive"].pop(0) # First timing information compares against 0 and is invalid

print("Name\t\tmin\t\tmax\t\tmean")
for (name, values) in buckets.iteritems():
    print("%s\t%f\t%f\t%f" % (name, min(values), max(values), mean(values)))
    histogram = histo(values)
    for (i, (bucket, count)) in enumerate(histogram):
        print("%s%d%sms: %d" % ("<" if i != len(histogram) - 1 else "", bucket, "+" if i == len(histogram) - 1 else "", count))
    print
jdm

comment created time in 5 days

issue closedimmersive-web/webxr

XRSession creation failed: The specified session configuration is not supported. Chrome 80.0.3987.116

I have Oculus Rift connected and it works great with Firefox. But can't get any of the samples to work on current stable Chrome release that I have - version 80.0.3987.116

The error I get is : XRSession creation failed: The specified session configuration is not supported for any of the samples.

I did configure NVIDIA settings to let Chrome use GPU. Used to work with WebVR in chrome in the past ,. and it worked fine. But can't get WebXR demo's to work.

Edit: I do have all the VR/XR/Oculus flags toggled to enabled in Chrome, but still no luck

closed time in 5 days

devsatish

issue commentmrdoob/three.js

Don't assume that an inputsourceschange event will be fired at the start of the session

Yeah that seems like something we could land with this. I hope to have this fixed upstream though.

Manishearth

comment created time in 5 days

pull request commentmrdoob/three.js

WebXRManager: Check if controller is defined in animation loop

@Artyom17 given that y'all use Chromium's code and my impression is that Chromium has a race here, you should check out https://github.com/immersive-web/webxr/issues/961 , which explains why this probably happens.

paulmasson

comment created time in 5 days

pull request commentservo/servo

Synchronize ANGLE linking path with VS project.

@bors-servo r+

jdm

comment created time in 5 days

create barnchManishearth/servo

branch : current

created branch time in 5 days

pull request commentrustwasm/wasm-bindgen

Webxrdevice

Note that it's a draft, but also it's been shipped in multiple browsers now.

kevthecoder

comment created time in 5 days

Pull request review commentservo/servo

Per fetch file token for blob url

 use uuid::Uuid; /// File manager store entry's origin pub type FileOrigin = String; +/// A token modulating access to a file for a blob URL.+pub enum FileTokenCheck {+    /// Checking against a token not required,+    /// used for accessing a file+    /// that isn't linked to from a blob URL.+    NotRequired,+    /// Checking against token required,+    /// the None case always fails.+    Required(Option<Uuid>),

should the none case just be a third case?

gterzian

comment created time in 5 days

issue commentimmersive-web/webxr

Timing of initial inputsourceschange event

cc @cabanier oculus browser may also have this race, worth looking into

Manishearth

comment created time in 5 days

pull request commentservo/servo

Per fetch file token for blob url

Yeah, I have this saved, hope to get around to it today

gterzian

comment created time in 5 days

pull request commentrust-lang/rfcs

Rust 2020 roadmap

wanna make a PR fixing that?

nikomatsakis

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

 impl GlobalScope {             .send(ScriptMsg::RerouteMessagePort(port_id, task));     } +    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn schedule_broadcast(&self, msg: BroadcastMsg, channel_id: &Uuid) {+        // First, broadcast locally.+        self.broadcast_message_event(msg.clone(), Some(channel_id));++        if let BroadcastChannelState::Managed(router_id, _) =+            &*self.broadcast_channel_state.borrow()+        {+            // Second, broadcast to other globals via the constellation.+            //+            // Note: for globals in the same script-thread,+            // we could skip the hop to the constellation.+            let _ = self+                .script_to_constellation_chan()+                .send(ScriptMsg::ScheduleBroadcast(router_id.clone(), msg));+        } else {+            panic!("Attemps to broadcast a message via global not managing any channels.");+        }+    }++    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn broadcast_message_event(&self, event: BroadcastMsg, channel_id: Option<&Uuid>) {+        let BroadcastMsg {+            data,+            origin,+            channel_name,+        } = event;++        // Steps 7, a few preliminary steps.++        // - Check the worker is not closing.+        if let Some(worker) = self.downcast::<WorkerGlobalScope>() {+            if worker.is_closing() {+                return;+            }+        }++        // - Check the associated document is fully-active.+        if let Some(window) = self.downcast::<Window>() {+            if !window.Document().is_fully_active() {+                return;+            }+        }++        let to_dispatch = if let BroadcastChannelState::Managed(_, channels) =+            &*self.broadcast_channel_state.borrow()+        {+            // Step 7: Check for a case-sensitive match for the name of the channel.+            let channel_name = DOMString::from_string(channel_name);+            let channels: Vec<DomRoot<BroadcastChannel>> = match channels.get(&channel_name) {+                Some(channels) => channels+                    .iter()+                    .filter(|ref channel| {+                        // Step 8.+                        // Filter out the sender.+                        if let Some(id) = channel_id {+                            !(channel.id() == id)+                        } else {+                            true+                        }+                    })+                    .map(|channel| DomRoot::from_ref(&**channel))+                    // Step 9, sort by creation order, done by using a queue.

How is this sorting? We're collecting into a vec

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

+/* This Source Code Form is subject to the terms of the Mozilla Public+ * License, v. 2.0. If a copy of the MPL was not distributed with this+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */++use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::{+    BroadcastChannelMethods, Wrap,+};+use crate::dom::bindings::error::{Error, ErrorResult};+use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};+use crate::dom::bindings::root::DomRoot;+use crate::dom::bindings::str::DOMString;+use crate::dom::bindings::structuredclone;+use crate::dom::eventtarget::EventTarget;+use crate::dom::globalscope::GlobalScope;+use crate::script_runtime::JSContext as SafeJSContext;+use dom_struct::dom_struct;+use js::rust::HandleValue;+use script_traits::BroadcastMsg;+use std::cell::Cell;+use uuid::Uuid;++#[dom_struct]+pub struct BroadcastChannel {+    eventtarget: EventTarget,+    name: DOMString,+    closed: Cell<bool>,+    id: Uuid,+}++impl BroadcastChannel {+    /// <https://html.spec.whatwg.org/multipage/#broadcastchannel>+    #[allow(non_snake_case)]+    pub fn Constructor(global: &GlobalScope, name: DOMString) -> DomRoot<BroadcastChannel> {

new should do the track_broadcast_channel bit

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

 impl GlobalScope {             .send(ScriptMsg::RerouteMessagePort(port_id, task));     } +    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn schedule_broadcast(&self, msg: BroadcastMsg, channel_id: &Uuid) {+        // First, broadcast locally.+        self.broadcast_message_event(msg.clone(), Some(channel_id));++        if let BroadcastChannelState::Managed(router_id, _) =+            &*self.broadcast_channel_state.borrow()+        {+            // Second, broadcast to other globals via the constellation.+            //+            // Note: for globals in the same script-thread,+            // we could skip the hop to the constellation.+            let _ = self+                .script_to_constellation_chan()+                .send(ScriptMsg::ScheduleBroadcast(router_id.clone(), msg));+        } else {+            panic!("Attemps to broadcast a message via global not managing any channels.");+        }+    }++    /// <https://html.spec.whatwg.org/multipage/#dom-broadcastchannel-postmessage>+    /// Step 7 and following steps.+    pub fn broadcast_message_event(&self, event: BroadcastMsg, channel_id: Option<&Uuid>) {+        let BroadcastMsg {+            data,+            origin,+            channel_name,+        } = event;++        // Steps 7, a few preliminary steps.++        // - Check the worker is not closing.+        if let Some(worker) = self.downcast::<WorkerGlobalScope>() {+            if worker.is_closing() {+                return;+            }+        }++        // - Check the associated document is fully-active.+        if let Some(window) = self.downcast::<Window>() {+            if !window.Document().is_fully_active() {+                return;+            }+        }++        let to_dispatch = if let BroadcastChannelState::Managed(_, channels) =+            &*self.broadcast_channel_state.borrow()+        {+            // Step 7: Check for a case-sensitive match for the name of the channel.+            let channel_name = DOMString::from_string(channel_name);+            let channels: Vec<DomRoot<BroadcastChannel>> = match channels.get(&channel_name) {+                Some(channels) => channels+                    .iter()+                    .filter(|ref channel| {+                        // Step 8.+                        // Filter out the sender.+                        if let Some(id) = channel_id {+                            !(channel.id() == id)

!=?

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

+/* This Source Code Form is subject to the terms of the Mozilla Public+ * License, v. 2.0. If a copy of the MPL was not distributed with this+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */++use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::{+    BroadcastChannelMethods, Wrap,+};+use crate::dom::bindings::error::{Error, ErrorResult};+use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};+use crate::dom::bindings::root::DomRoot;+use crate::dom::bindings::str::DOMString;+use crate::dom::bindings::structuredclone;+use crate::dom::eventtarget::EventTarget;+use crate::dom::globalscope::GlobalScope;+use crate::script_runtime::JSContext as SafeJSContext;+use dom_struct::dom_struct;+use js::rust::HandleValue;+use script_traits::BroadcastMsg;+use std::cell::Cell;+use uuid::Uuid;++#[dom_struct]+pub struct BroadcastChannel {+    eventtarget: EventTarget,+    name: DOMString,+    closed: Cell<bool>,+    id: Uuid,+}++impl BroadcastChannel {+    /// <https://html.spec.whatwg.org/multipage/#broadcastchannel>+    #[allow(non_snake_case)]+    pub fn Constructor(global: &GlobalScope, name: DOMString) -> DomRoot<BroadcastChannel> {

Please add new and new_inherited methods and use them in the constructor

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

 impl fmt::Display for MessagePortRouterId {     } } +#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]+pub struct BroadcastChannelRouterIndex(pub NonZeroU32);+malloc_size_of_is_0!(BroadcastChannelRouterIndex);++#[derive(+    Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize,+)]+pub struct BroadcastChannelRouterId {+    pub namespace_id: PipelineNamespaceId,+    pub index: BroadcastChannelRouterIndex,+}++impl BroadcastChannelRouterId {+    pub fn new() -> BroadcastChannelRouterId {+        PIPELINE_NAMESPACE.with(|tls| {+            let mut namespace = tls.get().expect("No namespace set for this thread!");+            let next_broadcast_channel_router_id = namespace.next_broadcast_channel_router_id();+            tls.set(Some(namespace));+            next_broadcast_channel_router_id+        })+    }+}++impl fmt::Display for BroadcastChannelRouterId {+    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {+        let PipelineNamespaceId(namespace_id) = self.namespace_id;+        let BroadcastChannelRouterIndex(index) = self.index;+        write!(fmt, "({},{})", namespace_id, index.get())
        write!(fmt, "BroadcastChannelRouterId({},{})", namespace_id, index.get())

?

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

 where         }     } +    /// Check the origin of a message against that of the pipeline it came from.+    /// Note: this is still limited as a security check,+    /// see https://github.com/servo/servo/issues/11722+    fn check_origin_against_pipeline(+        &self,+        pipeline_id: &PipelineId,+        origin: &ImmutableOrigin,+    ) -> Result<(), ()> {+        let pipeline_origin = match self.pipelines.get(&pipeline_id) {+            Some(pipeline) => pipeline.load_data.url.origin(),+            None => {+                warn!("Received message from closed or unknown pipeline.");+                return Err(());+            },+        };+        if &pipeline_origin == origin {+            return Ok(());+        }+        Err(())+    }++    /// Broadcast a message via routers in various event-loops.+    fn handle_schedule_broadcast(+        &self,+        pipeline_id: PipelineId,+        router_id: BroadcastChannelRouterId,+        message: BroadcastMsg,+    ) {+        if self+            .check_origin_against_pipeline(&pipeline_id, &message.origin)+            .is_err()+        {+            return warn!(+                "Attempt to schedule broadcast from an origin not matching the origin of the msg."+            );+        }+        if let Some(routers) = self.broadcast_channel_routers.get(&message.origin) {+            for (router, (sender, names)) in routers {+                // Exclude the sender of the broadcast.+                // Broadcasting locally is done at the point of sending.+                if router == &router_id {+                    continue;+                }++                if names.contains(&message.channel_name) {

Do you think we'd have to worry about performance here? Should the list of routers be a map of names to routers? I don't really think so, but worth flagging.

gterzian

comment created time in 5 days

Pull request review commentservo/servo

Implement Broadcastchannel

 where         }     } +    /// Check the origin of a message against that of the pipeline it came from.+    /// Note: this is still limited as a security check,

i wonder if we should be tracking all these somewhere

gterzian

comment created time in 5 days

created tagManishearth/handlebars-fluent

tagv0.3.0

created time in 5 days

push eventManishearth/handlebars-fluent

Manish Goregaokar

commit sha f6173b8109616cd488a6b0d4f2154594527ac458

Bump to 0.3.0

view details

push time in 5 days

more