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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 #include "core/html/HTMLDivElement.h" | 35 #include "core/html/HTMLDivElement.h" |
36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 class HTMLProgressElement; | 40 class HTMLProgressElement; |
41 | 41 |
42 class ProgressShadowElement : public HTMLDivElement { | 42 class ProgressShadowElement : public HTMLDivElement { |
43 public: | 43 public: |
44 ProgressShadowElement(Document*); | 44 ProgressShadowElement(Document&); |
45 HTMLProgressElement* progressElement() const; | 45 HTMLProgressElement* progressElement() const; |
46 | 46 |
47 protected: | 47 protected: |
48 virtual bool rendererIsNeeded(const NodeRenderingContext&); | 48 virtual bool rendererIsNeeded(const NodeRenderingContext&); |
49 }; | 49 }; |
50 | 50 |
51 class ProgressInnerElement FINAL : public ProgressShadowElement { | 51 class ProgressInnerElement FINAL : public ProgressShadowElement { |
52 public: | 52 public: |
53 static PassRefPtr<ProgressInnerElement> create(Document*); | 53 static PassRefPtr<ProgressInnerElement> create(Document&); |
54 | 54 |
55 private: | 55 private: |
56 ProgressInnerElement(Document*); | 56 ProgressInnerElement(Document&); |
57 | 57 |
58 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 58 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
59 virtual bool rendererIsNeeded(const NodeRenderingContext&); | 59 virtual bool rendererIsNeeded(const NodeRenderingContext&); |
60 }; | 60 }; |
61 | 61 |
62 inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document* d
ocument) | 62 inline PassRefPtr<ProgressInnerElement> ProgressInnerElement::create(Document& d
ocument) |
63 { | 63 { |
64 return adoptRef(new ProgressInnerElement(document)); | 64 return adoptRef(new ProgressInnerElement(document)); |
65 } | 65 } |
66 | 66 |
67 class ProgressBarElement FINAL : public ProgressShadowElement { | 67 class ProgressBarElement FINAL : public ProgressShadowElement { |
68 public: | 68 public: |
69 static PassRefPtr<ProgressBarElement> create(Document*); | 69 static PassRefPtr<ProgressBarElement> create(Document&); |
70 | 70 |
71 private: | 71 private: |
72 ProgressBarElement(Document*); | 72 ProgressBarElement(Document&); |
73 }; | 73 }; |
74 | 74 |
75 inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document* docum
ent) | 75 inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document& docum
ent) |
76 { | 76 { |
77 return adoptRef(new ProgressBarElement(document)); | 77 return adoptRef(new ProgressBarElement(document)); |
78 } | 78 } |
79 | 79 |
80 class ProgressValueElement FINAL : public ProgressShadowElement { | 80 class ProgressValueElement FINAL : public ProgressShadowElement { |
81 public: | 81 public: |
82 static PassRefPtr<ProgressValueElement> create(Document*); | 82 static PassRefPtr<ProgressValueElement> create(Document&); |
83 void setWidthPercentage(double); | 83 void setWidthPercentage(double); |
84 | 84 |
85 private: | 85 private: |
86 ProgressValueElement(Document*); | 86 ProgressValueElement(Document&); |
87 }; | 87 }; |
88 | 88 |
89 inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document* d
ocument) | 89 inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document& d
ocument) |
90 { | 90 { |
91 return adoptRef(new ProgressValueElement(document)); | 91 return adoptRef(new ProgressValueElement(document)); |
92 } | 92 } |
93 | 93 |
94 } | 94 } |
95 | 95 |
96 #endif // ProgressShadowElement_h | 96 #endif // ProgressShadowElement_h |
OLD | NEW |