| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 MediaController* controller = 0; | 36 MediaController* controller = 0; |
| 37 if (!value->IsNull()) { | 37 if (!value->IsNull()) { |
| 38 if (!V8MediaController::HasInstance(value, info.GetIsolate(), worldType(
info.GetIsolate()))) { | 38 if (!V8MediaController::HasInstance(value, info.GetIsolate(), worldType(
info.GetIsolate()))) { |
| 39 throwTypeError("Value is not of type MediaController", info.GetIsola
te()); | 39 throwTypeError("Value is not of type MediaController", info.GetIsola
te()); |
| 40 return; | 40 return; |
| 41 } | 41 } |
| 42 controller = V8MediaController::toNative(value->ToObject()); | 42 controller = V8MediaController::toNative(value->ToObject()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // 4.8.10.11.2 Media controllers: controller attribute. | 45 // 4.8.10.11.2 Media controllers: controller attribute. |
| 46 // On setting, it must first remove the element's mediagroup attribute, if a
ny, | 46 // On setting, it must first remove the element's mediagroup attribute, if a
ny, |
| 47 HTMLMediaElement* imp = V8HTMLMediaElement::toNative(info.Holder()); | 47 HTMLMediaElement* imp = V8HTMLMediaElement::toNative(info.Holder()); |
| 48 imp->setMediaGroup(String()); | 48 imp->setMediaGroup(String()); |
| 49 // and then set the current media controller to the given value. | 49 // and then set the current media controller to the given value. |
| 50 imp->setController(controller); | 50 imp->setController(controller); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } | 53 } |
| OLD | NEW |