Changeset 53196 in webkit


Ignore:
Timestamp:
Jan 13, 2010 12:40:19 PM (14 years ago)
Author:
eric@webkit.org
Message:

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

Reviewed by Darin Adler.

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

No new tests as this fix affects mainly performance.
No test has been found yet that could evidence the bug in the layout
of a page, but the fix to bug 32884 exposes this bug on some pages
such as http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/counters-scope-implied-001.htm

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

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53194 r53196  
     12010-01-13  Carol Szabo  <carol.szabo@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        RenderObject::nextInPreOrderAfterChildren(RenderObject* stayWithin) does not stay within
     6        https://bugs.webkit.org/show_bug.cgi?id=33600
     7
     8        No new tests as this fix affects mainly performance.
     9        No test has been found yet that could evidence the bug in the layout
     10        of a page, but the fix to bug 32884 exposes this bug on some pages
     11        such as http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/counters-scope-implied-001.htm
     12
     13        * rendering/RenderObject.cpp:
     14        (WebCore::RenderObject::nextInPreOrderAfterChildren):
     15
    1162010-01-13  Jeremy Orlow  <jorlow@chromium.org>
    217
  • trunk/WebCore/rendering/RenderObject.cpp

    r52783 r53196  
    369369        return 0;
    370370
    371     RenderObject* o;
    372     if (!(o = nextSibling())) {
    373         o = parent();
    374         while (o && !o->nextSibling()) {
    375             if (o == stayWithin)
    376                 return 0;
    377             o = o->parent();
    378         }
    379         if (o)
    380             o = o->nextSibling();
    381     }
    382 
    383     return o;
     371    const RenderObject* current = this;
     372    RenderObject* next;
     373    while (!(next = current->nextSibling())) {
     374        current = current->parent();
     375        if (!current || current == stayWithin)
     376            return 0;
     377    }
     378    return next;
    384379}
    385380
Note: See TracChangeset for help on using the changeset viewer.