Skip to content

Commit

Permalink
Bug 1715984 - Remove -moz-outline-radius. r=TYLin
Browse files Browse the repository at this point in the history
It does nothing since 88 and we unshipped it in 89.

Differential Revision: https://phabricator.services.mozilla.com/D117532
  • Loading branch information
emilio committed Jun 15, 2021
1 parent 8e2b680 commit 14d63a7
Show file tree
Hide file tree
Showing 34 changed files with 22 additions and 441 deletions.
4 changes: 0 additions & 4 deletions devtools/client/locales/en-US/tooltips.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ inactive-css-position-property-on-unpositioned-box = <strong>{ $property }</stro
inactive-text-overflow-when-no-overflow = <strong>{ $property }</strong> has no effect on this element since <strong>overflow:hidden</strong> is not set.
inactive-outline-radius-when-outline-style-auto-or-none = <strong>{ $property }</strong> has no effect on this element because its <strong>outline-style</strong> is <strong>auto</strong> or <strong>none</strong>.
inactive-css-not-for-internal-table-elements = <strong>{ $property }</strong> has no effect on internal table elements.
inactive-css-not-for-internal-table-elements-except-table-cells = <strong>{ $property }</strong> has no effect on internal table elements except table cells.
Expand Down Expand Up @@ -83,8 +81,6 @@ inactive-css-not-for-internal-table-elements-fix = Try setting its <strong>displ
inactive-css-not-for-internal-table-elements-except-table-cells-fix = Try setting its <strong>display</strong> property to something else than <strong>table-column</strong>, <strong>table-row</strong>, <strong>table-column-group</strong>, <strong>table-row-group</strong>, or <strong>table-footer-group</strong>. { learn-more }
inactive-outline-radius-when-outline-style-auto-or-none-fix = Try setting its <strong>outline-style</strong> property to something other than <strong>auto</strong> or <strong>none</strong>. { learn-more }
inactive-css-not-table-fix = Try adding <strong>display:table</strong> or <strong>display:inline-table</strong>. { learn-more }
inactive-scroll-padding-when-not-scroll-container-fix = Try adding <strong>overflow:auto</strong>, <strong>overflow:scroll</strong>, or <strong>overflow:hidden</strong>. { learn-more }
Expand Down
4 changes: 0 additions & 4 deletions devtools/server/actors/animation-type-longhand.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"max-width",
"min-height",
"min-width",
"-moz-outline-radius-bottomleft",
"-moz-outline-radius-bottomright",
"-moz-outline-radius-topleft",
"-moz-outline-radius-topright",
"offset-distance",
"padding-bottom",
"padding-left",
Expand Down
14 changes: 0 additions & 14 deletions devtools/server/actors/utils/inactive-property-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,6 @@ class InactivePropertyHelper {
msgId: "inactive-text-overflow-when-no-overflow",
numFixProps: 1,
},
// -moz-outline-radius doesn't apply when outline-style is auto or none.
{
invalidProperties: [
"-moz-outline-radius",
"-moz-outline-radius-topleft",
"-moz-outline-radius-topright",
"-moz-outline-radius-bottomleft",
"-moz-outline-radius-bottomright",
],
when: () => this.checkComputedStyle("outline-style", ["auto", "none"]),
fixId: "inactive-outline-radius-when-outline-style-auto-or-none-fix",
msgId: "inactive-outline-radius-when-outline-style-auto-or-none",
numFixProps: 1,
},
// margin properties used on table internal elements.
{
invalidProperties: [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"vertical-align.js",
"table.js",
"text-overflow.js",
"outline-radius.js",
].map(file => `${FOLDER}/${file}`);

// Import all the test cases
Expand Down
24 changes: 0 additions & 24 deletions devtools/shared/css/generated/properties-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -2988,10 +2988,6 @@ exports.CSS_PROPERTIES = {
"outline-color",
"outline-style",
"outline-width",
"-moz-outline-radius-topleft",
"-moz-outline-radius-topright",
"-moz-outline-radius-bottomright",
"-moz-outline-radius-bottomleft",
"outline-offset",
"size",
"padding-top",
Expand Down Expand Up @@ -11071,22 +11067,6 @@ exports.PREFERENCES = [
"offset-distance",
"layout.css.motion-path.enabled"
],
[
"-moz-outline-radius-bottomleft",
"layout.css.moz-outline-radius.enabled"
],
[
"-moz-outline-radius-bottomright",
"layout.css.moz-outline-radius.enabled"
],
[
"-moz-outline-radius-topleft",
"layout.css.moz-outline-radius.enabled"
],
[
"-moz-outline-radius-topright",
"layout.css.moz-outline-radius.enabled"
],
[
"overflow-clip-box",
"layout.css.overflow-clip-box.enabled"
Expand All @@ -11103,10 +11083,6 @@ exports.PREFERENCES = [
"zoom",
"layout.css.zoom-transform-hack.enabled"
],
[
"-moz-outline-radius",
"layout.css.moz-outline-radius.enabled"
],
[
"-moz-transition-duration",
"layout.css.prefixes.transitions"
Expand Down
4 changes: 2 additions & 2 deletions layout/generic/crashtests/767765.html

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions layout/generic/nsIFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -1485,9 +1485,6 @@ class nsIFrame : public nsQueryFrame {
* aFrameSize is used as the basis for percentage widths and heights.
* aBorderArea is used for the adjustment of radii that might be too
* large.
* FIXME: In the long run, we can probably get away with only one of
* these, especially if we change the way we handle outline-radius (by
* removing it and inflating the border radius)
*
* Return whether any radii are nonzero.
*/
Expand Down
25 changes: 9 additions & 16 deletions layout/painting/nsCSSRendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,22 +994,15 @@ nsCSSRendering::CreateBorderRendererForNonThemedOutline(
nscoord twipsRadii[8];

// get the radius for our outline
if (StaticPrefs::layout_css_outline_follows_border_radius_enabled()) {
if (aForFrame->GetBorderRadii(twipsRadii)) {
RectCornerRadii innerRadii;
ComputePixelRadii(twipsRadii, oneDevPixel, &innerRadii);

Float devPixelOffset = aPresContext->AppUnitsToFloatDevPixels(offset);
const Float widths[4] = {
outlineWidths[0] + devPixelOffset, outlineWidths[1] + devPixelOffset,
outlineWidths[2] + devPixelOffset, outlineWidths[3] + devPixelOffset};
nsCSSBorderRenderer::ComputeOuterRadii(innerRadii, widths, &outlineRadii);
}
} else {
nsIFrame::ComputeBorderRadii(ourOutline->mOutlineRadius,
aForFrame->GetSize(), outerRect.Size(),
Sides(), twipsRadii);
ComputePixelRadii(twipsRadii, oneDevPixel, &outlineRadii);
if (aForFrame->GetBorderRadii(twipsRadii)) {
RectCornerRadii innerRadii;
ComputePixelRadii(twipsRadii, oneDevPixel, &innerRadii);

Float devPixelOffset = aPresContext->AppUnitsToFloatDevPixels(offset);
const Float widths[4] = {
outlineWidths[0] + devPixelOffset, outlineWidths[1] + devPixelOffset,
outlineWidths[2] + devPixelOffset, outlineWidths[3] + devPixelOffset};
nsCSSBorderRenderer::ComputeOuterRadii(innerRadii, widths, &outlineRadii);
}

StyleBorderStyle outlineStyles[4] = {outlineStyle, outlineStyle, outlineStyle,
Expand Down
5 changes: 1 addition & 4 deletions layout/painting/nsDisplayList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4937,10 +4937,7 @@ bool nsDisplayOutline::CreateWebRenderCommands(
}

bool nsDisplayOutline::HasRadius() const {
const auto& radius =
StaticPrefs::layout_css_outline_follows_border_radius_enabled()
? mFrame->StyleBorder()->mBorderRadius
: mFrame->StyleOutline()->mOutlineRadius;
const auto& radius = mFrame->StyleBorder()->mBorderRadius;
return !nsLayoutUtils::HasNonZeroCorner(radius);
}

Expand Down
1 change: 0 additions & 1 deletion layout/reftests/border-radius/outline-circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<style>
div { width: 50px; height: 50px;
outline: 2px solid black;
-moz-outline-radius: 10px;
border-radius: 10px;
}
</style>
Expand Down
1 change: 0 additions & 1 deletion layout/reftests/border-radius/outline-ellips.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<style>
div { width: 50px; height: 50px;
outline: 2px solid black;
-moz-outline-radius: 10px / 20px;
border-radius: 10px / 20px;
}
</style>
Expand Down
27 changes: 0 additions & 27 deletions layout/reftests/box-properties/outline-radius-percent-1-ref.html

This file was deleted.

27 changes: 0 additions & 27 deletions layout/reftests/box-properties/outline-radius-percent-1.html

This file was deleted.

1 change: 0 additions & 1 deletion layout/reftests/box-properties/reftest.list
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
== outline-radius-percent-1.html outline-radius-percent-1-ref.html
== min-width-1.html min-width-1-ref.html
== min-height-1.html min-height-1-ref.html
== max-width-1.html max-width-1-ref.html
Expand Down
2 changes: 1 addition & 1 deletion layout/reftests/box-shadow/611574-2-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head><style>
button,span,fieldset { border-radius: 7px 3px; background-color: #0F0; }
button { border: none; outline: 3px solid black; -moz-outline-radius: 7px 3px; outline-offset: -2px; }
button { border: none; outline: 3px solid black; outline-offset: -2px; }
</style></head>
<body style="margin:30px">
<div style="column-count:3">
Expand Down
2 changes: 1 addition & 1 deletion layout/reftests/box-shadow/611574-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head><style>
button,span,fieldset { border-radius: 7px 3px; background-color: #0F0; }
button { border: none; outline: 3px solid black; -moz-outline-radius: 7px 3px; outline-offset: -2px; }
button { border: none; outline: 3px solid black; outline-offset: -2px; }
</style></head>
<body style="margin:30px">
<div style="column-count:3">
Expand Down
2 changes: 0 additions & 2 deletions layout/reftests/bugs/421632-1-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

.t2 tr {
outline: 1px solid gray;
-moz-outline-radius: .3em;
}

.t1 tr {
outline: 1px solid red;
-moz-outline-radius: .3em;
}

</style>
Expand Down
2 changes: 0 additions & 2 deletions layout/reftests/bugs/421632-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

.t2 tr {
outline: 1px solid gray;
-moz-outline-radius: .3em;
}

.t1 tr {
outline: 1px solid red;
-moz-outline-radius: .3em;
}

</style>
Expand Down
9 changes: 2 additions & 7 deletions layout/style/GlobalStyleSheetCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,10 @@ void GlobalStyleSheetCache::BuildPreferenceSheet(
}

sheetText.AppendPrintf(
"%s { outline: %dpx %s !important; %s}\n",
"%s { outline: %dpx %s !important; }\n",
focusRingOnAnything ? ":focus" : "*|*:link:focus, *|*:visited:focus",
focusRingWidth,
focusRingStyle == 0 ? // solid
"solid -moz-mac-focusring"
: "dotted WindowText",
focusRingStyle == 0 ? // solid
"-moz-outline-radius: 3px; outline-offset: 1px; "
: "");
focusRingStyle == 0 ? "solid -moz-mac-focusring" : "dotted WindowText");
}

if (aPrefs.mUseFocusColors) {
Expand Down
14 changes: 0 additions & 14 deletions layout/style/crashtests/1401692.html

This file was deleted.

1 change: 0 additions & 1 deletion layout/style/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ load 1400926.html
load 1400936-1.html
load 1400936-2.html
pref(dom.animations-api.implicit-keyframes.enabled,true) load 1401256.html
load 1401692.html
load 1401706.html
load 1401801.html
load 1401825.html
Expand Down
9 changes: 3 additions & 6 deletions layout/style/nsStyleStruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ nsChangeHint nsStyleBorder::CalcDifference(
}

nsStyleOutline::nsStyleOutline(const Document& aDocument)
: mOutlineRadius(ZeroBorderRadius()),
mOutlineWidth(kMediumBorderWidth),
: mOutlineWidth(kMediumBorderWidth),
mOutlineOffset({0.0f}),
mOutlineColor(StyleColor::CurrentColor()),
mOutlineStyle(StyleOutlineStyle::BorderStyle(StyleBorderStyle::None)),
Expand All @@ -546,8 +545,7 @@ nsStyleOutline::nsStyleOutline(const Document& aDocument)
}

nsStyleOutline::nsStyleOutline(const nsStyleOutline& aSrc)
: mOutlineRadius(aSrc.mOutlineRadius),
mOutlineWidth(aSrc.mOutlineWidth),
: mOutlineWidth(aSrc.mOutlineWidth),
mOutlineOffset(aSrc.mOutlineOffset),
mOutlineColor(aSrc.mOutlineColor),
mOutlineStyle(aSrc.mOutlineStyle),
Expand All @@ -565,8 +563,7 @@ nsChangeHint nsStyleOutline::CalcDifference(
}

if (mOutlineStyle != aNewData.mOutlineStyle ||
mOutlineColor != aNewData.mOutlineColor ||
mOutlineRadius != aNewData.mOutlineRadius) {
mOutlineColor != aNewData.mOutlineColor) {
if (mActualOutlineWidth > 0) {
return nsChangeHint_RepaintFrame;
}
Expand Down
2 changes: 0 additions & 2 deletions layout/style/nsStyleStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleOutline {

nsChangeHint CalcDifference(const nsStyleOutline& aNewData) const;

mozilla::StyleBorderRadius mOutlineRadius;

// This is the specified value of outline-width, but with length values
// computed to absolute. mActualOutlineWidth stores the outline-width
// value used by layout. (We must store mOutlineWidth for the same
Expand Down
Loading

0 comments on commit 14d63a7

Please sign in to comment.