summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLIFrameElement.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/html/HTMLIFrameElement.cpp
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/html/HTMLIFrameElement.cpp')
-rw-r--r--WebCore/html/HTMLIFrameElement.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/WebCore/html/HTMLIFrameElement.cpp b/WebCore/html/HTMLIFrameElement.cpp
index c52587d..4a071bf 100644
--- a/WebCore/html/HTMLIFrameElement.cpp
+++ b/WebCore/html/HTMLIFrameElement.cpp
@@ -1,11 +1,9 @@
-/**
- * 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 Apple Computer, Inc.
+ * Copyright (C) 2004, 2006, 2008 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
@@ -22,6 +20,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+
#include "config.h"
#include "HTMLIFrameElement.h"
@@ -60,28 +59,28 @@ bool HTMLIFrameElement::mapToEntry(const QualifiedName& attrName, MappedAttribut
return HTMLFrameElementBase::mapToEntry(attrName, result);
}
-void HTMLIFrameElement::parseMappedAttribute(MappedAttribute *attr)
+void HTMLIFrameElement::parseMappedAttribute(MappedAttribute* attr)
{
if (attr->name() == widthAttr)
- addCSSLength(attr, CSS_PROP_WIDTH, attr->value());
+ addCSSLength(attr, CSSPropertyWidth, attr->value());
else if (attr->name() == heightAttr)
- addCSSLength(attr, CSS_PROP_HEIGHT, attr->value());
+ addCSSLength(attr, CSSPropertyHeight, attr->value());
else if (attr->name() == alignAttr)
addHTMLAlignment(attr);
else if (attr->name() == nameAttr) {
- String newNameAttr = attr->value();
+ const AtomicString& newName = attr->value();
if (inDocument() && document()->isHTMLDocument()) {
- HTMLDocument* doc = static_cast<HTMLDocument* >(document());
- doc->removeDocExtraNamedItem(oldNameAttr);
- doc->addDocExtraNamedItem(newNameAttr);
+ HTMLDocument* document = static_cast<HTMLDocument*>(this->document());
+ document->removeExtraNamedItem(m_name);
+ document->addExtraNamedItem(newName);
}
- oldNameAttr = newNameAttr;
+ m_name = newName;
} else if (attr->name() == frameborderAttr) {
// Frame border doesn't really match the HTML4 spec definition for iframes. It simply adds
// a presentational hint that the border should be off if set to zero.
if (!attr->isNull() && !attr->value().toInt())
// Add a rule that nulls out our border width.
- addCSSLength(attr, CSS_PROP_BORDER_WIDTH, "0");
+ addCSSLength(attr, CSSPropertyBorderWidth, "0");
} else
HTMLFrameElementBase::parseMappedAttribute(attr);
}
@@ -98,20 +97,16 @@ RenderObject* HTMLIFrameElement::createRenderer(RenderArena* arena, RenderStyle*
void HTMLIFrameElement::insertedIntoDocument()
{
- if (document()->isHTMLDocument()) {
- HTMLDocument* doc = static_cast<HTMLDocument*>(document());
- doc->addDocExtraNamedItem(oldNameAttr);
- }
+ if (document()->isHTMLDocument())
+ static_cast<HTMLDocument*>(document())->addExtraNamedItem(m_name);
HTMLFrameElementBase::insertedIntoDocument();
}
void HTMLIFrameElement::removedFromDocument()
{
- if (document()->isHTMLDocument()) {
- HTMLDocument* doc = static_cast<HTMLDocument*>(document());
- doc->removeDocExtraNamedItem(oldNameAttr);
- }
+ if (document()->isHTMLDocument())
+ static_cast<HTMLDocument*>(document())->removeExtraNamedItem(m_name);
HTMLFrameElementBase::removedFromDocument();
}