Skip to content

LibWeb: Use themed text selection colors#9704

Merged
awesomekling merged 2 commits into
LadybirdBrowser:masterfrom
awesomekling:select-color
May 29, 2026
Merged

LibWeb: Use themed text selection colors#9704
awesomekling merged 2 commits into
LadybirdBrowser:masterfrom
awesomekling:select-color

Conversation

@awesomekling

Copy link
Copy Markdown
Member

Resolve default selection backgrounds from the page palette instead of a hardcoded blue color. Tint opaque selection backgrounds before painting. This keeps selected images visible through the selection overlay.

Use the platform SelectionText role for default selected text and HighlightText. Authored ::selection colors still take precedence.

Update selection and system-color baselines for the themed colors.

Before:
Screenshot from 2026-05-28 01-52-42

After:
Screenshot from 2026-05-28 01-53-59

After (other color):
Screenshot from 2026-05-28 01-54-07

@awesomekling
awesomekling requested a review from AtkinsSJ as a code owner May 28, 2026 07:36
@awesomekling
awesomekling force-pushed the select-color branch 3 times, most recently from 9880af8 to dc4f3a3 Compare May 29, 2026 09:29
Look for screenshot expectations in an expected-<platform>
directory before using the shared expected directory. This lets tests
that cover system-derived rendering keep platform-specific baselines
without making other platforms use the same PNG.
Use the page palette for default selection backgrounds instead of a
hardcoded blue color. Tint opaque selection backgrounds before painting.
Selected images stay visible through the overlay.

Use SelectionText for default selected text and HighlightText. Authored
::selection colors still take precedence. On macOS, use a light
translucent color matching other engines.

Update selection and system-color baselines for the themed colors. Add
macOS-specific screenshot baselines for tests whose expectations depend
on system colors.
@awesomekling
awesomekling merged commit 3746fbf into LadybirdBrowser:master May 29, 2026
14 of 21 checks passed
@awesomekling
awesomekling deleted the select-color branch May 29, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant