| 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 }; |
| 75 | 76 |
| 76 enum ElementFlags { | 77 enum ElementFlags { |
| 77 TabIndexWasSetExplicitly = 1 << 0, | 78 TabIndexWasSetExplicitly = 1 << 0, |
| 78 StyleAffectedByEmpty = 1 << 1, | 79 StyleAffectedByEmpty = 1 << 1, |
| 79 IsInCanvasSubtree = 1 << 2, | 80 IsInCanvasSubtree = 1 << 2, |
| 80 ContainsFullScreenElement = 1 << 3, | 81 ContainsFullScreenElement = 1 << 3, |
| 81 IsInTopLayer = 1 << 4, | 82 IsInTopLayer = 1 << 4, |
| 82 HasPendingResources = 1 << 5, | 83 HasPendingResources = 1 << 5, |
| 83 | 84 |
| 84 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. | 85 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. |
| 85 }; | 86 }; |
| 86 | 87 |
| 88 enum NativeScrollBehavior { |
| 89 DisableNativeScroll, |
| 90 PerformBeforeNativeScroll, |
| 91 PerformAfterNativeScroll, |
| 92 }; |
| 93 |
| 87 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; | 94 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; |
| 88 | 95 |
| 89 class CORE_EXPORT Element : public ContainerNode { | 96 class CORE_EXPORT Element : public ContainerNode { |
| 90 DEFINE_WRAPPERTYPEINFO(); | 97 DEFINE_WRAPPERTYPEINFO(); |
| 91 public: | 98 public: |
| 92 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); | 99 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); |
| 93 virtual ~Element(); | 100 virtual ~Element(); |
| 94 | 101 |
| 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); | 102 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); |
| 96 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); | 103 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // will be returned. This is not a trivial getter and its return value shoul
d be cached | 170 // will be returned. This is not a trivial getter and its return value shoul
d be cached |
| 164 // for performance. | 171 // for performance. |
| 165 AttributeCollection attributes() const; | 172 AttributeCollection attributes() const; |
| 166 // This variant will not update the potentially invalid attributes. To be us
ed when not interested | 173 // 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. | 174 // in style attribute or one of the SVG animation attributes. |
| 168 AttributeCollection attributesWithoutUpdate() const; | 175 AttributeCollection attributesWithoutUpdate() const; |
| 169 | 176 |
| 170 void scrollIntoView(bool alignToTop = true); | 177 void scrollIntoView(bool alignToTop = true); |
| 171 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); | 178 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); |
| 172 | 179 |
| 173 void distributeScroll(ScrollState&); | |
| 174 void applyScroll(ScrollState&); | |
| 175 | |
| 176 int offsetLeft(); | 180 int offsetLeft(); |
| 177 int offsetTop(); | 181 int offsetTop(); |
| 178 int offsetWidth(); | 182 int offsetWidth(); |
| 179 int offsetHeight(); | 183 int offsetHeight(); |
| 180 | 184 |
| 181 Element* offsetParent(); | 185 Element* offsetParent(); |
| 182 int clientLeft(); | 186 int clientLeft(); |
| 183 int clientTop(); | 187 int clientTop(); |
| 184 int clientWidth(); | 188 int clientWidth(); |
| 185 int clientHeight(); | 189 int clientHeight(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 367 |
| 364 KURL getURLAttribute(const QualifiedName&) const; | 368 KURL getURLAttribute(const QualifiedName&) const; |
| 365 KURL getNonEmptyURLAttribute(const QualifiedName&) const; | 369 KURL getNonEmptyURLAttribute(const QualifiedName&) const; |
| 366 | 370 |
| 367 virtual const AtomicString imageSourceURL() const; | 371 virtual const AtomicString imageSourceURL() const; |
| 368 virtual Image* imageContents() { return nullptr; } | 372 virtual Image* imageContents() { return nullptr; } |
| 369 | 373 |
| 370 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone); | 374 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone); |
| 371 virtual void updateFocusAppearance(bool restorePreviousSelection); | 375 virtual void updateFocusAppearance(bool restorePreviousSelection); |
| 372 virtual void blur(); | 376 virtual void blur(); |
| 377 |
| 378 void setDistributeScroll(ScrollStateCallback*, String nativeScrollBehavior); |
| 379 void nativeDistributeScroll(ScrollState&); |
| 380 void setApplyScroll(ScrollStateCallback*, String nativeScrollBehavior); |
| 381 void nativeApplyScroll(ScrollState&); |
| 382 |
| 383 void callDistributeScroll(ScrollState&); |
| 384 void callApplyScroll(ScrollState&); |
| 385 |
| 373 // Whether this element can receive focus at all. Most elements are not | 386 // Whether this element can receive focus at all. Most elements are not |
| 374 // focusable but some elements, such as form controls and links, are. Unlike | 387 // focusable but some elements, such as form controls and links, are. Unlike |
| 375 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to | 388 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to |
| 376 // date, so it must not use the layoutObject to determine focusability. | 389 // date, so it must not use the layoutObject to determine focusability. |
| 377 virtual bool supportsFocus() const; | 390 virtual bool supportsFocus() const; |
| 378 // Whether the node can actually be focused. | 391 // Whether the node can actually be focused. |
| 379 bool isFocusable() const; | 392 bool isFocusable() const; |
| 380 bool isFocusedElementInDocument() const; | 393 bool isFocusedElementInDocument() const; |
| 381 virtual bool isKeyboardFocusable() const; | 394 virtual bool isKeyboardFocusable() const; |
| 382 virtual bool isMouseFocusable() const; | 395 virtual bool isMouseFocusable() const; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 893 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 881 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 894 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 882 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 895 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 883 { \ | 896 { \ |
| 884 return adoptRefWillBeNoop(new T(tagName, document)); \ | 897 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 885 } | 898 } |
| 886 | 899 |
| 887 } // namespace | 900 } // namespace |
| 888 | 901 |
| 889 #endif // Element_h | 902 #endif // Element_h |
| OLD | NEW |