Skip to content

Commit

Permalink
Merge remote-tracking branch 'torusrxxx/CSS' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBab committed Nov 15, 2024
2 parents 8cd909a + 97ae96e commit e496dc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/freenet/client/filter/CSSTokenizerFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public static <T> T[] concat(T[] a, T[] b) {
allelementVerifiers.add("cursor");
allelementVerifiers.add("direction");
allelementVerifiers.add("display");
allelementVerifiers.add("dominant-baseline");
allelementVerifiers.add("elevation");
allelementVerifiers.add("empty-cells");
allelementVerifiers.add("flex");
Expand Down Expand Up @@ -1003,6 +1004,11 @@ else if("display".equalsIgnoreCase(element))
elementVerifiers.put(element,new CSSPropertyVerifier(null, null, Arrays.asList("131a132", "140<0,1>[1,3]", "137", "138", "139"), null, true));
allelementVerifiers.remove(element);
}
else if("dominant-baseline".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("auto", "text-bottom", "alphabetic", "ideographic", "middle", "central", "mathematical", "hanging", "text-top"),ElementInfo.VISUALMEDIA));
allelementVerifiers.remove(element);
}
else if("elevation".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("below","level","above","higher","lower"),ElementInfo.AURALMEDIA,Arrays.asList("an")));
Expand Down Expand Up @@ -1157,7 +1163,7 @@ else if("line-height".equalsIgnoreCase(element))
}
else if("line-break".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("auto","newspaper","normal","strict","keep-all"),ElementInfo.VISUALMEDIA));
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("auto","anywhere","normal","strict","loose"),ElementInfo.VISUALMEDIA));
allelementVerifiers.remove(element);
}
else if("list-style-image".equalsIgnoreCase(element))
Expand Down
1 change: 1 addition & 0 deletions test/freenet/client/filter/CSSParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ public class CSSParserTest {
propertyTests.put("#x { max-inline-size: none; min-block-size: auto; }", "#x { max-inline-size: none; min-block-size: auto; }");
propertyTests.put("#x { text-combine-upright: all; }", "#x { text-combine-upright: all; }");
propertyTests.put("#x { text-decoration-thickness: 5px; }", "#x { text-decoration-thickness: 5px; }");
propertyTests.put("#x { dominant-baseline: alphabetic; }", "#x { dominant-baseline: alphabetic; }");

// text-emphasis
propertyTests.put("#x { text-emphasis: triangle blue; }", "#x { text-emphasis: triangle blue; }"); // java.lang.NullPointerException
Expand Down

0 comments on commit e496dc1

Please sign in to comment.