diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/html/HTMLTableColElement.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/html/HTMLTableColElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLTableColElement.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/WebCore/html/HTMLTableColElement.cpp b/Source/WebCore/html/HTMLTableColElement.cpp index e84ad580d..995b892f9 100644 --- a/Source/WebCore/html/HTMLTableColElement.cpp +++ b/Source/WebCore/html/HTMLTableColElement.cpp @@ -25,9 +25,9 @@ #include "config.h" #include "HTMLTableColElement.h" +#include "Attribute.h" #include "CSSPropertyNames.h" #include "HTMLNames.h" -#include "HTMLParserIdioms.h" #include "HTMLTableElement.h" #include "RenderTableCol.h" #include "Text.h" @@ -42,9 +42,9 @@ inline HTMLTableColElement::HTMLTableColElement(const QualifiedName& tagName, Do { } -Ref<HTMLTableColElement> HTMLTableColElement::create(const QualifiedName& tagName, Document& document) +PassRefPtr<HTMLTableColElement> HTMLTableColElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(*new HTMLTableColElement(tagName, document)); + return adoptRef(new HTMLTableColElement(tagName, document)); } bool HTMLTableColElement::isPresentationAttribute(const QualifiedName& name) const @@ -65,16 +65,16 @@ void HTMLTableColElement::collectStyleForPresentationAttribute(const QualifiedNa void HTMLTableColElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == spanAttr) { - m_span = limitToOnlyNonNegativeNumbersGreaterThanZero(value.string().toUInt()); - if (is<RenderTableCol>(renderer())) - downcast<RenderTableCol>(*renderer()).updateFromElement(); + m_span = !value.isNull() ? value.toInt() : 1; + if (renderer() && renderer()->isRenderTableCol()) + renderer()->updateFromElement(); } else if (name == widthAttr) { if (!value.isEmpty()) { - if (is<RenderTableCol>(renderer())) { - RenderTableCol& col = downcast<RenderTableCol>(*renderer()); + if (renderer() && renderer()->isRenderTableCol()) { + RenderTableCol* col = toRenderTableCol(renderer()); int newWidth = width().toInt(); - if (newWidth != col.width()) - col.setNeedsLayoutAndPrefWidthsRecalc(); + if (newWidth != col->width()) + col->setNeedsLayoutAndPrefWidthsRecalc(); } } } else @@ -83,16 +83,16 @@ void HTMLTableColElement::parseAttribute(const QualifiedName& name, const Atomic const StyleProperties* HTMLTableColElement::additionalPresentationAttributeStyle() { - if (!hasTagName(colgroupTag)) - return nullptr; + if (!hasLocalName(colgroupTag)) + return 0; if (HTMLTableElement* table = findParentTable()) return table->additionalGroupStyle(false); - return nullptr; + return 0; } -void HTMLTableColElement::setSpan(unsigned n) +void HTMLTableColElement::setSpan(int n) { - setUnsignedIntegralAttribute(spanAttr, limitToOnlyNonNegativeNumbersGreaterThanZero(n)); + setIntegralAttribute(spanAttr, n); } String HTMLTableColElement::width() const |