Skip to content

Commit

Permalink
Fix incorrect CSS property names for border-top-left-radius and similar
Browse files Browse the repository at this point in the history
  • Loading branch information
torusrxxx committed Dec 4, 2024
1 parent bf3833e commit ee55011
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions src/freenet/client/filter/CSSTokenizerFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ public static <T> T[] concat(T[] a, T[] b) {
allelementVerifiers.add("border-left-width");
allelementVerifiers.add("border-right-width");
allelementVerifiers.add("border-radius");
allelementVerifiers.add("border-top-radius");
allelementVerifiers.add("border-bottom-radius");
allelementVerifiers.add("border-left-radius");
allelementVerifiers.add("border-right-radius");
allelementVerifiers.add("border-bottom-left-radius");
allelementVerifiers.add("border-bottom-right-radius");
allelementVerifiers.add("border-top-left-radius");
allelementVerifiers.add("border-top-right-radius");
allelementVerifiers.add("border-image-source");
allelementVerifiers.add("border-image-slice");
allelementVerifiers.add("border-image-width");
Expand Down Expand Up @@ -393,8 +393,6 @@ public static <T> T[] concat(T[] a, T[] b) {

// <background-clip> <background-origin>
auxilaryVerifiers[61]=new CSSPropertyVerifier(Arrays.asList("border-box", "padding-box", "content-box"),null,null,null,true);
// <border-radius>
auxilaryVerifiers[64]=new CSSPropertyVerifier(null,Arrays.asList("le", "pe"),null,null,true);

// <text-decoration-color>
auxilaryVerifiers[73]=new CSSPropertyVerifier(null, Arrays.asList("co"), null, null, true);
Expand Down Expand Up @@ -741,27 +739,12 @@ else if("border".equalsIgnoreCase(element))
else if("border-radius".equalsIgnoreCase(element))
{
auxilaryVerifiers[65]=new CSSPropertyVerifier(Arrays.asList("/"),null,null,null,true);
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("64<1,4>", "64<1,4> 65 64<1,4>")));
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("40<1,4>", "40<1,4> 65 40<1,4>")));
allelementVerifiers.remove(element);
}
else if("border-top-radius".equalsIgnoreCase(element))
else if("border-bottom-left-radius".equalsIgnoreCase(element) || "border-bottom-right-radius".equalsIgnoreCase(element) || "border-top-left-radius".equalsIgnoreCase(element) || "border-top-right-radius".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("64<1,2>")));
allelementVerifiers.remove(element);
}
else if("border-bottom-radius".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("64<1,2>")));
allelementVerifiers.remove(element);
}
else if("border-left-radius".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("64<1,2>")));
allelementVerifiers.remove(element);
}
else if("border-right-radius".equalsIgnoreCase(element))
{
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("64<1,2>")));
elementVerifiers.put(element,new CSSPropertyVerifier(null,ElementInfo.VISUALMEDIA,null,Arrays.asList("40<1,2>")));
allelementVerifiers.remove(element);
}
else if("border-image-source".equalsIgnoreCase(element))
Expand Down

0 comments on commit ee55011

Please sign in to comment.