OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
4 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 private: | 51 private: |
52 Vector<bool> m_preventResize; | 52 Vector<bool> m_preventResize; |
53 Vector<bool> m_allowBorder; | 53 Vector<bool> m_allowBorder; |
54 }; | 54 }; |
55 | 55 |
56 class RenderFrameSet final : public RenderBox { | 56 class RenderFrameSet final : public RenderBox { |
57 public: | 57 public: |
58 RenderFrameSet(HTMLFrameSetElement*); | 58 RenderFrameSet(HTMLFrameSetElement*); |
59 virtual ~RenderFrameSet(); | 59 virtual ~RenderFrameSet(); |
60 | 60 |
61 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | 61 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } |
62 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } | 62 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } |
63 | 63 |
64 // If you have a RenderFrameSet, use firstChild or lastChild instead. | 64 // If you have a RenderFrameSet, use firstChild or lastChild instead. |
65 void slowFirstChild() const = delete; | 65 void slowFirstChild() const = delete; |
66 void slowLastChild() const = delete; | 66 void slowLastChild() const = delete; |
67 | 67 |
68 const RenderObjectChildList* children() const { return &m_children; } | 68 const LayoutObjectChildList* children() const { return &m_children; } |
69 RenderObjectChildList* children() { return &m_children; } | 69 LayoutObjectChildList* children() { return &m_children; } |
70 | 70 |
71 FrameEdgeInfo edgeInfo() const; | 71 FrameEdgeInfo edgeInfo() const; |
72 | 72 |
73 bool userResize(MouseEvent*); | 73 bool userResize(MouseEvent*); |
74 | 74 |
75 bool canResizeRow(const IntPoint&) const; | 75 bool canResizeRow(const IntPoint&) const; |
76 bool canResizeColumn(const IntPoint&) const; | 76 bool canResizeColumn(const IntPoint&) const; |
77 | 77 |
78 void notifyFrameEdgeInfoChanged(); | 78 void notifyFrameEdgeInfoChanged(); |
79 HTMLFrameSetElement* frameSet() const; | 79 HTMLFrameSetElement* frameSet() const; |
(...skipping 11 matching lines...) Expand all Loading... |
91 int m_splitBeingResized; | 91 int m_splitBeingResized; |
92 int m_splitResizeOffset; | 92 int m_splitResizeOffset; |
93 }; | 93 }; |
94 | 94 |
95 const GridAxis& rows() { return m_rows; } | 95 const GridAxis& rows() { return m_rows; } |
96 const GridAxis& columns() { return m_cols; } | 96 const GridAxis& columns() { return m_cols; } |
97 | 97 |
98 private: | 98 private: |
99 static const int noSplit = -1; | 99 static const int noSplit = -1; |
100 | 100 |
101 virtual RenderObjectChildList* virtualChildren() override { return children(
); } | 101 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } |
102 virtual const RenderObjectChildList* virtualChildren() const override { retu
rn children(); } | 102 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } |
103 | 103 |
104 virtual const char* renderName() const override { return "RenderFrameSet"; } | 104 virtual const char* renderName() const override { return "RenderFrameSet"; } |
105 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectFrameSet || RenderBox::isOfType(type); } | 105 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectFrameSet || RenderBox::isOfType(type); } |
106 | 106 |
107 virtual void layout() override; | 107 virtual void layout() override; |
108 virtual void paint(const PaintInfo&, const LayoutPoint&) override; | 108 virtual void paint(const PaintInfo&, const LayoutPoint&) override; |
109 virtual void computePreferredLogicalWidths() override; | 109 virtual void computePreferredLogicalWidths() override; |
110 virtual bool isChildAllowed(RenderObject*, const RenderStyle&) const overrid
e; | 110 virtual bool isChildAllowed(LayoutObject*, const RenderStyle&) const overrid
e; |
111 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const overrid
e; | 111 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const overrid
e; |
112 | 112 |
113 void setIsResizing(bool); | 113 void setIsResizing(bool); |
114 | 114 |
115 void layOutAxis(GridAxis&, const Vector<HTMLDimension>&, int availableSpace)
; | 115 void layOutAxis(GridAxis&, const Vector<HTMLDimension>&, int availableSpace)
; |
116 void computeEdgeInfo(); | 116 void computeEdgeInfo(); |
117 void fillFromEdgeInfo(const FrameEdgeInfo& edgeInfo, int r, int c); | 117 void fillFromEdgeInfo(const FrameEdgeInfo& edgeInfo, int r, int c); |
118 void positionFrames(); | 118 void positionFrames(); |
119 | 119 |
120 int splitPosition(const GridAxis&, int split) const; | 120 int splitPosition(const GridAxis&, int split) const; |
121 int hitTestSplit(const GridAxis&, int position) const; | 121 int hitTestSplit(const GridAxis&, int position) const; |
122 | 122 |
123 void startResizing(GridAxis&, int position); | 123 void startResizing(GridAxis&, int position); |
124 void continueResizing(GridAxis&, int position); | 124 void continueResizing(GridAxis&, int position); |
125 | 125 |
126 RenderObjectChildList m_children; | 126 LayoutObjectChildList m_children; |
127 | 127 |
128 GridAxis m_rows; | 128 GridAxis m_rows; |
129 GridAxis m_cols; | 129 GridAxis m_cols; |
130 | 130 |
131 bool m_isResizing; | 131 bool m_isResizing; |
132 bool m_isChildResizing; | 132 bool m_isChildResizing; |
133 }; | 133 }; |
134 | 134 |
135 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFrameSet, isFrameSet()); | 135 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderFrameSet, isFrameSet()); |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
138 | 138 |
139 #endif // RenderFrameSet_h | 139 #endif // RenderFrameSet_h |
OLD | NEW |