Commit graph

93 commits

Author SHA1 Message Date
bors-servo
2e17cae5d0 auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger 2015-01-04 12:12:48 -07:00
Jim Hoskins
c10049327a Implement Document.defaultView - fixes #4518 2015-01-03 12:08:58 -05:00
Megha Gupta
f85b9e37cc Add HTMLElementTypeId enum (fixes #3625) 2015-01-02 23:10:31 +05:30
Ms2ger
ca9b5353d8 Remove unsound Root::deref() call in Document::set_quirks_mode. 2015-01-01 20:36:45 +01:00
Ms2ger
eb715a7bf8 Convince borrowck that Document::createNodeList is sound. 2015-01-01 20:36:44 +01:00
Ms2ger
e5ae267e80 Remove unsound Root::deref() call in Document::get_html_element. 2015-01-01 20:36:44 +01:00
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
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
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
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
17835ba0cb style: Implement quirks mode rules. 2014-12-15 17:41:51 -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
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
bors-servo
feabaf34ac auto merge of #4270 : ProgramFOX/servo/issue-4252, r=saneyuki
Resolves #4252
2014-12-08 13:28:12 -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
ProgramFOX
6104d5105f Implemented Document#inputEncoding
Resolves #4252
2014-12-08 18:22:29 +01:00
bors-servo
bdb3a2538b auto merge of #4257 : johnathan79717/servo/4008, r=jdm
This is a fix for issue #4008.
2014-12-08 01:55:08 -07:00
bors-servo
b805e74fef auto merge of #4265 : ProgramFOX/servo/issue-4251, r=Ms2ger
Resolves #4251
2014-12-06 07:31:01 -07:00
Manish Goregaokar
e7b3caa386 Add oninput/onchange so tests work 2014-12-05 18:49:34 -08:00
Jonathan Hao
ccb4e8b273 Implement the "messageevent" argument to Document#createEvent. #4008 2014-12-05 13:54:07 -08:00
ProgramFOX
e2e5536315 Use .clone() instead of.as_slice().to_string() 2014-12-05 21:12:20 +01:00
ProgramFOX
86282022bd Corrected case of Document#characterSet
Resolves #4251
2014-12-05 20:52:39 +01:00
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
Clark Gaebel
d3e4d29368 Fixed #4170 - Incremental reflow wasn't being aggressive enough when nodes get reparented.
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-03 11:17:38 -08: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