| 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 parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 96 void removeAllEventListeners() override; |
| 84 | 97 |
| 85 private: | 98 private: |
| 86 explicit SliderContainerElement(Document&); | 99 explicit SliderContainerElement(Document&); |
| 87 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 100 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 88 const AtomicString& shadowPseudoId() const override; | 101 const AtomicString& shadowPseudoId() const override; |
| 102 Direction getDirection(LayoutPoint&, LayoutPoint&); |
| 103 bool canSlide(); |
| 104 |
| 105 bool m_hasTouchEventHandler; |
| 106 bool m_touchStarted; |
| 107 Direction m_slidingDirection; |
| 108 LayoutPoint m_startPoint; |
| 89 }; | 109 }; |
| 90 | 110 |
| 91 } // namespace blink | 111 } // namespace blink |
| 92 | 112 |
| 93 #endif | 113 #endif |
| OLD | NEW |