tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 5689509619dd4ee218d78610e2957416b59dd16b
parent 2c38577856bde04f30c57aff9c944d438d54222d
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Tue, 30 Sep 2025 19:28:34 +0000

Bug 1991662 - Remove overflow-clip-box. r=layout-reviewers,devtools-reviewers,nchevobbe,TYLin

Differential Revision: https://phabricator.services.mozilla.com/D266801

Diffstat:
Mdevtools/client/inspector/compatibility/test/browser/browser_compatibility_css-property_issue.js | 10+---------
Mdevtools/client/inspector/rules/test/browser_rules_css-compatibility-learn-more-link.js | 10+---------
Mdevtools/server/actors/animation-type-longhand.js | 2--
Mdom/animation/test/mozilla/test_disabled_properties.html | 28++++++++++++++--------------
Mdom/base/use_counter_metrics.yaml | 108+++----------------------------------------------------------------------------
Mlayout/generic/ScrollContainerFrame.cpp | 133++-----------------------------------------------------------------------------
Dlayout/reftests/box-properties/overflow-clip-box-1-ref.html | 99-------------------------------------------------------------------------------
Dlayout/reftests/box-properties/overflow-clip-box-1.html | 76----------------------------------------------------------------------------
Dlayout/reftests/box-properties/overflow-clip-box-2-ref.html | 101-------------------------------------------------------------------------------
Dlayout/reftests/box-properties/overflow-clip-box-2.html | 78------------------------------------------------------------------------------
Dlayout/reftests/box-properties/overflow-clip-box-3-ref.html | 23-----------------------
Dlayout/reftests/box-properties/overflow-clip-box-3.html | 30------------------------------
Mlayout/reftests/box-properties/reftest.list | 3---
Dlayout/reftests/bugs/992447-ref.html | 28----------------------------
Dlayout/reftests/bugs/992447.html | 28----------------------------
Mlayout/reftests/bugs/reftest.list | 1-
Mlayout/style/nsCSSProps.cpp | 10++--------
Mlayout/style/nsStyleStruct.cpp | 8+-------
Mlayout/style/nsStyleStruct.h | 2--
Mlayout/style/res/forms.css | 1-
Mlayout/style/test/file_animations_with_disabled_properties.html | 8++++----
Mlayout/style/test/property_database.js | 42------------------------------------------
Mlayout/style/test/test_animations_with_disabled_properties.html | 6+++---
Mmodules/libpref/init/StaticPrefList.yaml | 6------
Mservo/components/style/properties/longhands/box.mako.rs | 15---------------
Mservo/components/style/properties/shorthands/box.mako.rs | 11-----------
Mtesting/web-platform/tests/css/css-contain/contain-paint-clip-006-ref.html | 1-
Mtesting/web-platform/tests/css/css-contain/contain-paint-clip-006.html | 3+--
Mtesting/web-platform/tests/html/rendering/widgets/the-select-element/select-as-listbox-default-styles.tentative.html | 1-
29 files changed, 33 insertions(+), 839 deletions(-)

diff --git a/devtools/client/inspector/compatibility/test/browser/browser_compatibility_css-property_issue.js b/devtools/client/inspector/compatibility/test/browser/browser_compatibility_css-property_issue.js @@ -16,7 +16,6 @@ const TEST_URI = ` scrollbar-color: gold; user-modify: read-only; object-view-box: inset(0% 19% -33% 57%); - overflow-clip-box: padding-box; } div { overflow-anchor: auto; @@ -51,14 +50,7 @@ const TEST_DATA_SELECTED = [ deprecated: false, experimental: true, }, - // TODO: Re-enable it when we have another property with no MDN url nor spec url Bug 1840910 - /*{ - // No MDN url nor spec url - type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY, - property: "overflow-clip-box", - deprecated: false, - experimental: false, - },*/ + // TODO: Write a test for it when we have a property with no MDN url nor spec url Bug 1840910 ]; const TEST_DATA_ALL = [ diff --git a/devtools/client/inspector/rules/test/browser_rules_css-compatibility-learn-more-link.js b/devtools/client/inspector/rules/test/browser_rules_css-compatibility-learn-more-link.js @@ -12,8 +12,6 @@ const TEST_URI = ` body { user-select: none; object-view-box: inset(0% 19% -33% 57%); - /*TODO: Re-enable it when we have another property with no MDN url nor spec url Bug 1840910*/ - /*overflow-clip-box: padding-box;*/ } </style> <body> @@ -39,13 +37,7 @@ const TEST_DATA_INITIAL = [ expectedLearnMoreUrl: "https://drafts.csswg.org/css-images-5/#propdef-object-view-box", }, - // TODO: Re-enable it when we have another property with no MDN url nor spec url Bug 1840910 - /*"overflow-clip-box": { - expected: COMPATIBILITY_TOOLTIP_MESSAGE.default, - value: "padding-box", - // No MDN nor spec url - expectedLearnMoreUrl: null, - },*/ + // TODO: Add a test for it when we have another property with no MDN url nor spec url Bug 1840910 }, ], }, diff --git a/devtools/server/actors/animation-type-longhand.js b/devtools/server/actors/animation-type-longhand.js @@ -128,8 +128,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [ "outline-style", "overflow-anchor", "overflow-block", - "overflow-clip-box-block", - "overflow-clip-box-inline", "overflow-inline", "overflow-wrap", "overflow-x", diff --git a/dom/animation/test/mozilla/test_disabled_properties.html b/dom/animation/test/mozilla/test_disabled_properties.html @@ -13,20 +13,20 @@ function waitForSetPref(pref, value) { } /* - * These tests rely on the fact that the overflow-clip-box property is - * disabled by the layout.css.overflow-clip-box.enabled pref. If we ever remove + * These tests rely on the fact that the font-palette property is + * disabled by the layout.css.font-palette.enabled pref. If we ever remove * that pref we will need to substitute some other pref:property combination. */ promise_test(function(t) { - return waitForSetPref('layout.css.overflow-clip-box.enabled', true).then(() => { - var anim = addDiv(t).animate({ overflowClipBoxBlock: [ 'padding-box', 'content-box' ]}); + return waitForSetPref('layout.css.font-palette.enabled', true).then(() => { + var anim = addDiv(t).animate({ fontPalette: [ 'light', 'dark' ]}); assert_equals(anim.effect.getKeyframes().length, 2, 'A property-indexed keyframe specifying only enabled' + ' properties produces keyframes'); - return waitForSetPref('layout.css.overflow-clip-box.enabled', false); + return waitForSetPref('layout.css.font-palette.enabled', false); }).then(() => { - var anim = addDiv(t).animate({ overflowClipBoxBlock: [ 'padding-box', 'content-box' ]}); + var anim = addDiv(t).animate({ fontPalette: [ 'light', 'dark' ]}); assert_equals(anim.effect.getKeyframes().length, 0, 'A property-indexed keyframe specifying only disabled' + ' properties produces no keyframes'); @@ -35,8 +35,8 @@ promise_test(function(t) { promise_test(function(t) { var createAnim = () => { - var anim = addDiv(t).animate([ { overflowClipBoxBlock: 'padding-box' }, - { overflowClipBoxBlock: 'content-box' } ]); + var anim = addDiv(t).animate([ { fontPalette: 'light' }, + { fontPalette: 'dark' } ]); assert_equals(anim.effect.getKeyframes().length, 2, 'Animation specified using a keyframe sequence should' + ' return the same number of keyframes regardless of' @@ -55,17 +55,17 @@ promise_test(function(t) { `${descr} should NOT have the '${property}' property`); }; - return waitForSetPref('layout.css.overflow-clip-box.enabled', true).then(() => { + return waitForSetPref('layout.css.font-palette.enabled', true).then(() => { var anim = createAnim(); - assert_has_property(anim, 0, 'Initial keyframe', 'overflowClipBoxBlock'); - assert_has_property(anim, 1, 'Final keyframe', 'overflowClipBoxBlock'); - return waitForSetPref('layout.css.overflow-clip-box.enabled', false); + assert_has_property(anim, 0, 'Initial keyframe', 'fontPalette'); + assert_has_property(anim, 1, 'Final keyframe', 'fontPalette'); + return waitForSetPref('layout.css.font-palette.enabled', false); }).then(() => { var anim = createAnim(); assert_does_not_have_property(anim, 0, 'Initial keyframe', - 'overflowClipBoxBlock'); + 'fontPalette'); assert_does_not_have_property(anim, 1, 'Final keyframe', - 'overflowClipBoxBlock'); + 'fontPalette'); }); }, 'Specifying a disabled property using a keyframe sequence'); diff --git a/dom/base/use_counter_metrics.yaml b/dom/base/use_counter_metrics.yaml @@ -108,7 +108,7 @@ use.counter: send_in_pings: - use-counters -# Total of 2375 use counter metrics (excludes denominators). +# Total of 2369 use counter metrics (excludes denominators). # Total of 355 'page' use counters. use.counter.page: svgsvgelement_getelementbyid: @@ -16460,7 +16460,7 @@ use.counter.deprecated_ops.doc: send_in_pings: - use-counters -# Total of 707 'CSS (page)' use counters. +# Total of 704 'CSS (page)' use counters. use.counter.css.page: css_align_content: type: counter @@ -18927,40 +18927,6 @@ use.counter.css.page: send_in_pings: - use-counters - css_overflow_clip_box_block: - type: counter - description: > - Whether a page used the CSS property overflow-clip-box-block. - Compare against `use.counter.top_level_content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - - css_overflow_clip_box_inline: - type: counter - description: > - Whether a page used the CSS property overflow-clip-box-inline. - Compare against `use.counter.top_level_content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - css_fill_opacity: type: counter description: > @@ -23925,23 +23891,6 @@ use.counter.css.page: send_in_pings: - use-counters - css_overflow_clip_box: - type: counter - description: > - Whether a page used the CSS property overflow-clip-box. - Compare against `use.counter.top_level_content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - css_overscroll_behavior: type: counter description: > @@ -28481,7 +28430,7 @@ use.counter.css.page: send_in_pings: - use-counters -# Total of 707 'CSS (document)' use counters. +# Total of 704 'CSS (document)' use counters. use.counter.css.doc: css_align_content: type: counter @@ -30948,40 +30897,6 @@ use.counter.css.doc: send_in_pings: - use-counters - css_overflow_clip_box_block: - type: counter - description: > - Whether a document used the CSS property overflow-clip-box-block. - Compare against `use.counter.content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - - css_overflow_clip_box_inline: - type: counter - description: > - Whether a document used the CSS property overflow-clip-box-inline. - Compare against `use.counter.content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - css_fill_opacity: type: counter description: > @@ -35946,23 +35861,6 @@ use.counter.css.doc: send_in_pings: - use-counters - css_overflow_clip_box: - type: counter - description: > - Whether a document used the CSS property overflow-clip-box. - Compare against `use.counter.content_documents_destroyed` - to calculate the rate. - bugs: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - data_reviews: - - https://bugzilla.mozilla.org/show_bug.cgi?id=1852098 - notification_emails: - - dom-core@mozilla.com - - emilio@mozilla.com - expires: never - send_in_pings: - - use-counters - css_overscroll_behavior: type: counter description: > diff --git a/layout/generic/ScrollContainerFrame.cpp b/layout/generic/ScrollContainerFrame.cpp @@ -1279,8 +1279,9 @@ nscoord ScrollContainerFrame::IntrinsicISize(const IntrinsicSizeInput& aInput, // becomes completely visible within the scrollport rather than using the union // of the overflow areas at their current position. static void GetScrollableOverflowForPerspective( - nsIFrame* aScrolledFrame, nsIFrame* aCurrentFrame, const nsRect aScrollPort, - nsPoint aOffset, nsRect& aScrolledFrameOverflowArea) { + nsIFrame* aScrolledFrame, nsIFrame* aCurrentFrame, + const nsRect& aScrollPort, nsPoint aOffset, + nsRect& aScrolledFrameOverflowArea) { // Iterate over all children except pop-ups. for (const auto& [list, listID] : aCurrentFrame->ChildLists()) { for (nsIFrame* child : list) { @@ -3570,61 +3571,6 @@ nsRect ScrollContainerFrame::ExpandRectToNearlyVisible( return rect; } -static bool ShouldBeClippedByFrame(nsIFrame* aClipFrame, - nsIFrame* aClippedFrame) { - return nsLayoutUtils::IsProperAncestorFrame(aClipFrame, aClippedFrame); -} - -static void ClipItemsExceptCaret( - nsDisplayList* aList, nsDisplayListBuilder* aBuilder, nsIFrame* aClipFrame, - const DisplayItemClipChain* aExtraClip, - nsTHashMap<nsPtrHashKey<const DisplayItemClipChain>, - const DisplayItemClipChain*>& aCache) { - for (nsDisplayItem* i : *aList) { - if (!ShouldBeClippedByFrame(aClipFrame, i->Frame())) { - continue; - } - - const DisplayItemType type = i->GetType(); - if (type != DisplayItemType::TYPE_CARET && - type != DisplayItemType::TYPE_CONTAINER) { - const DisplayItemClipChain* clip = i->GetClipChain(); - const DisplayItemClipChain* intersection = nullptr; - if (aCache.Get(clip, &intersection)) { - i->SetClipChain(intersection, true); - } else { - i->IntersectClip(aBuilder, aExtraClip, true); - aCache.InsertOrUpdate(clip, i->GetClipChain()); - } - } - nsDisplayList* children = i->GetSameCoordinateSystemChildren(); - if (children) { - ClipItemsExceptCaret(children, aBuilder, aClipFrame, aExtraClip, aCache); - } - } -} - -static void ClipListsExceptCaret(nsDisplayListCollection* aLists, - nsDisplayListBuilder* aBuilder, - nsIFrame* aClipFrame, - const DisplayItemClipChain* aExtraClip) { - nsTHashMap<nsPtrHashKey<const DisplayItemClipChain>, - const DisplayItemClipChain*> - cache; - ClipItemsExceptCaret(aLists->BorderBackground(), aBuilder, aClipFrame, - aExtraClip, cache); - ClipItemsExceptCaret(aLists->BlockBorderBackgrounds(), aBuilder, aClipFrame, - aExtraClip, cache); - ClipItemsExceptCaret(aLists->Floats(), aBuilder, aClipFrame, aExtraClip, - cache); - ClipItemsExceptCaret(aLists->PositionedDescendants(), aBuilder, aClipFrame, - aExtraClip, cache); - ClipItemsExceptCaret(aLists->Outlines(), aBuilder, aClipFrame, aExtraClip, - cache); - ClipItemsExceptCaret(aLists->Content(), aBuilder, aClipFrame, aExtraClip, - cache); -} - // This is similar to a "save-restore" RAII class for // DisplayListBuilder::ContainsBlendMode(), with a slight enhancement. // If this class is put on the stack and then unwound, the DL builder's @@ -3976,60 +3922,6 @@ void ScrollContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, mScrollParentID = aBuilder->GetCurrentScrollParentId(); - Maybe<nsRect> contentBoxClip; - Maybe<const DisplayItemClipChain*> extraContentBoxClipForNonCaretContent; - if (MOZ_UNLIKELY( - disp->mOverflowClipBoxBlock == StyleOverflowClipBox::ContentBox || - disp->mOverflowClipBoxInline == StyleOverflowClipBox::ContentBox)) { - WritingMode wm = mScrolledFrame->GetWritingMode(); - bool cbH = (wm.IsVertical() ? disp->mOverflowClipBoxBlock - : disp->mOverflowClipBoxInline) == - StyleOverflowClipBox::ContentBox; - bool cbV = (wm.IsVertical() ? disp->mOverflowClipBoxInline - : disp->mOverflowClipBoxBlock) == - StyleOverflowClipBox::ContentBox; - // We only clip if there is *scrollable* overflow, to avoid clipping - // *ink* overflow unnecessarily. - nsRect clipRect = effectiveScrollPort + aBuilder->ToReferenceFrame(this); - nsMargin padding = GetUsedPadding(); - if (!cbH) { - padding.left = padding.right = nscoord(0); - } - if (!cbV) { - padding.top = padding.bottom = nscoord(0); - } - clipRect.Deflate(padding); - - nsRect so = mScrolledFrame->ScrollableOverflowRect(); - if ((cbH && (clipRect.width != so.width || so.x < 0)) || - (cbV && (clipRect.height != so.height || so.y < 0))) { - // The non-inflated clip needs to be set on all non-caret items. - // We prepare an extra DisplayItemClipChain here that will be intersected - // with those items after they've been created. - const ActiveScrolledRoot* asr = aBuilder->CurrentActiveScrolledRoot(); - - DisplayItemClip newClip; - newClip.SetTo(clipRect); - - const DisplayItemClipChain* extraClip = - aBuilder->AllocateDisplayItemClipChain(newClip, asr, nullptr); - - extraContentBoxClipForNonCaretContent = Some(extraClip); - - nsIFrame* caretFrame = aBuilder->GetCaretFrame(); - // Avoid clipping it in a zero-height line box (heuristic only). - if (caretFrame && caretFrame->GetRect().height != 0) { - nsRect caretRect = aBuilder->GetCaretRect(); - // Allow the caret to stick out of the content box clip by half the - // caret height on the top, and its full width on the right. - nsRect inflatedClip = clipRect; - inflatedClip.Inflate( - nsMargin(caretRect.height / 2, caretRect.width, 0, 0)); - contentBoxClip = Some(inflatedClip); - } - } - } - AutoContainsBlendModeCapturer blendCapture(*aBuilder); const bool willBuildAsyncZoomContainer = @@ -4084,16 +3976,6 @@ void ScrollContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, haveRadii ? &radii : nullptr); } - Maybe<DisplayListClipState::AutoSaveRestore> contentBoxClipState; - if (contentBoxClip) { - contentBoxClipState.emplace(aBuilder); - if (mIsRoot) { - contentBoxClipState->ClipContentDescendants(*contentBoxClip); - } else { - contentBoxClipState->ClipContainingBlockDescendants(*contentBoxClip); - } - } - nsDisplayListBuilder::AutoCurrentActiveScrolledRootSetter asrSetter( aBuilder); @@ -4214,15 +4096,6 @@ void ScrollContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } } - if (extraContentBoxClipForNonCaretContent) { - // The items were built while the inflated content box clip was in - // effect, so that the caret wasn't clipped unnecessarily. We apply - // the non-inflated clip to the non-caret items now, by intersecting - // it with their existing clip. - ClipListsExceptCaret(&set, aBuilder, mScrolledFrame, - *extraContentBoxClipForNonCaretContent); - } - if (aBuilder->IsPaintingToWindow()) { mIsParentToActiveScrollFrames = ShouldActivateAllScrollFrames() diff --git a/layout/reftests/box-properties/overflow-clip-box-1-ref.html b/layout/reftests/box-properties/overflow-clip-box-1-ref.html @@ -1,99 +0,0 @@ -<!DOCTYPE HTML> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: Testcase for bug 1422839</title> - <style type="text/css"> -html,body { - color:black; background-color:white; font:16px/1 monospace; line-height:1; padding:0; margin:0; -} - -div { - width: 0; - height: 0; - white-space: pre; - overflow: hidden; - border: 1px solid; - width: 100px; - height: 100px; -} -.h > div { height: 120px; } -.w > div { width: 120px; } - -c { - display: block; - width: 100px; - height: 40px; - border: 1px solid black; -} - -.float { float: left; } - -x { - display: block; - overflow: hidden; - padding-left: 50px; - padding-top: 50px; - width: 50px; - height: 50px; -} - -.w x { width: 20px; } -.h x { height: 20px; } -.w.h x { - background-color: lime; - background-clip: content-box; - overflow: visible; -} -y { - display: block; - overflow: hidden; - width: 20px; - height: 20px; -} - - </style> -</head> -<body> - -<span class="float"> -<div><x><c></c></x></div> -<div></div> -<div></div> -<div></div> -<div><x><c></c></x></div> -<div></div> -</span> - -<span class="float h"> -<div><x style="height:70px"><c></c></x></div> -<div></div> -<div></div> -<div><x><c></c></x></div> -<div><x style="height:70px"><c></c></x></div> -<div></div> -</span> - -<span class="float w"> -<div><x style="width:70px"><c></c></x></div> -<div></div> -<div><x><c></c></x></div> -<div></div> -<div><x style="width:70px"><c></c></x></div> -<div></div> -</span> - -<span class="float w h"> -<div><x><y style="height:70px; width:70px"><c></c></y></x></div> -<div><x><y><c></c></y></x></div> -<div><x><y style="height:70px"><c></c></y></x></div> -<div><x><y style="width:70px"><c></c></y></x></div> -<div><x><y style="height:70px; width:70px"><c></c></y></x></div> -<div><x><y><c></c></y></x></div> -</span> - -</body> -</html> diff --git a/layout/reftests/box-properties/overflow-clip-box-1.html b/layout/reftests/box-properties/overflow-clip-box-1.html @@ -1,76 +0,0 @@ -<!DOCTYPE HTML> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Testcase for bug 1422839</title> - <style type="text/css"> -html,body { - color:black; background-color:white; font:16px/1 monospace; line-height:1; padding:0; margin:0; -} - -div { - width: 0; - height: 0; - padding: 50px; - white-space: pre; - overflow: hidden; - background-color: lime; - background-clip: content-box; - border: 1px solid; -} - -.float { float: left; } -.w > div { width: 20px; } -.h > div { height: 20px; } - -c { - display: block; - width: 100px; - height: 40px; - border: 1px solid black; -} - </style> -</head> -<body> - -<span class="float"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float h"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float w"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float w h"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -</body> -</html> diff --git a/layout/reftests/box-properties/overflow-clip-box-2-ref.html b/layout/reftests/box-properties/overflow-clip-box-2-ref.html @@ -1,101 +0,0 @@ -<!DOCTYPE HTML> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: Testcase for bug 1422839</title> - <style type="text/css"> -html,body { - color:black; background-color:white; font:16px/1 monospace; line-height:1; padding:0; margin:0; -} - -div { - width: 0; - height: 0; - white-space: pre; - overflow: hidden; - border: 1px solid; - width: 100px; - height: 100px; - direction: rtl; -} -.h > div { height: 120px; } -.w > div { width: 120px; } - -c { - display: block; - width: 100px; - height: 40px; - border: 1px solid black; - margin-top: -10px; -} - -.float { float: left; } - -x { - display: block; - overflow: hidden; - padding-right: 50px; - padding-top: 50px; - width: 50px; - height: 50px; -} - -.w x { width: 20px; } -.h x { height: 20px; } -.w.h x { - background-color: lime; - background-clip: content-box; - overflow: visible; -} -y { - display: block; - overflow: hidden; - width: 20px; - height: 20px; -} - - </style> -</head> -<body> - -<span class="float"> -<div><x><c></c></x></div> -<div></div> -<div></div> -<div></div> -<div><x><c></c></x></div> -<div></div> -</span> - -<span class="float h"> -<div><x style="height:70px"><c></c></x></div> -<div></div> -<div></div> -<div><x style="height:20px"><c style="margin:0; border-top-width:0"></c></x></div> -<div><x style="height:70px"><c></c></x></div> -<div></div> -</span> - -<span class="float w"> -<div><x style="width:70px"><c></c></x></div> -<div></div> -<div><x><c></c></x></div> -<div></div> -<div><x style="width:70px"><c></c></x></div> -<div></div> -</span> - -<span class="float w h"> -<div><x><y style="height:70px; width:70px; margin-top:-10px"><c style="margin-top:0px"></c></y></x></div> -<div><x><y><c></c></y></x></div> -<div><x><y style="height:70px; margin-top:-10px"><c style="margin-top:0px"></c></y></x></div> -<div><x><y style="width:70px"><c></c></y></x></div> -<div><x><y style="height:70px; width:70px; margin-top:-10px"><c style="margin-top:0px"></c></y></x></div> -<div><x><y><c></c></y></x></div> -</span> - -</body> -</html> diff --git a/layout/reftests/box-properties/overflow-clip-box-2.html b/layout/reftests/box-properties/overflow-clip-box-2.html @@ -1,78 +0,0 @@ -<!DOCTYPE HTML> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Testcase for bug 1422839</title> - <style type="text/css"> -html,body { - color:black; background-color:white; font:16px/1 monospace; line-height:1; padding:0; margin:0; -} - -div { - width: 0; - height: 0; - padding: 50px; - white-space: pre; - overflow: hidden; - background-color: lime; - background-clip: content-box; - border: 1px solid; - direction: rtl; -} - -.float { float: left; } -.w > div { width: 20px; } -.h > div { height: 20px; } - -c { - display: block; - width: 100px; - height: 40px; - border: 1px solid black; - margin-top: -10px; -} - </style> -</head> -<body> - -<span class="float"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float h"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float w"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -<span class="float w h"> -<div style="overflow-clip-box: padding-box"><c></c></div> -<div style="overflow-clip-box: content-box"><c></c></div> -<div style="overflow-clip-box: padding-box content-box"><c></c></div> -<div style="overflow-clip-box: content-box padding-box"><c></c></div> -<div style="overflow-clip-box: padding-box padding-box"><c></c></div> -<div style="overflow-clip-box: content-box content-box"><c></c></div> -</span> - -</body> -</html> diff --git a/layout/reftests/box-properties/overflow-clip-box-3-ref.html b/layout/reftests/box-properties/overflow-clip-box-3-ref.html @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html> - <meta charset="utf-8"> - <title>Reference for 'overflow-clip-box: content-box' (Bug 1226305)</title> - <style> - .test { - padding: 20px; - background: green content-box; - width: 300px; - height: 20px; - border: 1px solid; - } - </style> - - <body> - <p>There should be no red areas.</p> - <div class="test"></div> - <div class="test"></div> - <div class="test"></div> - <div class="test"></div> - <div class="test"></div> - </body> -</html> diff --git a/layout/reftests/box-properties/overflow-clip-box-3.html b/layout/reftests/box-properties/overflow-clip-box-3.html @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html> - <meta charset="utf-8"> - <title>Testcase for 'overflow-clip-box: content-box' (Bug 1226305)</title> - <style> - .test { - overflow-clip-box: content-box; - overflow: hidden; - padding: 20px; - background: green content-box; - width: 300px; - height: 20px; - border: 1px solid; - } - .test > div { - margin-top: -40px; - height: 40px; - background: red; - } - </style> - - <body> - <p>There should be no red areas.</p> - <div class="test"><div>FAIL</div></div> - <div class="test"><div style="width: 200%">FAIL</div></div> - <div class="test"><div style="margin-left: 100%; height:20px; margin-top:0">FAIL</div></div> - <div class="test"><div style="margin-left: -100px">FAIL</div></div> - <div class="test"><div style="margin-left: -100%; width: 100%; height:20px; margin-top:0">FAIL</div></div> - </body> -</html> diff --git a/layout/reftests/box-properties/reftest.list b/layout/reftests/box-properties/reftest.list @@ -27,6 +27,3 @@ fuzzy-if(gtkWidget,0-255,0-6) == width-special-values-block.html width-special-v == clip-auto.html clip-auto-ref.html == clip-rect-auto.html clip-rect-auto-ref.html == width-rounding.html width-rounding-ref.html -pref(layout.css.overflow-clip-box.enabled,true) == overflow-clip-box-1.html overflow-clip-box-1-ref.html -pref(layout.css.overflow-clip-box.enabled,true) == overflow-clip-box-2.html overflow-clip-box-2-ref.html -pref(layout.css.overflow-clip-box.enabled,true) == overflow-clip-box-3.html overflow-clip-box-3-ref.html diff --git a/layout/reftests/bugs/992447-ref.html b/layout/reftests/bugs/992447-ref.html @@ -1,28 +0,0 @@ -<!DOCTYPE HTML> -<html><head> - <meta charset="utf-8"> - <title>Testcase for bug 992447</title> - <style type="text/css"> - -select { border:solid; width:100px; padding:10px; outline:3px dotted blue; } - - </style> -</head> -<body> -<select size=1><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=1 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> - - -</body> -</html> diff --git a/layout/reftests/bugs/992447.html b/layout/reftests/bugs/992447.html @@ -1,28 +0,0 @@ -<!DOCTYPE HTML> -<html><head> - <meta charset="utf-8"> - <title>Testcase for bug 992447</title> - <style type="text/css"> - -select { border:solid; width:100px; padding:10px; outline:3px dotted blue; } - - </style> -</head> -<body> -<select size=1><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=1 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> -<br> -<br> -<select size=2 multiple><option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG<option>LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG</select> - - -</body> -</html> diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list @@ -1762,7 +1762,6 @@ fuzzy(0-1,0-123) == 978911-1.svg 978911-1-ref.svg == 987680-1.html 987680-1-ref.html # Fuzzy on WR due to alpha blending fuzzy(0-1,0-1473) == 991046-1.html 991046-1-ref.html -pref(layout.css.overflow-clip-box.enabled,true) fuzzy(0-2,0-845) == 992447.html 992447-ref.html == 1003425-1.html 1003425-1-ref.html == 1003425-2.html 1003425-2-ref.html == 1005405-1.html 1005405-1-ref.html diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp @@ -85,14 +85,8 @@ void nsCSSProps::RecomputeEnabledState(const char* aPref, void*) { gfx::gfxVars::GetAllowBackdropFilterOrDefault(); } #ifdef FUZZING - // Even in fuzzing builds we only want to enable overflow-clip-box if the - // pref is flipped on (it's still enabled in UA sheets though). See bug - // 1936080. - if (pref->mPropID != eCSSProperty_overflow_clip_box && - pref->mPropID != eCSSProperty_overflow_clip_box_block && - pref->mPropID != eCSSProperty_overflow_clip_box_inline) { - gPropertyEnabled[pref->mPropID] = true; - } + // In fuzzing builds we want to enable all properties unconditionally. + gPropertyEnabled[pref->mPropID] = true; #endif } } diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp @@ -2209,8 +2209,6 @@ nsStyleDisplay::nsStyleDisplay() mBreakAfter(StyleBreakBetween::Auto), mOverflowX(StyleOverflow::Visible), mOverflowY(StyleOverflow::Visible), - mOverflowClipBoxBlock(StyleOverflowClipBox::PaddingBox), - mOverflowClipBoxInline(StyleOverflowClipBox::PaddingBox), mScrollbarGutter(StyleScrollbarGutter::AUTO), mResize(StyleResize::None), mOrient(StyleOrient::Inline), @@ -2270,8 +2268,6 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) mBreakAfter(aSource.mBreakAfter), mOverflowX(aSource.mOverflowX), mOverflowY(aSource.mOverflowY), - mOverflowClipBoxBlock(aSource.mOverflowClipBoxBlock), - mOverflowClipBoxInline(aSource.mOverflowClipBoxInline), mScrollbarGutter(aSource.mScrollbarGutter), mResize(aSource.mResize), mOrient(aSource.mOrient), @@ -2564,9 +2560,7 @@ nsChangeHint nsStyleDisplay::CalcDifference( mBreakAfter != aNewData.mBreakAfter || mAppearance != aNewData.mAppearance || mDefaultAppearance != aNewData.mDefaultAppearance || - mOrient != aNewData.mOrient || - mOverflowClipBoxBlock != aNewData.mOverflowClipBoxBlock || - mOverflowClipBoxInline != aNewData.mOverflowClipBoxInline) { + mOrient != aNewData.mOrient) { hint |= nsChangeHint_AllReflowHints | nsChangeHint_RepaintFrame; } diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h @@ -1597,8 +1597,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { mozilla::StyleBreakBetween mBreakAfter; mozilla::StyleOverflow mOverflowX; mozilla::StyleOverflow mOverflowY; - mozilla::StyleOverflowClipBox mOverflowClipBoxBlock; - mozilla::StyleOverflowClipBox mOverflowClipBoxInline; mozilla::StyleScrollbarGutter mScrollbarGutter; mozilla::StyleResize mResize; mozilla::StyleOrient mOrient; diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css @@ -134,7 +134,6 @@ button, ::-moz-text-control-preview { overflow: auto; border: 0; - /* This is necessary to make overflow-clip-box work */ padding: inherit; margin: 0; text-decoration: inherit; diff --git a/layout/style/test/file_animations_with_disabled_properties.html b/layout/style/test/file_animations_with_disabled_properties.html @@ -5,11 +5,11 @@ @keyframes enabled-and-disabled { from { left: 0px; - overflow-clip-box: padding-box; + font-palette: padding-box; } to { left: 100px; - overflow-clip-box: padding-box; + font-palette: padding-box; } } </style> @@ -37,12 +37,12 @@ is(animation.effect.getKeyframes().length, 2, ok(animation.effect.getKeyframes()[0].hasOwnProperty('left'), 'Enabled property is set on initial keyframe'); -ok(!animation.effect.getKeyframes()[0].hasOwnProperty('overflowClipBox'), +ok(!animation.effect.getKeyframes()[0].hasOwnProperty('fontPalette'), 'Disabled property is not set on initial keyframe'); ok(animation.effect.getKeyframes()[1].hasOwnProperty('left'), 'Enabled property is set on final keyframe'); -ok(!animation.effect.getKeyframes()[1].hasOwnProperty('overflowClipBox'), +ok(!animation.effect.getKeyframes()[1].hasOwnProperty('fontPalette'), 'Disabled property is not set on final keyframe'); finish(); diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js @@ -13133,48 +13133,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-anchoring.enabled")) { }; } -if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) { - gCSSProperties["overflow-clip-box-block"] = { - domProp: "overflowClipBoxBlock", - inherited: false, - type: CSS_TYPE_LONGHAND, - applies_to_placeholder: true, - initial_values: ["padding-box"], - other_values: ["content-box"], - invalid_values: ["auto", "border-box", "0", "padding-box padding-box"], - }; - gCSSProperties["overflow-clip-box-inline"] = { - domProp: "overflowClipBoxInline", - inherited: false, - type: CSS_TYPE_LONGHAND, - applies_to_placeholder: true, - initial_values: ["padding-box"], - other_values: ["content-box"], - invalid_values: ["none", "border-box", "0", "content-box content-box"], - }; - gCSSProperties["overflow-clip-box"] = { - domProp: "overflowClipBox", - inherited: false, - type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: ["overflow-clip-box-block", "overflow-clip-box-inline"], - initial_values: ["padding-box"], - other_values: [ - "content-box", - "padding-box content-box", - "content-box padding-box", - "content-box content-box", - ], - invalid_values: [ - "none", - "auto", - "content-box none", - "border-box", - "0", - "content-box, content-box", - ], - }; -} - gCSSProperties["overscroll-behavior-x"] = { domProp: "overscrollBehaviorX", inherited: false, diff --git a/layout/style/test/test_animations_with_disabled_properties.html b/layout/style/test/test_animations_with_disabled_properties.html @@ -19,13 +19,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1265611 SimpleTest.waitForExplicitFinish(); /* - * This test relies on the fact that the overflow-clip-box property - * is disabled by the layout.css.overflow-clip-box.enabled pref. If we ever + * This test relies on the fact that the font-palette property + * is disabled by the layout.css.font-palette.enabled pref. If we ever * remove that pref we will need to substitute some other pref:property * combination. */ SpecialPowers.pushPrefEnv( - { 'set': [[ 'layout.css.overflow-clip-box.enabled', false ]] }, + { 'set': [[ 'layout.css.font-palette.enabled', false ]] }, () => window.open('file_animations_with_disabled_properties.html')); </script> </pre> diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml @@ -10179,12 +10179,6 @@ #endif mirror: always -# Is support for CSS overflow-clip-box enabled for non-UA sheets? -- name: layout.css.overflow-clip-box.enabled - type: bool - value: false - mirror: always - # Is support for CSS overflow: -moz-hidden-unscrollable enabled - name: layout.css.overflow-moz-hidden-unscrollable.enabled type: RelaxedAtomicBool diff --git a/servo/components/style/properties/longhands/box.mako.rs b/servo/components/style/properties/longhands/box.mako.rs @@ -135,21 +135,6 @@ ${helpers.single_keyword( affects="layout", )} -% for direction in ["inline", "block"]: - ${helpers.predefined_type( - "overflow-clip-box-" + direction, - "OverflowClipBox", - "computed::OverflowClipBox::PaddingBox", - engines="gecko", - enabled_in="chrome", - gecko_pref="layout.css.overflow-clip-box.enabled", - animation_type="discrete", - spec="Internal, may be standardized in the future: \ - https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box", - affects="layout", - )} -% endfor - % for (axis, logical) in ALL_AXES: <% full_name = "overflow-{}".format(axis) %> ${helpers.predefined_type( diff --git a/servo/components/style/properties/shorthands/box.mako.rs b/servo/components/style/properties/shorthands/box.mako.rs @@ -13,17 +13,6 @@ ${helpers.two_properties_shorthand( )} ${helpers.two_properties_shorthand( - "overflow-clip-box", - "overflow-clip-box-block", - "overflow-clip-box-inline", - engines="gecko", - enabled_in="chrome", - gecko_pref="layout.css.overflow-clip-box.enabled", - spec="Internal, may be standardized in the future " - "(https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)", -)} - -${helpers.two_properties_shorthand( "overscroll-behavior", "overscroll-behavior-x", "overscroll-behavior-y", diff --git a/testing/web-platform/tests/css/css-contain/contain-paint-clip-006-ref.html b/testing/web-platform/tests/css/css-contain/contain-paint-clip-006-ref.html @@ -13,7 +13,6 @@ margin: 25px; padding: 25px; overflow: hidden; - overflow-clip-box: content-box; } </style> </head> diff --git a/testing/web-platform/tests/css/css-contain/contain-paint-clip-006.html b/testing/web-platform/tests/css/css-contain/contain-paint-clip-006.html @@ -2,7 +2,7 @@ <html> <head> <meta charset="utf-8"> - <title>CSS Test: 'contain: paint' with overflowing text contents while "overflow-clip-box: content-box" enabled.</title> + <title>CSS Test: 'contain: paint' with overflowing text contents.</title> <link rel="author" title="Yusuf Sermet" href="mailto:ysermet@mozilla.com"> <link rel="author" title="Kyle Zentner" href="mailto:zentner.kyle@gmail.com"> <link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint"> @@ -15,7 +15,6 @@ background: green; margin: 25px; padding: 25px; - overflow-clip-box: content-box; } </style> </head> diff --git a/testing/web-platform/tests/html/rendering/widgets/the-select-element/select-as-listbox-default-styles.tentative.html b/testing/web-platform/tests/html/rendering/widgets/the-select-element/select-as-listbox-default-styles.tentative.html @@ -101,7 +101,6 @@ select { 'vertical-align', 'user-select', 'page-break-inside', - 'overflow-clip-box', 'font-variant-ligatures', 'font-variant-caps', 'font-variant-numeric',