Changeset 86442 in webkit


Ignore:
Timestamp:
May 13, 2011 10:24:55 AM (13 years ago)
Author:
Adam Roben
Message:

Tell ScrollView's child Widgets that their frame rects have changed when its own frame rect changes

r79167 moved some code from setFrameRect to setBoundsSize, including a call to
frameRectsChanged. This was done because positionScrollbarLayers, which is called by
frameRectsChanged, only needs to be called when the bounds change, not when the frame rect
changes. But the recursive calls inside frameRectsChanged *do* need to be called when the
frame rect changes.

This patch moves the positionScrollbarLayers call out of frameRectsChanged, since it needs
to be called at different times from frameRectsChanged. Then it restores the
frameRectsChanged call to setFrameRect, which fixes the bug.

Test: platform/win/plugins/iframe-inside-overflow.html

Fixes <http://webkit.org/b/60194> <rdar://problem/9383760> REGRESSION (r79167): Windowed
plugins in Google Reader don't move when the article list is scrolled

Reviewed by Dan Bernstein.

Source/WebCore:

  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars): Added a positionScrollbarLayers call here now that
frameRectsChanged doesn't call it for us. Also added a FIXME because it seems strange to
call frameRectsChanged here when our frame rect hasn't changed.
(WebCore::ScrollView::setFrameRect): Added back the frameRectsChanged call that was removed
in r79167.
(WebCore::ScrollView::setBoundsSize): Replaced a frameRectsChanged call with a call to
positionScrollbarLayers. We were only calling frameRectsChanged here in order to get
positionScrollbarLayers to be called.
(WebCore::ScrollView::frameRectsChanged): Removed the call to positionScrollbarLayers. All
callers of frameRectsChanged have been updated to call positionScrollbarLayers if needed.

Tools:

Add a plugin test that dumps the plugin window's rect

  • DumpRenderTree/TestNetscapePlugIn/Tests/win/DumpWindowRect.cpp: Added.

(DumpWindowRect::DumpWindowRect): Just call up to the base class.
(DumpWindowRect::performWindowGeometryTest): Find our window rect relative to the test
harness window and log it.

  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: Added DumpWindowRect.

LayoutTests:

Add a test for windowed plugins inside iframes inside scrolled overflow areas

  • platform/win/plugins/iframe-inside-overflow-expected.txt: Added.
  • platform/win/plugins/iframe-inside-overflow.html: Added.

(loaded): Scrolls the div and tells the plugin to start its test (which will cause its
window rect to be logged).

  • platform/win/plugins/resources/dump-window-rect-iframe.html: Added.
Location:
trunk
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86440 r86442  
     12011-05-13  Adam Roben  <aroben@apple.com>
     2
     3        Add a test for windowed plugins inside iframes inside scrolled overflow areas
     4
     5        Part of the test for <http://webkit.org/b/60194> <rdar://problem/9383760> REGRESSION
     6        (r79167): Windowed plugins in Google Reader don't move when the article list is scrolled
     7
     8        Reviewed by Dan Bernstein.
     9
     10        * platform/win/plugins/iframe-inside-overflow-expected.txt: Added.
     11        * platform/win/plugins/iframe-inside-overflow.html: Added.
     12        (loaded): Scrolls the div and tells the plugin to start its test (which will cause its
     13        window rect to be logged).
     14        * platform/win/plugins/resources/dump-window-rect-iframe.html: Added.
     15
    1162011-05-02  Robert Hogan  <robert@webkit.org>
    217
  • trunk/Source/WebCore/ChangeLog

    r86436 r86442  
     12011-05-13  Adam Roben  <aroben@apple.com>
     2
     3        Tell ScrollView's child Widgets that their frame rects have changed when its own frame rect
     4        changes
     5
     6        r79167 moved some code from setFrameRect to setBoundsSize, including a call to
     7        frameRectsChanged. This was done because positionScrollbarLayers, which is called by
     8        frameRectsChanged, only needs to be called when the bounds change, not when the frame rect
     9        changes. But the recursive calls inside frameRectsChanged *do* need to be called when the
     10        frame rect changes.
     11
     12        This patch moves the positionScrollbarLayers call out of frameRectsChanged, since it needs
     13        to be called at different times from frameRectsChanged. Then it restores the
     14        frameRectsChanged call to setFrameRect, which fixes the bug.
     15
     16        Test: platform/win/plugins/iframe-inside-overflow.html
     17
     18        Fixes <http://webkit.org/b/60194> <rdar://problem/9383760> REGRESSION (r79167): Windowed
     19        plugins in Google Reader don't move when the article list is scrolled
     20
     21        Reviewed by Dan Bernstein.
     22
     23        * platform/ScrollView.cpp:
     24        (WebCore::ScrollView::updateScrollbars): Added a positionScrollbarLayers call here now that
     25        frameRectsChanged doesn't call it for us. Also added a FIXME because it seems strange to
     26        call frameRectsChanged here when our frame rect hasn't changed.
     27        (WebCore::ScrollView::setFrameRect): Added back the frameRectsChanged call that was removed
     28        in r79167.
     29        (WebCore::ScrollView::setBoundsSize): Replaced a frameRectsChanged call with a call to
     30        positionScrollbarLayers. We were only calling frameRectsChanged here in order to get
     31        positionScrollbarLayers to be called.
     32        (WebCore::ScrollView::frameRectsChanged): Removed the call to positionScrollbarLayers. All
     33        callers of frameRectsChanged have been updated to call positionScrollbarLayers if needed.
     34
    1352011-05-13  Martin Robinson  <mrobinson@igalia.com>
    236
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r86293 r86442  
    580580
    581581    if (hasHorizontalScrollbar != (m_horizontalScrollbar != 0) || hasVerticalScrollbar != (m_verticalScrollbar != 0)) {
     582        // FIXME: Is frameRectsChanged really necessary here? Have any frame rects changed?
    582583        frameRectsChanged();
     584        positionScrollbarLayers();
    583585        updateScrollCorner();
    584586    }
     
    818820
    819821    Widget::setFrameRect(newRect);
     822
     823    frameRectsChanged();
    820824}
    821825
     
    835839        contentsResized();
    836840
    837     frameRectsChanged();
     841    positionScrollbarLayers();
    838842}
    839843
     
    852856    for (HashSet<RefPtr<Widget> >::const_iterator current = m_children.begin(); current != end; ++current)
    853857        (*current)->frameRectsChanged();
    854     positionScrollbarLayers();
    855858}
    856859
  • trunk/Tools/ChangeLog

    r86441 r86442  
     12011-05-13  Adam Roben  <aroben@apple.com>
     2
     3        Add a plugin test that dumps the plugin window's rect
     4
     5        Part of the test for <http://webkit.org/b/60194> <rdar://problem/9383760> REGRESSION
     6        (r79167): Windowed plugins in Google Reader don't move when the article list is scrolled
     7
     8        Reviewed by Dan Bernstein.
     9
     10        * DumpRenderTree/TestNetscapePlugIn/Tests/win/DumpWindowRect.cpp: Added.
     11        (DumpWindowRect::DumpWindowRect): Just call up to the base class.
     12        (DumpWindowRect::performWindowGeometryTest): Find our window rect relative to the test
     13        harness window and log it.
     14
     15        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: Added DumpWindowRect.
     16
    1172011-05-13  Adam Roben  <aroben@apple.com>
    218
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj

    r86441 r86442  
    442442                                </File>
    443443                                <File
     444                                        RelativePath="..\Tests\win\DumpWindowRect.cpp"
     445                                        >
     446                                </File>
     447                                <File
    444448                                        RelativePath="..\Tests\win\GetValueNetscapeWindow.cpp"
    445449                                        >
Note: See TracChangeset for help on using the changeset viewer.