Commit ef8e9f8
committed
Replace the W3C computed-style cascade with internal types
Fold the ViewCSS/DocumentCSS machinery into the engine: CSSEngineImpl now
holds the stylesheet list and a cached flat rule list directly, and the
former ViewCSSImpl.getComputedStyle logic becomes CSSEngine.computeStyle.
The rule and stylesheet mirror drops its W3C interfaces: CSSStyleSheetImpl
is a plain list of CssRule (a new sealed interface), CSSStyleRuleImpl and
CSSImportRuleImpl are simple internal classes, and ViewCSSImpl,
DocumentCSSImpl, StyleSheetListImpl, CSSRuleImpl, CSSRuleListImpl,
MediaListImpl, AbstractCSSNode, ExtendedCSSRule, and ExtendedDocumentCSS
are deleted. CSSEngine.parseStyleSheet now returns the internal stylesheet
type and getDocumentCSS()/getViewCSS() are replaced by computeStyle; a
deprecated getViewCSS() default method remains as a binary-compatibility
bridge for bundles compiled against the old accessor.
CSSStyleDeclarationImpl keeps implementing the W3C CSSStyleDeclaration
interface because IStylingEngine.getStyle and IThemeEngine.getStyle are
frozen public API returning that type; its parent rule is now the internal
CSSStyleRuleImpl, reachable via getParentStyleRule(), and the W3C
getParentRule() returns null. In-tree callers (ThemeEngine, the font
handler, CSSRenderingUtils, PartRenderingEngine) and the css.core parser
tests move to the internal API.
Contributes to #39801 parent fa1a384 commit ef8e9f8
33 files changed
Lines changed: 440 additions & 1169 deletions
File tree
- bundles
- org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core
- dom
- engine
- impl
- dom
- engine
- parser
- org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme
- org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/css2
- org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt
- tests/org.eclipse.e4.ui.tests.css.core/src/org/eclipse/e4/ui/tests/css/core
- parser
- util
Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 25 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
198 | 212 | | |
199 | 213 | | |
200 | 214 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 13 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
24 | 22 | | |
25 | | - | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 25 | + | |
| 26 | + | |
38 | 27 | | |
39 | 28 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 29 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 30 | + | |
50 | 31 | | |
51 | 32 | | |
52 | 33 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 34 | + | |
| 35 | + | |
56 | 36 | | |
57 | | - | |
| 37 | + | |
Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
0 commit comments