LayoutTests:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2006 20:22:08 +0000 (20:22 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2006 20:22:08 +0000 (20:22 +0000)
commitd451945519668c00333924a5477d88faa309a919
tree622b2ef4d293834536a9e079ac38e76881645712
parent4a54e6135bba6bae3273d7e81906ed6d9e14e561
LayoutTests:

        Tests for accessing renderer-dependent properties from a javascript: URL.

        * fast/frames/frame-js-url-clientWidth-expected.txt: Added.
        * fast/frames/frame-js-url-clientWidth.html: Added.
        * fast/frames/iframe-js-url-clientWidth-expected.txt: Added.
        * fast/frames/iframe-js-url-clientWidth.html: Added.

WebCore:

        Reviewed by Darin, John.

        - Merged more frame and iframe code
        - Fixed a bug where iframes returned incorrect values for renderer-dependent
        properties during javascript: loads because they didn't have renderers at
        load time

        PLT insists this is a small performance win. Don't believe its lies.

        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLElement::frameGetter): Renamed frameWidth and frameHeight to
        width and height, for consistency with the rest of the DOM.
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::queuePostAttachCallback): Added a post-attach callback
        queue that gets drained after the render tree is fully constructed. Currently,
        this is only used for frame loading.
        (WebCore::ContainerNode::attach):
        * dom/ContainerNode.h:
        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::insertedIntoDocument): Removed frame loading from
        attach() because loading iframes during attach() causes a crash.
        Moved frame loading logic into insertedIntoDocument(). That's a more
        logical place for it because  document insertion is what
        triggers frame loading. Made frame loading a post-attach callback, instead
        of an immediate action, to fix the incorrect values bug.
        (WebCore::HTMLFrameElement::attach): Added setWidget call that used to be
        in HTMLIFrameElement::attach. IFRAME requires this call. FRAME will soon
        require this call, once I remove the call from WebKit.
        (WebCore::HTMLFrameElement::setLocation):
        (WebCore::HTMLFrameElement::width):
        (WebCore::HTMLFrameElement::height):
        * html/HTMLFrameElement.h: Made openURL non-virtual to avoid the unnecessary
        killing of puppies.
        * html/HTMLIFrameElement.cpp: Merged code into HTMLFrameElement
        (WebCore::HTMLIFrameElement::rendererIsNeeded):
        (WebCore::HTMLIFrameElement::createRenderer):
        (WebCore::HTMLIFrameElement::insertedIntoDocument):
        (WebCore::HTMLIFrameElement::removedFromDocument):
        (WebCore::HTMLIFrameElement::attach):
        * page/FrameView.h: Removed unused method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/frames/frame-js-url-clientWidth-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/frame-js-url-clientWidth.html [new file with mode: 0644]
LayoutTests/fast/frames/iframe-js-url-clientWidth-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/iframe-js-url-clientWidth.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/js/kjs_html.cpp
WebCore/dom/ContainerNode.cpp
WebCore/dom/ContainerNode.h
WebCore/html/HTMLFrameElement.cpp
WebCore/html/HTMLFrameElement.h
WebCore/html/HTMLFrameSetElement.cpp
WebCore/html/HTMLIFrameElement.cpp
WebCore/page/FrameView.h