Commit graph

154 commits

Author SHA1 Message Date
Patrick Walton
971f77d2c6 layout: Stop going to the DOM for iframe sizes 2013-12-13 15:10:04 -08:00
Patrick Walton
21e8c72a75 constellation: Stop using futures for frame sizes.
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.
2013-12-13 10:43:27 -08:00
Ms2ger
9e2af4aae1 Mark some rust files as non-executable. 2013-12-13 18:34:57 +01:00
Keegan McAllister
0238410b47 Allow setting id, class, style without a full reflow
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.

Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.
2013-12-12 14:43:26 -08:00
Keegan McAllister
39fc9eb868 Get rid of reflow_all
This refactoring should not alter behavior.
2013-12-12 14:43:26 -08:00
Simon Sapin
b290823f4d Fix #1264: support namespaced attribute selectors. 2013-12-10 17:53:12 +00:00
Keegan McAllister
962984fb3b Reflow with full style damage when content changes
Fixes #664.
2013-12-09 12:34:33 -08:00
june0cho
266b551aa4 Implement local bookmark(hashtag) for Acid2. With @joonwonlee
Support hashtag through link (e.g. <a href="#top">)
2013-12-01 00:36:11 +09:00
Patrick Walton
155befe10d Rewrite flow construction to be incrementalizable and parallelizable.
This replaces flow construction with a strict bottom-up tree traversal,
allowing for parallelism. Each step of the traversal creates a flow or
a `ConstructionItem`, similar to how Gecko works. {ib} splits are
handled by not creating `InlineFlow`s until the containing block is
reached.

This should be able to be incrementalized by storing the `Flow` from
layout to layout, and performing fixups during flow construction
and/or wiping containing blocks in a previous pass.
2013-11-18 11:24:11 -08:00
Ms2ger
dc6dbc63af Make the HTML parser parse into the document rather than an element.
This removes the duplicate html element.
2013-11-17 13:58:24 +01:00
Ms2ger
d4a48995a2 Remove type_id arguments from Event::new and UIEvent::new. 2013-11-14 21:10:23 +01:00
Tetsuharu OHZEKI
f5ef4365f4 Stop passing DOMStrings via borrowed pointer. (#1201) 2013-11-14 20:35:36 +09:00
Ms2ger
08afc6d19d Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207. 2013-11-12 13:57:18 +01:00
Josh Matthews
3b3f891455 Add a spec-incompliant load event. 2013-11-11 16:50:58 +09:00
bors-servo
352acbb833 auto merge of #1163 : metajack/servo/kmc-rust-upgrade, r=kmcallister
Most work courtesy of @kmcallister.

I already reviewed Keegan's work, so just the last two commits need attention.
2013-10-31 16:34:14 -07:00
Keegan McAllister
cbcd04ffa8 Store the Page's final URL before parsing
We were parsing URLs like

    //bits.wikimedia.org/static-1.22wmf22/skins/vector/images/search-ltr.png?303-4

as local filenames because HTMLImageElement::update_image didn't have a
current_url to pass to make_url().
2013-10-31 14:58:55 -06:00
Keegan McAllister
e2b7885b73 fmt! -> format! 2013-10-31 14:58:55 -06:00
Josh Matthews
99a36cbeb6 Make Document a Node. 2013-10-31 13:34:44 -04:00
Patrick Walton
baba35adc9 Revert "Make Document a Node." for breaking Acid1
This reverts commit 4e47d59165.

Conflicts:

	src/components/script/dom/domparser.rs
2013-10-24 15:08:09 -07:00
Josh Matthews
4e47d59165 Make Document a Node. 2013-10-24 18:07:46 +02:00
Jack Moffitt
94202661c0 Update to latest Rust. 2013-10-21 17:38:34 -06:00
Ms2ger
b90766404c Replace Document::{with_base, with_mut_base} by Document::{document, mut_document}. 2013-10-21 17:57:44 +02:00
Keegan McAllister
1cd5d9179d Remove special-casing of URLs ending in ".js"
This was a very old (May 2012) testing feature which used
std::io::read_whole_file rather than our normal resource-loader mechanism.

We can implement javascript: URLs later.
2013-10-17 19:28:43 -07:00
bors-servo
ebe1c1353c auto merge of #1077 : kmcallister/servo/jsstr, r=jdm
This doesn't resolve the big questions of how Servo will represent strings; it's just about doing the conversion correctly for our existing types.
2013-10-17 16:34:30 -07:00
Keegan McAllister
279ae53b7b Pass scripts as ~str to support non-ASCII string literals etc.
Of course scripts on the Web are not always encoded as UTF-8 and we will have
to deal with that at some point.
2013-10-16 14:59:05 -07:00
Simon Sapin
62f1f03c16 Move Element::get_attr to a trait defined in util::tree
… and add a get_local_name() method to that trait.
2013-10-16 18:10:39 +01:00
Ms2ger
60b6d1bb57 Issue #1071 - Ensure that Documents always have a non-null Window. 2013-10-16 10:15:09 +02:00
Ms2ger
b6b2606c96 Make Document::root private, in preparation for removing it as part of making Document a Node. 2013-10-13 14:08:37 +02:00
Ms2ger
04319fdb68 Issue #888 - Node's owner document should never be None. 2013-10-10 10:57:38 +02:00
Bobby Holley
6bf740d967 Rename {get,set}_wrapper to {get,set}_jsobject. v1 2013-10-09 12:13:18 +02:00
Bobby Holley
62ddac8b6f Rename get_wrappercache() to reflector(). v1
I also updated some variable names in the codegen.
2013-10-09 12:11:25 +02:00
Bobby Holley
0a0599ad9b Rename CacheableWrapper to Reflectable. 2013-10-09 12:03:18 +02:00
Ms2ger
179582d939 Remove unnecessary mutability. 2013-10-06 09:15:38 +02:00
Ms2ger
c93d13b0da Don't require passing a root element to Document::new (needed for issue #888). 2013-10-05 21:42:13 +02:00
Josh Matthews
92f6599854 Wait for any layout tasks to complete in a page tree before a handling a pipeline's exit message. 2013-10-02 01:43:08 -04:00
Brian Anderson
38ea00074c Run script in its own thread to avoid starving other tasks 2013-10-01 15:43:45 -07:00
bors-servo
b7d186dec2 auto merge of #977 : kmcallister/servo/redirect, r=jdm 2013-09-24 12:45:44 -07:00
Tim Kuehn
103cd6255d split script_task::ExitMsg into WindowExitMsg and PipelineExitMsg 2013-09-24 00:15:35 -04:00
Tim Kuehn
99f125bb64 script task only exits when the root pipeline exits 2013-09-24 00:03:52 -04:00
Keegan McAllister
1c6de361b7 Handle HTTP 3xx redirects
Fixes #973.
2013-09-23 14:50:50 -07:00
Tim Kuehn
5f600f0ec0 fix constellation being inundated with messages from script.
script task sent RendererReadyMsg after every reflow.
now, the renderer sends RendererReady at the appropriate time,
and _only_ if it doesn't have paint permission.
2013-09-20 18:36:26 -04:00
Tim Kuehn
c804db0f93 deactive profiler when not in use; use newtype structs for task chans 2013-09-20 17:25:08 -04:00
Tim Kuehn
6c28b5cc9c use spawn_with in lieu of cells 2013-09-19 17:28:49 -04:00
James Graham
29a75daa66 Add support for clearTimeout. 2013-09-19 00:02:41 +01:00
Josh Matthews
d465abdb1c Make all DOM manipulation wait until it's safe to do so (ie. all reflows for the page have completed). Fix a race where a newly-initiated reflow would be considered complete when receiving the completion notice for the previous reflow. 2013-09-16 23:41:34 -04:00
Josh Matthews
21b0fc35b6 Allow image prefetching to occur during parsing when no window or document is present. Fixes #939. 2013-09-13 23:10:31 -07:00
Josh Matthews
7b239bd246 Move border computation into unpruned traversal. Get rid of extraneous explicit initial reflow. Fixes #935. 2013-09-13 16:40:13 -07:00
bors-servo
3c7a837ee6 auto merge of #927 : pcwalton/servo/image-src-set, r=pcwalton
r? @metajack
2013-09-12 18:24:50 -07:00
Patrick Walton
76d288fe62 script: Implement image source setting from script and write a demo for this. 2013-09-12 18:03:11 -07:00
bors-servo
4494935139 auto merge of #928 : kmcallister/servo/resize, r=pcwalton 2013-09-12 18:00:56 -07:00