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 24 matching lines...) Expand all Loading... |
35 #include "core/HTMLNames.h" | 35 #include "core/HTMLNames.h" |
36 #include "core/html/HTMLDivElement.h" | 36 #include "core/html/HTMLDivElement.h" |
37 #include "core/rendering/RenderBlockFlow.h" | 37 #include "core/rendering/RenderBlockFlow.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 PassRefPtrWillBeRawPtr<SliderThumbElement> create(Document&); |
48 | 48 |
49 void setPositionFromValue(); | 49 void setPositionFromValue(); |
50 | 50 |
51 void dragFrom(const LayoutPoint&); | 51 void dragFrom(const LayoutPoint&); |
52 virtual void defaultEventHandler(Event*) OVERRIDE; | 52 virtual void defaultEventHandler(Event*) override; |
53 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 53 virtual bool willRespondToMouseMoveEvents() override; |
54 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 54 virtual bool willRespondToMouseClickEvents() override; |
55 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 55 virtual void detach(const AttachContext& = AttachContext()) override; |
56 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 56 virtual 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 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 63 virtual RenderObject* createRenderer(RenderStyle*) override; |
64 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren() OVERRIDE; | 64 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren() override; |
65 virtual bool isDisabledFormControl() const OVERRIDE; | 65 virtual bool isDisabledFormControl() const override; |
66 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; | 66 virtual bool matchesReadOnlyPseudoClass() const override; |
67 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 67 virtual bool matchesReadWritePseudoClass() const override; |
68 virtual Node* focusDelegate() OVERRIDE; | 68 virtual 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 PassRefPtrWillBeRawPtr<Element> SliderThumbElement::cloneElementWithoutAt
tributesAndChildren() |
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 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 88 virtual RenderObject* createRenderer(RenderStyle*) override; |
89 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 89 virtual const AtomicString& shadowPseudoId() const override; |
90 }; | 90 }; |
91 | 91 |
92 } | 92 } |
93 | 93 |
94 #endif | 94 #endif |
OLD | NEW |