Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[CTTE] RenderTableCaption is never anonymous.
<https://webkit.org/b/121289>

Reviewed by Antti Koivisto.

Hide element() and provide existingElement() instead, returning an Element&.

Canonical link: https://commits.webkit.org/139243@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Sep 13, 2013
1 parent 4cfa1ca commit e1e38cd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,12 @@
2013-09-13 Andreas Kling <akling@apple.com>

[CTTE] RenderTableCaption is never anonymous.
<https://webkit.org/b/121289>

Reviewed by Antti Koivisto.

Hide element() and provide existingElement() instead, returning an Element&.

2013-09-13 Andreas Kling <akling@apple.com>

[CTTE] RenderTableCol is never anonymous.
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderObject.cpp
Expand Up @@ -225,7 +225,7 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
case TABLE_CELL:
return new (arena) RenderTableCell(element);
case TABLE_CAPTION:
return new (arena) RenderTableCaption(element);
return new (arena) RenderTableCaption(*element);
case BOX:
case INLINE_BOX:
return new (arena) RenderDeprecatedFlexibleBox(element);
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/RenderTableCaption.cpp
Expand Up @@ -24,8 +24,8 @@

namespace WebCore {

RenderTableCaption::RenderTableCaption(Element* element)
: RenderBlockFlow(element)
RenderTableCaption::RenderTableCaption(Element& element)
: RenderBlockFlow(&element)
{
}

Expand Down
7 changes: 6 additions & 1 deletion Source/WebCore/rendering/RenderTableCaption.h
Expand Up @@ -28,11 +28,16 @@ class RenderTable;

class RenderTableCaption FINAL : public RenderBlockFlow {
public:
explicit RenderTableCaption(Element*);
explicit RenderTableCaption(Element&);
virtual ~RenderTableCaption();

Element& existingElement() const { return *RenderBlockFlow::element(); }

virtual LayoutUnit containingBlockLogicalWidthForContent() const OVERRIDE;

private:
void element() const WTF_DELETED_FUNCTION;

virtual bool isTableCaption() const OVERRIDE { return true; }

virtual void insertedIntoTree() OVERRIDE;
Expand Down

0 comments on commit e1e38cd

Please sign in to comment.