Summary: | Chrome allows elements with names to override collection properties | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dave Moore <davemoore> | ||||||||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | dglazkov | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Attachments: |
|
Description
Dave Moore
2009-04-03 11:05:28 PDT
Created attachment 29233 [details]
Fix
This patch will only effect the chromium build, as it's in the bindings
Comment on attachment 29233 [details] Fix Don't forget bug URL in ChangeLog description. > + (WebCore::collectionNamedPropertyGetter): > + (WebCore::nodeCollectionNamedPropertyGetter): It's a good practice to add brief descriptions to each line on what's being done. > + if (!value.IsEmpty()) > + return value; 4 spaces. > + > + // Search local callback properties next to find IDL defined > + // properties. > + if (info.Holder()->HasRealNamedCallbackProperty(name)) > + return v8::Handle<v8::Value>(); 4 spaces. Also, I think this should be return notHandledbyInterceptor(). > + if (!value.IsEmpty()) > + return value; 4 spaces. > + if (info.Holder()->HasRealNamedCallbackProperty(name)) > + return v8::Handle<v8::Value>(); 4 spaces, notHandledByInterceptor() > +2009-04-03 Dave Moore <davemoore@google.com> > + > + Reviewed by NOBODY (OOPS!). Need a good description of what the tests test. > + function test() > + { > + if (window.layoutTestController) > + layoutTestController.dumpAsText(); Is this where we should put attempting to override length? > + > + var sl = document.getElementById("sl"); > + if (sl.length == 1) Created attachment 29236 [details]
Fix
Created attachment 29237 [details]
Fix
Added a new tests to ensure that JS can override the length property on the HTMLSelectElement
Created attachment 29240 [details]
Fix
Remove test for JS setting the length property.
Comment on attachment 29240 [details]
Fix
looks good!
Landed as http://trac.webkit.org/changeset/42247. |