Commit graph

7284 commits

Author SHA1 Message Date
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
bors-servo
b68f72380b auto merge of #3842 : glennw/servo/update-azure, r=mbrubeck 2014-10-28 22:15:38 -06:00
bors-servo
9f248378f0 auto merge of #3843 : pcwalton/servo/flagify-display-and-position, r=glennw
These were showing up really high in the maze solver profile.

r? @glennw
2014-10-28 20:42:38 -06:00
Patrick Walton
587cf98209 layout: Promote absolute positioning, floatedness, and clearance into
flags to avoid virtual calls.

These were showing up really high in the maze solver profile.
2014-10-28 19:38:22 -07:00
bors-servo
c20bb66aef auto merge of #3841 : pcwalton/servo/removing-whitespace-damage, r=cgaebel
Avoids total reflow of the entire document on the maze solver.

I have tested Wikipedia reflow and it still works.

r? @cgaebel
2014-10-28 19:12:39 -06:00
bors-servo
08288fea41 auto merge of #3840 : pcwalton/servo/ib-splits-linked-list, r=glennw
r? @glennw
2014-10-28 18:36:41 -06:00
Glenn Watson
960d315f5e Update azure to remove glfw dependency. 2014-10-29 10:20:01 +10:00
bors-servo
651ef60b1c auto merge of #3839 : pcwalton/servo/fewer-moves-in-dls, r=glennw
These were showing up in the profile.

r? @glennw
2014-10-28 17:57:43 -06:00
bors-servo
4bdd9a5ec0 auto merge of #3837 : pcwalton/servo/layout-formatting-cleanups, r=metajack
These should have no effect on functionality.

r? @metajack
2014-10-28 17:21:48 -06:00
bors-servo
59fc795025 auto merge of #3829 : cgaebel/servo/fix-into_iter, r=pcwalton
into_iter used to use `inline_size` as the capacity insetad of the actual
capacity. This patch fixes that, adds some utility methods to `SmallVec`
to bring it closer in functionality to `Vec`, and removes the obsolete
`owns_managed` calls.
2014-10-28 16:36:47 -06:00
Patrick Walton
01965c399e layout: Stop adding damage when removing whitespace.
Avoids total reflow of the entire document on the maze solver.
2014-10-28 14:56:39 -07:00
Patrick Walton
16c0ebc14c layout: Put {ib} splits into a linked list so we stop copying them all
the time.
2014-10-28 14:39:45 -07:00
bors-servo
82f314d2c4 auto merge of #3708 : glennw/servo/thread_profiler, r=pcwalton
@pcwalton - I'm not sure if there's any gotchas or downsides to profiling using this technique to instrument the runtime. Happy to close this if it doesn't seem like a good idea to you. r?
2014-10-28 15:36:51 -06:00
Glenn Watson
90d793cdc8 Add task profiler, which works by instrumenting each task runtime when enabled. 2014-10-29 07:34:47 +10:00
Patrick Walton
93bf69a6fe layout: Use the new append_from method to get rid of a bunch of moves
in display list construction.

These were showing up in the profile.
2014-10-28 14:28:34 -07:00
Patrick Walton
4bf0acbe38 layout: Support more types of selectors for style sharing.
This helps avoid problems with style sharing in common cases, often
caused by the user agent stylesheet.
2014-10-28 14:12:50 -07:00
bors-servo
3aad350a64 auto merge of #3832 : pcwalton/servo/display-list-inline, r=mrobinson
r? @mrobinson (or whoever)
2014-10-28 14:27:54 -06:00
bors-servo
c109f6ff77 auto merge of #3831 : pcwalton/servo/append-from, r=mbrubeck
This is tracked upstream as Rust bug #18402.

r? @mbrubeck
2014-10-28 13:48:58 -06:00
bors-servo
2d8bd10abe auto merge of #3828 : cgaebel/servo/layout-node-dumping, r=pcwalton
r? @pcwalton
2014-10-28 13:12:52 -06:00
Clark Gaebel
d661ec8414 fix the build 2014-10-28 12:01:33 -07:00
Patrick Walton
68091d7a86 layout: Make some formatting cleanups.
These should have no effect on functionality.
2014-10-28 12:00:35 -07:00
bors-servo
5bd0a578fd auto merge of #3823 : glennw/servo/default-opts, r=mbrubeck
This is required for unit tests like the image cache task, which can pass through code paths that query the command line options.
2014-10-28 12:36:51 -06:00
Patrick Walton
a94e13f888 script: Use an FNV hash to hash event listeners.
The security properties of SipHash are irrelevant for event listeners
and the creation of the random number generator was showing up high in
the profiles.
2014-10-28 11:34:06 -07:00
Patrick Walton
8ab354ac08 script: Don't create a temporary vector on the heap when inserting
non-fragment nodes.
2014-10-28 11:18:43 -07:00
Patrick Walton
6a7a96a86c script: Don't dirty nodes that are already dirty. 2014-10-28 11:17:26 -07:00
Patrick Walton
e034c1cee2 script: Use String::new() instead of the formatting infrastructure
when constructing DOM unique IDs.

This was showing up in the RoboHornet profile.
2014-10-28 11:16:20 -07:00
Patrick Walton
6f577c7c84 script: Avoid a temporary when constructing <td> and <tr> elements.
Was a huge improvement to RoboHornet.
2014-10-28 11:14:06 -07:00
Patrick Walton
5e9127e2b2 script: Use a 16-element SmallVec for the root collection.
In my tests the size of the root collection never exceeded 7, so 16
seems like a nice conservative number.
2014-10-28 11:12:09 -07:00
bors-servo
3b6e035d0d auto merge of #3826 : cgaebel/servo/fix-resize, r=pcwalton
Currently, both restyle/flow construction _and_ reflow are skipped
during resize. Reflow should not be in that list. This patch fixes
that.
2014-10-28 12:00:51 -06:00
Patrick Walton
0758ca9a08 gfx: Inline a few commonly-used methods that were showing up in profiles 2014-10-28 10:55:19 -07:00
Patrick Walton
1a28960bd2 util: Add a method to push all elements from another doubly-linked list
without any moves.

This is tracked upstream as Rust bug #18402.
2014-10-28 10:47:04 -07:00
Clark Gaebel
fe36399628 use size hints 2014-10-28 10:36:41 -07:00
Clark Gaebel
e4d8741991 remove warning 2014-10-28 10:28:24 -07:00