simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #include "config.h" |
| 27 | #include "ScrollingStateOverflowScrollingNode.h" |
| 28 | |
zandobersek@gmail.com | 78bebe9 | 2019-06-03 09:45:51 +0000 | [diff] [blame] | 29 | #if ENABLE(ASYNC_SCROLLING) |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 30 | |
| 31 | #include "ScrollingStateTree.h" |
don.olmstead@sony.com | d57eb47 | 2017-08-10 01:15:14 +0000 | [diff] [blame] | 32 | #include <wtf/text/TextStream.h> |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 33 | |
| 34 | namespace WebCore { |
| 35 | |
gyuyoung.kim@webkit.org | 1b1e5fa | 2015-05-11 05:53:20 +0000 | [diff] [blame] | 36 | Ref<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID) |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 37 | { |
gyuyoung.kim@webkit.org | 1b1e5fa | 2015-05-11 05:53:20 +0000 | [diff] [blame] | 38 | return adoptRef(*new ScrollingStateOverflowScrollingNode(stateTree, nodeID)); |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID) |
simon.fraser@apple.com | 9b8eca3 | 2018-12-24 19:20:18 +0000 | [diff] [blame] | 42 | : ScrollingStateScrollingNode(stateTree, ScrollingNodeType::Overflow, nodeID) |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 43 | { |
| 44 | } |
| 45 | |
| 46 | ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(const ScrollingStateOverflowScrollingNode& stateNode, ScrollingStateTree& adoptiveTree) |
| 47 | : ScrollingStateScrollingNode(stateNode, adoptiveTree) |
| 48 | { |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 49 | } |
| 50 | |
dbates@webkit.org | f21f3ae | 2017-10-19 23:48:45 +0000 | [diff] [blame] | 51 | ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode() = default; |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 52 | |
gyuyoung.kim@webkit.org | 1b1e5fa | 2015-05-11 05:53:20 +0000 | [diff] [blame] | 53 | Ref<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree) |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 54 | { |
gyuyoung.kim@webkit.org | 1b1e5fa | 2015-05-11 05:53:20 +0000 | [diff] [blame] | 55 | return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree)); |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 56 | } |
simon.fraser@apple.com | a144fc2 | 2019-06-23 19:34:44 +0000 | [diff] [blame] | 57 | |
simon.fraser@apple.com | de7e646 | 2021-10-20 15:20:20 +0000 | [diff] [blame] | 58 | void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, OptionSet<ScrollingStateTreeAsTextBehavior> behavior) const |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 59 | { |
commit-queue@webkit.org | e97fc95 | 2017-05-09 05:25:46 +0000 | [diff] [blame] | 60 | ts << "Overflow scrolling node"; |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 61 | |
commit-queue@webkit.org | e97fc95 | 2017-05-09 05:25:46 +0000 | [diff] [blame] | 62 | ScrollingStateScrollingNode::dumpProperties(ts, behavior); |
simon.fraser@apple.com | 79ad80a | 2014-05-19 20:23:10 +0000 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | } // namespace WebCore |
| 66 | |
zandobersek@gmail.com | 78bebe9 | 2019-06-03 09:45:51 +0000 | [diff] [blame] | 67 | #endif // ENABLE(ASYNC_SCROLLING) |