mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Issue #2045 - Part 7: Override revert values during presentation hint cascade
This commit is contained in:
parent
c4b6135c99
commit
166e98d2b9
1 changed files with 11 additions and 5 deletions
|
|
@ -46,11 +46,13 @@ nsHTMLStyleSheet::HTMLColorRule::MapRuleInfoInto(nsRuleData* aRuleData)
|
||||||
{
|
{
|
||||||
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Color)) {
|
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Color)) {
|
||||||
nsCSSValue* color = aRuleData->ValueForColor();
|
nsCSSValue* color = aRuleData->ValueForColor();
|
||||||
if (color->GetUnit() == eCSSUnit_Null &&
|
if ((color->GetUnit() == eCSSUnit_Null ||
|
||||||
aRuleData->mPresContext->UseDocumentColors())
|
color->GetUnit() == eCSSUnit_Revert) &&
|
||||||
|
aRuleData->mPresContext->UseDocumentColors()) {
|
||||||
color->SetColorValue(mColor);
|
color->SetColorValue(mColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* virtual */ bool
|
/* virtual */ bool
|
||||||
nsHTMLStyleSheet::HTMLColorRule::MightMapInheritedStyleData()
|
nsHTMLStyleSheet::HTMLColorRule::MightMapInheritedStyleData()
|
||||||
|
|
@ -98,7 +100,8 @@ nsHTMLStyleSheet::TableTHRule::MapRuleInfoInto(nsRuleData* aRuleData)
|
||||||
{
|
{
|
||||||
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Text)) {
|
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Text)) {
|
||||||
nsCSSValue* textAlign = aRuleData->ValueForTextAlign();
|
nsCSSValue* textAlign = aRuleData->ValueForTextAlign();
|
||||||
if (textAlign->GetUnit() == eCSSUnit_Null) {
|
if (textAlign->GetUnit() == eCSSUnit_Null ||
|
||||||
|
textAlign->GetUnit() == eCSSUnit_Revert) {
|
||||||
textAlign->SetIntValue(NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT,
|
textAlign->SetIntValue(NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT,
|
||||||
eCSSUnit_Enumerated);
|
eCSSUnit_Enumerated);
|
||||||
}
|
}
|
||||||
|
|
@ -126,11 +129,13 @@ nsHTMLStyleSheet::TableQuirkColorRule::MapRuleInfoInto(nsRuleData* aRuleData)
|
||||||
nsCSSValue* color = aRuleData->ValueForColor();
|
nsCSSValue* color = aRuleData->ValueForColor();
|
||||||
// We do not check UseDocumentColors() here, because we want to
|
// We do not check UseDocumentColors() here, because we want to
|
||||||
// use the body color no matter what.
|
// use the body color no matter what.
|
||||||
if (color->GetUnit() == eCSSUnit_Null)
|
if (color->GetUnit() == eCSSUnit_Null ||
|
||||||
|
color->GetUnit() == eCSSUnit_Revert) {
|
||||||
color->SetIntValue(NS_STYLE_COLOR_INHERIT_FROM_BODY,
|
color->SetIntValue(NS_STYLE_COLOR_INHERIT_FROM_BODY,
|
||||||
eCSSUnit_Enumerated);
|
eCSSUnit_Enumerated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* virtual */ bool
|
/* virtual */ bool
|
||||||
nsHTMLStyleSheet::TableQuirkColorRule::MightMapInheritedStyleData()
|
nsHTMLStyleSheet::TableQuirkColorRule::MightMapInheritedStyleData()
|
||||||
|
|
@ -153,7 +158,8 @@ nsHTMLStyleSheet::LangRule::MapRuleInfoInto(nsRuleData* aRuleData)
|
||||||
{
|
{
|
||||||
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
|
if (aRuleData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
|
||||||
nsCSSValue* lang = aRuleData->ValueForLang();
|
nsCSSValue* lang = aRuleData->ValueForLang();
|
||||||
if (lang->GetUnit() == eCSSUnit_Null) {
|
if (lang->GetUnit() == eCSSUnit_Null ||
|
||||||
|
lang->GetUnit() == eCSSUnit_Revert) {
|
||||||
lang->SetStringValue(mLang, eCSSUnit_Ident);
|
lang->SetStringValue(mLang, eCSSUnit_Ident);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue