OLD | NEW |
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 Loading... |
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // will be returned. This is not a trivial getter and its return value shoul
d be cached | 166 // will be returned. This is not a trivial getter and its return value shoul
d be cached |
166 // for performance. | 167 // for performance. |
167 AttributeCollection attributes() const; | 168 AttributeCollection attributes() const; |
168 // This variant will not update the potentially invalid attributes. To be us
ed when not interested | 169 // This variant will not update the potentially invalid attributes. To be us
ed when not interested |
169 // in style attribute or one of the SVG animation attributes. | 170 // in style attribute or one of the SVG animation attributes. |
170 AttributeCollection attributesWithoutUpdate() const; | 171 AttributeCollection attributesWithoutUpdate() const; |
171 | 172 |
172 void scrollIntoView(bool alignToTop = true); | 173 void scrollIntoView(bool alignToTop = true); |
173 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); | 174 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); |
174 | 175 |
175 void distributeScroll(ScrollState&); | |
176 void applyScroll(ScrollState&); | |
177 | |
178 int offsetLeft(); | 176 int offsetLeft(); |
179 int offsetTop(); | 177 int offsetTop(); |
180 int offsetWidth(); | 178 int offsetWidth(); |
181 int offsetHeight(); | 179 int offsetHeight(); |
182 | 180 |
183 Element* offsetParent(); | 181 Element* offsetParent(); |
184 int clientLeft(); | 182 int clientLeft(); |
185 int clientTop(); | 183 int clientTop(); |
186 int clientWidth(); | 184 int clientWidth(); |
187 int clientHeight(); | 185 int clientHeight(); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 371 |
374 KURL getURLAttribute(const QualifiedName&) const; | 372 KURL getURLAttribute(const QualifiedName&) const; |
375 KURL getNonEmptyURLAttribute(const QualifiedName&) const; | 373 KURL getNonEmptyURLAttribute(const QualifiedName&) const; |
376 | 374 |
377 virtual const AtomicString imageSourceURL() const; | 375 virtual const AtomicString imageSourceURL() const; |
378 virtual Image* imageContents() { return nullptr; } | 376 virtual Image* imageContents() { return nullptr; } |
379 | 377 |
380 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone, InputDeviceCapabilities* sourceCapabilities = nullptr); | 378 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone, InputDeviceCapabilities* sourceCapabilities = nullptr); |
381 virtual void updateFocusAppearance(bool restorePreviousSelection); | 379 virtual void updateFocusAppearance(bool restorePreviousSelection); |
382 virtual void blur(); | 380 virtual void blur(); |
| 381 |
| 382 void setDistributeScroll(ScrollStateCallback*, String nativeScrollBehavior); |
| 383 void nativeDistributeScroll(ScrollState&); |
| 384 void setApplyScroll(ScrollStateCallback*, String nativeScrollBehavior); |
| 385 void nativeApplyScroll(ScrollState&); |
| 386 |
| 387 void callDistributeScroll(ScrollState&); |
| 388 void callApplyScroll(ScrollState&); |
| 389 |
383 // Whether this element can receive focus at all. Most elements are not | 390 // Whether this element can receive focus at all. Most elements are not |
384 // focusable but some elements, such as form controls and links, are. Unlike | 391 // focusable but some elements, such as form controls and links, are. Unlike |
385 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to | 392 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to |
386 // date, so it must not use the layoutObject to determine focusability. | 393 // date, so it must not use the layoutObject to determine focusability. |
387 virtual bool supportsFocus() const; | 394 virtual bool supportsFocus() const; |
388 // Whether the node can actually be focused. | 395 // Whether the node can actually be focused. |
389 bool isFocusable() const; | 396 bool isFocusable() const; |
390 bool isFocusedElementInDocument() const; | 397 bool isFocusedElementInDocument() const; |
391 virtual bool isKeyboardFocusable() const; | 398 virtual bool isKeyboardFocusable() const; |
392 virtual bool isMouseFocusable() const; | 399 virtual bool isMouseFocusable() const; |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 903 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
897 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 904 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
898 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 905 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
899 { \ | 906 { \ |
900 return adoptRefWillBeNoop(new T(tagName, document)); \ | 907 return adoptRefWillBeNoop(new T(tagName, document)); \ |
901 } | 908 } |
902 | 909 |
903 } // namespace | 910 } // namespace |
904 | 911 |
905 #endif // Element_h | 912 #endif // Element_h |
OLD | NEW |