| Summary: | Use 'FrozenArray' for 'thresholds' in IntersectionObserver | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ashvayka, cdumez, ntim, rniwa, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://wpt.live/intersection-observer/idlharness.window.html | ||
|
Description
Ahmad Saleem
2023-08-13 13:42:57 PDT
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? Committed 266857@main (37667adc938e): <https://commits.webkit.org/266857@main> Reviewed commits have been landed. Closing PR #16653 and removing active labels. |