| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 #include "platform/Cursor.h" | 129 #include "platform/Cursor.h" |
| 130 #include "platform/Language.h" | 130 #include "platform/Language.h" |
| 131 #include "platform/PlatformKeyboardEvent.h" | 131 #include "platform/PlatformKeyboardEvent.h" |
| 132 #include "platform/RuntimeEnabledFeatures.h" | 132 #include "platform/RuntimeEnabledFeatures.h" |
| 133 #include "platform/TraceEvent.h" | 133 #include "platform/TraceEvent.h" |
| 134 #include "platform/geometry/IntRect.h" | 134 #include "platform/geometry/IntRect.h" |
| 135 #include "platform/geometry/LayoutRect.h" | 135 #include "platform/geometry/LayoutRect.h" |
| 136 #include "platform/graphics/GraphicsLayer.h" | 136 #include "platform/graphics/GraphicsLayer.h" |
| 137 #include "platform/heap/Handle.h" | 137 #include "platform/heap/Handle.h" |
| 138 #include "platform/inspector_protocol/FrontendChannel.h" | 138 #include "platform/inspector_protocol/FrontendChannel.h" |
| 139 #include "platform/scroll/ProgrammaticScrollAnimator.h" |
| 139 #include "platform/weborigin/SchemeRegistry.h" | 140 #include "platform/weborigin/SchemeRegistry.h" |
| 140 #include "public/platform/Platform.h" | 141 #include "public/platform/Platform.h" |
| 141 #include "public/platform/WebConnectionType.h" | 142 #include "public/platform/WebConnectionType.h" |
| 142 #include "public/platform/WebGraphicsContext3D.h" | 143 #include "public/platform/WebGraphicsContext3D.h" |
| 143 #include "public/platform/WebGraphicsContext3DProvider.h" | 144 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 144 #include "public/platform/WebLayer.h" | 145 #include "public/platform/WebLayer.h" |
| 145 #include "wtf/InstanceCounter.h" | 146 #include "wtf/InstanceCounter.h" |
| 146 #include "wtf/PassOwnPtr.h" | 147 #include "wtf/PassOwnPtr.h" |
| 147 #include "wtf/dtoa.h" | 148 #include "wtf/dtoa.h" |
| 148 #include "wtf/text/StringBuffer.h" | 149 #include "wtf/text/StringBuffer.h" |
| (...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 } | 2561 } |
| 2561 | 2562 |
| 2562 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2563 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
| 2563 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2564 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
| 2564 { | 2565 { |
| 2565 element->triggerAutoplayViewportCheckForTesting(); | 2566 element->triggerAutoplayViewportCheckForTesting(); |
| 2566 } | 2567 } |
| 2567 | 2568 |
| 2568 int Internals::getScrollAnimationState(Node* node) const | 2569 int Internals::getScrollAnimationState(Node* node) const |
| 2569 { | 2570 { |
| 2571 // TODO(ymalik): Use runStateAsText instead of returning an integer. |
| 2570 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2572 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2571 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); | 2573 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); |
| 2572 return -1; | 2574 return -1; |
| 2573 } | 2575 } |
| 2574 | 2576 |
| 2577 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2578 { |
| 2579 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2580 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2581 return String(); |
| 2582 } |
| 2583 |
| 2575 } // namespace blink | 2584 } // namespace blink |
| OLD | NEW |