mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 04:17:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
5cb41937fb
6 changed files with 13 additions and 12 deletions
|
|
@ -9338,7 +9338,7 @@ nsLayoutUtils::ComputeGeometryBox(nsIFrame* aFrame,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ nsStyleContext*
|
/* static */ already_AddRefed<nsStyleContext>
|
||||||
nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame)
|
nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
nsIContent* node = aFrame->GetContent();
|
nsIContent* node = aFrame->GetContent();
|
||||||
|
|
@ -9348,7 +9348,8 @@ nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame)
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(node, "Native anonymous element with no originating node?");
|
MOZ_ASSERT(node, "Native anonymous element with no originating node?");
|
||||||
if (nsIFrame* primaryFrame = node->GetPrimaryFrame()) {
|
if (nsIFrame* primaryFrame = node->GetPrimaryFrame()) {
|
||||||
return primaryFrame->StyleContext();
|
RefPtr<nsStyleContext> context = primaryFrame->StyleContext();
|
||||||
|
return context.forget();
|
||||||
}
|
}
|
||||||
// If the element doesn't have primary frame, get the computed style
|
// If the element doesn't have primary frame, get the computed style
|
||||||
// from the element directly.
|
// from the element directly.
|
||||||
|
|
@ -9356,9 +9357,5 @@ nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame)
|
||||||
MOZ_ASSERT(node == pc->Document()->GetRootElement(),
|
MOZ_ASSERT(node == pc->Document()->GetRootElement(),
|
||||||
"Root element is the only case for this fallback "
|
"Root element is the only case for this fallback "
|
||||||
"path to be triggered");
|
"path to be triggered");
|
||||||
RefPtr<nsStyleContext> styleContext =
|
return pc->StyleSet()->ResolveStyleFor(node->AsElement(), nullptr);
|
||||||
pc->StyleSet()->ResolveStyleFor(node->AsElement(), nullptr);
|
|
||||||
// Dropping the strong reference is fine because the style should be
|
|
||||||
// held strongly by the element.
|
|
||||||
return styleContext.get();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2885,7 +2885,7 @@ public:
|
||||||
* @param aFrame The frame associated with native anonymous content.
|
* @param aFrame The frame associated with native anonymous content.
|
||||||
* @return The resolved style context of the nearest non-anonymous DOM ancestor.
|
* @return The resolved style context of the nearest non-anonymous DOM ancestor.
|
||||||
*/
|
*/
|
||||||
static nsStyleContext* GetNonAnonymousStyleContext(nsIFrame* aFrame);
|
static already_AddRefed<nsStyleContext> GetNonAnonymousStyleContext(nsIFrame* aFrame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static uint32_t sFontSizeInflationEmPerLine;
|
static uint32_t sFontSizeInflationEmPerLine;
|
||||||
|
|
|
||||||
|
|
@ -1060,7 +1060,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||||
// This is only needed for root element because scrollbars of non-
|
// This is only needed for root element because scrollbars of non-
|
||||||
// root elements with "scrollbar-width: none" is already suppressed
|
// root elements with "scrollbar-width: none" is already suppressed
|
||||||
// in ScrollFrameHelper::CreateAnonymousContent.
|
// in ScrollFrameHelper::CreateAnonymousContent.
|
||||||
nsStyleContext* scrollbarStyle = nsLayoutUtils::GetNonAnonymousStyleContext(this);
|
RefPtr<nsStyleContext> scrollbarStyle = nsLayoutUtils::GetNonAnonymousStyleContext(this);
|
||||||
auto scrollbarWidth = scrollbarStyle->StyleUIReset()->mScrollbarWidth;
|
auto scrollbarWidth = scrollbarStyle->StyleUIReset()->mScrollbarWidth;
|
||||||
if (scrollbarWidth == StyleScrollbarWidth::None) {
|
if (scrollbarWidth == StyleScrollbarWidth::None) {
|
||||||
state.mVScrollbar = ShowScrollbar::Never;
|
state.mVScrollbar = ShowScrollbar::Never;
|
||||||
|
|
|
||||||
|
|
@ -2282,7 +2282,9 @@ IsHiDPIContext(nsPresContext* aContext)
|
||||||
static bool
|
static bool
|
||||||
IsScrollbarWidthThin(nsIFrame* aFrame)
|
IsScrollbarWidthThin(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
return aFrame->StyleUserInterface()->mScrollbarWidth == StyleScrollbarWidth::Thin;
|
RefPtr<nsStyleContext> styleContext = nsLayoutUtils::GetNonAnonymousStyleContext(aFrame);
|
||||||
|
auto scrollbarWidth = styleContext->StyleUIReset()->mScrollbarWidth;
|
||||||
|
return scrollbarWidth == StyleScrollbarWidth::Thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
||||||
|
|
@ -1101,7 +1101,9 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType,
|
||||||
static bool
|
static bool
|
||||||
IsScrollbarWidthThin(nsIFrame* aFrame)
|
IsScrollbarWidthThin(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
return aFrame->StyleUserInterface()->mScrollbarWidth == StyleScrollbarWidth::Thin;
|
RefPtr<nsStyleContext> styleContext = nsLayoutUtils::GetNonAnonymousStyleContext(aFrame);
|
||||||
|
auto scrollbarWidth = styleContext->StyleUIReset()->mScrollbarWidth;
|
||||||
|
return scrollbarWidth == StyleScrollbarWidth::Thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
||||||
|
|
@ -1572,7 +1572,7 @@ GetThemeDpiScaleFactor(nsIFrame* aFrame)
|
||||||
static bool
|
static bool
|
||||||
IsScrollbarWidthThin(nsIFrame* aFrame)
|
IsScrollbarWidthThin(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
nsStyleContext* styleContext = nsLayoutUtils::GetNonAnonymousStyleContext(aFrame);
|
RefPtr<nsStyleContext> styleContext = nsLayoutUtils::GetNonAnonymousStyleContext(aFrame);
|
||||||
auto scrollbarWidth = styleContext->StyleUIReset()->mScrollbarWidth;
|
auto scrollbarWidth = styleContext->StyleUIReset()->mScrollbarWidth;
|
||||||
return scrollbarWidth == StyleScrollbarWidth::Thin;
|
return scrollbarWidth == StyleScrollbarWidth::Thin;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue