Commit graph

867 commits

Author SHA1 Message Date
Guro Bokum
94e7f89524 Move body of ScriptTask::handle_mouse_move_event into a method on #5073 2015-02-28 12:26:46 +07:00
James Gilbertson
5f5d1246ef Implement Document.currentScript 2015-02-27 11:11:02 -07:00
Keith Yeung
d79e422a8f Moved dispatch_key_event method from script_task.rs to document.rs, fixes #4982 2015-02-26 19:14:17 +08:00
bors-servo
e68d6d2924 auto merge of #5004 : Ms2ger/servo/handle_click_event, r=jdm 2015-02-22 09:36:46 -07:00
Ms2ger
957c89b101 Reindent handle_click_event. 2015-02-22 17:22:11 +01:00
Tetsuharu OHZEKI
749ebbba71 Move DocumentProgressHandler to document.rs. 2015-02-22 00:29:05 +09:00
Keith Yeung
b855bc4716 Changed js_runtime to be of type *mut JSRuntime 2015-02-21 20:01:27 +08:00
Keith Yeung
e715f0958b Moved handle_click_event from script_task.rs to document.rs 2015-02-21 17:58:23 +08:00
Ms2ger
e921ce859e Fix some warnings in script. 2015-02-12 20:05:14 +01:00
bors-servo
5c02f8956d auto merge of #4845 : KiChjang/servo/location-in-doc, r=jdm
Fixes #4840
2015-02-05 11:54:48 -07:00
Keith Yeung
af4b371107 Moved Location object from Window to Document 2015-02-06 02:13:23 +08: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
03ec5a394c Add a spec link. 2015-02-04 13:37:01 +00:00
Josh Matthews
542e8d52d5 Reorganize document creation so it occurs after we have a final URL. 2015-02-04 13:37:01 +00:00
Josh Matthews
d2444dd370 Implement document.cookies. 2015-02-04 13:35:05 +00: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
Gilles Leblanc
a1804effaf Initialize trusted-ness of DOM events properly
Fixes #3740
2015-02-03 21:40:07 -05:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Tetsuharu OHZEKI
e2bd9eadd8 LayoutJS<T> implements Layout*Helpers instead of JS<T>. 2015-02-01 01:54:37 +09: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
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10: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
Matt McCoy
85df7f0d6f Fixes #4164 Make Constructor and new functions take GlobalRef by value 2015-01-07 18:52:41 -05:00
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