Commit graph

5232 commits

Author SHA1 Message Date
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
Ms2ger
6ed924f515 Remove the argcAndIndex argument from instantiateJSToNativeConversionTemplate.
This commit does not change the generated code.
2014-05-10 10:50:10 +02:00
Ms2ger
4b1b19fd11 Remove ScriptTask::initialize_js_info.
There is no particular leason to initilaize js_info lazily.
2014-05-10 09:37:24 +02:00
bors-servo
5334d8bb25 auto merge of #2384 : saneyuki/servo/2383, r=Ms2ger
Fix #2383

These changes introduce `FooEvent::new_uninitialized()` constructor. This constructor use to create `FooEvent` without calling `FooEvent::InitFooEvent`.

#2383 says integrating `FooEvent::new()` and `InitFooEvent`, but we need to preserve simple `FooEvent::new_uninitialized()` for `document.createEvent()`.

@jdm r?
2014-05-10 03:01:13 -04:00
Tetsuharu OHZEKI
5f8f551c95 Add MouseEvent::new_uninitialized(). 2014-05-10 13:56:46 +09:00
Tetsuharu OHZEKI
ac288f6657 Add UIEvent::new_uninitialized(). 2014-05-10 13:55:19 +09:00
bors-servo
d985b6d7c2 auto merge of #2390 : Ms2ger/servo/1990-Page-RefCell, r=jdm 2014-05-09 18:01:16 -04:00
Guro Bokum
04c807dd53 Convert as many of Page's RefCell fields to Cell as possible (fixes #1990). 2014-05-09 23:52:06 +02:00
bors-servo
eb67f69b2d auto merge of #2387 : glennw/servo/image-fixups, r=Ms2ger 2014-05-09 16:31:24 -04:00
Cameron Zwarich
0e67202bc2 Move the computed style to a new SharedLayoutData struct.
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-09 13:22:50 -07:00
Glenn Watson
45930b36ae Remove unneeded code now that image libraries use Vec<T>. 2014-05-10 06:15:56 +10:00
bors-servo
1477652295 auto merge of #2357 : Manishearth/servo/xhr-syncget, r=ms2ger
This gets a basic synchronous GET request working. I've also tried to implement a portion of the procedures mentioned in the spec.


Blocks #2282
2014-05-09 11:34:07 -04:00
Manish Goregaokar
b40d8b4d53 Basic synchronous GET with XHR 2014-05-09 20:39:54 +05:30
bors-servo
78917f4e0f auto merge of #2381 : Ms2ger/servo/mozjs-spring-cleanup, r=jdm
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.

The assert() function is no longer exposed, as it was unused and not very
useful.
2014-05-09 10:28:10 -04:00
bors-servo
9bca8a706e auto merge of #2345 : SimonSapin/servo/reverse-declarations, r=pcwalton
… and deal with properties whose initial value can be affected at computed-value time.

r? @pcwalton
2014-05-09 09:40:15 -04:00
Ms2ger
30055d9820 Move debug functions to Window IDL.
This is a cleaner way to expose those functions, and makes it possible to
remove a significant amount code in rust-mozjs.

The assert() function is no longer exposed, as it was unused and not very
useful.
2014-05-09 14:44:07 +02:00
bors-servo
146eccdf80 auto merge of #2378 : glennw/servo/png-update, r=larsbergstrom
... submodule pointers.
2014-05-09 08:37:10 -04:00
bors-servo
052d3cb083 auto merge of #2377 : aydinkim/servo/hidpi, r=larsbergstrom
Fix for android rendering.
Need to consider about getting accurate size framebuffer & window parameter respectively from android stack and follow up the stuffs on another platform.
2014-05-08 23:31:15 -04:00
Glenn Watson
366162e633 Change image library use of ~[T] -> Vec[T]. Update rust-stb and rust-png submodule pointers. 2014-05-09 13:29:48 +10:00
bors-servo
4fb36cd0be auto merge of #2376 : aydinkim/servo/readme, r=larsbergstrom
Android build guide in README.md is out-dated.
2014-05-08 22:55:10 -04:00
aydin.kim
cfc42bfee3 update android guide in README.md 2014-05-09 11:43:30 +09:00
aydin.kim
6d18ca45b1 fix hidpi parameter of android 2014-05-09 11:13:44 +09:00
bors-servo
78a768ae5c auto merge of #2372 : mrobinson/servo/issue-1596, r=metajack
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 20:16:21 -04:00
Martin Robinson
300004f3e9 Use == instead of match for tests against a single enum value
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 17:11:00 -07:00
bors-servo
a28665d3fd auto merge of #2375 : zwarich/servo/progressevent-rename, r=metajack 2014-05-08 19:40:16 -04:00
Cameron Zwarich
d56a308524 Rename an unused parameter to silence a warning. 2014-05-08 16:31:14 -07:00
bors-servo
6d381959db auto merge of #2373 : zwarich/servo/remove-default-visibility, r=Ms2ger
The defaultVisibility field was cloned from the C++ implementation,
where it tracks the difference between struct and class visibility.
Since no similar concept exists in Rust, it should be removed.
2014-05-08 17:46:15 -04:00
Cameron Zwarich
20fa4d7e11 Remove an unused field from CodegenRust.py.
The defaultVisibility field was cloned from the C++ implementation,
where it tracks the difference between struct and class visibility.
Since no similar concept exists in Rust, it should be removed.
2014-05-08 13:59:53 -07:00
bors-servo
f94ad73396 auto merge of #2371 : zwarich/servo/start-dead-code, r=metajack 2014-05-08 15:01:30 -04:00