Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 struct PaintInfo; 34 struct PaintInfo;
34 35
35 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; 36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
36 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding }; 37 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding };
37 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize }; 38 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize };
38 enum MarginDirection { BlockDirection, InlineDirection }; 39 enum MarginDirection { BlockDirection, InlineDirection };
39 40
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // object has overflow:hidden/scroll/auto specified and also has overflow. 270 // object has overflow:hidden/scroll/auto specified and also has overflow.
270 // scrollLeft/Top return the current scroll position. These methods are vir tual so that objects like 271 // scrollLeft/Top return the current scroll position. These methods are vir tual so that objects like
271 // textareas can scroll shadow content (but pretend that they are the object s that are 272 // textareas can scroll shadow content (but pretend that they are the object s that are
272 // scrolling). 273 // scrolling).
273 virtual LayoutUnit scrollLeft() const; 274 virtual LayoutUnit scrollLeft() const;
274 virtual LayoutUnit scrollTop() const; 275 virtual LayoutUnit scrollTop() const;
275 virtual LayoutUnit scrollWidth() const; 276 virtual LayoutUnit scrollWidth() const;
276 virtual LayoutUnit scrollHeight() const; 277 virtual LayoutUnit scrollHeight() const;
277 int pixelSnappedScrollWidth() const; 278 int pixelSnappedScrollWidth() const;
278 int pixelSnappedScrollHeight() const; 279 int pixelSnappedScrollHeight() const;
279 virtual void setScrollLeft(LayoutUnit); 280 virtual void setScrollLeft(LayoutUnit, ScrollBehavior);
280 virtual void setScrollTop(LayoutUnit); 281 virtual void setScrollTop(LayoutUnit, ScrollBehavior);
281 282
282 void scrollToOffset(const IntSize&); 283 void scrollToOffset(const IntSize&);
283 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll OffsetUnclamped); 284 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll OffsetUnclamped);
284 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c onst ScrollAlignment& alignY); 285 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c onst ScrollAlignment& alignY);
285 286
286 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); } 287 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); }
287 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom (); } 288 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom (); }
288 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left(); } 289 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left(); }
289 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right() ; } 290 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right() ; }
290 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } 291 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); }
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 if (UNLIKELY(inlineBoxWrapper() != 0)) 781 if (UNLIKELY(inlineBoxWrapper() != 0))
781 deleteLineBoxWrapper(); 782 deleteLineBoxWrapper();
782 } 783 }
783 784
784 ensureRareData().m_inlineBoxWrapper = boxWrapper; 785 ensureRareData().m_inlineBoxWrapper = boxWrapper;
785 } 786 }
786 787
787 } // namespace WebCore 788 } // namespace WebCore
788 789
789 #endif // RenderBox_h 790 #endif // RenderBox_h
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698