Bug 85225

Summary: getSelection().getRangeAt(9223372036854775811) returns getRangeAt(0)
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: arv, ayg, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Ryosuke Niwa
Reported 2012-04-30 13:38:38 PDT
It appears that we treat really large number index as 0 :(
Attachments
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.