Changeset 53230 in webkit


Ignore:
Timestamp:
Jan 13, 2010 7:30:36 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-13 Carol Szabo <carol.szabo@nokia.com>

Reviewed by Darin Adler.

CounterNode::nextInPreOrderAfterChildren(stayWithin) does not stay within.
https://bugs.webkit.org/show_bug.cgi?id=33625

No new tests because the fix should affect strictly performance.

  • rendering/CounterNode.cpp: (WebCore::CounterNode::nextInPreOrderAfterChildren):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53229 r53230  
     12010-01-13  Carol Szabo <carol.szabo@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        CounterNode::nextInPreOrderAfterChildren(stayWithin) does not stay within.
     6        https://bugs.webkit.org/show_bug.cgi?id=33625
     7
     8        No new tests because the fix should affect strictly performance.
     9
     10        * rendering/CounterNode.cpp:
     11        (WebCore::CounterNode::nextInPreOrderAfterChildren):
     12
    1132010-01-13  Nikolas Zimmermann  <nzimmermann@rim.com>
    214
  • trunk/WebCore/rendering/CounterNode.cpp

    r52450 r53230  
    5353        return 0;
    5454
    55     CounterNode* next = m_nextSibling;
    56     if (next)
    57         return next;
    58     next = m_parent;
    59     while (next && !next->m_nextSibling) {
    60         if (next == stayWithin)
     55    const CounterNode* current = this;
     56    CounterNode* next;
     57    while (!(next = current->m_nextSibling)) {
     58        current = current->m_parent;
     59        if (!current || current == stayWithin)
    6160            return 0;
    62         next = next->m_parent;
    63     }
    64     if (next)
    65         return next->m_nextSibling;
    66     return 0;
     61    }
     62    return next;
    6763}
    6864
Note: See TracChangeset for help on using the changeset viewer.