Commit graph

4860 commits

Author SHA1 Message Date
Ms2ger
765cea73d9 Implement iframe.contentWindow. 2014-05-14 17:58:40 +02:00
Ms2ger
85285113e4 Instate a pre-wrap hook that outerizes its argument, to satisfy an undocumented JSAPI requirement. 2014-05-14 17:39:13 +02:00
Ms2ger
8f63c9e1c8 Store the subpage id in the Page. 2014-05-14 17:23:18 +02:00
Simon Sapin
d3a53296cd Remove OptNewVector and use Vec instead.
Before we had Vec<T>, Option<~[T]> was used as an optimization of ~[T]
to avoid allocating for empty vectors when that was the common case.
Vec<T> itself does this optimization, so there is no need for this anymore.
2014-05-14 16:14:23 +01:00
bors-servo
b4bbf546f4 auto merge of #2429 : Ms2ger/servo/page-clone, r=jdm 2014-05-14 10:37:42 -04:00
bors-servo
2168956a59 auto merge of #2430 : Manishearth/servo/patch-2, r=SimonSapin
I noticed that our CONTRIBUTING file doesn't link to the easy bugs, maybe it should?
2014-05-14 08:22:17 -04:00
Manish Goregaokar
51ca04766f Add a link to easy bugs 2014-05-14 17:36:38 +05:30
Ms2ger
b77869bd9a Add a subpage_id field to NewLayoutInfo. 2014-05-14 12:50:26 +02:00
Ms2ger
69172a1ae5 Rename the pipeline ID fields in NewLayoutInfo.
This will make the distinction clearer with the subpage ID field to be added.
2014-05-14 12:44:59 +02:00
Ms2ger
52fbaf7e17 Pass a non-Option SubpageId to Pipeline::with_script.
The ScriptTask is only reused for subpages, so there's no reason to pass an
Option.
2014-05-14 12:37:35 +02:00
Ms2ger
44fb9eb28f Avoid unnecessary Rc clone in Window::new. 2014-05-14 12:26:24 +02:00
bors-servo
288550a2bf auto merge of #2428 : zwarich/servo/remove-add-html-element, r=jdm
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207.
2014-05-14 01:25:13 -04:00
bors-servo
049fa56fff auto merge of #2425 : saneyuki/servo/window_helper, r=jdm
Fix #2418
2014-05-14 00:55:17 -04:00
Cameron Zwarich
a44e9e8e6c Remove addHTMLElement from Bindings.conf.
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207.
2014-05-13 21:40:36 -07:00
bors-servo
48b1938ca3 auto merge of #2394 : Ms2ger/servo/instantiateJSToNativeConversionTemplate, r=jdm
This moves all the handling of optional arguments into `CGArgumentConverter`, and leaves `instantiateJSToNativeConversionTemplate` to only deal with the declaration of stack variables.
2014-05-14 00:25:17 -04:00
Tetsuharu OHZEKI
facffe0966 Move Window helper methods to a WindowHelpers trait 2014-05-14 13:14:29 +09:00
bors-servo
6871e4ccb6 auto merge of #2420 : Ms2ger/servo/merge-Page-PageTree, r=pcwalton 2014-05-13 23:52:21 -04:00
Bryan Bell
8162f61ba5 Add message to fonts.len() == 0 assert 2014-05-13 16:57:35 -07:00
bors-servo
6640f2edd8 auto merge of #2417 : Ms2ger/servo/scripttask-load-option-iter, r=pcwalton
...ad.
2014-05-13 17:43:47 -04:00
bors-servo
9fe115192a auto merge of #2389 : bjz/servo/indices, r=pcwalton
r? @pcwalton
2014-05-13 16:43:27 -04:00
Brendan Zabarauskas
2a7dd53021 Use fragment index type for referring to inline DOM fragments 2014-05-13 13:39:14 -07:00
Ms2ger
c437bacfc8 fixup! Use a match rather than a for loop for last_loaded_url in ScriptTask::load. 2014-05-13 19:52:25 +02:00
bors-servo
736098eeac auto merge of #2415 : Ms2ger/servo/find-all, r=jdm
...sg.
2014-05-13 13:49:31 -04:00
Ms2ger
1bf270d369 Merge Page and PageTree. 2014-05-13 18:27:24 +02:00
Ms2ger
1d464abb5a Use a match rather than a for loop for last_loaded_url in ScriptTask::load. 2014-05-13 15:48:32 +02:00
Ms2ger
dc1983adf7 Reuse Constellation::find_all in Constellation::handle_load_iframe_url_msg. 2014-05-13 13:03:41 +02:00
bors-servo
a9f08fd7c4 auto merge of #2414 : Ms2ger/servo/parser-attribute, r=SimonSapin 2014-05-13 06:55:19 -04:00
Ms2ger
cb9d875aef Handle all attributes coming from the HTML parser (fixes #1976). 2014-05-13 12:28:15 +02:00
Brendan Zabarauskas
b54059e6d2 Fix file mode for servo.rs
For some reason this was set to +x
2014-05-12 14:38:19 -07:00
Brendan Zabarauskas
1fc8302f5e Use box index type for referring to inline boxes 2014-05-12 14:37:04 -07:00
Brendan Zabarauskas
c1ec14bed2 Add some helpful comments 2014-05-12 14:23:54 -07:00
Brendan Zabarauskas
9dd533ce01 Add character index type
This is more self-documenting and may highlight errors in the future.
2014-05-12 14:21:42 -07:00
bors-servo
fbcfe78bf6 auto merge of #2388 : zwarich/servo/cssom, r=jdm
Implementing the CSSOM requires giving the script task access to the
computed style for a node. Moving it into a new SharedLayoutData struct
member of LayoutDataRef seems to be the best way to achieve this.

This is the first step towards #1721.
2014-05-12 16:46:10 -04:00
bors-servo
8d7883ff1c auto merge of #2410 : Ms2ger/servo/Pipeline-url, r=pcwalton
It is never mutated, and never None.
2014-05-12 16:13:18 -04:00
Ms2ger
f87f11ef48 Make Pipeline::url a plain Url.
It is never mutated, and never None.
2014-05-12 21:53:57 +02:00
bors-servo
1e361e8b6f auto merge of #2403 : Ms2ger/servo/iframe-loading, r=jdm
Right now, the load is kicked off inside the parser glue. This is unfortunate
for several reasons:

1) we'd like to replace the current parser (libhubbub) by our own parser,
   written in Rust, so code intertwined with the parser will have to be
   rewritten;
2) it is impossible to support dynamically (i.e. from script) created iframes
   in this way;
3) the code flow around loading subdocuments is complicated needlessly.

This commit adds the constellation channel (on which the message to actually
load the document is sent) as a field on the Page, to allow HTMLIFrameElement
to access it.

In rewriting the code, support for dynamically created iframes is added, and
a task failure is avoided when the value of the src attribute can not be
parsed.
2014-05-12 15:25:14 -04:00
Ms2ger
d095c42eaf Move the loading of documents in iframes into HTMLIFrameElement.
Right now, the load is kicked off inside the parser glue. This is unfortunate
for several reasons:

1) we'd like to replace the current parser (libhubbub) by our own parser,
   written in Rust, so code intertwined with the parser will have to be
   rewritten;
2) it is impossible to support dynamically (i.e. from script) created iframes
   in this way;
3) the code flow around loading subdocuments is complicated needlessly.

This commit adds the constellation channel (on which the message to actually
load the document is sent) as a field on the Page, to allow HTMLIFrameElement
to access it.

In rewriting the code, support for dynamically created iframes is added, and
a task failure is avoided when the value of the src attribute can not be
parsed.
2014-05-12 21:21:03 +02:00
Brendan Zabarauskas
9df9f07cfd Add some trailing commas 2014-05-12 12:03:59 -07:00
Brendan Zabarauskas
49df943649 Add RangeIndex trait and iterator
This will allow for the definition of typesafe range units in the future, for example for glyph indices. This also adds a macro that allows for the easy implementation of new range index types.
2014-05-12 11:57:29 -07:00
Brendan Zabarauskas
68f9aad883 Rename GlyphIndex->GlyphId
This will allow us to use the GlyphIndex identifier to refer to glyph indexes into text runs in the future.
2014-05-12 11:57:29 -07:00
bors-servo
3bb81310d4 auto merge of #2407 : Ms2ger/servo/try_parse_url-owned, r=jdm 2014-05-12 14:55:22 -04:00
bors-servo
c6274f9793 auto merge of #2406 : Ms2ger/servo/http_loader-load, r=jdm 2014-05-12 14:22:55 -04:00
bors-servo
1657a142cc auto merge of #2405 : Ms2ger/servo/active_timers, r=jdm 2014-05-12 13:52:43 -04:00
Ms2ger
85ce33916c Avoid unnecessary allocations in try_parse_url. 2014-05-12 17:18:28 +02:00
Ms2ger
098faef35b Stop using ~[u8] in http_loader::load. 2014-05-12 17:17:25 +02:00
Ms2ger
ab5bf80447 Drop the pointless indirection in Window::active_timers. 2014-05-12 17:15:35 +02:00
bors-servo
b036bee532 auto merge of #2401 : Ms2ger/servo/iframe-url, r=jdm 2014-05-12 09:37:09 -04:00
Ms2ger
8e9e930e3d Remove unused and misnamed url field on HTMLIFrameElement. 2014-05-11 20:37:55 +02:00
bors-servo
9a71af38b9 auto merge of #2393 : Ms2ger/servo/initialize_js_info, r=jdm
There is no particular leason to initilaize js_info lazily.
2014-05-10 12:25:09 -04:00
Ms2ger
30fcf7ed61 Remove the isOptional argument and the dealWithOptional return value from getJSToNativeConversionTemplate.
Note that dictionaries currently don't support members without default values
right now.

This commit does not change the generated code.
2014-05-10 11:00:01 +02:00