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

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

Issue 2383113003: Refactor ScrollableArea::setScrollPosition. (Closed)
Patch Set: Fix clamping, comment tweaks 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 virtual LayoutUnit scrollTop() const; 546 virtual LayoutUnit scrollTop() const;
547 virtual LayoutUnit scrollWidth() const; 547 virtual LayoutUnit scrollWidth() const;
548 virtual LayoutUnit scrollHeight() const; 548 virtual LayoutUnit scrollHeight() const;
549 int pixelSnappedScrollWidth() const; 549 int pixelSnappedScrollWidth() const;
550 int pixelSnappedScrollHeight() const; 550 int pixelSnappedScrollHeight() const;
551 virtual void setScrollLeft(LayoutUnit); 551 virtual void setScrollLeft(LayoutUnit);
552 virtual void setScrollTop(LayoutUnit); 552 virtual void setScrollTop(LayoutUnit);
553 553
554 void scrollToOffset(const DoubleSize&, 554 void scrollToOffset(const DoubleSize&,
555 ScrollBehavior = ScrollBehaviorInstant); 555 ScrollBehavior = ScrollBehaviorInstant);
556 void scrollByRecursively(const DoubleSize& delta, 556 void scrollByRecursively(const DoubleSize& delta);
557 ScrollOffsetClamping = ScrollOffsetUnclamped);
558 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled 557 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled
559 // if required to make the rect visible. 558 // if required to make the rect visible.
560 void scrollRectToVisible(const LayoutRect&, 559 void scrollRectToVisible(const LayoutRect&,
561 const ScrollAlignment& alignX, 560 const ScrollAlignment& alignX,
562 const ScrollAlignment& alignY, 561 const ScrollAlignment& alignY,
563 ScrollType = ProgrammaticScroll, 562 ScrollType = ProgrammaticScroll,
564 bool makeVisibleInVisualViewport = true); 563 bool makeVisibleInVisualViewport = true);
565 564
566 LayoutRectOutsets marginBoxOutsets() const override { 565 LayoutRectOutsets marginBoxOutsets() const override {
567 return m_marginBoxOutsets; 566 return m_marginBoxOutsets;
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 1580
1582 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { 1581 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) {
1583 return breakValue == BreakColumn || breakValue == BreakLeft || 1582 return breakValue == BreakColumn || breakValue == BreakLeft ||
1584 breakValue == BreakPage || breakValue == BreakRecto || 1583 breakValue == BreakPage || breakValue == BreakRecto ||
1585 breakValue == BreakRight || breakValue == BreakVerso; 1584 breakValue == BreakRight || breakValue == BreakVerso;
1586 } 1585 }
1587 1586
1588 } // namespace blink 1587 } // namespace blink
1589 1588
1590 #endif // LayoutBox_h 1589 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698