diff options
Diffstat (limited to 'layout/generic/nsIFrame.h')
-rw-r--r-- | layout/generic/nsIFrame.h | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 16f3d17d64..801e80c7e0 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -127,6 +127,7 @@ struct CharacterDataChangeInfo; namespace mozilla { enum class CaretAssociationHint; +enum class IsFocusableFlags : uint8_t; enum class PeekOffsetOption : uint16_t; enum class PseudoStyleType : uint8_t; enum class TableSelectionMode : uint32_t; @@ -937,6 +938,8 @@ class nsIFrame : public nsQueryFrame { already_AddRefed<ComputedStyle> ComputeHighlightSelectionStyle( nsAtom* aHighlightName); + already_AddRefed<ComputedStyle> ComputeTargetTextStyle() const; + /** * Accessor functions for geometric parent. */ @@ -1384,7 +1387,25 @@ class nsIFrame : public nsQueryFrame { bool HasUnreflowedContainerQueryAncestor() const; + // Return True if this frame has a forced break value before it. + // + // Note: this method only checks 'break-before' property on *this* frame, and + // it doesn't handle forced break value propagation from its first child. + // Callers should handle the propagation in reflow. + bool ShouldBreakBefore(const ReflowInput::BreakType aBreakType) const; + + // Return True if this frame has a forced break value after it. + // + // Note: this method only checks 'break-after' property on *this* frame, and + // it doesn't handle forced break value propagation from its last child. + // Callers should handle the propagation in reflow. + bool ShouldBreakAfter(const ReflowInput::BreakType aBreakType) const; + private: + bool ShouldBreakBetween(const nsStyleDisplay* aDisplay, + const mozilla::StyleBreakBetween aBreakBetween, + const ReflowInput::BreakType aBreakType) const; + // The value that the CSS page-name "auto" keyword resolves to for children // of this frame. // @@ -1586,6 +1607,11 @@ class nsIFrame : public nsQueryFrame { bool GetShapeBoxBorderRadii(nscoord aRadii[8]) const; /** + * Returns one em unit, adjusted for font inflation if needed, in app units. + */ + nscoord OneEmInAppUnits() const; + + /** * `GetNaturalBaselineBOffset`, but determines the baseline sharing group * through `GetDefaultBaselineSharingGroup` (If not specified), assuming line * layout context, and never fails, returning a synthesized baseline through @@ -3932,6 +3958,9 @@ class nsIFrame : public nsQueryFrame { public: // given a frame five me the first/last leaf available // XXX Robert O'Callahan wants to move these elsewhere + // FIXME: Only GetLastLeaf() never returns a leaf frame in native anonymous + // subtrees under aFrame. However, GetFirstLeaf() may return a leaf frame + // in a native anonymous subtree. static void GetLastLeaf(nsIFrame** aFrame); static void GetFirstLeaf(nsIFrame** aFrame); @@ -4359,13 +4388,10 @@ class nsIFrame : public nsQueryFrame { * Also, depending on the pref accessibility.tabfocus some widgets may be * focusable but removed from the tab order. This is the default on * Mac OS X, where fewer items are focusable. - * @param [in, optional] aWithMouse, is this focus query for mouse clicking - * @param [in, optional] aCheckVisibility, whether to treat an invisible - * frame as not focusable * @return whether the frame is focusable via mouse, kbd or script. */ - [[nodiscard]] Focusable IsFocusable(bool aWithMouse = false, - bool aCheckVisibility = true); + [[nodiscard]] Focusable IsFocusable( + mozilla::IsFocusableFlags = mozilla::IsFocusableFlags(0)); protected: // Helper for IsFocusable. @@ -5482,25 +5508,6 @@ class nsIFrame : public nsQueryFrame { // NS_FRAME_IS_DIRTY bit set static void VerifyDirtyBitSet(const nsFrameList& aFrameList); - // Display Reflow Debugging - static void* DisplayReflowEnter(nsPresContext* aPresContext, nsIFrame* aFrame, - const ReflowInput& aReflowInput); - static void* DisplayLayoutEnter(nsIFrame* aFrame); - static void* DisplayIntrinsicISizeEnter(nsIFrame* aFrame, const char* aType); - static void* DisplayIntrinsicSizeEnter(nsIFrame* aFrame, const char* aType); - static void DisplayReflowExit(nsPresContext* aPresContext, nsIFrame* aFrame, - ReflowOutput& aMetrics, - const nsReflowStatus& aStatus, - void* aFrameTreeNode); - static void DisplayLayoutExit(nsIFrame* aFrame, void* aFrameTreeNode); - static void DisplayIntrinsicISizeExit(nsIFrame* aFrame, const char* aType, - nscoord aResult, void* aFrameTreeNode); - static void DisplayIntrinsicSizeExit(nsIFrame* aFrame, const char* aType, - nsSize aResult, void* aFrameTreeNode); - - static void DisplayReflowStartup(); - static void DisplayReflowShutdown(); - static mozilla::LazyLogModule sFrameLogModule; #endif }; |