Commit graph

39 commits

Author SHA1 Message Date
Moonchild
81f60b575a Issue #1925 - Rename Corner to LogicalCorner and move it to nsStyleCoord.h.
To avoid confusion with mozilla::css::corner, rename ::Corner to
mozilla::LogicalCorner, and move it to nsStyleCoord.h from the illogical
nsCellMap.h location.
Also, append the LogicalCorner prefix to all the enum values, to match
the surrounding coding style.
2024-08-05 10:33:00 +08:00
Moonchild
c77b4b0bad Issue #2510 - Unprefix -moz-fit-content
No aliasing since this has been out for a while.
Devtools db regenerated with `mach devtools-css-db`

Resolves #2510
2024-05-08 09:59:34 +08:00
FranklinDM
4bf43b8fb4 Issue #2488 - Part 3: Remove the StyleSetHandle smart pointer class 2024-04-02 22:49:48 +08:00
FranklinDM
656ee639c5 Issue #2112 - Part 1: Remove Stylo tests 2024-04-02 22:29:48 +08:00
Moonchild
2f117eecaa Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from embedding, extensions, gfx, hal, ipc, layout, mailnews,
media and memory. More to come.
2023-05-05 22:57:19 +08:00
Moonchild
fa8bc1e81c Issue #1992 - Part 1: Un-prefix -moz-{min|max}-content keywords. 2022-09-23 11:03:34 +08:00
Moonchild
b27475f6a9 Issue #80 - Re-unify most of the layout engine 2022-09-09 10:12:59 +08:00
Job Bautista
5dc15ae641 Issue #1916 - Part 3: Sticky/relative position fixes in nsTableWrapperFrame.
Backported from Mozilla bug 1472602.
Didn't include the change in StickyScrollContainer.cpp because it breaks
 linking to libxul.so in the end. It's not important anyway.
2022-06-22 09:01:54 +08:00
Job Bautista
0423d83560 Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
2022-06-22 09:01:25 +08:00
Moonchild
975b2cbf74 [layout] Re-order rowgroups if reflowing.
This logic was missing for tfoot. See existing code in second hunk.
2020-10-30 09:08:17 +08:00
Moonchild
cc0dab1b67 [layout] Avoid negative availSize.BSizes in paginated table reflow. 2020-10-30 09:08:15 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
win7-7
edaea616b3 issue #1547 - Correct z-ordering for some table parts and add reftests 2020-05-16 06:49:44 +08:00
win7-7
c399e1938f Issue #1545 - Fix border-radius on table row groups, rows, column groups, or columns
Before issue #146, border-radius on row groups, rows, column groups, or columns don't apply to the background of each cell, yet the border-radius on the cell itself does.

After issue #146, the behaviors changed. In this patch, I tried to revert the behaviors of border-radius on table row groups, rows, column groups, or columns back to what happened before issue #146.

Also: Don't override GetBorderRadii in nsBCTableCellFrame.
2020-05-16 06:49:41 +08:00
Moonchild
db14a637c4 Issue #1543 - Align <img> with no src to the updated spec. 2020-05-16 06:49:14 +08:00
win7-7
9c783146b2 Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.

Part 2: Get rid of generic table painting code, and handle each class separately.

Part 4: Hoist outline skipping into col(group) frame code.

Part 5: Skip box-shadow for table column and column groups.

Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.

Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.

Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.

Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.

Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.

Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
2020-05-16 06:48:45 +08:00
win7-7
15794686d6 Issue #1355 - SetNeedToCalcHasBCBorders to true when initialize nsTableFrame
In the printing preview, we create continuous table frame if table is too long to containing in a page. But the default value of NeedToCalcHasBCBorders is false which means we don't calculate HasBCBorders for continuous table frame. Thus, the border collapse is not shown when printing preview.
2020-05-16 06:48:43 +08:00
win7-7
e15b1ba0ec Issue #1355 - Preemptively fix build bustage for 1409114 2020-05-16 06:48:36 +08:00
win7-7
85b85bac28 Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList
Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp
2020-05-16 06:48:33 +08:00
Moonchild
a892cb0808 Issue #80 - De-unify layout/tables 2020-05-02 08:28:38 +08:00
wolfbeast
1069ed9273 Issue #1355 - Make addition of cell border display items depend on
whether they should be drawn.

This reduces the size of display lists for tables by only adding display
list items that are actually going to be visibly drawn, which will help
overall performance of table drawing.
2020-03-20 08:58:29 +08:00
win7-7
e8bb5560f7 Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster
We can devirtualize it, remove some branches.
2020-02-18 07:15:09 +08:00
win7-7
528f0eb941 Issue #1355 - Do less work for columns not in the desired set in PaintRowGroupBackgroundByColIdx
Do less work in PaintRowGroupBackgroundByColIdx for cells that are not in our desired set of columns.

crash fix:

Guard against empty column groups when building a display list for a table.
2020-02-13 07:17:12 +08:00
win7-7
915358dfcb fix whitespace
fix whitespace.
2020-02-08 07:11:57 +08:00
win7-7
a05c6a317b Issue #1386 - Devirtualize GetRowSpan/GetColSpan
It's at ~1.5% on the perf log for the Netflix use case, which seems a bit too much.
2020-02-08 07:11:55 +08:00
win7-7
012bac1934 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-02-07 07:56:28 +08:00
wolfbeast
ec8e49b6f8 Issue #1378 - Follow-up: make sure background items remain table-aligned. 2020-02-07 07:55:58 +08:00
wolfbeast
598fe2fa1f Issue #1378 - Align the drawing of table cell backgrounds with the spec. 2020-02-07 07:52:25 +08:00
win7-7
02487fecd6 Issue #1355 - Speed up the traversal of a table row frame's child cells
Speed up getting the first cellframe in a row and the next cellframe after the given one
2020-01-31 07:44:18 +08:00
wolfbeast
4630022115 Issue #1309 - Fix handling of display rows where the elements are not
forming a monotonically increasing sequence (e.g. with position:sticky)

Relative positioning can cause table parts to move, which can cause
issues with the cursor position to know which rows can be skipped.
To make this work, use the max difference between the frame's rect and
the union of the frame's "normal" position and the overflow rect to
cover the area of relatively positioned elements even if they are out of
order.

This resolves #1309.
2019-12-02 15:46:02 +08:00
wolfbeast
d26e13657b Issue #146 - Part 6: Allow position: sticky on table elements. 2019-11-05 10:43:07 +08:00
wolfbeast
c8aaad0428 Issue #146 - Part 3: Create nsDisplayTableFixedPosition to avoid display
list collisions when processing the background image of a table.
2019-11-05 10:42:57 +08:00
wolfbeast
04db41da36 Issue #146 - Part 2: Remove custom table painting component.
Since we're now putting table borders and backgrounds properly in the
display lists, we no longer need this custom component to do this work
for us.
2019-11-05 10:42:54 +08:00
wolfbeast
8bd3a1f1d9 Issue #146 - Part 1: Draw each table's background on their own display
list items.

This patch does the following things:
1. Creates nsDisplayTableBorderCollapse that draws all collapse border
of tables.
2. Stops the use of nsDisplayTableBorderBackground.
3. Lets column and column group frames generate display items.
4. When traversing the table, also traverses the column and column group
frames.
5. For each type of table frame (col group, col, row group, row and
cell), draws their own background.
2019-11-05 10:42:52 +08:00
Gaming4JC
e4c397f0d9 Issue #1230 - Part 1: Fix Back-computing percentages for intrinsic sizing in Layout CSS-Grid
List of relevant patches applied:

1398537 part 2 - [css-multicol] Implement percentages for 'column-gap' (Gecko part).

1434478 part 1 - [css-grid] Stop back-computing percentage grid gaps when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 3 - Remove IntrinsicISizeOffsetData::hPctPadding/hPctMargin members since they are now unused.

1434478 part 4 - Factor out constants like NS_UNCONSTRAINEDSIZE so they can be used in headers without needing nsIFrame.h (idempotent patch).

1434478 part 5 - Create nsLayoutUtils::ResolveToLength for resolving CSS <length-percentage> (idempotent patch).

1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin.

This is needed only for CSS Grid since in other cases we're only using IntrinsicISizeOffsets in the inline-axis and the percentage basis is always indefinite for *intrinsic sizing*. When calculating the intrinsic size of grid items in the grid container's block axis however, we do have a definite size for the grid area in the inline-axis and it should be used per: https://drafts.csswg.org/css-grid/#algo-overview "2. Next, the track sizing algorithm resolves the sizes of the grid rows, using the grid column sizes calculated in the previous step." (Percentage padding/margin for grid items is always resolved against the grid area's inline-size nowadays.)
2019-10-05 07:22:11 +08:00
win7-7
922e819d1c Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
2019-07-05 21:32:14 +08:00
wolfbeast
dac78e3f8c Use device pixels instead of CSS pixels for table borders.
This resolves #821 (regression).
2019-02-16 00:15:17 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00