Commit graph

67 commits

Author SHA1 Message Date
Ms2ger
c66cefa313 Use MutNullableJS::or_init in Document. 2014-12-04 15:50:13 +01:00
Ms2ger
9416e9b11a Cleanup Document::GetElementsByName. 2014-12-04 11:40:44 +01:00
Ms2ger
d22964792a Cleanup Document::SetBody. 2014-12-04 11:38:54 +01:00
Ms2ger
2ce4c6c529 Cleanup Document::GetDocumentElement. 2014-12-04 09:44:01 +01:00
Ms2ger
41395412eb Cleanup Document::GetDoctype. 2014-12-04 09:43:40 +01:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
Rohan Prinja
4b754bd457 implement Document#createAttribute 2014-11-23 14:51:04 +05:30
bors-servo
929671f945 auto merge of #4029 : znewman01/servo/issue4009, r=Ms2ger
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-18 07:15:34 -07:00
Zachary Newman
a8ce3e3366 Update behavior of Document.createElement
Fixes #4009.

Only lower-case the argument to Document#createElement if it's a HTML document.
2014-11-17 21:21:46 -05:00
Rohan Prinja
aad124fce3 key[board]event args for Document#createEvent 2014-11-17 09:37:05 +05:30
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Josh Matthews
84bc17e7ad Implement document focus context and hook it up to click events. 2014-11-13 11:27:15 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Ms2ger
f565e203e4 Remove the manual Element::new call from Document::CreateElementNS. 2014-11-05 23:22:47 +01:00
Ms2ger
82216fd5c0 Move build_element_from_tag out of the HTML parser.
This function is not particular to the parser, so should live in the DOM.
2014-10-30 18:03:19 +01:00
Matt Brubeck
fe123ad07c Switch to synchronous script loading
This removes the old code for asyncronously loading scripts during HTML
parsing and then executing them afterward.

Fixes #3356.
2014-10-29 14:31:47 -07:00
Ms2ger
903f3fa729 Cleanup Document::Title. 2014-10-23 18:21:33 +02:00
Ms2ger
fff0491c01 Move the methods on bare Document onto DocumentHelpers. 2014-10-23 18:21:02 +02:00
Ms2ger
d643ade7e8 Introduce LayoutDocumentHelpers::is_html_document_for_layout for LayoutElementHelpers::html_element_in_html_document_for_layout. 2014-10-23 18:20:11 +02:00
Ms2ger
32bcc192b0 Cleanup some Document methods. 2014-10-23 18:20:11 +02:00
Josh Matthews
539c21f380 Implement Document.readyState. Prevent iframes from notifying the compositor after the initial parse. Fixes #1720. Fixes #3738. 2014-10-23 10:55:59 -04:00
bors-servo
470d27a668 auto merge of #3776 : saneyuki/servo/macro, r=jdm
Fix #3755

This doesn't convert some specialized event handlers (e.g. `HTMLBodyElement`'s ones, `HTMLElement.GetOnload()`).
2014-10-22 22:30:29 -06:00
Tetsuharu OHZEKI
0a84c5d479 Macroize event handler getters and setters. 2014-10-23 13:03:58 +09:00
Edit Balint
daf9e59869 Make DOM getters that return &JS<T> return Temporary<T> instead #3707 2014-10-22 19:05:25 +02:00
Tetsuharu OHZEKI
ab2d3bc1bb Use DOMRefCell for Document. 2014-10-22 10:01:00 +09:00
Keegan McAllister
9da7679367 Use html5ever for HTML parsing 2014-10-16 13:06:34 -07:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Ms2ger
d9202f8169 Remove the reflector field from Document.
This field became unused in commit 99a36cbeb6.
2014-10-15 16:03:22 +02:00
Patrick Walton
ee2ccc4f87 script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
2014-10-14 10:32:40 -07:00
Tim Taubert
8825296869 Privatize Document 2014-10-13 13:25:43 +02:00
Tim Taubert
df60f8b2c5 Privatize EventTarget and EventListenerEntry 2014-10-13 13:25:43 +02:00
Tim Taubert
9a52bb8310 Privatize InheritTypes 2014-10-13 11:13:12 +02:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
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
2014-10-09 12:55:21 -04:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
bors-servo
a127fcd854 auto merge of #3577 : ttaubert/servo/issue/3193-named-element-mangle, r=jdm
Should probably use HashMap::entry() but that doesn't seem to be available with servo's current rust snapshot.

r? @Ms2ger
2014-10-08 13:15:32 -06:00
Gilles Leblanc
3a5a66d54e Take the prefix from createElementNS into account for HTML elements
Fixes #3139
2014-10-06 22:49:49 -04:00
Tim Taubert
a338fbc4b5 Use HashMap::find_with_or_insert_with in DocumentHelpers::register_named_element (fixes #3193) 2014-10-06 03:28:15 +02:00
Manish Goregaokar
4f362ab5e6 Remove Untraceable/Traceable from document.rs 2014-10-05 21:58:59 +05:30
Manish Goregaokar
4f574b4732 Remove Traceable from characterdata.rs 2014-10-05 21:33:43 +05:30
Andrew Guertin
815a701455 Replace Cell<Option<JS<T>>> with MutNullableJS<T>
https://github.com/servo/servo/issues/3564
2014-10-03 20:08:05 -04:00
Ms2ger
75ee535e3c Use or_else in Document.find_fragment_node. 2014-10-03 09:20:54 +02:00
Ms2ger
c96018152f Cleanup Document.find_fragment_node. 2014-10-02 19:54:12 +02:00
Ms2ger
5d335fd524 Move find_fragment_node to Document. 2014-10-02 12:04:05 +02:00
Josh Matthews
54fcab61d6 Implement MutNullableJS for mutable, nullable member pointers to DOM objects. 2014-10-01 17:06:23 +02:00
Keegan McAllister
d50114c41d Use string-cache's Namespace type 2014-09-29 21:40:54 -07:00
Keegan McAllister
6429750b33 Eliminate servo_util::atom
We only needed this for Encodable, and now we use JSTraceable instead.
2014-09-29 18:39:36 -07:00
Simon Sapin
b3245fa407 Upgrade to rustc d2b30f7d3 2014-09-23 2014-09-29 17:41:45 +01:00
bors-servo
c10948736f Merge pull request #3497 from zwarich/extended-deref
Add an extended_deref method to JSRef

Reviewed-by: Manishearth
2014-09-27 12:48:30 -06:00
Cameron Zwarich
bad7915914 Make the DocumentHelpers trait use extended_deref 2014-09-26 18:38:58 -07:00
ProgramFOX
71a05a9c39 Made some DOM fields private.
Relevant to #2242.
2014-09-26 20:35:01 +02:00