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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class Event; | 44 class Event; |
45 class FloatPoint; | 45 class FloatPoint; |
46 | 46 |
47 class SliderThumbElement FINAL : public HTMLDivElement { | 47 class SliderThumbElement FINAL : public HTMLDivElement { |
48 public: | 48 public: |
49 static PassRefPtr<SliderThumbElement> create(Document&); | 49 static PassRefPtr<SliderThumbElement> create(Document&); |
50 | 50 |
51 void setPositionFromValue(); | 51 void setPositionFromValue(); |
52 | 52 |
53 void dragFrom(const LayoutPoint&); | 53 void dragFrom(const LayoutPoint&); |
54 virtual void defaultEventHandler(Event*); | 54 virtual void defaultEventHandler(Event*) OVERRIDE; |
55 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 55 virtual bool willRespondToMouseMoveEvents() OVERRIDE; |
56 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 56 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
57 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 57 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; |
58 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 58 virtual const AtomicString& shadowPseudoId() const OVERRIDE; |
59 HTMLInputElement* hostInput() const; | 59 HTMLInputElement* hostInput() const; |
60 void setPositionFromPoint(const LayoutPoint&); | 60 void setPositionFromPoint(const LayoutPoint&); |
61 void stopDragging(); | 61 void stopDragging(); |
62 | 62 |
63 private: | 63 private: |
64 SliderThumbElement(Document&); | 64 SliderThumbElement(Document&); |
65 virtual RenderObject* createRenderer(RenderStyle*); | 65 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
66 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); | 66 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() OVERR
IDE; |
67 virtual bool isDisabledFormControl() const OVERRIDE; | 67 virtual bool isDisabledFormControl() const OVERRIDE; |
68 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; | 68 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; |
69 virtual bool matchesReadWritePseudoClass() const OVERRIDE; | 69 virtual bool matchesReadWritePseudoClass() const OVERRIDE; |
70 virtual Node* focusDelegate(); | 70 virtual Node* focusDelegate() OVERRIDE; |
71 void startDragging(); | 71 void startDragging(); |
72 | 72 |
73 bool m_inDragMode; | 73 bool m_inDragMode; |
74 }; | 74 }; |
75 | 75 |
76 inline PassRefPtr<Element> SliderThumbElement::cloneElementWithoutAttributesAndC
hildren() | 76 inline PassRefPtr<Element> SliderThumbElement::cloneElementWithoutAttributesAndC
hildren() |
77 { | 77 { |
78 return create(document()); | 78 return create(document()); |
79 } | 79 } |
80 | 80 |
81 // FIXME: There are no ways to check if a node is a SliderThumbElement. | 81 // FIXME: There are no ways to check if a node is a SliderThumbElement. |
82 DEFINE_NODE_TYPE_CASTS(SliderThumbElement, isHTMLElement()); | 82 DEFINE_NODE_TYPE_CASTS(SliderThumbElement, isHTMLElement()); |
83 | 83 |
84 // -------------------------------- | 84 // -------------------------------- |
85 | 85 |
86 class RenderSliderThumb FINAL : public RenderBlockFlow { | 86 class RenderSliderThumb FINAL : public RenderBlockFlow { |
87 public: | 87 public: |
88 RenderSliderThumb(SliderThumbElement*); | 88 RenderSliderThumb(SliderThumbElement*); |
89 void updateAppearance(RenderStyle* parentStyle); | 89 void updateAppearance(RenderStyle* parentStyle); |
90 | 90 |
91 private: | 91 private: |
92 virtual bool isSliderThumb() const; | 92 virtual bool isSliderThumb() const OVERRIDE; |
93 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 93 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
94 }; | 94 }; |
95 | 95 |
96 // -------------------------------- | 96 // -------------------------------- |
97 | 97 |
98 class SliderContainerElement FINAL : public HTMLDivElement { | 98 class SliderContainerElement FINAL : public HTMLDivElement { |
99 public: | 99 public: |
100 static PassRefPtr<SliderContainerElement> create(Document&); | 100 static PassRefPtr<SliderContainerElement> create(Document&); |
101 | 101 |
102 private: | 102 private: |
103 SliderContainerElement(Document&); | 103 SliderContainerElement(Document&); |
104 virtual RenderObject* createRenderer(RenderStyle*); | 104 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
105 virtual const AtomicString& shadowPseudoId() const; | 105 virtual const AtomicString& shadowPseudoId() const OVERRIDE; |
106 }; | 106 }; |
107 | 107 |
108 } | 108 } |
109 | 109 |
110 #endif | 110 #endif |
OLD | NEW |