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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Revised according to the comments. We are still missing tests. Created 3 years, 10 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/ScrollAlignment.cpp
diff --git a/third_party/WebKit/Source/core/layout/ScrollAlignment.cpp b/third_party/WebKit/Source/core/layout/ScrollAlignment.cpp
index 1f162fb1f3e2c68d94db4a215a19cd7e25b52f89..c97847e736b1e68483390f5625bf3b5de40a8ab4 100644
--- a/third_party/WebKit/Source/core/layout/ScrollAlignment.cpp
+++ b/third_party/WebKit/Source/core/layout/ScrollAlignment.cpp
@@ -54,10 +54,17 @@ const ScrollAlignment ScrollAlignment::alignToEdgeIfNeeded = {
ScrollAlignmentClosestEdge};
const ScrollAlignment ScrollAlignment::alignCenterAlways = {
ScrollAlignmentCenter, ScrollAlignmentCenter, ScrollAlignmentCenter};
+const ScrollAlignment ScrollAlignment::alignClosestEdgeAlways = {
+ ScrollAlignmentClosestEdge, ScrollAlignmentClosestEdge,
+ ScrollAlignmentClosestEdge};
const ScrollAlignment ScrollAlignment::alignTopAlways = {
ScrollAlignmentTop, ScrollAlignmentTop, ScrollAlignmentTop};
const ScrollAlignment ScrollAlignment::alignBottomAlways = {
ScrollAlignmentBottom, ScrollAlignmentBottom, ScrollAlignmentBottom};
+const ScrollAlignment ScrollAlignment::alignLeftAlways = {
+ ScrollAlignmentLeft, ScrollAlignmentLeft, ScrollAlignmentLeft};
+const ScrollAlignment ScrollAlignment::alignRightAlways = {
+ ScrollAlignmentRight, ScrollAlignmentRight, ScrollAlignmentRight};
#define MIN_INTERSECT_FOR_REVEAL 32

Powered by Google App Engine
This is Rietveld 408576698