Hi Team, Currently we are failing one IDLHarness test for Intersection Observer API, it is to use 'FrozenArray' for thresholds. WPT Test Case: https://wpt.fyi/results/intersection-observer/idlharness.window.html?label=experimental&label=master&aligned Test Case Live Link: http://wpt.live/intersection-observer/idlharness.window.html Failing Test -> IntersectionObserver interface: observer must inherit property "thresholds" with the proper type ___ Web-Spec: https://www.w3.org/TR/intersection-observer/#intersection-observer-interface In Spec: readonly attribute FrozenArray<double> thresholds; We have: readonly attribute sequence<double> thresholds; & (double or sequence<double>) threshold = 0.0; ___ Just wanted to raise, so we can fix this as well. Might be difficult for me right away to do so if someone else can do it, good to take it up. Thanks!
Web-Spec issue: https://github.com/w3c/IntersectionObserver/issues/114
I get following error: /Users/ahmadsaleem/Documents/GitHub-Webkit-origin/Webkit/WebKitBuild/Release/DerivedSources/WebCore/JSIntersectionObserver.cpp:297:135: error: no member named 'thresholds' in 'WebCore::IntersectionObserver' ...*thisObject.globalObject(), throwScope, impl.thresholds()))); by doing following changes: > Source/WebCore/page/IntersectionObserver.idl Change to: readonly attribute FrozenArray<double> thresholds; and delete: (double or sequence<double>) threshold = 0.0; > Source/WebCore/page/IntersectionObserver.h: Delete: const Vector<double>& thresholds() const { return m_thresholds; } > Source/WebCore/page/IntersectionObserver.cpp: Line 425: Changing 'thresholds()' to 'm_thresholds'
(In reply to Ahmad Saleem from comment #2) > I get following error: > > /Users/ahmadsaleem/Documents/GitHub-Webkit-origin/Webkit/WebKitBuild/Release/ > DerivedSources/WebCore/JSIntersectionObserver.cpp:297:135: error: > no member named 'thresholds' in 'WebCore::IntersectionObserver' > ...*thisObject.globalObject(), throwScope, impl.thresholds()))); > I think this change is the source of your issue: > > Source/WebCore/page/IntersectionObserver.h: > > Delete: const Vector<double>& thresholds() const { return m_thresholds; }
(In reply to Tim Nguyen (:ntim) from comment #3) > (In reply to Ahmad Saleem from comment #2) > > I get following error: > > > > /Users/ahmadsaleem/Documents/GitHub-Webkit-origin/Webkit/WebKitBuild/Release/ > > DerivedSources/WebCore/JSIntersectionObserver.cpp:297:135: error: > > no member named 'thresholds' in 'WebCore::IntersectionObserver' > > ...*thisObject.globalObject(), throwScope, impl.thresholds()))); > > > > I think this change is the source of your issue: > > > > Source/WebCore/page/IntersectionObserver.h: > > > > Delete: const Vector<double>& thresholds() const { return m_thresholds; } Indeed! Without doing this and just modifying IDL, I do progress the test. Should I do PR?
PR - https://github.com/WebKit/WebKit/pull/16653
Committed 266857@main (37667adc938e): <https://commits.webkit.org/266857@main> Reviewed commits have been landed. Closing PR #16653 and removing active labels.
<rdar://problem/113830183>