Commit graph

25052 commits

Author SHA1 Message Date
bors-servo
177127e597 Merge pull request #3398 from glennw/config-res
Allow resolution to be configured on command line. Default to 1280x1024.

Reviewed-by: SimonSapin
2014-09-25 18:27:38 -06:00
Patrick Walton
9f4c2de211 layout: Unify the block-size computation for blocks and floats.
The float code was old and did not support most of CSS 2.1. So unifying
the two paths both simplifies code and improves functionality.

Improves the Reddit sidebar.
2014-09-25 16:43:24 -07:00
bors-servo
c2d6d8084c Merge pull request #3480 from zwarich/trailing-whitespace
Fix trailing whitespace tidy errors

Reviewed-by: larsbergstrom
2014-09-25 17:00:34 -06:00
bors-servo
d95b88c830 Merge pull request #3477 from Ms2ger/global
Move global_object_for_js_object to global.rs

Reviewed-by: jdm
2014-09-25 14:48:32 -06:00
Cameron Zwarich
ce2484a7ce Fix trailing whitespace tidy errors 2014-09-25 13:48:07 -07:00
Cameron Zwarich
5399e117de Add the MPL back to components/plugins/lints.rs
This license was accidentally removed in 5b866e9e.
2014-09-25 13:45:39 -07:00
Ms2ger
c4d36b5721 Remove unused cx_for_dom_object function. 2014-09-25 22:35:38 +02:00
Ms2ger
1d00b28df0 Regroup uses of JS constants in utils.rs. 2014-09-25 22:35:38 +02:00
Ms2ger
47829a37a9 Move global_object_for_js_object to global.rs.
This appears to be a more sensible place for it (related to #433).
2014-09-25 22:35:37 +02:00
bors-servo
1fba32af9f Merge pull request #3434 from pcwalton/directly-floated-tables
layout: Float table wrappers directly instead of generating a block

Reviewed-by: glennw
2014-09-25 10:36:33 -06:00
Patrick Walton
62bb9093d7 layout: Float table wrappers directly instead of generating a block
wrapper around them.

Fixes Wikipedia tables leaking out.

Along the way, I refactored tables' width calculation significantly.
This was necessary in order to properly handle floated tables, as some
of the logic had to be ported over from block flows.
2014-09-25 08:06:03 -07:00
Martin Robinson
65c6689bcc Compound scrolling offsets when setting content offset
When traversing the layer tree to assign content offset, the new offset
needs to take into account any additional offset from children that are
also scrolling roots. This means that when you scroll a parent frame, it
doesn't override the scroll position of its children, but adds to it.
2014-09-25 07:57:47 -07:00
Martin Robinson
f346a215f3 Don't let base layers override root layer size
Base layers (the background layer of each frame) shouldn't override the
size of their root layers. This allows base layers to scroll inside
root layer frames. This does mean that when determining the maximum
scroll position, we need to look at the size of scrolling root children
though.
2014-09-25 07:57:46 -07:00
Martin Robinson
e01c5cd863 Differentiate clearly how child layers handle scroll events
This allows the scroll handler to know if a child layer didn't handle
an event or the scroll position of the child layer was simply unchanged.
2014-09-25 07:57:46 -07:00
Martin Robinson
80433f7ea0 Properly size root layers
Root layers should be sized to their frame rectangles and the root of
the root layers should track the window size. This is important because
layers need to be properly sized to scroll.
2014-09-25 07:57:44 -07:00
Martin Robinson
6bbde703c1 Give root layers a scrollable policy
This allows iframe layers to move properly when their parents scroll
and is necessary to properly track their masking rects as their
children move and to draw their backgrounds in the proper position.
2014-09-25 07:57:14 -07:00
Martin Robinson
2724c3c6bb Store scrolling root scroll offset explicitly
Instead of sneakily setting the content offset and not the transform on
scrolling roots, let scrolling roots specify their scroll offset
directly and separately. This will also be important when adding proper
scrolling support for iframes.
2014-09-25 07:57:14 -07:00
Patrick Walton
fffc7aaf38 layout: Consider relatively positioned blocks as possible block
formatting contexts, and translate floats out of block formatting
contexts.

These improve Reddit.
2014-09-24 22:03:06 -07:00
Glenn Watson
1edbe17db1 When rendering to PNG, draw to an FBO rather than default framebuffer.
This means that it doesn't matter if the window if partially placed
off screen when reftests run.

Fixes #3470.
2014-09-25 10:24:23 +10:00
Manish Goregaokar
95a4731c0e Merge pull request #3468 from Manishearth/jstraceable
Replace our usage our Encodable with JSTraceable; r=jdm
2014-09-24 21:25:41 +05:30
Josh Matthews
c7a575e793 Merge pull request #3465 from Ms2ger/ns
Handle null strings in Namespace::new.
2014-09-24 10:30:13 -04:00
Manish Goregaokar
6f6a62e967 Address review comments 2014-09-24 19:35:41 +05:30
Patrick Walton
d9f836bc75 Merge pull request #3458 from pcwalton/whitespace-nowrap
layout: Implement `white-space: nowrap`.
2014-09-23 20:22:33 -07:00
Manish Goregaokar
3b842c4f06 Merge pull request #3466 from Ms2ger/into_string
Remove redundant into_string() calls.; r=jdm
2014-09-24 08:10:17 +05:30
Manish Goregaokar
5336dd9853 Update docs 2014-09-24 05:44:53 +05:30
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
glennw
98222cf24c Merge pull request #3459 from glennw/small-caps
Add support for small-caps font-variant.
2014-09-24 09:49:05 +10:00
Patrick Walton
9aacd4c10c layout: Implement white-space: nowrap.
Improves the Reddit header.
2014-09-23 15:47:45 -07:00
Glenn Watson
ff4713c434 Change opts to work in screen pixels that are scaled to device pixels. 2014-09-24 07:39:37 +10:00
Manish Goregaokar
85f79290a6 Add untraceable! macro 2014-09-24 02:35:40 +05:30
Glenn Watson
c2522ec127 Change default back to 800x600 as mac travis builders don't work with 1280x1024 2014-09-24 06:59:05 +10:00
Glenn Watson
c33f18b7df Allow resolution to be configured on command line. Default to 1280x1024. 2014-09-24 06:59:05 +10:00
Ms2ger
3a9e51ea17 Remove redundant into_string() calls. 2014-09-23 22:42:09 +02:00
Ms2ger
178843456f Merge pull request #3462 from Ms2ger/as-slice
Avoid an unnecessary string allocation in allow_cross_origin_request; r=jdm
2014-09-23 22:34:54 +02:00
Ms2ger
d3d7c1dabd Handle null strings in Namespace::new.
This also avoids a string copy in the rare case of an unrecognized namespace.
2014-09-23 22:22:45 +02:00
Glenn Watson
f7b7a96961 Add fixme comment for future work, make scale factor a constant. 2014-09-24 06:00:46 +10:00
Manish Goregaokar
3b7e07699e Add #[jstraceable] syntax extension 2014-09-24 01:15:22 +05:30
Ms2ger
1ffb683145 Avoid an unnecessary string allocation in allow_cross_origin_request. 2014-09-23 21:33:38 +02:00
Matt Brubeck
b708453049 Fix other warnings in devtools 2014-09-23 11:47:47 -07:00
Matt Brubeck
d2e6985ef7 Disable non_snake_case warnings in devtools 2014-09-23 11:45:08 -07:00
Patrick Walton
4546d5d23c Merge pull request #3460 from glennw/inline-block-padding
Fix inline context padding on inline-block.
2014-09-23 07:47:29 -07:00
Manish Goregaokar
5b866e9e46 Fix CEF 2014-09-23 17:37:28 +05:30
Manish Goregaokar
2a4f9fd8a3 Add license headers 2014-09-23 17:37:27 +05:30
Manish Goregaokar
fcb25a35ec Rename macros crate to plugins 2014-09-23 17:37:27 +05:30
Glenn Watson
32c02fc048 Fix inline context padding on inline-block.
Fixes categories bar on wikipedia - ref #2554.
2014-09-23 15:40:08 +10:00
Glenn Watson
0dd1b85739 Add support for small-caps font-variant.
Ref: 2554.
2014-09-23 14:21:41 +10:00
Patrick Walton
3bb4020ff8 layout: Adjust the position of block formatting contexts based on float
placement.

Improves Reddit considerably.

Closes #3456.
2014-09-22 18:04:15 -07:00
Patrick Walton
34b3408a89 layout: Translate floats when clearing non-floated blocks.
Improves CNN layout considerably.

Closes #3439.
2014-09-22 14:14:20 -07:00
Simon Sapin
eabb8d4f29 Add support for font-size relative size keywords. Fix #3423 2014-09-22 17:00:00 +01:00
Glenn Watson
87d18b90a6 Add support for min-width and max-width to images.
This fixes the images on the homepage of github.
2014-09-22 14:03:10 +10:00