Skip to content

Commit

Permalink
Clean up from enabling lh/rlh units
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=250163
rdar://103933593

Reviewed by Tim Nguyen.

I looked through all the places where the preference name was mentioned.

* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-rlh-on-root-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-002.html:
* Source/WebCore/css/typedom/CSSUnitValue.cpp:
(WebCore::CSSUnitValue::parseUnit):
* Source/WebCore/page/DeprecatedGlobalSettings.h:
* Tools/DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):

Canonical link: https://commits.webkit.org/258603@main
  • Loading branch information
litherum committed Jan 7, 2023
1 parent c3b5f31 commit c7a1baf
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><!-- webkit-test-runner [ LineHeightUnitsEnabled=true ] -->
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: using lh and rlh units on the root element</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><!-- webkit-test-runner [ LineHeightUnitsEnabled=true ] -->
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: using lh in line-height</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><!-- webkit-test-runner [ LineHeightUnitsEnabled=true ] -->
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Values and Units Test: using lh in font-size</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/css/typedom/CSSUnitValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ CSSUnitType CSSUnitValue::parseUnit(const String& unit)
return CSSUnitType::CSS_NUMBER;
if (unit == "percent"_s)
return CSSUnitType::CSS_PERCENTAGE;

// FIXME: Remove these when LineHeightUnitsEnabled is changed back to true or removed
// https://bugs.webkit.org/show_bug.cgi?id=211351
if (unit == "lh"_s)
return CSSUnitType::CSS_LHS;
if (unit == "rlh"_s)
return CSSUnitType::CSS_RLHS;

return CSSParserToken::stringToUnitType(unit);
}

Expand Down
4 changes: 1 addition & 3 deletions Source/WebCore/page/DeprecatedGlobalSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ class DeprecatedGlobalSettings {

bool m_isReadableByteStreamAPIEnabled { false };

// False by default until https://bugs.webkit.org/show_bug.cgi?id=211351 /
// https://github.com/w3c/csswg-drafts/issues/3257 have been sorted out.
bool m_lineHeightUnitsEnabled { false };
bool m_lineHeightUnitsEnabled { true };

bool m_privateClickMeasurementDebugModeEnabled { false };
#if HAVE(RSA_BSSA)
Expand Down
1 change: 0 additions & 1 deletion Tools/DumpRenderTree/TestOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ const TestFeatures& TestOptions::defaults()
{ "JavaScriptEnabled", true },
{ "KeygenElementEnabled", false },
{ "LayoutFormattingContextIntegrationEnabled", true },
{ "LineHeightUnitsEnabled", false },
{ "LoadsImagesAutomatically", true },
{ "MainContentUserGestureOverrideEnabled", false },
{ "MenuItemElementEnabled", false },
Expand Down

0 comments on commit c7a1baf

Please sign in to comment.