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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutListBox.cpp

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Change the default setting. 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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * 2009 Torch Mobile Inc. All rights reserved. 3 * 2009 Torch Mobile Inc. All rights reserved.
4 * (http://www.torchmobile.com/) 4 * (http://www.torchmobile.com/)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (Style()->Width().IsPercentOrCalc()) 126 if (Style()->Width().IsPercentOrCalc())
127 min_logical_width = LayoutUnit(); 127 min_logical_width = LayoutUnit();
128 } 128 }
129 129
130 void LayoutListBox::ScrollToRect(const LayoutRect& rect) { 130 void LayoutListBox::ScrollToRect(const LayoutRect& rect) {
131 if (HasOverflowClip()) { 131 if (HasOverflowClip()) {
132 DCHECK(Layer()); 132 DCHECK(Layer());
133 DCHECK(Layer()->GetScrollableArea()); 133 DCHECK(Layer()->GetScrollableArea());
134 Layer()->GetScrollableArea()->ScrollIntoView( 134 Layer()->GetScrollableArea()->ScrollIntoView(
135 rect, ScrollAlignment::kAlignToEdgeIfNeeded, 135 rect, ScrollAlignment::kAlignToEdgeIfNeeded,
136 ScrollAlignment::kAlignToEdgeIfNeeded); 136 ScrollAlignment::kAlignToEdgeIfNeeded, false);
137 } 137 }
138 } 138 }
139 139
140 } // namespace blink 140 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698