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

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

Issue 1209183004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address skobes' nits. Created 5 years, 5 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
« no previous file with comments | « Source/core/core.gypi ('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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class ElementRareData; 55 class ElementRareData;
56 class ElementShadow; 56 class ElementShadow;
57 class ExceptionState; 57 class ExceptionState;
58 class Image; 58 class Image;
59 class IntSize; 59 class IntSize;
60 class Locale; 60 class Locale;
61 class MutableStylePropertySet; 61 class MutableStylePropertySet;
62 class PropertySetCSSStyleDeclaration; 62 class PropertySetCSSStyleDeclaration;
63 class PseudoElement; 63 class PseudoElement;
64 class ScrollState; 64 class ScrollState;
65 class ScrollStateCallback;
65 class ScrollToOptions; 66 class ScrollToOptions;
66 class ShadowRoot; 67 class ShadowRoot;
67 class ShadowRootInit; 68 class ShadowRootInit;
68 class StylePropertySet; 69 class StylePropertySet;
69 70
70 enum SpellcheckAttributeState { 71 enum SpellcheckAttributeState {
71 SpellcheckAttributeTrue, 72 SpellcheckAttributeTrue,
72 SpellcheckAttributeFalse, 73 SpellcheckAttributeFalse,
73 SpellcheckAttributeDefault 74 SpellcheckAttributeDefault
74 }; 75 };
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // will be returned. This is not a trivial getter and its return value shoul d be cached 164 // will be returned. This is not a trivial getter and its return value shoul d be cached
164 // for performance. 165 // for performance.
165 AttributeCollection attributes() const; 166 AttributeCollection attributes() const;
166 // This variant will not update the potentially invalid attributes. To be us ed when not interested 167 // This variant will not update the potentially invalid attributes. To be us ed when not interested
167 // in style attribute or one of the SVG animation attributes. 168 // in style attribute or one of the SVG animation attributes.
168 AttributeCollection attributesWithoutUpdate() const; 169 AttributeCollection attributesWithoutUpdate() const;
169 170
170 void scrollIntoView(bool alignToTop = true); 171 void scrollIntoView(bool alignToTop = true);
171 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); 172 void scrollIntoViewIfNeeded(bool centerIfNeeded = true);
172 173
173 void distributeScroll(ScrollState&);
174 void applyScroll(ScrollState&);
175
176 int offsetLeft(); 174 int offsetLeft();
177 int offsetTop(); 175 int offsetTop();
178 int offsetWidth(); 176 int offsetWidth();
179 int offsetHeight(); 177 int offsetHeight();
180 178
181 Element* offsetParent(); 179 Element* offsetParent();
182 int clientLeft(); 180 int clientLeft();
183 int clientTop(); 181 int clientTop();
184 int clientWidth(); 182 int clientWidth();
185 int clientHeight(); 183 int clientHeight();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 363
366 KURL getURLAttribute(const QualifiedName&) const; 364 KURL getURLAttribute(const QualifiedName&) const;
367 KURL getNonEmptyURLAttribute(const QualifiedName&) const; 365 KURL getNonEmptyURLAttribute(const QualifiedName&) const;
368 366
369 virtual const AtomicString imageSourceURL() const; 367 virtual const AtomicString imageSourceURL() const;
370 virtual Image* imageContents() { return nullptr; } 368 virtual Image* imageContents() { return nullptr; }
371 369
372 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF ocusTypeNone); 370 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF ocusTypeNone);
373 virtual void updateFocusAppearance(bool restorePreviousSelection); 371 virtual void updateFocusAppearance(bool restorePreviousSelection);
374 virtual void blur(); 372 virtual void blur();
373
374 void setDistributeScroll(ScrollStateCallback*, String nativeScrollBehavior);
375 void nativeDistributeScroll(ScrollState&);
376 void setApplyScroll(ScrollStateCallback*, String nativeScrollBehavior);
377 void nativeApplyScroll(ScrollState&);
378
379 void callDistributeScroll(ScrollState&);
380 void callApplyScroll(ScrollState&);
381
375 // Whether this element can receive focus at all. Most elements are not 382 // Whether this element can receive focus at all. Most elements are not
376 // focusable but some elements, such as form controls and links, are. Unlike 383 // focusable but some elements, such as form controls and links, are. Unlike
377 // layoutObjectIsFocusable(), this method may be called when layout is not u p to 384 // layoutObjectIsFocusable(), this method may be called when layout is not u p to
378 // date, so it must not use the layoutObject to determine focusability. 385 // date, so it must not use the layoutObject to determine focusability.
379 virtual bool supportsFocus() const; 386 virtual bool supportsFocus() const;
380 // Whether the node can actually be focused. 387 // Whether the node can actually be focused.
381 bool isFocusable() const; 388 bool isFocusable() const;
382 bool isFocusedElementInDocument() const; 389 bool isFocusedElementInDocument() const;
383 virtual bool isKeyboardFocusable() const; 390 virtual bool isKeyboardFocusable() const;
384 virtual bool isMouseFocusable() const; 391 virtual bool isMouseFocusable() const;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 889 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 890 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 891 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
885 { \ 892 { \
886 return adoptRefWillBeNoop(new T(tagName, document)); \ 893 return adoptRefWillBeNoop(new T(tagName, document)); \
887 } 894 }
888 895
889 } // namespace 896 } // namespace
890 897
891 #endif // Element_h 898 #endif // Element_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698