Josh Matthews
4972b623e1
Separate disposing of layout data from the GCing of the DOM object reflectors. Change the order of operations when shutting down the script task to ensure that Window globals aren't used after they've been GCed.
2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67
Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal.
2015-03-03 16:25:40 -05:00
Glenn Watson
611fd7a846
Reap layout data whenever a node is removed from the tree.
...
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.
Clear the layout data when a node becomes display:none.
2015-03-03 07:12:51 +10:00
Simon Sapin
2a50755c8a
Move selector matching to an external library, for use outside Servo.
2015-02-23 16:29:34 +01:00
Ms2ger
e921ce859e
Fix some warnings in script.
2015-02-12 20:05:14 +01:00
Simon Sapin
d5dd1d658e
Upgrade to rustc ba2f13ef0 2015-02-04
2015-02-11 14:48:34 -08:00
Ms2ger
147dadce89
Implement an Unrooted smart pointer to replace JS when it is not traced.
2015-02-06 12:33:32 +01:00
Ms2ger
d8c2c88bbd
Replace Root::deref by a custom get_unsound_ref_forever method.
...
This will hopefully make it clearer that this is not the correct function
to call.
2015-02-05 18:45:20 +01:00
Josh Matthews
ae2b74c783
Make Document::url return the page's URL to avoid stale URLs after redirects.
2015-02-04 13:34:06 +00:00
Tetsuharu OHZEKI
e2bd9eadd8
LayoutJS<T> implements Layout*Helpers instead of JS<T>.
2015-02-01 01:54:37 +09:00
bors-servo
172aed535b
auto merge of #4757 : servo/servo/newnewnewcss, r=mbrubeck
...
(Still off by default. Enable with `RUST_LOG=style`.)
r? @mbrubeck
2015-01-30 15:27:53 -07:00
Ms2ger
6311ff07ef
Use snake case in Node.
2015-01-30 16:15:43 +01:00
Simon Sapin
d13d36f57f
End the libstyle 'pub use' madness.
2015-01-30 15:08:29 +01:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
f8ac1777ff
Don't shadow lifetimes in script.
2015-01-28 13:48:28 +01:00
Manish Goregaokar
b8fb725af2
raw_pointer_deriving -> raw_pointer_derive
2015-01-28 13:54:18 +05:30
Manish Goregaokar
b68b7e87c8
self import
2015-01-28 13:46:00 +05:30
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Josh Matthews
d2f0aac5ce
Make UntrustedNodeAddress a newtype.
...
This will allow us to make it Send after the Rust upgrade.
2015-01-24 11:40:21 +01:00
Ms2ger
13c7cf928a
Stop calling deref() and deref_mut() explicitly.
2015-01-22 16:04:21 +01:00
Simon Sapin
d034a6c6bc
Port to the new cssparser.
...
https://github.com/servo/rust-cssparser/pull/68
2015-01-21 22:23:46 +01:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
8a08fff0b4
Remove OptionalSettable.
...
It was obsoleted by MutNullableJS.
2015-01-19 23:08:11 +01:00
Jim Hoskins
7759358e09
Implement Element#closest
...
fixes #4603
- Add definition to the Element.webidl and implementation to element.rs.
- Create inclusive_ancestors helper in NodeHelpers
- Update test expectations
2015-01-17 07:29:33 -08:00
Ms2ger
bc14c2c23b
Rewrite ReverseChildrenIterator to return Temporary.
2015-01-10 16:57:21 +01:00
bors-servo
f74d5360ba
auto merge of #4584 : Ms2ger/servo/unsafe, r=jdm
...
As a first start, this allows them indiscriminately where used.
2015-01-09 07:15:52 -07:00
Arpad Borsos
322daccb42
Fix assertion trying to remove a Node that has no parent
...
fixes #4562
2015-01-09 12:47:28 +01:00
Ms2ger
edc1d89251
Deny unsafe blocks in script.
...
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Matthew Rasmus
01d4739d16
Fix variable does not need to be mutable
warning
2015-01-08 08:51:10 -08:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
bors-servo
2e17cae5d0
auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger
2015-01-04 12:12:48 -07:00
Ms2ger
b51e83819d
Fix obsolete format traits.
...
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Megha Gupta
f85b9e37cc
Add HTMLElementTypeId enum ( fixes #3625 )
2015-01-02 23:10:31 +05:30
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Ms2ger
c9f26dfd59
Rename Root::root_ref() to Root::r().
...
As it will be used much more widely after the upcoming changes, this limits
the effort reading and writing the method calls.
2015-01-01 20:36:43 +01:00
bors-servo
56d1b16d1b
auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister
...
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.
A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
2014-12-27 22:12:45 -07:00
Manish Goregaokar
e9d1740e19
script: to_string() -> into_string()
2014-12-27 14:48:36 +01:00
Manish Goregaokar
50c246bdc5
Fix warnings post-upgrade
2014-12-27 03:28:35 +05:30
Manish Goregaokar
7d65673561
Remove extra spaces
...
Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
2014-12-27 02:53:35 +05:30
Manish Goregaokar
552db382d6
Remove manual impls of Reflectors (autogen)
...
Obtained via:
`find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
`find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`
followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Amanda Watson
582ba9d796
GlobalRef passed by value in reflect_dom_object, reflect_node #4165
2014-12-20 16:20:53 -08:00
Ms2ger
96180ec3ad
Move unwrap_jsmanaged and related machinery to conversions.rs.
2014-12-20 14:51:14 +01:00
Tetsuharu OHZEKI
a7bb436177
script: Remove glob imports added in #4405
2014-12-19 04:52:48 +09:00
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05:00
Patrick Walton
a1ea44b294
style: Address review comments relating to bgcolor
and column spans
2014-12-15 18:09:44 -08:00
Patrick Walton
d101c1dd91
script: Improve dirty propagation and fix script-layout synchronization.
...
This fixes race conditions whereby layout and script could be running
simultaneously.
2014-12-15 14:16:04 -08:00
bors-servo
368d6dc6bf
auto merge of #4280 : Ms2ger/servo/cleanup-node, r=jdm
2014-12-08 13:55:08 -07:00
bors-servo
5c506f7a98
auto merge of #4194 : cgaebel/servo/incremental-reflow-fix, r=pcwalton
...
When inserting a node that was already dirtied, the dirtying logic
would short circuit: "This node is already dirty? Great! Then its
parents must be HAS_DIRTY_DESCENDANTS, too! Let's skip that step."
This isn't appropriate when nodes move around the tree. In that case,
the node may be marked HAS_CHANGED, but ancestors may not yet have
the HAS_DIRTY_DESCENDANTS flag set.
This patch adds a `content_and_heritage_changed` hook in the document,
to deal with these cases appropriately.
2014-12-08 12:28:14 -07:00
Ms2ger
e63a92956d
Cleanup Node::is_html_element_in_html_document.
2014-12-08 12:26:10 +01:00
Ms2ger
c009bdec4e
Cleanup Node::as_element.
2014-12-08 12:23:34 +01:00