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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/custom/V8ElementCustom.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class ElementRareData; 53 class ElementRareData;
54 class ElementShadow; 54 class ElementShadow;
55 class ExceptionState; 55 class ExceptionState;
56 class Image; 56 class Image;
57 class InputMethodContext; 57 class InputMethodContext;
58 class IntSize; 58 class IntSize;
59 class Locale; 59 class Locale;
60 class MutableStylePropertySet; 60 class MutableStylePropertySet;
61 class PropertySetCSSStyleDeclaration; 61 class PropertySetCSSStyleDeclaration;
62 class PseudoElement; 62 class PseudoElement;
63 class ScrollToOptions;
63 class ShadowRoot; 64 class ShadowRoot;
64 class StylePropertySet; 65 class StylePropertySet;
65 66
66 enum SpellcheckAttributeState { 67 enum SpellcheckAttributeState {
67 SpellcheckAttributeTrue, 68 SpellcheckAttributeTrue,
68 SpellcheckAttributeFalse, 69 SpellcheckAttributeFalse,
69 SpellcheckAttributeDefault 70 SpellcheckAttributeDefault
70 }; 71 };
71 72
72 enum ElementFlags { 73 enum ElementFlags {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 Element* offsetParentForBindings(); 176 Element* offsetParentForBindings();
176 177
177 Element* offsetParent(); 178 Element* offsetParent();
178 int clientLeft(); 179 int clientLeft();
179 int clientTop(); 180 int clientTop();
180 int clientWidth(); 181 int clientWidth();
181 int clientHeight(); 182 int clientHeight();
182 virtual double scrollLeft(); 183 virtual double scrollLeft();
183 virtual double scrollTop(); 184 virtual double scrollTop();
184 virtual void setScrollLeft(double); 185 virtual void setScrollLeft(double);
185 virtual void setScrollLeft(const Dictionary& scrollOptionsHorizontal, Except ionState&);
186 virtual void setScrollTop(double); 186 virtual void setScrollTop(double);
187 virtual void setScrollTop(const Dictionary& scrollOptionsVertical, Exception State&);
188 virtual int scrollWidth(); 187 virtual int scrollWidth();
189 virtual int scrollHeight(); 188 virtual int scrollHeight();
190 189
190 virtual void scrollBy(double x, double y);
191 virtual void scrollBy(const ScrollToOptions&);
192 virtual void scrollTo(double x, double y);
193 virtual void scrollTo(const ScrollToOptions&);
194 void scroll(double x, double y) { scrollTo(x, y); }
195 void scroll(const ScrollToOptions& scrollToOptions) { scrollTo(scrollToOptio ns); }
196
191 IntRect boundsInRootViewSpace(); 197 IntRect boundsInRootViewSpace();
192 198
193 PassRefPtrWillBeRawPtr<ClientRectList> getClientRects(); 199 PassRefPtrWillBeRawPtr<ClientRectList> getClientRects();
194 PassRefPtrWillBeRawPtr<ClientRect> getBoundingClientRect(); 200 PassRefPtrWillBeRawPtr<ClientRect> getBoundingClientRect();
195 201
196 // Returns the absolute bounding box translated into screen coordinates: 202 // Returns the absolute bounding box translated into screen coordinates:
197 IntRect screenRect() const; 203 IntRect screenRect() const;
198 204
199 virtual void didMoveToNewDocument(Document&) override; 205 virtual void didMoveToNewDocument(Document&) override;
200 206
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // parseAttribute (called via setAttribute()) and 533 // parseAttribute (called via setAttribute()) and
528 // svgAttributeChanged (called when element.className.baseValue is set) 534 // svgAttributeChanged (called when element.className.baseValue is set)
529 void classAttributeChanged(const AtomicString& newClassString); 535 void classAttributeChanged(const AtomicString& newClassString);
530 536
531 PassRefPtr<RenderStyle> originalStyleForRenderer(); 537 PassRefPtr<RenderStyle> originalStyleForRenderer();
532 538
533 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); 539 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&);
534 540
535 virtual void parserDidSetAttributes() { }; 541 virtual void parserDidSetAttributes() { };
536 542
543 void scrollRenderBoxBy(const ScrollToOptions&);
544 void scrollRenderBoxTo(const ScrollToOptions&);
545 void scrollFrameBy(const ScrollToOptions&);
546 void scrollFrameTo(const ScrollToOptions&);
547
537 private: 548 private:
538 bool hasElementFlag(ElementFlags mask) const { return hasRareData() && hasEl ementFlagInternal(mask); } 549 bool hasElementFlag(ElementFlags mask) const { return hasRareData() && hasEl ementFlagInternal(mask); }
539 void setElementFlag(ElementFlags, bool value = true); 550 void setElementFlag(ElementFlags, bool value = true);
540 void clearElementFlag(ElementFlags); 551 void clearElementFlag(ElementFlags);
541 bool hasElementFlagInternal(ElementFlags) const; 552 bool hasElementFlagInternal(ElementFlags) const;
542 553
543 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check. 554 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check.
544 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check. 555 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check.
545 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check. 556 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check.
546 557
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 877 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
867 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 878 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
868 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 879 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
869 { \ 880 { \
870 return adoptRefWillBeNoop(new T(tagName, document)); \ 881 return adoptRefWillBeNoop(new T(tagName, document)); \
871 } 882 }
872 883
873 } // namespace 884 } // namespace
874 885
875 #endif // Element_h 886 #endif // Element_h
OLDNEW
« 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