Bug 130017

Summary: Make ClientRectList.item() argument mandatory and drop [IsIndex]
Product: WebKit Reporter: Jinwoo Song <jinwoo7.song>
Component: WebCore Misc.Assignee: Jinwoo Song <jinwoo7.song>
Status: RESOLVED INVALID    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, commit-queue, esprehn+autocc, kangil.han, kondapallykalyan, rniwa
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jinwoo Song 2014-03-10 04:51:51 PDT
From <https://code.google.com/p/chromium/issues/detail?id=336346>:

Make ClientRectList.item() argument mandatory and drop [IsIndex] IDL extended
attribute to match the latest specification:
http://dev.w3.org/csswg/cssom-view/#dom-clientrectlist-item

According to the specification, the index argument for ClientRectList.item() is
mandatory and we should not throw when the index is negative, as long as it
wraps to a valid index value (when calling toUInt32() as per Web IDL
specification).

Our new behavior is consistent with Firefox 22 as well. Note however that IE10
behaves differently: the argument is optional and passing a negative index
throws even if it wraps to a valid index.

Note that according to the specification, we should throw an IndexSizeError
exception when index is greater than the number of ClientRect objects associated
with the object. Blink just returns null in this case and this patch does not
change this behavior as it is consistent with Firefox 22. IE10 does throw in
this case though.
Comment 1 Jinwoo Song 2014-03-10 04:59:10 PDT
Created attachment 226298 [details]
Patch
Comment 2 Michael Catanzaro 2016-09-17 07:16:56 PDT
Comment on attachment 226298 [details]
Patch

Hi,

Apologies that your patch was not reviewed in a timely manner. Since it's now quite old, I am removing it from the review request queue. Please consider rebasing it on trunk and resubmitting.

To increase the chances of getting a review, consider using 'Tools/Scripts/webkit-patch upload --suggest-reviewers' to CC reviewers who might be interested in this bug.
Comment 3 Ahmad Saleem 2022-07-26 14:35:22 PDT
This patch was modifying ClientRect.IDL in DOM, which got dropped in this commit:

https://github.com/WebKit/WebKit/commit/fbe3ae77406ad5febbdc105d75794f433b60a0b1#diff-5132418c07229447b7c9f71217a9513bed2c82607f63a666947c402b7babcfa8


I am not sure whether this patch landed or not but this do modified the behavior and removed undefined and changed it.

https://github.com/WebKit/WebKit/commit/8c7d8ccf45fa9dee315b2ca36e45f0d60f2b27d4

If I am wrong, please ignore my comment and please do the needful. Thanks!
Comment 4 Ryosuke Niwa 2022-07-26 21:45:50 PDT
We don't have this code anymore.