Skip to content

Commit b38040e

Browse files
authored
Merge pull request w3c#97 from w3c/sideshowbarker/style-type-attribute-warning-drop
Drop warning about missing style[type] attribute
2 parents 659374c + 0c44f02 commit b38040e

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

org/w3c/css/css/HTMLParserStyleSheetHandler.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,16 +348,6 @@ public void startElement(String namespaceURI,
348348

349349
if (type == null) {
350350
// By default we consider that it is CSS for HTML content
351-
// and raise a warning about the missing type attribute.
352-
// (per HTML5 spec)
353-
if (!isHTML5) {
354-
int line = (locator != null ? locator.getLineNumber() : -1);
355-
Warning w = new Warning(baseURI.toString(), line,
356-
"style-type", 0, ac);
357-
Warnings warnings = new Warnings(ac.getWarningLevel());
358-
warnings.addWarning(w);
359-
styleSheetParser.notifyWarnings(warnings);
360-
}
361351
text.setLength(0);
362352
inStyle = true;
363353
} else {

org/w3c/css/css/TagSoupStyleSheetHandler.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,6 @@ public void startElement(String namespaceURI,
330330

331331
if (type == null) {
332332
// By default we consider that it is CSS for HTML content
333-
// and raise a warning about the missing type attribute.
334-
// (per HTML5 spec)
335-
int line = (locator != null ? locator.getLineNumber() : -1);
336-
Warning w = new Warning(baseURI.toString(), line,
337-
"style-type", 0, ac);
338-
Warnings warnings = new Warnings(ac.getWarningLevel());
339-
warnings.addWarning(w);
340-
styleSheetParser.notifyWarnings(warnings);
341-
342333
text.setLength(0);
343334
inStyle = true;
344335
} else {

org/w3c/css/util/Messages.properties.en

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ warning.redefinition: Redefinition of %s
137137

138138
# used by xml parser
139139
warning.style-inside-comment: Do not put style rules inside HTML comments as they may be removed by user agent
140-
warning.style-type: You should add a 'type' attribute with a value of 'text/css' to the 'style' element
141140
warning.link-type: You should add a 'type' attribute with a value of 'text/css' to the 'link' element
142141

143142
# used by org.w3c.css.properties.Css1Style

0 commit comments

Comments
 (0)