From: Alexander Ebert Date: Sat, 28 May 2022 13:05:48 +0000 (+0200) Subject: Removed an outdated webkit work-around X-Git-Tag: 5.5.0_Beta_4~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e70cbaf1c7a2f22265f58a9f2950548afbefe65b;p=GitHub%2FWoltLab%2FWCF.git Removed an outdated webkit work-around This was required in <= 5.4 to fix an issue caused by the `transform: translateX(-50%)` offset used in these versions. 5.5 uses a pixel-perfect positioning that no longer relies on this hack. --- diff --git a/ts/WoltLabSuite/Core/Ui/Dialog.ts b/ts/WoltLabSuite/Core/Ui/Dialog.ts index 4ee1a088e6..cebda856bf 100644 --- a/ts/WoltLabSuite/Core/Ui/Dialog.ts +++ b/ts/WoltLabSuite/Core/Ui/Dialog.ts @@ -630,19 +630,6 @@ const UiDialog = { const maximumHeight = window.innerHeight * (_dialogFullHeight ? 1 : 0.8) - unavailableHeight; contentContainer.style.setProperty("max-height", `${~~maximumHeight}px`, ""); - // Chrome and Safari use heavy anti-aliasing when the dialog's width - // cannot be evenly divided, causing the whole text to become blurry - if (Environment.browser() === "chrome" || Environment.browser() === "safari") { - // The new Microsoft Edge is detected as "chrome", because effectively we're detecting - // Chromium rather than Chrome specifically. The workaround for fractional pixels does - // not work well in Edge, there seems to be a different logic for fractional positions, - // causing the text to be blurry. - // - // We can use `backface-visibility: hidden` to prevent the anti aliasing artifacts in - // WebKit/Blink, which will also prevent some weird font rendering issues when resizing. - contentContainer.classList.add("jsWebKitFractionalPixelFix"); - } - const callbackObject = _dialogToObject.get(id); //noinspection JSUnresolvedVariable if (callbackObject !== undefined && typeof callbackObject._dialogSubmit === "function") { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js index 33c240dbcd..b7600c94bb 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dialog.js @@ -520,18 +520,6 @@ define(["require", "exports", "tslib", "../Core", "../Dom/Change/Listener", "./S unavailableHeight += Util_1.default.outerHeight(data.header); const maximumHeight = window.innerHeight * (_dialogFullHeight ? 1 : 0.8) - unavailableHeight; contentContainer.style.setProperty("max-height", `${~~maximumHeight}px`, ""); - // Chrome and Safari use heavy anti-aliasing when the dialog's width - // cannot be evenly divided, causing the whole text to become blurry - if (Environment.browser() === "chrome" || Environment.browser() === "safari") { - // The new Microsoft Edge is detected as "chrome", because effectively we're detecting - // Chromium rather than Chrome specifically. The workaround for fractional pixels does - // not work well in Edge, there seems to be a different logic for fractional positions, - // causing the text to be blurry. - // - // We can use `backface-visibility: hidden` to prevent the anti aliasing artifacts in - // WebKit/Blink, which will also prevent some weird font rendering issues when resizing. - contentContainer.classList.add("jsWebKitFractionalPixelFix"); - } const callbackObject = _dialogToObject.get(id); //noinspection JSUnresolvedVariable if (callbackObject !== undefined && typeof callbackObject._dialogSubmit === "function") { diff --git a/wcfsetup/install/files/style/ui/dialog.scss b/wcfsetup/install/files/style/ui/dialog.scss index 648a923ea8..1636bb84ef 100644 --- a/wcfsetup/install/files/style/ui/dialog.scss +++ b/wcfsetup/install/files/style/ui/dialog.scss @@ -205,12 +205,6 @@ } } } - - /* Chrome and Safari use heavy anti-aliasing when the dialog's width - cannot be evenly divided, causing the whole text to become blurry */ - &.jsWebKitFractionalPixelFix { - backface-visibility: hidden; - } } }