blob: 904f923b1ae967fbdf0bfa1b51ce7f19000b0a3a [file] [log] [blame]
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +00001/*
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.com78bebe92019-06-03 09:45:51 +000029#if ENABLE(ASYNC_SCROLLING)
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000030
31#include "ScrollingStateTree.h"
don.olmstead@sony.comd57eb472017-08-10 01:15:14 +000032#include <wtf/text/TextStream.h>
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000033
34namespace WebCore {
35
gyuyoung.kim@webkit.org1b1e5fa2015-05-11 05:53:20 +000036Ref<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000037{
gyuyoung.kim@webkit.org1b1e5fa2015-05-11 05:53:20 +000038 return adoptRef(*new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000039}
40
41ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
simon.fraser@apple.com9b8eca32018-12-24 19:20:18 +000042 : ScrollingStateScrollingNode(stateTree, ScrollingNodeType::Overflow, nodeID)
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000043{
44}
45
46ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(const ScrollingStateOverflowScrollingNode& stateNode, ScrollingStateTree& adoptiveTree)
47 : ScrollingStateScrollingNode(stateNode, adoptiveTree)
48{
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000049}
50
dbates@webkit.orgf21f3ae2017-10-19 23:48:45 +000051ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode() = default;
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000052
gyuyoung.kim@webkit.org1b1e5fa2015-05-11 05:53:20 +000053Ref<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000054{
gyuyoung.kim@webkit.org1b1e5fa2015-05-11 05:53:20 +000055 return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000056}
simon.fraser@apple.coma144fc22019-06-23 19:34:44 +000057
simon.fraser@apple.comde7e6462021-10-20 15:20:20 +000058void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, OptionSet<ScrollingStateTreeAsTextBehavior> behavior) const
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000059{
commit-queue@webkit.orge97fc952017-05-09 05:25:46 +000060 ts << "Overflow scrolling node";
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000061
commit-queue@webkit.orge97fc952017-05-09 05:25:46 +000062 ScrollingStateScrollingNode::dumpProperties(ts, behavior);
simon.fraser@apple.com79ad80a2014-05-19 20:23:10 +000063}
64
65} // namespace WebCore
66
zandobersek@gmail.com78bebe92019-06-03 09:45:51 +000067#endif // ENABLE(ASYNC_SCROLLING)