Make WK2 build when ENABLE(ASYNC_SCROLLING) is not defined

https://bugs.webkit.org/show_bug.cgi?id=126675

Reviewed by Tim Horton.

We need a stub RemoteScrollingCoordinatorTransaction outside
the #ifdef so that RemoteLayerTreeDrawingAreaProxy messages
work.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 035fd017
2014-01-08 Simon Fraser <simon.fraser@apple.com>
Make WK2 build when ENABLE(ASYNC_SCROLLING) is not defined
https://bugs.webkit.org/show_bug.cgi?id=126675
Reviewed by Tim Horton.
We need a stub RemoteScrollingCoordinatorTransaction outside
the #ifdef so that RemoteLayerTreeDrawingAreaProxy messages
work.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2014-01-08 Tim Horton <timothy_horton@apple.com>
TileController can fail to receive exposedRect from the drawing area if set at the wrong time
......
......@@ -26,8 +26,6 @@
#include "config.h"
#include "RemoteScrollingCoordinatorTransaction.h"
#if ENABLE(ASYNC_SCROLLING)
#include "ArgumentCoders.h"
#include "MessageDecoder.h"
#include "MessageEncoder.h"
......@@ -41,6 +39,8 @@
using namespace WebCore;
#if ENABLE(ASYNC_SCROLLING)
namespace IPC {
template<> struct ArgumentCoder<ScrollingStateNode> {
......@@ -304,4 +304,19 @@ bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder& decoder
} // namespace WebKit
#else // !ENABLE(ASYNC_SCROLLING)
namespace WebKit {
void RemoteScrollingCoordinatorTransaction::encode(IPC::ArgumentEncoder&) const
{
}
bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder& decoder, RemoteScrollingCoordinatorTransaction& transaction)
{
return true;
}
} // namespace WebKit
#endif // ENABLE(ASYNC_SCROLLING)
......@@ -26,8 +26,6 @@
#ifndef RemoteScrollingCoordinatorTransaction_h
#define RemoteScrollingCoordinatorTransaction_h
#if ENABLE(ASYNC_SCROLLING)
#include <WebCore/ScrollingStateTree.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
......@@ -41,20 +39,23 @@ namespace WebKit {
class RemoteScrollingCoordinatorTransaction {
public:
#if ENABLE(ASYNC_SCROLLING)
void setStateTreeToEncode(PassOwnPtr<WebCore::ScrollingStateTree> stateTree) { m_scrollingStateTree = stateTree; }
OwnPtr<WebCore::ScrollingStateTree>& scrollingStateTree() { return m_scrollingStateTree; }
#endif // ENABLE(ASYNC_SCROLLING)
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, RemoteScrollingCoordinatorTransaction&);
private:
#if ENABLE(ASYNC_SCROLLING)
bool decode(IPC::ArgumentDecoder&);
OwnPtr<WebCore::ScrollingStateTree> m_scrollingStateTree;
#endif // ENABLE(ASYNC_SCROLLING)
};
} // namespace WebKit
#endif // ENABLE(ASYNC_SCROLLING)
#endif // RemoteScrollingCoordinatorTransaction_h
......@@ -86,7 +86,9 @@ void RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry()
void RemoteLayerTreeDrawingAreaProxy::commitLayerTree(const RemoteLayerTreeTransaction& layerTreeTransaction, const RemoteScrollingCoordinatorTransaction& scrollingTreeTransaction)
{
m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction);
#if ENABLE(ASYNC_SCROLLING)
m_webPageProxy->scrollingCoordinatorProxy()->updateScrollingTree(scrollingTreeTransaction);
#endif
}
} // namespace WebKit
......@@ -300,9 +300,11 @@ void RemoteLayerTreeDrawingArea::flushLayers()
m_remoteLayerTreeContext->buildTransaction(layerTransaction, *m_rootLayer);
RemoteScrollingCoordinatorTransaction scrollingTransaction;
#if ENABLE(ASYNC_SCROLLING)
if (m_webPage->scrollingCoordinator())
toRemoteScrollingCoordinator(m_webPage->scrollingCoordinator())->buildTransaction(scrollingTransaction);
#endif
m_webPage->send(Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree(layerTransaction, scrollingTransaction));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment