Changeset 152569 in webkit
- Timestamp:
- Jul 11, 2013 7:54:36 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152562 r152569 1 2013-07-11 Radu Stavila <stavila@adobe.com> 2 3 NamedFlowCollection getters should follow the same pattern as HTMLCollection 4 https://bugs.webkit.org/show_bug.cgi?id=118561 5 6 Reviewed by Christophe Dumez. 7 8 Updated test for NamedFlowCollection getters when no named flows are created. 9 10 * fast/regions/webkit-named-flow-collection-empty-getters-expected.txt: Renamed from LayoutTests/fast/regions/webkit-named-flow-collection-undefined-expected.txt. 11 * fast/regions/webkit-named-flow-collection-empty-getters.html: Renamed from LayoutTests/fast/regions/webkit-named-flow-collection-undefined.html. 12 1 13 2013-07-11 Mario Sanchez Prada <mario.prada@samsung.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r152568 r152569 1 2013-07-11 Radu Stavila <stavila@adobe.com> 2 3 NamedFlowCollection getters should follow the same pattern as HTMLCollection 4 https://bugs.webkit.org/show_bug.cgi?id=118561 5 6 Reviewed by Christophe Dumez. 7 8 Modified item and namedItem methods from DOMNamedFlowCollection to return null instead of undefined. 9 https://www.w3.org/Bugs/Public/show_bug.cgi?id=22617 10 Completely removed the TreatReturnedNullObjectAs attribute as it was only used by the DOMNamedFlowCollection interface. 11 12 Test: fast/regions/webkit-named-flow-collection-empty-getters.html 13 14 * bindings/scripts/CodeGeneratorJS.pm: 15 (GenerateImplementationFunctionCall): 16 * bindings/scripts/IDLAttributes.txt: 17 * bindings/scripts/test/CPP/WebDOMTestObj.cpp: 18 (WebDOMTestObj::treatReturnedNullObjectAsUndefined): 19 * bindings/scripts/test/CPP/WebDOMTestObj.h: 20 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: 21 (webkit_dom_test_obj_treat_returned_null_object_as_undefined): 22 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: 23 * bindings/scripts/test/JS/JSTestObj.cpp: 24 (WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined): 25 * bindings/scripts/test/JS/JSTestObj.h: 26 * bindings/scripts/test/ObjC/DOMTestObj.h: 27 * bindings/scripts/test/ObjC/DOMTestObj.mm: 28 (-[DOMTestObj treatReturnedNullObjectAsUndefined]): 29 * bindings/scripts/test/TestObj.idl: 30 * dom/DOMNamedFlowCollection.idl: 31 1 32 2013-07-11 Andreas Kling <akling@apple.com> 2 33 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r152565 r152569 3321 3321 } 3322 3322 3323 if ($function->signature->extendedAttributes->{"TreatReturnedNullObjectAs"} and $function->signature->extendedAttributes->{"TreatReturnedNullObjectAs"} eq "Undefined") {3324 push(@implContent, $indent . "if (result == jsNull())\n");3325 push(@implContent, $indent . " result = jsUndefined();\n\n");3326 }3327 3328 3323 push(@implContent, $indent . "return JSValue::encode(result);\n"); 3329 3324 } -
trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt
r152490 r152569 102 102 SuppressToJSObject 103 103 TreatNullAs=NullString 104 TreatReturnedNullObjectAs=Undefined105 104 TreatReturnedNullStringAs=Null|Undefined 106 105 TreatUndefinedAs=NullString -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
r152466 r152569 991 991 #endif 992 992 993 WebDOMTestObj WebDOMTestObj::treatReturnedNullObjectAsUndefined()994 {995 if (!impl())996 return WebDOMTestObj();997 998 return toWebKit(WTF::getPtr(impl()->treatReturnedNullObjectAsUndefined()));999 }1000 1001 993 void WebDOMTestObj::classMethod() 1002 994 { -
trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
r152466 r152569 189 189 void conditionalMethod3(); 190 190 #endif 191 WebDOMTestObj treatReturnedNullObjectAsUndefined();192 191 void classMethod(); 193 192 int classMethodWithOptional(int arg); -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r152466 r152569 1414 1414 } 1415 1415 1416 WebKitDOMTestObj*1417 webkit_dom_test_obj_treat_returned_null_object_as_undefined(WebKitDOMTestObj* self)1418 {1419 WebCore::JSMainThreadNullState state;1420 g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);1421 WebCore::TestObj* item = WebKit::core(self);1422 RefPtr<WebCore::TestObj> gobjectResult = WTF::getPtr(item->treatReturnedNullObjectAsUndefined());1423 return WebKit::kit(gobjectResult.get());1424 }1425 1426 1416 void 1427 1417 webkit_dom_test_obj_class_method(WebKitDOMTestObj* self) -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r152466 r152569 406 406 407 407 /** 408 * webkit_dom_test_obj_treat_returned_null_object_as_undefined:409 * @self: A #WebKitDOMTestObj410 *411 * Returns: (transfer none):412 *413 **/414 WEBKIT_API WebKitDOMTestObj*415 webkit_dom_test_obj_treat_returned_null_object_as_undefined(WebKitDOMTestObj* self);416 417 /**418 408 * webkit_dom_test_obj_class_method: 419 409 * @self: A #WebKitDOMTestObj -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r152466 r152569 320 320 { "conditionalMethod3", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t)0, NoIntrinsic }, 321 321 #endif 322 { "treatReturnedNullObjectAsUndefined", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined), (intptr_t)0, NoIntrinsic },323 322 { "overloadedMethod", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t)2, NoIntrinsic }, 324 323 { "classMethodWithClamp", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t)2, NoIntrinsic }, … … 2505 2504 2506 2505 #endif 2507 2508 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined(ExecState* exec)2509 {2510 JSValue thisValue = exec->hostThisValue();2511 if (!thisValue.inherits(&JSTestObj::s_info))2512 return throwVMTypeError(exec);2513 JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));2514 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);2515 TestObj* impl = static_cast<TestObj*>(castedThis->impl());2516 2517 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->treatReturnedNullObjectAsUndefined()));2518 if (result == jsNull())2519 result = jsUndefined();2520 2521 return JSValue::encode(result);2522 }2523 2506 2524 2507 static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* exec) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r152466 r152569 210 210 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(JSC::ExecState*); 211 211 #endif 212 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined(JSC::ExecState*);213 212 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(JSC::ExecState*); 214 213 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(JSC::ExecState*); -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r152466 r152569 168 168 - (void)conditionalMethod3; 169 169 #endif 170 - (DOMTestObj *)treatReturnedNullObjectAsUndefined;171 170 - (void)classMethod; 172 171 - (int)classMethodWithOptional:(int)arg; -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
r152466 r152569 1053 1053 #endif 1054 1054 1055 - (DOMTestObj *)treatReturnedNullObjectAsUndefined1056 {1057 WebCore::JSMainThreadNullState state;1058 return kit(WTF::getPtr(IMPL->treatReturnedNullObjectAsUndefined()));1059 }1060 1061 1055 - (void)classMethod 1062 1056 { -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r152466 r152569 168 168 [Conditional=Condition1] const unsigned short CONDITIONAL_CONST = 0; 169 169 170 // 'TreatReturnedNullObjectAs' extended method171 [TreatReturnedNullObjectAs=Undefined] TestObj treatReturnedNullObjectAsUndefined();172 173 170 #if defined(TESTING_JS) 174 171 [CachedAttribute] readonly attribute any cachedAttribute1; -
trunk/Source/WebCore/dom/DOMNamedFlowCollection.idl
r152466 r152569 36 36 ] interface DOMNamedFlowCollection { 37 37 readonly attribute unsigned long length; 38 [TreatReturnedNullObjectAs=Undefined]getter WebKitNamedFlow item(unsigned long index);39 [TreatReturnedNullObjectAs=Undefined]getter WebKitNamedFlow namedItem(DOMString name);38 getter WebKitNamedFlow item(unsigned long index); 39 getter WebKitNamedFlow namedItem(DOMString name); 40 40 };
Note: See TracChangeset
for help on using the changeset viewer.