Commit graph

172 commits

Author SHA1 Message Date
Manish Goregaokar
19974e39c8 Merge fourth and fifth (assign block sizes / positions) passes 2018-02-27 09:43:38 -08:00
Manish Goregaokar
ef983c340f Remove outdated comment 2018-02-26 23:35:01 -08:00
Manish Goregaokar
0261762fa4 Handle overlarge rowspans by keeping track of largest leftover incoming sizes 2018-02-26 23:35:00 -08:00
Manish Goregaokar
108ecc1f4d Compute border spacing info beforehand 2018-02-26 22:20:26 -08:00
Manish Goregaokar
216082c342 Preserve information on incoming row sizes 2018-02-26 19:25:19 -08:00
Manish Goregaokar
e894c8b1bf Hacky rowspan support 2018-02-26 18:19:09 -08:00
Manish Goregaokar
2a0e1cd9c9 Assign table row block sizes in the parent table or rowgroup 2018-02-26 17:08:43 -08:00
Manish Goregaokar
285313f3c7 bail early for initial valued backgrounds 2018-02-21 00:36:35 -08:00
Manish Goregaokar
c36335e031 Remove table_style; tables already get their backgrounds painted correctly 2018-02-16 16:01:54 -08:00
Manish Goregaokar
180b29ae66 Unconditionally remove repaint damage for table cells/rows/rgs 2018-02-16 16:01:53 -08:00
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
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
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
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
Pyfisch
ea062e6e47 Create own file for background calculations in layout
Move display_list_builder.rs and webrender_helpers.rs
along with the new file to components/layout/display_list/

Remove apparently unused IdType enum.
Only variant used was OverflowClip.

See #19676
2018-01-06 20:19:32 +01:00
Matt Brubeck
c60cfc5a9f Turn flow::base and friends into methods 2017-12-14 12:16:45 -06:00
Keith Yeung
3465b2f14d Remove border_collapse field in InternalTable 2017-12-08 04:51:58 -08:00
Emilio Cobos Álvarez
af879523ea
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
2017-12-06 02:35:10 +01:00
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
Gecko Backout
11c64178d8 Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18809
2017-10-19 21:26:51 +00:00
Bastien Orivel
e8e2d0a4b2 Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
2017-10-19 15:01:17 +02:00
Martin Robinson
36fa7e4c44 Fix duplicate stacking context creation for anonymous Flows
Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.
2017-10-18 09:31:40 +02:00
Simon Sapin
b505c9e948 Introduce an unsafe HasBaseFlow trait for base()/base_mut() casts. 2017-10-14 00:03:57 +02:00
bors-servo
1da581f49b Auto merge of #18506 - mrobinson:position-sticky-table, r=emilio
Fix issues with the combination of position:sticky and tables

<!-- 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
- [ ] These changes fix #18441 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/18506)
<!-- Reviewable:end -->
2017-09-18 04:18:17 -05:00
Emilio Cobos Álvarez
2ac1327e4b
style: Make border-spacing serialization consistent, and move it to precomputed_type. 2017-09-17 21:33:17 +02:00
Martin Robinson
f1596e83a9 Fix panic when tables having position:sticky
We no longer do any stacking context or clip node creation for table
wrappers, instead relying on their TableFlows to do this.
2017-09-15 15:55:56 +02:00
bors-servo
b2df99cb65 Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio
Do some minor cleanups in display list building

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should not change behavior.

<!-- 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/18462)
<!-- Reviewable:end -->
2017-09-15 05:30:47 -05:00
Boris Chiou
b89286e8e7 Use CSSPixelLength in LengthOrPercentage{*}.
Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
2017-09-13 18:10:46 +08:00
Boris Chiou
a949e2a057 Introduce CSSPixelLength and update NonNegativeLength.
First, we define computed::CSSPixelLength which contains a CSSFloat, a
pixel value, and then we replace computed::Length with CSSPixelLength.
Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength,
FontRelativeLength, ViewportPercentageLength, CharacterWidth, and
PhysicalLength is CSSPixelLength.

Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength
with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
2017-09-13 18:05:14 +08:00
Martin Robinson
ee46bc57ed Separate stacking context collection and display list building state
These are two different passes during layout, but previously they
shared a state object. While some of the members are the same, many are
different so we separate them out into two separate objects. We also
change the HashMaps of these state objects to use the FnvHashMap.
2017-09-12 17:15:06 +02:00
bors-servo
f1fab036ab Auto merge of #18212 - mrobinson:position-sticky, r=emilio
Add support for position:sticky

This leverages the position:sticky support in WebRender to bring basic
support for position:sticky in Servo. There are still some issues with
nested sticky flows as well as a few other corner cases. Tests are
imported from WPT and can be removed once we update to the latest
version.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/18212)
<!-- Reviewable:end -->
2017-09-05 15:36:47 -05:00
Martin Robinson
bc455c8a1f Add support for position:sticky
This leverages the position:sticky support in WebRender to bring basic
support for position:sticky in Servo. There are still some issues with
nested sticky flows as well as a few other corner cases. Tests are
imported from WPT and can be removed once we update to the latest
version.
2017-09-05 09:10:55 +02:00
Keith Yeung
1df72ba935 Remove border collapse argument from compute_border_and_padding 2017-08-25 23:41:55 -07:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Matt Brubeck
a08bc13df9 Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
Boris Chiou
190cd5b952 Bug 1374233 - Part 5: Use NonNegativeLength and NonNegativeAu for border-spacing.
We already have NonNegativeLength and NonNegativeAu, so we can re-use it
to define the specified value and the computed value of border-spacing.
And then implement ToAnimatedValue for it.

MozReview-Commit-ID: CLckpKMYVXU
2017-08-04 14:22:36 +08:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
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).
2017-07-19 09:29:05 +02:00
Manish Goregaokar
808b1f509b stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it 2017-07-17 18:02:25 -07:00
Anthony Ramine
608e7f71a2 Make computed types hold Percentage instead of bare CSSFloat 2017-06-15 16:59:03 +02:00
Bobby Holley
7b0679848b Fix up script and layout. 2017-05-02 17:35:45 -07:00