From de32b77ceb9f1d02b6c71cbf72a50838344b4f43 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Fri, 12 Jan 2024 21:25:05 +0100 Subject: [PATCH] LibWeb: Use separate structure to represent fragments in paintable tree This is a part of refactoring towards making the paintable tree independent of the layout tree. Now, instead of transferring text fragments from the layout tree to the paintable tree during the layout commit phase, we allocate separate PaintableFragments that contain only the information necessary for painting. Doing this also allows us to get rid LineBoxes, as they are used only during layout. --- .../abspos-box-with-replaced-element.txt | 3 +- ...abspos-flex-container-with-auto-height.txt | 3 +- .../abspos-flexbox-with-auto-height.txt | 3 +- .../abspos-with-percentage-insets.txt | 6 +- Tests/LibWeb/Layout/expected/acid1.txt | 63 ++-- ...continue-to-inherit-style-after-change.txt | 6 +- .../expected/aspect-ratio-auto-and-ratio.txt | 3 +- .../Layout/expected/aspect-ratio-auto.txt | 3 +- .../Layout/expected/aspect-ratio-ratio.txt | 3 +- .../abspos-grid-with-definite-width.txt | 12 +- ...-inline-with-percentage-vertical-align.txt | 6 +- .../atomic-inline-with-white-space-nowrap.txt | 5 +- ...-consider-all-currently-stacked-floats.txt | 12 +- ...lock-level-floating-box-with-clearance.txt | 9 +- ...ock-with-fit-content-width-constraints.txt | 6 +- .../block-with-fit-content-width.txt | 3 +- ...block-with-hidden-overflow-after-float.txt | 6 +- ...th-hidden-overflow-after-sibling-float.txt | 12 +- .../block-with-max-content-width.txt | 9 +- .../block-with-min-content-width.txt | 18 +- ...egative-margin-and-no-intruding-floats.txt | 6 +- .../button-baseline-align.txt | 16 +- .../block-and-inline/button-image-only.txt | 6 +- ...should-have-vertically-aligned-content.txt | 9 +- .../block-and-inline/button-width.txt | 6 +- .../button-with-abspos-pseudo-element.txt | 3 +- .../button-with-after-pseudo.txt | 6 +- .../button-with-before-pseudo.txt | 6 +- ...tton-with-block-content-baseline-align.txt | 16 +- ...on-with-multiple-words-text-node-label.txt | 6 +- ...ton-with-text-node-label-and-font-size.txt | 6 +- .../button-with-text-node-label.txt | 6 +- ...ar-both-from-inline-formatting-context.txt | 9 +- ...ear-both-without-introducing-clearance.txt | 6 +- .../columns-33-percent-width.txt | 7 +- ...tainer-should-avoid-overlapping-floats.txt | 6 +- .../expected/block-and-inline/float-1.txt | 75 ++--- .../expected/block-and-inline/float-2.txt | 3 +- .../expected/block-and-inline/float-3.txt | 3 +- .../expected/block-and-inline/float-4.txt | 12 +- .../float-clear-by-line-break.txt | 12 +- ...d-right-with-justified-text-in-between.txt | 195 ++++++------ ...at-left-and-right-with-text-in-between.txt | 55 ++-- ...-content-containing-block-flex-display.txt | 6 +- .../float-max-content-containing-block.txt | 6 +- .../float-should-avoid-inline-block.txt | 12 +- .../block-and-inline/float-stress-1.txt | 58 ++-- .../block-and-inline/float-stress-2.txt | 6 +- .../block-and-inline/float-stress-3.txt | 3 +- .../floats-and-negative-margins.txt | 6 +- ...loats-with-negative-percentage-margins.txt | 9 +- ...ed-break-stops-non-whitespace-sequence.txt | 3 +- ...tainer-should-avoid-overlapping-floats.txt | 3 +- ...loat-left-and-sibling-with-margin-left.txt | 3 +- .../inline-block-baseline-1.txt | 11 +- .../inline-block-baseline-2.txt | 14 +- ...line-block-contained-by-abspos-element.txt | 21 +- .../inline-block-percentage-max-width.txt | 6 +- ...nline-block-with-max-width-fit-content.txt | 6 +- ...inline-block-with-negative-margin-left.txt | 5 +- ...nline-block-with-negative-margin-right.txt | 5 +- ...ht-and-auto-height-of-containing-block.txt | 6 +- .../inline-box-positioned-with-top-left.txt | 10 +- ...th-vertical-margins-vertical-align-top.txt | 7 +- .../inline-box-with-vertical-margins.txt | 7 +- ...e-node-not-inserted-into-generated-box.txt | 6 +- ...us-sibling-if-wrapped-in-anonymous-box.txt | 3 +- .../list-markers-intruded-by-float.txt | 18 +- .../block-and-inline/margin-collapse-1.txt | 6 +- .../block-and-inline/margin-collapse-2.txt | 9 +- .../block-and-inline/margin-collapse-5.txt | 6 +- .../margin-padding-block-inline-start.txt | 3 +- .../margin-padding-block-inline.txt | 3 +- ...max-width-for-box-with-inline-children.txt | 9 +- ...ontributes-to-intrinsic-size-of-parent.txt | 3 +- .../max-width-percentage-100-border-box.txt | 3 +- .../max-width-percentage-100.txt | 3 +- .../max-width-percentage-containing-block.txt | 3 +- .../max-width-wrapped-in-max-content.txt | 18 +- ...min-width-for-box-with-inline-children.txt | 3 +- ...bfc-width-to-avoid-overlap-with-floats.txt | 15 +- ...n-height-with-containing-block-padding.txt | 3 +- .../percentage-min-height.txt | 3 +- ...ith-max-content-containing-block-width.txt | 3 +- ...-with-indefinite-containing-block-size.txt | 3 +- .../block-and-inline/relpos-block.txt | 6 +- .../block-and-inline/relpos-float.txt | 6 +- .../relpos-inline-element-js-offsets.txt | 20 +- .../relpos-inline-elements.txt | 9 +- .../single-br-inline-layout.txt | 1 - .../small-percentage-margin.txt | 12 +- ...ns-set-zero-if-containing-size-smaller.txt | 9 +- ...-box-for-definite-sizes-without-layout.txt | 6 +- .../br-should-not-generate-pseudo-before.txt | 9 +- .../calc-font-size-with-percentages.txt | 6 +- Tests/LibWeb/Layout/expected/calc-with-fr.txt | 9 +- .../LibWeb/Layout/expected/css-all-unset.txt | 5 +- .../Layout/expected/css-dir-selector.txt | 48 +-- .../Layout/expected/css-font-size-calc.txt | 3 +- .../Layout/expected/css-font-size-math.txt | 11 +- .../css-host-selector-gets-parsed.txt | 3 +- .../Layout/expected/css-import-rule.txt | 3 +- .../css-imported-sheet-with-media-rule.txt | 3 +- ...css-line-height-percentage-inheritance.txt | 3 +- .../expected/css-namespace-rule-matches.txt | 3 +- .../expected/css-namespace-rule-no-match.txt | 3 +- .../css-namespace-tag-name-selector.txt | 10 +- .../css-pseudo-element-blockification.txt | 9 +- .../Layout/expected/css-quotes-nesting.txt | 97 +++--- Tests/LibWeb/Layout/expected/css-revert.txt | 3 +- .../expected/css-text-transform-math-auto.txt | 3 +- .../LibWeb/Layout/expected/details-closed.txt | 3 +- Tests/LibWeb/Layout/expected/details-open.txt | 6 +- .../display-contents-with-in-children.txt | 3 +- .../display-table-inline-children.txt | 3 +- Tests/LibWeb/Layout/expected/div_align.txt | 52 ++-- .../Layout/expected/div_align_nested.txt | 9 +- ...nt-crash-on-relayout-that-rewraps-text.txt | 12 +- .../expected/element-use-pseudo-element.txt | 3 +- Tests/LibWeb/Layout/expected/flex-auto.txt | 9 +- .../expected/flex-column-constained-wrap.txt | 9 +- .../flex-column-constrained-nowrap.txt | 9 +- ...n-height-constrained-width-constrained.txt | 9 +- .../flex-column-height-constrained.txt | 9 +- .../flex-column-height-unconstrained.txt | 9 +- ...mn-item-with-auto-height-and-max-width.txt | 15 +- ...g-auto-width-with-max-width-constraint.txt | 15 +- ...th-auto-height-depending-on-auto-width.txt | 15 +- .../flex-container-constrained-nowrap.txt | 9 +- .../flex-container-constrained-wrap.txt | 9 +- .../flex-container-width-constrained.txt | 9 +- .../flex-frozen-items-should-be-respected.txt | 15 +- .../Layout/expected/flex-grow-0-column.txt | 9 +- Tests/LibWeb/Layout/expected/flex-grow-1.txt | 9 +- Tests/LibWeb/Layout/expected/flex-grow-2.txt | 9 +- .../flex-item-auto-height-with-wrap.txt | 3 +- ...dding-relative-to-flex-container-width.txt | 3 +- ...lex-item-with-cyclic-percentage-height.txt | 3 +- .../flex-margin-auto-justify-content.txt | 9 +- Tests/LibWeb/Layout/expected/flex-row.txt | 9 +- .../LibWeb/Layout/expected/flex-shrink-1.txt | 18 +- .../LibWeb/Layout/expected/flex-shrink-2.txt | 9 +- .../LibWeb/Layout/expected/flex-shrink-3.txt | 9 +- ...child-static-position-with-align-items.txt | 27 +- ...d-static-position-with-justify-content.txt | 96 ++---- ...osition-with-padding-on-flex-container.txt | 3 +- .../flex/align-keywords-start-and-end.txt | 12 +- ...x-container-with-max-content-main-size.txt | 3 +- ...-baseline-with-inline-flex-empty-child.txt | 3 +- ...ment-does-not-get-blockified-by-itself.txt | 9 +- .../Layout/expected/flex/calc-flex-basis.txt | 12 +- ...-sizing-border-box-and-nonzero-padding.txt | 21 +- ...-column-item-with-percentage-max-width.txt | 3 +- ...-cross-size-with-max-content-main-size.txt | 3 +- .../flex/flex-item-min-width-fit-content.txt | 11 +- ...layout-dependent-containing-block-size.txt | 9 +- ...flex-row-reverse-with-centered-content.txt | 9 +- ...flex-shorthand-flex-basis-zero-percent.txt | 12 +- .../inf-available-space-with-auto-margins.txt | 3 +- ...ith-main-axis-margin-on-flex-container.txt | 6 +- ...mn-items-with-different-kinds-of-width.txt | 18 +- .../expected/flex/justify-content-1.txt | 288 ++++++------------ ...tify-content-space-between-single-item.txt | 3 +- ...justify-content-with-margin-auto-child.txt | 144 +++------ .../flex/list-container-display-contents.txt | 6 +- ...is-with-indefinite-flex-container-size.txt | 3 +- .../Layout/expected/flex/relpos-flex-item.txt | 6 +- ...ut-with-space-between-and-space-around.txt | 36 +-- .../Layout/expected/font-fractional-size.txt | 11 +- .../Layout/expected/font-size-legacy.txt | 3 +- .../LibWeb/Layout/expected/font-size-zero.txt | 3 +- .../expected/font-with-many-normal-values.txt | 15 +- ...etComputedStyle-on-unconnected-element.txt | 3 +- .../Layout/expected/grid/abspos-item.txt | 6 +- .../Layout/expected/grid/align-items.txt | 18 +- .../Layout/expected/grid/align-self.txt | 18 +- .../expected/grid/all-implicit-rows.txt | 12 +- .../expected/grid/anonymous-inline-child.txt | 3 +- .../auto-fill-and-named-line-placement.txt | 3 +- .../Layout/expected/grid/auto-fill-rows.txt | 9 +- .../LibWeb/Layout/expected/grid/auto-fill.txt | 9 +- .../grid/auto-fit-collapse-empty-tracks.txt | 3 +- .../LibWeb/Layout/expected/grid/auto-fit.txt | 9 +- .../grid/auto-flow-column-spanning-item.txt | 3 +- .../Layout/expected/grid/auto-flow-column.txt | 6 +- Tests/LibWeb/Layout/expected/grid/basic-2.txt | 6 +- Tests/LibWeb/Layout/expected/grid/basic.txt | 12 +- Tests/LibWeb/Layout/expected/grid/borders.txt | 57 ++-- .../Layout/expected/grid/calc-track-size.txt | 3 +- .../grid/columns-auto-fill-with-gap-2.txt | 6 +- .../expected/grid/container-min-height.txt | 6 +- .../expected/grid/different-column-sizes.txt | 12 +- ...bute-extra-space-across-spanned-tracks.txt | 6 +- .../grid/float-container-columns-1fr-1fr.txt | 12 +- .../grid/floating-table-wrapper-width.txt | 12 +- .../Layout/expected/grid/grid-gap-1.txt | 12 +- .../Layout/expected/grid/grid-gap-2.txt | 6 +- .../Layout/expected/grid/grid-gap-3.txt | 3 +- .../grid/grid-item-fixed-paddings.txt | 12 +- .../expected/grid/grid-item-fixed-size.txt | 3 +- .../grid-item-horizontal-margins-auto.txt | 72 ++--- .../expected/grid/grid-item-min-size.txt | 6 +- .../grid/grid-item-percentage-margins.txt | 3 +- .../grid/grid-item-percentage-width-2.txt | 54 ++-- .../grid/grid-item-percentage-width.txt | 6 +- .../grid/grid-item-with-fit-content-width.txt | 3 +- ...id-row-height-affected-by-item-margins.txt | 3 +- .../Layout/expected/grid/grid-span-4.txt | 6 +- .../grid/grid-template-areas-basics.txt | 9 +- ...template-columns-with-min-css-function.txt | 3 +- .../Layout/expected/grid/grid-template.txt | 12 +- .../expected/grid/grow-beyond-limits.txt | 3 +- .../Layout/expected/grid/image-in-grid.txt | 3 +- .../Layout/expected/grid/implicit-lines.txt | 9 +- .../expected/grid/inline-grid-simple.txt | 6 +- .../expected/grid/intrinsic-sized-column.txt | 3 +- .../expected/grid/intrinsic-sized-grid-2.txt | 6 +- .../expected/grid/intrinsic-sized-grid.txt | 3 +- .../item-align-self-center-and-max-height.txt | 3 +- .../item-align-self-center-and-min-height.txt | 3 +- .../expected/grid/item-column-span-2.txt | 6 +- .../expected/grid/item-fit-content-width.txt | 6 +- .../grid/item-with-box-sizing-border-box.txt | 6 +- ...n-content-size-should-account-paddings.txt | 3 +- .../Layout/expected/grid/justify-content.txt | 30 +- .../Layout/expected/grid/justify-items.txt | 9 +- .../Layout/expected/grid/justify-self.txt | 9 +- .../expected/grid/justify-start-min-width.txt | 3 +- .../grid/line-placement-with-repeat.txt | 3 +- ...-grid-container-wrapper-in-max-content.txt | 18 +- .../Layout/expected/grid/min-max-content.txt | 9 +- .../LibWeb/Layout/expected/grid/minmax-1.txt | 6 +- .../LibWeb/Layout/expected/grid/minmax-2.txt | 6 +- .../LibWeb/Layout/expected/grid/minmax-3.txt | 9 +- .../Layout/expected/grid/minmax-invalid-1.txt | 6 +- .../grid/minmax-with-max-function-inside.txt | 12 +- .../grid/negative-grid-item-column-index.txt | 27 +- Tests/LibWeb/Layout/expected/grid/order.txt | 9 +- .../grid/place-items-center-nested-grids.txt | 15 +- .../expected/grid/place-items-center.txt | 3 +- .../Layout/expected/grid/place-self.txt | 18 +- .../Layout/expected/grid/placement-1.txt | 6 +- .../Layout/expected/grid/placement-2.txt | 6 +- .../Layout/expected/grid/placement-3.txt | 6 +- .../Layout/expected/grid/placement-4.txt | 6 +- .../grid/placement-using-named-tracks-1.txt | 6 +- .../grid/placement-using-named-tracks-2.txt | 12 +- .../grid/placement-using-named-tracks-3.txt | 12 +- .../Layout/expected/grid/relpos-grid-item.txt | 6 +- Tests/LibWeb/Layout/expected/grid/repeat.txt | 30 +- .../Layout/expected/grid/row-height.txt | 12 +- .../expected/grid/row-span-2-maxcontent.txt | 87 ++---- .../expected/grid/row-span-2-mincontent.txt | 168 ++++------ .../expected/grid/row-span-2-with-gaps.txt | 90 ++---- .../Layout/expected/grid/row-span-2.txt | 87 ++---- .../Layout/expected/grid/rows-1fr-1fr.txt | 3 +- ...nfinite-spinning-in-space-distribution.txt | 6 +- .../should-not-hang-in-size-distribution.txt | 3 +- .../Layout/expected/grid/template-areas-1.txt | 6 +- .../Layout/expected/grid/template-areas-2.txt | 6 +- .../Layout/expected/grid/template-areas-3.txt | 15 +- .../grid/template-lines-and-areas.txt | 6 +- .../grid/track-size-calc-with-percentage.txt | 3 +- .../grid/two-items-spanning-one-1fr-row.txt | 6 +- .../grid/unresolvable-percentage-track.txt | 3 +- .../expected/grid/valid-grid-areas-1.txt | 3 +- .../expected/grid/vertical-margins-auto.txt | 3 +- .../expected/height-min-max-fit-content.txt | 11 +- ...-of-absolute-position-box-with-padding.txt | 3 +- ...ge-with-multiple-constraint-violations.txt | 3 +- ...with-box-sizing-border-box-and-padding.txt | 5 +- ...-and-indefinite-containing-block-width.txt | 3 +- ...and-min-content-containing-block-width.txt | 3 +- ...put-no-newline-at-eof-should-not-crash.txt | 3 +- ...nline-block-treat-100pct-width-as-auto.txt | 6 +- Tests/LibWeb/Layout/expected/inline-size.txt | 7 +- .../input-element-with-display-inline.txt | 3 +- ...text-node-invalidation-on-value-change.txt | 6 +- .../expected/inset-shorthand-property.txt | 3 +- .../expected/line-height-calc-number.txt | 3 +- .../expected/media-query-resolution.txt | 9 +- .../Layout/expected/negative-max-size.txt | 3 +- .../nowrap-and-no-line-break-opportunity.txt | 7 +- Tests/LibWeb/Layout/expected/ordered-list.txt | 21 +- ...containing-block-has-indefinite-height.txt | 15 +- .../expected/picture-source-media-query.txt | 3 +- .../place-content-shorthand-property.txt | 3 +- Tests/LibWeb/Layout/expected/pre.txt | 3 +- ...seudo-element-with-custom-properties-2.txt | 22 +- .../replaced-box-with-vertical-margins.txt | 7 +- .../expected/replaced-within-max-content.txt | 3 +- ...ero-when-available-size-is-min-content.txt | 12 +- .../resolve-height-of-containing-block.txt | 3 +- .../expected/set-margin-of-floating-box.txt | 3 +- ...w-tree-removed-from-dom-receives-event.txt | 3 +- .../space-is-soft-line-break-opportunity.txt | 6 +- ...e-invalidation-line-height-propagation.txt | 6 +- .../expected/svg-preserve-aspect-ratio.txt | 50 ++- .../Layout/expected/svg-text-with-viewbox.txt | 3 +- .../expected/svg-transforms-and-viewboxes.txt | 25 +- ...with-indefinite-containing-block-width.txt | 3 +- .../expected/svg/objectBoundingBox-mask.txt | 3 +- .../svg/svg-different-types-of-opacity.txt | 3 +- .../expected/svg/svg-fill-with-bogus-url.txt | 3 +- .../expected/svg/svg-g-with-opacity.txt | 3 +- .../Layout/expected/svg/svg-inside-svg.txt | 3 +- .../svg-negative-elliptical-arg-number.txt | 3 +- .../svg/svg-path-with-implicit-lineto.txt | 3 +- .../expected/svg/svg-symbol-with-viewbox.txt | 3 +- ...with-css-variable-in-presentation-hint.txt | 3 +- ...ith-zero-intrinsic-size-and-no-viewbox.txt | 7 +- .../svg/svg-with-zero-sized-viewBox.txt | 3 +- .../Layout/expected/svg/text-fill-none.txt | 3 +- .../expected/table/align-top-and-bottom.txt | 12 +- .../Layout/expected/table/auto-height.txt | 6 +- .../Layout/expected/table/auto-margins.txt | 3 +- .../avoid-div-by-zero-in-table-measures.txt | 3 +- Tests/LibWeb/Layout/expected/table/basic.txt | 12 +- .../border-attribute-overridden-by-css.txt | 3 +- .../expected/table/border-attribute.txt | 3 +- .../table/border-collapse-is-inherited.txt | 48 +-- .../border-conflict-resolution-with-cell.txt | 18 +- .../border-conflict-resolution-with-col.txt | 12 +- .../border-conflict-resolution-with-row.txt | 18 +- ...rder-conflict-resolution-with-rowgroup.txt | 18 +- ...border-spacing-and-borders-table-width.txt | 6 +- .../expected/table/border-spacing-colspan.txt | 42 +-- .../expected/table/border-spacing-rowspan.txt | 42 +-- .../border-spacing-with-percentage-width.txt | 9 +- .../Layout/expected/table/border-spacing.txt | 45 +-- .../LibWeb/Layout/expected/table/borders.txt | 72 ++--- .../Layout/expected/table/bottom-caption.txt | 12 +- ...-auto-max-width-table-percentage-width.txt | 9 +- ...cell-relative-to-specified-table-width.txt | 18 +- .../expected/table/cell-with-max-width.txt | 18 +- .../table/clip-spans-to-table-end.txt | 18 +- .../table/colspan-percentage-width.txt | 15 +- .../colspan-weighted-width-distribution.txt | 9 +- .../table/colspan-width-distribution.txt | 9 +- .../colspan-with-trailing-characters.txt | 24 +- .../table/columns-width-distribution-1.txt | 18 +- ...ed-layout-percentage-width-all-columns.txt | 24 +- .../table/fixed-layout-percentage-width.txt | 24 +- .../fixed-layout-pixel-width-all-columns.txt | 24 +- .../table/fixed-layout-pixel-width.txt | 30 +- .../Layout/expected/table/fixed-layout.txt | 24 +- .../Layout/expected/table/fixed-margins.txt | 6 +- .../table/in-auto-height-flex-item.txt | 3 +- .../expected/table/inline-table-width.txt | 15 +- .../expected/table/internal-alignment.txt | 3 +- ...eyword-value-does-not-constrain-column.txt | 3 +- .../expected/table/line-breaking-in-cells.txt | 12 +- .../table/long-caption-increases-width.txt | 24 +- .../table/missing-cells-with-span.txt | 12 +- .../Layout/expected/table/missing-cells.txt | 12 +- .../Layout/expected/table/multi-line-cell.txt | 9 +- .../expected/table/nested-table-alignment.txt | 3 +- .../expected/table/nested-table-box-width.txt | 12 +- .../table/percentage-width-columns.txt | 9 +- ...ge-width-for-nested-table-is-like-auto.txt | 3 +- .../percentage-width-max-width-columns.txt | 9 +- .../row-outer-size-with-computed-size.txt | 3 +- .../table/row-span-and-nested-tables.txt | 15 +- .../table/rows-height-distribution-3.txt | 6 +- .../table/rows-height-distribution-4.txt | 6 +- .../rowspan-with-trailing-characters.txt | 48 +-- .../LibWeb/Layout/expected/table/rowspan.txt | 33 +- Tests/LibWeb/Layout/expected/table/size.txt | 3 +- ...percentage-column-widths-less-than-100.txt | 9 +- .../table/table-align-center-with-margin.txt | 3 +- .../expected/table/table-align-center.txt | 3 +- .../table/table-cell-not-paintable.txt | 3 +- .../expected/table/table-cellpadding.txt | 9 +- .../table-fixup-font-size-and-line-height.txt | 3 +- ...e-formation-with-rowspan-in-the-middle.txt | 24 +- .../table/table-header-and-footer-groups.txt | 6 +- .../Layout/expected/table/td-valign.txt | 9 +- .../table/top-caption-with-padding.txt | 6 +- ...strained-columns-increased-size-on-col.txt | 6 +- ...on-and-constrained-columns-size-on-col.txt | 6 +- ...h-distribution-and-constrained-columns.txt | 6 +- ...th-distribution-of-max-width-increment.txt | 9 +- .../text-align-justify-with-forced-break.txt | 66 ++-- .../Layout/expected/text-align-overflow.txt | 3 +- Tests/LibWeb/Layout/expected/text-indent.txt | 18 +- .../Layout/expected/textarea-content.txt | 13 +- .../expected/textnode-width-bitmap-font.txt | 3 +- ...-be-xhtml-file-should-decode-correctly.txt | 3 +- .../vertical-padding-relative-to-cb-width.txt | 6 +- Userland/Libraries/LibWeb/CMakeLists.txt | 1 + Userland/Libraries/LibWeb/Dump.cpp | 42 +-- .../Libraries/LibWeb/Layout/LayoutState.cpp | 65 ++-- .../LibWeb/Layout/LineBoxFragment.cpp | 109 ------- .../Libraries/LibWeb/Layout/LineBoxFragment.h | 24 +- .../LibWeb/Painting/InlinePaintable.cpp | 6 +- .../LibWeb/Painting/PaintableBox.cpp | 131 ++++---- .../Libraries/LibWeb/Painting/PaintableBox.h | 32 +- .../LibWeb/Painting/PaintableFragment.cpp | 141 +++++++++ .../LibWeb/Painting/PaintableFragment.h | 59 ++++ .../LibWeb/Painting/ShadowPainting.cpp | 5 +- .../LibWeb/Painting/ShadowPainting.h | 3 +- 401 files changed, 2122 insertions(+), 3614 deletions(-) create mode 100644 Userland/Libraries/LibWeb/Painting/PaintableFragment.cpp create mode 100644 Userland/Libraries/LibWeb/Painting/PaintableFragment.h diff --git a/Tests/LibWeb/Layout/expected/abspos-box-with-replaced-element.txt b/Tests/LibWeb/Layout/expected/abspos-box-with-replaced-element.txt index 2d5f6823f7..76806becf0 100644 --- a/Tests/LibWeb/Layout/expected/abspos-box-with-replaced-element.txt +++ b/Tests/LibWeb/Layout/expected/abspos-box-with-replaced-element.txt @@ -2,8 +2,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (1,1) content-size 798x0 [BFC] children: not-inline BlockContainer at (10,10) content-size 500x100 positioned [BFC] children: not-inline BlockContainer at (261,11) content-size 248x28.46875 positioned [BFC] children: inline - line 0 width: 250, height: 28.46875, bottom: 28.46875, baseline: 28.46875 - frag 0 from ImageBox start: 0, length: 0, rect: [262,12 248x26.46875] + frag 0 from ImageBox start: 0, length: 0, rect: [262,12 248x26.46875] baseline: 28.46875 ImageBox at (262,12) content-size 248x26.46875 children: not-inline ViewportPaintable (Viewport<#document>) [0,0 800x600] diff --git a/Tests/LibWeb/Layout/expected/abspos-flex-container-with-auto-height.txt b/Tests/LibWeb/Layout/expected/abspos-flex-container-with-auto-height.txt index b0a1134fa3..8751debfe6 100644 --- a/Tests/LibWeb/Layout/expected/abspos-flex-container-with-auto-height.txt +++ b/Tests/LibWeb/Layout/expected/abspos-flex-container-with-auto-height.txt @@ -2,8 +2,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (1,1) content-size 798x0 [BFC] children: not-inline Box at (9,9) content-size 512.859375x19 positioned flex-container(column) [FFC] children: not-inline BlockContainer
at (10,10) content-size 510.859375x17 flex-item [BFC] children: inline - line 0 width: 510.859375, height: 17, bottom: 17, baseline: 13.296875 - frag 0 from TextNode start: 0, length: 60, rect: [10,10 510.859375x17] + frag 0 from TextNode start: 0, length: 60, rect: [10,10 510.859375x17] baseline: 13.296875 "Diese Website nutzt Cookies und vergleichbare Funktionen zur" TextNode <#text> diff --git a/Tests/LibWeb/Layout/expected/abspos-flexbox-with-auto-height.txt b/Tests/LibWeb/Layout/expected/abspos-flexbox-with-auto-height.txt index a50eed4304..ae65a680f0 100644 --- a/Tests/LibWeb/Layout/expected/abspos-flexbox-with-auto-height.txt +++ b/Tests/LibWeb/Layout/expected/abspos-flexbox-with-auto-height.txt @@ -3,8 +3,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline BlockContainer at (10,10) content-size 780x0 children: not-inline Box