Commit graph

2720 commits

Author SHA1 Message Date
Manish Goregaokar
c2de3eb9ac Check visibility beforehand 2018-02-16 16:01:52 -08:00
Manish Goregaokar
f796823b94 Handle rowspan 2018-02-16 16:01:51 -08:00
Manish Goregaokar
cfa81e8b79 Refactor column index advancing into its own method 2018-02-16 16:01:50 -08:00
Manish Goregaokar
b72a50d50a Pass down full ComputedValues to TableCellStyleInfo; use for correct color computation 2018-02-16 16:01:49 -08:00
Manish Goregaokar
21140e7a0a Make TableCellStyleIterator operate on immutable flows 2018-02-16 16:01:49 -08:00
Manish Goregaokar
265a2ab2cc Allow for build_display_list to be called immutably 2018-02-16 16:01:48 -08:00
Manish Goregaokar
5cd15eeb54 Don't redraw backgrounds that we've already drawn 2018-02-16 16:01:47 -08:00
Manish Goregaokar
db6ec58e6b Generate display lists for table cells during display list generation for their table parent 2018-02-16 16:01:46 -08:00
Manish Goregaokar
6232846699 Add stacking_relative_border_box_for_display_list 2018-02-16 16:01:46 -08:00
Manish Goregaokar
f7ac5d712f Add build_display_list_for_background_if_applicable_with_background 2018-02-16 16:01:45 -08:00
Manish Goregaokar
f3531d1d35 Factor out BlockFlow::background_border_section() 2018-02-16 16:01:44 -08:00
Manish Goregaokar
836e59e5b6 Handle colspan in TableCellStyleIterator 2018-02-16 16:01:44 -08:00
Manish Goregaokar
6317c44ab4 Add Iterator impl for TableCellStyleIterator 2018-02-16 16:01:43 -08:00
Manish Goregaokar
1dd5bed031 Create TableCellStyleIterator 2018-02-16 16:01:42 -08:00
Manish Goregaokar
35be0c50f6 Add TableRowAndGroupIterator 2018-02-16 16:01:41 -08:00
Manish Goregaokar
b416bb3aa7 Add get_column_styles for getting column structure and styles for a table 2018-02-16 16:01:41 -08:00
bors-servo
9e64008e75
Auto merge of #19754 - ferjm:innertext, r=mbrubeck
Implement element.innerText getter

<!-- 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/19754)
<!-- Reviewable:end -->
2018-02-13 03:41:48 -05:00
Fernando Jiménez Moreno
2a4535f43e Implement element.innerText getter 2018-02-13 09:12:00 +01:00
Pyfisch
5697171ed6 Use Rect::inner_rect from euclid
Update euclid.
2018-02-08 16:45:27 +01:00
bors-servo
03a1a014ae
Auto merge of #19931 - pyfisch:float-bounds, r=mrobinson
Use LayoutRects for bounds and overflow in display lists

Convert text runs to glyphs in display list builder.
Remove ComplexClippingRegion and use the WebRender type.

<!-- 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/19931)
<!-- Reviewable:end -->
2018-02-07 07:11:41 -05:00
Pyfisch
931f0fcd1d Use rect shorthand constructor in display list builder 2018-02-07 12:21:08 +01:00
Pyfisch
46ada747b0 Use LayoutRects for bounds and overflow in display lists
Convert text runs to glyphs in display list builder.
Remove ComplexClippingRegion and use the WebRender type.
2018-02-07 12:21:08 +01:00
bors-servo
5d209a70ab
Auto merge of #19970 - janczer:change_debug_assertions, r=emilio
Change debug assertions to specific ones

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #19962 (github issue number if applicable).

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19970)
<!-- Reviewable:end -->
2018-02-07 06:20:36 -05:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
bors-servo
804b4b3db6
Auto merge of #19957 - gootorov:move-counter-from-mako, r=emilio
style: Move content property out of mako.

<!-- Please describe your changes on the following line: -->
r? emilio

---
<!-- 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 build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19936 (github issue number if applicable).

<!-- Either: -->
- [x] These changes do not require tests

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19957)
<!-- Reviewable:end -->
2018-02-06 17:39:03 -05:00
Igor Gutorov
7a00066477 style: Move content property out of mako. 2018-02-07 00:11:57 +02:00
Martin Robinson
99eb457fc7 Update WebRender
This allows servo to use the ExternalScrollId API from WebRender fixing
some issues related to duplicate scroll root ids.

Fixes #17176.
Fixes #19287.
Fixes #19648.
2018-02-06 15:10:35 +01:00
Anthony Ramine
df11a7fec7 Simplify counter CSS properties 2018-02-04 14:52:38 +01:00
bors-servo
38ef515463
Auto merge of #19529 - DonatJR:counter-reset-out-of-mako, r=emilio
style: moved css longhand counter-reset out of mako

<!-- Please describe your changes on the following line: -->
This is a sub-PR of #19015
Code does not yet compile with `build-geckolib`.
r? emilio

---
<!-- 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 #19387

<!-- Either: -->
- [x] These changes do not require tests

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19529)
<!-- Reviewable:end -->
2018-02-01 09:42:40 -06:00
Jonas Reinwald
d24301b7a0
moved css longhand counter-reset out of mako 2018-02-01 15:43:40 +01:00
Mauricio Collares
8e411105ce
style: Rename background::RepeatKeyword and border::RepeatKeyword. 2018-02-01 15:23:41 +01:00
chansuke
50b517d0db
style: Move border-image-repeat outside of mako. 2018-02-01 13:59:10 +01:00
Pyfisch
8bb50ac0b9 Use more WebRender types in gfx
Removes ImageBorder details from gfx.
Use WebRender BorderRadius in BoxShadow.
Stores cursors as integer.
Use FilterOp, BorderWidths from WebRender.
Store content_rect as LayoutRect.
2018-01-30 11:37:20 +01:00
Jon Leighton
fe583fc5d0 Add layout RPC query for getting an element's style
This enables us to implement Element::has_css_layout_box() in a more
direct way, and also enables us to remove some of the existing more
specific queries.

Fixes #19811.
2018-01-28 10:59:45 +01:00
CYBAI
baccc4eda2 Use specific negative assertion for layout floats 2018-01-26 01:55:24 +08:00
CYBAI
bb7964a4bb Use specific assertion for layout multicol 2018-01-26 01:01:01 +08:00
CYBAI
da4a4475de Use specific assertion for layout layout_debug 2018-01-26 01:01:01 +08:00
bors-servo
9c13073075 Auto merge of #19688 - Manishearth:linebreak, r=mbrubeck
Detect adjoining text fragments with no line break opportunity between them

First attempt at https://github.com/servo/servo/issues/874

<!-- 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/19688)
<!-- Reviewable:end -->
2018-01-24 22:42:59 -06:00
Jon Leighton
84713df622 Allow floats to impact list item marker position
Although not required by the specification, this matches the rendering
of Gecko and Blink.

Fixes #19796.
2018-01-24 12:26:32 +01:00
Manish Goregaokar
fc97f0b464 do not preserve suppress flag on second half of split 2018-01-24 14:31:07 +05:30
Manish Goregaokar
f3c81fcda8 Share line breaking state across text runs
Fixes #874
2018-01-24 12:51:33 +05:30
Emilio Cobos Álvarez
5ac12b5df4
style: Make the TElement type arrive to the cascade function.
Not super-proud of this one, but it's the easiest way I could think of.

The changeset looks bigger than what it is, because while at it I've rewrapped a
fair amount of functions around to use proper block indentation.

Alternatives are parameterizing Stylist by <E>, which is not fun, or moving the
concrete element from layout_thread to layout, but that implies layout depending
on script, which isn't fun either.

Other alternative is implementing an empty enum and making anon boxes work on
it. It has the advantage of removing the annoying type parameter, but the
disadvantage of instantiating `cascade` twice, which isn't great, and having to
maintain all the boilerplate of a `TElement` implementation that just does
nothing.
2018-01-23 00:57:54 +01:00
bors-servo
c1ed4bb2d5 Auto merge of #19829 - servo:rustup, r=nox
Update Rust and use the newly-stable std::ptr::NonNull

<!-- 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/19829)
<!-- Reviewable:end -->
2018-01-22 11:11:44 -06:00
Simon Sapin
10ec5a2bb0 Replace NonZero<*{const,mut} _> with std::ptr::NonNull 2018-01-22 17:41:25 +01:00
Simon Sapin
897a5b39c5 Fix some "unnecessary parentheses" warnings 2018-01-22 17:41:25 +01:00
bors-servo
ec8975b18d Auto merge of #19789 - ferjm:issue-18831-fb-layout, r=mbrubeck
Do not leave space below baseline when it is not needed (i.e.there is…

… no text)

This is my first layout fix and a naive approach to fix #18831.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18831

<!-- 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/19789)
<!-- Reviewable:end -->
2018-01-22 08:14:29 -06:00
Fernando Jiménez Moreno
a241bed53c Do not leave space below baseline when it is not needed (i.e.there is no text) 2018-01-22 11:38:39 +01:00
bors-servo
59033e6970 Auto merge of #19798 - gootorov:move_cursor_from_mako, r=emilio
style: Move cursor property out of mako

<!-- Please describe your changes on the following line: -->
Sub-PR of #19015

r? emilio

---
<!-- 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 build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19775 (github issue number if applicable).

<!-- Either: -->
- [x] These changes do not require tests

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19798)
<!-- Reviewable:end -->
2018-01-20 12:10:58 -06:00
Igor Gutorov
4ee9eb8563 style: Move cursor property out of mako 2018-01-20 19:06:29 +02:00
Anthony Ramine
a311e0f569 Merge layout and layout_tests 2018-01-20 15:33:39 +01:00