Changeset 52012 in webkit


Ignore:
Timestamp:
Dec 11, 2009 11:59:11 AM (14 years ago)
Author:
bweinstein@apple.com
Message:

Fixes <http://webkit.org/b/32399>.
Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.

Reviewed by Darin Adler.

WebCore:

When we initially figure out the layer that we should begin scrolling, don't try to jump out
of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
don't need that logic anymore.

Added a test to make sure that we don't pan scroll if we start to scroll in an empty
iFrame that has a scrollable owner document.

Test: platform/win/fast/events/panScroll-no-iframe-jump.html

  • dom/Node.cpp:

(WebCore::Node::defaultEventHandler):

LayoutTests:

Added a test to make sure that we don't pan scroll if we start to scroll in an empty
iFrame that has a scrollable owner document.

  • platform/win/fast/events/panScroll-no-iframe-jump-expected.txt: Added.
  • platform/win/fast/events/panScroll-no-iframe-jump.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52009 r52012  
     12009-12-11  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Fixes <http://webkit.org/b/32399>.
     6        Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
     7       
     8        Added a test to make sure that we don't pan scroll if we start to scroll in an empty
     9        iFrame that has a scrollable owner document.
     10
     11        * platform/win/fast/events/panScroll-no-iframe-jump-expected.txt: Added.
     12        * platform/win/fast/events/panScroll-no-iframe-jump.html: Added.
     13
    1142009-12-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    215
  • trunk/WebCore/ChangeLog

    r52008 r52012  
     12009-12-11  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Fixes <http://webkit.org/b/32399>.
     6        Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
     7       
     8        When we initially figure out the layer that we should begin scrolling, don't try to jump out
     9        of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
     10        don't need that logic anymore.
     11       
     12        Added a test to make sure that we don't pan scroll if we start to scroll in an empty
     13        iFrame that has a scrollable owner document.
     14
     15        Test: platform/win/fast/events/panScroll-no-iframe-jump.html
     16
     17        * dom/Node.cpp:
     18        (WebCore::Node::defaultEventHandler):
     19
    1202009-12-11  Brian Weinstein  <bweinstein@apple.com>
    221
  • trunk/WebCore/dom/Node.cpp

    r52008 r52012  
    28342834            RenderObject* renderer = this->renderer();
    28352835
    2836             while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea())) {
    2837                 // FIXME: If we start in a frame that can't scroll, we don't want to jump out of it to start scrolling:
    2838                 // <https://bugs.webkit.org/show_bug.cgi?id=32399>.
    2839                 if (!renderer->parent() && renderer->node() == renderer->document() && renderer->document()->ownerElement())
    2840                     renderer = renderer->document()->ownerElement()->renderer();
    2841                 else
    2842                     renderer = renderer->parent();
    2843             }
     2836            while (renderer && (!renderer->isBox() || !toRenderBox(renderer)->canBeScrolledAndHasScrollableArea()))
     2837                renderer = renderer->parent();
    28442838
    28452839            if (renderer) {
    2846                 if (Frame* frame = renderer->document()->frame())
     2840                if (Frame* frame = document()->frame())
    28472841                    frame->eventHandler()->startPanScrolling(renderer);
    28482842            }
Note: See TracChangeset for help on using the changeset viewer.