Commit graph

649 commits

Author SHA1 Message Date
Mátyás Mustoha
698b88f71d Canvas: added stroke() support. 2015-03-25 12:52:05 +01:00
Glenn Watson
a3b1fac503 Fixes #4964 and #4965. 2015-03-25 13:26:23 +10:00
Diego Marcos
e3f5a76baa Implementing canvas drawImage API for HTML Canvas elements as image source 2015-03-24 12:23:15 -07:00
Nicholas Nethercote
52447ccd9b Move profiler code from util into a new crate profile.
- Most of util::memory has been moved into profile::mem, though the
  `SizeOf` trait and related things remain in util::memory. The
  `SystemMemoryReporter` code is now in a submodule
  profile::mem::system_reporter.

- util::time has been moved entirely into profile::time.
2015-03-24 02:09:31 -07:00
Ms2ger
833e0a399b Remove the unneccesary thread being spawned in Browser::new. 2015-03-21 23:28:33 +01:00
Ms2ger
561f7e594e Update rust-png. 2015-03-21 14:31:14 +01:00
bors-servo
aa6ed369b8 auto merge of #5261 : pcwalton/servo/too-many-reflows, r=pcwalton,metajack
These help Facebook Timeline a lot.

r? @metajack
2015-03-20 11:51:47 -06:00
Patrick Walton
fda3791487 util: Turn on ndebug in release mode, and fix task-state to not crash
when `ndebug` is on.
2015-03-20 10:09:52 -07:00
Ms2ger
1604515fd9 Fix various build warnings. 2015-03-20 17:57:49 +01:00
Ms2ger
acafcacfdc Stop using CString::from_slice in redirect_output.
It will panic if there are any null bytes in read_buffer, but fgets
guarantees that there is a null-terminator.
2015-03-20 15:49:57 +01:00
bors-servo
dea36f9816 auto merge of #4891 : mmatyas/servo/canvas_gradient, r=jdm
Based on [ebalint](https://github.com/ebalint)'s original patch, this commit implements the linear and radial gradients for the canvas. The PR also includes test cases.
Depends on #4623 and servo/rust-azure#136.
2015-03-20 03:12:47 -06:00
Matt Brubeck
970f275b94 Use the same version of rand everywhere 2015-03-19 16:32:38 -07:00
Mátyás Mustoha
d3199aef74 Implement gradient fill styles for canvas. 2015-03-19 15:59:08 +01:00
Jack Moffitt
f02c5500a3 Switch from poll_events to wait_events.
This fixes 100% CPU usage during idle.
2015-03-19 08:15:41 -06:00
Adenilson Cavalcanti
375dbeff1e Squashing a few warnings. 2015-03-18 16:26:16 -07:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Nicholas Nethercote
ece2711185 Add memory reporting infrastructure and use it to measure the display list.
This changeset implements the beginnings of fine-grained measurement of
Servo's data structures.

- It adds a new `SizeOf` trait, which is used to measure the memory used
  by heap data structures, and implements it for some std types: Box,
  String, Option, Arc, Vec, and DList.

- It adds a new `MemoryReporter` trait which is used to report memory
  measurements from other threads to the memory profiler. Reporters are
  registered and unregistered with the memory profiler, and the memory
  profiler makes measurement requests of reporters when necessary.

- It plumbs a MemoryProfilerChan through to the layout task so it can
  register a memory reporter.

- It implements the `SizeOf` trait for `DisplayList` and associated
  types, and adds a memory reporter that uses it.

The display list hits 14.77 MiB when viewing
tests/html/perf-rainbow.html, and 2.51 MiB when viewing the Guardians of
the Galaxy Wikipedia page from servo-static-suite. Example output:

  0.29: display-list::http://www.reddit.com/
  0.00: display-list::http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&bust2#http://www.reddit.com
  0.00: display-list::http://www.reddit.com/static/createadframe.html

There are a number of FIXME comments indicating sub-optimal things. This
is a big enough change for now that doing them as follow-ups seems best.
2015-03-16 18:12:26 -07:00
Patrick Walton
586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Jack Moffitt
43c82b9076 Fix scrolling on OS X.
This just requires updating glutin and cocoa to pick up some backported fixes.
2015-03-06 16:37:29 -07:00
Gilles Leblanc
0faa55d2ce Add more robust hostsfile parsing
Adds hostsfile parsing support for:
* Tabs
* Comments (line and end of line)
* IPv4 address validation
* Basic IPv6 address validation
* End of line whitespaces
* Host name alias (multiple host names per address)

Fixes #5063
2015-03-05 20:33:33 -05:00
Josh Matthews
6351fc75fd Only store the url inside a pipeline instead of the rest of the LoadData. 2015-03-03 16:25:40 -05:00
Patrick Walton
09358b908d layout: Implement text-shadow per CSS-TEXT-DECORATION-3 § 4. 2015-03-02 13:28:51 -08:00
Ankit Agrawal
c8de895094 Add profiling to image decoding.
This extracts some independently useful parts of
<https://github.com/servo/servo/pull/4215>.
2015-02-28 18:35:48 +01:00
Jack Moffitt
521f60ec0d Update to latest Cocoa.
This fixes Servo in release mode on OS X.
2015-02-26 08:19:48 -07:00
Jack Moffitt
038787a335 Change Servo release builds to include debugging.
This makes basic symbols available in release builds.
2015-02-25 10:19:46 -07:00
Nicholas Nethercote
34a384241a Report detailed RSS measurements from /proc/<pid>/smaps on Linux.
All anonymous segments are aggregated into a single measurement, as are
all segments smaller than 512 KiB.

Example output:

      142.89: resident-according-to-smaps
       97.84: - anonymous (rw-p)
       23.98: - /home/njn/moz/servo/components/servo/target/servo (r-xp)
        6.58: - [heap] (rw-p)
        5.36: - other
        3.51: - /usr/lib/x86_64-linux-gnu/dri/i965_dri.so (r-xp)
        1.33: - /lib/x86_64-linux-gnu/libc-2.19.so (r-xp)
        0.93: - /home/njn/moz/servo/components/servo/target/servo (r--p)
        0.76: - /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 (r-xp)
        0.74: - /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (r-xp)
        0.50: - /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (r-xp)
        0.50: - /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1 (r-xp)
        0.45: - /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 (r-xp)
        0.43: - /lib/x86_64-linux-gnu/libm-2.19.so (r-xp)
2015-02-23 15:20:32 -08:00
Simon Sapin
2a50755c8a Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
Patrick Walton
55a0ee6ec7 script: Implement enough 2D canvas support to render basic SVGs such as the tiger. 2015-02-22 22:29:58 -05:00
yodalee
1ae28814cb update mozjs-sys to newest 2015-02-22 00:53:28 +08:00
bors-servo
bc5eeb00a1 auto merge of #5000 : Ms2ger/servo/libc-gfx, r=jdm 2015-02-21 06:51:50 -07:00
Ms2ger
e072e5946e Move gfx to libc from crates.io. 2015-02-21 10:53:00 +01:00
yodalee
9e03029b49 update mozjs and rust-mozjs to newest
All Typedarray supported
2015-02-21 17:44:07 +08:00
bors-servo
d326e75c5e auto merge of #4991 : Manishearth/servo/gonkup, r=larsbergstrom
r? @larsbergstrom

cc @mwu
2015-02-20 22:27:49 -07:00
Manish Goregaokar
46824616d2 Make gonk compile again 2015-02-21 09:42:45 +05:30
bors-servo
991b479531 auto merge of #4977 : andreasgal/servo/master, r=jdm
The new interface will be added by https://github.com/ser...vo/rust-azure/pull/145 (has to be merged first).
2015-02-20 21:00:55 -07:00
Ms2ger
895d1ec10a Move compositing to libc from crates.io. 2015-02-21 00:24:58 +01:00
Andreas Gal
ad5671bc14 Use cleaner StrokeOptions interface introduced by https://github.com/servo/rust-azure/pull/145. 2015-02-20 14:56:23 -08:00
Ms2ger
125df55222 Move util to libc from crates.io. 2015-02-20 08:58:23 +01:00
Ms2ger
b6483c96be Move layout to libc from crates.io. 2015-02-19 21:38:25 +01:00
Ms2ger
63f606306d Move js to libc from crates.io. 2015-02-19 17:42:14 +01:00
Glenn Watson
b7894248cf Update rust-cocoa to get fix for setting window title. 2015-02-19 07:14:54 +10:00
Ms2ger
aaed4a54c7 Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
Manish Goregaokar
d13328fa80 Fix cocoa dep on libc 2015-02-17 12:10:45 +05:30
Manish Goregaokar
70d1c6e012 Update to latest glutin 2015-02-17 11:25:57 +05:30
Glenn Watson
7aacf90161 Fixes background-color calculation for iframes. Fixes #1248 2015-02-16 08:16:18 +10:00
Adenilson Cavalcanti
ffa62c9688 Companion single Color patch.
This will also update the rust-azure dependency
to point to the hash where we have a single Color type.

Just executed ref-tests and no regressions found.
2015-02-13 14:49:28 -08:00
Ms2ger
31f6595981 Fix some warnings in servo/lib.rs. 2015-02-12 18:39:26 +01:00
Ms2ger
7896679afe Fix some warnings in servo/main.rs. 2015-02-12 18:39:22 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00