Commit graph

32 commits

Author SHA1 Message Date
bors-servo
20f0be20d7 Auto merge of #10987 - shinglyu:flex-reverse, r=shinglyu
Bug #10181 - Implement *-reverse flex-directions

<!-- 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/10987)
<!-- Reviewable:end -->
2016-05-10 19:51:04 -07:00
Shing Lyu
89586ed3d8 Bug #10181 - Implement *-reverse flex-directions 2016-05-11 10:30:02 +08: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
Daniel Robertson
3580f91291 Implement flexbox reordering
Add style property for order and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.
2016-04-11 16:55:16 -04:00
Daniel Robertson
e0454e0b65 Add tests and clean up *_mode_assign_inline_sizes
Clean up block_mode_assign_inline_sizes and
inline_mode_assign_inline_sizes and add extra css tests.
2016-04-09 01:13:30 -04: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
Mauricio Collares
bbc5c51be8 Move CSS flex-direction property from Flex to Position and delete Flex 2016-04-05 00:28:08 -03:00
Daniel Robertson
7946ebb36a Compute size of the axes of flex containers
Compute the available main and cross size of flex containers, and add a
helper for min/main constraints
2016-03-31 22:53:48 -04: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
Per Lundberg
c2ad084713 ComputedValues is now ServoComputedValues
This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
2016-03-27 10:55:43 +03:00
Patrick Walton
b29719e36b layout: Rewrite the block formatting context/float inline-size
speculation code.

The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:

    <div>
        <div style="float: left">Foo</div>
    </div>
    <div>
        <div style="overflow: hidden">Bar</div>
    </div>

No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.

On the pages I tried, this regresses layout performance by 1%-2%.

I first noticed this breaking some pages, like the Google SERPs, several
months ago.
2016-03-25 18:39:16 -07:00
Bobby Holley
c2daea2c9c Parameterize the rest of the style system on TNode. 2016-03-24 11:50:57 -07:00
Patrick Walton
f4b95dd00b layout: Remove the validate_display_list_geometry debugging tool.
I don't think anyone was using it, and it's incompatible with taking
display lists out of flows.
2016-03-03 13:09:55 -08:00
Patrick Walton
4233e0f163 gfx: Box stacking contexts to minimize memmove traffic.
`memmove` was showing up high in the profile when concatenating and
shorting display lists. This change drastically reduces the `memmove`
cost in exchange for some minor additional allocation cost.
2016-03-03 13:09:48 -08:00
Martin Robinson
e7019f2721 Flatten display list structure
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.
2016-03-01 14:50:07 -08:00
Anthony Ramine
db8d502f41 Move util::logical_geometry to style 2016-02-18 10:17:13 +01:00
Patrick Walton
7c5b2d6cb3 layout: Separate out overflow-for-scrolling from overflow-for-paint.
Closes #9484.
2016-02-03 16:06:24 -08:00
Kishor Bhat
4c5eeb1f58 Remove unused imports in layout 2016-01-17 13:17:23 +05:30
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Manish Goregaokar
8e2c37a542 Fix match_refs and let_returns in layout, address review changes 2015-09-04 18:30:46 +05:30
Manish Goregaokar
54c036cd66 Elide most 'a lifetimes 2015-09-04 08:55:51 +05:30
Simon Sapin
80d471d5cf Merge branch 'master' into calc 2015-09-01 18:39:16 +02:00
Prabhjyot Singh Sodhi
976c7e0411 implemented a pass-through mark_as_root for FlexFlow 2015-08-31 12:56:29 +05:30
David Zbarsky
cdae523cd4 Address review comments 2015-08-26 14:43:10 -07:00
Paul Rouget
4987e320d4 prevent division by 0
Fix 7316
2015-08-24 08:53:37 +02:00
Patrick Walton
930dfbb7ad layout: Fix merge fallout. 2015-08-21 16:08:13 -07:00
Simon Sapin
2fa2a3b5a9 Sort imports. 2015-08-21 15:59:20 -07:00
Kyle Zentner
0e18f645f4 Implement FlexFlow::assign_block_size(). 2015-08-21 15:59:19 -07:00
Kyle Zentner
e95c15816d Implement FlexFlow::assign_inline_sizes(). 2015-08-21 15:59:18 -07:00
Kyle Zentner
0488a36862 Create FlexFlow's for 'display: flex' nodes.
This commit doesn't implement any flexbox behavior at all.
It just constructs FlexFlow's, which act just like the BlockFlow from
which they "inherit."
2015-08-21 15:59:18 -07:00