Commit graph

5361 commits

Author SHA1 Message Date
Cameron Zwarich
797663c43e Update to latest rust-geom 2014-07-07 10:45:48 -07:00
Josh Matthews
548946b800 Merge pull request #2777 from Manishearth/try_parse_url
Don't fail on parsing URLs in the html parser
2014-07-07 12:17:54 -04:00
Simon Sapin
b502d0f19e Merge pull request #2779 from Ms2ger/print
Print a more helpful debug message when creating an element in the HTML parser.
2014-07-07 16:07:34 +01:00
Manish Goregaokar
a0e413cf1a Don't fail on parsing URLs in the html parser 2014-07-07 20:28:55 +05:30
Ms2ger
7852bcd626 Print a more helpful debug message when creating an element in the HTML parser.
Using {:?} prints a debugging representation such as

  collections::string::String{
    vec: collections::vec::Vec<u8>{
      len: 4u,
      cap: 4u,
      ptr: (0x7f75670285d8 as *mut ())
    }
  }

which is not very helpful.
2014-07-07 16:52:48 +02:00
Ms2ger
587a90315e Remove some mem::transmute calls and reduce some unsafe blocks in parallel.rs. 2014-07-07 16:41:53 +02:00
Jack Moffitt
7babb6d104 Merge pull request #2776 from glennw/warnings
Warning police.
2014-07-07 00:30:04 -06:00
Glenn Watson
422bda7379 Warning police. 2014-07-07 15:43:47 +10:00
Glenn Watson
12978eeb50 Next stage of refactoring font system. This commit introduces
the font cache task, and adapts client code to use it. It also
cleans up some existing code paths.

- Fonts are only read once from disk while in use (they
  are discarded if the reference count reaches zero, however).
  This saves memory and prevents unnecessary reading from disk.
- It will be easier to add web font support, as all fonts
  are created and managed in a single place and the entire
  pipeline ensures that only one in-memory copy of font data
  is required.

An overview of how the pieces fit together:

FontTemplate - A structure containing everything that
is required to create (and select) font handles. This
structure is shared among all matching font handles
(via Arc).

FontTemplateData - A platform specific structure that
contains the actual font data inside a template (this is
a byte array on Linux/Android, CTFont on Mac).

FontHandle - An opaque, platform specific handle to
a font instance. Each FontHandle contains an Arc<>
reference to the FontTemplate it was created from.

FontCache - This is a separate task, that is responsible
for loading and caching FontTemplate structures. There
is one FontCache per constellation. It is only ever accessed
via the FontContext described below.

FontContext - This is the public interface to the FontCache
and is used by the layout and render code to create font
handles. These must *not* be shared between threads. There
is typically one FontContext per thread/task.
2014-07-07 14:25:21 +10:00
eshyong
f085655cc6 Made Page.window_size and Page.next_subpage_id Traceable, added trait Encodable for WindowSizeData, ViewportPx, PagePx, and DevicePixel 2014-07-06 23:49:01 -04:00
Tetsuharu OHZEKI
b6edd5318f Implement Element.matches(). 2014-07-05 23:27:40 +09:00
Ms2ger
e62637fee2 Merge pull request #2763 from Ms2ger/azure-ctors
Replace bare constructor functions with 'new' static member functions in rust-azure; r=SimonSapin
2014-07-05 11:16:08 +02:00
Simon Sapin
0974d21bcd Merge pull request #2765 from Manishearth/xhr-wpt-encoding
Fix encoding issues for getResponseHeader()
2014-07-04 23:36:22 +01:00
Cameron Zwarich
09d2b4dde5 Add a ShutdownState type in the compositor
Currently the compositor tracks its state in the processing of shutting
down with two boolean instance variables `shutting_down` and `done`, but
these two variables really implement a three-state abstraction.
2014-07-04 15:21:13 -07:00
Simon Sapin
c01ab46388 Merge pull request #2761 from zwarich/remove-set-transform
Stop calling Scene::set_transform
2014-07-04 23:12:21 +01:00
Simon Sapin
475f6e7495 Merge pull request #2760 from zwarich/compositor-100-columns
Fix 100-column violations in compositor.rs
2014-07-04 22:45:19 +01:00
Manish Goregaokar
9c2f5ac218 Update expectations for #2765 2014-07-05 02:22:26 +05:30
Manish Goregaokar
3f15dc6c47 Fix encoding issues for getResponseHeader() 2014-07-05 02:20:04 +05:30
Ms2ger
17d4b1ac01 Replace bare constructor functions with 'new' static member functions in rust-azure. 2014-07-04 22:22:15 +02:00
Cameron Zwarich
38cfea1246 Fix 100-column violations in compositor.rs 2014-07-04 09:22:57 -07:00
Cameron Zwarich
8d3442d5ba Merge pull request #2755 from mrobinson/remove-common
Update to latest rust-layers
2014-07-04 09:00:28 -07:00
Martin Robinson
07db2d3273 Update to latest rust-layers 2014-07-04 07:42:38 -07:00
Simon Sapin
52e55a2770 Merge pull request #2762 from Ms2ger/warnings
Fix some build warnings. r=me
2014-07-04 14:15:38 +01:00
Ms2ger
2aad6539e4 Remove some deprecated into_owned calls. 2014-07-04 11:57:36 +02:00
Ms2ger
11aa36619d Mark some unused fields. 2014-07-04 11:57:35 +02:00
Ms2ger
cfa9aaac08 Remove some unused fields. 2014-07-04 11:57:29 +02:00
Ms2ger
1fe1d03b02 Fix a deprecated phase warning. 2014-07-04 11:54:46 +02:00
Ms2ger
e1098232eb Fix some exported private type warnings. 2014-07-04 11:54:19 +02:00
Cameron Zwarich
4777a39479 Stop calling Scene::set_transform
The Scene::set_transform method was only introduced because of an old
rustc bug around mutating properties across crates. Now that the rustc
bug is fixed, we can stop calling this method.
2014-07-04 00:42:40 -07:00
Patrick Walton
19560c0390 Merge pull request #2759 from zwarich/cleanup-get-buffer-request
Cleanup `get_buffer_request`
2014-07-03 23:24:28 -07:00
Cameron Zwarich
567ee422b1 Rename a local closure in get_buffer_request 2014-07-03 21:46:52 -07:00
Cameron Zwarich
952bb4e238 Change a fold to an any 2014-07-03 21:46:52 -07:00
Lars Bergstrom
6ce4e62e11 Merge pull request #2756 from zwarich/compositor-100-lines
Make compositor_data.rs conform to 100 column line lengths
2014-07-03 19:50:09 -05:00
Lars Bergstrom
3bde03c9a7 Merge pull request #2757 from glennw/disable-phf
Disable rust-phf until cross compile / make check issue is sorted.
2014-07-03 18:47:45 -05:00
Glenn Watson
3f18a89084 Disable rust-phf until cross compile / make check issue is sorted. 2014-07-04 07:33:00 +10:00
Cameron Zwarich
e1a97ea14b Make compositor_data.rs conform to 100 column line lengths 2014-07-03 13:48:17 -07:00
Lars Bergstrom
b0ffeaf53c Merge pull request #2751 from glennw/font-refactor-1
First part of font refactoring. These changes simplify a few things
2014-07-03 11:53:00 -05:00
Simon Sapin
66f31d3343 Fetch Rust snapshots over HTTPS. Fix #2752 2014-07-03 10:25:23 +01:00
Lars Bergstrom
0a910ce6cf Merge pull request #2748 from mrobinson/layer-reorg
Refactor compositor layer tree design
2014-07-02 17:59:15 -05:00
Glenn Watson
51bd334f3f First part of font refactoring. These changes simplify a few things
but don't do much on their own, they just make it easier to
implement the work to come (web fonts, performance improvments
in terms of font loading and memory usage).

- Font identifier on Linux/Android is now the font file path.
  This is a temporary measure, but simplifies things a lot for now.
- Remove FontListHandleMethods trait in favour of free functions.
- FontList::refresh() has no knowledge of FontFamily etc. Instead it takes
  a closure that the caller provides.
- FontList::load_variations_for_family no longer creates the font
  handle. Instead it takes a closure and provides the name of the font
  identifier for the variations it finds.
- Remove path_from_identifier() - it's no longer required.
- create_font_from_identifier() takes an Option<Style>, allowing it to be
  used to create fonts for family matching purposes where the font size is
  not important.

Tested on Linux + Mac. Builds on Android but not able to confirm it's working correctly.
2014-07-03 07:47:52 +10:00
Josh Matthews
568e7ed0c6 Merge pull request #2731 from Manishearth/xhr-wpt-header-filter
Filter response headers, fix responseType's error in XHR
2014-07-02 16:51:55 -04:00
Josh Matthews
d09815a10a Merge pull request #2735 from Manishearth/urlsearchparams
Add URLSearchParams interface with serialization support
2014-07-02 16:51:38 -04:00
Josh Matthews
a313bdb346 Merge pull request #2737 from Manishearth/derefmut-2736
Remove deref_mut from Untraceable/Traceable (fixes #2736)
2014-07-02 16:51:17 -04:00
Lars Bergstrom
d637bc71c2 Merge pull request #2745 from glennw/remove-unstyled-method
Font refactoring - remove unstyled method, update android freetype
2014-07-02 15:23:01 -05:00
Lars Bergstrom
c18b5c74f2 Merge pull request #2749 from mbrubeck/glue-submodule
Update to latest servo-android-glue
2014-07-02 15:20:35 -05:00
Matt Brubeck
0330404d2f Update to latest servo-android-glue 2014-07-02 12:41:22 -07:00
Josh Matthews
27ed2ea8cf Merge pull request #2727 from Ms2ger/dom-pub
Make some DOM members private.
2014-07-02 14:42:47 -04:00
Martin Robinson
0c2538d06d Refactor compositor layer tree design
Instead of having two parallel trees of CompositorLayers and
ContainerLayers, transform CompositorLayer to CompositorData and move
tiling logic to rust-layers.
2014-07-02 11:38:28 -07:00
Josh Matthews
0e394a65d3 Merge pull request #2728 from Ms2ger/location-search
Implement Location.search.
2014-07-02 14:36:24 -04:00
Manish Goregaokar
47d8021231 Update test expectations for #2731 2014-07-02 23:45:49 +05:30