Index: Source/core/rendering/RenderTextControlPlaceholder.h |
diff --git a/Source/core/rendering/RenderTableCaption.h b/Source/core/rendering/RenderTextControlPlaceholder.h |
similarity index 51% |
copy from Source/core/rendering/RenderTableCaption.h |
copy to Source/core/rendering/RenderTextControlPlaceholder.h |
index 35755a9d03b26632206ecc341a7ff7cb53b11a12..58ddba81c543bf88e7f4544add9ab8f36ecdb9e4 100644 |
--- a/Source/core/rendering/RenderTableCaption.h |
+++ b/Source/core/rendering/RenderTextControlPlaceholder.h |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2011 Robert Hogan <robert@roberthogan.net> |
+ * Copyright (C) 2014 Robert Hogan <robert@roberthogan.net> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
@@ -17,34 +17,26 @@ |
* Boston, MA 02110-1301, USA. |
*/ |
-#ifndef RenderTableCaption_h |
-#define RenderTableCaption_h |
+#ifndef RenderTextControlPlaceholder_h |
+#define RenderTextControlPlaceholder_h |
#include "core/rendering/RenderBlockFlow.h" |
namespace WebCore { |
-class RenderTable; |
-class RenderTableCaption FINAL : public RenderBlockFlow { |
+class RenderTextControlPlaceholder FINAL : public RenderBlockFlow { |
public: |
- explicit RenderTableCaption(Element*); |
- virtual ~RenderTableCaption(); |
- virtual LayoutUnit containingBlockLogicalWidthForContent() const OVERRIDE; |
- |
-private: |
- virtual bool isTableCaption() const OVERRIDE { return true; } |
- |
- virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
- |
- virtual void insertedIntoTree() OVERRIDE; |
- virtual void willBeRemovedFromTree() OVERRIDE; |
- |
- RenderTable* table() const; |
+ explicit RenderTextControlPlaceholder(Element*); |
+ virtual ~RenderTextControlPlaceholder(); |
+ |
+ // Placeholder elements are not laid out until the dimensions of their parent text control are known, |
+ // so they don't get layout until their parent has had layout. This is a problem when we have iterated |
+ // a parent's children and want to call isSelfCollapsingBlock. Fortunately since placeholder elements |
+ // only exist when they have content we can always enforce the rule that they are never self-collapsing. |
+ virtual bool isSelfCollapsingBlock() const OVERRIDE FINAL { return false; } |
}; |
-DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCaption, isTableCaption()); |
- |
} // namespace WebCore |
-#endif // RenderTableCaption_h |
+#endif // RenderTextControlPlaceholder_h |