aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-10-11 07:45:39 -0600
committerbors-servo <metajack+bors@gmail.com>2014-10-11 07:45:39 -0600
commit9dfd5e7fcd2011a411b219e8c45aadc0ecb270bd (patch)
tree766433d45e69aa6d8abfdbd447d59bcda43461e5 /components/script/script_task.rs
parente048f3f940e124d45b43a53a850177c45907822d (diff)
parentca2d5d328d18878e369dd010236754ae207dab7d (diff)
downloadservo-9dfd5e7fcd2011a411b219e8c45aadc0ecb270bd.tar.gz
servo-9dfd5e7fcd2011a411b219e8c45aadc0ecb270bd.zip
auto merge of #3642 : Manishearth/servo/form-submit, r=jdm
This is missing a lot of parts, so it doesn't really make any real-world form submission work yet. It provides a skeleton on which the missing bits can be filled in. What works: - `<input>` elements except for `type=file` - GET/POST methods - URLencoded `enctype`s (default) - Submission via `<form>.submit()` only Stuff that needs to be done for most simple real-world cases to work: - [Working text input](https://github.com/servo/servo/pull/3585) - Click handlers for `<submit>` - Possibly `<textarea>` support - Support for the other two enctypes (#3649) Todo: - Correctly implement [planned navigation](https://html.spec.whatwg.org/multipage/forms.html#planned-navigation) using `TrustedFormAddress` (#3648) - [Correctly implement form owners.](https://github.com/servo/servo/issues/3553) Requires html5ever and some discussion of the spec. - `<input type=file>` support - Image submit support - Browsing contexts/targets - Support for non-`<input>` controls - Validation (?) - Dirname (?)
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 29e1fec40ba..e62c818943c 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -81,7 +81,7 @@ pub enum ScriptMsg {
TriggerFragmentMsg(PipelineId, Url),
/// Begins a content-initiated load on the specified pipeline (only
/// dispatched to ScriptTask).
- TriggerLoadMsg(PipelineId, Url),
+ TriggerLoadMsg(PipelineId, LoadData),
/// Instructs the script task to send a navigate message to
/// the constellation (only dispatched to ScriptTask).
NavigateMsg(NavigationDirection),
@@ -494,7 +494,7 @@ impl ScriptTask {
// TODO(tkuehn) need to handle auxiliary layouts for iframes
FromConstellation(AttachLayoutMsg(_)) => fail!("should have handled AttachLayoutMsg already"),
FromConstellation(LoadMsg(id, load_data)) => self.load(id, load_data),
- FromScript(TriggerLoadMsg(id, url)) => self.trigger_load(id, url),
+ FromScript(TriggerLoadMsg(id, load_data)) => self.trigger_load(id, load_data),
FromScript(TriggerFragmentMsg(id, url)) => self.trigger_fragment(id, url),
FromConstellation(SendEventMsg(id, event)) => self.handle_event(id, event),
FromScript(FireTimerMsg(id, timer_id)) => self.handle_fire_timer_msg(id, timer_id),
@@ -1067,9 +1067,9 @@ impl ScriptTask {
/// The entry point for content to notify that a new load has been requested
/// for the given pipeline.
- fn trigger_load(&self, pipeline_id: PipelineId, url: Url) {
+ fn trigger_load(&self, pipeline_id: PipelineId, load_data: LoadData) {
let ConstellationChan(ref const_chan) = self.constellation_chan;
- const_chan.send(LoadUrlMsg(pipeline_id, LoadData::new(url)));
+ const_chan.send(LoadUrlMsg(pipeline_id, load_data));
}
/// The entry point for content to notify that a fragment url has been requested