summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderView.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebCore/rendering/RenderView.h
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebCore/rendering/RenderView.h')
-rw-r--r--Source/WebCore/rendering/RenderView.h70
1 files changed, 33 insertions, 37 deletions
diff --git a/Source/WebCore/rendering/RenderView.h b/Source/WebCore/rendering/RenderView.h
index 66000942e..1371e136e 100644
--- a/Source/WebCore/rendering/RenderView.h
+++ b/Source/WebCore/rendering/RenderView.h
@@ -26,37 +26,38 @@
#include "LayoutState.h"
#include "PODFreeListArena.h"
#include "RenderBlock.h"
-#include <wtf/ListHashSet.h>
#include <wtf/OwnPtr.h>
namespace WebCore {
-class RenderFlowThread;
+class FlowThreadController;
class RenderWidget;
#if USE(ACCELERATED_COMPOSITING)
class RenderLayerCompositor;
#endif
-typedef ListHashSet<RenderFlowThread*> RenderFlowThreadList;
-
class RenderView : public RenderBlock {
public:
RenderView(Node*, FrameView*);
virtual ~RenderView();
- virtual const char* renderName() const { return "RenderView"; }
+ bool hitTest(const HitTestRequest&, HitTestResult&);
+
+ virtual const char* renderName() const OVERRIDE { return "RenderView"; }
- virtual bool isRenderView() const { return true; }
+ virtual bool isRenderView() const OVERRIDE { return true; }
- virtual bool requiresLayer() const { return true; }
+ virtual bool requiresLayer() const OVERRIDE { return true; }
- virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
+ virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
- virtual void layout();
- virtual void computeLogicalWidth();
- virtual void computeLogicalHeight();
- virtual void computePreferredLogicalWidths();
+ virtual void layout() OVERRIDE;
+ virtual void computeLogicalWidth() OVERRIDE;
+ virtual void computeLogicalHeight() OVERRIDE;
+ // FIXME: This override is not needed and should be removed
+ // it only exists to make computePreferredLogicalWidths public.
+ virtual void computePreferredLogicalWidths() OVERRIDE;
// The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
int viewHeight() const;
@@ -68,14 +69,14 @@ public:
FrameView* frameView() const { return m_frameView; }
- virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false) const;
- virtual void repaintViewRectangle(const IntRect&, bool immediate = false);
+ virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
+ virtual void repaintViewRectangle(const LayoutRect&, bool immediate = false);
// Repaint the view, and all composited layers that intersect the given absolute rectangle.
// FIXME: ideally we'd never have to do this, if all repaints are container-relative.
- virtual void repaintRectangleInViewAndCompositedLayers(const IntRect&, bool immediate = false);
+ virtual void repaintRectangleInViewAndCompositedLayers(const LayoutRect&, bool immediate = false);
virtual void paint(PaintInfo&, const LayoutPoint&);
- virtual void paintBoxDecorations(PaintInfo&, const IntPoint&);
+ virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE;
enum SelectionRepaintMode { RepaintNewXOROld, RepaintNewMinusOld, RepaintNothing };
void setSelection(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionRepaintMode = RepaintNewXOROld);
@@ -98,7 +99,7 @@ public:
#endif
int maximalOutlineSize() const { return m_maximalOutlineSize; }
- virtual IntRect viewRect() const;
+ virtual LayoutRect viewRect() const OVERRIDE;
void updateWidgetPositions();
void addWidget(RenderWidget*);
@@ -172,27 +173,21 @@ public:
IntRect documentRect() const;
- RenderFlowThread* ensureRenderFlowThreadWithName(const AtomicString& flowThread);
- bool hasRenderFlowThreads() const { return m_renderFlowThreadList && !m_renderFlowThreadList->isEmpty(); }
- void layoutRenderFlowThreads();
- bool isRenderFlowThreadOrderDirty() const { return m_isRenderFlowThreadOrderDirty; }
- void setIsRenderFlowThreadOrderDirty(bool dirty)
- {
- m_isRenderFlowThreadOrderDirty = dirty;
- if (dirty)
- setNeedsLayout(true);
- }
- const RenderFlowThreadList* renderFlowThreadList() const { return m_renderFlowThreadList.get(); }
-
- RenderFlowThread* currentRenderFlowThread() const { return m_currentRenderFlowThread; }
- void setCurrentRenderFlowThread(RenderFlowThread* flowThread) { m_currentRenderFlowThread = flowThread; }
+ bool hasRenderNamedFlowThreads() const;
+ FlowThreadController* flowThreadController();
void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
IntervalArena* intervalArena();
+ IntSize viewportSize() const { return document()->viewportSize(); }
+
+ void setFixedPositionedObjectsNeedLayout();
+ void insertFixedPositionedObject(RenderBox*);
+ void removeFixedPositionedObject(RenderBox*);
+
protected:
- virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+ virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE;
@@ -200,7 +195,7 @@ private:
virtual void calcColumnWidth() OVERRIDE;
virtual ColumnInfo::PaginationUnit paginationUnit() const OVERRIDE;
- bool shouldRepaint(const IntRect& r) const;
+ bool shouldRepaint(const LayoutRect&) const;
// These functions may only be accessed by LayoutStateMaintainer.
void pushLayoutState(RenderFlowThread*, bool regionsChanged);
@@ -266,18 +261,19 @@ protected:
typedef HashSet<RenderWidget*> RenderWidgetSet;
RenderWidgetSet m_widgets;
-
+
+ typedef HashSet<RenderBox*> RenderBoxSet;
+ OwnPtr<RenderBoxSet> m_fixedPositionedElements;
+
private:
unsigned m_pageLogicalHeight;
bool m_pageLogicalHeightChanged;
- bool m_isRenderFlowThreadOrderDirty;
LayoutState* m_layoutState;
unsigned m_layoutStateDisableCount;
#if USE(ACCELERATED_COMPOSITING)
OwnPtr<RenderLayerCompositor> m_compositor;
#endif
- OwnPtr<RenderFlowThreadList> m_renderFlowThreadList;
- RenderFlowThread* m_currentRenderFlowThread;
+ OwnPtr<FlowThreadController> m_flowThreadController;
RefPtr<IntervalArena> m_intervalArena;
};