Skip to content

Migrate CSS value consumers to the internal record model#4120

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-migrate-value-consumers
Open

Migrate CSS value consumers to the internal record model#4120
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-migrate-value-consumers

Conversation

@vogella

@vogella vogella commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Migrates the property handlers, converters and SWT helpers to read CSS values directly from the internal CssValues records (pattern matching on CssNumber, CssDimension, CssColor, ...) instead of going through the W3C CSSValue accessor methods.
With every consumer moved over, the bridge types that only existed to feed them (CSS2PrimitiveValueImpl, CSS2RGBColorImpl) are removed.

Behaviour is unchanged: the same values reach the same setters, just by a more direct route.

Stacked on #4117 (the value records this consumes), so the diff currently also shows that commit; it reduces to just the consumer migration once #4117 is merged and this branch is rebased.
Part of the CSS engine rework (#3980).

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   58m 36s ⏱️ + 7m 11s
 8 075 tests ±0   7 831 ✅  - 1  243 💤 ±0  1 ❌ +1 
20 127 runs  ±0  19 472 ✅  - 1  654 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit bf091de. ± Comparison against base commit 552c9e4.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the css-migrate-value-consumers branch 2 times, most recently from 7bee5e6 to 9fc55e2 Compare June 19, 2026 06:36
@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From f20afd43de96a73baeb45855a0dc2a6bc198dc34 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Fri, 19 Jun 2026 06:39:12 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
index b17c669780..5b183e0562 100644
--- a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.ui.forms;singleton:=true
-Bundle-Version: 3.14.100.qualifier
+Bundle-Version: 3.14.200.qualifier
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.forms,
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

Move the property handlers, converters, and SWT helpers off the W3C
CSSValue accessor API (getCssValueType, getPrimitiveType, getFloatValue,
getStringValue, getRGBColorValue) onto pattern matching over the
CssValues records. The records get their final internal shape: a CssUnit
enum and a shared CssNumeric interface replace the raw W3C primitive
type shorts on CssDimension, and CssText carries an explicit Kind
(IDENT, STRING, URI, INHERIT). CSS2FontProperties and CSSBorderProperties
now store CssPrimitive values, which retires the CSS2PrimitiveValueImpl
and CSS2RGBColorImpl shims; CSS2ColorHelper and CSSSWTColorHelper build
CssColor records directly.

The old code distinguished widget-derived font sizes from CSS-set sizes
through a null getCssText() quirk of CSS2PrimitiveValueImpl; that
distinction is now an explicit sizeFromCSS flag on CSS2FontProperties,
so font definitions still supply the height when no CSS size is set.

The records still implement the W3C interfaces as a bridge for the
style-declaration layer; the bridge goes away once the computed-style
cascade is internal. The css.swt test helpers build real value records
instead of Mockito mocks of CSSValueImpl, which the pattern matching
would not recognize.

Contributes to eclipse-platform#3980
@vogella vogella force-pushed the css-migrate-value-consumers branch from 6f7b8a2 to bf091de Compare June 19, 2026 08:42
@vogella vogella marked this pull request as ready for review June 19, 2026 14:31
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.

2 participants