WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2006 21:29:41 +0000 (21:29 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2006 21:29:41 +0000 (21:29 +0000)
commitfd2f3c82b84a1b11add37825c18582ed2f87b3b1
tree09d02e58f0f8d26336fe9be4676d6662b3a37597
parent641726116593d133201e69092edf0be00a8acd7e
WebCore:

2006-07-05  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
        iFrames set to display:none are Missing from frames array

        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::FrameMac):
        (WebCore::FrameMac::createFrame):
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge initSubframeWithOwnerElement:]):
        (-[WebCoreFrameBridge installInFrame:]):
        Modify to pass the owner element instead of the owner renderer.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::insertBefore):
        (WebCore::ContainerNode::replaceChild):
        (WebCore::ContainerNode::appendChild):
        Dispatch the node inserted events before attaching the nodes. This is what the
        tokenizer does.

        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::openURL):
        (WebCore::HTMLFrameElement::attach):
        Pass the element to requestFrame.

        (WebCore::HTMLFrameElement::setLocation):
        Don't call attach/detach on an iframe.

        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::insertedIntoDocument):
        Load the frame here (using openURL).

        (WebCore::HTMLIFrameElement::removedFromDocument):
        Call frameDetached.

        (WebCore::HTMLIFrameElement::attach):
        If there's a renderer, attach the content frame to it.

        (WebCore::HTMLIFrameElement::detach):
        Reset the renderer's frame.

        (WebCore::HTMLIFrameElement::openURL):
        Modify to request the frame.

        * html/HTMLIFrameElement.h:
        Add detach.

        * page/Frame.cpp:
        (WebCore::parentFromOwnerElement):
        (WebCore::Frame::Frame):
        (WebCore::Frame::~Frame):
        (WebCore::Frame::requestFrame):
        (WebCore::Frame::requestObject):
        (WebCore::Frame::loadSubframe):
        (WebCore::Frame::ownerElement):
        (WebCore::Frame::ownerRenderer):
        (WebCore::Frame::disconnectOwnerElement):
        * page/Frame.h:
        * page/FramePrivate.h:
        (WebCore::FramePrivate::FramePrivate):
        * rendering/RenderPart.cpp:
        (WebCore::RenderPart::setFrame):
        Modify to keep an owner element around instead of the renderer.

        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        Don't do anything for iframes.

WebKit:

2006-07-05  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
        iFrames set to display:none are Missing from frames array

        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
        (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
        Modify to pass the owner element instead of the owner renderer.

        * WebView/WebHTMLView.m:
        (-[WebHTMLView _topHTMLView]):
        Remove assertion, it's not valid anymore.

LayoutTests:

2006-07-05  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
        iFrames set to display:none are Missing from frames array

        * fast/events/mouseover-mouseout2-expected.txt:
        * fast/events/mouseover-mouseout2.html:
        Update expected result. Since we now keep the frame around, the mouseout event is
        now dispatched to the element in the frame.

        * fast/events/onloadFrameCrash-expected.checksum:
        * fast/events/onloadFrameCrash-expected.png:
        * fast/events/onloadFrameCrash-expected.txt:
        This does hide the frame now.

        * fast/frames/iframe-display-none-expected.txt: Added.
        * fast/frames/iframe-display-none.html: Added.
        * fast/frames/resources/iframe-display-none-child.html: Added.
        New test that tests JS interaction with frames.

        * fast/frames/iframe-double-attach-expected.txt: Added.
        * fast/frames/iframe-double-attach.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/mouseover-mouseout2-expected.txt
LayoutTests/fast/events/mouseover-mouseout2.html
LayoutTests/fast/events/onloadFrameCrash-expected.checksum
LayoutTests/fast/events/onloadFrameCrash-expected.png
LayoutTests/fast/events/onloadFrameCrash-expected.txt
LayoutTests/fast/frames/iframe-display-none-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/iframe-display-none.html [new file with mode: 0644]
LayoutTests/fast/frames/iframe-double-attach-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/iframe-double-attach.html [new file with mode: 0644]
LayoutTests/fast/frames/resources/iframe-display-none-child.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/dom/ContainerNode.cpp
WebCore/html/HTMLFrameElement.cpp
WebCore/html/HTMLIFrameElement.cpp
WebCore/html/HTMLIFrameElement.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/rendering/RenderPart.cpp
WebCore/rendering/RenderPartObject.cpp
WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameBridge.m
WebKit/WebView/WebHTMLView.m