Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: Source/core/html/shadow/SliderThumbElement.h

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 28 matching lines...) Expand all
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class HTMLElement; 42 class HTMLElement;
43 class HTMLInputElement; 43 class HTMLInputElement;
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*);
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& part() const OVERRIDE; 58 virtual const AtomicString& part() const OVERRIDE;
59 HTMLInputElement* hostInput() const; 59 HTMLInputElement* hostInput() const;
60 void setPositionFromPoint(const LayoutPoint&); 60 void setPositionFromPoint(const LayoutPoint&);
61 61
62 private: 62 private:
63 SliderThumbElement(Document*); 63 SliderThumbElement(Document&);
64 virtual RenderObject* createRenderer(RenderStyle*); 64 virtual RenderObject* createRenderer(RenderStyle*);
65 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); 65 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
66 virtual bool isDisabledFormControl() const OVERRIDE; 66 virtual bool isDisabledFormControl() const OVERRIDE;
67 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE; 67 virtual bool matchesReadOnlyPseudoClass() const OVERRIDE;
68 virtual bool matchesReadWritePseudoClass() const OVERRIDE; 68 virtual bool matchesReadWritePseudoClass() const OVERRIDE;
69 virtual Node* focusDelegate(); 69 virtual Node* focusDelegate();
70 void startDragging(); 70 void startDragging();
71 void stopDragging(); 71 void stopDragging();
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 inline SliderThumbElement* toSliderThumbElement(Node* node) 81 inline SliderThumbElement* toSliderThumbElement(Node* node)
82 { 82 {
83 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); 83 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement());
84 return static_cast<SliderThumbElement*>(node); 84 return static_cast<SliderThumbElement*>(node);
85 } 85 }
86 86
87 // -------------------------------- 87 // --------------------------------
88 88
89 class RenderSliderThumb FINAL : public RenderBlock { 89 class RenderSliderThumb FINAL : public RenderBlock {
90 public: 90 public:
91 RenderSliderThumb(SliderThumbElement*); 91 RenderSliderThumb(SliderThumbElement*);
92 void updateAppearance(RenderStyle* parentStyle); 92 void updateAppearance(RenderStyle* parentStyle);
93 93
94 private: 94 private:
95 virtual bool isSliderThumb() const; 95 virtual bool isSliderThumb() const;
96 }; 96 };
97 97
98 // -------------------------------- 98 // --------------------------------
99 99
100 class SliderContainerElement FINAL : public HTMLDivElement { 100 class SliderContainerElement FINAL : public HTMLDivElement {
101 public: 101 public:
102 static PassRefPtr<SliderContainerElement> create(Document*); 102 static PassRefPtr<SliderContainerElement> create(Document&);
103 103
104 private: 104 private:
105 SliderContainerElement(Document*); 105 SliderContainerElement(Document&);
106 virtual RenderObject* createRenderer(RenderStyle*); 106 virtual RenderObject* createRenderer(RenderStyle*);
107 virtual const AtomicString& part() const; 107 virtual const AtomicString& part() const;
108 }; 108 };
109 109
110 } 110 }
111 111
112 #endif 112 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/ProgressShadowElement.cpp ('k') | Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698