RenderTableCaption.h [plain text]
#pragma once
#include "RenderBlockFlow.h"
namespace WebCore {
class RenderTable;
class RenderTableCaption final : public RenderBlockFlow {
WTF_MAKE_ISO_ALLOCATED(RenderTableCaption);
public:
RenderTableCaption(Element&, RenderStyle&&);
virtual ~RenderTableCaption();
Element& element() const { return downcast<Element>(nodeForNonAnonymous()); }
LayoutUnit containingBlockLogicalWidthForContent() const override;
private:
bool isTableCaption() const override { return true; }
void insertedIntoTree() override;
void willBeRemovedFromTree() override;
RenderTable* table() const;
};
inline LayoutUnit RenderTableCaption::containingBlockLogicalWidthForContent() const
{
if (auto* containingBlock = this->containingBlock())
return containingBlock->logicalWidth();
return { };
}
}
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderTableCaption, isTableCaption())