Commit Graph

766 Commits

Author SHA1 Message Date
Ms2ger
57cfac7019 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
Ms2ger
4470164bfa servo: Merge #3897 - Re-enable reflection-forms.html and make it not crash (from Ms2ger:enable-reflection); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: fba6cb9c429d5f27a1f7520bf2c35b58b0a8f250
2014-11-05 11:12:40 -07:00
Ms2ger
dbb17f483d servo: Merge #3896 - Defer to GetAttribute in HasAttribute (from Ms2ger:attr-crash); r=jdm
The semantics of has_attribute aren't anywhere close to the ones expected for
Element#hasAttribute, and it fails an assertion when passed non-lower-case
names.

Source-Repo: https://github.com/servo/servo
Source-Revision: b27ec2b2231313055232bf9a55343d581e6ead98
2014-11-05 10:36:38 -07:00
Patrick Walton
e4fe54ce48 servo: Merge #3761 - Invert control flow, fix resizing, and improve checkerboarding significantly (from pcwalton:smooth-scrolling); r=larsbergstrom
r? @glennw @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: ffae1104989c0177b483d591a482e5cd877183c2
2014-11-04 18:12:32 -07:00
Mukilan Thiyagarajan
990fd52b7f servo: Merge #3732 - Fix race condition in XHR and handle other abort/open scenarios (from mukilan:xhr-issue-3630); r=jdm
This fixes issue #3630
A short summary of the changes:
* Use atomic generation id to cancel inflight requests
* Handles nested calls to abort, open, send inside handlers
* Adds XHRReleaseMsg to delay freeing XHR object till all
  inflight events are processed
* Handles both timeout, errors and abort/open in a symmetric fashion
  i.e All inflight events will be cancelled for timeouts, aborts,
    errors and on calling open.
* Change the ErroredMsg enum to be more symmetric with the returned
  Error enum

I noticed a few possible changes that could make the code for fetch task simpler:
* We can remove the additional timer task and let the fetch task manage
  its own timer (or maybe the resource loader can do this.)
* The CORS related steps could also be moved into the resource loader.
* Right now upload events are not support. This requires some support
  from resource loader.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4e24e4d8e92528a5a6f7bb571c6557b5bca11ea9
2014-11-04 05:06:34 -07:00
Bruno de Oliveira Abinader
476ee671c8 servo: Merge #3881 - Various fixes to CodegenRust.py (from brunoabinader:dataset); r=jdm
Rust doesn't handle integers as bool on if statements, and defineProperty signature uses *mut instead of *const.

Source-Repo: https://github.com/servo/servo
Source-Revision: c4cfb4aae0491ca8016d3cbae9a39a6488b24739
2014-11-03 19:15:32 -07:00
Patrick Walton
24fdd1b7b3 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
30e2e70d2d 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
04264c40df servo: Merge #3863 - Cleanup the implementation of HTMLTableElement::GetCaption (from Ms2ger:cleanup-caption); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 169e6a2297b354dddcb4639ebd982ed11b484541
2014-11-03 11:27:38 -07:00
Ms2ger
e749abd213 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
Mitchell Van Der Hoeff
ce1d1edf43 servo: Merge #3870 - Initialize 'cancelable' to false in Event::new_inherited (from mvanderh:master); r=Ms2ger
Fixes #3855.

I'm not sure if this is the right place to set `cancelable`. If changing the default value in `Event::new_inherited` is not satisfactory, it will be possible to set the `Cell`'s value to `false` in `Event::new` itself.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b2dae58fd21d1abab825de299161a2b36106076
2014-11-02 13:39:35 -07:00
Bruno de Oliveira Abinader
6817925474 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
Bruno de Oliveira Abinader
6be0b23e4c servo: Merge #3859 - Cleanup Element's AttributeHandlers (from brunoabinader:element-notify-content-changed); r=Ms2ger
Remove ```notify_attribute_{changed,removed}``` in favor of a unified ```notify_content_changed```. In the future, whether we decide to specialize ```document.content_changed()```, it'll be just a matter of adding a param.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4ce185ff11e03c541587177d7e99c9d6bcf0eb82
2014-10-30 15:18:36 -06:00
Ms2ger
6d8d9ff82c servo: Merge #3856 - Format Element#tagName correctly when there's a prefix (from Ms2ger:tagname); r=Manishearth
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7de9ed5fc7a3061676d9fd02dfc788e196c7123c
2014-10-30 12:27:35 -06:00
Ms2ger
1668e628b1 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
471ff598d1 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
nchinth
7a8b55f3eb servo: Merge #3718 - M1452: Initial Step of Integrate an XML parser (from juzer10:master); r=jdm
We have created parser trait and declared parse_chunk function in this trait. We are yet to implement this parse_chunk for ServoHTMLParser struct.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5858fccf873ce30896def4f58aa8c67d1ddd09f1
2014-10-29 14:36:45 -06:00
Clark Gaebel
0e8072ce5b 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
Clark Gaebel
73be3aed6e servo: Merge #3827 - Run all task spawning through util, to allow for easy hooking (from cgaebel: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)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff06be91ebe770290ba912ee71a303810aa62cea
2014-10-28 11:24:43 -06:00
Mukilan Thiyagarajan
254f794623 servo: Merge #3812 - Implement [LenientThis] support and enable it in Document.webidl (from mukilan:lenient-this); r=Ms2ger
Closes issue #3760

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ba02bb11d2d9275949cb7522c5fcbc4ebcd23d1
2014-10-25 11:42:38 -06:00
Keegan McAllister
8321c9c421 servo: Merge #3797 - Debug-only dynamic checks for layout and GC use of DOMRefCell (from kmcallister:domrefcell); r=jdm
r? @mbrubeck, @jdm

Alternative to #3770 and #3716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0c12f630e6352fc2aa00b638d014b2505f68af1f
2014-10-24 18:09:27 -06:00
Ray Clanan
6becd6b208 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
84d93f4a37 servo: Merge #3791 - Really fix #3738 by only processing iframe src attributes during parsing (from jdm:moreiframe); r=Ms2ger
....

Source-Repo: https://github.com/servo/servo
Source-Revision: 39d5f09350e3ec251b9f16cb55a12febeeeda4f8
2014-10-23 18:00:36 -06:00
Ms2ger
37ff1c87ed servo: Merge #3780 - Cleanup Document (from Ms2ger:cleanup-document); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 43b13e7548f16c0c2721120ebabd89e88ecaf17d
2014-10-23 11:36:40 -06:00
Josh Matthews
fc0399b718 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
Tetsuharu OHZEKI
19bfe8ebf2 servo: Merge #3776 - Macroize event handler getters and setters (from saneyuki:macro); r=jdm
Fix #3755

This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).

Source-Repo: https://github.com/servo/servo
Source-Revision: 470d27a6681b4647de64c085654403820d48f7af
2014-10-22 22:30:29 -06:00
Edit Balint
e0046d6bcd 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
Bruno de Oliveira Abinader
8acaae1ca0 servo: Merge #3757 - Usage of JSRef<Attr> in before_remove_attr & after_set_attr (from brunoabinader:content_changed); r=jdm
```JSRef<Attr>``` does not require allocating a ```DOMString``` for value, which are unused in most cases. It also provides more access to ```Attr``` data.

Source-Repo: https://github.com/servo/servo
Source-Revision: 590a93120a26ab6ea787831d7ba08c47423148bc
2014-10-22 09:33:37 -06:00
Tetsuharu OHZEKI
9ee50fb2d1 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
2a3a6dbe81 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
Gilles Leblanc
8eb8e0ead3 servo: Merge #3720 - Edits dom/bindings/DESIGN.md (from gilles-leblanc:fix-grammatical-errors); r=jdm
This corrects and improves the dom/bindings/DESIGN.md document and also
corrects a grammatical error in a tests/reftest.rs message.

Source-Repo: https://github.com/servo/servo
Source-Revision: 65856dd00a7da07ece8d3e1e63bc495943266a24
2014-10-18 00:24:25 -06:00
Gilles Leblanc
282b3a0bbb servo: Merge #3710 - Make HTMLFormElementHelpers::submit take an enumerated argument instead (from gilles-leblanc:issue-3677); r=jdm
...of a boolean

Fixes #3677

Source-Repo: https://github.com/servo/servo
Source-Revision: de2178bbc073a930ab856b216be9444a02886d70
2014-10-16 19:45:22 -06:00
Keegan McAllister
a8be3c4e6b 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
2014-10-16 14:15:21 -06:00
Ms2ger
a3e10f96d9 servo: Merge #3699 - Move jsstring_to_str and jsid_to_str to conversions.rs (from Ms2ger:jsstring_to_str); r=jdm
This appears to be a more sensible location for them.

Relevant to #433.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5be4f40bef05c749bdb5353541abae21a826f6b6
2014-10-16 08:45:19 -06:00
Tetsuharu OHZEKI
c145110d75 servo: Merge #3695 - Use DOMRefCell in the rest of dom structs (from saneyuki:cell); r=jdm
#3050

Source-Repo: https://github.com/servo/servo
Source-Revision: 1de2fb3721b8a189156f4a860009cca01d8b2fd9
2014-10-16 00:03:18 -06:00
Manish Goregaokar
3bb2ca07b8 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
f497b6922c 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
Ehsan Akhgari
21cf951a82 servo: Merge #3693 - Throw DataCloneError from worker postMessage if structured clone fails (from ehsan:3248); r=jdm
This fixes #3248.

r? @jdm.  Please review for mistakes mercilessly!  Also, I got a host of test failures when running the worker tests, not sure if these tests are expected to pass locally or not.

Source-Repo: https://github.com/servo/servo
Source-Revision: a6001329b8186ca655d8c09c29e5167782ad43cb
2014-10-15 22:06:19 -06:00
Mukilan Thiyagarajan
ee3be6d1e6 servo: Merge #3662 - Implement timers (setTimeout/setInterval) for workers (from mukilan:worker_timer); r=jdm
Closes issue #3236

Source-Repo: https://github.com/servo/servo
Source-Revision: f94228d9f95327aac987103806b6ed452c96f16a
2014-10-15 20:48:22 -06:00
Ms2ger
eea039f813 servo: Merge #3691 - Remove obsolete comments about cycles (from Ms2ger:cycle-comments); r=jdm
The tracing setup has ensured that the cycles can be collected for a long time
now.

Source-Repo: https://github.com/servo/servo
Source-Revision: d54fb041ba80350d1ea0fb342d6edb273d30ccf3
2014-10-15 18:42:20 -06:00
Ms2ger
71e068b8fa servo: Merge #3685 - Remove the reflector field from Document (from Ms2ger:doc-reflector); r=jdm
This field became unused in commit 99a36cbeb6077976861d94b7af16e9e57994a14d.

Source-Repo: https://github.com/servo/servo
Source-Revision: 08b10a6d7de548304225a8a9c19e3280a8ecbfeb
2014-10-15 08:09:23 -06:00
Tetsuharu OHZEKI
171511657e servo: Merge #3574 - Introduce a custom DOMRefCell<T> (from saneyuki:cell); r=jdm
#3050

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c1054e6ab97dd199dee371c3b6ca5d559070804
2014-10-14 23:12:24 -06:00
Kasey Carrothers
1d2b9fbee6 servo: Merge #3655 - Add a to_js method to the casting trait code in CodegenRust.py (from kaseyc:add_to_js_method); r=jdm
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js/

Fixes #3616

Source-Repo: https://github.com/servo/servo
Source-Revision: f1c050531f3e3669275f1fc50d92724609eba59b
2014-10-14 22:00:28 -06:00
Clark Gaebel
be2f0cc040 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
07c968075f servo: Merge #3622 - layout: Introduce support for legacy presentational attributes to selector matching, and use it for <input size> and <td width> (from pcwalton:html4ever); r=jdm
This implements a general framework for legacy presentational attributes
to the DOM and style calculation, so that adding more of them later will
be straightforward.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0aeecfc41d5f0c637960fcddf87cc2db3e5efeea
2014-10-14 14:06:36 -06:00
Patrick Walton
9f1038ee7a 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
Manish Goregaokar
b5024832ed servo: Merge #3652 - Implement form submission for <input type=submit> (from Manishearth:form-button); r=jdm
Partially fixes #3647

Source-Repo: https://github.com/servo/servo
Source-Revision: d1685015559562a42cc440f4e3b7a97d38cc642c
2014-10-14 10:00:38 -06:00
Ms2ger
e139ba90a7 servo: Merge #3676 - Don't borrow CharacterData.data from layout (from Ms2ger:no-text-borrow); r=Manishearth
This should fix the most frequent intermittent wpt failure.

Source-Repo: https://github.com/servo/servo
Source-Revision: 083bf27b7536a8ae825ce87df4344f9e3cbc1a10
2014-10-14 03:36:36 -06:00
Tim Taubert
e87471af27 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
Tim Taubert
03e0ecf19a servo: Merge #3651 - Make Event::new take enumerated values instead of booleans (fixes #3643) (from ttaubert:issue/3643-event-new-enums); r=Manishearth
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 293e06fd7cf3c79e377fc1ce619ee790c46f9858
2014-10-13 19:12:38 -06:00