| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
NonNegativeNumber: for -moz-box-flex, flex-grow, and flex-shrink.
GreaterThanOrEqualToOneNumber: for stroke-miterlimit.
MozReview-Commit-ID: Kgbt99BPdVA
|
|
|
|
|
|
| |
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Add to_computed method to calculate `calc()` value with parent size,
if parent container size is `None`, the result will be `None`.
* Add from_option method for `MaybeAuto`, to construct from
`Option<Au>`.
* Update some test case.
|
|
|
|
|
| |
Remove cached thread local context from LayoutContext, use LayoutContext for
assign_inline_sizes(), and simplify the parallel flow traversal code.
|
|
|
|
| |
Fixes #14948.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect scroll roots during the collect_stacking_context phase instead
of during display list construction. This will be useful in order to
collect containing block scroll roots as well as to give scroll roots
sequential ids in the future. This change also pulls stacking context
children out of the StackingContext struct itself, which should reduce
very slightly the memory used by the finished display list. This also
simplifies the DisplayListBuilder because it no longer has to maintain
a stack of ScrollRootIds and StackingContextIds and can instead just
rely on the program stack.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Flexbox trace
<!-- Please describe your changes on the following line: -->
This is a follow up for #13740, so r? @jdm
The first patch enables JSON serialization for flexbox flows, the second one fixed format incompatibilities for the layout viewer.
The 3rd and 4th patches are just layout viewer UI enhancements, we could split that to a spearate PR if you prefer.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13846 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a trivial debug tool
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14124)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
immutably across the traversal.
This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It
also lets us get rid of that nasty lifetime transmute, which is awesome.
The situation with thread-local contexts is still suboptimal, but we fix that in
subsequent patches.
|
|
|
|
|
|
| |
Renamed to `SizeConstraint`, add an optional `border` parameter to
deal with `box-sizing: border-box`, and fix its bug when involving
with `calc`.
|
|
|
|
|
|
| |
Add a `LogicalMargin::start_end()` method that receives a `Direction'
parameter. This is useful for some layout that is symmetric in inline
and block directions, like flexbox.
|
|
|
|
|
|
|
| |
Set the flag of the fragment of children in a flex container according
to the direction of the container. The mark is done on the fragment
because flex item enstablish a stacking context when its z-index is
non-zero ,despite its `position' property.
|
|
|
|
| |
MozReview-Commit-ID: LfaZFCVlIb1
|
|
|
|
|
|
| |
This is a step in disassociating scrolling areas from stacking
contexts. Now scroll areas are defined by unique ids, which means that
in the future stacking context will be able to contain more than one.
|
|
|
|
|
|
| |
flows' block sizes.
This ensures that we never collapse margins for flex flows.
|
|
|
|
|
|
|
| |
flows.
This uses caching to ensure that we perform no more than O(n) pointer
loads.
|
|
|
|
|
| |
This can cause memory safety problems. Comments have been added to
`flow_list.rs` to prevent this from happening again.
|
|
|
|
|
|
| |
and margin separately.
This makes correct table layout easier.
|
|
|
|
| |
consistent.
|
|
|
|
|
|
|
|
|
|
| |
Simplify the way that stacking contexts are collected. Instead of
passing the StackingContextId down the tree, pass the parent
StackingContext itself. This will allow future patches to get more
information about the parent stacking context (such as location).
Also remove the return value of collect_stacking_contexts, which was
unused.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix the currently logic that a item will freeze if it should
grow(shrink) and its basesize is less(more) than its min(max) size. Also
fix the divide by zero error when an item should shrink but it has zero
length and zero min size.
|
| |
|
|
|
|
|
|
| |
The 'box_sizing_boundary()' method return the border_padding width in
certain direction if fragment has property 'box-sizing: border-box'. The
'border_padding' field should be initialized before.
|
|
|
|
|
| |
Rename the 'Mode' enum to 'Direction' and move it to 'model.rs', thus it
can be used to indicate logical direction.
|
|
|
|
|
|
| |
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'.
|
|
|
|
|
|
|
|
|
| |
As the flexbox spec change in May 2016, the absolutely positioned
children painting order no longer follow the `order` property, thus we
can simply filter them out.
Also sort items by the order field of 'FlexItem', no longer do two
vtable lookups in each compare.
|
|
|
|
|
| |
The method returns 'Option<FlexLine>', can be used to obtain a line in
flex container.
|
|
|
|
|
| |
Add the 'FlexLine' struct to represent a line in flex container, and the
'flex_resolve()' method for flex lengths resolving.
|
|
|
|
|
|
|
| |
These 'is_wrappable' flag can be used to determine if a flex flow can be
multi-line. The 'is_reverse' flag is replaced by 'main_reverse' and
'cross_reverse' since flex flow can go reverse individually in main and
cross direction.
|
|
|
|
|
|
| |
Extend fields of `FlexItem` struct with values that are necessary to
resolve flexible lengths, and the 'order' property. Add other methods
for size computing to make the code more modular.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
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 -->
|
| | |
|
|/
|
|
| |
This helps with style struct alignment between Servo and Gecko.
|
|
|
|
|
| |
Add style property for order and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.
|
|
|
|
|
| |
Clean up block_mode_assign_inline_sizes and
inline_mode_assign_inline_sizes and add extra css tests.
|