Commit graph

2204 commits

Author SHA1 Message Date
Ms2ger
86df4c1fc1 Stop passing owned strings to fail!().
The ~"string" expression is being removed in upstream rust.
2014-05-03 12:16:52 +02:00
bors-servo
812d70942f auto merge of #2295 : Ms2ger/servo/JSCLASS_DOM_GLOBAL, r=jdm
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 05:37:15 -04:00
Ms2ger
6295feea16 Update rust-opengles.
This includes changes to move from ~[T] to Vec<T>.
2014-05-03 11:16:12 +02:00
Ms2ger
599d76fa6e Add JSCLASS_DOM_GLOBAL to DOM global classes, and assert it is used.
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 10:37:46 +02:00
bors-servo
53777807f9 auto merge of #2292 : Manishearth/servo/xhr-webidl, r=Ms2ger
This just gets a working interface with dummy methods in place that can  be built on. I'll implement stuff as we go along.

Blocks #2282
2014-05-03 04:37:11 -04:00
Manish Goregaokar
619da07a4f Webidl and basic implementation of XHR object 2014-05-03 14:00:20 +05:30
Patrick Walton
3edd8d157c layout: Guess the width of block formatting contexts so that we can
speculatively lay them out in parallel
2014-05-02 18:00:08 -07:00
Patrick Walton
81f5da9dd8 layout: Rewrite display list building to be parallel and to handle
overflow correctly, and opportunistically lay out blocks in parallel
even if floats are present.

This commit fixes the `inline-height-test` in Acid2 by implementing
proper overflow as well as the inline "strut".  (See CSS 2.1 § 10.8.1.)
Acid2 was accidentally being rendered properly before because tables'
descendant flows were not being laid out properly.

Display list building is now parallel and is done by bubbling up display
items and layers from parent to child. Speedups of around 60%-70% are
observed on Wikipedia with a 4-core HyperThreaded Core i7.  More
optimizations are possible; this is just a start.

To minimize the amount of data that needs to be bubbled up, as well as
to make proper handling of `overflow: hidden` clipping easier, the
`StackingContext` abstraction is now purely internal to the display
list.  That is, instead of placing items into a stacking context
directly, display items are placed into display lists alongside a
stacking level.  When a stacking context is complete, it is flattened
with the the `flatten` method, which shuffles the display items that
make up the context into their proper order while handling clipping
properly.
2014-05-02 16:07:42 -07:00
Patrick Walton
27276c0305 layout: Re-enable parallel layout by removing all RefCell instances
from `Flow`s; in the process, remove `InlineInfo` in favor of the
range-based design that was originally planned and halfway implemented.

Now, the DOM tree structure for inline flows is reflected not by a
series of arrays but instead by a flat list of ranges into the list of
boxes. As part of this, the `border` and `padding` fields, which were
incorrect in the case of inlines and necessitated separate
`noncontent_inline_foo` methods, have been merged into a single
`border_padding` field that is always guaranteed to be correct after
width assignment, even for inlines.
2014-05-02 11:47:08 -07:00
bors-servo
85393c6931 auto merge of #2289 : mbrubeck/servo/zero-geom, r=metajack
Depends on mozilla-servo/rust-geom#33.
2014-05-02 12:49:28 -04:00
Matt Brubeck
4821df6216 Replace Au::zero_* with generic methods 2014-05-02 09:30:57 -07:00
Tetsuharu OHZEKI
31cf10c006 Node::GetParentElement should use and_then instead of filtered/map. 2014-05-02 13:22:50 +09:00
bors-servo
b36b779d24 auto merge of #2290 : saneyuki/servo/export, r=jdm
- Fix #2128
- Take over from #2220

I didn't change `InterfaceTypes.rs` to `type.rs` because `type` is very common name which might be troublesome.
2014-05-01 23:34:39 -04:00
Mike Blumenkrantz
7dcdd1a690 add MPL header 2014-05-01 16:58:33 -04:00
Mike Blumenkrantz
abe5d2e0ab add start of embedding crate: build system with CEF types 2014-05-01 16:58:33 -04:00
Ms2ger
8c879c8bf8 Implement WebIDL codegen for ByteString. 2014-05-01 22:02:53 +02:00
Ms2ger
541d581c32 Change some isString() checks in the WebIDL codegen to isDOMString() checks. 2014-05-01 21:11:12 +02:00
Ms2ger
05150f82e1 Add missing ByteString support in the WebIDL parser. 2014-05-01 20:58:17 +02:00
Ms2ger
0df5d95eb3 Change some isString() checks in the WebIDL parser to isDOMString() checks. 2014-05-01 20:56:10 +02:00
Manish Goregaokar
da381d6edb Use new attributes syntax in properties.rs 2014-05-01 21:45:54 +05:30
Tetsuharu OHZEKI
04ba6bf29b Point it to InterfaceTypes.rs directly to export generated types. 2014-05-01 21:28:28 +09:00
Tetsuharu OHZEKI
78856c87a4 Remove the 'pub use self::BindingDeclarations::*;' export. 2014-05-01 18:49:16 +09:00
Gulshan Singh
b1f4e04ee2 Removed unnecessary return and moved crate import to script.rs 2014-04-30 14:38:11 -04:00
Gulshan Singh
af548696bb Make TimeStamp in event.rs return the actual timestamp 2014-04-30 13:35:15 -04:00
Matt Brubeck
3c27126477 Use derived traits for Au
This code did not use derived traits previously because their methods were not
inlined, but this was fixed in mozilla/rust#10557.
2014-04-29 17:33:00 -07:00
Ms2ger
844d48e0af Merge UnionConversions() into UnionTypes().
It's not very useful to have one but not the other, so it makes more sense
to deal with them together.
2014-04-29 21:33:27 +02:00
Ms2ger
c51879767e Reuse getTypes in UnionConversions().
This should be equivalent, except that the removed code ignores return
values (which we currently don't support).
2014-04-29 21:18:56 +02:00
Ms2ger
19166b2f53 Remove C++-specific union codegen code. 2014-04-29 21:17:52 +02:00
bors-servo
afae6a3c71 auto merge of #2252 : mbrubeck/servo/1778-borrow-layer, r=larsbergstrom
Fixes a crash in ContainerLayer::remove_child (#1778). r? @larsbergstrom
2014-04-28 18:07:38 -04:00
Ms2ger
55ed05f2c7 Use Vec for the remaining ~[T]s in script. 2014-04-28 23:06:26 +02:00
Ms2ger
6e617d8eba Make ProgressMsg use Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
cc7d04702d Use Vec in Node mutation methods. 2014-04-28 23:06:26 +02:00
Ms2ger
02bcf97fd0 Make get_content_boxes return Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
20f649da71 Make get_nodes_under_mouse return Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
558986c87e Make chain in eventdispatcher.rs use Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
39ad37d8b6 Make open_elements in htmlserializer.rs use Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
2a3b693054 Make PageTree::inner and PageTreeIterator::stack a Vec. 2014-04-28 23:06:26 +02:00
Ms2ger
ebe4b416f3 Make ScriptTask::mouse_over_targets use Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
3ecfb9197f Remove unused support for passing extra arguments for timers. 2014-04-28 23:06:25 +02:00
Ms2ger
674fd893cb Make simple NodeLists use Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
a1ec0cec11 Make TreeIterator::nodes a Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
cc23a324e5 Make static HTMLCollections use Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
251e22266e Make EventTarget::handlers store a Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
25357434e1 Make Element::attrs a Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
7346992981 Make Document::idmap store a Vec. 2014-04-28 23:06:25 +02:00
Ms2ger
50ab85f3ee Make ClientRectList::rects a Vec. 2014-04-28 23:06:24 +02:00
Matt Brubeck
c4f5ffb114 Remove now-redundant clone() 2014-04-28 11:01:08 -07:00
Matt Brubeck
9f76252928 Make ContainerLayer::first_child borrow temporary
Fixes a crash in ContainerLayer::remove_child (#1778).
2014-04-28 10:52:39 -07:00
bors-servo
0bfbe06f4b auto merge of #2194 : Ms2ger/servo/typeerror-2, r=jdm 2014-04-28 13:19:36 -04:00
Ms2ger
505e7d472a Use more rustic names for ThrowTypeError and infrastructure. 2014-04-28 17:18:28 +02:00