summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLFrameSetElement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:09:45 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:10:13 +0100
commit470286ecfe79d59df14944e5b5d34630fc739391 (patch)
tree43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/html/HTMLFrameSetElement.cpp
parent23037105e948c2065da5a937d3a2396b0ff45c1e (diff)
downloadqtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLFrameSetElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLFrameSetElement.cpp97
1 files changed, 48 insertions, 49 deletions
diff --git a/Source/WebCore/html/HTMLFrameSetElement.cpp b/Source/WebCore/html/HTMLFrameSetElement.cpp
index a2e2f829a..e89f6ee2c 100644
--- a/Source/WebCore/html/HTMLFrameSetElement.cpp
+++ b/Source/WebCore/html/HTMLFrameSetElement.cpp
@@ -71,29 +71,28 @@ bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) con
return HTMLElement::isPresentationAttribute(name);
}
-void HTMLFrameSetElement::collectStyleForAttribute(const Attribute& attribute, StylePropertySet* style)
+void HTMLFrameSetElement::collectStyleForPresentationAttribute(const Attribute& attribute, StylePropertySet* style)
{
if (attribute.name() == bordercolorAttr)
addHTMLColorToStyle(style, CSSPropertyBorderColor, attribute.value());
else
- HTMLElement::collectStyleForAttribute(attribute, style);
+ HTMLElement::collectStyleForPresentationAttribute(attribute, style);
}
-void HTMLFrameSetElement::parseAttribute(const Attribute& attribute)
+void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (attribute.name() == rowsAttr) {
- if (!attribute.isNull()) {
- m_rowLengths = newLengthArray(attribute.value().string(), m_totalRows);
+ if (name == rowsAttr) {
+ if (!value.isNull()) {
+ m_rowLengths = newLengthArray(value.string(), m_totalRows);
setNeedsStyleRecalc();
}
- } else if (attribute.name() == colsAttr) {
- if (!attribute.isNull()) {
- m_colLengths = newLengthArray(attribute.value().string(), m_totalCols);
+ } else if (name == colsAttr) {
+ if (!value.isNull()) {
+ m_colLengths = newLengthArray(value.string(), m_totalCols);
setNeedsStyleRecalc();
}
- } else if (attribute.name() == frameborderAttr) {
- if (!attribute.isNull()) {
- const AtomicString& value = attribute.value();
+ } else if (name == frameborderAttr) {
+ if (!value.isNull()) {
if (equalIgnoringCase(value, "no") || equalIgnoringCase(value, "0")) {
m_frameborder = false;
m_frameborderSet = true;
@@ -104,50 +103,50 @@ void HTMLFrameSetElement::parseAttribute(const Attribute& attribute)
m_frameborder = false;
m_frameborderSet = false;
}
- } else if (attribute.name() == noresizeAttr) {
+ } else if (name == noresizeAttr) {
m_noresize = true;
- } else if (attribute.name() == borderAttr) {
- if (!attribute.isNull()) {
- m_border = attribute.value().toInt();
+ } else if (name == borderAttr) {
+ if (!value.isNull()) {
+ m_border = value.toInt();
m_borderSet = true;
} else
m_borderSet = false;
- } else if (attribute.name() == bordercolorAttr)
- m_borderColorSet = !attribute.isEmpty();
- else if (attribute.name() == onloadAttr)
- document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onbeforeunloadAttr)
- document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onunloadAttr)
- document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onblurAttr)
- document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onfocusAttr)
- document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onfocusinAttr)
- document()->setWindowAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onfocusoutAttr)
- document()->setWindowAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(document()->frame(), attribute));
+ } else if (name == bordercolorAttr)
+ m_borderColorSet = !value.isEmpty();
+ else if (name == onloadAttr)
+ document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onbeforeunloadAttr)
+ document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onunloadAttr)
+ document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onblurAttr)
+ document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onfocusAttr)
+ document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onfocusinAttr)
+ document()->setWindowAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onfocusoutAttr)
+ document()->setWindowAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(document()->frame(), name, value));
#if ENABLE(ORIENTATION_EVENTS)
- else if (attribute.name() == onorientationchangeAttr)
- document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), attribute));
+ else if (name == onorientationchangeAttr)
+ document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), name, value));
#endif
- else if (attribute.name() == onhashchangeAttr)
- document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onresizeAttr)
- document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onscrollAttr)
- document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onstorageAttr)
- document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == ononlineAttr)
- document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onofflineAttr)
- document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), attribute));
- else if (attribute.name() == onpopstateAttr)
- document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), attribute));
+ else if (name == onhashchangeAttr)
+ document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onresizeAttr)
+ document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onscrollAttr)
+ document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onstorageAttr)
+ document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == ononlineAttr)
+ document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onofflineAttr)
+ document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), name, value));
+ else if (name == onpopstateAttr)
+ document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), name, value));
else
- HTMLElement::parseAttribute(attribute);
+ HTMLElement::parseAttribute(name, value);
}
bool HTMLFrameSetElement::rendererIsNeeded(const NodeRenderingContext& context)