mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 10:37:33 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
789327be17
3 changed files with 18 additions and 7 deletions
|
|
@ -242,9 +242,9 @@ WorkerRunnable::Run()
|
||||||
// underlying WorkerThreadPrimaryRunnable active, which means we should
|
// underlying WorkerThreadPrimaryRunnable active, which means we should
|
||||||
// find a CycleCollectedJSContext.
|
// find a CycleCollectedJSContext.
|
||||||
if (!CycleCollectedJSContext::Get()) {
|
if (!CycleCollectedJSContext::Get()) {
|
||||||
MOZ_DIAGNOSTIC_ASSERT(false,
|
NS_ASSERTION(false,
|
||||||
"A WorkerRunnable was executed after "
|
"A WorkerRunnable was executed after "
|
||||||
"WorkerThreadPrimaryRunnable ended.");
|
"WorkerThreadPrimaryRunnable ended.");
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,8 +143,7 @@ struct ReduceNumberCalcOps : public mozilla::css::BasicFloatCalcOps,
|
||||||
{
|
{
|
||||||
result_type ComputeLeafValue(const nsCSSValue& aValue)
|
result_type ComputeLeafValue(const nsCSSValue& aValue)
|
||||||
{
|
{
|
||||||
// FIXME: Restore this assertion once ParseColor no longer uses this class.
|
MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Number, "unexpected unit");
|
||||||
//MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Number, "unexpected unit");
|
|
||||||
return aValue.GetFloatValue();
|
return aValue.GetFloatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,6 +153,17 @@ struct ReduceNumberCalcOps : public mozilla::css::BasicFloatCalcOps,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Same as above, but reduces leaves as <percentage>. You normally don't want to use this.
|
||||||
|
// Only useful in parsing percentage saturation and lightness values by ParseColorComponent.
|
||||||
|
struct ReducePercentageCalcOps : ReduceNumberCalcOps
|
||||||
|
{
|
||||||
|
result_type ComputeLeafValue(const nsCSSValue& aValue)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Percent, "unexpected unit");
|
||||||
|
return aValue.GetPercentValue();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static_assert(css::eAuthorSheetFeatures == 0 &&
|
static_assert(css::eAuthorSheetFeatures == 0 &&
|
||||||
css::eUserSheetFeatures == 1 &&
|
css::eUserSheetFeatures == 1 &&
|
||||||
css::eAgentSheetFeatures == 2,
|
css::eAgentSheetFeatures == 2,
|
||||||
|
|
@ -7324,7 +7334,7 @@ CSSParserImpl::ParseColorComponent(float& aComponent, Maybe<char> aSeparator)
|
||||||
if (!ParseCalc(aValue, VARIANT_LPN | VARIANT_CALC)) {
|
if (!ParseCalc(aValue, VARIANT_LPN | VARIANT_CALC)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ReduceNumberCalcOps ops;
|
ReducePercentageCalcOps ops;
|
||||||
value = mozilla::css::ComputeCalc(aValue, ops);
|
value = mozilla::css::ComputeCalc(aValue, ops);
|
||||||
} else {
|
} else {
|
||||||
REPORT_UNEXPECTED_TOKEN(PEExpectedPercent);
|
REPORT_UNEXPECTED_TOKEN(PEExpectedPercent);
|
||||||
|
|
|
||||||
|
|
@ -2772,8 +2772,9 @@ static bool SelectorListMatches(Element* aElement,
|
||||||
nsCSSSelector* next = selector->mNext;
|
nsCSSSelector* next = selector->mNext;
|
||||||
SelectorMatchesTreeFlags selectorTreeFlags = SelectorMatchesTreeFlags(0);
|
SelectorMatchesTreeFlags selectorTreeFlags = SelectorMatchesTreeFlags(0);
|
||||||
// Try to look for the closest ancestor link element if we're processing
|
// Try to look for the closest ancestor link element if we're processing
|
||||||
// the selector list argument of a pseudo-class.
|
// the selector list argument of a pseudo-class, but only if for a new style context (see SelectorMatches).
|
||||||
if (!aNodeMatchContext.mIsRelevantLink &&
|
if (!aNodeMatchContext.mIsRelevantLink &&
|
||||||
|
aTreeMatchContext.mForStyling &&
|
||||||
(aSelectorFlags & SelectorMatchesFlags::IS_PSEUDO_CLASS_ARGUMENT)) {
|
(aSelectorFlags & SelectorMatchesFlags::IS_PSEUDO_CLASS_ARGUMENT)) {
|
||||||
selectorTreeFlags = eLookForRelevantLink;
|
selectorTreeFlags = eLookForRelevantLink;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue