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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // scrolling). 540 // scrolling).
541 virtual LayoutUnit scrollLeft() const; 541 virtual LayoutUnit scrollLeft() const;
542 virtual LayoutUnit scrollTop() const; 542 virtual LayoutUnit scrollTop() const;
543 virtual LayoutUnit scrollWidth() const; 543 virtual LayoutUnit scrollWidth() const;
544 virtual LayoutUnit scrollHeight() const; 544 virtual LayoutUnit scrollHeight() const;
545 int pixelSnappedScrollWidth() const; 545 int pixelSnappedScrollWidth() const;
546 int pixelSnappedScrollHeight() const; 546 int pixelSnappedScrollHeight() const;
547 virtual void setScrollLeft(LayoutUnit); 547 virtual void setScrollLeft(LayoutUnit);
548 virtual void setScrollTop(LayoutUnit); 548 virtual void setScrollTop(LayoutUnit);
549 549
550 void scrollToOffset(const DoubleSize&, 550 void scrollToPosition(const FloatPoint&,
bokan 2016/10/02 19:47:51 Why FloatPoint instead of ScrollOffset?
szager1 2016/10/05 07:43:36 The convention I'm using is: 'position' is a poin
bokan 2016/10/06 22:32:17 Acknowledged.
551 ScrollBehavior = ScrollBehaviorInstant); 551 ScrollBehavior = ScrollBehaviorInstant);
552 void scrollByRecursively(const DoubleSize& delta); 552 void scrollByRecursively(const ScrollOffset& delta);
553 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled 553 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled
554 // if required to make the rect visible. 554 // if required to make the rect visible.
555 void scrollRectToVisible(const LayoutRect&, 555 void scrollRectToVisible(const LayoutRect&,
556 const ScrollAlignment& alignX, 556 const ScrollAlignment& alignX,
557 const ScrollAlignment& alignY, 557 const ScrollAlignment& alignY,
558 ScrollType = ProgrammaticScroll, 558 ScrollType = ProgrammaticScroll,
559 bool makeVisibleInVisualViewport = true); 559 bool makeVisibleInVisualViewport = true);
560 560
561 LayoutRectOutsets marginBoxOutsets() const override { 561 LayoutRectOutsets marginBoxOutsets() const override {
562 return m_marginBoxOutsets; 562 return m_marginBoxOutsets;
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 1576
1577 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { 1577 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) {
1578 return breakValue == BreakColumn || breakValue == BreakLeft || 1578 return breakValue == BreakColumn || breakValue == BreakLeft ||
1579 breakValue == BreakPage || breakValue == BreakRecto || 1579 breakValue == BreakPage || breakValue == BreakRecto ||
1580 breakValue == BreakRight || breakValue == BreakVerso; 1580 breakValue == BreakRight || breakValue == BreakVerso;
1581 } 1581 }
1582 1582
1583 } // namespace blink 1583 } // namespace blink
1584 1584
1585 #endif // LayoutBox_h 1585 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698