WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2007 00:25:38 +0000 (00:25 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2007 00:25:38 +0000 (00:25 +0000)
commit36d6aec783bb7d1dffcf622abc57310476c3d66a
treecb24f9a8b07ad6acd06fd0777a23418cb92ea60c
parent3c7654522b2bdeecf416d2d95687057456f32ee5
WebCore:

        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame

        Test: fast/events/resize-subframe.html

        * page/FrameView.cpp:
        (WebCore::FrameViewPrivate::FrameViewPrivate): Added a timer used when
        deferring tasks that need to be done after layout.
        (WebCore::FrameViewPrivate::reset):
        (WebCore::FrameView::~FrameView):
        (WebCore::FrameView::layout): Moved the updating of widget positions,
        loading plug-ins and sending events queued up during layout into
        performPostLayoutTasks(). performPostLayoutTasks() is called after
        layout unless the layout was triggered by a previous layout's post-
        layout tasks. In the latter case, performPostLayoutTasks() is scheduled
        to run later.
        (WebCore::FrameView::performPostLayoutTasks): Performs work that needs
        to be done after layout but which can result in arbitrary code
        execution and therefore may re-invalidate the layout. This includes
        updating widget positions, loading plug-ins, and dispatching layout-
        related DOM events (scroll, overflow and resize).
        (WebCore::FrameView::postLayoutTimerFired):
        (WebCore::FrameView::dispatchScheduledEvents):
        * page/FrameView.h:
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm: Removed -sendResizeEvent since this
        is handled by FrameView now.

WebKit/gtk:

        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame

        * WebView/webkitwebview.cpp: Remove the call to sendResizeEvent() since
        FrameView sends it now.

WebKit/mac:

        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Removed the code
        that checked if the view had resized and sent the resize event, since
        FrameView sends resize events now.
        * WebView/WebHTMLViewInternal.h:

WebKit/win:

        Reviewed by Dave Hyatt.

        - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame

        * WebView.cpp:
        (WebViewWndProc): Removed call to sendResizeEvent() since FrameView
        sends them now.

LayoutTests:

        Reviewed by Dave Hyatt.

        - test for <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame

        * fast/events/resize-subframe-expected.txt: Added.
        * fast/events/resize-subframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/resize-subframe-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/resize-subframe.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/page/FrameView.cpp
WebCore/page/FrameView.h
WebCore/page/mac/WebCoreFrameBridge.h
WebCore/page/mac/WebCoreFrameBridge.mm
WebKit/gtk/ChangeLog
WebKit/gtk/WebView/webkitwebview.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebHTMLViewInternal.h
WebKit/win/ChangeLog
WebKit/win/WebView.cpp