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

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

Issue 610423004: Preserve fractional scroll offset for JS scrolling API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 6 years, 2 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
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 *
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // scrolling). 269 // scrolling).
270 virtual LayoutUnit scrollLeft() const; 270 virtual LayoutUnit scrollLeft() const;
271 virtual LayoutUnit scrollTop() const; 271 virtual LayoutUnit scrollTop() const;
272 virtual LayoutUnit scrollWidth() const; 272 virtual LayoutUnit scrollWidth() const;
273 virtual LayoutUnit scrollHeight() const; 273 virtual LayoutUnit scrollHeight() const;
274 int pixelSnappedScrollWidth() const; 274 int pixelSnappedScrollWidth() const;
275 int pixelSnappedScrollHeight() const; 275 int pixelSnappedScrollHeight() const;
276 virtual void setScrollLeft(LayoutUnit); 276 virtual void setScrollLeft(LayoutUnit);
277 virtual void setScrollTop(LayoutUnit); 277 virtual void setScrollTop(LayoutUnit);
278 278
279 void scrollToOffset(const IntSize&); 279 void scrollToOffset(const DoubleSize&);
280 void scrollByRecursively(const IntSize& delta, ScrollOffsetClamping = Scroll OffsetUnclamped); 280 void scrollByRecursively(const DoubleSize& delta, ScrollOffsetClamping = Scr ollOffsetUnclamped);
281 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c onst ScrollAlignment& alignY); 281 void scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX, c onst ScrollAlignment& alignY);
282 282
283 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); } 283 virtual LayoutUnit marginTop() const OVERRIDE { return m_marginBox.top(); }
284 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom (); } 284 virtual LayoutUnit marginBottom() const OVERRIDE { return m_marginBox.bottom (); }
285 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left(); } 285 virtual LayoutUnit marginLeft() const OVERRIDE { return m_marginBox.left(); }
286 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right() ; } 286 virtual LayoutUnit marginRight() const OVERRIDE { return m_marginBox.right() ; }
287 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); } 287 void setMarginTop(LayoutUnit margin) { m_marginBox.setTop(margin); }
288 void setMarginBottom(LayoutUnit margin) { m_marginBox.setBottom(margin); } 288 void setMarginBottom(LayoutUnit margin) { m_marginBox.setBottom(margin); }
289 void setMarginLeft(LayoutUnit margin) { m_marginBox.setLeft(margin); } 289 void setMarginLeft(LayoutUnit margin) { m_marginBox.setLeft(margin); }
290 void setMarginRight(LayoutUnit margin) { m_marginBox.setRight(margin); } 290 void setMarginRight(LayoutUnit margin) { m_marginBox.setRight(margin); }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 if (UNLIKELY(inlineBoxWrapper() != 0)) 781 if (UNLIKELY(inlineBoxWrapper() != 0))
782 deleteLineBoxWrapper(); 782 deleteLineBoxWrapper();
783 } 783 }
784 784
785 ensureRareData().m_inlineBoxWrapper = boxWrapper; 785 ensureRareData().m_inlineBoxWrapper = boxWrapper;
786 } 786 }
787 787
788 } // namespace blink 788 } // namespace blink
789 789
790 #endif // RenderBox_h 790 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698