PR #2643 - The border-radius Directive Should Apply to Outlines

However, `-moz-outline-radius` should still override any `border-radius`.
This is primarily done for backward compatibility with some themes.
Additionally, it also allows for more advanced outline control than the CSS spec provides, without breaking spec.
Finally, if the spec is ever updated to include `outline-radius`, we'll be ready to drop the `-moz-` prefix!

Note: BZ 315209 has an inadvertent double-negative in nsDisplayList.cpp:
HasRadius() essentially returns the opposite value it should.
This commit is contained in:
Andy 2024-10-09 12:08:46 -07:00 committed by roytam1
commit cee682b980
4 changed files with 48 additions and 33 deletions

View file

@ -510,6 +510,8 @@ nsStyleBorder::CalcDifference(const nsStyleBorder& aNewData) const
}
}
// Note that border radius is used as a fallback for outline radius, if set.
// Any optimizations here should apply to both.
if (mBorderRadius != aNewData.mBorderRadius ||
!mBorderColors != !aNewData.mBorderColors) {
return nsChangeHint_RepaintFrame;