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

Unified Diff: Source/core/dom/Element.h

Issue 782793002: Update Element API for CSSOM smooth scrolling to match the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 6 years 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
« no previous file with comments | « Source/bindings/core/v8/custom/V8ElementCustom.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index d2b3a549be1dd74f06887f33c8a5f2d50ed41685..565f3dc91caa4c253be98361665334c07f983cd4 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -60,6 +60,7 @@ class Locale;
class MutableStylePropertySet;
class PropertySetCSSStyleDeclaration;
class PseudoElement;
+class ScrollToOptions;
class ShadowRoot;
class StylePropertySet;
@@ -182,12 +183,17 @@ public:
virtual double scrollLeft();
virtual double scrollTop();
virtual void setScrollLeft(double);
- virtual void setScrollLeft(const Dictionary& scrollOptionsHorizontal, ExceptionState&);
virtual void setScrollTop(double);
- virtual void setScrollTop(const Dictionary& scrollOptionsVertical, ExceptionState&);
virtual int scrollWidth();
virtual int scrollHeight();
+ virtual void scrollBy(double x, double y);
+ virtual void scrollBy(const ScrollToOptions&);
+ virtual void scrollTo(double x, double y);
+ virtual void scrollTo(const ScrollToOptions&);
+ void scroll(double x, double y) { scrollTo(x, y); }
+ void scroll(const ScrollToOptions& scrollToOptions) { scrollTo(scrollToOptions); }
+
IntRect boundsInRootViewSpace();
PassRefPtrWillBeRawPtr<ClientRectList> getClientRects();
@@ -534,6 +540,11 @@ protected:
virtual void parserDidSetAttributes() { };
+ void scrollRenderBoxBy(const ScrollToOptions&);
+ void scrollRenderBoxTo(const ScrollToOptions&);
+ void scrollFrameBy(const ScrollToOptions&);
+ void scrollFrameTo(const ScrollToOptions&);
+
private:
bool hasElementFlag(ElementFlags mask) const { return hasRareData() && hasElementFlagInternal(mask); }
void setElementFlag(ElementFlags, bool value = true);
« no previous file with comments | « Source/bindings/core/v8/custom/V8ElementCustom.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698