Skip to content

Commit 2479909

Browse files
committed
The only conflict can happen with AttributExact, removing all the others, as attributes can be a list where no intersection can happen
1 parent 2eb82cc commit 2479909

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

org/w3c/css/selectors/attributes/AttributeOneOf.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -92,47 +92,6 @@ public void applyAttribute(ApplContext ac, AttributeSelector attr) {
9292
ac.getFrame().addWarning("incompatible",
9393
new String[]{toString(), attr.toString()});
9494
}
95-
} else if (attr instanceof AttributeBegin) {
96-
val = ((AttributeBegin) attr).getValue();
97-
ok = false;
98-
String pval = val + '-';
99-
for (i = 0; !ok && i < values.length; i++) {
100-
ok = values[i].equals(val) || values[i].startsWith(pval);
101-
}
102-
if (!ok) {
103-
ac.getFrame().addWarning("incompatible",
104-
new String[]{toString(), attr.toString()});
105-
}
106-
} else if (attr instanceof AttributeStart) {
107-
val = ((AttributeStart) attr).getValue();
108-
ok = false;
109-
for (i = 0; !ok && i < values.length; i++) {
110-
ok = values[i].startsWith(val);
111-
}
112-
if (!ok) {
113-
ac.getFrame().addWarning("incompatible",
114-
new String[]{toString(), attr.toString()});
115-
}
116-
} else if (attr instanceof AttributeSubstr) {
117-
val = ((AttributeSubstr) attr).getValue();
118-
ok = false;
119-
for (i = 0; !ok && i < values.length; i++) {
120-
ok = (values[i].indexOf(val) >= 0);
121-
}
122-
if (!ok) {
123-
ac.getFrame().addWarning("incompatible",
124-
new String[]{toString(), attr.toString()});
125-
}
126-
} else if (attr instanceof AttributeSuffix) {
127-
val = ((AttributeSuffix) attr).getValue();
128-
ok = false;
129-
for (i = 0; !ok && i < values.length; i++) {
130-
ok = values[i].endsWith(val);
131-
}
132-
if (!ok) {
133-
ac.getFrame().addWarning("incompatible",
134-
new String[]{toString(), attr.toString()});
135-
}
13695
}
13796
}
13897
}

0 commit comments

Comments
 (0)