Skip to content

Commit b0baf3f

Browse files
Merge branch 'master' into master
2 parents e3bc9db + bc410d9 commit b0baf3f

27 files changed

Lines changed: 274 additions & 230 deletions

File tree

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/CssValues.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
/**
2727
* The internal CSS value model produced by the parser. A small sealed hierarchy
2828
* of immutable values that replaces the former {@code Measure} / {@code
29-
* RGBColorImpl} / {@code CSSValueListImpl} wrappers and removes the last SAC
30-
* dependency ({@code LexicalUnit}).
29+
* RGBColorImpl} / {@code CSSValueListImpl} wrappers.
3130
*
3231
* <p>
3332
* Consumers pattern-match on the record variants ({@link CssNumber},
@@ -258,7 +257,7 @@ public String getCssText() {
258257

259258
/**
260259
* A separator (currently only {@code ,}) carried inside a value list, kept
261-
* for parity with the former SAC behaviour where the comma was a list item.
260+
* for parity with the historical behaviour where the comma was a list item.
262261
*/
263262
public record CssOperator(String text) implements CssPrimitive {
264263
@Override

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/CSSEngineImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ private void applyConditionalPseudoStyle(ExtendedCSSRule parentRule, String pseu
477477
* Returns {@code true} if {@code selector} carries a pseudo-class or
478478
* attribute selector (anywhere in a compound or descendant combinator)
479479
* whose target value equals {@code pseudoInstance}. Mirrors the legacy
480-
* SAC walker, which handled both {@code :selected} (a pseudo-class) and
481-
* {@code Shell[active='true']} (an attribute) through SAC's shared
482-
* {@code AttributeCondition} interface.
480+
* walker, which handled both {@code :selected} (a pseudo-class) and
481+
* {@code Shell[active='true']} (an attribute) through a shared
482+
* condition interface.
483483
*/
484484
private static boolean matchesPseudoInstanceAttribute(Selectors.Selector selector, String pseudoInstance) {
485485
if (selector instanceof Selectors.PseudoClass pc) {

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/selector/SelectorMatcher.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
*
3737
* <p>
3838
* Every method is static; the matcher carries no state. Callers pass the
39-
* element being tested plus an optional pseudo-element string (the same
40-
* argument the SAC engine carried) so that pseudo-class matching can defer
41-
* to the existing {@link CSSStylableElement#isPseudoInstanceOf} contract.
39+
* element being tested plus an optional pseudo-element string so that
40+
* pseudo-class matching can defer to the existing
41+
* {@link CSSStylableElement#isPseudoInstanceOf} contract.
4242
* </p>
4343
*
4444
* <p>
45-
* Tag-name comparison is case sensitive, matching the existing SAC matcher
46-
* (Phase 1 test {@code testTagNameCaseSensitivity} in {@code CSSEngineTest}
45+
* Tag-name comparison is case sensitive, preserving the historical matcher
46+
* behaviour (Phase 1 test {@code testTagNameCaseSensitivity} in {@code CSSEngineTest}
4747
* locks this in). Pseudo-class semantics also follow the existing engine:
4848
* the static-pseudo-instance carve-out from
4949
* {@code CSSPseudoClassConditionImpl} is preserved so cascade behaviour

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/selector/Selectors.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
* Internal CSS selector AST.
2020
*
2121
* <p>
22-
* The engine historically exposed W3C SAC selectors
23-
* ({@code org.w3c.css.sac.Selector} and friends) and matched against them
24-
* through a hierarchy of vendored Batik wrapper classes under
25-
* {@code impl/sac/*}. This package replaces both with a small set of records
26-
* that the engine owns end to end. The W3C SAC types stay only as long as
27-
* the parser still emits them; a translator turns the SAC selector tree
28-
* produced by the Batik SAC parser into one of these records before it
29-
* reaches the engine matcher.
22+
* This package is the engine's own selector model: a small set of records
23+
* the parser builds directly and the matcher consumes end to end. It
24+
* replaced an earlier layer of vendored selector wrapper classes that the
25+
* engine no longer depends on.
3026
* </p>
3127
*
3228
* <p>
@@ -312,12 +308,12 @@ public List<Selector> alternatives() {
312308
return alternatives;
313309
}
314310

315-
/** Number of alternatives in the list. SAC-style accessor for callers iterating the list. */
311+
/** Number of alternatives in the list. Indexed accessor for callers iterating the list. */
316312
public int getLength() {
317313
return alternatives.size();
318314
}
319315

320-
/** {@code i}-th alternative. SAC-style accessor for callers iterating the list. */
316+
/** {@code i}-th alternative. Indexed accessor for callers iterating the list. */
321317
public Selector item(int i) {
322318
return alternatives.get(i);
323319
}

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/parser/CssParseException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
/**
1717
* Thrown by the hand-written CSS parser when the input cannot be parsed.
18-
* Replaces {@code org.w3c.css.sac.CSSException} for the internal parser, which
19-
* like its SAC predecessor is unchecked.
18+
* Unchecked so it can surface from the parser without checked-exception plumbing.
2019
*/
2120
public class CssParseException extends RuntimeException {
2221

bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/parser/CssParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private Selector compound() {
413413
case COLON:
414414
advance();
415415
if (peek().kind == Kind.COLON) {
416-
advance(); // pseudo-element ::, modelled as a pseudo-class like the SAC path
416+
advance(); // pseudo-element ::, modelled as a pseudo-class
417417
}
418418
conditions.add(new PseudoClass(expect(Kind.IDENT).text));
419419
break;
@@ -430,8 +430,8 @@ private Selector compound() {
430430
for (int i = conditions.size() - 2; i >= 0; i--) {
431431
conditionTree = new And(conditions.get(i), conditionTree);
432432
}
433-
// A universal element before conditions is dropped, matching the SAC
434-
// translator: '.foo' and '*[a]' carry no element-type contribution.
433+
// A universal element before conditions is dropped: '.foo' and '*[a]'
434+
// carry no element-type contribution.
435435
return element instanceof ElementType ? new And(element, conditionTree) : conditionTree;
436436
}
437437

-36 Bytes
Loading

bundles/org.eclipse.jface/icons/full/popup_menu.svg

Lines changed: 35 additions & 47 deletions
Loading
-36 Bytes
Loading
94 Bytes
Loading

0 commit comments

Comments
 (0)