void ArgumentCoder<ScrollingStateScrollingNode>::encode(ArgumentEncoder& encoder, const ScrollingStateScrollingNode& node) { encoder << static_cast<const ScrollingStateNode&>(node); SCROLLING_NODE_ENCODE(ViewportSize, viewportSize) SCROLLING_NODE_ENCODE(TotalContentsSize, totalContentsSize) SCROLLING_NODE_ENCODE(ScrollPosition, scrollPosition) SCROLLING_NODE_ENCODE(ScrollOrigin, scrollOrigin) SCROLLING_NODE_ENCODE(FrameScaleFactor, frameScaleFactor) SCROLLING_NODE_ENCODE(NonFastScrollableRegion, nonFastScrollableRegion) SCROLLING_NODE_ENCODE(WheelEventHandlerCount, wheelEventHandlerCount) SCROLLING_NODE_ENCODE(ReasonsForSynchronousScrolling, synchronousScrollingReasons) SCROLLING_NODE_ENCODE(ScrollableAreaParams, scrollableAreaParameters) SCROLLING_NODE_ENCODE_ENUM(BehaviorForFixedElements, scrollBehaviorForFixedElements) SCROLLING_NODE_ENCODE(RequestedScrollPosition, requestedScrollPosition) SCROLLING_NODE_ENCODE(RequestedScrollPosition, requestedScrollPositionRepresentsProgrammaticScroll) SCROLLING_NODE_ENCODE(HeaderHeight, headerHeight) SCROLLING_NODE_ENCODE(FooterHeight, footerHeight) SCROLLING_NODE_ENCODE(TopContentInset, topContentInset) if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()); if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer()); }
ScrollingStateScrollingNode::ScrollingStateScrollingNode(const ScrollingStateScrollingNode& stateNode, ScrollingStateTree& adoptiveTree) : ScrollingStateNode(stateNode, adoptiveTree) #if PLATFORM(MAC) , m_verticalScrollbarPainter(stateNode.verticalScrollbarPainter()) , m_horizontalScrollbarPainter(stateNode.horizontalScrollbarPainter()) #endif , m_viewportSize(stateNode.viewportSize()) , m_totalContentsSize(stateNode.totalContentsSize()) , m_scrollPosition(stateNode.scrollPosition()) , m_scrollOrigin(stateNode.scrollOrigin()) , m_scrollableAreaParameters(stateNode.scrollableAreaParameters()) , m_nonFastScrollableRegion(stateNode.nonFastScrollableRegion()) , m_frameScaleFactor(stateNode.frameScaleFactor()) , m_wheelEventHandlerCount(stateNode.wheelEventHandlerCount()) , m_synchronousScrollingReasons(stateNode.synchronousScrollingReasons()) , m_behaviorForFixed(stateNode.scrollBehaviorForFixedElements()) , m_headerHeight(stateNode.headerHeight()) , m_footerHeight(stateNode.footerHeight()) , m_requestedScrollPosition(stateNode.requestedScrollPosition()) , m_requestedScrollPositionRepresentsProgrammaticScroll(stateNode.requestedScrollPositionRepresentsProgrammaticScroll()) , m_topContentInset(stateNode.topContentInset()) { if (hasChangedProperty(ScrolledContentsLayer)) setScrolledContentsLayer(stateNode.scrolledContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); if (hasChangedProperty(CounterScrollingLayer)) setCounterScrollingLayer(stateNode.counterScrollingLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); if (hasChangedProperty(InsetClipLayer)) setInsetClipLayer(stateNode.insetClipLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); if (hasChangedProperty(ContentShadowLayer)) setContentShadowLayer(stateNode.contentShadowLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); if (hasChangedProperty(HeaderLayer)) setHeaderLayer(stateNode.headerLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); if (hasChangedProperty(FooterLayer)) setFooterLayer(stateNode.footerLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); }
void RemoteScrollingTreeTextStream::dump(const ScrollingStateScrollingNode& node, bool changedPropertiesOnly) { RemoteScrollingTreeTextStream& ts = *this; if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ViewportSize)) dumpProperty(ts, "viewport-size", node.viewportSize()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize)) dumpProperty(ts, "total-contents-size", node.totalContentsSize()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) dumpProperty(ts, "scroll-position", node.scrollPosition()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin)) dumpProperty(ts, "scroll-origin", node.scrollOrigin()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FrameScaleFactor)) dumpProperty(ts, "frame-scale-factor", node.frameScaleFactor()); // FIXME: dump nonFastScrollableRegion // FIXME: dump wheelEventHandlerCount // FIXME: dump synchronousScrollingReasons // FIXME: dump scrollableAreaParameters // FIXME: dump scrollBehaviorForFixedElements if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) { dumpProperty(ts, "requested-scroll-position", node.requestedScrollPosition()); dumpProperty(ts, "requested-scroll-position-is-programatic", node.requestedScrollPositionRepresentsProgrammaticScroll()); } if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight)) dumpProperty(ts, "header-height", node.headerHeight()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterHeight)) dumpProperty(ts, "footer-height", node.footerHeight()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TopContentInset)) dumpProperty(ts, "top-content-inset", node.topContentInset()); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) dumpProperty(ts, "scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer())); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) dumpProperty(ts, "counter-scrolling-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer())); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer)) dumpProperty(ts, "clip-inset-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer())); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer)) dumpProperty(ts, "header-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.headerLayer())); if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterLayer)) dumpProperty(ts, "footer-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.footerLayer())); }