-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ".9" as the time in refresh <meta> #2852
Conversation
Fixes #2844. This also cleans up the algorithm to follow modern conventions aligned with Infra.
Follows whatwg/html#2852, and also adds some extra coverage for other weird floating point numbers.
|
||
<li><p><span>Skip ASCII whitespace</span> within <var>input</var> given | ||
<var>position</var>.</p></li> | ||
|
||
<li><p>Let <var>time</var> be 0.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block (14312-14328) contains the normative changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see tests. Cases that come to mind:
;failure
,failure
0...;success
@annevk I've added those tests to the tests PR. At least one browser passes all of them. |
Follows whatwg/html#2852, and also adds some extra coverage for other weird floating point numbers.
…a '.' without a leading 0 https://bugs.webkit.org/show_bug.cgi?id=175132 Reviewed by Darin Adler. LayoutTests/imported/w3c: Re-sync WPT tests from upstream c8bf1bbe9296. This extends test coverage. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents-expected.txt: Removed. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document-expected.txt: Added. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents.html. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/refresh.sub.html: Added. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/w3c-import.log: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log: Source/WebCore: Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without a leading 0. This is as per whatwg/html#2852. The latest spec is at: - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTTPRefreshInternal): LayoutTests: * TestExpectations: Mark as flaky tests that used to not run because they were missing a subresource. Now that I imported this subresource, the tests run but are failing. When they fail, those tests are flaky due to the lines they log. * tests-options.json: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…a '.' without a leading 0 https://bugs.webkit.org/show_bug.cgi?id=175132 Reviewed by Darin Adler. LayoutTests/imported/w3c: Re-sync WPT tests from upstream c8bf1bb. This extends test coverage. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents-expected.txt: Removed. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document-expected.txt: Added. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents.html. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/refresh.sub.html: Added. * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/w3c-import.log: * web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log: Source/WebCore: Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without a leading 0. This is as per whatwg/html#2852. The latest spec is at: - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTTPRefreshInternal): LayoutTests: * TestExpectations: Mark as flaky tests that used to not run because they were missing a subresource. Now that I imported this subresource, the tests run but are failing. When they fail, those tests are flaky due to the lines they log. * tests-options.json: Canonical link: https://commits.webkit.org/191915@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixes #2844. This also cleans up the algorithm to follow modern
conventions aligned with Infra.
Tests: web-platform-tests/wpt#6595
@tkent-google, I will point to the specific lines that are new; the rest is cleanups. @annevk, would appreciate your careful review on the modernization. (I didn't go so far as to eliminate gotos, however.)