Title: [93884] trunk/Source/WebCore
- Revision
- 93884
- Author
- [email protected]
- Date
- 2011-08-26 10:19:11 -0700 (Fri, 26 Aug 2011)
Log Message
HTMLMetaElement: Don't cache "http-equiv" and "content" attributes.
https://bugs.webkit.org/show_bug.cgi?id=67040
Reviewed by Darin Adler.
* html/HTMLMetaElement.h: Remove m_equiv and m_content members,
shrinking HTMLMetaElement by 16 bytes (on 64-bit.)
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::parseMappedAttribute):
(WebCore::HTMLMetaElement::process): Implemented using fastGetAttribute().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (93883 => 93884)
--- trunk/Source/WebCore/ChangeLog 2011-08-26 17:17:41 UTC (rev 93883)
+++ trunk/Source/WebCore/ChangeLog 2011-08-26 17:19:11 UTC (rev 93884)
@@ -1,3 +1,16 @@
+2011-08-26 Andreas Kling <[email protected]>
+
+ HTMLMetaElement: Don't cache "http-equiv" and "content" attributes.
+ https://bugs.webkit.org/show_bug.cgi?id=67040
+
+ Reviewed by Darin Adler.
+
+ * html/HTMLMetaElement.h: Remove m_equiv and m_content members,
+ shrinking HTMLMetaElement by 16 bytes (on 64-bit.)
+ * html/HTMLMetaElement.cpp:
+ (WebCore::HTMLMetaElement::parseMappedAttribute):
+ (WebCore::HTMLMetaElement::process): Implemented using fastGetAttribute().
+
2011-08-26 Pavel Feldman <[email protected]>
Web Inspector: [REGRESSION] No way to expand hovered objects while debugging.
Modified: trunk/Source/WebCore/html/HTMLMetaElement.cpp (93883 => 93884)
--- trunk/Source/WebCore/html/HTMLMetaElement.cpp 2011-08-26 17:17:41 UTC (rev 93883)
+++ trunk/Source/WebCore/html/HTMLMetaElement.cpp 2011-08-26 17:19:11 UTC (rev 93884)
@@ -44,13 +44,11 @@
void HTMLMetaElement::parseMappedAttribute(Attribute* attr)
{
- if (attr->name() == http_equivAttr) {
- m_equiv = attr->value();
+ if (attr->name() == http_equivAttr)
process();
- } else if (attr->name() == contentAttr) {
- m_content = attr->value();
+ else if (attr->name() == contentAttr)
process();
- } else if (attr->name() == nameAttr) {
+ else if (attr->name() == nameAttr) {
// Do nothing.
} else
HTMLElement::parseMappedAttribute(attr);
@@ -64,16 +62,21 @@
void HTMLMetaElement::process()
{
- if (!inDocument() || m_content.isNull())
+ if (!inDocument())
return;
+ const AtomicString& contentValue = fastGetAttribute(contentAttr);
+ if (contentValue.isNull())
+ return;
+
if (equalIgnoringCase(name(), "viewport"))
- document()->processViewport(m_content);
+ document()->processViewport(contentValue);
// Get the document to process the tag, but only if we're actually part of DOM tree (changing a meta tag while
// it's not in the tree shouldn't have any effect on the document)
- if (!m_equiv.isNull())
- document()->processHttpEquiv(m_equiv, m_content);
+ const AtomicString& httpEquivValue = fastGetAttribute(http_equivAttr);
+ if (!httpEquivValue.isNull())
+ document()->processHttpEquiv(httpEquivValue, contentValue);
}
String HTMLMetaElement::content() const
Modified: trunk/Source/WebCore/html/HTMLMetaElement.h (93883 => 93884)
--- trunk/Source/WebCore/html/HTMLMetaElement.h 2011-08-26 17:17:41 UTC (rev 93883)
+++ trunk/Source/WebCore/html/HTMLMetaElement.h 2011-08-26 17:19:11 UTC (rev 93884)
@@ -42,9 +42,6 @@
virtual void insertedIntoDocument();
void process();
-
- String m_equiv;
- String m_content;
};
} //namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes