Patrick Walton
e034c1cee2
script: Use String::new()
instead of the formatting infrastructure
...
when constructing DOM unique IDs.
This was showing up in the RoboHornet profile.
2014-10-28 11:16:20 -07:00
Patrick Walton
6f577c7c84
script: Avoid a temporary when constructing <td>
and <tr>
elements.
...
Was a huge improvement to RoboHornet.
2014-10-28 11:14:06 -07:00
Patrick Walton
5e9127e2b2
script: Use a 16-element SmallVec
for the root collection.
...
In my tests the size of the root collection never exceeded 7, so 16
seems like a nice conservative number.
2014-10-28 11:12:09 -07:00
bors-servo
3b6e035d0d
auto merge of #3826 : cgaebel/servo/fix-resize, r=pcwalton
...
Currently, both restyle/flow construction _and_ reflow are skipped
during resize. Reflow should not be in that list. This patch fixes
that.
2014-10-28 12:00:51 -06:00
Patrick Walton
0758ca9a08
gfx: Inline a few commonly-used methods that were showing up in profiles
2014-10-28 10:55:19 -07:00
Patrick Walton
1a28960bd2
util: Add a method to push all elements from another doubly-linked list
...
without any moves.
This is tracked upstream as Rust bug #18402 .
2014-10-28 10:47:04 -07:00
Clark Gaebel
fe36399628
use size hints
2014-10-28 10:36:41 -07:00
Clark Gaebel
e4d8741991
remove warning
2014-10-28 10:28:24 -07:00
Clark Gaebel
47091c014d
combine conditions
2014-10-28 10:26:48 -07:00
Clark Gaebel
cb5fa23a1e
use println instead of error
2014-10-28 10:24:50 -07:00
bors-servo
ff06be91eb
auto merge of #3827 : cgaebel/servo/use-custom-spawn, r=pcwalton
...
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.
r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
2014-10-28 11:24:43 -06:00
Clark Gaebel
4d610e36bd
util: Primarily fixes a bug where SmallVec.into_iter just doesn't work.
...
into_iter used to use `inline_size` as the capacity insetad of the actual
capacity. This patch fixes that, adds some utility methods to `SmallVec`
to bring it closer in functionality to `Vec`, and removes the obsolete
`owns_managed` calls.
2014-10-28 10:22:34 -07:00
Clark Gaebel
a8f80b89f4
layout: Implement flow tree dumping with RUST_LOG=debug is on.
...
r? @pcwalton
2014-10-28 10:14:12 -07:00
Clark Gaebel
14b1c320a6
make naming more consistent
2014-10-28 10:06:39 -07:00
Clark Gaebel
6df1cc8e4c
Run all task spawning through util, to allow for easy hooking.
...
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.
r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
2014-10-28 09:53:45 -07:00
Clark Gaebel
432071b703
Layout: Fix resize (which just plain doesn't work right now).
...
Currently, both restyle/flow construction _and_ reflow are skipped
during resize. Reflow should not be in that list. This patch fixes
that.
2014-10-28 09:35:24 -07:00
bors-servo
541077286c
auto merge of #3819 : mrobinson/servo/clean-up-events, r=pcwalton
...
There are many function and methods that operate on a single layer, that can really just be methods on a CompositorLayer trait. This greatly simplifies the way that Compositor interacts with its child layers. This PR is just code motion.
2014-10-28 09:39:43 -06:00
Martin Robinson
80a6f3a732
Move compositor_data.rs to compositor_layer.rs.
...
The new name better reflects the majority of the code in the file.
2014-10-28 08:33:23 -07:00
Martin Robinson
c0fa32e7aa
Combine events and CompositorData methods into CompositorLayer
...
This is a more natural collection of methods, as they all operate
directly on layers and accept a layer as their first argument.
2014-10-28 08:33:23 -07:00
Martin Robinson
96f6c53b52
Make compositor event handling a Layer trait
...
This simplifies the way that event handling interacts with the
compositor.
2014-10-28 08:33:23 -07:00
Glenn Watson
743ea6381a
If opts is retrieved, but not set by platform layer, return a default set.
...
This is required for unit tests like the image cache task, which can
pass through code paths that query the command line options.
2014-10-28 14:58:31 +10:00
Clark Gaebel
293969cb7d
Addressed code review comments.
2014-10-27 14:19:44 -07:00
LalehB
b0d16462ff
Adding back-off instead of busy-spinning
...
Also changed the total number of spinning similar to Cilk
2014-10-27 14:14:21 -07:00
Ms2ger
7d44f7bf1e
Cleanup some code in image_cache_task.rs.
2014-10-26 22:26:43 +01:00
Mukilan Thiyagarajan
e023662571
Implement [LenientThis] support and enable it in Document.webidl
...
Closes issue #3760
2014-10-25 12:05:36 +05:30
Keegan McAllister
f508a82582
Provide safety check helpers in release builds
...
debug_assert! uses
if cfg!(not(ndebug)) { ... }
so the body in a release build is dead code, but it still needs to compile.
2014-10-24 16:53:58 -07:00
Keegan McAllister
4dee8ecdf0
task_state: Generate the list of task types
...
Also fix warnings.
2014-10-24 16:44:34 -07:00
Keegan McAllister
49234484d6
Ignore the HTML parser's borrow flag in GC tracing
...
Adds some other dynamic checks in debug builds.
2014-10-24 16:27:37 -07:00
Keegan McAllister
6ec0939a22
Dynamically check DOMRefCell access from layout in debug builds
2014-10-24 16:27:37 -07:00
Keegan McAllister
0162214b1f
Fix a layout method to use borrow_for_layout()
2014-10-24 16:27:36 -07:00
Keegan McAllister
96e180a22c
Customize RefCell instead of wrapping it
...
This gets rid of a dubious transmute:
let val = mem::transmute::<&RefCell<T>, &T>(&self.base);
The code duplication will be reduced once rust-lang/rust#18131 is fixed.
2014-10-24 16:27:36 -07:00
Josh Matthews
a1b2f4b590
Add an optional --debug-mozjs argument to mach build
that enables a non-optimized, debug build of mozjs and rust-mozjs. Update the Cargo snapshot to enable new feature support.
2014-10-24 16:18:25 -04:00
bors-servo
a258746269
auto merge of #3800 : glennw/servo/native-gfx-metadata, r=mbrubeck
...
This is a prerequisite for glutin support.
Tested on Linux, mac. Tested that android + cef build.
2014-10-23 23:03:29 -06:00
bors-servo
5d78d018ce
auto merge of #3795 : jdm/servo/utildeps, r=metajack
2014-10-23 22:00:34 -06:00
Glenn Watson
2d6626e7ef
Use WindowMethods to get native graphics metadata instead of
...
relying on azure. This is a prerequisite for the switch to glutin.
Tested on Linux, mac. Tested that android + cef build.
2014-10-24 13:45:42 +10:00
bors-servo
3910bc942f
auto merge of #3794 : glennw/servo/font-content-opt, r=pcwalton
2014-10-23 21:09:29 -06:00
Ray Clanan
85f746f9b9
Rename untraceable!() to no_jsmanaged_fields!(). References issue #3671
2014-10-23 21:33:32 -04:00
bors-servo
d1a1ac7e28
auto merge of #3792 : samlh/servo/patch-1, r=jdm
...
Small drive-by update to the style crate readme.
2014-10-23 18:42:30 -06:00
Josh Matthews
766c3815ab
Add layers dependency to util crate. Fixes #3783 .
2014-10-23 19:29:05 -04:00
Josh Matthews
225ec3ed4e
Really fix #3738 by only processing iframe src attributes during parsing.
2014-10-23 18:58:34 -04:00
Glenn Watson
b1c226778f
Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms.
2014-10-24 08:25:10 +10:00
Samuel Harrington
6b88fc4c54
Update style/README.md - libcss is gone now
2014-10-23 16:23:54 -05:00
bors-servo
012a80cc18
auto merge of #3772 : pcwalton/servo/slim-down-fragment, r=metajack
...
16% performance improvement in layout (!)
r? @metajack (or whoever)
2014-10-23 12:18:34 -06:00
Ms2ger
903f3fa729
Cleanup Document::Title.
2014-10-23 18:21:33 +02:00
Ms2ger
fff0491c01
Move the methods on bare Document onto DocumentHelpers.
2014-10-23 18:21:02 +02:00
Ms2ger
d643ade7e8
Introduce LayoutDocumentHelpers::is_html_document_for_layout for LayoutElementHelpers::html_element_in_html_document_for_layout.
2014-10-23 18:20:11 +02:00
Ms2ger
32bcc192b0
Cleanup some Document methods.
2014-10-23 18:20:11 +02:00
Patrick Walton
de5e2fd5e2
layout: Shrink fragments down from 448 bytes down to 128 bytes.
...
16% performance improvement in layout (!)
2014-10-23 09:13:41 -07:00
Josh Matthews
539c21f380
Implement Document.readyState. Prevent iframes from notifying the compositor after the initial parse. Fixes #1720 . Fixes #3738 .
2014-10-23 10:55:59 -04:00
bors-servo
470d27a668
auto merge of #3776 : saneyuki/servo/macro, r=jdm
...
Fix #3755
This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).
2014-10-22 22:30:29 -06:00