-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: check the formal
viewport
meta
tag syntax
- `HTM-047` is now reported for invalid `viewport` values - new `HTM-056` is reported when a `viewport` value has no `width` or `height` - new `HTM-057` is reported when a viewport width or height value is invalid (i.e. not a positive number or a well-known kewyword) Also: - the `isASCIIWhitespace` static utility method is extraced to a public `InfraUtil` class in a new `org.w3c.epubcheck.util.infra` package - the viewport parser is tested as a standalone class in its own feature file. However, for easier lookup, this file is however located in the `epub3/F-viewport-meta-tag` directory, as if it was a functional test. - several additional functional tests are added to the `epub3/08-layout` directory, for viewport metadata checks. Fixes #1214, fixes #1347
- Loading branch information
Showing
55 changed files
with
901 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.w3c.epubcheck.util.infra; | ||
|
||
public final class InfraUtil | ||
{ | ||
|
||
private InfraUtil() | ||
{ | ||
// static utility class | ||
} | ||
|
||
/** | ||
* if a character is https://infra.spec.whatwg.org/#ascii-whitespace U+0009 | ||
* TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE. | ||
*/ | ||
public static boolean isASCIIWhitespace(char c) | ||
{ | ||
return c == ' ' || c == '\t' || c == '\f' || c == '\n' || c == '\r'; | ||
} | ||
} |
Oops, something went wrong.