The two macros are used in `GetPrefISize()` and `GetMinISize()` implementations.
After removing them, we could further simplify some implementations because we
don't need a `result` variable in many cases.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D206316
LogicalAxis is one of the Logical* enums. Converting it from enum to
enum class increases type safety. To run with the pre-existing code,
type casting was added when needed. Comments have been edited where
needed.
Differential Revision: https://phabricator.services.mozilla.com/D206108
Values were static_casted where required. Some functions in WritingModes.h were
rewritten such that bitwise operations aren't being used. Added static_casts to
avoid (debug) build errors from debugging printfs in layout/tables/nsCellMap.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D205510
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
Follow-up of bug 1795630 for some crashtests that were not in `mathml`
directories. The list was extracted in a subjective way from [1] by
looking at some tests that seem to contain essentially MathML with
some simple HTML or CSS. The changes to `crashtest.list` files have
been generated by [2].
[1] https://searchfox.org/mozilla-central/search?q=%3Cmath%7Cmathml&path=crashtest&case=true®exp=true
[2] `for file in $(^Ct ~/list-of-tests.txt); do D=$(dirname $file); F=$(filename $file); sed -i "/$F/d" $D/crashtests.list; done`
Differential Revision: https://phabricator.services.mozilla.com/D203614
Bug 1861562 Part 6 [1] made a bold assumption that TableBCDataProperty should
only be set on first-in-flow, but apparently a table continuation can call
`GetOrCreateTableBCData()` to set the property in the testcase [2].
This patch restores the old behavior that allows TableBCDataProperty to be set
on table continuations.
[1] https://hg.mozilla.org/mozilla-central/rev/c9c310c769d2
[2] Note: we don't support fragmenting tables in multicol. Table continuations
are created in this testcase because the abspos `<dialog>` in the table
is fragmented.
Differential Revision: https://phabricator.services.mozilla.com/D203707
Bug 1861562 Part 6 [1] made a bold assumption that TableBCDataProperty should
only be set on first-in-flow, but apparently a table continuation can call
`GetOrCreateTableBCData()` to set the property in the testcase [2].
This patch restores the old behavior that allows TableBCDataProperty to be set
on table continuations.
[1] https://hg.mozilla.org/mozilla-central/rev/c9c310c769d2
[2] Note: we don't support fragmenting tables in multicol. Table continuations
are created in this testcase because the abspos `<dialog>` in the table
is fragmented.
Differential Revision: https://phabricator.services.mozilla.com/D203707
This is only used to calculate the block-start border of the overall table,
not and is unused after. Use `Maybe<>` to reflect it as such.
Differential Revision: https://phabricator.services.mozilla.com/D197930
This patch shouldn't change behavior. There was a callsite missed
`SetRepeatable(false)` when the repeated table footer is not allowed, but I
think it was an oversight rather than intentional.
Differential Revision: https://phabricator.services.mozilla.com/D201136
The padding changes causes some sizes in the child to not exactly be
nscoord_MAX when overflowing, but a slightly smaller value, not hitting
the width == nscoord_MAX || height == nscoord_MAX condition in
FinishStoreOverflow().
The other one is similar, where an nscoord_MAX value gets to bidi
reordering, where it didn't before. It doesn't seem problematic /
anything that wouldn't otherwise happen with a regular block with
padding.
Tweak while at it some of the overflow areas assertions, mostly
to make it simpler, but also because I'm not super-positive about
the compiler being able to optimize it away entirely on opt builds.
Depends on D197978
Differential Revision: https://phabricator.services.mozilla.com/D199241
This doesn't change behavior but it's a prerequisite to supporting a
scrollframe properly (since we want the padding inside the scrolled
area).
This follows a bit what nsFieldSetFrame does.
Differential Revision: https://phabricator.services.mozilla.com/D198786
Those callers who using the pointer immediately after getting from
`GetPresShell()` can be replaced with `PresShell()`.
This patch doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D199164
This doesn't change behavior but it's a prerequisite to supporting a
scrollframe properly (since we want the padding inside the scrolled
area).
This follows a bit what nsFieldSetFrame does.
Differential Revision: https://phabricator.services.mozilla.com/D198786
If the table-row-group is styled by CSS and it does not have proper table row
children, anonymous table rows and cells are generated and the real content is
rendered in a placeholder. In this case, the parent of out-of-flow child frame
is the table-row-group frame even though the table-row-group frame has only
anonymous table-row child frame. Therefore, it fails to query `nsTableRowFrame`
and access `nsIFrame` methods with `nullptr`.
This patch allows the method users to set an out-of-flow child frame and
makes the method return "not found".
Differential Revision: https://phabricator.services.mozilla.com/D197983