[Webkit-unassigned] [Bug 139179] HTMLSelectElement add() should support index as second argument
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 22 06:48:50 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=139179
--- Comment #28 from Shivakumar J M <shiva.jm at samsung.com> ---
(In reply to comment #27)
> (In reply to comment #26)
> > (In reply to comment #25)
> > > (In reply to comment #24)
> > > > In the short term, I’m sure you can find a way to get the null case to be
> > > > handled the way it was before. It might depend on the order the two
> > > > overloads are defined in the IDL file. Not sure, might require a little bit
> > > > of research.
> > >
> > > Yes, the order of the overloads in the IDL file matters. The ones with the
> > > most specific argument types should come first (because the bindings
> > > generators will adds the argument type checks in the same order as in the
> > > IDL, in order to call the right overload function in the implementation).
> >
> > I think that means that if we put the version that takes the long index
> > first in the IDL file, then null will be handled as before. Please try that.
>
>
> Tried by moving new add() api to above the old add() api in IDL file, but
> did not worked, also tried using implementedAs method then also same
> results, still add(x,null) adds the element x to begining of the list.
> Now trying to use Custom in add() method and trying to make changes in
> webcore/bindings/js/JSHTMLSelectElementCustom.cpp, same way as
> remove()/add() method implemented in HTMLOptionsCollection.cpp.
Dear Chris and Darin,
Thanks for the inputs, below are some observations:
1) After moving new add() api above/below the old add() api in IDL file, there will be 2 add functions add1() and add2() will be generated after build, add1() will resolve to first, add2() will resolve the second. But the call to add(x,null), still matches to new add() api which takes index parameter.
2) Added 'Custom' in old add() method and tried to call the different add() method, based on parameter in "webcore/bindings/js/JSHTMLSelectElementCustom.cpp,". But for both 'null' and '0', toInt32() gives same value. toHTMLSelectElement() also gives same value.
3) Tried adding TreatNullAs=NullString for index parameter, but still values same for null or 0 input. Will try some other options to differentiate these values.
Thanks
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141222/cb72e6cf/attachment-0002.html>
More information about the webkit-unassigned
mailing list