mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Issue #2757: Create a new basicShape of type inset then set inset coords to zero.
This commit is contained in:
parent
c3590da576
commit
67421b3048
1 changed files with 12 additions and 1 deletions
|
|
@ -10093,7 +10093,18 @@ SetStyleShapeSourceToCSSValue(
|
|||
if (basicShape) {
|
||||
aShapeSource->SetBasicShape(basicShape, referenceBox);
|
||||
} else {
|
||||
aShapeSource->SetReferenceBox(referenceBox);
|
||||
if (mozilla::IsSame<ReferenceBox, StyleGeometryBox>::value &&
|
||||
referenceBox != ReferenceBox::NoBox) {
|
||||
RefPtr<StyleBasicShape> defaultInset = new StyleBasicShape(StyleBasicShapeType::Inset);
|
||||
nsStyleCoord zero;
|
||||
zero.SetCoordValue(0);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
defaultInset->Coordinates().AppendElement(zero);
|
||||
}
|
||||
aShapeSource->SetBasicShape(defaultInset, referenceBox);
|
||||
} else {
|
||||
aShapeSource->SetReferenceBox(referenceBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue