Commit graph

116 commits

Author SHA1 Message Date
Josh Matthews
eb2497dec7 servo: Merge #2200 - Make the I Tried star appear when a top-level page load fails for networ (from jdm:loadfail); r=mbrubeck
...k-related reasons.

Under the hood, this requires treating the I Tried pipeline as a new load instead of a replacement, since the failure-handling code interacts poorly with the rest of the replacement code when we get a series of staggered failures over time from the various pipeline components.

Source-Repo: https://github.com/servo/servo
Source-Revision: cc33a721ab3cf777becf51cddbfd8fe2c1eba568
2014-04-24 01:10:12 -04:00
Matt Brubeck
244491cd63 servo: Merge #2203 - Crash when navigating back with "RefCell is already borrowed" (from mbrubeck:back-crash); r=jdm
This fixes two `RefCell<T> is already borrowed` failures when reloading an
existing pipeline, both caused by functions trying to modify `Pipeline::url`
or `ScriptTask::url` while a reference to a previous borrow is still in scope.

Note: After applying this patch, there are some painting issues after navigating back.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7326df044c8f1badf8c37a16cdf31caf446b66df
2014-04-23 14:10:21 -04:00
lpy
8e35afc846 servo: Merge #2209 - Implement Element.localName.(fixes #2188) (from lpy:issue2188); r=Ms2ger
see #2188

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fc2c119103ce743bda53d1ef25c360bc6c713a7
2014-04-23 03:19:23 -04:00
Josh Matthews
adad662c76 servo: Merge #2111 - Add WindowProxy support and basic browsing context concept (from jdm:browsercontext); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bdcd8dd0c2fb9d94d3be60ebf525112417d17e51
2014-04-22 11:01:18 -04:00
Josh Matthews
da88337c6d servo: Merge #2202 - Ensure JS-owned memory is not leaked if a script task fails. Fixes #2201 (from jdm:scriptleak); r=Ms2ger
....

Source-Repo: https://github.com/servo/servo
Source-Revision: c6bdc7b7f2d39b522be5767f09f88b1b4ca5577a
2014-04-21 17:13:22 -04:00
Ms2ger
245ddf1be5 servo: Merge #2198 - Remove JSPageInfo::js_compartment (from Ms2ger:js_compartment); r=jdm
A js::rust::Compartment is little more than a glorified pointer to the
reflector of a window, so there's no good reason to use it. Instead, this
commit passes a JS<Window> directly when it's necessary.

This also means that we now have to use JS_DefineFunctions rather than
Compartment::define_functions; I believe the former is clearer to the reader
than the extra indirection involved in the latter calling through three
reopsitories.

This commit also simplifies ScriptTask::load to reuse the 'cx' local that is
in scope already, rather than refetching it through js_info.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77b5c1f4f63c59ee88ad26363420fef6e2468ce1
2014-04-21 09:40:27 -04:00
Josh Matthews
c0df29bf3a servo: Merge #2147 - Add transparent Traceable and Untraceable types to aid proper rooting pr (from jdm:untraceable); r=Ms2ger
...actices, and replace ad-hoc Untraceable structs with empty Encodable implementations.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0b1c8bf8d6a628c9483e94f048d1ff95e65d5da8
2014-04-17 18:04:10 -04:00
lpy
e0d65bced0 servo: Merge #2129 - Implement Window.set/clearInterval.(fixes #2116) (from lpy:issue2116); r=jdm
see #2116
I add an `is_interval` field, so that when the `TimerData` is passed by `SetInterval`, we will not delete it from `active_timers`.
Also I think maybe we can extract the code in `ClearTimeout` and `ClearInterval` into another method to avoid duplicate.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7441dae1aff4966e40ef3cf4129f307d23e2eeba
2014-04-17 13:34:09 -04:00
Josh Matthews
e6188ce3b2 servo: Merge #2076 - Make find_fragment_node a method of Page (from Ms2ger:find_fragment_node); r=Ms2ger
This was part of @jdm's vtable branch, but I think it makes sense regardless of how we deal with that branch.

Source-Repo: https://github.com/servo/servo
Source-Revision: 69fbbbdf339c370b2eeb87983b550b9055ee6f83
2014-04-09 09:28:19 -04:00
Ms2ger
e2ea16582e servo: Merge #2057 - Handle an exception from cx.evaluate_script more gracefully (from Ms2ger:evaluate_script); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3d1a4324b771db0a7babc5800c20f4bf520412ba
2014-04-07 11:19:26 -04:00
Ms2ger
5c93d47292 servo: Merge #2055 - Remove trailing whitespace (from Ms2ger:trws); r=jdm
Done with `git ls-tree --name-only -r HEAD . | grep "\.rs" | xargs sed -i 's/\s\+$//g'`

Source-Repo: https://github.com/servo/servo
Source-Revision: bf405ac81ff965c0370743185b9685b7a1de8c17
2014-04-07 10:52:26 -04:00
Josh Matthews
a3b4dbff7f servo: Merge #2041 - Upgrade rust (from servo:rustup_20140321b); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 83aabe327d3b713581a4183b7f23cea0c39a94c9
2014-04-04 18:52:50 -04:00
Simon Sapin
0297c25705 servo: Merge #1988 - Acid2 2 (from pcwalton:acid2-2); r=SimonSapin
r? @metajack @SimonSapin @larsbergstrom @june0cho @hyunjunekim

Source-Repo: https://github.com/servo/servo
Source-Revision: 3ec22157ca20227cd2d648744b6c711ed0ae8366
2014-04-03 21:01:48 -04:00
lpy
7c07adb1d9 servo: Merge #2022 - Get rid of match statements in Layout queries.(fixes #2019) (from lpy:issue2019); r=jdm
see #2019

Source-Repo: https://github.com/servo/servo
Source-Revision: e3bf08ea537366a1624a082999c3548fa07d4650
2014-04-01 15:31:50 -04:00
Martin Robinson
33cb8edba0 servo: Merge #2002 - Store Window.active_timers in a HashMap (from mrobinson:issue-1477); r=jdm
A HashMap allows easily looking up a timer and canceling it in
Window.ClearTimeout.

Fixes #1477.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3eac31394cb509ce7e4fa61a3543f6ec22c8bde4
2014-03-31 19:07:50 -04:00
Ms2ger
b0c7fbe938 servo: Merge #1913 - Move attributes-related functions onto JS<Element> (from Ms2ger:attributes); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 509ff7e52f6ea4f2f736d13f124c854d80c316c9
2014-03-20 14:46:34 -04:00
Tetsuharu OHZEKI
cb6991627c servo: Merge #1864 - Split TCast::to into TCast::to_unchecked and TCast::to (from saneyuki:split_cast_to); r=jdm
fix #1836

Source-Repo: https://github.com/servo/servo
Source-Revision: 831712206865e2c0516009b16e2ac60f754dd1a8
2014-03-20 10:58:36 -04:00
Lars Bergstrom
382dd8c9ba servo: Merge #1934 - Rust upgrade (from larsbergstrom:rust_20140224_squashed); r=jdm
For review only - don't approve yet (need to squash and land submodule updates first).

critic? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: f7aa6e3d9b8bfcc0565624f1094241b3b8658bd8
2014-03-19 12:35:17 -04:00
Ms2ger
0728d02843 servo: Merge #1868 - Use the improved JSVal interfaces (from Ms2ger:JSVal); r=jdm
Requires https://github.com/mozilla-servo/rust-mozjs/pull/54.

Source-Repo: https://github.com/servo/servo
Source-Revision: 654f3db29511d3b7b7a49a875b86a8538d111bcf
2014-03-10 10:22:51 -04:00
Ms2ger
8a6b3d8aae servo: Merge #1829 - Remove page_from_context (from Ms2ger:page_from_context); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b9b4eebab5664d026435d70bf3f2ac40c5b56826
2014-03-05 15:13:29 -05:00
Ms2ger
098edf1c89 servo: Merge #1811 - Cleanup the *Binding::Wrap functions (from Ms2ger:Wrap_); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: da6a571f9e147d884bf0fe0017204321f5d75f5d
2014-03-05 09:31:44 -05:00
lpy
c678726e97 servo: Merge #1802 - Remove next_subpage_id argument from parse_html.(fixes #1801) (from lpy:issue1801); r=kmcallister
see #1801

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a6077ca4cb6e2d54e2f558c18f45849c9d3c47d
2014-03-03 19:58:28 -05:00
Keegan McAllister
030c0fa802 servo: Merge #1800 - Fix a dynamic borrow failure with iframes (from kmcallister:subpage-id); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: a30041e9608b041dcf2a46f6b9f5e183817a55ae
2014-03-03 18:16:27 -05:00
Josh Matthews
1101a9f707 servo: Merge #1755 - De-@mut the script crate (from jdm:demut); r=jdm,metajack
Requires https://github.com/mozilla-servo/rust-mozjs/pull/49.

Source-Repo: https://github.com/servo/servo
Source-Revision: ea29e3a001fb70b5e94af7a676345b4046771315
2014-02-28 13:46:38 -05:00
Tetsuharu OHZEKI
a010046858 servo: Merge #1783 - Implement "resize" DOM Event (from saneyuki:resize); r=jdm
#1715

Source-Repo: https://github.com/servo/servo
Source-Revision: def5483579fad1e7f77ca96bd10fc5eb85e37740
2014-02-28 11:07:43 -05:00
lpy
042d6c49af servo: Merge #1776 - Add url getter to Page.(fixes #1762) (from lpy:issue1762); r=jdm
see #1762

Source-Repo: https://github.com/servo/servo
Source-Revision: 82b74a373a404c334ae711ec78dd4d06690f2cbb
2014-02-28 02:04:49 -05:00
Ms2ger
ea8e887ed8 servo: Merge #1751 - Handle removing the src attribute from an img element (from Ms2ger:image-loading); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e006c111f583bb327f9b83cedcbf7a7fbcc3123c
2014-02-25 13:49:34 -05:00
Ms2ger
63a5574635 servo: Merge #1739 - Merge HTMLDocument into Document (from Ms2ger:document-cleanup); r=jdm
The specs currently have only Document; this may well change, but the split won't be along the lines we've implemented right now. In the meantime, this simplifies our code quite a bit.

Source-Repo: https://github.com/servo/servo
Source-Revision: 22760b6665c75f6908bcfd7cad4de111187ac6f7
2014-02-24 17:13:46 -05:00
Josh Matthews
6ce95abf91 servo: Merge #1591 - Convert all DOM types from @mut to JSManaged (from jdm:jsmanaged); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: ffcf3b2905b7f9e886904015b1583e93f78f1199
2014-02-24 15:19:51 -05:00
Ms2ger
3f6bd354a8 servo: Merge #1703 - Various cleanup related to strings (from Ms2ger:strings-cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 41f55059a80156408368e375c2118066798958b9
2014-02-16 06:02:05 -05:00
Keegan McAllister
3a87a6327c servo: Merge #1691 - Restore failure handling (from kmcallister:linked-failure); r=pcwalton
We probably leak some threads and resources, e.g. when the script task crashes and doesn't get a chance to send layout data back to layout to be deallocated.

Not tested with iframes yet.

Source-Repo: https://github.com/servo/servo
Source-Revision: f1de0b738134f153a398866f76d1b5d0213d3c02
2014-02-13 18:08:07 -05:00
HyunJune Kim
4f88a0031b servo: Merge #1633 - Pseudo class hover (from parkjaeman:pseudo-class-hover); r=larsbergstrom
Fix #790 partially.
I am sure I need to merge with @jdm's event handler for dom.
As son as the event handler is implemented, I will fix.
And this is implement Hover Event. If over element, Currently Full reflow.
After PR, will make partial reflow.
Thank you!

Source-Repo: https://github.com/servo/servo
Source-Revision: ccfd595d6ebd0dcd7a81d1ef9fa05801cd955f8a
2014-02-09 21:35:09 -05:00
Tetsuharu OHZEKI
93bf096dc6 servo: Merge #1642 - Reduce copying on parse_url() call sites (from saneyuki:1535); r=SimonSapin
this will fix #1535

r?

Source-Repo: https://github.com/servo/servo
Source-Revision: aae5be557af75263b764f010857561059a57d38f
2014-02-08 15:10:43 -05:00
Simon Sapin
c43dc93fa3 servo: Merge #1608 - Rename make_url/current_url to parse_url/base_url (from SimonSapin:url); r=metajack
Align with spec terminology.

Source-Repo: https://github.com/servo/servo
Source-Revision: fe1bb6a325a750566afaa26158b8ad5ab6cec59a
2014-02-07 14:31:35 -05:00
Lars Bergstrom
77a80051d5 servo: Merge #1597 - Ensure ref tests wait to write their PNG until the page has fully loaded and reflowed (from larsbergstrom:add_page_loaded); r=pcwalton
Add a LoadComplete message so that script informs the constellation, which can then inform the compositor (and anyone else, later) about the completion of loading a page. This is important for ref tests, which should not emit a PNG until load has completed, even if we perform a composite before then.

Note that we must *also* wait for the `ready_state` to indicate that additionally layout has completed any associated reflow with the page, otherwise we could get the `LoadComplete` while the final reflow is still in progress and thus would write out the `n-1`'th reflow result.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: e9a0c8184f1af460583fe5ab2615e01d08ffc22f
2014-01-30 12:49:28 -08:00
Bruno de Oliveira Abinader
452407e34c servo: Merge #1583 - Implement document.URL & document.documentURI (from brunoabinader:document-url); r=Ms2ger
Specs:
http://dom.spec.whatwg.org/#dom-document-url
http://dom.spec.whatwg.org/#dom-document-documenturi

This is a sub-task for #1428.

Source-Repo: https://github.com/servo/servo
Source-Revision: 572959c3e6d233f470f7851b470bf3f73f8d4191
2014-01-30 08:58:40 -08:00
Simon Sapin
21cb888158 servo: Merge #1561 - Refactor namespaces (from SimonSapin:refactor-namespace); r=pcwalton
This builds on top of #1560 (… which I realize now may confuse Critic)

This refactors Namespace to reduce the overall amount of copying and conversion. In particular, it makes parsed selectors contain Namespace enums rather than strings.

Source-Repo: https://github.com/servo/servo
Source-Revision: edda06115ac61c691e7762bcdb3e70b48b1c65bc
2014-01-25 13:19:02 -08:00
Jack Moffitt
ca21b7bc1d servo: Merge #1533 - Change get_attr() to get_attr_val_for_layout() (from metajack:unsafe-get-attr); r=jdm
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.

Source-Repo: https://github.com/servo/servo
Source-Revision: d11e4318871e8ed237292985f30063f719bbfb0d
2014-01-22 16:28:20 -08:00
Lars Bergstrom
7611e8ef3f servo: Merge #1500 - Fix crashes and deadlocks when running the content tests (from larsbergstrom:content_fixup); r=metajack
r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b7425000b6b5df1e409699f8faead47eb9e41a8
2014-01-15 19:40:00 -08:00
Patrick Walton
0f1886c8bb servo: Merge #1490 - script: Stop trusting pointers to DOM nodes that layout provides (from pcwalton:distrust-layout-new); r=jdm
Pointers to DOM nodes from layout could go stale if incremental reflow
does not correctly destroy dead nodes. Therefore, we ask the JavaScript
garbage collector to verify that each DOM node is indeed a valid pointer
before calling event handlers on it, and fail otherwise.

Depends on the `get-addressable-gc-thing` branches of `mozjs` and `rust-mozjs`.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: c876335d227d4f826b5ece66fb388134cf29fce4
2014-01-14 22:06:56 -08:00
zmike
d37a94aca8 servo: Merge #1457 - add names for all servo spawned tasks (from zmike:master); r=jdm
this should resolve #1169

Source-Repo: https://github.com/servo/servo
Source-Revision: 563d6ef91a43a4ebefb87281db7e4813d2afcee6
2014-01-13 12:11:35 -08:00
Jack Moffitt
ab8faa4f7f servo: Merge #1473 - Upgrade to latest Rust (from metajack:rustup-20131219); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 943ab4a4f0e3074e78d96ad94b7e96a46edacf79

--HG--
rename : servo/src/components/main/layout/box.rs => servo/src/components/main/layout/box_.rs
2014-01-12 19:16:21 -08:00
Patrick Walton
f375bf9d80 servo: Merge #1409 - script: Don't do anything before the window size comes in (from pcwalton:fix-get-bounding-client-rect); r=jdm
This fixes the `getBoundingClientRect()` content test.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: de36f37ac76125be9b7bff02736d8f5c7b10e995
2014-01-07 19:46:25 -08:00
Ms2ger
91ea6c3e9f servo: Merge #1438 - Pass a Namespace to Element::{get_attribute,get_attr} (from Ms2ger:cleanup-get_attribute); r=jdm
Passing these around as strings is an anti-pattern, IMO.

Source-Repo: https://github.com/servo/servo
Source-Revision: cb336a18317195512a276971856081cb8ef86b0e
2013-12-23 10:49:05 -08:00
Patrick Walton
cf773ab0f2 servo: Merge #1424 - Harden layout (from pcwalton:harden-layout); r=pcwalton
This changeset gets rid of the `FooView` phantom type in favor of a more brute force approach that just whitelists methods that layout is allowed to call. The set is surprisingly small now that layout isn't going to the DOM for much.

If this approach turns out not to scale, we can do something fancier, but I'd rather just have it be safe and secure first and then refactor later for programmer happiness.

r? @kmcallister

Source-Repo: https://github.com/servo/servo
Source-Revision: 824c7ac613ebb80bb432ff6425c5e25c642b6afb
2013-12-17 18:16:05 -08:00
Patrick Walton
dace488433 servo: Merge #1422 - script: Make trees less generic (from pcwalton:less-generic-trees); r=metajack
r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: e4495453c8b06f31bdbb984e92a184eb2d67c3d6
2013-12-17 13:49:17 -08:00
Patrick Walton
f200e1c4f2 servo: Merge #1408 - layout: Stop going to the DOM for iframe sizes (from pcwalton:stop-going-to-dom-for-iframes); r=larsbergstrom
r? @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: a9980b992c47e6fcac1f6c4510e36a49aa22fbbd
2013-12-13 15:19:16 -08:00
Patrick Walton
b88eae4ace servo: Merge #1405 - constellation: Stop using futures for frame sizes (from pcwalton:defuture); r=larsbergstrom
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.

r? @kmcallister

Source-Repo: https://github.com/servo/servo
Source-Revision: aa1ebbbdb0243f098921103f02bb9b7dbcc40441
2013-12-13 11:28:10 -08:00
Ms2ger
220079de75 servo: Merge #1403 - Mark some rust files as non-executable (from Ms2ger:exec); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 499aa97fa4424cad9585e57987665542003e2597
2013-12-13 09:40:26 -08:00
Keegan McAllister
c31215880b servo: Merge #1394 - Restore restyle damage computation but disable reflow pruning for now (from kmcallister:style-damage); r=pcwalton
This fixes the computation of restyle damage on `color-change-text.html`, which can be seen with `RUST_LOG=servo::layout::layout_task`.

However we can't prune the layout traversals yet, because we don't reuse `Flow` objects between reflows, so we have no old values to fall back to.

I think this used to work because `FlowContexts` (as they were called then) were stored in a DOM node's `LayoutData` and reused.  But it's possible that it never really worked, and my testing when I landed the restyle damage code was insufficient (I didn't understand the layout code nearly as well back then).

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 144737ce1b582952a894f29e30e16134c73b2464
2013-12-12 15:17:27 -08:00