Commit 58521793 authored by darin's avatar darin

Reviewed by Maciej.

	- fixed 3135642 -- ad frames are missing at channels.netscape.com

        * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
	same rule as Mozilla: Empty URL for an iframe means "about:blank".

        * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
	a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
	the useless check for an empty document -- it never happens in practice.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c4784143
2002-12-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3135642 -- ad frames are missing at channels.netscape.com
* khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
same rule as Mozilla: Empty URL for an iframe means "about:blank".
* khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
the useless check for an empty document -- it never happens in practice.
2002-12-30 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin and Gramps
......
2002-12-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3135642 -- ad frames are missing at channels.netscape.com
* khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
same rule as Mozilla: Empty URL for an iframe means "about:blank".
* khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
the useless check for an empty document -- it never happens in practice.
2002-12-30 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin and Gramps
......
......@@ -916,16 +916,12 @@ bool Window::isSafeScript(ExecState *exec) const
if ( activePart == m_part ) // Not calling from another frame, no problem.
return true;
if ( m_part->document().isNull() )
return true; // allow to access a window that was just created (e.g. with window.open("about:blank"))
if ( activePart == m_part->opener() &&
shouldLoadAsEmptyDocument(KURL(m_part->document().completeURL("").string())) ) {
return true; // allow access from the window opened this one if it
// made an initially empty document.
// allow access from the window that opened this one if it made an initially empty document
if ( ( activePart == m_part->opener() || activePart == m_part->parentPart() ) &&
shouldLoadAsEmptyDocument(m_part->url()) ) {
return true;
}
DOM::HTMLDocument thisDocument = m_part->htmlDocument();
if ( thisDocument.isNull() ) {
kdDebug(6070) << "Window::isSafeScript: trying to access an XML document !?" << endl;
......
......@@ -800,7 +800,8 @@ void RenderPartObject::updateWidget()
assert(element()->id() == ID_IFRAME);
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(element());
url = o->url.string();
if( url.isEmpty()) return;
if (url.isEmpty())
url = "about:blank";
KHTMLView *v = static_cast<KHTMLView *>(m_view);
v->part()->requestFrame( this, url, o->name.string(), QStringList(), true );
}
......
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