Title: [107580] trunk/Source/WebCore
Revision
107580
Author
[email protected]
Date
2012-02-13 09:44:20 -0800 (Mon, 13 Feb 2012)

Log Message

Make HTMLTableCaptionElement inherit from HTMLElement.
<http://webkit.org/b/78505>

Reviewed by Antti Koivisto.

HTMLTableCaptionElement was already bypassing its base class (HTMLTablePartElement)
and calling up to HTMLElement in all its overrides. Just make it an HTMLElement
instead since it doesn't use anything from HTMLTablePartElement.
Remove parseAttribute() overload since it's no longer needed.

* html/HTMLTableCaptionElement.cpp:
(WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
(WebCore::HTMLTableCaptionElement::isPresentationAttribute):
(WebCore::HTMLTableCaptionElement::collectStyleForAttribute):
* html/HTMLTableCaptionElement.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107579 => 107580)


--- trunk/Source/WebCore/ChangeLog	2012-02-13 17:37:48 UTC (rev 107579)
+++ trunk/Source/WebCore/ChangeLog	2012-02-13 17:44:20 UTC (rev 107580)
@@ -1,5 +1,23 @@
 2012-02-13  Andreas Kling  <[email protected]>
 
+        Make HTMLTableCaptionElement inherit from HTMLElement.
+        <http://webkit.org/b/78505>
+
+        Reviewed by Antti Koivisto.
+
+        HTMLTableCaptionElement was already bypassing its base class (HTMLTablePartElement)
+        and calling up to HTMLElement in all its overrides. Just make it an HTMLElement
+        instead since it doesn't use anything from HTMLTablePartElement.
+        Remove parseAttribute() overload since it's no longer needed.
+
+        * html/HTMLTableCaptionElement.cpp:
+        (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
+        (WebCore::HTMLTableCaptionElement::isPresentationAttribute):
+        (WebCore::HTMLTableCaptionElement::collectStyleForAttribute):
+        * html/HTMLTableCaptionElement.h:
+
+2012-02-13  Andreas Kling  <[email protected]>
+
         HTMLMarqueeElement: Don't cache presence of truespeed attribute.
         <http://webkit.org/b/78483>
 

Modified: trunk/Source/WebCore/html/HTMLTableCaptionElement.cpp (107579 => 107580)


--- trunk/Source/WebCore/html/HTMLTableCaptionElement.cpp	2012-02-13 17:37:48 UTC (rev 107579)
+++ trunk/Source/WebCore/html/HTMLTableCaptionElement.cpp	2012-02-13 17:44:20 UTC (rev 107580)
@@ -34,7 +34,7 @@
 using namespace HTMLNames;
 
 inline HTMLTableCaptionElement::HTMLTableCaptionElement(const QualifiedName& tagName, Document* document)
-    : HTMLTablePartElement(tagName, document)
+    : HTMLElement(tagName, document)
 {
     ASSERT(hasTagName(captionTag));
 }
@@ -48,7 +48,7 @@
 {
     if (attr->name() == alignAttr)
         return true;
-    return HTMLElement::isPresentationAttribute(attr); // Note that we are bypassing HTMLTablePartElement here.
+    return HTMLElement::isPresentationAttribute(attr);
 }
 
 void HTMLTableCaptionElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
@@ -57,12 +57,7 @@
         if (!attr->isEmpty())
             style->setProperty(CSSPropertyCaptionSide, attr->value());
     } else
-        HTMLElement::collectStyleForAttribute(attr, style); // Note that we are bypassing HTMLTablePartElement here.
+        HTMLElement::collectStyleForAttribute(attr, style);
 }
 
-void HTMLTableCaptionElement::parseAttribute(Attribute* attr)
-{
-    HTMLElement::parseAttribute(attr); // Note that we are bypassing HTMLTablePartElement here.
 }
-
-}

Modified: trunk/Source/WebCore/html/HTMLTableCaptionElement.h (107579 => 107580)


--- trunk/Source/WebCore/html/HTMLTableCaptionElement.h	2012-02-13 17:37:48 UTC (rev 107579)
+++ trunk/Source/WebCore/html/HTMLTableCaptionElement.h	2012-02-13 17:44:20 UTC (rev 107580)
@@ -26,18 +26,17 @@
 #ifndef HTMLTableCaptionElement_h
 #define HTMLTableCaptionElement_h
 
-#include "HTMLTablePartElement.h"
+#include "HTMLElement.h"
 
 namespace WebCore {
 
-class HTMLTableCaptionElement : public HTMLTablePartElement {
+class HTMLTableCaptionElement : public HTMLElement {
 public:
     static PassRefPtr<HTMLTableCaptionElement> create(const QualifiedName&, Document*);
 
 private:
     HTMLTableCaptionElement(const QualifiedName&, Document*);
 
-    virtual void parseAttribute(Attribute*) OVERRIDE;
     virtual bool isPresentationAttribute(Attribute*) const OVERRIDE;
     virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to