Commit graph

5393 commits

Author SHA1 Message Date
Simon Sapin
5c15c4d11f Merge pull request #2790 from SimonSapin/abstract-geometry
Add geometry primitives in flow-relative space
2014-07-09 22:04:59 +01:00
Cameron Zwarich
4916b97ad1 Merge pull request #2796 from mrobinson/fix-make-check
Update rust-layers
2014-07-09 13:36:03 -07:00
Martin Robinson
e4246c37a1 Update rust-layers
This fixes the Quadtree tests in check-rust-layers.

Fixes #2768.
2014-07-09 13:02:59 -07:00
Simon Sapin
c4bbf54fe3 Add logical geometry primitives, for CSS Writing Modes. 2014-07-09 20:57:21 +01:00
Patrick Walton
94909f2d08 Merge pull request #2786 from nnethercote/task_info
Add a `task_info` crate and a `task_basic_info` module within it.
2014-07-09 09:42:17 -07:00
glennw
0dec28dd4a Merge pull request #2775 from glennw/font-cache
Font refactoring work - add font cache task, cleanup various code paths.
2014-07-09 09:31:07 +10:00
Cameron Zwarich
bc0223a7de Move compositor event handling code to a new events module
Also, make them free functions rather than static methods on
CompositorData.
2014-07-08 14:44:08 -07:00
Cameron Zwarich
396cbb4bee Merge pull request #2788 from mrobinson/compositor-cleanup
Make compositor layer creation atomic
2014-07-08 14:37:02 -07:00
Martin Robinson
ca77ca998e Pass creation/update data for compositor layers in a struct
Use a new LayerProperties struct to hold all the data necessary to
create or update compositor layers. This reduces a lot of duplication
when passing it along.
2014-07-08 11:11:58 -07:00
Martin Robinson
5e52023177 Make compositor layer creation atomic
Instead of creating, sizing, and setting up layers using several
messages use only one. If the layer already exists, it will be updated
to reflect the new properties. The clip rect is still set in a separate
message, but that will be eliminated in a later commit.
2014-07-08 11:11:56 -07:00
Simon Sapin
a9e5457588 Merge pull request #2785 from glennw/content-font-size
Make pseudo :before and :after elements inherit style from attached
2014-07-08 18:23:16 +01:00
Patrick Walton
d90427e5e3 Merge pull request #2787 from SimonSapin/warnings
Fix or selectively silence warnings in src/components.
2014-07-08 10:20:50 -07:00
Simon Sapin
b1c4a9156c Fix or selectively silence warnings in src/components. 2014-07-08 15:46:34 +01:00
Glenn Watson
9dba9b9447 Make pseudo :before and :after elements inherit style from attached
element, as per http://dev.w3.org/csswg/css2/generate.html, rather
than from the parent element.
2014-07-08 11:20:19 +10:00
Nicholas Nethercote
24d3979ce8 Add a task_info crate and a task_basic_info module within it.
The crate provides an interface to the Mac-specific `task_info()`
function in general, and the module provides an interface to the
TASK_BASIC_INFO flavor.  Currently only the `virtual_size` and
`resident_size` values of the `task_basic_info` struct are exposed, but
there's obvious room for expansion.

This is used to implement the -m measurements on Mac.
2014-07-08 10:58:07 +10:00
Patrick Walton
53d5d35e7c Merge pull request #2784 from zwarich/cleanup-compositor-recursion
Cleanup compositor recursion
2014-07-07 17:47:35 -07:00
Cameron Zwarich
4b41b68c15 Eliminate ad-hoc recursion in add_buffers 2014-07-07 16:16:43 -07:00
Cameron Zwarich
568d4d568a Remove pointless layer lookup
We just created the root layer, so there's no point in trying to find it
again.
2014-07-07 16:16:42 -07:00
Cameron Zwarich
c0b599f894 Remove ad-hoc recursion from add_child_if_necessary 2014-07-07 16:16:42 -07:00
Cameron Zwarich
4c0f8c8ac0 Rename get_buffer_requests to send_buffer_requests_recursively 2014-07-07 16:16:42 -07:00
Cameron Zwarich
512c986915 Eliminate iteration over Option types
This idiom has been dying out in new Rust code; it's especially
confusing for layers because there is a higher chance of making the
mistaken assumption that the iteration is occurring over multiple
layers.
2014-07-07 16:16:42 -07:00
Cameron Zwarich
f91d51cb2c Eliminate ad-hoc recursion in set_unrendered_color 2014-07-07 16:16:42 -07:00
Cameron Zwarich
0396cdb1c5 Rename find_child_with_layer_and_pipeline_id
Rename find_child_with_layer_and_pipeline_id to
find_child_with_pipeline_and_layer_id so that it matches both the
logical and actual parameter ordering.
2014-07-07 16:16:42 -07:00
Cameron Zwarich
c1b0a9eb93 Add a new find_layer_with_pipeline_and_layer_id method
This method will be used to eliminate a lot of the ad-hoc recursive
searches that are present in the compositor layer code.
2014-07-07 16:16:42 -07:00
Glenn Watson
0c3cb39da3 Address review comments. 2014-07-08 07:44:05 +10:00
Patrick Walton
f8fbf557f1 Merge pull request #2781 from zwarich/compositor-contains
Adopt Rect::contains in compositor hit-testing
2014-07-07 13:50:17 -07:00
Patrick Walton
1624bc2e59 Merge pull request #2767 from zwarich/shutdown-state
Add a ShutdownState type in the compositor
2014-07-07 13:49:55 -07:00
Patrick Walton
7bf4007880 Merge pull request #2778 from Ms2ger/parallel
Remove some mem::transmute calls and reduce some unsafe blocks in parallel.rs.
2014-07-07 13:49:35 -07:00
Josh Matthews
3083065cf6 Merge pull request #2783 from molnarg/master
Use "Fedora" instead of "Fedora Core" in README
2014-07-07 15:09:01 -04:00
Gábor Molnár
dcc21bb4ca Use "Fedora" instead of "Fedora Core" in README 2014-07-07 20:47:57 +02:00
Josh Matthews
d1d97167d9 Merge pull request #2780 from eshyong/reduce-untraceables
Made Page.window_size and Page.next_subpage_id Traceable, added trait En...
2014-07-07 13:50:26 -04:00
Cameron Zwarich
91c7acd4c4 Adopt Rect::contains in compositor hit-testing
This does make hit-testing inclusive in the right/bottom edges, whereas it
was only inclusive in the top/left edges before.
2014-07-07 10:45:48 -07:00
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