Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(266134@main): 3D border-style have very low contrast with …
…very dark border-color https://bugs.webkit.org/show_bug.cgi?id=261847 rdar://115812372 Reviewed by Darin Adler. 266134@main made 3D border styles like groove, ridge, inset, and outset honor the border-color instead of hardcoding a gray color. Unfortunately, when a dark border-color is used, there is very little contrast between the light border and the dark border. To fix this, we follow Firefox's algorithm of special casing very dark colors by contrasting 2 lightened versions of the border-color. See Firefox's algorithm for reference: https://searchfox.org/mozilla-central/rev/077fc34d03b85b09add26b5f99f1a3a3a72c8720/gfx/wr/webrender/res/cs_border_segment.glsl#112-132 * Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp: (WebCore::Display::BorderPainter::calculateBorderStyleColor): * Source/WebCore/rendering/BorderPainter.cpp: (WebCore::BorderPainter::calculateBorderStyleColor): Canonical link: https://commits.webkit.org/268265@main
- Loading branch information