Changeset 11484 in webkit


Ignore:
Timestamp:
Dec 7, 2005 1:24:59 PM (18 years ago)
Author:
hyatt
Message:

Fix the DHTML menus on monster.com. offsetParent should only return RenderObjects that
have corresponding DOM elements.

Reviewed by Eric Seidel

  • khtml/rendering/render_object.cpp: (RenderObject::offsetParent):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog-2005-12-19

    r11483 r11484  
     12005-12-07  David Hyatt  <hyatt@apple.com>
     2
     3        Fix the DHTML menus on monster.com.  offsetParent should only return RenderObjects that
     4        have corresponding DOM elements.
     5       
     6        Reviewed by Eric Seidel
     7
     8        * khtml/rendering/render_object.cpp:
     9        (RenderObject::offsetParent):
     10
    1112005-12-07  Eric Seidel  <eseidel@apple.com>
    212
  • trunk/WebCore/khtml/rendering/render_object.cpp

    r11333 r11484  
    578578RenderObject* RenderObject::offsetParent() const
    579579{
     580    // FIXME: It feels like this function could almost be written using containing blocks.
    580581    bool skipTables = isPositioned() || isRelPositioned();
    581582    RenderObject* curr = parent();
    582     while (curr && !curr->isPositioned() && !curr->isRelPositioned() &&
    583            !curr->isBody()) {
    584         if (!skipTables && (curr->isTableCell() || curr->isTable()))
     583    while (curr && (!curr->element() ||
     584                    (!curr->isPositioned() && !curr->isRelPositioned() &&
     585                        !(!style()->htmlHacks() && skipTables ? curr->isRoot() : curr->isBody())))) {
     586        if (!skipTables && curr->element() && (curr->isTableCell() || curr->isTable()))
    585587            break;
    586588        curr = curr->parent();
Note: See TracChangeset for help on using the changeset viewer.