summaryrefslogtreecommitdiffstats
path: root/layout/tables/nsTableCellFrame.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /layout/tables/nsTableCellFrame.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/tables/nsTableCellFrame.h')
-rw-r--r--layout/tables/nsTableCellFrame.h90
1 files changed, 31 insertions, 59 deletions
diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h
index f9b6f3ccac..ae1a881819 100644
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -34,9 +34,6 @@ class PresShell;
class nsTableCellFrame : public nsContainerFrame,
public nsITableCellLayout,
public nsIPercentBSizeObserver {
- typedef mozilla::gfx::DrawTarget DrawTarget;
- typedef mozilla::image::ImgDrawResult ImgDrawResult;
-
friend nsTableCellFrame* NS_NewTableCellFrame(mozilla::PresShell* aPresShell,
ComputedStyle* aStyle,
nsTableFrame* aTableFrame);
@@ -44,11 +41,6 @@ class nsTableCellFrame : public nsContainerFrame,
nsTableCellFrame(ComputedStyle* aStyle, nsTableFrame* aTableFrame)
: nsTableCellFrame(aStyle, aTableFrame, kClassID) {}
- protected:
- typedef mozilla::WritingMode WritingMode;
- typedef mozilla::LogicalSide LogicalSide;
- typedef mozilla::LogicalMargin LogicalMargin;
-
public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS(nsTableCellFrame)
@@ -122,7 +114,9 @@ class nsTableCellFrame : public nsContainerFrame,
nsresult GetFrameName(nsAString& aResult) const override;
#endif
- void BlockDirAlignChild(mozilla::WritingMode aWM, nscoord aMaxAscent);
+ // Align the cell's child frame within the cell.
+ void BlockDirAlignChild(mozilla::WritingMode aWM, nscoord aMaxAscent,
+ mozilla::ForceAlignTopForTableCell aForceAlignTop);
/*
* Get the value of vertical-align adjusted for CSS 2's rules for a
@@ -193,20 +187,24 @@ class nsTableCellFrame : public nsContainerFrame,
void SetColIndex(int32_t aColIndex);
- /** return the available isize given to this frame during its last reflow */
- inline nscoord GetPriorAvailISize();
-
- /** set the available isize given to this frame during its last reflow */
- inline void SetPriorAvailISize(nscoord aPriorAvailISize);
-
- /** return the desired size returned by this frame during its last reflow */
- inline mozilla::LogicalSize GetDesiredSize();
+ // Get or set the available isize given to this frame during its last reflow.
+ nscoord GetPriorAvailISize() const { return mPriorAvailISize; }
+ void SetPriorAvailISize(nscoord aPriorAvailISize) {
+ mPriorAvailISize = aPriorAvailISize;
+ }
- /** set the desired size returned by this frame during its last reflow */
- inline void SetDesiredSize(const ReflowOutput& aDesiredSize);
+ // Get or set the desired size returned by this frame during its last reflow.
+ mozilla::LogicalSize GetDesiredSize() const { return mDesiredSize; }
+ void SetDesiredSize(const ReflowOutput& aDesiredSize) {
+ mDesiredSize = aDesiredSize.Size(GetWritingMode());
+ }
- bool GetContentEmpty() const;
- void SetContentEmpty(bool aContentEmpty);
+ bool GetContentEmpty() const {
+ return HasAnyStateBits(NS_TABLE_CELL_CONTENT_EMPTY);
+ }
+ void SetContentEmpty(bool aContentEmpty) {
+ AddOrRemoveStateBits(NS_TABLE_CELL_CONTENT_EMPTY, aContentEmpty);
+ }
nsTableCellFrame* GetNextCell() const {
nsIFrame* sibling = GetNextSibling();
@@ -216,7 +214,7 @@ class nsTableCellFrame : public nsContainerFrame,
return static_cast<nsTableCellFrame*>(sibling);
}
- virtual LogicalMargin GetBorderWidth(WritingMode aWM) const;
+ virtual mozilla::LogicalMargin GetBorderWidth(mozilla::WritingMode aWM) const;
void DecorateForSelection(DrawTarget* aDrawTarget, nsPoint aPt);
@@ -251,44 +249,17 @@ class nsTableCellFrame : public nsContainerFrame,
friend class nsTableRowFrame;
- uint32_t mColIndex; // the starting column for this cell
-
- nscoord mPriorAvailISize; // the avail isize during the last reflow
- mozilla::LogicalSize mDesiredSize; // the last desired inline and block size
-};
-
-inline nscoord nsTableCellFrame::GetPriorAvailISize() {
- return mPriorAvailISize;
-}
-
-inline void nsTableCellFrame::SetPriorAvailISize(nscoord aPriorAvailISize) {
- mPriorAvailISize = aPriorAvailISize;
-}
-
-inline mozilla::LogicalSize nsTableCellFrame::GetDesiredSize() {
- return mDesiredSize;
-}
-
-inline void nsTableCellFrame::SetDesiredSize(const ReflowOutput& aDesiredSize) {
- mDesiredSize = aDesiredSize.Size(GetWritingMode());
-}
+ // The starting column for this cell
+ uint32_t mColIndex = 0;
-inline bool nsTableCellFrame::GetContentEmpty() const {
- return HasAnyStateBits(NS_TABLE_CELL_CONTENT_EMPTY);
-}
+ // The avail isize during the last reflow
+ nscoord mPriorAvailISize = 0;
-inline void nsTableCellFrame::SetContentEmpty(bool aContentEmpty) {
- if (aContentEmpty) {
- AddStateBits(NS_TABLE_CELL_CONTENT_EMPTY);
- } else {
- RemoveStateBits(NS_TABLE_CELL_CONTENT_EMPTY);
- }
-}
+ // The last desired inline and block size
+ mozilla::LogicalSize mDesiredSize;
+};
-// nsBCTableCellFrame
class nsBCTableCellFrame final : public nsTableCellFrame {
- typedef mozilla::image::ImgDrawResult ImgDrawResult;
-
public:
NS_DECL_FRAMEARENA_HELPERS(nsBCTableCellFrame)
@@ -299,13 +270,14 @@ class nsBCTableCellFrame final : public nsTableCellFrame {
nsMargin GetUsedBorder() const override;
// Get the *inner half of the border only*, in twips.
- LogicalMargin GetBorderWidth(WritingMode aWM) const override;
+ mozilla::LogicalMargin GetBorderWidth(
+ mozilla::WritingMode aWM) const override;
// Get the *inner half of the border only*, in pixels.
- BCPixelSize GetBorderWidth(LogicalSide aSide) const;
+ BCPixelSize GetBorderWidth(mozilla::LogicalSide aSide) const;
// Set the full (both halves) width of the border
- void SetBorderWidth(LogicalSide aSide, BCPixelSize aPixelValue);
+ void SetBorderWidth(mozilla::LogicalSide aSide, BCPixelSize aPixelValue);
nsMargin GetBorderOverflow() override;