bors-servo
6191748907
Auto merge of #13012 - servo:shared-layout-context, r=nox
...
Stop creating a LayoutContext in build_display_list_for_subtree.
<!-- 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/13012 )
<!-- Reviewable:end -->
2016-08-24 09:38:31 -05:00
Ms2ger
938569e3c7
Pass SharedLayoutContext to ImageFragmentInfo::new.
2016-08-23 17:32:06 +02:00
Ms2ger
7524e5549f
Pass SharedStyleContext to CanvasFragmentInfo::new.
2016-08-23 17:13:11 +02:00
Alexandrov Sergey
3e73475d5b
set HAS_NEWLY_CONSTRUCTED_FLOW flag for reconstructed flow'less inline element
2016-08-23 01:45:11 +03:00
Alexandrov Sergey
69769e4493
do not reset pseudo elements style
2016-08-11 10:11:11 +03:00
Emilio Cobos Álvarez
17772d1618
layout: Fix servo layout to take into account possibly unstyled child nodes in the display: none case.
2016-08-10 18:26:22 -07: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
bors-servo
dcc4697dde
Auto merge of #11930 - nox:die-util-die, r=SimonSapin
...
Remove some util stuff
<!-- 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/11930 )
<!-- Reviewable:end -->
2016-06-29 15:37:42 -05:00
Anthony Ramine
3041084176
Move util::linked_list to layout
2016-06-29 17:23:04 +02:00
Michael Howell
0dc64daed9
Clean up unnecessary code noise
2016-06-28 15:20:48 -07:00
Ms2ger
2c50318ee7
Move is_image_data to script_layout_interface.
2016-06-20 19:08:11 +02:00
Ms2ger
0d0b268138
Move LayoutNode and related traits to script_layout_interface.
2016-06-20 19:07:54 +02:00
Ms2ger
6b847eb93a
Introduce LayoutNodeType and LayoutElementType enums.
2016-06-20 19:02:49 +02:00
Ms2ger
afc7118a67
Introduce a ThreadSafeLayoutNodeHelpers trait for methods to stay in layout.
2016-06-20 19:02:48 +02:00
Ms2ger
5c03dd8eb1
Introduce a script_layout_interface crate and move RestyleDamage to it.
2016-06-20 19:02:36 +02:00
Maciej Skrzypkowski
27b05c58f6
Small performance improvement
...
node.selection() is not used text_content is equal to
TextContent::GeneratedContent(content_items)
2016-06-16 08:58:03 +02:00
Ms2ger
6a1722e18d
Make layout only depend on script::layout_interface.
2016-06-07 13:46:49 +02:00
Josh Matthews
3cb8af20c2
Remove empty lines following braces.
2016-05-27 13:32:05 -04:00
Cullen Rhodes
40acd24e8f
Report use statements that use {} with only one entry
2016-05-27 10:18:44 +01:00
Matt Brubeck
5c09e26e55
Stop generating flows under display: none.
...
Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction. Fixes #1536 .
2016-05-25 11:54:21 -07:00
Per Lundberg
2f7ed1d73e
Removed unused imports
...
This fixes #11185 .
2016-05-15 22:24:26 +03:00
Patrick Walton
2bef5606bd
layout: Minor whitespace cleanup.
2016-05-04 13:20:24 -07:00
Patrick Walton
9e1935c2ed
layout: Make the hypothetical box for display: inline-block
with
...
`position: absolute` inline per CSS 2.1 § 10.3.7.
2016-05-04 13:20:22 -07:00
Emilio Cobos Álvarez
cf5c090576
layout: Don't force to overwrite display for pseudo-elements.
2016-04-29 22:54:49 +02:00
Emilio Cobos Álvarez
2a499d5a0b
layout: Stop storing PrecomputedStyleData in LayoutNode
...
Use the SharedStyleContext instead.
2016-04-29 22:54:48 +02:00
Michael Howell
5a90c8f2bd
Do not render the contents of block-level replaced elements.
...
Fixes #10733
2016-04-22 22:24:09 -07:00
Matt Brubeck
1695d14a9e
Don't strip out all empty fragments
...
Empty fragments may need to be layed out to draw borders, padding/background,
and insertion points. (Fragments that consist of discardable whitespace and
control characters, on the other hand, can still be discarded.)
This ends up preserving some useless empty fragments. It's possible we could
avoid this by storing some sort of flag on "important" empty fragments, so we
can discard the rest.
2016-04-16 13:13:07 -07:00
Matt Brubeck
1807fd3cc5
Generate a fragment for an empty elements with borders or padding
2016-04-16 11:01:40 -07:00
Matt Brubeck
b607b3a932
Fix meld_with_next_inline_fragment and add meld_with_prev_inline_fragment
...
Factor out a new `meld_with_prev_inline_fragment` method that mirrors the
existing `meld_with_next_inline_fragment`.
This also fixes a bug in `meld_with_next` that was already fixed in the
`meld_with_prev` by @notriddle in #10419 . The bug is that it was traversing
the inline context nodes in the wrong order. It should start at the outermost
enclosing node, since the fragments might be at different nesting levels under
some common ancestor.
2016-04-16 10:30:01 -07:00
Patrick Walton
e840c7aaa0
layout: Make absolutely-positioned blocks not generate {ib} splits.
...
Improves YouTube.
Closes #10642 .
2016-04-15 17:27:25 -07:00
Matt Brubeck
d276e9bc4c
Remove an unnecessary Arc::clone
2016-04-06 15:06:51 -07:00
Michael Howell
2b75ef09f7
Whitespace stripping should not result in a dangling, open border.
2016-04-05 11:39:49 -07:00
Emilio Cobos Álvarez
4460712a8f
layout: Propagate selected_style to InlineFragmentNodeInfo
2016-03-30 14:28:13 +02:00
Emilio Cobos Álvarez
359f7b7953
layout: Fix whitespace selected style
2016-03-30 14:28:12 +02:00
Emilio Cobos Álvarez
5303048c06
layout: prevent an extra arc clone for selected_style
2016-03-30 14:28:11 +02:00
Emilio Cobos Álvarez
92f39ea5cf
Implement ::selection pseudo-element
2016-03-30 14:28:11 +02:00
bors-servo
0ec96ac02a
Auto merge of #10277 - perlun:rename-tcomputedvalues-to-computedvalues, r=SimonSapin
...
Renamed TComputedValues to ComputedValues
This is a followup to #10210 , and a continuation of #10185 .
<!-- 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/10277 )
<!-- Reviewable:end -->
2016-03-30 11:04:57 +05:30
bors-servo
44b2ba2547
Auto merge of #10255 - mbrubeck:box-unscanned, r=pcwalton
...
Reduce size of layout::fragment::Fragment struct
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
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/10255 )
<!-- Reviewable:end -->
2016-03-30 07:49:25 +05:30
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
Matt Brubeck
f0f0265139
Unbox IframeFragmentInfo.
2016-03-29 08:40:13 -07:00
Matt Brubeck
31261f045e
Put UnscannedTextFragmentInfo in a Box
...
This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
2016-03-29 08:40:05 -07: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
bors-servo
bed91b3334
Auto merge of #10176 - mbrubeck:selection-range, r=pcwalton
...
Highlight selected text in input fields
Fixes #9993 . This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
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/10176 )
<!-- Reviewable:end -->
2016-03-26 08:16:20 +05:30
Matt Brubeck
6171000875
Highlight selected text in input fields
...
Fixes #9993 . This does not yet allow stylesheets to set the selection colors;
instead it uses a hard-coded orange background and white foreground.
2016-03-24 18:33:26 -07:00
Bobby Holley
c2daea2c9c
Parameterize the rest of the style system on TNode.
2016-03-24 11:50:57 -07:00
Michael Howell
9d9c5398a8
Get the fundamentals of the HTMLDetailsElement rendering stuff working.
...
Still need to implement the style invalidation.
Part of #9395
2016-03-19 16:02:11 -07:00
Bobby Holley
539f839958
Remove lifetimes from LayoutNode and friends.
2016-03-14 14:31:57 -07:00
Bobby Holley
7c4dcaa677
Inline ObjectElement::get_type_and_data into the consumers.
...
The usage here doesn't quite work without the lifetimes.
2016-03-14 14:31:57 -07:00
Simon Sapin
f766e94259
Remove unused fixed_descendants: AbsoluteDescendants
...
… in `construct.rs` for multicol and table wrappers.
2016-01-28 09:43:14 +01:00