WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
253409
maxlength test for <textarea> failing when ran in a third-party iframe
https://bugs.webkit.org/show_bug.cgi?id=253409
Summary
maxlength test for <textarea> failing when ran in a third-party iframe
Ahmad Saleem
Reported
2023-03-05 06:02:53 PST
Hi Team, I came across following two tests from Blink repo / Chromium Source and noted that WebKit ToT (
261243@main
) are failing some of them: Test (max length):
https://jsfiddle.net/pLahgb8q/show
(Firefox Nightly 112 only fails two while WebKit / Safari fails a lot more) Test (min length):
https://jsfiddle.net/ts7ad8zp/show
. (Firefox Nightly 112 fails both same test as of Safari / WebKit) ^ Chrome Canary 113 passes all of above tests. Just wanted to raise so we can track them. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2023-03-05 14:37:17 PST
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 failures are not real failures, the exception name matches, only the exception string doesn't. We can choose whatever string/description we want for exceptions.
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures though. Firefox and Chrome pass all the tests, we don't.
Chris Dumez
Comment 2
2023-03-05 14:42:13 PST
(In reply to Chris Dumez from
comment #1
)
>
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > failures are not real failures, the exception name matches, only the > exception string doesn't. We can choose whatever string/description we want > for exceptions. > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > though. Firefox and Chrome pass all the tests, we don't.
The weird thing though is I thought I had imported
https://jsfiddle.net/pLahgb8q/show
as layout test as LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all the checks for this test.
Ahmad Saleem
Comment 3
2023-03-05 14:43:24 PST
(In reply to Chris Dumez from
comment #2
)
> (In reply to Chris Dumez from
comment #1
) > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > failures are not real failures, the exception name matches, only the > > exception string doesn't. We can choose whatever string/description we want > > for exceptions. > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > though. Firefox and Chrome pass all the tests, we don't. > > The weird thing though is I thought I had imported >
https://jsfiddle.net/pLahgb8q/show
as layout test as > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > the checks for this test.
I took updated copy of test from
https://source.chromium.org/
.
Chris Dumez
Comment 4
2023-03-05 14:44:21 PST
(In reply to Ahmad Saleem from
comment #3
)
> (In reply to Chris Dumez from
comment #2
) > > (In reply to Chris Dumez from
comment #1
) > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > failures are not real failures, the exception name matches, only the > > > exception string doesn't. We can choose whatever string/description we want > > > for exceptions. > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > though. Firefox and Chrome pass all the tests, we don't. > > > > The weird thing though is I thought I had imported > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > the checks for this test. > > I took updated copy of test from
https://source.chromium.org/
.
LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
Ahmad Saleem
Comment 5
2023-03-05 14:46:26 PST
(In reply to Chris Dumez from
comment #4
)
> (In reply to Ahmad Saleem from
comment #3
) > > (In reply to Chris Dumez from
comment #2
) > > > (In reply to Chris Dumez from
comment #1
) > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > failures are not real failures, the exception name matches, only the > > > > exception string doesn't. We can choose whatever string/description we want > > > > for exceptions. > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > The weird thing though is I thought I had imported > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > the checks for this test. > > > > I took updated copy of test from
https://source.chromium.org/
. > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell.
You are right. I just did 'diffcheck' on both test and except 'Error String' and one comment, there is no difference in both. Weird - if these tests are failing in JSFiddle but passing via Test Runner.
Chris Dumez
Comment 6
2023-03-05 14:47:50 PST
(In reply to Ahmad Saleem from
comment #5
)
> (In reply to Chris Dumez from
comment #4
) > > (In reply to Ahmad Saleem from
comment #3
) > > > (In reply to Chris Dumez from
comment #2
) > > > > (In reply to Chris Dumez from
comment #1
) > > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > > failures are not real failures, the exception name matches, only the > > > > > exception string doesn't. We can choose whatever string/description we want > > > > > for exceptions. > > > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > > > The weird thing though is I thought I had imported > > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > > the checks for this test. > > > > > > I took updated copy of test from
https://source.chromium.org/
. > > > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell. > > You are right. I just did 'diffcheck' on both test and except 'Error String' > and one comment, there is no difference in both. > > Weird - if these tests are failing in JSFiddle but passing via Test Runner.
Indeed! Might be a behavior difference when running in a third-party iframe (since that's how jsFiddle runs the test case).
Ahmad Saleem
Comment 7
2023-03-05 14:48:47 PST
(In reply to Chris Dumez from
comment #6
)
> (In reply to Ahmad Saleem from
comment #5
) > > (In reply to Chris Dumez from
comment #4
) > > > (In reply to Ahmad Saleem from
comment #3
) > > > > (In reply to Chris Dumez from
comment #2
) > > > > > (In reply to Chris Dumez from
comment #1
) > > > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > > > failures are not real failures, the exception name matches, only the > > > > > > exception string doesn't. We can choose whatever string/description we want > > > > > > for exceptions. > > > > > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > > > > > The weird thing though is I thought I had imported > > > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > > > the checks for this test. > > > > > > > > I took updated copy of test from
https://source.chromium.org/
. > > > > > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > > > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell. > > > > You are right. I just did 'diffcheck' on both test and except 'Error String' > > and one comment, there is no difference in both. > > > > Weird - if these tests are failing in JSFiddle but passing via Test Runner. > > Indeed! Might be a behavior difference when running in a third-party iframe > (since that's how jsFiddle runs the test case).
Let me make local HTML and then run them on WebKit ToT local build.
Ahmad Saleem
Comment 8
2023-03-05 14:50:34 PST
(In reply to Ahmad Saleem from
comment #7
)
> (In reply to Chris Dumez from
comment #6
) > > (In reply to Ahmad Saleem from
comment #5
) > > > (In reply to Chris Dumez from
comment #4
) > > > > (In reply to Ahmad Saleem from
comment #3
) > > > > > (In reply to Chris Dumez from
comment #2
) > > > > > > (In reply to Chris Dumez from
comment #1
) > > > > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > > > > failures are not real failures, the exception name matches, only the > > > > > > > exception string doesn't. We can choose whatever string/description we want > > > > > > > for exceptions. > > > > > > > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > > > > > > > The weird thing though is I thought I had imported > > > > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > > > > the checks for this test. > > > > > > > > > > I took updated copy of test from
https://source.chromium.org/
. > > > > > > > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > > > > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell. > > > > > > You are right. I just did 'diffcheck' on both test and except 'Error String' > > > and one comment, there is no difference in both. > > > > > > Weird - if these tests are failing in JSFiddle but passing via Test Runner. > > > > Indeed! Might be a behavior difference when running in a third-party iframe > > (since that's how jsFiddle runs the test case). > > Let me make local HTML and then run them on WebKit ToT local build.
Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass all tests.
Chris Dumez
Comment 9
2023-03-05 14:51:39 PST
(In reply to Ahmad Saleem from
comment #8
)
> (In reply to Ahmad Saleem from
comment #7
) > > (In reply to Chris Dumez from
comment #6
) > > > (In reply to Ahmad Saleem from
comment #5
) > > > > (In reply to Chris Dumez from
comment #4
) > > > > > (In reply to Ahmad Saleem from
comment #3
) > > > > > > (In reply to Chris Dumez from
comment #2
) > > > > > > > (In reply to Chris Dumez from
comment #1
) > > > > > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > > > > > failures are not real failures, the exception name matches, only the > > > > > > > > exception string doesn't. We can choose whatever string/description we want > > > > > > > > for exceptions. > > > > > > > > > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > > > > > > > > > The weird thing though is I thought I had imported > > > > > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > > > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > > > > > the checks for this test. > > > > > > > > > > > > I took updated copy of test from
https://source.chromium.org/
. > > > > > > > > > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > > > > > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell. > > > > > > > > You are right. I just did 'diffcheck' on both test and except 'Error String' > > > > and one comment, there is no difference in both. > > > > > > > > Weird - if these tests are failing in JSFiddle but passing via Test Runner. > > > > > > Indeed! Might be a behavior difference when running in a third-party iframe > > > (since that's how jsFiddle runs the test case). > > > > Let me make local HTML and then run them on WebKit ToT local build. > > Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass > all tests.
Looking at the test case, I bet this is a focus behavior difference. I suspect the JS is not able to focus the fields in the third-party iframe and thus we end up with empty fields.
Ahmad Saleem
Comment 10
2023-03-05 14:57:30 PST
(In reply to Chris Dumez from
comment #9
)
> (In reply to Ahmad Saleem from
comment #8
) > > (In reply to Ahmad Saleem from
comment #7
) > > > (In reply to Chris Dumez from
comment #6
) > > > > (In reply to Ahmad Saleem from
comment #5
) > > > > > (In reply to Chris Dumez from
comment #4
) > > > > > > (In reply to Ahmad Saleem from
comment #3
) > > > > > > > (In reply to Chris Dumez from
comment #2
) > > > > > > > > (In reply to Chris Dumez from
comment #1
) > > > > > > > > >
https://jsfiddle.net/ts7ad8zp/show
is already fully passing on trunk. The 2 > > > > > > > > > failures are not real failures, the exception name matches, only the > > > > > > > > > exception string doesn't. We can choose whatever string/description we want > > > > > > > > > for exceptions. > > > > > > > > > > > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
does have a few legit-looking failures > > > > > > > > > though. Firefox and Chrome pass all the tests, we don't. > > > > > > > > > > > > > > > > The weird thing though is I thought I had imported > > > > > > > >
https://jsfiddle.net/pLahgb8q/show
as layout test as > > > > > > > > LayoutTests/fast/forms/textarea-maxlength.html. However, we are passing all > > > > > > > > the checks for this test. > > > > > > > > > > > > > > I took updated copy of test from
https://source.chromium.org/
. > > > > > > > > > > > > LayoutTests/fast/forms/textarea-maxlength.html is a straight copy of Blink's > > > > > > web_tests/fast/forms/textarea/textarea-maxlength.html as far as I can tell. > > > > > > > > > > You are right. I just did 'diffcheck' on both test and except 'Error String' > > > > > and one comment, there is no difference in both. > > > > > > > > > > Weird - if these tests are failing in JSFiddle but passing via Test Runner. > > > > > > > > Indeed! Might be a behavior difference when running in a third-party iframe > > > > (since that's how jsFiddle runs the test case). > > > > > > Let me make local HTML and then run them on WebKit ToT local build. > > > > Yes - it is JSFiddle playing around. Using local copy on WebKit ToT, we pass > > all tests. > > Looking at the test case, I bet this is a focus behavior difference. I > suspect the JS is not able to focus the fields in the third-party iframe and > thus we end up with empty fields.
Should we mark this as "RESOLVED INVALID" or rename title to something along the lines of 'focus' issue in third party iframes?
Chris Dumez
Comment 11
2023-03-05 15:08:03 PST
In Element::focus(), we have: ``` if (!frame.hasHadUserInteraction() && !frame.isMainFrame() && !document->topOrigin().isSameOriginDomain(document->securityOrigin())) return; ``` Which means that we don't allow elements in third-party frames to get focus in JS without a user interaction. This behavior appears to be stricter than both Chrome and Firefox so it may be a compatibility risk I am adding a few people in CC would know more about focus than I do to see if we should update our behavior.
Radar WebKit Bug Importer
Comment 12
2023-03-12 07:03:14 PDT
<
rdar://problem/106615378
>
Ahmad Saleem
Comment 13
2023-04-23 01:48:10 PDT
***
Bug 249907
has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 14
2023-05-11 04:25:11 PDT
***
Bug 250650
has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 15
2023-11-23 04:37:10 PST
***
Bug 265282
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug