OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ | 22 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ |
23 #define SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ | 23 #define SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ |
24 | 24 |
25 #include "sky/engine/core/frame/FrameView.h" | 25 #include "sky/engine/core/frame/FrameView.h" |
26 #include "sky/engine/core/rendering/LayoutState.h" | |
27 #include "sky/engine/core/rendering/RenderBlockFlow.h" | 26 #include "sky/engine/core/rendering/RenderBlockFlow.h" |
28 #include "sky/engine/core/rendering/RenderIFrame.h" | 27 #include "sky/engine/core/rendering/RenderIFrame.h" |
29 #include "sky/engine/wtf/OwnPtr.h" | 28 #include "sky/engine/wtf/OwnPtr.h" |
30 | 29 |
31 namespace blink { | 30 namespace blink { |
32 | 31 |
33 // The root of the render tree, corresponding to the CSS initial containing bloc
k. | 32 // The root of the render tree, corresponding to the CSS initial containing bloc
k. |
34 // It's dimensions match that of the logical viewport (which may be different fr
om | 33 // It's dimensions match that of the logical viewport (which may be different fr
om |
35 // the visible viewport in fixed-layout mode), and it is always at position (0,0
) | 34 // the visible viewport in fixed-layout mode), and it is always at position (0,0
) |
36 // relative to the document (and so isn't necessarily in view). | 35 // relative to the document (and so isn't necessarily in view). |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void getSelection(RenderObject*& startRenderer, int& startOffset, RenderObje
ct*& endRenderer, int& endOffset) const; | 74 void getSelection(RenderObject*& startRenderer, int& startOffset, RenderObje
ct*& endRenderer, int& endOffset) const; |
76 void clearSelection(); | 75 void clearSelection(); |
77 RenderObject* selectionStart() const { return m_selectionStart; } | 76 RenderObject* selectionStart() const { return m_selectionStart; } |
78 RenderObject* selectionEnd() const { return m_selectionEnd; } | 77 RenderObject* selectionEnd() const { return m_selectionEnd; } |
79 void selectionStartEnd(int& startPos, int& endPos) const; | 78 void selectionStartEnd(int& startPos, int& endPos) const; |
80 | 79 |
81 virtual void absoluteQuads(Vector<FloatQuad>&) const override; | 80 virtual void absoluteQuads(Vector<FloatQuad>&) const override; |
82 | 81 |
83 virtual LayoutRect viewRect() const override; | 82 virtual LayoutRect viewRect() const override; |
84 | 83 |
85 LayoutState* layoutState() const { return m_layoutState; } | |
86 | |
87 IntRect unscaledDocumentRect() const; | 84 IntRect unscaledDocumentRect() const; |
88 LayoutRect backgroundRect(RenderBox* backgroundRenderer) const; | 85 LayoutRect backgroundRect(RenderBox* backgroundRenderer) const; |
89 | 86 |
90 IntRect documentRect() const; | 87 IntRect documentRect() const; |
91 | 88 |
92 double layoutViewportWidth() const; | 89 double layoutViewportWidth() const; |
93 double layoutViewportHeight() const; | 90 double layoutViewportHeight() const; |
94 | 91 |
95 void pushLayoutState(LayoutState&); | |
96 void popLayoutState(); | |
97 | |
98 void addIFrame(RenderIFrame* iframe); | 92 void addIFrame(RenderIFrame* iframe); |
99 void removeIFrame(RenderIFrame* iframe); | 93 void removeIFrame(RenderIFrame* iframe); |
100 void updateIFramesAfterLayout(); | 94 void updateIFramesAfterLayout(); |
101 | 95 |
102 private: | 96 private: |
103 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const
override; | 97 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const
override; |
104 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const override; | 98 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const override; |
105 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; | 99 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
106 | 100 |
107 void layoutContent(); | |
108 #if ENABLE(ASSERT) | |
109 void checkLayoutState(); | |
110 #endif | |
111 | |
112 void positionDialog(RenderBox*); | 101 void positionDialog(RenderBox*); |
113 void positionDialogs(); | 102 void positionDialogs(); |
114 | 103 |
115 FrameView* m_frameView; | 104 FrameView* m_frameView; |
116 | 105 |
117 RawPtr<RenderObject> m_selectionStart; | 106 RawPtr<RenderObject> m_selectionStart; |
118 RawPtr<RenderObject> m_selectionEnd; | 107 RawPtr<RenderObject> m_selectionEnd; |
119 | 108 |
120 int m_selectionStartPos; | 109 int m_selectionStartPos; |
121 int m_selectionEndPos; | 110 int m_selectionEndPos; |
122 | 111 |
123 LayoutState* m_layoutState; | |
124 | |
125 unsigned m_renderCounterCount; | 112 unsigned m_renderCounterCount; |
126 | 113 |
127 unsigned m_hitTestCount; | 114 unsigned m_hitTestCount; |
128 | 115 |
129 WTF::HashSet<RenderIFrame*> m_iframes; | 116 WTF::HashSet<RenderIFrame*> m_iframes; |
130 }; | 117 }; |
131 | 118 |
132 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); | 119 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView()); |
133 | 120 |
134 } // namespace blink | 121 } // namespace blink |
135 | 122 |
136 #endif // SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ | 123 #endif // SKY_ENGINE_CORE_RENDERING_RENDERVIEW_H_ |
OLD | NEW |