JavaScriptCore:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 21:24:42 +0000 (21:24 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 21:24:42 +0000 (21:24 +0000)
commitc238d6f3ad7eeca3cfce8ddf2dfd80f9c2b395c0
tree5bee0caf2915290bc67e3341dbf4b0990fd6f00b
parent8bcf6c389b63324fa7846681879e1ff01a9fbd87
JavaScriptCore:

        Reviewed by Darin.

        * kjs/internal.cpp:
        (KJS::InterpreterImp::initGlobalObject): Add the built-in object
        prototype to the end of the global object's prototype chain instead of
        just blowing away its existing prototype. We need to do this because
        the window object has a meaningful prototype now.

LayoutTests:

        Layout test for document.defaultView

        * fast/dom/defaultView-expected.txt: Added.
        * fast/dom/defaultView.html: Added.
        * fast/events/event-view-toString-expected.txt: Updated to reflect new
        prototype chain for defaultView.

WebCore:

        Reviewed by Darin.

        - Fixed <rdar://problem/4478467> document.defaultView should return
        the window object

        Also made part of the window object autogenerated by IDL file.

        * DerivedSources.make: Added /page to IDL file search path, added
        JSDOMWindow.h, removed kjs_views.lut.h
        * WebCore.xcodeproj/project.pbxproj: Added missing files, removed
        obsolete files
        * bindings/js/kjs_dom.cpp:
        * bindings/js/kjs_events.cpp:
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::initScriptIfNeeded):
        * bindings/js/kjs_views.cpp: Removed.
        * bindings/js/kjs_views.h: Removed.
        * bindings/js/kjs_window.cpp: Removed document property -- it now
        belongs to JSDOMWindow. Added toJS and toDOMWindow.
        (KJS::Window::Window):
        (KJS::Window::impl):
        (KJS::Window::getValueProperty):
        (KJS::Window::clear): Added call to setPrototype to ensure
        that the prototype gets cleared during navigation. (Previously
        this wasn't an issue because the window object had no real prototype.)
        (WebCore::toJS):
        (WebCore::toDOMWindow):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/objc/DOMCSS.mm: Added NULL checks for the AbstractView
        (Presumably this is an issue after the window is closed.) Typedef-ed
        AbstractView as DOMWindow. I could have just replaced AbstractView
        with DOMWindow, but I think it's clearer to say, "There's this thing
        called the AbstractView, but really it's just the window."
        (-[DOMDocument getComputedStyle::]):
        (-[DOMDocument getMatchedCSSRules::]):
        * bindings/objc/DOMViews.mm:
        * bindings/objc/DOMViewsInternal.h:
        * bindings/scripts/CodeGeneratorJS.pm: Removed unused
        GetLegacyImplementationIncludes. Added support for DOMWindow and new
        "DoNotCache" attribute. Replaced C macros with text because (1) it
        makes the generated source easier to read and debug and (2) it made
        it much easier to implement the DoNotCache attribute.
        * bindings/scripts/IDLParser.pm: Return a hash reference instead of
        a hash, because otherwise an interface with more than one attribute
        returns too many arguments to be processed.
        * bridge/mac/FrameMac.mm:
        * dom/AbstractView.cpp: Removed.
        * dom/AbstractView.h: Removed.
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::defaultView):
        * dom/Document.h:
        * dom/Document.idl:
        * dom/KeyboardEvent.idl:
        * dom/MouseEvent.idl:
        * dom/Position.cpp:
        * dom/UIEvent.idl:
        * dom/dom2_eventsimpl.h:
        * page/DOMWindow.cpp: Added.
        (WebCore::DOMWindow::DOMWindow):
        (WebCore::DOMWindow::frame):
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::document):
        (WebCore::DOMWindow::getComputedStyle):
        (WebCore::DOMWindow::getMatchedCSSRules):
        * page/DOMWindow.h: Added.
        * page/DOMWindow.idl: Added.
        * page/Frame.cpp:
        (WebCore::Frame::~Frame): Disconnect the new DOMWindow object in
        addition to the Window object. Maybe we can unify this in the future.
        (WebCore::Frame::tree):
        (WebCore::Frame::domWindow):
        * page/Frame.h:
        * page/FramePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/internal.cpp
LayoutTests/ChangeLog
LayoutTests/fast/dom/defaultView-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/defaultView.html [new file with mode: 0644]
LayoutTests/fast/loader/resources/window-clearing2.html [new file with mode: 0644]
LayoutTests/fast/loader/window-clearing-expected.txt [new file with mode: 0644]
LayoutTests/fast/loader/window-clearing.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_dom.cpp
WebCore/bindings/js/kjs_events.cpp
WebCore/bindings/js/kjs_proxy.cpp
WebCore/bindings/js/kjs_views.cpp [deleted file]
WebCore/bindings/js/kjs_views.h [deleted file]
WebCore/bindings/js/kjs_window.cpp
WebCore/bindings/js/kjs_window.h
WebCore/bindings/objc/DOMCSS.mm
WebCore/bindings/objc/DOMViews.mm
WebCore/bindings/objc/DOMViewsInternal.h
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/IDLParser.pm
WebCore/bridge/mac/FrameMac.mm
WebCore/dom/AbstractView.cpp [deleted file]
WebCore/dom/AbstractView.h [deleted file]
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/dom/Document.idl
WebCore/dom/KeyboardEvent.idl
WebCore/dom/MouseEvent.idl
WebCore/dom/Position.cpp
WebCore/dom/UIEvent.idl
WebCore/dom/dom2_eventsimpl.h
WebCore/page/DOMWindow.cpp [new file with mode: 0644]
WebCore/page/DOMWindow.h [new file with mode: 0644]
WebCore/page/DOMWindow.idl [new file with mode: 0644]
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/platform/mac/ClipboardMac.h