Removed the Reflow Input in nsIFrame. Added includes for ReflowInput as
necessary in cpp files. Also Forward Declared nsLineLayout in 3 header
files.
Differential Revision: https://phabricator.services.mozilla.com/D298203
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.
Differential Revision: https://phabricator.services.mozilla.com/D293645
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.
Differential Revision: https://phabricator.services.mozilla.com/D293645
This reverts commit 656073d672.
Revert "Bug 2029867 - Unify synthesis of margin-based and content/padding/border-based box baselines. r=layout-reviewers,dshin"
This reverts commit 40a9b5db71.
Revert "Bug 2029864 - Adjust 1083848-3-inline-background-repeat.html with more robust font size handling. r=layout-reviewers,dshin"
This reverts commit 708a2904ee.
Revert "Bug 2029864 - Adjust 1115916-1-vertical-metrics.html reftest with more robust Ahem font size. r=layout-reviewers,dshin"
This reverts commit 677a5812f8.
Revert "Bug 2029864 - Adjust WPT tests for text-emphasis line heights. r=layout-reviewers,dshin"
This reverts commit c50c152a44.
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.
Differential Revision: https://phabricator.services.mozilla.com/D293645
This reverts commit 57ab38fd30.
Revert "Bug 2029867 - Unify synthesis of margin-based and content/padding/border-based box baselines. r=layout-reviewers,dshin"
This reverts commit 2c125c7bae.
Revert "Bug 2029864 - Adjust 1083848-3-inline-background-repeat.html with more robust font size handling. r=layout-reviewers,dshin"
This reverts commit 79a72f0bba.
Revert "Bug 2029864 - Adjust 1115916-1-vertical-metrics.html reftest with more robust Ahem font size. r=layout-reviewers,dshin"
This reverts commit 1e038f073e.
Revert "Bug 2029864 - Adjust WPT tests for text-emphasis line heights. r=layout-reviewers,dshin"
This reverts commit bf7b7bf2d3.
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.
Differential Revision: https://phabricator.services.mozilla.com/D293645
No need to reposition views during layout and so on, now that we don't
use views for either popups nor subdocuments.
No need for nsView to have parent / sibling / children either.
Differential Revision: https://phabricator.services.mozilla.com/D271205
No behavior change, but this saves some per-child work and conceptually
is the right thing to do. HidesContent() is non-trivial.
Add an assertion to make sure we don't enter BuildDisplayListForChild
at all if content is hidden.
I audited all the callers, and the ones I didn't touch can't have
content-visibility (things like the viewport / pages / etc).
Differential Revision: https://phabricator.services.mozilla.com/D265956
We can't get text-align right during the initial table reflow because the
inline-size within which the cell content is to be aligned is not yet known
(it'll come from the block-size we compute for the parent row).
So to deal with this, we record during tableRowFrame reflow whether any
cells with orthogonal writing mode were present; and if so, at the end of
the row reflow, we make another pass over the orthogonal cells and reflow
them to properly align their content within the computed cell size.
Differential Revision: https://phabricator.services.mozilla.com/D245615
A potentially better approach could be to call FrameNeedsReflow from
nsBCTableCellFrame::SetBorderWidth... But it seems that might
over-invalidate quite a lot when recalculating borders, since it seems
we reset the relevant ones and then accumulate directly on the frame.
If that seems like a better approach, happy to give that a try. This
should be less risky for performance changes in general tho.
Differential Revision: https://phabricator.services.mozilla.com/D216409
When printing tables, if a table row group is split across the page boundary,
its table-cell descendants with `vertical-align:baseline|middle|bottom|` do not
align as expected and there might be data loss. Currently, we reflow the table
row frames first, and then call DidResize() [1] to move table cells to their
vertical-align positions via BlockDirAlignChild() [2] . This is fine if the
table is in gallery mode or can fit in one page, but it doesn't work if it is
across the page boundary.
To fix this properly, we need to rewrite the table fragmentation code so that
the a table cell is reflowed in its aligned position with a correct constrained
available bsize. In the meantime, this patch works around the data loss by
forcing table-cells to use `vertical-align:top`. This is a hack, but it also
matches Google Chrome's current behavior. I feel this is a good interim solution
to improve our printing quality.
[1] https://searchfox.org/mozilla-central/rev/2537e5eaafaab9a7ef6be5cfc8e9b1e2c747fdfd/layout/tables/nsTableRowGroupFrame.cpp#1119-1125
[2] https://searchfox.org/mozilla-central/rev/2537e5eaafaab9a7ef6be5cfc8e9b1e2c747fdfd/layout/tables/nsTableRowFrame.cpp#370-372
Differential Revision: https://phabricator.services.mozilla.com/D205538
We really don't need to call `GetNextRow()` repeatedly from `aStartRow` until
reaching `aRow`.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D192048
* It used to return useless `nsresult`. Change it to return the block-size
instead of modifying the argument to return value.
* Shorten its name to `CalcCellActualBSize` to match `CalcBSize`.
Differential Revision: https://phabricator.services.mozilla.com/D190377
While I'm here, revise GetFirstRow(), GetLastRow(), and GetNextRow(), and add
assertions to them to ensure the correctness of table frame tree structure.
Differential Revision: https://phabricator.services.mozilla.com/D190376
nsTableRowFrame's children are all nsTableCellFrame, and `GetFirstCell()` has an
assertion for that. Hence, we can delete the unreachable code dealing with
non-cell frames.
Differential Revision: https://phabricator.services.mozilla.com/D190375
We don't ever remove `NS_TABLE_ROW_HAS_UNPAGINATED_BSIZE` bit, so let's set the
bit directly in `SetUnpaginatedBSize()`.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D190374
It is confusing for ResetBSize() to take a parameter to set the fixed
block-size. The caller can call `SetFixedBSize()` if needed.
Differential Revision: https://phabricator.services.mozilla.com/D190373
This is in order to eventually remove the destruct root.
This is a performance optimization to avoid doing the work of
registration if the table is about to go away anyways. The only thing
this wants to check is whether the first continuation is getting
destroyed. We can do that much more easily, explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D187677
This shouldn't change behavior, but it packs the two arguments to
DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy
to call without a previous context.
This is a prerequisite to pass aDestroyContext to various things that
right now just mint one, which can cause badness, see bug 1851787 and
related bugs.
It's also a bit nicer to add things there if we need to in the future.
Differential Revision: https://phabricator.services.mozilla.com/D187578