mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 17:37:30 +09:00
Issue #3109 - Use CSS' internal length clamp value instead.
This commit is contained in:
parent
536619ee89
commit
6e43835b34
1 changed files with 24 additions and 0 deletions
|
|
@ -1788,6 +1788,29 @@ SetFactor(const nsCSSValue& aValue, float& aField, RuleNodeCacheConditions& aCon
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case eCSSUnit_Calc: {
|
||||||
|
RuleNodeReduceNumberCalcOps ops;
|
||||||
|
aField = css::ComputeCalc(aValue, ops);
|
||||||
|
if (mozilla::IsNaN(aField)) {
|
||||||
|
aField = 0.0f;
|
||||||
|
}
|
||||||
|
if (aFlags & SETFCT_POSITIVE) {
|
||||||
|
NS_ASSERTION(aField >= 0.0f, "negative value for positive-only property");
|
||||||
|
if (aField < 0.0f) {
|
||||||
|
aField = 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aFlags & SETFCT_OPACITY) {
|
||||||
|
if (aField < 0.0f) {
|
||||||
|
aField = 0.0f;
|
||||||
|
}
|
||||||
|
if (aField > 1.0f) {
|
||||||
|
aField = 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
case eCSSUnit_Inherit:
|
case eCSSUnit_Inherit:
|
||||||
aConditions.SetUncacheable();
|
aConditions.SetUncacheable();
|
||||||
aField = aParentValue;
|
aField = aParentValue;
|
||||||
|
|
@ -8130,6 +8153,7 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
|
||||||
{
|
{
|
||||||
const nsCSSPropertyID* subprops =
|
const nsCSSPropertyID* subprops =
|
||||||
nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_radius);
|
nsCSSProps::SubpropertyEntryFor(eCSSProperty_border_radius);
|
||||||
|
const float RADIUS_MAX = 17895697; // CSS length clamp value
|
||||||
NS_FOR_CSS_FULL_CORNERS(corner) {
|
NS_FOR_CSS_FULL_CORNERS(corner) {
|
||||||
int cx = FullToHalfCorner(corner, false);
|
int cx = FullToHalfCorner(corner, false);
|
||||||
int cy = FullToHalfCorner(corner, true);
|
int cy = FullToHalfCorner(corner, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue