Changeset 57496 in webkit


Ignore:
Timestamp:
Apr 12, 2010 7:29:01 PM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

Spatial Navigation: make renderRectRelativeToRootDocument method to fallback to getRect() of Element when needed
https://bugs.webkit.org/show_bug.cgi?id=37461

Reviewed by Simon Fraser.
Patch by Antonio Gomes <tonikitoo@webkit.org>

WebCore:

getRect() of Element can be used instead of absoluteClippedOverflowRect of RenderObject when
the node is currently offscreen in an scroll overflowed content.

Test: fast/events/spatial-navigation/snav-simple-content-overflow.html

  • page/SpatialNavigation.cpp:

(WebCore::renderRectRelativeToRootDocument):

LayoutTests:

  • fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt: Added.
  • fast/events/spatial-navigation/snav-simple-content-overflow.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r57494 r57496  
     12010-04-12  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Spatial Navigation: make renderRectRelativeToRootDocument method to fallback to getRect() of Element when needed
     6        https://bugs.webkit.org/show_bug.cgi?id=37461
     7
     8        * fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt: Added.
     9        * fast/events/spatial-navigation/snav-simple-content-overflow.html: Added.
     10
     11
    1122010-04-08  yael aharon  <yael.aharon@nokia.com>
    213
  • trunk/WebCore/ChangeLog

    r57495 r57496  
     12010-04-12  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Spatial Navigation: make renderRectRelativeToRootDocument method to fallback to getRect() of Element when needed
     6        https://bugs.webkit.org/show_bug.cgi?id=37461
     7
     8        getRect() of Element can be used instead of absoluteClippedOverflowRect of RenderObject when
     9        the node is currently offscreen in an scroll overflowed content.
     10
     11        Test: fast/events/spatial-navigation/snav-simple-content-overflow.html
     12
     13        * page/SpatialNavigation.cpp:
     14        (WebCore::renderRectRelativeToRootDocument):
     15
    1162010-04-12  Antonio Gomes  <tonikitoo@webkit.org>
    217
  • trunk/WebCore/page/SpatialNavigation.cpp

    r57304 r57496  
    107107    IntRect rect(render->absoluteClippedOverflowRect());
    108108
     109    if (rect.isEmpty()) {
     110        Element* e = static_cast<Element*>(render->node());
     111        rect = e->getRect();
     112    }
     113
    109114    // In cases when the |render|'s associated node is in a scrollable inner
    110115    // document, we only consider its scrollOffset if it is not offscreen.
Note: See TracChangeset for help on using the changeset viewer.