| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2041 switch (code.get()) { | 2041 switch (code.get()) { |
| 2042 case NotAllowedError: | 2042 case NotAllowedError: |
| 2043 message = "play() can only be initiated by a user gesture."; | 2043 message = "play() can only be initiated by a user gesture."; |
| 2044 break; | 2044 break; |
| 2045 case NotSupportedError: | 2045 case NotSupportedError: |
| 2046 message = "The element has no supported sources."; | 2046 message = "The element has no supported sources."; |
| 2047 break; | 2047 break; |
| 2048 default: | 2048 default: |
| 2049 NOTREACHED(); | 2049 NOTREACHED(); |
| 2050 } | 2050 } |
| 2051 return ScriptPromise::rejectWithDOMException(scriptState, DOMException::
create(code.get(), message)); | 2051 resolver->reject(DOMException::create(code.get(), message)); |
| 2052 return promise; |
| 2052 } | 2053 } |
| 2053 | 2054 |
| 2054 return promise; | 2055 return promise; |
| 2055 } | 2056 } |
| 2056 | 2057 |
| 2057 Nullable<ExceptionCode> HTMLMediaElement::play() | 2058 Nullable<ExceptionCode> HTMLMediaElement::play() |
| 2058 { | 2059 { |
| 2059 DVLOG(MEDIA_LOG_LEVEL) << "play(" << (void*)this << ")"; | 2060 DVLOG(MEDIA_LOG_LEVEL) << "play(" << (void*)this << ")"; |
| 2060 | 2061 |
| 2061 m_autoplayHelper->playMethodCalled(); | 2062 m_autoplayHelper->playMethodCalled(); |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3926 | 3927 |
| 3927 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst | 3928 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst |
| 3928 { | 3929 { |
| 3929 IntRect result; | 3930 IntRect result; |
| 3930 if (LayoutObject* object = m_element->layoutObject()) | 3931 if (LayoutObject* object = m_element->layoutObject()) |
| 3931 result = object->absoluteBoundingBoxRect(); | 3932 result = object->absoluteBoundingBoxRect(); |
| 3932 return result; | 3933 return result; |
| 3933 } | 3934 } |
| 3934 | 3935 |
| 3935 } // namespace blink | 3936 } // namespace blink |
| OLD | NEW |