OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/html/HTMLDivElement.h" | 34 #include "core/html/HTMLDivElement.h" |
35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class HTMLMeterElement; | 39 class HTMLMeterElement; |
40 class RenderMeter; | 40 class RenderMeter; |
41 | 41 |
42 class MeterShadowElement : public HTMLDivElement { | 42 class MeterShadowElement : public HTMLDivElement { |
43 protected: | 43 protected: |
44 MeterShadowElement(Document*); | 44 MeterShadowElement(Document&); |
45 HTMLMeterElement* meterElement() const; | 45 HTMLMeterElement* meterElement() const; |
46 | 46 |
47 private: | 47 private: |
48 virtual bool rendererIsNeeded(const NodeRenderingContext&); | 48 virtual bool rendererIsNeeded(const NodeRenderingContext&); |
49 }; | 49 }; |
50 | 50 |
51 class MeterInnerElement FINAL : public MeterShadowElement { | 51 class MeterInnerElement FINAL : public MeterShadowElement { |
52 public: | 52 public: |
53 static PassRefPtr<MeterInnerElement> create(Document*); | 53 static PassRefPtr<MeterInnerElement> create(Document&); |
54 | 54 |
55 private: | 55 private: |
56 MeterInnerElement(Document*); | 56 MeterInnerElement(Document&); |
57 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; | 57 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; |
58 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 58 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
59 }; | 59 }; |
60 | 60 |
61 class MeterBarElement FINAL : public MeterShadowElement { | 61 class MeterBarElement FINAL : public MeterShadowElement { |
62 private: | 62 private: |
63 MeterBarElement(Document*); | 63 MeterBarElement(Document&); |
64 | 64 |
65 public: | 65 public: |
66 static PassRefPtr<MeterBarElement> create(Document*); | 66 static PassRefPtr<MeterBarElement> create(Document&); |
67 }; | 67 }; |
68 | 68 |
69 class MeterValueElement FINAL : public MeterShadowElement { | 69 class MeterValueElement FINAL : public MeterShadowElement { |
70 public: | 70 public: |
71 static PassRefPtr<MeterValueElement> create(Document*); | 71 static PassRefPtr<MeterValueElement> create(Document&); |
72 void setWidthPercentage(double); | 72 void setWidthPercentage(double); |
73 void updatePseudo() { setPart(valuePseudoId()); } | 73 void updatePseudo() { setPart(valuePseudoId()); } |
74 | 74 |
75 private: | 75 private: |
76 MeterValueElement(Document*); | 76 MeterValueElement(Document&); |
77 const AtomicString& valuePseudoId() const; | 77 const AtomicString& valuePseudoId() const; |
78 }; | 78 }; |
79 | 79 |
80 } | 80 } |
81 | 81 |
82 #endif // MeterShadowElement_h | 82 #endif // MeterShadowElement_h |
OLD | NEW |