WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
85225
getSelection().getRangeAt(9223372036854775811) returns getRangeAt(0)
https://bugs.webkit.org/show_bug.cgi?id=85225
Summary
getSelection().getRangeAt(9223372036854775811) returns getRangeAt(0)
Ryosuke Niwa
Reported
2012-04-30 13:38:38 PDT
It appears that we treat really large number index as 0 :(
Attachments
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2012-04-30 13:53:58 PDT
This is the correct behavior. Range getRangeAt(in long index) According to the spec,
http://www.w3.org/TR/WebIDL/#es-long
, we should do a ToInt32 and since ToInt32(9223372036854775811) is 0 we are doing the right thing. PS. ToInt32 can be written as function toInt32(x) { return x | 0; }
Ryosuke Niwa
Comment 2
2012-04-30 13:55:48 PDT
Okay. Good to know.
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