mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 06:18:38 +09:00
Enable CSS aspect-ratio sizing
This commit is contained in:
parent
3df0ae2323
commit
7766f8f53d
12 changed files with 164 additions and 1310 deletions
|
|
@ -964,6 +964,22 @@ nsComputedDOMStyle::DoGetBinding()
|
|||
return val.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue>
|
||||
nsComputedDOMStyle::DoGetAspectRatio()
|
||||
{
|
||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||
float ratio = StylePosition()->mAspectRatio;
|
||||
if (ratio == 0.0f) {
|
||||
val->SetIdent(eCSSKeyword_auto);
|
||||
} else {
|
||||
nsAutoString ratioString;
|
||||
nsStyleUtil::AppendCSSNumber(ratio, ratioString);
|
||||
ratioString.AppendLiteral(" / 1");
|
||||
val->SetString(ratioString);
|
||||
}
|
||||
return val.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue>
|
||||
nsComputedDOMStyle::DoGetClear()
|
||||
{
|
||||
|
|
@ -6841,6 +6857,4 @@ already_AddRefed<CSSValue>
|
|||
nsComputedDOMStyle::DoGetOverflowBlockEnd()
|
||||
{
|
||||
return DoGetOverflowBlock();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue