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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.h

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Rebase Created 3 years, 8 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 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class Image; 58 class Image;
59 class InputDeviceCapabilities; 59 class InputDeviceCapabilities;
60 class Locale; 60 class Locale;
61 class MutableStylePropertySet; 61 class MutableStylePropertySet;
62 class NamedNodeMap; 62 class NamedNodeMap;
63 class ElementIntersectionObserverData; 63 class ElementIntersectionObserverData;
64 class PseudoElement; 64 class PseudoElement;
65 class PseudoStyleRequest; 65 class PseudoStyleRequest;
66 class ResizeObservation; 66 class ResizeObservation;
67 class ResizeObserver; 67 class ResizeObserver;
68 class ScrollIntoViewOptions;
69 class ScrollIntoViewOptionsOrBoolean;
68 class ScrollState; 70 class ScrollState;
69 class ScrollStateCallback; 71 class ScrollStateCallback;
70 class ScrollToOptions; 72 class ScrollToOptions;
71 class ShadowRoot; 73 class ShadowRoot;
72 class ShadowRootInit; 74 class ShadowRootInit;
73 class StylePropertySet; 75 class StylePropertySet;
74 class StylePropertyMap; 76 class StylePropertyMap;
75 class V0CustomElementDefinition; 77 class V0CustomElementDefinition;
76 78
77 enum SpellcheckAttributeState { 79 enum SpellcheckAttributeState {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // This getter takes care of synchronizing all attributes before returning the 212 // This getter takes care of synchronizing all attributes before returning the
211 // AttributeCollection. If the Element has no attributes, an empty 213 // AttributeCollection. If the Element has no attributes, an empty
212 // AttributeCollection will be returned. This is not a trivial getter and its 214 // AttributeCollection will be returned. This is not a trivial getter and its
213 // return value should be cached for performance. 215 // return value should be cached for performance.
214 AttributeCollection attributes() const; 216 AttributeCollection attributes() const;
215 // This variant will not update the potentially invalid attributes. To be used 217 // This variant will not update the potentially invalid attributes. To be used
216 // when not interested in style attribute or one of the SVG animation 218 // when not interested in style attribute or one of the SVG animation
217 // attributes. 219 // attributes.
218 AttributeCollection attributesWithoutUpdate() const; 220 AttributeCollection attributesWithoutUpdate() const;
219 221
222 void scrollIntoView(ScrollIntoViewOptionsOrBoolean);
220 void scrollIntoView(bool alignToTop = true); 223 void scrollIntoView(bool alignToTop = true);
224 void scrollIntoViewWithOptions(const ScrollIntoViewOptions&);
221 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); 225 void scrollIntoViewIfNeeded(bool centerIfNeeded = true);
222 226
223 int offsetLeft(); 227 int offsetLeft();
224 int offsetTop(); 228 int offsetTop();
225 int offsetWidth(); 229 int offsetWidth();
226 int offsetHeight(); 230 int offsetHeight();
227 231
228 Element* offsetParent(); 232 Element* offsetParent();
229 int clientLeft(); 233 int clientLeft();
230 int clientTop(); 234 int clientTop();
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1230 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1227 static T* create(const QualifiedName&, Document&) 1231 static T* create(const QualifiedName&, Document&)
1228 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1232 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1229 T* T::create(const QualifiedName& tagName, Document& document) { \ 1233 T* T::create(const QualifiedName& tagName, Document& document) { \
1230 return new T(tagName, document); \ 1234 return new T(tagName, document); \
1231 } 1235 }
1232 1236
1233 } // namespace blink 1237 } // namespace blink
1234 1238
1235 #endif // Element_h 1239 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698