Skip to content

Commit

Permalink
Support CSS property text-orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
torusrxxx committed Dec 1, 2024
1 parent c5ddfc8 commit 77623ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/freenet/client/filter/CSSTokenizerFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public static <T> T[] concat(T[] a, T[] b) {
allelementVerifiers.add("text-emphasis-style");
allelementVerifiers.add("text-indent");
allelementVerifiers.add("text-justify");
allelementVerifiers.add("text-orientation");
allelementVerifiers.add("text-outline");
allelementVerifiers.add("text-overflow");
allelementVerifiers.add("text-shadow");
Expand Down Expand Up @@ -1688,6 +1689,11 @@ else if("text-justify".equalsIgnoreCase(element))
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("auto"),ElementInfo.VISUALMEDIA,null,Arrays.asList("84a83")));
allelementVerifiers.remove(element);
}
else if("text-orientation".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(Arrays.asList("mixed","upright","sideways","sideways-right"),ElementInfo.VISUALMEDIA));
allelementVerifiers.remove(element);
}
else if("text-outline".equalsIgnoreCase(element))
{
auxilaryVerifiers[108]=new CSSPropertyVerifier(null,null,Arrays.asList("73 72 72<0,1>"),null,true);
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 @@ -994,6 +994,7 @@ public class CSSParserTest {
propertyTests.put("#x { dominant-baseline: alphabetic; }", "#x { dominant-baseline: alphabetic; }");
propertyTests.put("#x { margin-block: 3px 3%; margin-inline: 5%; margin-inline-end: 4px; margin-inline-start: auto; }", "#x { margin-block: 3px 3%; margin-inline: 5%; margin-inline-end: 4px; margin-inline-start: auto; }");
propertyTests.put("#x { padding-block: 3px 3%; padding-inline: 5%; padding-inline-end: 4px; padding-inline-start: 1em; }", "#x { padding-block: 3px 3%; padding-inline: 5%; padding-inline-end: 4px; padding-inline-start: 1em; }");
propertyTests.put("#x { text-orientation: upright; }", "#x { text-orientation: upright; }");
propertyTests.put("#x { scroll-snap-align: start end; }", "#x { scroll-snap-align: start end; }");
propertyTests.put("#x { scroll-snap-stop: always; }", "#x { scroll-snap-stop: always; }");
propertyTests.put("#x { scroll-snap-type: both proximity; }", "#x { scroll-snap-type: both proximity; }");
Expand Down

0 comments on commit 77623ef

Please sign in to comment.