Blame layout/tables/nsTableRowGroupFrame.h

Packit f0b94e
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
Packit f0b94e
/* This Source Code Form is subject to the terms of the Mozilla Public
Packit f0b94e
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Packit f0b94e
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Packit f0b94e
#ifndef nsTableRowGroupFrame_h__
Packit f0b94e
#define nsTableRowGroupFrame_h__
Packit f0b94e
Packit f0b94e
#include "mozilla/Attributes.h"
Packit f0b94e
#include "nscore.h"
Packit f0b94e
#include "nsContainerFrame.h"
Packit f0b94e
#include "nsAtom.h"
Packit f0b94e
#include "nsILineIterator.h"
Packit f0b94e
#include "nsTArray.h"
Packit f0b94e
#include "nsTableFrame.h"
Packit f0b94e
#include "mozilla/WritingModes.h"
Packit f0b94e
Packit f0b94e
class nsTableRowFrame;
Packit f0b94e
namespace mozilla {
Packit f0b94e
struct TableRowGroupReflowInput;
Packit f0b94e
}  // namespace mozilla
Packit f0b94e
Packit f0b94e
#define MIN_ROWS_NEEDING_CURSOR 20
Packit f0b94e
Packit f0b94e
/**
Packit f0b94e
 * nsTableRowGroupFrame is the frame that maps row groups
Packit f0b94e
 * (HTML tags THEAD, TFOOT, and TBODY). This class cannot be reused
Packit f0b94e
 * outside of an nsTableFrame.  It assumes that its parent is an nsTableFrame,
Packit f0b94e
 * and its children are nsTableRowFrames.
Packit f0b94e
 *
Packit f0b94e
 * @see nsTableFrame
Packit f0b94e
 * @see nsTableRowFrame
Packit f0b94e
 */
Packit f0b94e
class nsTableRowGroupFrame final : public nsContainerFrame,
Packit f0b94e
                                   public nsILineIterator {
Packit f0b94e
  using TableRowGroupReflowInput = mozilla::TableRowGroupReflowInput;
Packit f0b94e
Packit f0b94e
 public:
Packit f0b94e
  NS_DECL_QUERYFRAME
Packit f0b94e
  NS_DECL_FRAMEARENA_HELPERS(nsTableRowGroupFrame)
Packit f0b94e
Packit f0b94e
  /** instantiate a new instance of nsTableRowFrame.
Packit f0b94e
   * @param aPresShell the pres shell for this frame
Packit f0b94e
   *
Packit f0b94e
   * @return           the frame that was created
Packit f0b94e
   */
Packit f0b94e
  friend nsTableRowGroupFrame* NS_NewTableRowGroupFrame(
Packit f0b94e
      nsIPresShell* aPresShell, nsStyleContext* aContext);
Packit f0b94e
  virtual ~nsTableRowGroupFrame();
Packit f0b94e
Packit f0b94e
  // nsIFrame overrides
Packit f0b94e
  virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
Packit f0b94e
                    nsIFrame* aPrevInFlow) override {
Packit f0b94e
    nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
Packit f0b94e
    if (!aPrevInFlow) {
Packit f0b94e
      mWritingMode = GetTableFrame()->GetWritingMode();
Packit f0b94e
    }
Packit f0b94e
  }
Packit f0b94e
Packit f0b94e
  virtual void DestroyFrom(nsIFrame* aDestructRoot,
Packit f0b94e
                           PostDestroyData& aPostDestroyData) override;
Packit f0b94e
Packit f0b94e
  /** @see nsIFrame::DidSetStyleContext */
Packit f0b94e
  virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
Packit f0b94e
Packit f0b94e
  virtual void AppendFrames(ChildListID aListID,
Packit f0b94e
                            nsFrameList& aFrameList) override;
Packit f0b94e
  virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
Packit f0b94e
                            nsFrameList& aFrameList) override;
Packit f0b94e
  virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
Packit f0b94e
Packit f0b94e
  virtual nsMargin GetUsedMargin() const override;
Packit f0b94e
  virtual nsMargin GetUsedBorder() const override;
Packit f0b94e
  virtual nsMargin GetUsedPadding() const override;
Packit f0b94e
Packit f0b94e
  virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
Packit f0b94e
                                const nsDisplayListSet& aLists) override;
Packit f0b94e
Packit f0b94e
  /** calls Reflow for all of its child rows.
Packit f0b94e
   * Rows are all set to the same isize and stacked in the block direction.
Packit f0b94e
   * 

rows are not split unless absolutely necessary.

Packit f0b94e
   *
Packit f0b94e
   * @param aDesiredSize isize set to isize of rows, bsize set to
Packit f0b94e
   *                     sum of bsize of rows that fit in AvailableBSize.
Packit f0b94e
   *
Packit f0b94e
   * @see nsIFrame::Reflow
Packit f0b94e
   */
Packit f0b94e
  virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
Packit f0b94e
                      const ReflowInput& aReflowInput,
Packit f0b94e
                      nsReflowStatus& aStatus) override;
Packit f0b94e
Packit f0b94e
  virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
Packit f0b94e
Packit f0b94e
#ifdef DEBUG_FRAME_DUMP
Packit f0b94e
  virtual nsresult GetFrameName(nsAString& aResult) const override;
Packit f0b94e
#endif
Packit f0b94e
Packit f0b94e
  nsTableRowFrame* GetFirstRow();
Packit f0b94e
  nsTableRowFrame* GetLastRow();
Packit f0b94e
Packit f0b94e
  nsTableFrame* GetTableFrame() const {
Packit f0b94e
    nsIFrame* parent = GetParent();
Packit f0b94e
    MOZ_ASSERT(parent && parent->IsTableFrame());
Packit f0b94e
    return static_cast<nsTableFrame*>(parent);
Packit f0b94e
  }
Packit f0b94e
Packit f0b94e
  /** return the number of child rows (not necessarily == number of child
Packit f0b94e
   * frames) */
Packit f0b94e
  int32_t GetRowCount();
Packit f0b94e
Packit f0b94e
  /** return the table-relative row index of the first row in this rowgroup.
Packit f0b94e
   * if there are no rows, -1 is returned.
Packit f0b94e
   */
Packit f0b94e
  int32_t GetStartRowIndex();
Packit f0b94e
Packit f0b94e
  /** Adjust the row indices of all rows  whose index is >= aRowIndex.
Packit f0b94e
   * @param aRowIndex   - start adjusting with this index
Packit f0b94e
   * @param aAdjustment - shift the row index by this amount
Packit f0b94e
   */
Packit f0b94e
  void AdjustRowIndices(int32_t aRowIndex, int32_t anAdjustment);
Packit f0b94e
Packit f0b94e
  // See nsTableFrame.h
Packit f0b94e
  int32_t GetAdjustmentForStoredIndex(int32_t aStoredIndex);
Packit f0b94e
Packit f0b94e
  /* mark rows starting from aStartRowFrame to the next 'aNumRowsToRemove-1'
Packit f0b94e
   * number of rows as deleted
Packit f0b94e
   */
Packit f0b94e
  void MarkRowsAsDeleted(nsTableRowFrame& aStartRowFrame,
Packit f0b94e
                         int32_t aNumRowsToDelete);
Packit f0b94e
Packit f0b94e
  // See nsTableFrame.h
Packit f0b94e
  void AddDeletedRowIndex(int32_t aDeletedRowStoredIndex);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Used for header and footer row group frames that are repeated when
Packit f0b94e
   * splitting a table frame.
Packit f0b94e
   *
Packit f0b94e
   * Performs any table specific initialization
Packit f0b94e
   *
Packit f0b94e
   * @param aHeaderFooterFrame the original header or footer row group frame
Packit f0b94e
   * that was repeated
Packit f0b94e
   */
Packit f0b94e
  nsresult InitRepeatedFrame(nsTableRowGroupFrame* aHeaderFooterFrame);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Get the total bsize of all the row rects
Packit f0b94e
   */
Packit f0b94e
  nscoord GetBSizeBasis(const ReflowInput& aReflowInput);
Packit f0b94e
Packit f0b94e
  mozilla::LogicalMargin GetBCBorderWidth(mozilla::WritingMode aWM);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Gets inner border widths before collapsing with cell borders
Packit f0b94e
   * Caller must get bstart border from previous row group or from table
Packit f0b94e
   * GetContinuousBCBorderWidth will not overwrite aBorder.BStart()
Packit f0b94e
   * see nsTablePainter about continuous borders
Packit f0b94e
   */
Packit f0b94e
  void GetContinuousBCBorderWidth(mozilla::WritingMode aWM,
Packit f0b94e
                                  mozilla::LogicalMargin& aBorder);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Sets full border widths before collapsing with cell borders
Packit f0b94e
   * @param aForSide - side to set; only IEnd, IStart, BEnd are valid
Packit f0b94e
   */
Packit f0b94e
  void SetContinuousBCBorderWidth(mozilla::LogicalSide aForSide,
Packit f0b94e
                                  BCPixelSize aPixelValue);
Packit f0b94e
  /**
Packit f0b94e
   * Adjust to the effect of visibility:collapse on the row group and
Packit f0b94e
   * its children
Packit f0b94e
   * @return              additional shift bstart-wards that should be applied
Packit f0b94e
   *                      to subsequent rowgroups due to rows and this
Packit f0b94e
   *                      rowgroup being collapsed
Packit f0b94e
   * @param aBTotalOffset the total amount that the rowgroup is shifted
Packit f0b94e
   * @param aISize        new isize of the rowgroup
Packit f0b94e
   * @param aWM           the table's writing mode
Packit f0b94e
   */
Packit f0b94e
  nscoord CollapseRowGroupIfNecessary(nscoord aBTotalOffset, nscoord aISize,
Packit f0b94e
                                      mozilla::WritingMode aWM);
Packit f0b94e
Packit f0b94e
  // nsILineIterator methods
Packit f0b94e
 public:
Packit f0b94e
  virtual void DisposeLineIterator() override {}
Packit f0b94e
Packit f0b94e
  // The table row is the equivalent to a line in block layout.
Packit f0b94e
  // The nsILineIterator assumes that a line resides in a block, this role is
Packit f0b94e
  // fullfilled by the row group. Rows in table are counted relative to the
Packit f0b94e
  // table. The row index of row corresponds to the cellmap coordinates. The
Packit f0b94e
  // line index with respect to a row group can be computed by substracting the
Packit f0b94e
  // row index of the first row in the row group.
Packit f0b94e
Packit f0b94e
  /** Get the number of rows in a row group
Packit f0b94e
   * @return the number of lines in a row group
Packit f0b94e
   */
Packit f0b94e
  virtual int32_t GetNumLines() override;
Packit f0b94e
Packit f0b94e
  /** @see nsILineIterator.h GetDirection
Packit f0b94e
   * @return true if the table is rtl
Packit f0b94e
   */
Packit f0b94e
  virtual bool GetDirection() override;
Packit f0b94e
Packit f0b94e
  /** Return structural information about a line.
Packit f0b94e
   * @param aLineNumber       - the index of the row relative to the row group
Packit f0b94e
   *                            If the line-number is invalid then
Packit f0b94e
   *                            aFirstFrameOnLine will be nullptr and
Packit f0b94e
   *                            aNumFramesOnLine will be zero.
Packit f0b94e
   * @param aFirstFrameOnLine - the first cell frame that originates in row
Packit f0b94e
   *                            with a rowindex that matches a line number
Packit f0b94e
   * @param aNumFramesOnLine  - return the numbers of cells originating in
Packit f0b94e
   *                            this row
Packit f0b94e
   * @param aLineBounds       - rect of the row
Packit f0b94e
   */
Packit f0b94e
  NS_IMETHOD GetLine(int32_t aLineNumber, nsIFrame** aFirstFrameOnLine,
Packit f0b94e
                     int32_t* aNumFramesOnLine, nsRect& aLineBounds) override;
Packit f0b94e
Packit f0b94e
  /** Given a frame that's a child of the rowgroup, find which line its on.
Packit f0b94e
   * @param aFrame       - frame, should be a row
Packit f0b94e
   * @param aStartLine   - minimal index to return
Packit f0b94e
   * @return               row index relative to the row group if this a row
Packit f0b94e
   *                       frame and the index is at least aStartLine.
Packit f0b94e
   *                       -1 if the frame cannot be found.
Packit f0b94e
   */
Packit f0b94e
  virtual int32_t FindLineContaining(nsIFrame* aFrame,
Packit f0b94e
                                     int32_t aStartLine = 0) override;
Packit f0b94e
Packit f0b94e
  /** Find the orginating cell frame on a row that is the nearest to the
Packit f0b94e
   * inline-dir coordinate of aPos.
Packit f0b94e
   * @param aLineNumber          - the index of the row relative to the row
Packit f0b94e
   * group
Packit f0b94e
   * @param aPos                 - coordinate in twips relative to the
Packit f0b94e
   *                               origin of the row group
Packit f0b94e
   * @param aFrameFound          - pointer to the cellframe
Packit f0b94e
   * @param aPosIsBeforeFirstFrame - the point is before the first originating
Packit f0b94e
   *                               cellframe
Packit f0b94e
   * @param aPosIsAfterLastFrame   - the point is after the last originating
Packit f0b94e
   *                               cellframe
Packit f0b94e
   */
Packit f0b94e
  NS_IMETHOD FindFrameAt(int32_t aLineNumber, nsPoint aPos,
Packit f0b94e
                         nsIFrame** aFrameFound, bool* aPosIsBeforeFirstFrame,
Packit f0b94e
                         bool* aPosIsAfterLastFrame) override;
Packit f0b94e
Packit f0b94e
  /** Check whether visual and logical order of cell frames within a line are
Packit f0b94e
   * identical. As the layout will reorder them this is always the case
Packit f0b94e
   * @param aLine        - the index of the row relative to the table
Packit f0b94e
   * @param aIsReordered - returns false
Packit f0b94e
   * @param aFirstVisual - if the table is rtl first originating cell frame
Packit f0b94e
   * @param aLastVisual  - if the table is rtl last originating cell frame
Packit f0b94e
   */
Packit f0b94e
Packit f0b94e
  NS_IMETHOD CheckLineOrder(int32_t aLine, bool* aIsReordered,
Packit f0b94e
                            nsIFrame** aFirstVisual,
Packit f0b94e
                            nsIFrame** aLastVisual) override;
Packit f0b94e
Packit f0b94e
  /** Find the next originating cell frame that originates in the row.
Packit f0b94e
   * @param aFrame      - cell frame to start with, will return the next cell
Packit f0b94e
   *                      originating in a row
Packit f0b94e
   * @param aLineNumber - the index of the row relative to the table
Packit f0b94e
   */
Packit f0b94e
  NS_IMETHOD GetNextSiblingOnLine(nsIFrame*& aFrame,
Packit f0b94e
                                  int32_t aLineNumber) override;
Packit f0b94e
Packit f0b94e
  // row cursor methods to speed up searching for the row(s)
Packit f0b94e
  // containing a point. The basic idea is that we set the cursor
Packit f0b94e
  // property if the rows' y and yMosts are non-decreasing (considering only
Packit f0b94e
  // rows with nonempty overflowAreas --- empty overflowAreas never participate
Packit f0b94e
  // in event handling or painting), and the rowgroup has sufficient number of
Packit f0b94e
  // rows. The cursor property points to a "recently used" row. If we get a
Packit f0b94e
  // series of requests that work on rows "near" the cursor, then we can find
Packit f0b94e
  // those nearby rows quickly by starting our search at the cursor.
Packit f0b94e
  // This code is based on the line cursor code in nsBlockFrame. It's more
Packit f0b94e
  // general though, and could be extracted and used elsewhere.
Packit f0b94e
  struct FrameCursorData {
Packit f0b94e
    nsTArray<nsIFrame*> mFrames;
Packit f0b94e
    uint32_t mCursorIndex;
Packit f0b94e
    nscoord mOverflowAbove;
Packit f0b94e
    nscoord mOverflowBelow;
Packit f0b94e
Packit f0b94e
    FrameCursorData()
Packit f0b94e
        : mFrames(MIN_ROWS_NEEDING_CURSOR),
Packit f0b94e
          mCursorIndex(0),
Packit f0b94e
          mOverflowAbove(0),
Packit f0b94e
          mOverflowBelow(0) {}
Packit f0b94e
Packit f0b94e
    bool AppendFrame(nsIFrame* aFrame);
Packit f0b94e
Packit f0b94e
    void FinishBuildingCursor() { mFrames.Compact(); }
Packit f0b94e
  };
Packit f0b94e
Packit f0b94e
  // Clear out row cursor because we're disturbing the rows (e.g., Reflow)
Packit f0b94e
  void ClearRowCursor();
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Get the first row that might contain y-coord 'aY', or nullptr if you must
Packit f0b94e
   * search all rows. The actual row returned might not contain 'aY', but if
Packit f0b94e
   * not, it is guaranteed to be before any row which does contain 'aY'.
Packit f0b94e
   * aOverflowAbove is the maximum over all rows of -row.GetOverflowRect().y.
Packit f0b94e
   * To find all rows that intersect the vertical interval aY/aYMost, call
Packit f0b94e
   * GetFirstRowContaining(aY, &overflowAbove), and then iterate through all
Packit f0b94e
   * rows until reaching a row where row->GetRect().y - overflowAbove >= aYMost.
Packit f0b94e
   * That row and all subsequent rows cannot intersect the interval.
Packit f0b94e
   */
Packit f0b94e
  nsIFrame* GetFirstRowContaining(nscoord aY, nscoord* aOverflowAbove);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Set up the row cursor. After this, call AppendFrame for every
Packit f0b94e
   * child frame in sibling order. Ensure that the child frame y and YMost
Packit f0b94e
   * values form non-decreasing sequences (should always be true for table
Packit f0b94e
   * rows); if this is violated, call ClearRowCursor(). If we return nullptr,
Packit f0b94e
   * then we decided not to use a cursor or we already have one set up.
Packit f0b94e
   */
Packit f0b94e
  FrameCursorData* SetupRowCursor();
Packit f0b94e
Packit f0b94e
  virtual nsILineIterator* GetLineIterator() override { return this; }
Packit f0b94e
Packit f0b94e
  virtual bool IsFrameOfType(uint32_t aFlags) const override {
Packit f0b94e
    return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
Packit f0b94e
  }
Packit f0b94e
Packit f0b94e
  virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override;
Packit f0b94e
  virtual void InvalidateFrameWithRect(const nsRect& aRect,
Packit f0b94e
                                       uint32_t aDisplayItemKey = 0) override;
Packit f0b94e
  virtual void InvalidateFrameForRemoval() override {
Packit f0b94e
    InvalidateFrameSubtree();
Packit f0b94e
  }
Packit f0b94e
Packit f0b94e
 protected:
Packit f0b94e
  explicit nsTableRowGroupFrame(nsStyleContext* aContext);
Packit f0b94e
Packit f0b94e
  void InitChildReflowInput(nsPresContext& aPresContext, bool aBorderCollapse,
Packit f0b94e
                            ReflowInput& aReflowInput);
Packit f0b94e
Packit f0b94e
  virtual LogicalSides GetLogicalSkipSides(
Packit f0b94e
      const ReflowInput* aReflowInput = nullptr) const override;
Packit f0b94e
Packit f0b94e
  void PlaceChild(nsPresContext* aPresContext,
Packit f0b94e
                  TableRowGroupReflowInput& aReflowInput, nsIFrame* aKidFrame,
Packit f0b94e
                  mozilla::WritingMode aWM,
Packit f0b94e
                  const mozilla::LogicalPoint& aKidPosition,
Packit f0b94e
                  const nsSize& aContainerSize, ReflowOutput& aDesiredSize,
Packit f0b94e
                  const nsRect& aOriginalKidRect,
Packit f0b94e
                  const nsRect& aOriginalKidVisualOverflow);
Packit f0b94e
Packit f0b94e
  void CalculateRowBSizes(nsPresContext* aPresContext,
Packit f0b94e
                          ReflowOutput& aDesiredSize,
Packit f0b94e
                          const ReflowInput& aReflowInput);
Packit f0b94e
Packit f0b94e
  void DidResizeRows(ReflowOutput& aDesiredSize);
Packit f0b94e
Packit f0b94e
  void SlideChild(TableRowGroupReflowInput& aReflowInput, nsIFrame* aKidFrame);
Packit f0b94e
Packit f0b94e
  /**
Packit f0b94e
   * Reflow the frames we've already created
Packit f0b94e
   *
Packit f0b94e
   * @param   aPresContext presentation context to use
Packit f0b94e
   * @param   aReflowInput current inline state
Packit f0b94e
   */
Packit f0b94e
  void ReflowChildren(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
Packit f0b94e
                      TableRowGroupReflowInput& aReflowInput,
Packit f0b94e
                      nsReflowStatus& aStatus,
Packit f0b94e
                      bool* aPageBreakBeforeEnd = nullptr);
Packit f0b94e
Packit f0b94e
  nsresult SplitRowGroup(nsPresContext* aPresContext,
Packit f0b94e
                         ReflowOutput& aDesiredSize,
Packit f0b94e
                         const ReflowInput& aReflowInput,
Packit f0b94e
                         nsTableFrame* aTableFrame, nsReflowStatus& aStatus,
Packit f0b94e
                         bool aRowForcedPageBreak);
Packit f0b94e
Packit f0b94e
  void SplitSpanningCells(nsPresContext& aPresContext,
Packit f0b94e
                          const ReflowInput& aReflowInput,
Packit f0b94e
                          nsTableFrame& aTableFrame, nsTableRowFrame& aFirstRow,
Packit f0b94e
                          nsTableRowFrame& aLastRow, bool aFirstRowIsTopOfPage,
Packit f0b94e
                          nscoord aSpanningRowBottom,
Packit f0b94e
                          nsTableRowFrame*& aContRowFrame,
Packit f0b94e
                          nsTableRowFrame*& aFirstTruncatedRow,
Packit f0b94e
                          nscoord& aDesiredHeight);
Packit f0b94e
Packit f0b94e
  void CreateContinuingRowFrame(nsPresContext& aPresContext,
Packit f0b94e
                                nsIFrame& aRowFrame, nsIFrame** aContRowFrame);
Packit f0b94e
Packit f0b94e
  bool IsSimpleRowFrame(nsTableFrame* aTableFrame, nsTableRowFrame* aRowFrame);
Packit f0b94e
Packit f0b94e
  void GetNextRowSibling(nsIFrame** aRowFrame);
Packit f0b94e
Packit f0b94e
  void UndoContinuedRow(nsPresContext* aPresContext, nsTableRowFrame* aRow);
Packit f0b94e
Packit f0b94e
 private:
Packit f0b94e
  // border widths in pixels in the collapsing border model
Packit f0b94e
  BCPixelSize mIEndContBorderWidth;
Packit f0b94e
  BCPixelSize mBEndContBorderWidth;
Packit f0b94e
  BCPixelSize mIStartContBorderWidth;
Packit f0b94e
Packit f0b94e
 public:
Packit f0b94e
  bool IsRepeatable() const;
Packit f0b94e
  void SetRepeatable(bool aRepeatable);
Packit f0b94e
  bool HasStyleBSize() const;
Packit f0b94e
  void SetHasStyleBSize(bool aValue);
Packit f0b94e
  bool HasInternalBreakBefore() const;
Packit f0b94e
  bool HasInternalBreakAfter() const;
Packit f0b94e
};
Packit f0b94e
Packit f0b94e
inline bool nsTableRowGroupFrame::IsRepeatable() const {
Packit f0b94e
  return HasAnyStateBits(NS_ROWGROUP_REPEATABLE);
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
inline void nsTableRowGroupFrame::SetRepeatable(bool aRepeatable) {
Packit f0b94e
  if (aRepeatable) {
Packit f0b94e
    AddStateBits(NS_ROWGROUP_REPEATABLE);
Packit f0b94e
  } else {
Packit f0b94e
    RemoveStateBits(NS_ROWGROUP_REPEATABLE);
Packit f0b94e
  }
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
inline bool nsTableRowGroupFrame::HasStyleBSize() const {
Packit f0b94e
  return HasAnyStateBits(NS_ROWGROUP_HAS_STYLE_BSIZE);
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
inline void nsTableRowGroupFrame::SetHasStyleBSize(bool aValue) {
Packit f0b94e
  if (aValue) {
Packit f0b94e
    AddStateBits(NS_ROWGROUP_HAS_STYLE_BSIZE);
Packit f0b94e
  } else {
Packit f0b94e
    RemoveStateBits(NS_ROWGROUP_HAS_STYLE_BSIZE);
Packit f0b94e
  }
Packit f0b94e
}
Packit f0b94e
Packit f0b94e
inline void nsTableRowGroupFrame::GetContinuousBCBorderWidth(
Packit f0b94e
    mozilla::WritingMode aWM, mozilla::LogicalMargin& aBorder) {
Packit f0b94e
  int32_t d2a = PresContext()->AppUnitsPerDevPixel();
Packit f0b94e
  aBorder.IEnd(aWM) = BC_BORDER_START_HALF_COORD(d2a, mIEndContBorderWidth);
Packit f0b94e
  aBorder.BEnd(aWM) = BC_BORDER_START_HALF_COORD(d2a, mBEndContBorderWidth);
Packit f0b94e
  aBorder.IStart(aWM) = BC_BORDER_END_HALF_COORD(d2a, mIStartContBorderWidth);
Packit f0b94e
}
Packit f0b94e
#endif