Skip to content

Render pixel scans offscreen to match the widget background - #4584

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-macos-text-pixel-tests
Open

vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-macos-text-pixel-tests

Conversation

@vogella

@vogella vogella commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Three CodeMiningTest tests and LineContentBoundsDrawingTest.testTextBoundsMatchPaintedArea fail on macOS in dark mode, also on master. There, GC.copyArea() from a widget captures the window material (RGB 28,28,28) instead of the StyledText background (RGB 30,30,30), so every scanned pixel counts as painted. The scans now render the widget with print() into an offscreen image, the same approach the existing printWidget helper already uses for the footer code mining test. This makes the tests independent of the system appearance and of whether the window is in front, without changing what they assert.

On macOS in dark mode GC.copyArea() from a widget captures the window
background (RGB 28,28,28) instead of the widget background (RGB
30,30,30), so every scanned pixel looked painted. Rendering the widget
with print() into an offscreen image uses the widget's own background
at any appearance and zoom.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   867 files  ±0     867 suites  ±0   45m 46s ⏱️ - 5m 13s
 8 548 tests ±0   8 305 ✅  - 3  240 💤 ±0  3 ❌ +3 
21 516 runs  ±0  20 840 ✅  - 3  673 💤 ±0  3 ❌ +3 

For more details on these failures, see this check.

Results for commit d6c325d. ± Comparison against base commit b5dd338.

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