Bug 264991 - 'NotEnumerable' causing Selection API 'idlharness' stringification test failure
Summary: 'NotEnumerable' causing Selection API 'idlharness' stringification test failure
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2023-11-16 16:01 PST by Ahmad Saleem
Modified: 2023-11-17 23:39 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-16 16:01:34 PST
Hi Team,

While trying to investigate 'browser specific failure', I noticed that Safari / WebKit fails one 'idlharness' test from Selection API:

WPT Test Case: https://wpt.fyi/results/selection/idlharness.window.html?label=master&label=experimental&aligned=&q=safari%3Afail+idlharness

^ Failing: Selection interface: stringifier

While loading 'Assert', I noticed that it was failing here:

Fail	
assert_true(false, "property should be enumerable")
 /resources/idlharness.js:2642:20

and while looking into 'DOMSelection.idl', I noticed that we have following:

https://github.com/WebKit/WebKit/blob/54a799c39b9970cface5982aefe8e5f6cc508bf7/Source/WebCore/page/DOMSelection.idl#L70

[NotEnumerable] DOMString toString();

and change above to:

DOMString toString();

___

It leads us to pass all test cases in 'idlharness'.

I just wanted to raise so we can track this failure and fix the issue.

Thanks!
Comment 1 Ahmad Saleem 2023-11-16 16:46:46 PST
Web-Spec: https://w3c.github.io/selection-api/#dom-selection-stringifier
Comment 2 Ahmad Saleem 2023-11-16 16:52:33 PST
Just to update, we have following:

undefined setBaseAndExtent(Node? baseNode, unsigned long baseOffset, Node? extentNode, unsigned long extentOffset);

but Web-Spec has following:

undefined setBaseAndExtent(Node anchorNode, unsigned long anchorOffset, Node focusNode, unsigned long focusOffset);

___

Web-Spec: https://w3c.github.io/selection-api/#selection-interface
Comment 3 Ryosuke Niwa 2023-11-17 15:46:03 PST
It seems like a good change assuming that other browser engines pass those tests.
Comment 4 Ahmad Saleem 2023-11-17 16:21:17 PST
PR to sync partially with bug - https://github.com/WebKit/WebKit/pull/20696

As for 'Comment 02', it is bit more involved change, will create separate bug for it.

@Ryosuke - thanks for your input. For some reason, we don't have 'idlharness' expectation file but I will run above PR as draft via EWS to see, what this change leads and then will make it 'Open' once everything looks good.
Comment 5 EWS 2023-11-17 23:38:01 PST
Committed 270933@main (6b9b667d2d27): <https://commits.webkit.org/270933@main>

Reviewed commits have been landed. Closing PR #20696 and removing active labels.
Comment 6 Radar WebKit Bug Importer 2023-11-17 23:39:15 PST
<rdar://problem/118594710>