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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2911103002: Revert of Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 382ef459a6275fe765498b9483ca7b56de82e192..8cbc40d039bd81f719ec246013fb84d9ce34a8ba 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -662,8 +662,7 @@
const ScrollAlignment& align_x,
const ScrollAlignment& align_y,
ScrollType scroll_type,
- bool make_visible_in_visual_viewport,
- ScrollBehavior scroll_behavior) {
+ bool make_visible_in_visual_viewport) {
DCHECK(scroll_type == kProgrammaticScroll || scroll_type == kUserScroll);
// Presumably the same issue as in setScrollTop. See crbug.com/343132.
DisableCompositingQueryAsserts disabler;
@@ -683,10 +682,6 @@
restricted_by_line_clamp =
!ContainingBlock()->Style()->LineClamp().IsNone();
}
-
- bool is_smooth = scroll_behavior == kScrollBehaviorSmooth ||
- (scroll_behavior == kScrollBehaviorAuto &&
- Style()->GetScrollBehavior() == kScrollBehaviorSmooth);
if (HasOverflowClip() && !restricted_by_line_clamp) {
// Don't scroll to reveal an overflow layer that is restricted by the
@@ -694,8 +689,8 @@
// hidden by the slider in Safari RSS.
// TODO(eae): We probably don't need this any more as we don't share any
// code with the Safari RSS reeder.
- new_rect = GetScrollableArea()->ScrollIntoView(
- rect_to_scroll, align_x, align_y, is_smooth, scroll_type);
+ new_rect = GetScrollableArea()->ScrollIntoView(rect_to_scroll, align_x,
+ align_y, scroll_type);
if (new_rect.IsEmpty())
return;
} else if (!parent_box && CanBeProgramaticallyScrolled()) {
@@ -704,10 +699,10 @@
if (!IsDisallowedAutoscroll(owner_element, frame_view)) {
if (make_visible_in_visual_viewport) {
frame_view->GetScrollableArea()->ScrollIntoView(
- rect_to_scroll, align_x, align_y, is_smooth, scroll_type);
+ rect_to_scroll, align_x, align_y, scroll_type);
} else {
frame_view->LayoutViewportScrollableArea()->ScrollIntoView(
- rect_to_scroll, align_x, align_y, is_smooth, scroll_type);
+ rect_to_scroll, align_x, align_y, scroll_type);
}
if (owner_element && owner_element->GetLayoutObject()) {
if (frame_view->SafeToPropagateScrollToParent()) {
@@ -737,11 +732,9 @@
if (GetFrame()->GetPage()->GetAutoscrollController().AutoscrollInProgress())
parent_box = EnclosingScrollableBox();
- if (parent_box) {
+ if (parent_box)
parent_box->ScrollRectToVisible(new_rect, align_x, align_y, scroll_type,
- make_visible_in_visual_viewport,
- scroll_behavior);
- }
+ make_visible_in_visual_viewport);
}
void LayoutBox::AbsoluteRects(Vector<IntRect>& rects,
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698