mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +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
|
|
@ -8982,11 +8982,16 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
|||
SETCOORD_UNSET_INITIAL,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
// aspect-ratio: float, initial
|
||||
SetFactor(*aRuleData->ValueForAspectRatio(),
|
||||
pos->mAspectRatio, conditions,
|
||||
parentPos->mAspectRatio, 0.0f,
|
||||
SETFCT_UNSET_INITIAL | SETFCT_POSITIVE | SETFCT_NONE);
|
||||
// aspect-ratio: auto | <ratio>
|
||||
const nsCSSValue* aspectRatio = aRuleData->ValueForAspectRatio();
|
||||
if (aspectRatio->GetUnit() == eCSSUnit_Auto) {
|
||||
pos->mAspectRatio = 0.0f;
|
||||
} else {
|
||||
SetFactor(*aspectRatio,
|
||||
pos->mAspectRatio, conditions,
|
||||
parentPos->mAspectRatio, 0.0f,
|
||||
SETFCT_UNSET_INITIAL | SETFCT_POSITIVE | SETFCT_NONE);
|
||||
}
|
||||
|
||||
// box-sizing: enum, inherit, initial
|
||||
SetValue(*aRuleData->ValueForBoxSizing(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue