summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLTableSectionElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLTableSectionElement.cpp')
-rw-r--r--WebCore/html/HTMLTableSectionElement.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/WebCore/html/HTMLTableSectionElement.cpp b/WebCore/html/HTMLTableSectionElement.cpp
index 15fa97e..96a0d9e 100644
--- a/WebCore/html/HTMLTableSectionElement.cpp
+++ b/WebCore/html/HTMLTableSectionElement.cpp
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (C) 1997 Martin Jones (mjones@kde.org)
* (C) 1997 Torben Weis (weis@kde.org)
* (C) 1998 Waldo Bastian (bastian@kde.org)
* (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,6 +21,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+
#include "config.h"
#include "HTMLTableSectionElement.h"
@@ -36,11 +37,16 @@ namespace WebCore {
using namespace HTMLNames;
-HTMLTableSectionElement::HTMLTableSectionElement(const QualifiedName& tagName, Document* document)
+inline HTMLTableSectionElement::HTMLTableSectionElement(const QualifiedName& tagName, Document* document)
: HTMLTablePartElement(tagName, document)
{
}
+PassRefPtr<HTMLTableSectionElement> HTMLTableSectionElement::create(const QualifiedName& tagName, Document* document)
+{
+ return new HTMLTableSectionElement(tagName, document);
+}
+
bool HTMLTableSectionElement::checkDTD(const Node* newChild)
{
if (newChild->isTextNode())
@@ -78,25 +84,25 @@ void HTMLTableSectionElement::additionalAttributeStyleDecls(Vector<CSSMutableSty
// the index... but they aren't used during usual HTML parsing anyway
PassRefPtr<HTMLElement> HTMLTableSectionElement::insertRow(int index, ExceptionCode& ec)
{
- RefPtr<HTMLTableRowElement> r;
+ RefPtr<HTMLTableRowElement> row;
RefPtr<HTMLCollection> children = rows();
int numRows = children ? (int)children->length() : 0;
if (index < -1 || index > numRows)
ec = INDEX_SIZE_ERR; // per the DOM
else {
- r = new HTMLTableRowElement(trTag, document());
+ row = HTMLTableRowElement::create(trTag, document());
if (numRows == index || index == -1)
- appendChild(r, ec);
+ appendChild(row, ec);
else {
Node* n;
if (index < 1)
n = firstChild();
else
n = children->item(index);
- insertBefore(r, n, ec);
+ insertBefore(row, n, ec);
}
}
- return r.release();
+ return row.release();
}
void HTMLTableSectionElement::deleteRow(int index, ExceptionCode& ec)