summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLIFrameElement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebCore/html/HTMLIFrameElement.cpp
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebCore/html/HTMLIFrameElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLIFrameElement.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/Source/WebCore/html/HTMLIFrameElement.cpp b/Source/WebCore/html/HTMLIFrameElement.cpp
index 817b5d749..5cba88842 100644
--- a/Source/WebCore/html/HTMLIFrameElement.cpp
+++ b/Source/WebCore/html/HTMLIFrameElement.cpp
@@ -48,32 +48,12 @@ PassRefPtr<HTMLIFrameElement> HTMLIFrameElement::create(const QualifiedName& tag
return adoptRef(new HTMLIFrameElement(tagName, document));
}
-bool HTMLIFrameElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
-{
- if (attrName == widthAttr || attrName == heightAttr) {
- result = eUniversal;
- return false;
- }
-
- if (attrName == alignAttr) {
- result = eReplaced; // Share with <img> since the alignment behavior is the same.
- return false;
- }
-
- if (attrName == frameborderAttr) {
- result = eReplaced;
- return false;
- }
-
- return HTMLFrameElementBase::mapToEntry(attrName, result);
-}
-
-void HTMLIFrameElement::parseMappedAttribute(Attribute* attr)
+void HTMLIFrameElement::parseAttribute(Attribute* attr)
{
if (attr->name() == widthAttr)
- addCSSLength(attr, CSSPropertyWidth, attr->value());
+ addCSSLength(CSSPropertyWidth, attr->value());
else if (attr->name() == heightAttr)
- addCSSLength(attr, CSSPropertyHeight, attr->value());
+ addCSSLength(CSSPropertyHeight, attr->value());
else if (attr->name() == alignAttr)
addHTMLAlignment(attr);
else if (attr->name() == nameAttr) {
@@ -87,13 +67,15 @@ void HTMLIFrameElement::parseMappedAttribute(Attribute* attr)
} 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())
+ if (!attr->isNull() && !attr->value().toInt()) {
// Add a rule that nulls out our border width.
- addCSSLength(attr, CSSPropertyBorderWidth, "0");
+ addCSSLength(CSSPropertyBorderWidth, "0");
+ } else
+ removeCSSProperty(CSSPropertyBorderWidth);
} else if (attr->name() == sandboxAttr)
setSandboxFlags(attr->isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(attr->value()));
else
- HTMLFrameElementBase::parseMappedAttribute(attr);
+ HTMLFrameElementBase::parseAttribute(attr);
}
bool HTMLIFrameElement::rendererIsNeeded(const NodeRenderingContext& context)