OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef RenderBox_h | 23 #ifndef RenderBox_h |
24 #define RenderBox_h | 24 #define RenderBox_h |
25 | 25 |
26 #include "core/rendering/RenderBoxModelObject.h" | 26 #include "core/rendering/RenderBoxModelObject.h" |
27 #include "core/rendering/RenderOverflow.h" | 27 #include "core/rendering/RenderOverflow.h" |
28 #include "core/rendering/shapes/ShapeOutsideInfo.h" | 28 #include "core/rendering/shapes/ShapeOutsideInfo.h" |
29 #include "platform/scroll/ScrollTypes.h" | 29 #include "platform/scroll/ScrollTypes.h" |
| 30 #include "platform/scroll/ScrollableArea.h" |
30 | 31 |
31 namespace WebCore { | 32 namespace WebCore { |
32 | 33 |
33 class RenderBoxRegionInfo; | 34 class RenderBoxRegionInfo; |
34 class RenderRegion; | 35 class RenderRegion; |
35 struct PaintInfo; | 36 struct PaintInfo; |
36 | 37 |
37 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 38 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
38 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; | 39 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; |
39 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS
crollbarSize }; | 40 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS
crollbarSize }; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 251 |
251 // scrollWidth/scrollHeight will be the same as clientWidth/clientHeight unl
ess the | 252 // scrollWidth/scrollHeight will be the same as clientWidth/clientHeight unl
ess the |
252 // object has overflow:hidden/scroll/auto specified and also has overflow. | 253 // object has overflow:hidden/scroll/auto specified and also has overflow. |
253 // scrollLeft/Top return the current scroll position. These methods are vir
tual so that objects like | 254 // scrollLeft/Top return the current scroll position. These methods are vir
tual so that objects like |
254 // textareas can scroll shadow content (but pretend that they are the object
s that are | 255 // textareas can scroll shadow content (but pretend that they are the object
s that are |
255 // scrolling). | 256 // scrolling). |
256 virtual int scrollLeft() const; | 257 virtual int scrollLeft() const; |
257 virtual int scrollTop() const; | 258 virtual int scrollTop() const; |
258 virtual int scrollWidth() const; | 259 virtual int scrollWidth() const; |
259 virtual int scrollHeight() const; | 260 virtual int scrollHeight() const; |
260 virtual void setScrollLeft(int); | 261 virtual void setScrollLeft(int, ScrollBehavior); |
261 virtual void setScrollTop(int); | 262 virtual void setScrollTop(int, ScrollBehavior); |
262 | 263 |
263 void scrollToOffset(const IntSize&); | 264 void scrollToOffset(const IntSize&); |
264 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll
OffsetUnclamped); | 265 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll
OffsetUnclamped); |
265 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); | 266 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c
onst ScrollAlignment& alignY); |
266 | 267 |
267 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); } | 268 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); } |
268 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom
(); } | 269 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom
(); } |
269 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left();
} | 270 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left();
} |
270 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right()
; } | 271 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right()
; } |
271 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } | 272 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 if (UNLIKELY(m_inlineBoxWrapper != 0)) | 758 if (UNLIKELY(m_inlineBoxWrapper != 0)) |
758 deleteLineBoxWrapper(); | 759 deleteLineBoxWrapper(); |
759 } | 760 } |
760 | 761 |
761 m_inlineBoxWrapper = boxWrapper; | 762 m_inlineBoxWrapper = boxWrapper; |
762 } | 763 } |
763 | 764 |
764 } // namespace WebCore | 765 } // namespace WebCore |
765 | 766 |
766 #endif // RenderBox_h | 767 #endif // RenderBox_h |
OLD | NEW |