Title: [104263] trunk/Source/WebCore
- Revision
- 104263
- Author
- [email protected]
- Date
- 2012-01-05 19:14:05 -0800 (Thu, 05 Jan 2012)
Log Message
REGRESSION(r104210): Dromaeo DOM test score is lower
https://bugs.webkit.org/show_bug.cgi?id=75679
Reviewed by Andreas Kling.
The regression was caused by isDomVersionConsistent not being able to obtain the tree version
inside isLengthCacheValid when m_cachedItem is null. Fix the regression by always setting
m_cachedItem to some node when caching the length so that we can obtain the tree version later.
Also address Antti's review comment to fit m_cachedLength, m_isLengthCacheValid, and
m_isItemCacheValid all in 32-bit.
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104262 => 104263)
--- trunk/Source/WebCore/ChangeLog 2012-01-06 03:10:09 UTC (rev 104262)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 03:14:05 UTC (rev 104263)
@@ -1,3 +1,20 @@
+2012-01-05 Ryosuke Niwa <[email protected]>
+
+ REGRESSION(r104210): Dromaeo DOM test score is lower
+ https://bugs.webkit.org/show_bug.cgi?id=75679
+
+ Reviewed by Andreas Kling.
+
+ The regression was caused by isDomVersionConsistent not being able to obtain the tree version
+ inside isLengthCacheValid when m_cachedItem is null. Fix the regression by always setting
+ m_cachedItem to some node when caching the length so that we can obtain the tree version later.
+
+ Also address Antti's review comment to fit m_cachedLength, m_isLengthCacheValid, and
+ m_isItemCacheValid all in 32-bit.
+
+ * dom/DynamicNodeList.cpp:
+ (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
+
2012-01-05 Hajime Morrita <[email protected]>
Unreviewed bad merge fix for r104259 which dropped a line from r104210.
Modified: trunk/Source/WebCore/dom/DynamicNodeList.cpp (104262 => 104263)
--- trunk/Source/WebCore/dom/DynamicNodeList.cpp 2012-01-06 03:10:09 UTC (rev 104262)
+++ trunk/Source/WebCore/dom/DynamicNodeList.cpp 2012-01-06 03:14:05 UTC (rev 104263)
@@ -41,7 +41,8 @@
if (m_isItemCacheValid && !domVersionIsConsistent()) {
m_cachedItem = node;
m_isItemCacheValid = false;
- }
+ } else if (!m_isItemCacheValid)
+ m_cachedItem = node; // Used in domVersionIsConsistent.
m_cachedLength = length;
m_isLengthCacheValid = true;
m_domTreeVersionAtTimeOfCaching = node->document()->domTreeVersion();
Modified: trunk/Source/WebCore/dom/DynamicNodeList.h (104262 => 104263)
--- trunk/Source/WebCore/dom/DynamicNodeList.h 2012-01-06 03:10:09 UTC (rev 104262)
+++ trunk/Source/WebCore/dom/DynamicNodeList.h 2012-01-06 03:14:05 UTC (rev 104263)
@@ -100,9 +100,9 @@
private:
Node* m_cachedItem;
unsigned m_cachedItemOffset;
- unsigned m_cachedLength;
- bool m_isLengthCacheValid : 1;
- bool m_isItemCacheValid : 1;
+ unsigned m_cachedLength : 30;
+ unsigned m_isLengthCacheValid : 1;
+ unsigned m_isItemCacheValid : 1;
bool domVersionIsConsistent() const
{
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes