| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/layout/LayoutBlockFlow.h" | 37 #include "core/layout/LayoutBlockFlow.h" |
| 38 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class HTMLInputElement; | 42 class HTMLInputElement; |
| 43 class Event; | 43 class Event; |
| 44 | 44 |
| 45 class SliderThumbElement final : public HTMLDivElement { | 45 class SliderThumbElement final : public HTMLDivElement { |
| 46 public: | 46 public: |
| 47 static PassRefPtrWillBeRawPtr<SliderThumbElement> create(Document&); | 47 static RawPtr<SliderThumbElement> create(Document&); |
| 48 | 48 |
| 49 void setPositionFromValue(); | 49 void setPositionFromValue(); |
| 50 | 50 |
| 51 void dragFrom(const LayoutPoint&); | 51 void dragFrom(const LayoutPoint&); |
| 52 void defaultEventHandler(Event*) override; | 52 void defaultEventHandler(Event*) override; |
| 53 bool willRespondToMouseMoveEvents() override; | 53 bool willRespondToMouseMoveEvents() override; |
| 54 bool willRespondToMouseClickEvents() override; | 54 bool willRespondToMouseClickEvents() override; |
| 55 void detach(const AttachContext& = AttachContext()) override; | 55 void detach(const AttachContext& = AttachContext()) override; |
| 56 const AtomicString& shadowPseudoId() const override; | 56 const AtomicString& shadowPseudoId() const override; |
| 57 HTMLInputElement* hostInput() const; | 57 HTMLInputElement* hostInput() const; |
| 58 void setPositionFromPoint(const LayoutPoint&); | 58 void setPositionFromPoint(const LayoutPoint&); |
| 59 void stopDragging(); | 59 void stopDragging(); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 SliderThumbElement(Document&); | 62 SliderThumbElement(Document&); |
| 63 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 63 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 64 PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChildren() o
verride; | 64 RawPtr<Element> cloneElementWithoutAttributesAndChildren() override; |
| 65 bool isDisabledFormControl() const override; | 65 bool isDisabledFormControl() const override; |
| 66 bool matchesReadOnlyPseudoClass() const override; | 66 bool matchesReadOnlyPseudoClass() const override; |
| 67 bool matchesReadWritePseudoClass() const override; | 67 bool matchesReadWritePseudoClass() const override; |
| 68 Node* focusDelegate() override; | 68 Node* focusDelegate() override; |
| 69 void startDragging(); | 69 void startDragging(); |
| 70 | 70 |
| 71 bool m_inDragMode; | 71 bool m_inDragMode; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 inline PassRefPtrWillBeRawPtr<Element> SliderThumbElement::cloneElementWithoutAt
tributesAndChildren() | 74 inline RawPtr<Element> SliderThumbElement::cloneElementWithoutAttributesAndChild
ren() |
| 75 { | 75 { |
| 76 return create(document()); | 76 return create(document()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 // FIXME: There are no ways to check if a node is a SliderThumbElement. | 79 // FIXME: There are no ways to check if a node is a SliderThumbElement. |
| 80 DEFINE_ELEMENT_TYPE_CASTS(SliderThumbElement, isHTMLElement()); | 80 DEFINE_ELEMENT_TYPE_CASTS(SliderThumbElement, isHTMLElement()); |
| 81 | 81 |
| 82 class SliderContainerElement final : public HTMLDivElement { | 82 class SliderContainerElement final : public HTMLDivElement { |
| 83 public: | 83 public: |
| 84 DECLARE_NODE_FACTORY(SliderContainerElement); | 84 DECLARE_NODE_FACTORY(SliderContainerElement); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 explicit SliderContainerElement(Document&); | 87 explicit SliderContainerElement(Document&); |
| 88 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 88 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 89 const AtomicString& shadowPseudoId() const override; | 89 const AtomicString& shadowPseudoId() const override; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace blink | 92 } // namespace blink |
| 93 | 93 |
| 94 #endif | 94 #endif |
| OLD | NEW |