Commit graph

52 commits

Author SHA1 Message Date
Tetsuharu OHZEKI
f34203dda8 servo: Merge #4130 - Make callers of ${Derived}::${base}() use casts instead (from saneyuki:cast); r=Manishearth
Fix #4124

This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).

Source-Repo: https://github.com/servo/servo
Source-Revision: 82050d1e535681ea993e4290d02bcf4b9f4ee5a2
2014-11-28 09:24:44 -07:00
Rohan Prinja
d05c466f44 servo: Merge #4067 - implement Document#createAttribute (from ajnirp:document-create-attribute); r=Manishearth
fixes #4054

Source-Repo: https://github.com/servo/servo
Source-Revision: d215ff786756bc38042b7f41ed93c14efa3b8fca
2014-11-23 08:21:37 -07:00
Ms2ger
6da7215f3a servo: Merge #4003 - Correct the checks in step 5 of Node::pre_insert (from Ms2ger:pre-insert); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a40a6bc82558d1ca4997c9b93379df26e2a951f
2014-11-16 07:24:28 -07:00
Glenn Watson
22c4035692 servo: Merge #3948 - Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a (from servo:rustup-20141105_2); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: c5e1b0d32e17fad29799023c85e2e73ac89c3af7
2014-11-12 20:48:31 -07:00
Ms2ger
c4c3870215 servo: Merge #3898 - Pass the correct argument to Element::create when cloning (from Ms2ger:prefix-clone); r=jdm
The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".

Source-Repo: https://github.com/servo/servo
Source-Revision: 76cc006a40d7242e64c6c12f033127c569914e31
2014-11-05 12:57:37 -07:00
Patrick Walton
0856071fc3 servo: Merge #3835 - script: Implement various microoptimizations (from pcwalton:script-microoptzns); r=Ms2ger
This is a grab bag of various microoptimizations for script that I came across when profiling our performance on RoboHornet.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 69f8b46f362a828ffaefe9623355bc1ad76dc5e0
2014-11-03 15:48:34 -07:00
Martin Robinson
1628fc65f1 servo: Merge #3857 - Have ContentBox(es)Queries consult the flow tree (from mrobinson:queries); r=pcwalton
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.

Source-Repo: https://github.com/servo/servo
Source-Revision: c9089c45c4b7d40419233b48a192d85a8ad71c99
2014-11-03 12:03:37 -07:00
Ms2ger
5655a36e02 servo: Merge #3871 - Cleanup some code in node.rs (from Ms2ger:node-cleanup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a3ff8739c2a17d61f295f213f31ddee25e0b3ae
2014-11-02 14:51:33 -07:00
Bruno de Oliveira Abinader
9b73dc44d2 servo: Merge #3864 - Node's ChildElementIterator is now peekable (from brunoabinader:node-peekable-childelement); r=Ms2ger
This change avoid using ```child_elements().count() > 0``` approach (using ```child_elements().peek().is_some()``` instead).

Source-Repo: https://github.com/servo/servo
Source-Revision: 20b2fae238f66b1ba69a3790e36448524edc428f
2014-10-31 09:42:42 -06:00
Ms2ger
1e684e8beb servo: Merge #3853 - Move build_element_from_tag out of the HTML parser (from Ms2ger:create); r=Manishearth
This function is not particular to the parser, so should live in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2c6859937354760f2d175c60bad1daa16bd2ed22
2014-10-30 11:06:36 -06:00
Matt Brubeck
eb3242aca9 servo: Merge #3721 - Synchronous script loading during HTML parsing (from mbrubeck:script-sync); r=Ms2ger
Fixes #3356.  This makes script elements fetch their source synchronously and execute immediately by default.  It also lays some groundwork for future deferred or async script loading.

(Depends on #3716 to fix a content test failure caused by running script during parsing.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 272ae0cc1beb83c839d5fbd746e67f4ae746db99
2014-10-29 15:51:41 -06:00
Clark Gaebel
02d8a36841 servo: Merge #3828 - layout: Implement flow tree dumping with RUST_LOG=debug is on (from cgaebel:layout-node-dumping); r=pcwalton
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d8bd10abefe5cee9b60900911d41bb47323d248
2014-10-28 13:12:52 -06:00
Ray Clanan
527a514878 servo: Merge #3773 - Rename untraceable!() to no_jsmanaged_fields!(). References issue #3671 (from rclanan:rename-untraceable); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 041ab13fcec726bbacc09b3be07e706091625dda
2014-10-23 19:48:28 -06:00
Josh Matthews
9d02aff643 servo: Merge #3759 - Implement Document.readyState. Prevent iframes from notifying the compos (from jdm:readystate); r=Ms2ger
...itor after the initial parse. Fixes #1720. Fixes #3738.

r? @Ms2ger or @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 2df236376a443d8d031ee7a72379f336f2cd8cc4
2014-10-23 09:18:37 -06:00
Edit Balint
052d295752 servo: Merge #3774 - Make DOM getters that return &JS<T> return Temporary<T> instead #3707 (from ebalint:3707_DOM_getters); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1bc9c049c6536bc102939fd97f4390eed3dcc2bf
2014-10-22 13:36:38 -06:00
Tetsuharu OHZEKI
a1364ae852 servo: Merge #3737 - Use DOMRefCell in script crate (from saneyuki:cell); r=jdm
#3050

Altough LayoutDataRef is touched from layout, we don't use DOMRefCell in it becasuse
it's expected to manipulate in layout task.

Source-Repo: https://github.com/servo/servo
Source-Revision: f5e8df9dac9330f2818906c471ed05f5975828c6
2014-10-22 07:54:36 -06:00
Clark Gaebel
29430423a7 servo: Merge #3744 - More efficient preorder DOM traversals (from cgaebel:efficient-preorder-traversal); r=pcwalton
This also tackles some nearby FIXMEs. `traverse_preorder` is used in a LOT of
DOM functions..

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 2bc4ffe5cf331fb7bd246af34c5d12e4e03adda9
2014-10-21 13:09:38 -06:00
Keegan McAllister
fb40898c55 servo: Merge #3670 - Use html5ever for HTML parsing (from kmcallister:h5e-take2); r=jdm
r? @Ms2ger, @jdm

The parser is now a JS-managed object and we use hooks in html5ever to trace its internal state.  This should be memory-safe even if arbitrary JavaScript can run during a parse.  Please let me know if you think of a reason it wouldn't be!

I think the likely outcome of a garbage collection during parsing is a dynamic `RefCell` borrow failure, but I'm going to look into that after this lands.  It should be safe to trace the parser while it's mutably borrowed, as long as it's not shared between threads, so we can probably switch to `UnsafeCell`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d3b107568ab965b518b8003b702a5db993fa7d0

--HG--
rename : servo/tests/content/test_document_characterSet_long.html => servo/tests/content/test_document_characterSet_long.html.disabled
rename : servo/tests/content/test_document_characterSet_short.html => servo/tests/content/test_document_characterSet_short.html.disabled
2014-10-16 14:15:21 -06:00
Manish Goregaokar
4271b077f4 servo: Merge #3684 - Add #[dom_struct], inline autogenerated trace() methods (from Manishearth:dom_struct); r=jdm
This attribute implies #[jstraceable], #[privatize], and #[must_root].

Source-Repo: https://github.com/servo/servo
Source-Revision: 9af090006017747809f5f72a8870bd516b20f483
2014-10-15 23:24:20 -06:00
Tetsuharu OHZEKI
7908863857 servo: Merge #3694 - Remove Node.unsafe_get_flags() (from saneyuki:node); r=jdm
`Node.unsafe_get_flags()` returns `*const NodeFlags`, but `NodeFlags` has only `u8` length.
So We should just returns a raw value instead of any pointers.

Source-Repo: https://github.com/servo/servo
Source-Revision: 84b2fe54b9a4f1b04531600492be1b27d3915e05
2014-10-15 22:45:19 -06:00
Clark Gaebel
3443a24780 servo: Merge #3640 - Try to reset flows which need reflow, since reflow isn't yet idempotent (from cgaebel:incremental-flow-construction); r=pcwalton
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.

Source-Repo: https://github.com/servo/servo
Source-Revision: 56989b8dec4aa95a3b484d45f15b23f9b3daaf13
2014-10-14 16:51:30 -06:00
Patrick Walton
7495bb838a servo: Merge #3623 - script: Use atom comparison in more places, especially for attributes (from pcwalton:use-atoms-2); r=jdm
75% improvement in style recalc for Guardians of the Galaxy.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8077edc0622b04aeb26d42ced86ea285c9cac0e7
2014-10-14 12:42:35 -06:00
Tim Taubert
993d0f5a2e servo: Merge #3666 - Privatize DOM (fixes #3644) (from ttaubert:issue/3644-privatize-dom); r=Manishearth
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.

All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.

Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7
2014-10-13 22:00:37 -06:00
Clark Gaebel
e1fa32f008 servo: Merge #3590 - Incremental Style Recalc (from cgaebel:slow-incremental-reflow-rebase); r=pcwalton
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 85b277655f07db1cb99c4d3dee93804735ed0470
2014-10-09 11:21:32 -06:00
Tim Taubert
fc4bdae442 servo: Merge #3620 - Remove unnecessary deref()s (fixes #3586) (from ttaubert:issue/3586-remove-derefs); r=Manishearth
r? @Manishearth

Source-Repo: https://github.com/servo/servo
Source-Revision: 510f8a817f8144dd5046886d4ca7c612f19a3d08
2014-10-09 07:12:37 -06:00
Tim Taubert
17eeb55b66 servo: Merge #3584 - Support [*|attr], attribute selectors in any namespace (fixes #1558) (from ttaubert:issue/1558-attr-ns-selectors); r=Manishearth
This implements basic support for attribute selectors with namespace prefixes. I would have added a more sophisticated test covering various selectors but it seems that we don't have an XML parser yet and thus no XHTML support?

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: f49c730720a51d14dacefe9815faf50216b36b91
2014-10-08 03:12:34 -06:00
Gilles Leblanc
543822d46c servo: Merge #3575 - Take the prefix from createElementNS into account for HTML elements (from gilles-leblanc:issue-3139); r=Ms2ger
Fixes #3139

Source-Repo: https://github.com/servo/servo
Source-Revision: a4b414746bc2b067251d7a543b43fe136b319bdc
2014-10-07 01:33:32 -06:00
Manish Goregaokar
da1369f261 servo: Merge #3518 - Purge Traceable and Untraceable from Servo (from Manishearth:trace-cleanup); r=jdm
Now that we use `JSTraceable` (defined in `script`), we can create arbitrary implementations on non-`script` types (eg `Url` or `RequestHeaderCollection`) where in the past we had to rely on `Traceable` and `Untraceable` to achieve cross-crate impls of `Encodable`.

This removes the two completely. They can be reintroduced if required, though the `untraceable!` macro should suffice.

Fixes #3469

Source-Repo: https://github.com/servo/servo
Source-Revision: b34df7c343579f200d2e67e21fc566842a4e4a91
2014-10-06 10:15:33 -06:00
Josh Matthews
179c7b7dcc servo: Merge #3531 - Implement MutNullableJS for mutable, nullable member pointers to DOM objects (from Ms2ger:MutNullableJS); r=Ms2ger
Extracted from #3527.

Source-Repo: https://github.com/servo/servo
Source-Revision: bae5440689c67f425f94ec27bf0f61ff955dc290
2014-10-01 09:09:28 -06:00
Cameron Zwarich
5ac3634894 servo: Merge #3542 - Remove extra lifetime parameters (from zwarich:more-jsref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a840fed78a493a481683ef73dae923190d87ba6c
2014-10-01 04:03:29 -06:00
Cameron Zwarich
8ef892113e servo: Merge #3541 - Convert the NodeHelpers trait to use self methods (from zwarich:more-jsref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f73e5088219cd6deeea0d4f0612cad750fc532a9
2014-10-01 02:51:27 -06:00
Cameron Zwarich
8e1c96a87b servo: Merge #3540 - Convert TNode / TElement to use self parameters rather than &self (from zwarich:more-jsref); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 09e9abc047e03b81b8a4aa90d13efa184d0a732f
2014-09-30 22:36:28 -06:00
Cameron Zwarich
f911787c54 servo: Merge #3536 - Convert a method from &JSRef to JSRef (from zwarich:more-jsref); r=Manishearth
This also removes the unnecessary formation of a trait object.

Source-Repo: https://github.com/servo/servo
Source-Revision: 93e259227a969dbea1319d4d3ce92bc5706c6b06
2014-09-30 18:39:27 -06:00
Simon Sapin
2a5f4c7376 servo: Merge #3487 - Upgrade Rust and enable style crate rustdoc (from servo:rustup-20140923); r=Ms2ger
The biggest language change is that enum variants now also reserve (for future use) a name in the type namespace, which must not collide with other types. Some things were renamed, and others qualified as `module::name`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7409685589c550ee7a9f94182f511acddab4c6fd
2014-09-29 10:45:27 -06:00
Cameron Zwarich
686b31d2f4 servo: Merge #3501 - Remove the 'static lifetime parameters from TElement methods (from zwarich:telement-lifetimes)
Reviewed-by: jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c9c8d63727560ab88a8b739f5ac305b8a02410d2
2014-09-27 17:09:28 -06:00
Cameron Zwarich
a15780aea2 servo: Merge #3496 - Convert &JSRef -> JSRef in DisabledStateHelpers (from zwarich:disabled-state-helpers-jsref)
Reviewed-by: jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a35212410ae78a19db99d284d63a00d1a72dbd79
2014-09-26 20:24:33 -06:00
Cameron Zwarich
9ec12b6ba0 servo: Merge #3495 - Convert &JSRef -> JSRef for the PrivateNodeHelpers trait (from zwarich:private-node-helpers-jsref)
Reviewed-by: jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1da014a13d4c8dee3d580cee3d75e1c879f37d3e
2014-09-26 18:36:38 -06:00
Manish Goregaokar
298a76a187 servo: Merge #3468 - Replace our usage our Encodable with JSTraceable; r=jdm (from Manishearth:jstraceable)
Source-Repo: https://github.com/servo/servo
Source-Revision: 95a4731c0eec0cfb2fb70af534757bc7ca63e407
2014-09-24 20:56:41 +05:01
Simon Sapin
e9f1c0bcd3 servo: Merge #3438 - Upgrade Rust (from servo:rustup)
Source-Repo: https://github.com/servo/servo
Source-Revision: 045328c8e94f5bdfcd67105c5dfa9209f4cd501c
2014-09-20 15:35:08 -07:00
Cameron Zwarich
ead29cd307 servo: Merge #3433 - More progress in the &JSRef -> JSRef conversion (from zwarich:jsref-self-helpers)
Source-Repo: https://github.com/servo/servo
Source-Revision: d6ba37c68c34a3748a789caeca225083275757e5
2014-09-20 12:55:21 -07:00
Adenilson Cavalcanti
2beacfbf19 servo: Merge #3428 - Move is_void() Element method together with the other struct methods (from Adenilson:moveIsVoidElement01)
Source-Repo: https://github.com/servo/servo
Source-Revision: 2adc594e5d8babaadbe1a4e05a8f7d808313728f
2014-09-20 13:53:22 -04:00
Tetsuharu OHZEKI
e52a84a7eb servo: Merge #3418 - Replace manual Encodable implementation for LayoutDataRef with Untraceable (from saneyuki:untrace)
Source-Repo: https://github.com/servo/servo
Source-Revision: de67710934ac89de0cf21911dc57dcda7cb0fae1
2014-09-20 16:40:06 +09:00
Cameron Zwarich
74b96ae97e servo: Merge #3422 - First steps of &JSRef -> JSRef conversion (from zwarich:jsref)
Source-Repo: https://github.com/servo/servo
Source-Revision: e9ad87e27eb30cfacd66b575e104ee2784f95591
2014-09-19 19:28:32 -07:00
Josh Matthews
d3fc0a6b43 servo: Merge #3172 - Dump initial prototype of devtools server into the build. Expect lies if (from jdm:devtools)
Source-Repo: https://github.com/servo/servo
Source-Revision: b82c0dced08ccda8c3c7f35643c3891bc45b058c
2014-09-19 09:15:03 -04:00
Cameron Zwarich
62aff94087 servo: Merge #3416 - Remove uses of &mut JSRef (from zwarich:remove-jsref-mut)
Source-Repo: https://github.com/servo/servo
Source-Revision: d7ffe7a19864689735fa96b34c7a26baf97910a3
2014-09-18 22:25:48 -07:00
Josh Matthews
34ed2923a4 servo: Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures.
This reverts commit 874db261046d6155b1942efa106d2e0014295d6d.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9607b468bc50496c0de3706d22efaa6fdc68b089
2014-09-18 09:20:19 -04:00
Josh Matthews
dd215dd15e servo: Merge #3358 - Delay initiating layout operations for as long as possible (from jdm:thespicemustnotreflow)
Source-Repo: https://github.com/servo/servo
Source-Revision: 75caade8287bbe9ee25a71bea01e3da6a1d3c1b5
2014-09-17 19:09:31 -04:00
Patrick Walton
2c51fb6e8e servo: Merge #3316 - script: Use atom comparison in more places, especially for attributes (from pcwalton:use-atoms)
Source-Repo: https://github.com/servo/servo
Source-Revision: 787a68336524fb9585922b9ed319a8b194fb8ee1
2014-09-17 13:19:00 -07:00
Manish Goregaokar
655b31f137 servo: Merge #3374 - Add lint for ensuring proper rooting of JS<T>; r=jdm (from Manishearth:lint_unrooted_jsmanaged)
Source-Repo: https://github.com/servo/servo
Source-Revision: 11ba79894a13ddaee4bfcdd64d23fd4b54a041f3
2014-09-17 17:48:19 +05:01
Clark Gaebel
4f31c8c8ed servo: Merge #3212 - Added a bloom filter to CSS selector matching (from cgaebel:style-resolution-bloom-filter)
Source-Repo: https://github.com/servo/servo
Source-Revision: ad02534c10d85cc011908fe6b2ba06cfcdcb226c
2014-09-15 22:27:24 -06:00