Commit graph

426 commits

Author SHA1 Message Date
bors-servo
254f2a3b5f Auto merge of #5599 - servo:textdecoder, r=jdm 2015-04-08 20:00:40 -05:00
bors-servo
37b6738884 Auto merge of #5570 - Ms2ger:cef, r=jdm 2015-04-08 15:04:20 -05:00
Ms2ger
c0d4e27d79 Update js. 2015-04-08 16:53:14 +02:00
bors-servo
df57af1fc4 Auto merge of #5527 - jagtalon:jag/multiple-urls, r=mbrubeck
Switched from opts.urls from being of type Vec to type String and changing the name to `url` as well. Changed the other files that are using opts.urls accordingly.
2015-04-07 22:08:33 -05:00
Jag Talon
74cd4cd56a opts.rs: don't accept multiple URLs. Fixes #5520.
Switched from opts.urls from being of type Vec to type String and changing the name to `url` as well. Changed the other files that are using opts.urls accordingly.

servo/lib.rs + gonk/src/lib.rs: no need for a block scope.

cef: fix compiler errors.

- remove the use of `mut` since it's not needed.
- use `to_owned` instead of `to_string` because it's more efficient.
2015-04-07 15:46:51 -04:00
Diego Marcos
88954e3e18 Implements drawImage for html image as ImageSource 2015-04-07 11:02:50 -07:00
Ms2ger
9ddaf82d47 Use size_t for the arguments to malloc. 2015-04-07 17:56:46 +02:00
Ms2ger
6d1cde2283 Stop leaking the Vec. 2015-04-07 17:56:01 +02:00
Ms2ger
1fa1950ab1 Allocate only as much as necessary. 2015-04-07 17:55:49 +02:00
Ms2ger
cba3b6806e Use raw::Slice where it makes sense. 2015-04-07 17:54:36 +02:00
Ms2ger
b5d41aa8a5 Use boxed::into_raw where it makes sense. 2015-04-07 17:54:16 +02:00
Ms2ger
dd7ec693a5 Remove some unnecessary transmute calls. 2015-04-07 17:53:12 +02:00
Josh Matthews
5728799479 Get the barest bones of webdriver integration ready for keeners. 2015-04-06 18:22:32 -04:00
Matt Brubeck
791fa3757d Implement the :focus pseudo-class selector
Fixes #5460. This supports for simple focusable elements that are their own
DOM anchors, like text `input` fields.
2015-04-04 10:57:11 -07:00
Manish Goregaokar
51625d7d06 Fix gonk net_traits dependencies
Issue #4476
2015-04-03 13:43:16 -04:00
Ms2ger
eefb0773a0 Remove the unsafe impl Send for ConstellationControlMsg.
This impl made it possible to put raw pointers in ConstellationControlMsg and
send them across threads without considering the consequences.

This required making SmallVec1<T> Send if T is Send.
2015-04-03 13:32:51 +02:00
Ms2ger
6b127a8df8 Introduce a MouseButton enum. 2015-04-03 01:24:33 +02:00
Matt McCoy
818f1c5748 Closes #2587 Adding HTTP compression capability 2015-04-01 21:18:47 -04:00
Mátyás Mustoha
56303e21cc Canvas: added arcTo() support. 2015-04-01 21:20:05 +02:00
Patrick Walton
750bbed2cb gfx: Perform more aggressive caching in
`FontContext::get_layout_font_group_for_style()`.

There are several optimizations here:

* We make font families atoms, to allow for quicker comparisons.

* We precalculate an FNV hash of the relevant fields of the font style
  structure.

* When obtaining a platform font group, we first check pointer equality
  for the font style. If there's no match, we go to the FNV hash. Only
  if both caches miss do we construct and cache a font group. Note that
  individual fonts are *also* cached; thus there are two layers of
  caching here.

15% improvement in total layout thread time for Facebook Timeline.
2015-04-01 08:58:16 -07:00
Patrick Walton
66dd8c8a6c layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
2015-03-31 08:46:11 -07:00
Adenilson Cavalcanti
cdebb3ca54 Load a placeholder when a url to an image is broken.
I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier). The ref test will
expect that a failed load should display the rippy image.

ImageCacheTask users can define if a placeholder image should be loaded
at start up or not. This enables both the new behavior (e.g. always
return an image even for broken urls) as also the previous one.
2015-03-30 10:02:54 -07:00
Ms2ger
259d650a21 Remove an unused import.
I accidentally left it in after removing the calls to stdout/stderr in
d926b8342b.
2015-03-30 10:22:31 +02:00
bors-servo
acf98dcccd auto merge of #5444 : servo/servo/gonk-warnings, r=jdm 2015-03-29 17:54:59 -06:00
bors-servo
39556cc832 auto merge of #5422 : bdero/servo/bdero/box-syntax, r=jdm
Closes #5417
2015-03-29 17:10:01 -06:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Brandon DeRosier
ccc55d658f Use box syntax instead of Box::new()
Closes #5417
2015-03-29 13:41:14 -04:00
Ms2ger
98c5da7e2e Stop using int in ANativeWindow. 2015-03-29 14:36:38 +02:00
Ms2ger
d926b8342b Update gonk's build.rs. 2015-03-29 14:36:11 +02:00
Michael Wu
88b31933c4 Sync gonk lib.rs & main.rs with components/servo 2015-03-29 12:38:05 +02:00
Michael Wu
1ffa40ab55 Fix warning in gonk input code 2015-03-29 12:36:05 +02:00
Ms2ger
6ea514bc06 Update js. 2015-03-26 17:53:51 +01:00
Nicholas Nethercote
ce36e574f4 Rename lots of profiling-related things.
------------------------------------------------------------------------
BEFORE                              AFTER
------------------------------------------------------------------------
util::memory                        util::mem
- heap_size_of                      - heap_size_of (unchanged)
- SizeOf                            - HeapSizeOf
  - size_of_excluding_self            - heap_size_of_children

prof::mem                           prof::mem
- MemoryProfilerChan                - ProfilerChan
- MemoryReport                      - Report
- MemoryReportsChan                 - ReportsChan
- MemoryReporter                    - Reporter
- MemoryProfilerMsg                 - ProfilerMsg
  - {R,UnR}egisterMemoryReporter      - {R,UnR}egisterReporter
- MemoryProfiler                    - Prof
- ReportsForest                     - ReportsForest (unchanged)
- ReportsTree                       - ReportsTree   (unchanged)
- SystemMemoryReporter              - SystemReporter

prof::time                          prof::time
- TimeProfilerChan                  - ProfilerChan
- TimerMetadata                     - TimerMetadata (unchanged)
- Formatable                        - Formattable [spelling!]
- TimeProfilerMsg                   - ProfilerMsg
- TimeProfilerCategory              - ProfilerCategory
- TimeProfilerBuckets               - ProfilerBuckets
- TimeProfiler                      - Profiler
- TimerMetadataFrameType            - TimerMetadataFrameType (unchanged)
- TimerMetadataReflowType           - TimerMetadataReflowType (unchanged)
- ProfilerMetadata                  - ProfilerMetadata (unchanged)

In a few places both prof::time and prof::mem are used, and so
module-qualification is needed to avoid overlap, e.g. time::Profiler and
mem::Profiler. Likewise with std::mem and prof::mem. This is not a big
deal.
2015-03-25 16:00:23 -07:00
Glenn Watson
7163a3c580 Add mozbrowser events for location + title change. 2015-03-26 05:19:03 +10:00
bors-servo
f29ea4e4ef auto merge of #5302 : mmatyas/servo/canvas_stroke, r=jdm
This is the servo side patch of servo/rust-azure#149.
2015-03-25 07:54:50 -06:00
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
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
b45cf4ccf8 Fix some warnings in the CEF port. 2015-03-23 00:35:23 +01:00
Ms2ger
561f7e594e Update rust-png. 2015-03-21 14:31:14 +01:00
Ms2ger
1604515fd9 Fix various build warnings. 2015-03-20 17:57:49 +01:00
Ms2ger
dce11222ba Update some feature gates.
CC #5286.
2015-03-20 13:55:11 +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
bors-servo
e845695b66 auto merge of #5276 : metajack/servo/fix-idle-loop, r=pcwalton
This fixes 100% CPU usage during idle.
2015-03-19 12:03:52 -06: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
Michael Wu
67666c4418 Fix warnings in gonk port 2015-03-18 23:52:29 -04:00
bors-servo
124a78fb2e auto merge of #5262 : servo/servo/fix-warnings, r=metajack 2015-03-18 15:21:49 -06:00
Simon Sapin
6a58cbd118 Fix more warnings everywhere. 2015-03-18 22:11:20 +01:00