From dae72b452cd3c4f30311a0b3994d0102d93d401d Mon Sep 17 00:00:00 2001 From: MeladJM Date: Sat, 5 Jul 2025 22:22:57 +0800 Subject: [PATCH] Issue #2124/2662: Cleaning of code --- layout/style/Declaration.cpp | 2 +- layout/style/nsRuleNode.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index abda70f277..8638b91071 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -823,7 +823,7 @@ Declaration::GetPropertyValueInternal( return; } - bool isCurrentColor = + isCurrentColor = colorValue->GetUnit() == eCSSUnit_EnumColor && colorValue->GetIntValue() == NS_COLOR_CURRENTCOLOR; diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 33c8ad5fa4..27f3e6f5f5 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6427,14 +6427,6 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct, display->mOverflowY = NS_STYLE_OVERFLOW_HIDDEN; } - // If 'visible' is specified but doesn't match the other dimension, it - // turns into 'auto'. - if (display->mOverflowX == NS_STYLE_OVERFLOW_VISIBLE) { - display->mOverflowX = NS_STYLE_OVERFLOW_AUTO; - } - if (display->mOverflowY == NS_STYLE_OVERFLOW_VISIBLE) { - display->mOverflowY = NS_STYLE_OVERFLOW_AUTO; - } } // When 'contain: paint', update overflow from 'visible' to 'clip'.