| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3053 | 3053 |
| 3054 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, | 3054 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, |
| 3055 int state) { | 3055 int state) { |
| 3056 ASSERT(mediaElement); | 3056 ASSERT(mediaElement); |
| 3057 ASSERT(state >= WebMediaPlayer::NetworkState::NetworkStateEmpty); | 3057 ASSERT(state >= WebMediaPlayer::NetworkState::NetworkStateEmpty); |
| 3058 ASSERT(state <= WebMediaPlayer::NetworkState::NetworkStateDecodeError); | 3058 ASSERT(state <= WebMediaPlayer::NetworkState::NetworkStateDecodeError); |
| 3059 mediaElement->setNetworkState( | 3059 mediaElement->setNetworkState( |
| 3060 static_cast<WebMediaPlayer::NetworkState>(state)); | 3060 static_cast<WebMediaPlayer::NetworkState>(state)); |
| 3061 } | 3061 } |
| 3062 | 3062 |
| 3063 // TODO(liberato): remove once autoplay gesture override experiment concludes. | |
| 3064 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) { | |
| 3065 element->triggerAutoplayViewportCheckForTesting(); | |
| 3066 } | |
| 3067 | |
| 3068 String Internals::getScrollAnimationState(Node* node) const { | 3063 String Internals::getScrollAnimationState(Node* node) const { |
| 3069 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 3064 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 3070 return scrollableArea->scrollAnimator().runStateAsText(); | 3065 return scrollableArea->scrollAnimator().runStateAsText(); |
| 3071 return String(); | 3066 return String(); |
| 3072 } | 3067 } |
| 3073 | 3068 |
| 3074 String Internals::getProgrammaticScrollAnimationState(Node* node) const { | 3069 String Internals::getProgrammaticScrollAnimationState(Node* node) const { |
| 3075 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 3070 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 3076 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 3071 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 3077 return String(); | 3072 return String(); |
| 3078 } | 3073 } |
| 3079 | 3074 |
| 3080 ClientRect* Internals::visualRect(Node* node) { | 3075 ClientRect* Internals::visualRect(Node* node) { |
| 3081 if (!node || !node->layoutObject()) | 3076 if (!node || !node->layoutObject()) |
| 3082 return ClientRect::create(); | 3077 return ClientRect::create(); |
| 3083 | 3078 |
| 3084 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 3079 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
| 3085 } | 3080 } |
| 3086 | 3081 |
| 3087 void Internals::crash() { | 3082 void Internals::crash() { |
| 3088 CHECK(false) << "Intentional crash"; | 3083 CHECK(false) << "Intentional crash"; |
| 3089 } | 3084 } |
| 3090 | 3085 |
| 3091 } // namespace blink | 3086 } // namespace blink |
| OLD | NEW |