Title: [157300] trunk/Source/WebCore
Revision
157300
Author
[email protected]
Date
2013-10-11 08:07:12 -0700 (Fri, 11 Oct 2013)

Log Message

Do a bit of optimization and cleanup in the HTMLElement class
https://bugs.webkit.org/show_bug.cgi?id=122640

Reviewed by Andreas Kling.

* html/HTMLElement.cpp:
(WebCore::unicodeBidiAttributeForDirAuto): Take a reference.
(WebCore::HTMLElement::collectStyleForPresentationAttribute): Pass one.
(WebCore::mergeWithNextTextNode): Take a reference to a Text node instead
of a PassRefPtr to a Node. Also removed unnecessary check of parentNode.
Also update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::setOuterHTML): Use parentElement instead of
parentNode, since Antti says that's the future, and either will work here.
Also use nullptr.
(WebCore::HTMLElement::textToFragment): Fix indentation and use nullptr.
(WebCore::HTMLElement::setOuterText): Use a RefPtr for the parent here,
since otherwise there is no guarantee it survives. Also use nullptr and
update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::insertAdjacent): Use nullptr.
(WebCore::HTMLElement::insertAdjacentElement): Use nullptr.
(WebCore::contextElementForInsertion): Use nullptr.
(WebCore::HTMLElement::contentEditable): Use ASCIILiteral.
(WebCore::HTMLElement::setContentEditable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::draggable): Use fastGetAttribute.
(WebCore::HTMLElement::setDraggable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::setSpellcheck): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::click): Use nullptr.
(WebCore::HTMLElement::accessKeyAction): Use nullptr.
(WebCore::HTMLElement::title): Use fastGetAttribute.
(WebCore::HTMLElement::translateAttributeMode): Use fastGetAttribute, isNull,
and isEmpty.
(WebCore::HTMLElement::translate): Use parentElement and toHTMLElement.
Use early-continue style instead of nesting the whole loop body inside an if.
(WebCore::setHasDirAutoFlagRecursively): Use nullptr.
(WebCore::HTMLElement::hasDirectionAuto): Use isNull.
(WebCore::HTMLElement::directionality): Use nullptr.
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): Use nullptr.
(WebCore::HTMLElement::addHTMLLengthToStyle): Use longer variable names.

* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::abbr): Use fastGetAttribute.
(WebCore::HTMLTableCellElement::axis): Ditto.
(WebCore::HTMLTableCellElement::headers): Ditto.
(WebCore::HTMLTableCellElement::scope): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::width): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157299 => 157300)


--- trunk/Source/WebCore/ChangeLog	2013-10-11 09:44:39 UTC (rev 157299)
+++ trunk/Source/WebCore/ChangeLog	2013-10-11 15:07:12 UTC (rev 157300)
@@ -1,5 +1,54 @@
 2013-10-10  Darin Adler  <[email protected]>
 
+        Do a bit of optimization and cleanup in the HTMLElement class
+        https://bugs.webkit.org/show_bug.cgi?id=122640
+
+        Reviewed by Andreas Kling.
+
+        * html/HTMLElement.cpp:
+        (WebCore::unicodeBidiAttributeForDirAuto): Take a reference.
+        (WebCore::HTMLElement::collectStyleForPresentationAttribute): Pass one.
+        (WebCore::mergeWithNextTextNode): Take a reference to a Text node instead
+        of a PassRefPtr to a Node. Also removed unnecessary check of parentNode.
+        Also update to new calling convention for mergeWithNextTextNode.
+        (WebCore::HTMLElement::setOuterHTML): Use parentElement instead of
+        parentNode, since Antti says that's the future, and either will work here.
+        Also use nullptr.
+        (WebCore::HTMLElement::textToFragment): Fix indentation and use nullptr.
+        (WebCore::HTMLElement::setOuterText): Use a RefPtr for the parent here,
+        since otherwise there is no guarantee it survives. Also use nullptr and
+        update to new calling convention for mergeWithNextTextNode.
+        (WebCore::HTMLElement::insertAdjacent): Use nullptr.
+        (WebCore::HTMLElement::insertAdjacentElement): Use nullptr.
+        (WebCore::contextElementForInsertion): Use nullptr.
+        (WebCore::HTMLElement::contentEditable): Use ASCIILiteral.
+        (WebCore::HTMLElement::setContentEditable): Use AtomicString::ConstructFromLiteral.
+        (WebCore::HTMLElement::draggable): Use fastGetAttribute.
+        (WebCore::HTMLElement::setDraggable): Use AtomicString::ConstructFromLiteral.
+        (WebCore::HTMLElement::setSpellcheck): Use AtomicString::ConstructFromLiteral.
+        (WebCore::HTMLElement::click): Use nullptr.
+        (WebCore::HTMLElement::accessKeyAction): Use nullptr.
+        (WebCore::HTMLElement::title): Use fastGetAttribute.
+        (WebCore::HTMLElement::translateAttributeMode): Use fastGetAttribute, isNull,
+        and isEmpty.
+        (WebCore::HTMLElement::translate): Use parentElement and toHTMLElement.
+        Use early-continue style instead of nesting the whole loop body inside an if.
+        (WebCore::setHasDirAutoFlagRecursively): Use nullptr.
+        (WebCore::HTMLElement::hasDirectionAuto): Use isNull.
+        (WebCore::HTMLElement::directionality): Use nullptr.
+        (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): Use nullptr.
+        (WebCore::HTMLElement::addHTMLLengthToStyle): Use longer variable names.
+
+        * html/HTMLTableCellElement.cpp:
+        (WebCore::HTMLTableCellElement::abbr): Use fastGetAttribute.
+        (WebCore::HTMLTableCellElement::axis): Ditto.
+        (WebCore::HTMLTableCellElement::headers): Ditto.
+        (WebCore::HTMLTableCellElement::scope): Ditto.
+        * html/HTMLTableColElement.cpp:
+        (WebCore::HTMLTableColElement::width): Ditto.
+
+2013-10-10  Darin Adler  <[email protected]>
+
         Use after free in WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded
         https://bugs.webkit.org/show_bug.cgi?id=121033
 

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (157299 => 157300)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2013-10-11 09:44:39 UTC (rev 157299)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2013-10-11 15:07:12 UTC (rev 157300)
@@ -32,7 +32,7 @@
 #include "CSSValuePool.h"
 #include "DOMSettableTokenList.h"
 #include "DocumentFragment.h"
-#include "ElementIterator.h"
+#include "ElementAncestorIterator.h"
 #include "Event.h"
 #include "EventListener.h"
 #include "EventNames.h"
@@ -124,9 +124,9 @@
     return false;
 }
 
-static inline CSSValueID unicodeBidiAttributeForDirAuto(HTMLElement* element)
+static inline CSSValueID unicodeBidiAttributeForDirAuto(HTMLElement& element)
 {
-    if (element->hasLocalName(preTag) || element->hasLocalName(textareaTag))
+    if (element.hasLocalName(preTag) || element.hasLocalName(textareaTag))
         return CSSValueWebkitPlaintext;
     // FIXME: For bdo element, dir="auto" should result in "bidi-override isolate" but we don't support having multiple values in unicode-bidi yet.
     // See https://bugs.webkit.org/show_bug.cgi?id=73164.
@@ -195,7 +195,7 @@
             addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserDrag, CSSValueNone);
     } else if (name == dirAttr) {
         if (equalIgnoringCase(value, "auto"))
-            addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, unicodeBidiAttributeForDirAuto(this));
+            addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, unicodeBidiAttributeForDirAuto(*this));
         else {
             addPropertyToPresentationAttributeStyle(style, CSSPropertyDirection, value);
             if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(outputTag))
@@ -365,25 +365,23 @@
     }
 }
 
-static void mergeWithNextTextNode(PassRefPtr<Node> node, ExceptionCode& ec)
+static void mergeWithNextTextNode(Text& node, ExceptionCode& ec)
 {
-    ASSERT(node && node->isTextNode());
-    Node* next = node->nextSibling();
+    Node* next = node.nextSibling();
     if (!next || !next->isTextNode())
         return;
-    
-    RefPtr<Text> textNode = toText(node.get());
-    RefPtr<Text> textNext = toText(next);
+
+    Ref<Text> textNode(node);
+    Ref<Text> textNext(toText(*next));
     textNode->appendData(textNext->data(), ec);
     if (ec)
         return;
-    if (textNext->parentNode()) // Might have been removed by mutation event.
-        textNext->remove(ec);
+    textNext->remove(ec);
 }
 
 void HTMLElement::setOuterHTML(const String& html, ExceptionCode& ec)
 {
-    Node* p = parentNode();
+    Element* p = parentElement();
     if (!p || !p->isHTMLElement()) {
         ec = NO_MODIFICATION_ALLOWED_ERR;
         return;
@@ -397,12 +395,11 @@
         return;
       
     parent->replaceChild(fragment.release(), this, ec);
-    RefPtr<Node> node = next ? next->previousSibling() : 0;
+    RefPtr<Node> node = next ? next->previousSibling() : nullptr;
     if (!ec && node && node->isTextNode())
-        mergeWithNextTextNode(node.release(), ec);
-
+        mergeWithNextTextNode(toText(*node), ec);
     if (!ec && prev && prev->isTextNode())
-        mergeWithNextTextNode(prev.release(), ec);
+        mergeWithNextTextNode(toText(*prev), ec);
 }
 
 PassRefPtr<DocumentFragment> HTMLElement::textToFragment(const String& text, ExceptionCode& ec)
@@ -414,19 +411,19 @@
 
         // Find next line break.
         for (i = start; i < length; i++) {
-          c = text[i];
-          if (c == '\r' || c == '\n')
-              break;
+            c = text[i];
+            if (c == '\r' || c == '\n')
+                break;
         }
 
         fragment->appendChild(Text::create(document(), text.substring(start, i - start)), ec);
         if (ec)
-            return 0;
+            return nullptr;
 
         if (c == '\r' || c == '\n') {
             fragment->appendChild(HTMLBRElement::create(document()), ec);
             if (ec)
-                return 0;
+                return nullptr;
             // Make sure \r\n doesn't result in two line breaks.
             if (c == '\r' && i + 1 < length && text[i + 1] == '\n')
                 i++;
@@ -486,7 +483,7 @@
         replaceChildrenWithFragment(*this, fragment.release(), ec);
 }
 
-void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
+void HTMLElement::setOuterText(const String& text, ExceptionCode& ec)
 {
     if (ieForbidsInsertHTML()) {
         ec = NO_MODIFICATION_ALLOWED_ERR;
@@ -500,7 +497,7 @@
         return;
     }
 
-    ContainerNode* parent = parentNode();
+    RefPtr<ContainerNode> parent = parentNode();
     if (!parent) {
         ec = NO_MODIFICATION_ALLOWED_ERR;
         return;
@@ -523,12 +520,11 @@
         return;
     parent->replaceChild(newChild.release(), this, ec);
 
-    RefPtr<Node> node = next ? next->previousSibling() : 0;
+    RefPtr<Node> node = next ? next->previousSibling() : nullptr;
     if (!ec && node && node->isTextNode())
-        mergeWithNextTextNode(node.release(), ec);
-
+        mergeWithNextTextNode(toText(*node), ec);
     if (!ec && prev && prev->isTextNode())
-        mergeWithNextTextNode(prev.release(), ec);
+        mergeWithNextTextNode(toText(*prev), ec);
 }
 
 Node* HTMLElement::insertAdjacent(const String& where, Node* newChild, ExceptionCode& ec)
@@ -542,23 +538,23 @@
 
     if (equalIgnoringCase(where, "beforeBegin")) {
         ContainerNode* parent = this->parentNode();
-        return (parent && parent->insertBefore(newChild, this, ec)) ? newChild : 0;
+        return (parent && parent->insertBefore(newChild, this, ec)) ? newChild : nullptr;
     }
 
     if (equalIgnoringCase(where, "afterBegin"))
-        return insertBefore(newChild, firstChild(), ec) ? newChild : 0;
+        return insertBefore(newChild, firstChild(), ec) ? newChild : nullptr;
 
     if (equalIgnoringCase(where, "beforeEnd"))
-        return appendChild(newChild, ec) ? newChild : 0;
+        return appendChild(newChild, ec) ? newChild : nullptr;
 
     if (equalIgnoringCase(where, "afterEnd")) {
         ContainerNode* parent = this->parentNode();
-        return (parent && parent->insertBefore(newChild, nextSibling(), ec)) ? newChild : 0;
+        return (parent && parent->insertBefore(newChild, nextSibling(), ec)) ? newChild : nullptr;
     }
     
     // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
     ec = NOT_SUPPORTED_ERR;
-    return 0;
+    return nullptr;
 }
 
 Element* HTMLElement::insertAdjacentElement(const String& where, Element* newChild, ExceptionCode& ec)
@@ -566,7 +562,7 @@
     if (!newChild) {
         // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
         ec = TYPE_MISMATCH_ERR;
-        return 0;
+        return nullptr;
     }
 
     Node* returnValue = insertAdjacent(where, newChild, ec);
@@ -581,7 +577,7 @@
         ContainerNode* parent = element->parentNode();
         if (parent && !parent->isElementNode()) {
             ec = NO_MODIFICATION_ALLOWED_ERR;
-            return 0;
+            return nullptr;
         }
         ASSERT_WITH_SECURITY_IMPLICATION(!parent || parent->isElementNode());
         return toElement(parent);
@@ -589,7 +585,7 @@
     if (equalIgnoringCase(where, "afterBegin") || equalIgnoringCase(where, "beforeEnd"))
         return element;
     ec =  SYNTAX_ERR;
-    return 0;
+    return nullptr;
 }
 
 void HTMLElement::insertAdjacentHTML(const String& where, const String& markup, ExceptionCode& ec)
@@ -659,25 +655,25 @@
     const AtomicString& value = fastGetAttribute(contenteditableAttr);
 
     if (value.isNull())
-        return "inherit";
+        return ASCIILiteral("inherit");
     if (value.isEmpty() || equalIgnoringCase(value, "true"))
-        return "true";
+        return ASCIILiteral("true");
     if (equalIgnoringCase(value, "false"))
-         return "false";
+        return ASCIILiteral("false");
     if (equalIgnoringCase(value, "plaintext-only"))
-        return "plaintext-only";
+        return ASCIILiteral("plaintext-only");
 
-    return "inherit";
+    return ASCIILiteral("inherit");
 }
 
 void HTMLElement::setContentEditable(const String& enabled, ExceptionCode& ec)
 {
     if (equalIgnoringCase(enabled, "true"))
-        setAttribute(contenteditableAttr, "true");
+        setAttribute(contenteditableAttr, AtomicString("true", AtomicString::ConstructFromLiteral));
     else if (equalIgnoringCase(enabled, "false"))
-        setAttribute(contenteditableAttr, "false");
+        setAttribute(contenteditableAttr, AtomicString("false", AtomicString::ConstructFromLiteral));
     else if (equalIgnoringCase(enabled, "plaintext-only"))
-        setAttribute(contenteditableAttr, "plaintext-only");
+        setAttribute(contenteditableAttr, AtomicString("plaintext-only", AtomicString::ConstructFromLiteral));
     else if (equalIgnoringCase(enabled, "inherit"))
         removeAttribute(contenteditableAttr);
     else
@@ -686,12 +682,14 @@
 
 bool HTMLElement::draggable() const
 {
-    return equalIgnoringCase(getAttribute(draggableAttr), "true");
+    return equalIgnoringCase(fastGetAttribute(draggableAttr), "true");
 }
 
 void HTMLElement::setDraggable(bool value)
 {
-    setAttribute(draggableAttr, value ? "true" : "false");
+    setAttribute(draggableAttr, value
+        ? AtomicString("true", AtomicString::ConstructFromLiteral)
+        : AtomicString("false", AtomicString::ConstructFromLiteral));
 }
 
 bool HTMLElement::spellcheck() const
@@ -701,23 +699,24 @@
 
 void HTMLElement::setSpellcheck(bool enable)
 {
-    setAttribute(spellcheckAttr, enable ? "true" : "false");
+    setAttribute(spellcheckAttr, enable
+        ? AtomicString("true", AtomicString::ConstructFromLiteral)
+        : AtomicString("false", AtomicString::ConstructFromLiteral));
 }
 
-
 void HTMLElement::click()
 {
-    dispatchSimulatedClick(0, SendNoEvents, DoNotShowPressedLook);
+    dispatchSimulatedClick(nullptr, SendNoEvents, DoNotShowPressedLook);
 }
 
 void HTMLElement::accessKeyAction(bool sendMouseEvents)
 {
-    dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+    dispatchSimulatedClick(nullptr, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
 }
 
 String HTMLElement::title() const
 {
-    return getAttribute(titleAttr);
+    return fastGetAttribute(titleAttr);
 }
 
 short HTMLElement::tabIndex() const
@@ -734,11 +733,11 @@
 
 TranslateAttributeMode HTMLElement::translateAttributeMode() const
 {
-    const AtomicString& value = getAttribute(translateAttr);
+    const AtomicString& value = fastGetAttribute(translateAttr);
 
-    if (value == nullAtom)
+    if (value.isNull())
         return TranslateAttributeInherit;
-    if (equalIgnoringCase(value, "yes") || equalIgnoringCase(value, ""))
+    if (equalIgnoringCase(value, "yes") || value.isEmpty())
         return TranslateAttributeYes;
     if (equalIgnoringCase(value, "no"))
         return TranslateAttributeNo;
@@ -748,14 +747,13 @@
 
 bool HTMLElement::translate() const
 {
-    for (const Node* n = this; n; n = n->parentNode()) {
-        if (n->isHTMLElement()) {
-            TranslateAttributeMode mode = static_cast<const HTMLElement*>(n)->translateAttributeMode();
-            if (mode != TranslateAttributeInherit) {
-                ASSERT(mode == TranslateAttributeYes || mode == TranslateAttributeNo);
-                return mode == TranslateAttributeYes;
-            }
-        }
+    auto lineage = lineageOfType<HTMLElement>(this);
+    for (auto element = lineage.begin(), end = lineage.end(); element != end; ++element) {
+        TranslateAttributeMode mode = element->translateAttributeMode();
+        if (mode == TranslateAttributeInherit)
+            continue;
+        ASSERT(mode == TranslateAttributeYes || mode == TranslateAttributeNo);
+        return mode == TranslateAttributeYes;
     }
 
     // Default on the root element is translate=yes.
@@ -767,7 +765,6 @@
     setAttribute(translateAttr, enable ? "yes" : "no");
 }
 
-
 PassRefPtr<HTMLCollection> HTMLElement::children()
 {
     return ensureCachedHTMLCollection(NodeChildren);
@@ -804,7 +801,7 @@
     return node->isHTMLElement() && (node->hasTagName(bdiTag) || toHTMLElement(node)->hasAttribute(dirAttr));
 }
 
-static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastNode = 0)
+static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastNode = nullptr)
 {
     firstNode->setSelfOrAncestorHasDirAutoAttribute(flag);
 
@@ -836,7 +833,7 @@
 bool HTMLElement::hasDirectionAuto() const
 {
     const AtomicString& direction = fastGetAttribute(dirAttr);
-    return (hasTagName(bdiTag) && direction == nullAtom) || equalIgnoringCase(direction, "auto");
+    return (hasTagName(bdiTag) && direction.isNull()) || equalIgnoringCase(direction, "auto");
 }
 
 TextDirection HTMLElement::directionalityIfhasDirAutoAttribute(bool& isAuto) const
@@ -857,7 +854,7 @@
         bool hasStrongDirectionality;
         Unicode::Direction textDirection = textElement->value().defaultWritingDirection(&hasStrongDirectionality);
         if (strongDirectionalityTextNode)
-            *strongDirectionalityTextNode = hasStrongDirectionality ? textElement : 0;
+            *strongDirectionalityTextNode = hasStrongDirectionality ? textElement : nullptr;
         return (textDirection == Unicode::LeftToRight) ? LTR : RTL;
     }
 
@@ -891,7 +888,7 @@
         node = NodeTraversal::next(node, this);
     }
     if (strongDirectionalityTextNode)
-        *strongDirectionalityTextNode = 0;
+        *strongDirectionalityTextNode = nullptr;
     return LTR;
 }
 
@@ -936,7 +933,7 @@
 {
     // FIXME: This function looks suspicious.
     if (document().renderView() && (changeType == ElementRemoved || changeType == TextRemoved)) {
-        Node* node = beforeChange ? beforeChange->nextSibling() : 0;
+        Node* node = beforeChange ? beforeChange->nextSibling() : nullptr;
         for (; node; node = node->nextSibling()) {
             if (elementAffectsDirectionality(node))
                 continue;
@@ -948,7 +945,7 @@
     if (!selfOrAncestorHasDirAutoAttribute())
         return;
 
-    Node* oldMarkedNode = 0;
+    Node* oldMarkedNode = nullptr;
     if (beforeChange)
         oldMarkedNode = changeType == ElementInserted ? ElementTraversal::nextSibling(beforeChange) : beforeChange->nextSibling();
 
@@ -976,28 +973,26 @@
     // FIXME: This function should not spin up the CSS parser, but should instead just figure out the correct
     // length unit and make the appropriate parsed value.
 
-    // strip attribute garbage..
-    StringImpl* v = value.impl();
-    if (v) {
-        unsigned int l = 0;
+    if (StringImpl* string = value.impl()) {
+        unsigned parsedLength = 0;
 
-        while (l < v->length() && (*v)[l] <= ' ')
-            l++;
+        while (parsedLength < string->length() && (*string)[parsedLength] <= ' ')
+            ++parsedLength;
 
-        for (; l < v->length(); l++) {
-            UChar cc = (*v)[l];
+        for (; parsedLength < string->length(); ++parsedLength) {
+            UChar cc = (*string)[parsedLength];
             if (cc > '9')
                 break;
             if (cc < '0') {
                 if (cc == '%' || cc == '*')
-                    l++;
+                    ++parsedLength;
                 if (cc != '.')
                     break;
             }
         }
 
-        if (l != v->length()) {
-            addPropertyToPresentationAttributeStyle(style, propertyID, v->substring(0, l));
+        if (parsedLength != string->length()) {
+            addPropertyToPresentationAttributeStyle(style, propertyID, string->substring(0, parsedLength));
             return;
         }
     }
@@ -1093,4 +1088,5 @@
 {
     printf("%s\n", element->innerHTML().ascii().data());
 }
+
 #endif

Modified: trunk/Source/WebCore/html/HTMLTableCellElement.cpp (157299 => 157300)


--- trunk/Source/WebCore/html/HTMLTableCellElement.cpp	2013-10-11 09:44:39 UTC (rev 157299)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.cpp	2013-10-11 15:07:12 UTC (rev 157300)
@@ -131,12 +131,12 @@
 
 String HTMLTableCellElement::abbr() const
 {
-    return getAttribute(abbrAttr);
+    return fastGetAttribute(abbrAttr);
 }
 
 String HTMLTableCellElement::axis() const
 {
-    return getAttribute(axisAttr);
+    return fastGetAttribute(axisAttr);
 }
 
 void HTMLTableCellElement::setColSpan(int n)
@@ -146,7 +146,7 @@
 
 String HTMLTableCellElement::headers() const
 {
-    return getAttribute(headersAttr);
+    return fastGetAttribute(headersAttr);
 }
 
 void HTMLTableCellElement::setRowSpan(int n)
@@ -156,7 +156,7 @@
 
 String HTMLTableCellElement::scope() const
 {
-    return getAttribute(scopeAttr);
+    return fastGetAttribute(scopeAttr);
 }
 
 void HTMLTableCellElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const

Modified: trunk/Source/WebCore/html/HTMLTableColElement.cpp (157299 => 157300)


--- trunk/Source/WebCore/html/HTMLTableColElement.cpp	2013-10-11 09:44:39 UTC (rev 157299)
+++ trunk/Source/WebCore/html/HTMLTableColElement.cpp	2013-10-11 15:07:12 UTC (rev 157300)
@@ -97,7 +97,7 @@
 
 String HTMLTableColElement::width() const
 {
-    return getAttribute(widthAttr);
+    return fastGetAttribute(widthAttr);
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to