Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textarea cols and rows IDL attributes #2717

Open
zcorpan opened this issue May 30, 2017 · 2 comments
Open

textarea cols and rows IDL attributes #2717

zcorpan opened this issue May 30, 2017 · 2 comments
Labels
interop Implementations are not interoperable with each other topic: forms

Comments

@zcorpan
Copy link
Member

zcorpan commented May 30, 2017

Related: #2705

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5215 for textarea cols and rows setter.

EdgeHTML
log: 1000: 1000 / 1000
log: 1001: 1001 / 1001
log: 2147483647: 2147483647
log: 2147483648: Error: Invalid argument.
log: 2147483650: Error: Invalid argument.
log: 4294967300: 4 / 4
Gecko & WebKit
log: 1000: 1000 / 1000
log: 1001: 1001 / 1001
log: 2147483647: 2147483647 / 2147483647
log: 2147483648: 20 / 2
log: 2147483650: 20 / 2
log: 4294967300: 4 / 4
Chromium
log: 1000: 1000 / 1000
log: 1001: 1001 / 1001
log: 2147483647: 2147483647 / 2147483647
log: 2147483648: 0 / 0
log: 2147483650: 0 / 0
log: 4294967300: 4 / 4
@zcorpan zcorpan added interop Implementations are not interoperable with each other topic: forms labels May 30, 2017
@zcorpan
Copy link
Member Author

zcorpan commented Jun 19, 2017

The spec uses https://html.spec.whatwg.org/#limited-to-only-non-negative-numbers-greater-than-zero-with-fallback for rows and cols (matches Gecko and WebKit).

Test for the getter:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5247

EdgeHTML
log: textarea.cols
log: -------------
log: -5: 20
log: -1: 20
log: 0: 20
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 2147483647
log: 2147483652: 2147483647
log: 4294967295: 2147483647
log: 4294967296: 2147483647
log: 5000000000: 2147483647
log: 
log: textarea.rows
log: -------------
log: -5: 2
log: -1: 2
log: 0: 2
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 2147483647
log: 2147483652: 2147483647
log: 4294967295: 2147483647
log: 4294967296: 2147483647
log: 5000000000: 2147483647
Gecko & WebKit
log: textarea.cols
log: -------------
log: -5: 20
log: -1: 20
log: 0: 20
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 20
log: 2147483652: 20
log: 4294967295: 20
log: 4294967296: 20
log: 5000000000: 20
log: 
log: textarea.rows
log: -------------
log: -5: 2
log: -1: 2
log: 0: 2
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 2
log: 2147483652: 2
log: 4294967295: 2
log: 4294967296: 2
log: 5000000000: 2
Chromium
log: textarea.cols
log: -------------
log: -5: 20
log: -1: 20
log: 0: 20
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 2147483648
log: 2147483652: 2147483652
log: 4294967295: 4294967295
log: 4294967296: 20
log: 5000000000: 20
log: 
log: textarea.rows
log: -------------
log: -5: 2
log: -1: 2
log: 0: 2
log: 1000: 1000
log: 1001: 1001
log: 8190: 8190
log: 8191: 8191
log: 65534: 65534
log: 65535: 65535
log: 2147483647: 2147483647
log: 2147483648: 2147483648
log: 2147483652: 2147483652
log: 4294967295: 4294967295
log: 4294967296: 2
log: 5000000000: 2

@zcorpan
Copy link
Member Author

zcorpan commented Jun 19, 2017

Rendering-wise, WebKit supports values up to 2147483647 and then uses the default value for greater values.

Chromium supports cols up to 2147483647, then renders a very narrow textarea for greater values, until 4294967294 which is slightly wider, then 4294967295 is slightly wider still (but narrower than cols=1), then uses the default value for yet greater values. rows up to 4294967295, then a 2-row textarea for greater values.

In Gecko, for rows, up to 23860903 works, then between 23860904..23860928 the textarea loses its border. 23860929..2147483647 results in a very small textarea. Uses the default values for 2147483648 and greater. For cols, works up to 4578851, then between 4578852..4578854 loses its border, then 4578855..998190691 renders a very narrow textarea, then 998190692..2129168217 makes the textarea wider again, 2129168218..2129168220 loses its border, 2129168221 results in a very narrow textarea... then another cycle, until 2147483647; greater values use the default value.

EdgeHTML supports rows up to 6878527, then loses its border... and has very small textarea for some greater values, and values greater than 2147483647 are stored as 2147483647 in the attribute (which violates HTML/DOM specs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: forms
Development

No branches or pull requests

1 participant