OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 inline Element* SliderThumbElement::cloneElementWithoutAttributesAndChildren() | 73 inline Element* SliderThumbElement::cloneElementWithoutAttributesAndChildren() |
74 { | 74 { |
75 return create(document()); | 75 return create(document()); |
76 } | 76 } |
77 | 77 |
78 // FIXME: There are no ways to check if a node is a SliderThumbElement. | 78 // FIXME: There are no ways to check if a node is a SliderThumbElement. |
79 DEFINE_ELEMENT_TYPE_CASTS(SliderThumbElement, isHTMLElement()); | 79 DEFINE_ELEMENT_TYPE_CASTS(SliderThumbElement, isHTMLElement()); |
80 | 80 |
81 class SliderContainerElement final : public HTMLDivElement { | 81 class SliderContainerElement final : public HTMLDivElement { |
82 public: | 82 public: |
| 83 enum Direction { |
| 84 Horizontal, |
| 85 Vertical, |
| 86 NoMove, |
| 87 }; |
| 88 |
83 DECLARE_NODE_FACTORY(SliderContainerElement); | 89 DECLARE_NODE_FACTORY(SliderContainerElement); |
| 90 HTMLInputElement* hostInput() const; |
| 91 void defaultEventHandler(Event*) override; |
| 92 void handleTouchEvent(TouchEvent*); |
| 93 void updateTouchEventHandlerRegistry(); |
| 94 void didMoveToNewDocument(Document&) override; |
| 95 void removeAllEventListeners() override; |
84 | 96 |
85 private: | 97 private: |
86 explicit SliderContainerElement(Document&); | 98 explicit SliderContainerElement(Document&); |
87 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 99 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
88 const AtomicString& shadowPseudoId() const override; | 100 const AtomicString& shadowPseudoId() const override; |
| 101 Direction getDirection(LayoutPoint&, LayoutPoint&); |
| 102 bool canSlide(); |
| 103 |
| 104 bool m_hasTouchEventHandler; |
| 105 bool m_touchStarted; |
| 106 Direction m_slidingDirection; |
| 107 LayoutPoint m_startPoint; |
89 }; | 108 }; |
90 | 109 |
91 } // namespace blink | 110 } // namespace blink |
92 | 111 |
93 #endif | 112 #endif |
OLD | NEW |