Commit graph

7010 commits

Author SHA1 Message Date
Mukilan Thiyagarajan
9bafd5f28a Update expectations for wpt tests under /XMLHttpRequest
Following tests are re-enabled:
* /XMLHttpRequest/send-network-error-async-events.sub.htm
* /XMLHttpRequest/send-network-error-sync-events.sub.htm
* /XMLHttpRequest/xmlhttprequest-timeout-worker-aborted.html
* /XMLHttpRequest/xmlhttprequest-timeout-worker-overrides.html
* /XMLHttpRequest/xmlhttprequest-timeout-worker-simple.html
* /XMLHttpRequest/xmlhttprequest-timeout-worker-twice.html

Following tests are disabled:
* /XMLHttpRequest/xmlhttprequest-timeout-worker-overridesexpires.html

The following tests are expected to timeout since window.postMessage is
not implemented yet:

* /XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html
* /XMLHttpRequest/xmlhttprequest-timeout-overrides.html
* /XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html
2014-11-04 08:20:46 +05:30
Mukilan Thiyagarajan
7435db26ac Fix race condition in XHR and handle other abort/open scenarios
This fixes issue #3630
A short summary of the changes:
* Use generation id to cancel inflight requests
* Handles nested calls to abort, open, send inside handlers
* Adds XHRReleaseMsg to delay freeing XHR object till all
  inflight events are processed
* Change the ErroredMsg enum to be more symmetric with the returned
  Error enum
2014-11-03 22:06:17 +05:30
bors-servo
1a3ff8739c auto merge of #3871 : Ms2ger/servo/node-cleanup, r=Ms2ger 2014-11-02 14:51:33 -07:00
bors-servo
9b2dae58fd auto merge of #3870 : mvanderh/servo/master, r=Ms2ger
Fixes #3855.

I'm not sure if this is the right place to set `cancelable`. If changing the default value in `Event::new_inherited` is not satisfactory, it will be possible to set the `Cell`'s value to `false` in `Event::new` itself.
2014-11-02 13:39:35 -07:00
Ms2ger
68f3daa7ef Simplify the implementation of NodeIterator::next_child. 2014-11-02 21:28:06 +01:00
Ms2ger
cb68fbd68e Simplify the implementation of NodeHelpers::child_elements. 2014-11-02 21:26:59 +01:00
Mitchell Van Der Hoeff
128f162b92 Remove ./dom/nodes/Document-createEvent.html.ini in tests/wpt/metadata because we expect all tests to pass now. Fixes #3855 2014-11-02 15:19:32 -05:00
Mitchell Van Der Hoeff
536201e2b5 Initialize 'cancelable' to false in Event::new_inherited. Fixes #3855. 2014-11-02 11:36:11 -05:00
bors-servo
035ff19e4a auto merge of #3860 : pcwalton/servo/reflow-out-of-flow, r=glennw
This is the last PR and most of the work for the maze solver and RoboHornet. 

r? @glennw 
cc @cgaebel
2014-10-31 14:39:34 -06:00
bors-servo
4418a28e7a auto merge of #3830 : pcwalton/servo/persistent-list-floats, r=kmcallister
r? @kmcallister
2014-10-31 14:00:39 -06:00
Patrick Walton
a208463b62 layout: Employ a persistent list data structure to avoid copying floats
all the time.

Improves performance on the maze solver significantly since this was
basically O(n^2) before.
2014-10-31 12:42:32 -07:00
Patrick Walton
c4c4988ee1 util: Add persistent lists as a useful general-purpose thread-safe data
structure.

This will be used to improve our storage management for float lists.
2014-10-31 12:42:32 -07:00
Patrick Walton
08fc7c2795 layout: Make incremental reflow more fine-grained by introducing "reflow
out-of-flow" and "reconstruct flow" damage bits.

This is needed for good performance on the maze solver.
2014-10-31 12:24:40 -07:00
Patrick Walton
7712052e13 test: Mark the inline element in inline_hypothetical_box_a.html as
`vertical-align: top`.

We actually don't support the other values correctly, and so this test
was relying on a bug in incremental reflow.
2014-10-31 12:24:40 -07:00
Patrick Walton
265763518f layout: Make absolute position calculation idempotent.
This will be necessary for incremental reflow of absolutely-positioned
flows.
2014-10-31 12:24:39 -07:00
bors-servo
72f6e14f0b auto merge of #3834 : pcwalton/servo/smallvec-debugging, r=pcwalton
r? @cgaebel
2014-10-31 11:48:36 -06:00
bors-servo
b116a6fce6 auto merge of #3833 : pcwalton/servo/display-list-debugging, r=mrobinson
r? @mrobinson
2014-10-31 11:15:38 -06:00
Patrick Walton
779ab4c5f0 gfx: Enhance display list debugging a bit with support for dumping
stacking levels, etc.
2014-10-31 10:13:08 -07:00
Patrick Walton
7321373d6b util: Add a Show implementation to SmallVec 2014-10-31 10:12:08 -07:00
bors-servo
20b2fae238 auto merge of #3864 : brunoabinader/servo/node-peekable-childelement, r=Ms2ger
This change avoid using ```child_elements().count() > 0``` approach (using ```child_elements().peek().is_some()``` instead).
2014-10-31 09:42:42 -06:00
Bruno de Oliveira Abinader
d5d4d0bec4 s/peek().is_some()/!is_empty()/ 2014-10-31 11:17:08 -04:00
Bruno de Oliveira Abinader
11d2251b1e ChildElementIterator is now peekable 2014-10-31 10:52:39 -04:00
Bruno de Oliveira Abinader
eb1ef59aee s/AbstractNodeChildrenIterator/NodeChildrenIterator/ 2014-10-31 10:52:02 -04:00
bors-servo
ba13e448cf auto merge of #3838 : pcwalton/servo/style-sharing-enhancements, r=SimonSapin
This helps avoid problems with style sharing in common cases, often
caused by the user agent stylesheet.

r? @SimonSapin
2014-10-30 16:33:36 -06:00
bors-servo
37bbe352a8 auto merge of #3861 : glennw/servo/update-azure, r=metajack 2014-10-30 15:57:38 -06:00
Glenn Watson
56a68f49b0 Update azure. This removes the final rust-opengles dependency. 2014-10-31 07:34:18 +10:00
bors-servo
4ce185ff11 auto merge of #3859 : brunoabinader/servo/element-notify-content-changed, r=Ms2ger
Remove ```notify_attribute_{changed,removed}``` in favor of a unified ```notify_content_changed```. In the future, whether we decide to specialize ```document.content_changed()```, it'll be just a matter of adding a param.
2014-10-30 15:18:36 -06:00
Bruno de Oliveira Abinader
5db3eb0cee Cleanup Element's AttributeHandlers
Remove notify_attribute_{changed,removed} in favor of a unified
notify_content_changed.
2014-10-30 17:14:25 -04:00
bors-servo
7de9ed5fc7 auto merge of #3856 : Ms2ger/servo/tagname, r=Manishearth
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.
2014-10-30 12:27:35 -06:00
bors-servo
2c68599373 auto merge of #3853 : Ms2ger/servo/create, r=Manishearth
This function is not particular to the parser, so should live in the DOM.
2014-10-30 11:06:36 -06:00
Ms2ger
82216fd5c0 Move build_element_from_tag out of the HTML parser.
This function is not particular to the parser, so should live in the DOM.
2014-10-30 18:03:19 +01:00
Ms2ger
671a487145 Format Element#tagName correctly when there's a prefix.
format!("{}", atom) yields strings like "Atom('span' type=Inline)", which is
not intended here.
2014-10-30 11:51:27 +01:00
bors-servo
f9b84fd870 auto merge of #3851 : glennw/servo/servo_gl, r=glennw,metajack 2014-10-29 23:33:35 -06:00
Glenn Watson
69c5bc8fca Update to use new GL bindings. 2014-10-30 15:31:10 +10:00
bors-servo
272ae0cc1b auto merge of #3721 : mbrubeck/servo/script-sync, r=Ms2ger
Fixes #3356.  This makes script elements fetch their source synchronously and execute immediately by default.  It also lays some groundwork for future deferred or async script loading.

(Depends on #3716 to fix a content test failure caused by running script during parsing.)
2014-10-29 15:51:41 -06:00
Matt Brubeck
b2c211ef86 Test for sync script loading 2014-10-29 14:31:47 -07:00
Matt Brubeck
598150ea78 Implement cloning steps for script element 2014-10-29 14:31:47 -07:00
Matt Brubeck
f39e01b336 Don't force reflow on content changes
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes #1269.
2014-10-29 14:31:47 -07:00
Matt Brubeck
fe123ad07c Switch to synchronous script loading
This removes the old code for asyncronously loading scripts during HTML
parsing and then executing them afterward.

Fixes #3356.
2014-10-29 14:31:47 -07:00
Matt Brubeck
65a0d1fe9a Infrastructure for synchronous script loading
This implements the parts of the "prepare a script element" algorithm that are
required for synchronous scripts.  It also adds some infrastructure for future
support of the `async` and `defer` attributes.
2014-10-29 14:30:42 -07:00
bors-servo
7c30a32081 auto merge of #3848 : Ms2ger/servo/indexed, r=mbrubeck 2014-10-29 15:15:43 -06:00
Ms2ger
8eeca573f7 Disable indexed-browsing-contexts-01.html for flakiness. 2014-10-29 21:43:44 +01:00
bors-servo
5858fccf87 auto merge of #3718 : juzer10/servo/master, r=jdm
We have created parser trait and declared parse_chunk function in this trait. We are yet to implement this parse_chunk for ServoHTMLParser struct.
2014-10-29 14:36:45 -06:00
bors-servo
fec3d53b1e auto merge of #3836 : cgaebel/servo/calculate-restyle-damage, r=pcwalton
...oops. Looks like I forgot to do this.

r? @pcwalton
2014-10-29 12:42:44 -06:00
Clark Gaebel
314a0d671e layout: Actually calculate restyle damage while styling.
...oops. Looks like I forgot to do this.

r? @pcwalton
2014-10-29 09:34:08 -07:00
nchinth
6a736c7f3c Adding initial version of parser trait
Added parse_chunk method declaration to parser

Removed unnecessary visibilty for parse_chunk function

Implemented parse_chunk function

Implemented parse_chunk fn for ServoHTMLParser

Moved parser trait to mod.rs and added finish fn

added licence header to mod.rs and other review comments

Fixed trailing space issue

Fixed failed tabular space test
2014-10-29 11:31:20 -04:00
bors-servo
b8de54bc63 auto merge of #3846 : glennw/servo/cgl, r=metajack 2014-10-29 09:24:40 -06:00
Glenn Watson
5e5f761c9a Update to use CGL crate for mac. 2014-10-29 15:56:51 +10:00
bors-servo
f632f64439 auto merge of #3845 : glennw/servo/update-layers-opengles, r=metajack 2014-10-28 23:12:40 -06:00
Glenn Watson
450b3a9771 Update layers, opengles to use the new glx bindings. 2014-10-29 14:57:08 +10:00