[IntersectionObserver] Validate threshold values
authorajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2018 22:02:45 +0000 (22:02 +0000)
committerajuma@chromium.org <ajuma@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2018 22:02:45 +0000 (22:02 +0000)
commitc01070d22b6ff91b0a94cf038a233aacbaab7688
treeb82745f1d7edd4f4947a987f69de197f71756165
parent5a907e719cb04ece3c846bec1eda8e62afbb7e22
[IntersectionObserver] Validate threshold values
https://bugs.webkit.org/show_bug.cgi?id=188475

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update expectation for newly passing test case.

* web-platform-tests/intersection-observer/observer-exceptions-expected.txt:
* web-platform-tests/intersection-observer/observer-exceptions.html: Fix typo already fixed upstream.

Source/WebCore:

Throw an exception if any of an IntersectionObserver's thresholds are outside
the range [0, 1].

Tested by: imported/w3c/web-platform-tests/intersection-observer/observer-exceptions.html
           intersection-observer/intersection-observer-interface.html

* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::create):
(WebCore::IntersectionObserver::IntersectionObserver):
* page/IntersectionObserver.h:

LayoutTests:

Add test coverage for interesting floating point threshold values.

* intersection-observer/intersection-observer-interface-expected.txt:
* intersection-observer/intersection-observer-interface.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-exceptions-expected.txt
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-exceptions.html
LayoutTests/intersection-observer/intersection-observer-interface-expected.txt
LayoutTests/intersection-observer/intersection-observer-interface.html
Source/WebCore/ChangeLog
Source/WebCore/page/IntersectionObserver.cpp
Source/WebCore/page/IntersectionObserver.h