Changeset 152435 in webkit
- Timestamp:
- Jul 6, 2013 12:24:42 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152434 r152435 1 2013-07-06 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 Stop hardcoding interfaces that have indexed getters returning strings 4 https://bugs.webkit.org/show_bug.cgi?id=118414 5 6 Reviewed by Kentaro Hara. 7 8 Stop hardcoding the names of interfaces that have indexed getters returning 9 strings in the bindings generator. Now that we use the latest Web IDL indexed 10 getter, more information is provided in the IDL files and the generator is 11 able to figure out if the indexed getter is returning a DOMString on its own. 12 13 No new tests, no behavior change. 14 15 * bindings/scripts/CodeGeneratorJS.pm: 16 (GenerateGetOwnPropertySlotBody): 17 (GenerateImplementation): 18 1 19 2013-07-05 Tim Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r152404 r152435 179 179 } 180 180 181 sub IndexGetterReturnsStrings182 {183 my $type = shift;184 185 return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "DOMStringList" or $type eq "DOMTokenList" or $type eq "DOMSettableTokenList";186 return 0;187 }188 189 181 sub AddIncludesForTypeInImpl 190 182 { … … 391 383 # If the item function returns a string then we let the TreatReturnedNullStringAs handle the cases 392 384 # where the index is out of range. 393 if ( IndexGetterReturnsStrings($interfaceName)) {385 if ($indexedGetterFunction->signature->type eq "DOMString") { 394 386 push(@getOwnPropertySlotImpl, " if (index != PropertyName::NotAnIndex) {\n"); 395 387 } else { … … 1980 1972 1981 1973 if ($indexedGetterFunction) { 1982 if ( IndexGetterReturnsStrings($interfaceName)) {1974 if ($indexedGetterFunction->signature->type eq "DOMString") { 1983 1975 push(@implContent, " if (index <= MAX_ARRAY_INDEX) {\n"); 1984 1976 } else { … … 2658 2650 push(@implContent, " ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n"); 2659 2651 push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObj, &s_info);\n"); 2660 if ( IndexGetterReturnsStrings($interfaceName)) {2652 if ($indexedGetterFunction->signature->type eq "DOMString") { 2661 2653 $implIncludes{"KURL.h"} = 1; 2662 2654 push(@implContent, " return jsStringOrUndefined(exec, thisObj->impl()->item(index));\n");
Note: See TracChangeset
for help on using the changeset viewer.