mozilla :: #servo

18 Apr 2017
01:40GankroOh no in my hubris I typed "cargo update" in servo... revertrevertrevert
01:54Manishearthyou can use regular rust and cargo with servo :)
02:23cbrewsterjdm: do you know if iframes with src set to `data:text/html,...` should load sync or async?
02:26jackpot51If I want to port the parts of servo to Redox that do not involve GPU rendering, how could I do that?
02:30jdmcbrewster: async
02:32jdmjackpot51: we don't have non-gpu rendering (besides running under osmesa)
02:33jdmjackpot51: I mean, you could tear out any uses of webrender/webrender_traits from the codebase
02:33jdmand then provide a backend for glutin for redox
02:33jdmand then you could maybe run headlessly?
02:34cbrewsterjdm: hmm is a window's load event delayed until any iframe with inline src has loaded?
02:34jdmcbrewster: yes
02:34cbrewsterjdm: ahh thats the missing bit!
02:41jackGankro: ./mach update-cargo or whatever just distributes cargo update across the mulple top level crates (aside from makin gsure it runs the correct version of cargo)
02:41Gankrojack: yeah I just really didn't want to update every dep in Servo
02:45GankroAnyone ever seen "mach vendor rust" fail with "Exception: Process executed with non-0 exit code 101:" ?
02:45GankroOh sorry this is in firefox
02:46GankroWhatever y'all know how to build firefox too
03:02ManishearthGankro: no sorry what is this firefox you speak of
03:03Manishearthwe only use 100% pure rust bespoke servo builds on redox
03:03Manishearthwe don't run javascript because the js engine is in C++. Also, Javascript is not Rust, so it is clearly forbidden
03:04ManishearthThe Rust Evangelism Strike Force: Like Stallman, but for Rust.
03:05GankroGonna go out on a limb and guess manish hasn't seen my issue
03:05Manishearthheh
03:06ManishearthGankro: link?
03:06GankroManishearth: i uh
03:06GankroCan't link my terminal
03:07Manishearthoh, that issue
03:07Manishearthyes, I haven't seen that happen
03:07Manishearthworks on my machine (tm)
03:07Manishearthwhat are you trying to do?
03:07GankroManishearth: run bleeding edge webrender
03:07ManishearthI usually do cd toolkit/library/rust ; cargo update -p somecrate ; mach vendor rust
03:08Manishearth(from the toplevel)
03:08Manishearthyou need to cargo update from the gtest folder too
03:14GankroManishearth: it's failing in vendor
03:16ManishearthGankro: hmm, any way to get verbose output?
03:16Gankrono clue
03:16Manishearthted and froydnj probably have better answers here
03:16Manishearthif you want to unpack what it does
03:17Manishearthcd toolkit/library/rust; cargo vendor ../../../third_party/rust
03:17ManishearthI *think*
03:17GankroCurrently trying a moonshot clobber build
03:17GankroUnfortunately our build system seems too stable for cleaning to matter
03:19Gankrolooks like it might be failing on gkrust
03:27pcwaltonwow, trapezoidation is fast
03:28pcwaltonthe literature cant decide whether its trapezoidation or trapezoidalation
03:28Manishearthpcwalton: trapeziuminimilation
03:28pcwaltonerr, trapezoidation vs. trapezoidalization
03:34Gankrohmm, https://github.com/servo/webrender/pull/1127 's update to gleam seemed to be the thing breaking "vendor rust"
03:34crowbotPR #1127: Implement GetShaderPrecisionFormat WebGL command - https://github.com/servo/webrender/pull/1127
04:42stshinejdm: you can also close #11928
04:42crowbotIssue #11928: duckduckgo does not load - https://github.com/servo/servo/issues/11928
04:42stshineoh.
05:14* njn wishes he could build Stylo
07:05ferjmare gecko bindings supposed to regenerate just by building with ac_add_options --enable-stylo or is there anything else required?
07:11heycamferjm: that's right, they should be regenerated automatically. they'll be somewhere under your objdir, if that's successful.
07:13ferjmheycam, great. Thank you!
07:15ferjmthere they are obj-firefox/dist/rust_bindings/style :)
07:16KiChjangwhat are the devtools that can be used to debug JS in servo?
08:10nox" // FIXME: Radial gradients aren't implemented yet." TIL
08:18JuPanameyou need shell account for free ? contact me =)
08:22KiChjangjdm: difference between Heap<JSVal> and JSVal?
08:22jdmone is safe to store in heap-allocated objects, and one is not
08:23KiChjangso the WebIDL file is supposed to have a sequence<object>, but since we don&#39;t support that, it&#39;s been changed to any instead
08:23KiChjangwhen i call FromJSValConvertible::from_jsval, what should it convert the any into?
08:23KiChjangVec<JSVal> or Vec<Heap<JSVal>>?
08:24jdmwhere is the value being stored?
08:25KiChjangon the stack
08:25KiChjangwell that already answered my question
08:26noxMFW I didn&#39;t even recompile yet since last rustup.
08:28jdmKiChjang: you probably want a RootedVec, actually
08:28jdmKiChjang: very much like https://dxr.mozilla.org/servo/source/components/script/dom/bindings/codegen/CodegenRust.py#6517,6518
08:29noxjdm: For a field? :(
08:30jdmnox: no, on the stack
08:30noxAh no, argument probably.
08:32KiChjangjdm: huh, how would i initialize the RootedVec?
08:33jdmKiChjang: you fill it with the appropriate number of Heap values, then you set them after the array has all of its elements appended to it
08:33jdmthis ensures that they won&#39;t be moved due to a reallocation
08:33KiChjangso in that case, i&#39;d need to first convert that any into the equivalent rust representation of a sequence<object> first
08:34KiChjangotherwise i wouldn&#39;t know how many objects there are
08:35jdmthis gets better and better
08:37jdmKiChjang: what about sequence<any>?
08:37KiChjangoh, do we support that?
08:38jdmapparently
08:38jdmhttps://dxr.mozilla.org/servo/source/components/script/dom/webidls/IterableIterator.webidl#14
08:39KiChjangduuuuuuuuude
08:40KiChjangi think i might have not fetched from upstream for a while
08:40KiChjangoh wait nvm
08:42KiChjangjdm: is it an easy conversion between an IDL any to an IDL object in rustland?
08:42jdmKiChjang: yeah, you want JSVal::is_object and JSVal::to_object
08:42KiChjangw00t
08:54noxemilio, xidorn: Are there failing tests related to serialising gradients?
08:54noxBecause our code doesn&#39;t seem correct to me.
08:55emilionox: perhaps? Looking at http://searchfox.org/mozilla-central/source/layout/style/test/stylo-failures.md there are a few `gradient` failures
09:00noxemilio: Yeah there are some, but not in WPT, so not in Servo, so I don&#39;t know how to actually run them and get results with my branch.
09:00emilionox: do you have try access to m-c?
09:00noxNo.
09:00emilionox: if you send me a patch I can apply it and push it to try
09:01noxemilio: Ok, will ping you.
09:01emilionox: also, you can build stylo, but I&#39;m not sure you want to clone m-c? :D
09:01noxI have a very old gecko-dev that dates back from smup last Summer, I don&#39;t really want to dive into that again.
09:01emilioheh, fair enough
09:02KiChjangjdm: oh hey, some more news
09:02KiChjangthe trait bound `js::jsapi::Handle<js::jsapi::Value>: js::conversions::FromJSValConvertible` is not satisfied
09:02noxemilio: Because I can see many bugs in what I look at,
09:02KiChjangapparently HandleValue doesn&#39;t implement FromJSValConvertible
09:02noxemilio: but I&#39;m not sure if I&#39;m supposed to fix them as part as what I&#39;m assigned to.
09:03emilionox: I don&#39;t think fixing them would hurt anyway :)
09:03noxemilio: Yeah but deadlines.
09:03emilionox: well, they need to be fixed anyway eventually, right?
09:03jdmKiChjang: mmm, delightful
09:04noxemilio: True.
09:04noxemilio: For example, the current spec for gradients say &quot;omitting components when possible without changing the meaning&quot; for serialisation.
09:04KiChjangjdm: the implementation should be straightforward though, you just return the 2nd parameter and that&#39;s it
09:04noxWhile the spec corresponding to the webkit gradients says &quot;If a <bg-position> was specified in the first argument to the gradient function&quot;,
09:05noxour code doesn&#39;t care if it was actually specified, or if it can be omitted, it just serialises every single part of it.
09:05jdmKiChjang: that may be true!
09:05noxjdm: Can we have a wpt bump?
09:05jdmnox: see open PR
09:05jdmI need to follow up on updating the expectations
09:06noxjdm: Need a hand?
09:06jdmI would not turn a hand down :)
09:07noxemilio: Shouldn&#39;t tests related to http://searchfox.org/mozilla-central/source/layout/style/test/property_database.js be upstreamed in WPT?
09:07nox(Hence why I wanted a WPT bump. :))
09:07emilionox: tl;dr: yes
09:14sewardjSimonSapin: ping
09:16sewardjbholley: around?
09:20sewardjcpeterson: around?
09:21sewardjAre there any Stylo people around at the moment?
09:22noxemilio is around.
09:22emiliosewardj: hey :)
09:22sewardjemilio: hi
09:22sewardjemilio: I started looking into the parallel-allocation-performance questions
09:22sewardjemilio: can you help me with something?
09:22emiliosewardj: I can try :P
09:23sewardjemilio: I am running a test case with DUMP_STYLE_STATISTICS=2
09:24sewardjemilio: and looking at the resulting perf line &quot;[PERF],traversal_time_ms,73.27846299449448&quot;
09:24noxemilio: #16511
09:24crowbotPR #16511: Implement -webkit-radial-gradient() (fixes #15441) - https://github.com/servo/servo/pull/16511
09:25sewardjemilio: what I want to be able to do is call a bit of C++ code before and after that parallel traversal, so that I can start/stop a profiler exactly around that section
09:25noxemilio: What do you think of https://github.com/servo/servo/issues/15192#issuecomment-293914167?
09:25crowbotIssue #15192: calc() doesn&#39;t support dividing an expression - https://github.com/servo/servo/issues/15192
09:25sewardjemilio: is that something you can help me with?
09:26emiliosewardj: cool, yeah, I think I can help you with it.
09:26sewardjemilio: cool
09:27emiliosewardj: presumably you want to hook into https://github.com/servo/servo/blob/master/ports/geckolib/glue.rs#L170
09:27emiliosewardj: (if it&#39;s stylo only, which I assume it is)
09:27emiliosewardj: I believe you&#39;d only need to hook right after the pre_traverse call, and then after the last expression in that function
09:28* sewardj looks
09:28sewardjemilio: ok fine .. but how can I call C++ at this point?
09:29emilionox: that makes sense to me (though I guess you mean BinOp(Box<CalcNode>, BinOp, Box<CalcNode>))
09:29noxemilio: Yeah.
09:29noxemilio: We could do BinOp(BinOp, Box<(CalcNode, CalcNode)>).
09:30noxLess boxes.
09:30emiliosewardj: you need to add a function to layout/style/ServoBindings.h (something like Gecko_PreTraverse(..) and Gecko_PostTraverse(..)). You can see examples around that file
09:31emilionox: cool, yeah
09:33noxhttps://github.com/servo/servo/issues/15166 looks like so much pain.
09:33crowbotIssue #15166: Support parsing/serializing interpolation hint in gradient functions - https://github.com/servo/servo/issues/15166
09:35noxemilio: Did you see the patch for which I want a try run btw? (Just making sure.)
09:39sewardjemilio: here&#39;s what I have so far. https://pastebin.mozilla.org/9019301
09:40sewardjemilio: how do I really call those C++ functions (and where should I put them?)
09:40emilionox: whoops, sorry, there you go: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e29e934d6309ce8f2e0471abaaff95e2e394043e
09:41noxemilio: Thanks. :)
09:41noxajeffrey: I remember seeing you talking about how node.global() not returning the current window,
09:41noxajeffrey: why would it?
09:42noxit should return the node&#39;s global.
09:42emiliosewardj: (you presumaby want to call PreTraverse after the return, to ensure PostTraverse is called, but nbd)
09:42emiliosewardj: when you add those definitions, they get generated in bindings.rs
09:42emiliosewardj: so you can do from rust: unsafe { bindings::Gecko_Pretraverse() }
09:42emiliosewardj: and the implementation of those functions generally goes in layout/style/ServoBindings.cpp
09:43sewardjemilio: oh, I put the PostTraverse() call in the wrong function
09:44jdmnox: so far ajeffrey never knew that and I forgot that
09:45jdmI think we have a lot of code that calls .global() when we don&#39;t actually mean that
09:47sewardjemilio: changing ServoBindings.h causes a lot of recompilation, yes?
09:49noxjdm: I don&#39;t see why one would expect anything but that.
09:49nox&quot;node&#39;s global&quot;
09:50emiliosewardj: yeah, too much :(. I should look into reducing them, somehow. I think clang has an automatic tool for checking headers, my intuition is that we&#39;re including it needlessly from a bunch of places.
10:00sewardjemilio: hmm, I get a lot more PreTraverse calls than PostTraverse calls
10:01emiliosewardj: can you post the updated patch again?
10:02sewardjemilio: https://pastebin.mozilla.org/9019303
10:02sewardjemilio: there is an early return there, which I should also annotate
10:02sewardjemilio: (but it would be good if you could sanity-check the patch anyway)(
10:03emiliosewardj: yeah, we probably hit the early-return relatively frequently, that patch looks reasonable to me.
10:04emiliosewardj: note that we call traverse_subtree for animation restyles, that use to be a no-op, so I&#39;d expect that to be the source of most early bailouts from that function
10:05sewardjemilio: if you say so (I understand nothing of such things)
10:05sewardjemilio: I just want to make a wrapper around the bits of code that Eric is measuring at https://bugzilla.mozilla.org/show_bug.cgi?id=1291355#c13
10:05firebotBug 1291355 NEW, erahm@mozilla.com stylo: Measure the impact of multiple jemalloc arenas and evaluate the performance tradeoff for enab
10:08sewardjemilio: ok, that makes the counts match exactly
10:21emiliosewardj: cool! :)
10:21waffles> LLVM ERROR: IO failure on output stream.
10:21waffleshm, looks like Travis builds are back with the same error
10:21waffleswe should consider removing the verbose option
10:22wafflesand re-enable the disabled builds
10:27stshineemilio: took me 2 hours to construct a reftest :(
10:27stshineemilio: can you r=asajeffrey in #16428?
10:27crowbotPR #16428: layout: Floor to 0 when computing intrinsic sizes with box-sizing:border-box - https://github.com/servo/servo/pull/16428
10:30sewardjemilio: I got some initial results with this.
10:30emiliostshine: sure, done, thanks for it! :)
10:31stshineemilio: thank you!
10:31sewardjemilio: it seems that traverse_subtree and its children only cost about 13 million instructions for the wikipedia Barack Obama page, which seems very low to me
10:33sewardjemilio: it could well be that I did something wrong, but I want to check .. are you sure this is the right place to bracket the &quot;[PERF],traversal_time_ms&quot; measurements?
10:36travis-ciServo failed to build with Rust nightly: https://travis-ci.org/servo/servo-with-rust-nightly/builds/223093154 CC nox, SimonSapin
10:48noxThat&#39;s quite often, these days.
10:50emiliosewardj: yeah, that should be it. Note that it can potentially be un parallel, so instructions may be executed un other threads? (Don&#39;t know how you&#39;re measuring though)
10:51sewardjemilio: regarding the other threads ..
10:51sewardjemilio: they will only be working on this in the time window between calls to Gecko_PreTraverse and Gecko_PostTraverse, is that true?
10:52noxemilio: Forgot to try to build geckolib. :(
10:54emiliosewardj: yes, that is true
10:54emilionox: whoops
10:55emiliosewardj: note that there are probably multiple traversals though
10:55emilios/probably//
10:55sewardjemilio: well, I am getting about 480 Pre/Post call pairs for this test
10:55sewardjIs that what you mean?
10:56JayfluxWhat would you guys say is the most up to date documentation on the architecture of servo? some of the stuff on https://github.com/servo/servo/wiki looks a bit outdated?
10:57noxemilio: Amended.
10:58jdmJayflux: the stuff in docs/ is the most recent, but it doesn&#39;t have a bunch of the architectural stuff
10:59emiliosewardj: that looks reasonable. There should be one that takes much more time than the rest, which is the one you presumably want to measure
10:59noxemilio: Is legacy_syntax in Gecko_CreateGradient related to webkit vs modern gradients?
10:59noxOr is that about -moz-?
11:00sewardjemilio: uh, ok. The costs are all added together in my profiles, so I can&#39;t distinguish the specific traversals
11:00noxhttp://searchfox.org/mozilla-central/source/layout/style/nsComputedDOMStyle.cpp#2068 moz it is.
11:00noxxidorn: Ping.
11:09jryansnox: i think xidorn is away at CSS WG meetings this week
11:09noxOh right.
11:09noxWell I&#39;ll do something else then.
11:10noxemilio: Did you retry? I should probably get myself some try rights but it seems utterly confusing to me.
11:12jdmemilio: if I want to add new methods to ServoBindings.h that involve a type that the bindings haven&#39;t seen before, what do I need to modify to make bindgen understand it?
11:16* jdm tries adding a typedef to ServoBindingTypes.h
11:17ferjmjdm: I believe you can add it to https://dxr.mozilla.org/servo/source/components/style/build_gecko.rs#625
11:17jdmoho
11:17jdmthanks
11:20* stshine tries to imagine what would happen if abs-position is not bfc in his head
11:20jdmbfc?
11:20stshineblock formatting context
11:28Jayfluxjdm: docs/?
11:28jdmhttps://github.com/servo/servo/tree/master/docs
11:28Jayfluxahh docs
11:29stshinecan&#39;t succeed. damn
12:12noxemilio: r? ^
12:12noxstandups: Opened PR #16511.
12:12crowbotPR #16511: Implement -webkit-radial-gradient() (fixes #15441) - https://github.com/servo/servo/pull/16511
12:12standupsOk, submitted #44889 for https://www.standu.ps/user/nox/
12:12noxstandups: Opened PR #16513.
12:12crowbotPR #16513: Properly parse background-size in background longhand (fixes #15199) - https://github.com/servo/servo/pull/16513
12:12standupsOk, submitted #44890 for https://www.standu.ps/user/nox/
12:12ajeffreynox: &quot;node&#39;s global&quot; is not obvious to me in the case that the node is adopted, does it mean the original global or the new one?
12:13noxajeffrey: I don&#39;t understand the question.
12:13noxAdoption is about documents, so I don&#39;t see how that is related to the globals.
12:14nox(So I expect it to be the original one.)
12:14ajeffreynox: if a node is created by global g1, but it&#39;s then adopted into a document created by g2, which should node.global() return?
12:14noxajeffrey: I thought you were confused about the nod&#39;s global vs the current entry, btw.
12:15noxajeffrey: g1.
12:15noxThat being said,
12:15ajeffreynox: that is the source of my confusion :/
12:15noxdon&#39;t we create a new reflector when we move it to g2?
12:16noxfoo.global() returns the global associated with foo&#39;s reflector,
12:16noxright?
12:16jdmnox: we do not create a new reflector
12:17ajeffreynox: I don&#39;t think we can change the reflector, user script might have a copy of the old value.
12:17jdmit gets a cross-compartment wrapper
12:17ajeffreyWe could brain transplant it.
12:17noxjdm: Oh right, confused myself with the mess in document.open.
12:17noxajeffrey: So g1.
12:17jdmno more transplants
12:17noxajeffrey: Where did you have to think about this btw?
12:18ajeffreyjdm: awwww you&#39;re no fun :P
12:18jdmonly if you change your name to igor
12:19ajeffreynox: a PR of jdm&#39;s I was the reviewer on.
12:19ajeffrey(on my phone right now, can&#39;t look it up :/)
12:19noxemilio: I actually meant BinOp(CalcValueNode, BinOp, CalcValueNode), without boxes.
12:20noxemilio: The box is already in CalcValueNode AFAIK.
12:20noxajeffrey: Was just curious.
12:34* jdm grumbles about the compiler being right as usual
12:35avadacatavrastandups: opened #16501
12:35crowbotPR #16501: [WIP] Cross origin wrappers - https://github.com/servo/servo/pull/16501
12:35standupsOk, submitted #44891 for https://www.standu.ps/user/avadacatavra/
12:41noxemilio: calc() cannot include divisions if the expected result should be an integer?
13:00avadacatavrajdm: pass function callbacks like this right: ServoJSPrincipal(const void* origin, const void* destroyCallback, const void* writeCallback)
13:00jdmavadacatavra: actual function pointers though, not just void pointers
13:00jdmavadacatavra: similar to the ProxyTraps
13:00jdm(doesn&#39;t need a structure for this, though)
13:01* avadacatavra looks at proxytraps
13:06cynicaldeviljdm: I tried adding console.log statements to the js files, and found that referrer-test-policy-test-case.js isn&#39;t being executed at all.
13:06cynicaldevilIt is being fetched
13:06jdmcurious
13:07cynicaldeviljdm: Also, what does the &#39;pipe&#39; parameter do?
13:08jdmcynicaldevil: it processes the response in some way: http://wptserve.readthedocs.io/en/latest/pipes.html
13:08noxemilio: Still around?
13:08noxI&#39;m utterly confused right now.
13:09emilionox: I&#39;ll be around in ~1h
13:09emilionox: but I guess I can answer something :P
13:10noxemilio: https://github.com/servo/servo/issues/15192#issuecomment-294836507
13:10crowbotIssue #15192: calc() doesn&#39;t support dividing an expression - https://github.com/servo/servo/issues/15192
13:12emilionox: you&#39;re right. Though I suppose technically you can do calc(1 / calc(1 + 1)), do we support that atm?
13:12noxemilio: How is that related?
13:12noxOh, because that inner calc gets simplified to a number?
13:13emilionox: yeah, you can use calc() wherever you can use <number>. Not sure if Gecko or any other browser supports that, though
13:13emilionox: but not particularly related
13:14emilionox: I&#39;d wait for xidorn on this one
13:14noxOk.
13:16noxemilio: We don&#39;t handle that.
13:16noxemilio: Firefox does.
13:17noxWebKit too.
13:18noxAnd they both support (1 + 1) too.
13:18noxemilio: You at the WG meeting too? I guess you could solve that IRL.
13:18emilionox: huh
13:19emilionox: not really, I&#39;m back home. Probably dbaron or SimonSapin are there
13:19noxOk.
13:21SimonSapinnox: feel free to cc me on a csswg issue and I can bring it up f2f
13:22noxSimonSapin: I will.
13:22dbaronGecko supports calc() on line-height, IIRC
13:22cynicaldevilwtf
13:22cynicaldevilthere are two referrer-test-policy-test-case.js files present in &#39;tests&#39;
13:23cynicaldevil*facepalm*
13:23dbaron(The CSS WG resolved to add much more unit algebra to calc(), but that hasn&#39;t been spec&#39;d yet.)
13:23noxdbaron: So I do need to do what the ticket says to do?
13:23noxBummer. :P
13:25dbaronnox: it was certainly intentional that Firefox support that, though the spec said it should be supported at the time
13:25jdmcynicaldevil: oh, yeah
13:25dbaronnox: but at this point if it&#39;s supported by both Gecko and WebKit I think you should open a spec issue
13:25dbaronnox: or do you want someone else to open the spec issue?
13:25jdmcynicaldevil: one is our mozilla fork, the other is the upstream one
13:25noxdbaron: I will open one.
13:25dbaronnox: ok, thanks
13:26cynicaldeviljdm: I feel so stupid now :P
13:27noxdbaron: https://github.com/w3c/csswg-drafts/issues/1241
13:27crowbotIssue #1241: [css-values] calc()&#39;s divisions should support more things - https://github.com/w3c/csswg-drafts/issues/1241
13:30avadacatavrajdm: i don&#39;t quite have it
13:30* avadacatavra hasn&#39;t worked with function pointers practically much
13:30avadacatavrahttps://irccloud.mozilla.com/pastebin/ajR21gkL/
13:32jdmavadacatavra: I suspect this->destroy(this) is trying to invoke the method destroy
13:32jdmavadacatavra: I recommend giving the members non-conflicting names
13:32* avadacatavra likes conflict :p
13:33avadacatavrajdm: that seems to have done the trick
13:45avadacatavrait took me 5 minutes to find a missing , omg
13:56avadacatavrastandups: submitted https://github.com/servo/rust-mozjs/pull/353
13:56crowbotPR #353: added servojsprincipal skeleton - https://github.com/servo/rust-mozjs/pull/353
13:56standupsOk, submitted #44895 for https://www.standu.ps/user/avadacatavra/
13:56avadacatavrastandups: registered for sf all hands and made flights
13:56standupsOk, submitted #44896 for https://www.standu.ps/user/avadacatavra/
13:57avadacatavrastandups: caught a cold :(
13:57standupsOk, submitted #44897 for https://www.standu.ps/user/avadacatavra/
13:57ajeffrey|igorjdm: ping
13:57jdmajeffrey|igor: pong
13:58ajeffrey|igorabout that whole brain-transplanting when adopting thing...
13:58nox397 | } else if input.try(|input| input.expect_ident_matching(&quot;circle&quot;)).is_ok() {
13:58nox | ^^^^^ borrowed mutably in pattern guard
13:58noxeddyb: ^ The sadness.
13:58ajeffrey|igorwhat happens if node A with global g1 gets made a child of node B with global g2,
13:59noxWhy would you transplant?
13:59ajeffrey|igorthen there&#39;s some fooling around with document.domain which makes g1 and g2 no longer same-origin-domain,
13:59noxOh.
13:59ajeffrey|igorwill we get a security exception being raised when B tries to access its children?
14:00eddybnox: I think the fix was merged?
14:00eddybnox: it might be fixed in the latest nightly
14:00ajeffrey|igor(I mean atm we won&#39;t, but once avadacatavra gives us XOWs)
14:01noxeddyb: Yeah, just lamenting.
14:01nox:)
14:01* jdm thinks
14:01* avadacatavra is working on it...
14:01jdmajeffrey|igor: I believe in firefox&#39;s model it would be a security error, yes
14:01noxajeffrey|igor: Maybe there are adopting steps defined in HTML;
14:02noxlet me check.
14:02jdmsince we should always have a CCW to the node
14:02ajeffrey|igorjdm: I seem to vaguely remember FF brain-transplanting DOM nodes on adoption.
14:02jdmno
14:02jdmthat sounds implausible to me
14:03noxajeffrey|igor: Of course, there are none.
14:03ajeffrey|igorjdm: well I was vague :)
14:03noxjdm: Where is that failing test you pasted in my PR?
14:03noxNever mind, of course it isn&#39;t failing anymore given I wrote a fix...
14:04jdmajeffrey|igor: uh oh, you might be right
14:05jdmajeffrey|igor: https://dxr.mozilla.org/mozilla-central/source/dom/base/nsINode.cpp#1581-1586 calls https://dxr.mozilla.org/mozilla-central/source/dom/base/nsINode.cpp#1545-1559 which calls https://dxr.mozilla.org/mozilla-central/source/dom/bindings/BindingUtils.cpp#2114-2254
14:05ajeffrey|igorjdm: I was hoping I was wrong :/
14:06jdmand that calls https://dxr.mozilla.org/mozilla-central/source/js/xpconnect/wrappers/WrapperFactory.cpp#663-673
14:06jdmsooooooo
14:06jdmthat&#39;s fun
14:06jdmoh wait
14:06jdmI misread that
14:07jdmthat is specifically dealing with the document.open case
14:07jdmnot the adoption case
14:07noxjdm, ajeffrey|igor: Is there even a concept of a node&#39;s global in any spec?
14:07jdmphew
14:07jdmnox: the associated realm iirc
14:08noxA node has a node document, but does it explicitly has a global?
14:08noxjdm: Is its associated realm defined in terms of its node document?
14:08jdmnox: no
14:08ajeffrey|igorjdm: the interesting case is https://dxr.mozilla.org/mozilla-central/source/dom/base/nsINode.cpp#1516-1542
14:08jdmnox: https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-everything
14:09jdmajeffrey|igor: right. that&#39;s just straightforward adoption that will involve CCWs
14:10avadacatavrajdm: what should destroy/write look like?
14:10avadacatavrais https://github.com/avadacatavra/rust-mozjs/blob/4b4e674e6eedcd2d91e0aaeae7af833eca0ba5ae/src/jsglue.cpp#L750 a valid comparison?
14:11jdmavadacatavra: write can be ignored for now; it&#39;s to do with structured cloning and I&#39;m not sure what&#39;s necessary there
14:11xidornservo ci becomes much faster now?
14:11jdmavadacatavra: destroy will need to retrieved the boxed origin pointer, turn it back into a box and allow it to be freed
14:11avadacatavrajdm: so when i create a ServoJSPrincipal, what do i pass in for write&#39;s place
14:12xidornit took only 35min for #16514 to land.... I would expect it to take ~1hr...
14:12crowbotPR #16514: Add extra pointer-events values for Gecko (fixes #16397) - https://github.com/servo/servo/pull/16514
14:12* avadacatavra thinks utils.rs will be a good place to write the destroy method?
14:12jdmavadacatavra: None (and make sure to null check the callbacks in the C++)
14:12* avadacatavra fixes that
14:12jdmavadacatavra: yeah, keep it alongside the other principal-related code
14:13jdmwhich should really all move into a separate principals.rs
14:13avadacatavrai can do that later :)
14:13jdmyep
14:13avadacatavraonce everything compiles again
14:13* avadacatavra was suspicious that new file would be required eventually
14:14ajeffrey|igorjdm: hmm, I wonder what FF does in the adopt-then-become-not-same-origin-domain case...
14:14* ajeffrey|igor goes to find out
14:38ajeffreyOK, here&#39;s my test case...
14:38ajeffreyhttps://irccloud.mozilla.com/pastebin/Ct1MPyoe/
14:38ajeffreywith child document...
14:39ajeffreyhttps://irccloud.mozilla.com/pastebin/GFUMtQIO/
14:39ajeffreyAs expected, there&#39;s no security exception accessing the adopted node, but there is when accessing the non-adopted node.
14:40ajeffreySo adopting a node does something to the CCW/XOW, I wonder what :/
14:41ajeffreyjdm avadacatavra: ^
14:42avadacatavraajeffrey: do you have a link to what gecko does when adopting a node?
14:42* avadacatavra doesn&#39;t actually know what she&#39;s talking about right now
14:42jdmajeffrey: woah
14:43ajeffreyavadacatavra: not sure this will help, there&#39;s a lot of code! https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#7543
14:45avadacatavraadopting happens here? https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#7543
14:45jdmhttps://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#7654-7671 is probably the relevant bit
14:46avadacatavrajdm: you beat me to finding that
14:46avadacatavrai was about to point out the comment at https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#7659
14:47avadacatavrawhich, granted, i haven&#39;t parsed into something i actually understand yet lol
14:49jdmaha: https://dxr.mozilla.org/mozilla-central/source/dom/base/nsNodeUtils.cpp?q=%2Bfunction%3A%22nsNodeUtils%3A%3ACloneAndAdopt%28nsINode+%2A%2C+bool%2C+bool%2C+nsNodeInfoManager+%2A%2C+JS%3A%3AHandle%3CJSObject+%2A%3E%2C+nsCOMArray%3CnsINode%3E+%26%2C+nsINode+%2A%2C+nsINode+%2A%2A%29%22&redirect_type=single#577-583
14:49jdmReparentWrapper strikes again
14:51jdmthe bit I highlighted from nsDocument.cpp is misleading
14:51jdmit&#39;s actually the call to nsNodeUtils::Adopt below it that does the transplant
14:51jdmajeffrey: ^
14:54noxNice, new passing tests.
14:54ajeffreyjdm: yes, we appear to be looking at the same bit of code...
14:54ajeffreyhttps://dxr.mozilla.org/mozilla-central/source/dom/base/nsNodeUtils.cpp#577-595
14:55ajeffreyso adopting a node does do a brain transplant.
14:56ajeffrey&quot;It&#39;s pronounced &#39;Fronk-en-shteen&#39;!&quot;
14:57* jdm genuflects
15:00noxemilio: &quot;Any particular reason why this isn&#39;t merged with the above } else {?&quot;
15:00noxemilio: I like my code when it compiles.
15:00noxemilio: https://github.com/rust-lang/rust/issues/41272
15:00crowbotIssue #41272: if clauses following an if let are compiled to match guards - https://github.com/rust-lang/rust/issues/41272
15:01ajeffreyjdm: is there a wpt for #16515?
15:01crowbotIssue #16515: Transplant DOM node reflectors when adopting nodes between globals - https://github.com/servo/servo/issues/16515
15:01noxemilio: Will add a spec link and file a follow-up issue.
15:02emilionox: ugh
15:02emilionox: ok, sounds good, thanks!
15:02nox:)
15:02noxemilio: First time I saw that issue I was so confused.
15:04ajeffreystandups: Looking at issue #16515 &quot;Transplant DOM node reflectors when adopting nodes between globals&quot;.
15:04crowbotIssue #16515: Transplant DOM node reflectors when adopting nodes between globals - https://github.com/servo/servo/issues/16515
15:04standupsOk, submitted #44903 for https://www.standu.ps/user/ajeffrey/
15:14jdmajeffrey: no idea!
15:14jdmajeffrey: annevk might know
15:18jgrahamajeffrey: bholley also knows
15:20avadacatavrajdm: i think i made all the changes to https://github.com/servo/rust-mozjs/pull/353
15:20crowbotPR #353: added servojsprincipal skeleton - https://github.com/servo/rust-mozjs/pull/353
15:22* avadacatavra needs to make the actual wrappers now...
15:26ajeffreyjdm: I&#39;ll have a look, if I don&#39;t find anything I&#39;ll add a wpt.
15:26* avadacatavra forgot to look at the proxytraps definitions in glue.rs >_<
15:28ajeffreyjgraham: I suspect bholley would know, I think I picked up the whole &quot;transplant on adoption&quot; thing from him.
15:28noxnical: The radial gradients in WR don&#39;t support interpolation hints, right?
15:30nox(https://drafts.csswg.org/css-images-4/#color-stop-syntax)
15:34* jdm goes to bed
15:38nicalnox: I don&#39;t know the details of gradient support in wr
15:38nicalyou should ask rhunt on #gfx
15:39noxnical: Ok.
15:39nicalbut the idea is that we&#39;ll support all gradient types by the time we ship quantum render
15:39noxnical: Reading the spec again, interpolation hints don&#39;t seem to need to be a thing in WR itself.
15:40rhuntnox, nical: interpolation hints are done in gecko before webrender
15:40noxrhunt: I&#39;m happy my guess was right. :)
15:42ajeffreyJust to add to the fun, if the child document is...
15:42ajeffreyhttps://irccloud.mozilla.com/pastebin/i7H0sCu5/
15:43ajeffreythen accessing node1.innerHTML throws a security exception!
15:44ajeffrey(this is because the parent adopts node1 then becomes different-origin-domain)
15:44ajeffreyjdm ^
16:38* avadacatavra -> yoga + errands
17:15emiliobholley: if you&#39;re around, could you stamp #16516? It&#39;s pure refactoring, and allows me to work on bug 1357461
17:15crowbotPR #16516: stylo: Centralize stylesheet handling. - https://github.com/servo/servo/pull/16516
17:15firebothttps://bugzil.la/1357461 NEW, emilio+bugs@crisal.io stylo: Cache media query results and only flush and restyle if they changed.
17:18cpetersongw: Manishearth suggested I ping you: froydnj submitted a servo PR to bump rayon to version 0.7: https://github.com/servo/servo/pull/16303 but it is causing some image test timeouts on Mac. froydnj didn&#39;t write the new rayon code; he just needs it. Do you have any suggestions for who could help debug the new problems?
17:18crowbotPR #16303: bump required rayon version to 0.7 - https://github.com/servo/servo/pull/16303
17:19emiliocpeterson: is it blocking stuff? I&#39;m blocked waiting on a bunch of reviews and don&#39;t feel like doing schoolwork today, so I can try to debug it
17:20emiliocpeterson: also, probably jdm, which added the &quot;load images from layout&quot; stuff, may help
17:20cpetersonemilio: the new rayon code will unblock froydnj&#39;s work to add rust support to the Gecko Profiler for Stylo perf work.
17:20* emilio pulls
17:21cpetersonthanks for taking a look! :)
17:24noxemilio++
17:24emilionox: why? :)
17:24KiChjangnox: care to look at https://github.com/servo/rust-mozjs/pull/352?
17:24crowbotPR #352: Implement FromJSValConvertible for HandleValue - https://github.com/servo/rust-mozjs/pull/352
17:24noxemilio: rayon
17:24KiChjangit&#39;s needed for sequence<any>
17:25KiChjangnox: is JSVal context-independent?
17:26noxJSVal can be an object.
17:26noxSo yeah.
17:26KiChjangeh, so that&#39;s why the implementation of FromJSValConvertible on JSVal can disregard the context
17:27noxKiChjang: Ask jdm for confirmation, I could be wrong about my comment.
17:27emilioKiChjang: I think nox meant context-dependent
17:28noxOh yes, context-dependent.
17:28noxBut looking at the impl for JSVal I don&#39;t know anymore.
17:28KiChjangit&#39;s all a _mystery_...
17:30KiChjangemilio, are you excited about the pub(restricted) feature?
17:31emilioKiChjang: why the question? It&#39;s somewhat nice, yeah
17:31KiChjangthat seems to change up a few things done in bindgen
17:31emilioKiChjang: in what sense?
17:31KiChjangso you can mimic C++ better
17:31KiChjangthe publicity of values
17:31emilioKiChjang: again, in which sense? Why would bindgen want to deal with pub(restricted)?
17:32emilioKiChjang: just to avoid fields escaping to other crates?
17:32emilioKiChjang: if so, that needs to be configurable, etc.
17:32KiChjangclasses and their public/private/protected members?
17:32emilioKiChjang: I&#39;d be more excited about repr(transparent), etc.
17:32emilioKiChjang: we already don&#39;t honor private, even when we could
17:33KiChjangheh, no privacy when you switch from C++ to rust
17:33emilioKiChjang: it basically makes it impossible to construct a C++ object that is on a module, which is annoying
17:41ajeffreystandups: Submitted PR #16520, a WPT test case for issue #16515.
17:41crowbotIssue #16515: Transplant DOM node reflectors when adopting nodes between globals - https://github.com/servo/servo/issues/16515
17:41crowbotPR #16520: Added WPT test case for same-origin-domain checking after adopting a node - https://github.com/servo/servo/pull/16520
17:41standupsOk, submitted #44910 for https://www.standu.ps/user/ajeffrey/
18:14emiliocrowbot: is html5lib_tests16.html intermittent?
18:14crowbotNo intermittent issues filed with &#39;html5lib_tests16.html&#39; in the title
18:19* KiChjang is pumped
18:19KiChjangthis is my first time installing FF nightly
18:19KiChjangit&#39;s like unpacking a new toy
18:22Manishearthugh the fact that we have deny(warnings) in style is infuriating
18:22mbrubeckcan we... remove that?
18:22Manishearthit gets run on the mako code, and the mako code gets compiled three separate ways (stylo, servo, testing), each with opportunities to hit unused imports and variables
18:22mbrubeckamong other things it breaks the build for different versions of rustc
18:22Manishearthnah, warnings are good
18:23ManishearthI&#39;m questioning the usefulness of the unused warnings on the mako-generated files specifically
18:24ManishearthThe step of making aservo PR and landi