FlowThreadController.h [plain text]
#ifndef FlowThreadController_h
#define FlowThreadController_h
#include "RenderView.h"
#include <wtf/ListHashSet.h>
#include <wtf/OwnPtr.h>
namespace WebCore {
class RenderFlowThread;
class RenderNamedFlowThread;
typedef ListHashSet<RenderNamedFlowThread*> RenderNamedFlowThreadList;
class FlowThreadController {
public:
static PassOwnPtr<FlowThreadController> create(RenderView*);
~FlowThreadController();
RenderFlowThread* currentRenderFlowThread() const { return m_currentRenderFlowThread; }
void setCurrentRenderFlowThread(RenderFlowThread* flowThread) { m_currentRenderFlowThread = flowThread; }
bool isRenderNamedFlowThreadOrderDirty() const { return m_isRenderNamedFlowThreadOrderDirty; }
void setIsRenderNamedFlowThreadOrderDirty(bool dirty)
{
m_isRenderNamedFlowThreadOrderDirty = dirty;
if (dirty)
m_view->setNeedsLayout(true);
}
RenderNamedFlowThread* ensureRenderFlowThreadWithName(const AtomicString&);
const RenderNamedFlowThreadList* renderNamedFlowThreadList() const { return m_renderNamedFlowThreadList.get(); }
bool hasRenderNamedFlowThreads() const { return m_renderNamedFlowThreadList && !m_renderNamedFlowThreadList->isEmpty(); }
void layoutRenderNamedFlowThreads();
void registerNamedFlowContentNode(Node*, RenderNamedFlowThread*);
void unregisterNamedFlowContentNode(Node*);
protected:
FlowThreadController(RenderView*);
private:
RenderView* m_view;
RenderFlowThread* m_currentRenderFlowThread;
bool m_isRenderNamedFlowThreadOrderDirty;
OwnPtr<RenderNamedFlowThreadList> m_renderNamedFlowThreadList;
HashMap<Node*, RenderNamedFlowThread*> m_mapNamedFlowContentNodes;
};
}
#endif