summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLFrameElementBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLFrameElementBase.cpp')
-rw-r--r--WebCore/html/HTMLFrameElementBase.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/WebCore/html/HTMLFrameElementBase.cpp b/WebCore/html/HTMLFrameElementBase.cpp
index 037c755..6438f3c 100644
--- a/WebCore/html/HTMLFrameElementBase.cpp
+++ b/WebCore/html/HTMLFrameElementBase.cpp
@@ -1,9 +1,11 @@
-/*
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Simon Hausmann (hausmann@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2006 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -20,7 +22,6 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
#include "config.h"
#include "HTMLFrameElementBase.h"
@@ -60,25 +61,28 @@ bool HTMLFrameElementBase::isURLAllowed(const AtomicString& URLString) const
if (URLString.isEmpty())
return true;
- KURL completeURL(document()->completeURL(URLString));
+ KURL completeURL(document()->completeURL(URLString.deprecatedString()));
+ completeURL.setRef(DeprecatedString::null);
// Don't allow more than 200 total frames in a set. This seems
// like a reasonable upper bound, and otherwise mutually recursive
// frameset pages can quickly bring the program to its knees with
// exponential growth in the number of frames.
- // FIXME: This limit could be higher, but because WebKit has some
+
+ // FIXME: This limit could be higher, but WebKit has some
// algorithms that happen while loading which appear to be N^2 or
- // worse in the number of frames, we'll keep it at 200 for now.
- if (Frame* parentFrame = document()->frame()) {
+ // worse in the number of frames
+ if (Frame* parentFrame = document()->frame())
if (parentFrame->page()->frameCount() > 200)
return false;
- }
// We allow one level of self-reference because some sites depend on that.
// But we don't allow more than one.
bool foundSelfReference = false;
for (Frame* frame = document()->frame(); frame; frame = frame->tree()->parent()) {
- if (equalIgnoringRef(frame->loader()->url(), completeURL)) {
+ KURL frameURL = frame->loader()->url();
+ frameURL.setRef(DeprecatedString::null);
+ if (frameURL == completeURL) {
if (foundSelfReference)
return false;
foundSelfReference = true;
@@ -96,7 +100,7 @@ void HTMLFrameElementBase::openURL()
return;
if (m_URL.isEmpty())
- m_URL = blankURL().string();
+ m_URL = "about:blank";
Frame* parentFrame = document()->frame();
if (!parentFrame)
@@ -199,7 +203,7 @@ void HTMLFrameElementBase::attach()
renderPart->setWidget(frame->view());
}
-KURL HTMLFrameElementBase::location() const
+String HTMLFrameElementBase::location() const
{
return src();
}
@@ -298,7 +302,7 @@ void HTMLFrameElementBase::setScrolling(const String &value)
setAttribute(scrollingAttr, value);
}
-KURL HTMLFrameElementBase::src() const
+String HTMLFrameElementBase::src() const
{
return document()->completeURL(getAttribute(srcAttr));
}