Commit 51781d7a authored by hyatt's avatar hyatt

Make iframes work properly with frameborder="0".

        Reviewed by aroben

        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::mapToEntry):
        (WebCore::HTMLIFrameElement::parseMappedAttribute):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 98dc6bb9
2007-03-18 David Hyatt <hyatt@apple.com>
Make iframes work properly with frameborder="0".
Reviewed by aroben
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::mapToEntry):
(WebCore::HTMLIFrameElement::parseMappedAttribute):
2007-03-18 David Hyatt <hyatt@apple.com>
Add a 2px border by default to <iframe>s for compatibility with other browsers.
......
......@@ -53,6 +53,11 @@ bool HTMLIFrameElement::mapToEntry(const QualifiedName& attrName, MappedAttribut
return false;
}
if (attrName == frameborderAttr) {
result = eReplaced;
return false;
}
return HTMLFrameElementBase::mapToEntry(attrName, result);
}
......@@ -72,6 +77,12 @@ void HTMLIFrameElement::parseMappedAttribute(MappedAttribute *attr)
doc->addDocExtraNamedItem(newNameAttr);
}
oldNameAttr = newNameAttr;
} 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");
} else
HTMLFrameElementBase::parseMappedAttribute(attr);
}
......
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