Pu Xingyu
60e2f44a19
Add Minor fixes and tests
2016-08-03 21:10:35 +08:00
Ms2ger
247c86f887
Remove unused inline_size_of_preceding_{left,right}_floats fields from BlockFlow.
2016-08-01 13:56:24 +02:00
Pu Xingyu
a70d2bbed8
Flex elements in a row flex container
...
Iterate over the items, create lines from them, resolve flex lengths
against them, set their inline size and margin lengths, and align them
according to 'justify-content', 'align-content' and 'align-self'.
2016-07-23 01:07:22 +08:00
Pu Xingyu
bc8d22a5e7
Make the width of block customizable by its parent
...
Add a 'IS_FLEX' flag to bitflags of block flow, and when it is set, the
block will use the inline size and margins set by its parent.
2016-07-22 16:06:59 +08:00
Simon Sapin
6d0e48f6cc
Remove some type aliases that are now just re-exports.
2016-07-20 08:42:47 +02:00
Simon Sapin
789807b7b0
Remove the ComputedValue traits and style_struct_traits
2016-07-20 08:42:40 +02:00
Anthony Ramine
51ff916e09
Move util::print_tree to gfx_traits
2016-07-04 15:47:06 +02:00
Ms2ger
ea45e76840
Pass SharedStyleContext to assign_inline_sizes.
2016-06-22 14:50:04 +02:00
Ms2ger
ea15f69404
Pass SharedStyleContext to compute_inline_sizes.
2016-06-22 14:31:05 +02:00
Ms2ger
c33ac876ff
Pass SharedStyleContext to propagate_and_compute_used_inline_size.
2016-06-22 14:29:36 +02:00
Ms2ger
21b8d2bd91
Pass SharedStyleContext to propagate_assigned_inline_size_to_children.
2016-06-22 14:28:14 +02:00
Ms2ger
9731a001db
Pass SharedStyleContext to compute_used_inline_size.
2016-06-22 14:26:52 +02:00
Ms2ger
018bebe90d
Pass SharedStyleContext to compute_inline_size_constraint_inputs.
2016-06-22 14:22:21 +02:00
Ms2ger
5c12755fa6
Pass SharedStyleContext to initial_computed_inline_size.
2016-06-22 14:21:08 +02:00
Ms2ger
2a1e2f491a
Pass SharedStyleContext to containing_block_inline_size.
2016-06-22 14:19:56 +02:00
Ms2ger
f20ea08a1b
Pass SharedStyleContext to explicit_block_containing_size.
2016-06-22 14:17:33 +02:00
Ms2ger
6f4b8f2505
Store SharedStyleContext in AbsoluteAssignBSizesTraversal.
2016-06-22 14:09:54 +02:00
Ms2ger
e142b78850
Pass SharedStyleContext to calculate_absolute_block_size_and_margins.
2016-06-22 14:08:28 +02:00
Ms2ger
e6435b7ec4
Pass SharedStyleContext to adjust_fragments_for_collapsed_margins_if_root.
2016-06-22 14:07:06 +02:00
bors-servo
47387a5c44
Auto merge of #11752 - mbrubeck:cleanup, r=pcwalton
...
Minor code cleanup in layout
r? @pcwalton
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11752 )
<!-- Reviewable:end -->
2016-06-21 17:51:26 -05:00
Matt Brubeck
25a19343b3
Remove REPAINT damage in Fragment::build_display_list
...
Previously, the code that called this function was responsible for this.
Some code paths neglected to do it. This moves the damage removal to one
central location.
2016-06-20 13:39:36 -07:00
Ms2ger
7414edab05
Move DISPLAY_PORT_SIZE_FACTOR to block.rs.
2016-06-20 21:23:43 +02:00
Ms2ger
5c03dd8eb1
Introduce a script_layout_interface crate and move RestyleDamage to it.
2016-06-20 19:02:36 +02:00
Ms2ger
2383cb2eee
Remove unused argument to place_float_if_applicable.
2016-06-20 12:37:56 +02:00
Darin Minamoto
4a4be1d7e5
Image with height defined in % resizes properly
2016-06-15 16:39:22 -07:00
Patrick Walton
a86f77e36d
script: Keep the DOM-side viewport up to date when scrolling happens in
...
WebRender.
This happens asynchronously, just as it does in non-WebRender mode.
This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.
Requires servo/webrender_traits#55 and servo/webrender#277.
Partially addresses #11108 .
2016-05-31 14:12:51 -07:00
Cullen Rhodes
40acd24e8f
Report use statements that use {} with only one entry
2016-05-27 10:18:44 +01:00
Per Lundberg
2f7ed1d73e
Removed unused imports
...
This fixes #11185 .
2016-05-15 22:24:26 +03:00
Patrick Walton
b6bed345f5
layout: Take margins in the inline direction into account when
...
guessing the inline-size of block formatting contexts.
Fixes the layout on reddit.com.
Partially addresses #10571 .
2016-05-10 17:11:28 -07:00
bors-servo
8bc4785bed
Auto merge of #10999 - heycam:move-width-height, r=SimonSapin
...
Move width and height from Box to Position.
This helps with style struct alignment between Servo and Gecko.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10999 )
<!-- Reviewable:end -->
2016-05-04 19:52:25 -07:00
Patrick Walton
4ae6a68e35
layout: Fix non-vertical-align-correct wording in a comment.
2016-05-04 13:20:23 -07:00
Patrick Walton
04f05349b1
layout: Check flow descendants of inline block fragments to find their
...
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
2016-05-04 13:20:21 -07:00
Cameron McCormack
550d780e17
Move width and height from Box to Position.
...
This helps with style struct alignment between Servo and Gecko.
2016-05-04 11:06:42 +10:00
Ben Striegel
08987c6f5a
Fix unused mut warning
2016-05-02 21:02:20 -04:00
bors-servo
8db0367301
Auto merge of #10944 - mbrubeck:bitflags-0.6, r=frewsxcv
...
Upgrade a bunch of dependencies
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10944 )
<!-- Reviewable:end -->
2016-04-30 15:21:22 -07:00
Matt Brubeck
1e23d90631
Upgrade to bitflags 0.6.0 and selectors 0.5.6
...
Types generated by `bitflags!` are now private by default. This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
Samuel Harrington
4691dc0c6e
Remove dead code from block.rs
2016-04-29 20:13:42 -07:00
Patrick Walton
6b6587a73b
layout: Translate floats flowing out of blocks to compensate for inline
...
direction margins.
Improves Reddit /r/rust.
2016-04-28 10:25:49 -07:00
Patrick Walton
f69931552b
layout: Disallow margins from collapsing through block formatting
...
contexts per CSS 2.1 § 8.3.1.
Closes #10449 .
2016-04-14 17:24:26 -07:00
Patrick Walton
a3fd226341
layout: Disallow margins from collapsing through blocks with clearance
...
per CSS 2.1 § 8.3.1.
Fixes the test failure in #10458 .
2016-04-14 17:24:24 -07:00
Patrick Walton
e32455f7b8
layout: Disallow margins from collapsing through blocks that have
...
floated children per CSS 2.1 § 8.3.1.
Fixes the test failure in #10458 .
2016-04-14 11:22:40 -07:00
Michael Howell
3c2210c5fc
Propogate transformed clipping regions to nested flows.
...
Fixes #10559
2016-04-13 11:50:50 -07:00
bors-servo
0a1efe4578
Auto merge of #10320 - malayaleecoder:master, r=KiChjang
...
Rename imm_child_iter() and child_iter().
Fixes #10286
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10320 )
<!-- Reviewable:end -->
2016-04-09 03:54:40 +05:30
malayaleecoder
d4dcaf3167
Rename imm_child_iter() and child_iter(). Fixes #10286
2016-04-09 01:18:00 +05:30
Matt Brubeck
cac06e579c
Remove unused argument to adjust_clipping_region_for_children
2016-04-07 16:22:51 -07:00
Patrick Walton
1e884ddc69
layout: Allow non-absolutely-positioned elements with overflow: scroll
...
set to be scrolled.
This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.
Closes #2742 .
2016-04-06 17:58:47 -07:00
Mauricio Collares
aae8919da4
Move some CSS properties from Box to Position
2016-04-05 00:21:49 -03:00
bors-servo
77444d00be
Auto merge of #10279 - notriddle:issue_10258, r=mbrubeck
...
Fix #10258
Respect border-box when computing the relative sizes of children.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10279 )
<!-- Reviewable:end -->
2016-03-30 12:48:40 +05:30
Michael Howell
61c7ee917e
Compute content box for children with box-sizing: border-box correctly.
...
Fixes #10258
2016-03-29 14:37:54 -07:00
Per Lundberg
4cb4cc93e4
Renamed TComputedValues to ComputedValues
...
This is a followup to #10210 , and a continuation of #10185 .
2016-03-29 23:30:13 +03:00