Skip to content

Instantly share code, notes, and snippets.

View larsbergstrom's full-sized avatar

Lars Bergstrom larsbergstrom

View GitHub Profile
@larsbergstrom
larsbergstrom / gist:8823806
Created February 5, 2014 13:40
Conversation with jdm on events
larsberg
7:14 awesome
7:15 just one quick-ish question based on some chats with sammykim, who's working on hover (https://github.com/mozilla/servo/issues/790 )
7:15 am I right that it'll be a bit before the eventhandler support lands? or is that something you wanted them to add to script?
7:15 right now, I've told them to work on the CSS selector part but that they should also plan on doing the eventhandler later
7:16 but that they shouldn't wait for that support. I'm planning to make sure everything they write is friendly for the eventhandlers, too :-)
jdm
7:16 not sure I quite understand
7:16 would they be making it work regardless of eventhandler implementation?
larsberg
@larsbergstrom
larsbergstrom / gist:8869126
Created February 7, 2014 18:48
servo hover test
<html>
<head>
<style type="text/css">
div {background-color: blue}
div:hover {background-color: red}
</style>
</head>
<body>
<div>foo</div>
[larsberg@lbergstrom build]$ ls arm-linux-androideabi/src/compiler/rust/x86_64-apple-darwin/stage2/lib/
libextra-fd30a1b1-0.9.dylib libgreen.dylib librustc-8b28e8d8-0.9.dylib librustdoc.dylib librustuv-2ba3695a-0.9.dylib libstd.dylib rustc
libextra.dylib libnative-cf55a53a-0.9.dylib librustc.dylib librustpkg-7b329bae-0.9.dylib librustuv.dylib libsyntax-9be99726-0.9.dylib
libgreen-83b1c0e5-0.9.dylib libnative.dylib librustdoc-f0f95988-0.9.dylib librustpkg.dylib libstd-3e5aeb83-0.9.dylib libsyntax.dylib
[larsberg@lbergstrom build]$
@larsbergstrom
larsbergstrom / ugh
Created February 10, 2014 23:36
ugh
compile: servo
/Users/larsberg/servo/src/components/main/compositing/compositor.rs:127:27: 127:52 error: borrowed value does not live long enough
/Users/larsberg/servo/src/components/main/compositing/compositor.rs:127 let window_size = window.borrow().borrow().get().size();
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/larsberg/servo/src/components/main/compositing/compositor.rs:127:27: 127:65 note: borrowed pointer must be valid for the method call at 127:26...
/Users/larsberg/servo/src/components/main/compositing/compositor.rs:127 let window_size = window.borrow().borrow().get().size();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/larsberg/servo/src/components/main/compositing/compositor.rs:127:27: 127:58 note: ...but borrowed value is only valid for the method call at 127:26
/Users/larsberg/servo/src/component
[larsberg@lbergstrom build]$ ./servo ../src/test/html/about-mozilla.html
task '<unnamed>' failed at 'RefCell<T> already borrowed', /Users/larsberg/servo/src/compiler/rust/src/libstd/cell.rs:167
servo(82840,0x7fff716f8310) malloc: *** error for object 0x7f8352460028: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
[larsberg@lbergstrom build]$
[larsberg@lbergstrom build]$ ./servo ../src/test/html/content/test_document_characterSet.html
ALERT: TEST-PASS | utf-8 == utf-8: test1-0, characterSet
ALERT: TEST-PASS | utf-8 == utf-8: test2-1, characterSet
ALERT: TEST-PASS | utf-8 == utf-8: test2-2, characterSet
[larsberg@lbergstrom build]$
&ContainerLayerKind(ref container_layer) => {
// NOTE: all three of these are borrowchk-related issues
let mut tmp = container_layer.borrow().borrow_mut();
let mut tmp2 = tmp.get();
let ref mut tmp3 = tmp2.common;
f(tmp3)
},
@larsbergstrom
larsbergstrom / gist:9101334
Created February 19, 2014 20:55
Making the crate map work on android from a shared library
[larsberg@lbergstrom rust]$ git diff
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index d9b40cf..6749811 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -14,6 +14,9 @@ use option::{Some, None, Option};
use vec::ImmutableVector;
use rt::rtio::EventLoop;
+//#[cfg(target_os = "android")]
/Users/larsberg/servo/src/components/embedding/core.rs:20:5: 20:8 error: unresolved import. maybe a missing `extern mod gfx`?
/Users/larsberg/servo/src/components/embedding/core.rs:20 use gfx::opts;
@larsbergstrom
larsbergstrom / gist:9215299
Created February 25, 2014 18:59
building servo embedding
/Users/larsberg/servo/build/x86_64-apple-darwin/src/compiler/rust/x86_64-apple-darwin/stage2/bin/rustc -Z extra-debug-info -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-foundation -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-foundation/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-foundation/src/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-graphics -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-graphics/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-graphics/src/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-text -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-text/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/platform/macos/rust-core-text/src/.libs -L /Users/larsberg/servo/build/x86_64-apple-darwin/src/pla