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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Fixed nits. Created 3 years, 6 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 585
586 void ScrollToPosition(const FloatPoint&, 586 void ScrollToPosition(const FloatPoint&,
587 ScrollBehavior = kScrollBehaviorInstant); 587 ScrollBehavior = kScrollBehaviorInstant);
588 void ScrollByRecursively(const ScrollOffset& delta); 588 void ScrollByRecursively(const ScrollOffset& delta);
589 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled 589 // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled
590 // if required to make the rect visible. 590 // if required to make the rect visible.
591 void ScrollRectToVisible(const LayoutRect&, 591 void ScrollRectToVisible(const LayoutRect&,
592 const ScrollAlignment& align_x, 592 const ScrollAlignment& align_x,
593 const ScrollAlignment& align_y, 593 const ScrollAlignment& align_y,
594 ScrollType = kProgrammaticScroll, 594 ScrollType = kProgrammaticScroll,
595 bool make_visible_in_visual_viewport = true); 595 bool make_visible_in_visual_viewport = true,
596 ScrollBehavior = kScrollBehaviorAuto);
596 597
597 LayoutRectOutsets MarginBoxOutsets() const override { 598 LayoutRectOutsets MarginBoxOutsets() const override {
598 return margin_box_outsets_; 599 return margin_box_outsets_;
599 } 600 }
600 LayoutUnit MarginTop() const override { return margin_box_outsets_.Top(); } 601 LayoutUnit MarginTop() const override { return margin_box_outsets_.Top(); }
601 LayoutUnit MarginBottom() const override { 602 LayoutUnit MarginBottom() const override {
602 return margin_box_outsets_.Bottom(); 603 return margin_box_outsets_.Bottom();
603 } 604 }
604 LayoutUnit MarginLeft() const override { return margin_box_outsets_.Left(); } 605 LayoutUnit MarginLeft() const override { return margin_box_outsets_.Left(); }
605 LayoutUnit MarginRight() const override { 606 LayoutUnit MarginRight() const override {
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 break_value == EBreakBetween::kLeft || 1746 break_value == EBreakBetween::kLeft ||
1746 break_value == EBreakBetween::kPage || 1747 break_value == EBreakBetween::kPage ||
1747 break_value == EBreakBetween::kRecto || 1748 break_value == EBreakBetween::kRecto ||
1748 break_value == EBreakBetween::kRight || 1749 break_value == EBreakBetween::kRight ||
1749 break_value == EBreakBetween::kVerso; 1750 break_value == EBreakBetween::kVerso;
1750 } 1751 }
1751 1752
1752 } // namespace blink 1753 } // namespace blink
1753 1754
1754 #endif // LayoutBox_h 1755 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698