Commit graph

191 commits

Author SHA1 Message Date
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
Anthony Ramine
d2ee701ee9 servo: Merge #7401 - Remove helper traits (from nox:rm-helpers); r=Manishearth
Now that `JSRef<T>` is gone, there is no need to have helper traits.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909429702972d53bf02dfe9a4aa93ea0cb588cf4
2015-08-27 09:38:48 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Manish Goregaokar
8c0333b4f1 servo: Merge #7397 - Remove doublepointer in VirtualMethods, and from_borrowed_ref (from Manishearth:doublepointer-meet-fire); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 48945b0fc1b1f1bee77f6cb30ac10e17614ef283
2015-08-26 15:01:12 -06:00
Simon Sapin
358afcbc30 servo: Merge #7334 - Parse :active pseudo-class selector (from servo:active); r=SimonSapin
This is #7258 with a spec link added in doc-comment.

The pseudo-class is never matched, but this can still help with stylesheets like `a:hover, a:active { color: something }` where failing to parse one pseudo-class makes the entire selector list invalid.

I filed #7333 about actually making it match.

Source-Repo: https://github.com/servo/servo
Source-Revision: fa06a96f8a880a051ad4cad2489042547dd7f455
2015-08-24 04:23:13 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
João Oliveira
3436fe7092 servo: Merge #7257 - Replace uses of for foo in bar.iter(), (from jxs:master); r=Ms2ger
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d6d6a05009606dfbbfc9765d7dc2c745c18f6a5
2015-08-18 02:46:46 -06:00
Simon Sapin
1923ca73f1 servo: Merge #7188 - Fix Element::set_inline_style_property_priority’s handling of priority (from servo:set_inline_style_property_priority); r=nox
Thanks to @michaelwu for pointing out a copy-paste error.

Source-Repo: https://github.com/servo/servo
Source-Revision: 31413f4313fb96f9d17e54157d404c7633e59fc2
2015-08-15 09:17:31 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
Ms2ger
b7fff47f1a servo: Merge #7046 - Implement a base_url getter and use it for style attributes (from Ms2ger:base-url); r=dzbarsky
Source-Repo: https://github.com/servo/servo
Source-Revision: 530d4547c945fbf120d546d6e9a31b8f3bacc78f
2015-08-08 06:53:32 -06:00
Patrick Walton
2eb8f4c179 servo: Merge #7043 - script: Make the legacy presentational attributes on <td> apply to <th> too (from pcwalton:th-width); r=Ms2ger
Makes the Google SERPs not so narrow.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 17263a525b316d1d02b1cc3181ec9aef3b7001e6
2015-08-07 00:40:54 -06:00
Josh Matthews
7a2b43ae8d servo: Merge #6959 - Fix warnings (from servo:warnings_); r=jdm
Adds on top of #6949.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0d8825c25c6eed4dc22b10e668b03fc79056702b
2015-08-05 03:44:22 -06:00
Josh Matthews
2f1aaef81d servo: Merge #6874 - Start reporting memory usage for Window and all nodes in all DOM tree… (from jdm:domreporting); r=njn
…s for frame treese in script tasks.

This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of `measure_memory_for_eventtarget`. google.com shows a dom-tree value of 0.24 MB for me at the moment.

r? @nnethercote

Source-Repo: https://github.com/servo/servo
Source-Revision: 84e25befdd97cf74fb00707dbe150d59d980e977
2015-08-03 21:24:41 -06:00
Glenn Watson
38ace83751 servo: Merge #6903 - Fix percentage height calculation, absolute containing block height calculations (from glennw:fix-height-again); r=pcwalton
It's not possible to correctly determine during the css cascade whether the container height
is explicitly specified. Additionally, the spec https://drafts.csswg.org/css2/visudet.html#the-height-property says this should affect the *used* height, rather than the computed height.

This significantly improves the layout in #6643.

Source-Repo: https://github.com/servo/servo
Source-Revision: 028707f5cd3263fd1476669207f67d5b9d5d4806
2015-08-03 10:38:21 -06:00
Patrick Walton
e69b59f7ca servo: Merge #6896 - script: Use Arc::make_unique instead of Arc::get_mut when updating inline styles (from pcwalton:fix-particles-crash); r=SimonSapin
Transitions make the reasoning in the comment in the relevant sections
not true.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c6e271cd3d5e2a7f141cae811d92b8fd6370b18
2015-08-02 10:10:39 -06:00
Simon Sapin
17b790db18 servo: Merge #6741 - Fix CSSStyleDeclaration::setPropertyPriority and some refactoring (from servo:fix-setpropertypriority); r=pcwalton
r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: c6b043582b41434c59a21eed5c9258ae3c0fb437
2015-08-01 15:00:06 -06:00
Tom Schuster
d22cefb8e0 servo: Merge #5851 - Implement the HTML background attribute (from evilpie:background); r=SimonSapin
Fixes #5835

Source-Repo: https://github.com/servo/servo
Source-Revision: 58fa3b69b76387958db45bc9831ac7c79caab2ea
2015-07-29 14:37:45 -06:00
Bogdan Cuza
e9c4da1e57 servo: Merge #6699 - Tidy check for FooMethods in components/script/dom/*.rs and color for tidy (from boghison:tidyspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 14ccb22e679722ed3374c8facec21adcf0f2b247
2015-07-28 08:56:39 -06:00
Till Schneidereit
372ef0fcd0 servo: Merge #6662 - Implement Element.client{Top,Left,Width,Height} (from tschneidereit:client-geometry); r=glennw,pcwatson
This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal.

Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: e0bd80f80715bdbdf30de1de9c79a99a41cfd99e
2015-07-27 20:45:05 -06:00
Anthony Ramine
23bb14e6aa servo: Merge #6660 - Introduce VirtualMethods::children_changed() (from nox:children-changed); r=jdm
This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it.

Source-Repo: https://github.com/servo/servo
Source-Revision: 705c95dedbbaa60ffd08e70579915e228d5b6ee0
2015-07-25 11:39:20 -06:00
Ms2ger
7b2abc03ca servo: Merge #6715 - Implement more methods on LayoutJS (from Ms2ger:layoutelement); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f44d75e5b2e4229728d97b6a70de3babd3496eb1
2015-07-23 12:40:52 -06:00
Simon Sapin
7b6c4c937e servo: Merge #6700 - Update rust-selectors (from servo:selectors); r=Ms2ger
Update for https://github.com/servo/rust-selectors/pull/37

Source-Repo: https://github.com/servo/servo
Source-Revision: 5d857c5d0cac67337ea01895b7cf309359c89cce
2015-07-23 10:55:37 -06:00
Ms2ger
4014fa34d1 servo: Merge #6698 - Implement some methods on LayoutJS<Element> (from Ms2ger:layoutelement); r=jdm
Part of my long-term plan to stop exposing `unsafe_get()` outside the script crate.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37a1e22515e98fbda93d7e856c5a67b21d9b00a4
2015-07-22 21:10:04 -06:00
David Zbarsky
9ac5edf348 servo: Merge #6624 - Remove some more unnecessary let bindings (from dzbarsky:23338); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7de4ba0f826f8239d6ac540417028265e62085c5
2015-07-14 07:21:10 -06:00
Corey Farwell
a2a4f810b8 servo: Merge #6617 - Complete FIXMEs related to UFCS (from frewsxcv:fixme-ufcs); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a728712f9c9cbe667c1bca2465cefef6f6f657a
2015-07-14 01:30:12 -06:00
David Zbarsky
2f5b1d3dd7 servo: Merge #6561 - Implement Node#isDefaultNamespace and Node#lookupNamespaceURI (fixes #1826) (from dzbarsky:namespace); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 52e857dd7b9b083d691efab088aeba80888c61ff
2015-07-10 06:44:25 -06:00
Simon Sapin
8423111051 servo: Merge #6548 - Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03) (from servo:rustup_2015-07-03); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: f5f64dab749d0851ef82be3cdc7fb2bd1cb09956
2015-07-03 21:47:02 -06:00
David Winslow
b9c1f245a1 servo: Merge #6529 - Refactor #[jstraceable] to #[derive(JSTraceable)] (from dwins:master); r=Manishearth
fixes #6524.  I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.

Source-Repo: https://github.com/servo/servo
Source-Revision: bbb39082e0f640400546d2084a450a8675820a82
2015-07-01 18:27:40 -06:00
Matt Brubeck
3cc1840e9f servo: Merge #6528 - Reduce dependencies of the util crate (from mbrubeck:util_deps); r=Ms2ger
Because almost all our main crates depend on util, we should keep its dependencies minimal to increase parallelism and reduce the amount of stuff rebuilt when upstream crates are changed.

Source-Repo: https://github.com/servo/servo
Source-Revision: fc1e427ff9bb0e9891053ec1eba292530ebbe91a
2015-07-01 07:54:15 -06:00
Ms2ger
ab33a0f760 servo: Merge #6500 - Remove unused imports (from Ms2ger:warnings); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: dab4e73ee73a21e07ad73ec211b919a746a45624
2015-06-27 11:38:34 -06:00
Simon Sapin
112f9f7675 servo: Merge #6468 - Update rust-selectors (from servo:update-selectors); r=Ms2ger
r? @Ms2ger

https://github.com/servo/rust-selectors/pull/33

Source-Repo: https://github.com/servo/servo
Source-Revision: c331db1623719774c3ead554bcdca0b9c02d90fe
2015-06-26 14:50:01 -06:00
Maciej Skrzypkowski
c6d1841eec servo: Merge #6405 - Refactoring, return an Atom from Element::parsed_name. #5774 (from mskrzypkows:element_parsed_name_refactor); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e869e8ad08526bbbfffd390b52e423f58b8269f1
2015-06-23 03:17:46 -06:00
Simon Sapin
2e3cf397c7 servo: Merge #6427 - Update rust-selectors (from servo:selector-traits-refactor); r=Ms2ger
https://github.com/servo/rust-selectors/pull/30

r? @Ms2ger

This conflicts with the SpiderMonkey upgrade #6150. I’m happy to wait until that lands and rebase.

Source-Repo: https://github.com/servo/servo
Source-Revision: c119b59e82269a84925673236dd896101f27a6f3
2015-06-21 11:12:07 -06:00
Ms2ger
81faabdc8e servo: Merge #6437 - Implement AttrHelpersForLayout for LayoutJS<Attr> rather than Attr itself (from Ms2ger:AttrHelpersForLayout); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: bf64e2765aeb88611e781abeae4360f69a3a6caa
2015-06-21 08:31:04 -06:00
Michael Wu
7512d04e93 servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck
> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1

Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 16:46:55 -06:00
Manish Goregaokar
b6e7083252 servo: Merge #6377 - Upgrade to rustc 1.2.0-nightly (6e7fcc44a 2015-06-13) (from servo:rustup_20140614); r=SimonSapin
See #6376

r? @Ms2ger

Snaps don't exist yet, putting up the @larsbergstrom signal. The snap need not exactly match this commit, anything in the vicinity, or just master, should work really. (yay stability)


There's no particular reason behind this rustup except that I want to keep Servo running on almost-master as much as possible.

Source-Repo: https://github.com/servo/servo
Source-Revision: 67b121c0b82f4a2107d7b015f60bd025e04dc336
2015-06-15 10:33:14 -06:00
Corey Farwell
f95f1555cf servo: Merge #6317 - Remove fnv & smallvec crate reexports from util (from frewsxcv:rm-util-crate-reexports); r=Ms2ger
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.

These indirect dependencies through the util component are unnecessary.

This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.

Source-Repo: https://github.com/servo/servo
Source-Revision: 35000a9b854dc0989cc473aaec0ea8c082521c66
2015-06-10 08:23:11 -06:00
Ms2ger
199e8eedb1 servo: Merge #6318 - Optimize lookupPrefix (from Ms2ger:optimize-lookup-prefix); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 3ece6bc166c06b1b63f417742cb30dde0e34e63e
2015-06-10 04:30:38 -06:00
Anthony Ramine
9512a913c9 servo: Merge #6140 - Cleanup some gratuitous or inefficient uses of RootedVec (from nox:cleanup-rootedvec); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d0409b8421e1b0c055507acc7d784cac890f47e
2015-05-26 08:36:29 -05:00
Corey Farwell
333cc6c59d servo: Merge #6174 - Reduce max line length from 150 to 120 characters (from frewsxcv:cleanup-long-lines); r=SimonSapin
Part of https://github.com/servo/servo/issues/6041

Source-Repo: https://github.com/servo/servo
Source-Revision: 542519ebfd073662bc9421ac5fa0aa01ebc0d6fe
2015-05-24 18:27:26 -05:00
Peter
a1a04609a4 servo: Merge #5858 - fixes #5603, added support for tabindex field (from pgonda:tabindex-focus-flag); r=jdm
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet).  Also added tabindex logic into Element::is_focusable_area.

Source-Repo: https://github.com/servo/servo
Source-Revision: fada39164cbaba3a9885f08fad6f10a2353a4838
2015-05-20 14:34:31 -05:00
Patrick Walton
5f40a54beb servo: Merge #5577 - script: Implement the width and height attributes for iframes per HTML5 § 4.8.6 (from pcwalton:iframe-size-attributes); r=jdm
Improves Amazon and Ars Technica.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: ee147c164a8a13743dec2def60b13997145e7a55
2015-05-20 13:51:05 -05:00
Patrick Walton
0d3e12d7c8 servo: Merge #5989 - script: Implement the color attribute of the <font> element (from pcwalton:font-color); r=jdm
Improves Hacker News.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: ba340ec71bcfca8ab7b8ae04a22005e4fb860a23
2015-05-19 18:33:03 -05:00
Mukilan Thiyagarajan
4cca745e0f servo: Merge #6043 - Fix implementation of Element::get_root_element (from mukilan:get_root_element); r=Ms2ger
The [current implementation](http://mxr.mozilla.org/servo/source/components/script/dom/element.rs#666) is wrong as it always tries to cast the furthest ancestor into an element.
When the method is invoked on an element that is in the document tree, this will be the `Document` node, which is not an element. The ```last().map(ElementCast::to_temporary)``` returns Some(None) hence the method will return ```None```, while the correct behaviour is to return the ```html``` node.

This PR interprets the line ```"furthest ancestor element node of whatever node is being discussed"``` in the spec to mean ```"find the furthest ancestor that is an element node"```.

Source-Repo: https://github.com/servo/servo
Source-Revision: 65c30224a1d3ca81d0b8a8d46538af91f07dfebf
2015-05-15 03:35:37 -05:00
Ms2ger
5692e4cc20 servo: Merge #6019 - Move the presentational hint from table border to the new infrastructure (from Ms2ger:preshint-border); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 398e7f07fe0c5b0f0c9e8c05b8962011c83505d3
2015-05-12 14:47:49 -05:00
Ms2ger
b7578c38de servo: Merge #5988 - Move some presentational hints to the new infrastructure (from Ms2ger:preshints); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 8fa604be9dc85bfd41db7d574e236ab8b4e6d89a
2015-05-12 02:15:11 -05:00
Ms2ger
48d01c7d0c servo: Merge #6004 - Replace TElement::get_link() by specific methods (from Ms2ger:get_link); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: be8539af885b5d668222bbbdd677922eb75be65f
2015-05-11 06:46:17 -05:00
Ms2ger
e0fb53902c servo: Merge #5999 - Move get_attr and get_attrs into TElementAttributes (from Ms2ger:TElement); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: cf9338cb2eb1ff0c28e83d40e06b687828ab4c04
2015-05-10 11:26:25 -05:00
Anthony Ramine
49b74c261c servo: Merge #5923 - Improve support of limited unsigned long attributes (from nox:limited-unsigned-long); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 19744984da58feeeab64a98839ec2936fb8fb5a0
2015-05-06 14:22:45 -05:00
Anthony Ramine
8bcfe1b851 servo: Merge #5931 - Remove helpers that correspond to DOM methods (from nox:rm-helpers); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 16a7c792b564a6eab48391865a7060b8dba38284
2015-05-06 01:31:26 -05:00