summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderButton.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderButton.h')
-rw-r--r--WebCore/rendering/RenderButton.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/WebCore/rendering/RenderButton.h b/WebCore/rendering/RenderButton.h
index 24e4767..89f7cf8 100644
--- a/WebCore/rendering/RenderButton.h
+++ b/WebCore/rendering/RenderButton.h
@@ -39,6 +39,7 @@ public:
RenderButton(Node*);
virtual const char* renderName() const { return "RenderButton"; }
+ virtual bool isRenderButton() const { return true; }
virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0);
virtual void removeChild(RenderObject*);
@@ -48,7 +49,7 @@ public:
void setupInnerStyle(RenderStyle*);
virtual void updateFromElement();
- virtual void updateBeforeAfterContent(RenderStyle::PseudoId);
+ virtual void updateBeforeAfterContent(PseudoId);
virtual bool hasControlClip() const { return true; }
virtual IntRect controlClipRect(int /*tx*/, int /*ty*/) const;
@@ -58,8 +59,8 @@ public:
virtual bool canHaveChildren() const;
protected:
- virtual void styleWillChange(RenderStyle::Diff, const RenderStyle* newStyle);
- virtual void styleDidChange(RenderStyle::Diff, const RenderStyle* oldStyle);
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
+ virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual bool hasLineIfEmpty() const { return true; }
@@ -72,6 +73,21 @@ protected:
bool m_default;
};
+inline RenderButton* toRenderButton(RenderObject* o)
+{
+ ASSERT(!o || o->isRenderButton());
+ return static_cast<RenderButton*>(o);
+}
+
+inline const RenderButton* toRenderButton(const RenderObject* o)
+{
+ ASSERT(!o || o->isRenderButton());
+ return static_cast<const RenderButton*>(o);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderButton(const RenderButton*);
+
} // namespace WebCore
#endif // RenderButton_h