Commit 6d162e78 authored by weinig's avatar weinig

Reviewed by Darin.

        - Make HTMLFrameOwnerElement::contentWindow() return a DOMWindow instead of a Frame
        - Remove the unnecessary hack in HTMLFrameElement.idl and HTMLIFrameElement.idl that
          converted from Frame to Window now that it is not necessary.
        - Remove now unused [NullCheck] extended attribute from CodeGeneratorJS.pm.

        * bindings/scripts/CodeGeneratorJS.pm:
        * html/HTMLDocument.idl:
        * html/HTMLFrameElement.idl:
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::contentWindow):
        * html/HTMLFrameOwnerElement.h:
        * html/HTMLIFrameElement.idl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a11ebbfd
2007-07-17 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
- Make HTMLFrameOwnerElement::contentWindow() return a DOMWindow instead of a Frame
- Remove the unnecessary hack in HTMLFrameElement.idl and HTMLIFrameElement.idl that
converted from Frame to Window now that it is not necessary.
- Remove now unused [NullCheck] extended attribute from CodeGeneratorJS.pm.
* bindings/scripts/CodeGeneratorJS.pm:
* html/HTMLDocument.idl:
* html/HTMLFrameElement.idl:
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::contentWindow):
* html/HTMLFrameOwnerElement.h:
* html/HTMLIFrameElement.idl:
2007-07-16 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
......@@ -927,19 +927,15 @@ sub GenerateImplementation
push(@implContent, " }\n");
push(@implContent, " }\n\n");
push(@implContent, " return toJS(exec, obj.get());\n");
} elsif ($attribute->signature->extendedAttributes->{"NullCheck"}) {
push(@implContent, " return imp->$name() ? $jsType : jsUndefined();\n");
} else {
push(@implContent, " return $jsType;\n");
}
}
} else {
push(@implContent, " ExceptionCode ec = 0;\n");
if ($podType) {
push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, "", "imp.$name(ec)") . ";\n");
} elsif ($attribute->signature->extendedAttributes->{"NullCheck"}) {
push(@implContent, " return imp->$name(ec) ? " . NativeToJSValue($attribute->signature, $implClassNameForValueConversion, "imp->$name(ec)") . " : jsUndefined();\n");
} else {
push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, $implClassNameForValueConversion, "imp->$name(ec)") . ";\n");
}
......@@ -1443,11 +1439,6 @@ sub NativeToJSValue
return "toJS(exec, WTF::getPtr($value), imp)";
}
if ($type eq "Window") {
$implIncludes{"kjs_window.h"} = 1;
return "Window::retrieve(WTF::getPtr($value))";
}
if ($codeGenerator->IsSVGAnimatedType($type)) {
$value =~ s/\(\)//;
$value .= "Animated()";
......
......@@ -66,7 +66,7 @@ module html {
attribute [Custom, Deletable] HTMLCollection all;
attribute [Custom] Window location;
attribute [Custom] Location location;
[Custom] void clear();
#endif
......
......@@ -35,10 +35,7 @@ module html {
readonly attribute [CheckFrameSecurity] Document contentDocument;
// Extensions
#if defined(LANGUAGE_JAVASCRIPT)
// FIXME: this need not be JS only. See http://bugs.webkit.org/show_bug.cgi?id=13798
readonly attribute [NullCheck] Window contentWindow;
#endif
readonly attribute DOMWindow contentWindow;
attribute [ConvertNullToNullString] DOMString location;
readonly attribute long width;
......
/*
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -21,6 +21,7 @@
#include "config.h"
#include "HTMLFrameOwnerElement.h"
#include "DOMWindow.h"
#include "Frame.h"
namespace WebCore {
......@@ -42,4 +43,9 @@ Document* HTMLFrameOwnerElement::contentDocument() const
return m_contentFrame ? m_contentFrame->document() : 0;
}
DOMWindow* HTMLFrameOwnerElement::contentWindow() const
{
return m_contentFrame ? m_contentFrame->domWindow() : 0;
}
} // namespace WebCore
......@@ -25,6 +25,7 @@
namespace WebCore {
class DOMWindow;
class Frame;
class KeyboardEvent;
......@@ -36,7 +37,7 @@ public:
virtual ~HTMLFrameOwnerElement();
Frame* contentFrame() const { return m_contentFrame; }
Frame* contentWindow() const { return contentFrame(); } // alias for JS DOM bindings
DOMWindow* contentWindow() const;
Document* contentDocument() const;
virtual bool isFrameOwnerElement() const { return true; }
......@@ -47,6 +48,6 @@ private:
Frame* m_contentFrame;
};
}
} // namespace WebCore
#endif
#endif // HTMLFrameOwnerElement_h
......@@ -37,10 +37,7 @@ module html {
readonly attribute [CheckFrameSecurity] Document contentDocument;
// Extensions
#if defined(LANGUAGE_JAVASCRIPT)
// FIXME: this need not be JS only. See http://bugs.webkit.org/show_bug.cgi?id=13798
readonly attribute [NullCheck] Window contentWindow;
#endif
readonly attribute DOMWindow contentWindow;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment