Title: [103893] trunk/Source/WebCore
- Revision
- 103893
- Author
- kl...@webkit.org
- Date
- 2012-01-02 00:42:50 -0800 (Mon, 02 Jan 2012)
Log Message
Clear HTMLCollection's internal cache on construction.
<http://webkit.org/b/75423>
Reviewed by Antti Koivisto.
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103892 => 103893)
--- trunk/Source/WebCore/ChangeLog 2012-01-02 08:40:44 UTC (rev 103892)
+++ trunk/Source/WebCore/ChangeLog 2012-01-02 08:42:50 UTC (rev 103893)
@@ -1,3 +1,15 @@
+2012-01-01 Andreas Kling <awesomekl...@apple.com>
+
+ Clear HTMLCollection's internal cache on construction.
+ <http://webkit.org/b/75423>
+
+ Reviewed by Antti Koivisto.
+
+ * html/HTMLCollection.h:
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::HTMLCollection):
+ (WebCore::HTMLCollection::invalidateCacheIfNeeded):
+
2012-01-01 Eunmi Lee <eunmi15....@samsung.com>
[EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp.
Modified: trunk/Source/WebCore/html/HTMLCollection.cpp (103892 => 103893)
--- trunk/Source/WebCore/html/HTMLCollection.cpp 2012-01-02 08:40:44 UTC (rev 103892)
+++ trunk/Source/WebCore/html/HTMLCollection.cpp 2012-01-02 08:42:50 UTC (rev 103893)
@@ -41,6 +41,7 @@
, m_type(type)
, m_base(base)
{
+ m_cache.clear();
}
bool HTMLCollection::shouldIncludeChildren(CollectionType type)
@@ -98,14 +99,7 @@
if (m_cache.version == docversion)
return;
- m_cache.current = 0;
- m_cache.position = 0;
- m_cache.length = 0;
- m_cache.hasLength = false;
- m_cache.elementsArrayPosition = 0;
- m_cache.idCache.clear();
- m_cache.nameCache.clear();
- m_cache.hasNameCache = false;
+ m_cache.clear();
m_cache.version = docversion;
}
Modified: trunk/Source/WebCore/html/HTMLCollection.h (103892 => 103893)
--- trunk/Source/WebCore/html/HTMLCollection.h 2012-01-02 08:40:44 UTC (rev 103892)
+++ trunk/Source/WebCore/html/HTMLCollection.h 2012-01-02 08:42:50 UTC (rev 103893)
@@ -81,6 +81,19 @@
int elementsArrayPosition;
bool hasLength;
bool hasNameCache;
+
+ void clear()
+ {
+ idCache.clear();
+ nameCache.clear();
+ version = 0;
+ current = 0;
+ position = 0;
+ length = 0;
+ elementsArrayPosition = 0;
+ hasLength = false;
+ hasNameCache = false;
+ }
} m_cache;
private:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes