summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp
index a692d08..1e09595 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFrameElementBase.cpp
@@ -34,7 +34,9 @@
#include "FrameView.h"
#include "HTMLFrameSetElement.h"
#include "HTMLNames.h"
+#include "ScriptEventListener.h"
#include "KURL.h"
+#include "MappedAttribute.h"
#include "Page.h"
#include "RenderFrame.h"
#include "Settings.h"
@@ -43,8 +45,8 @@ namespace WebCore {
using namespace HTMLNames;
-HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tagName, Document* doc, bool createdByParser)
- : HTMLFrameOwnerElement(tagName, doc, createdByParser)
+HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tagName, Document* document)
+ : HTMLFrameOwnerElement(tagName, document)
, m_scrolling(ScrollbarAuto)
, m_marginWidth(-1)
, m_marginHeight(-1)
@@ -140,10 +142,10 @@ void HTMLFrameElementBase::parseMappedAttribute(MappedAttribute *attr)
if (contentFrame())
contentFrame()->setInViewSourceMode(viewSourceMode());
} else if (attr->name() == onloadAttr) {
- setInlineEventListenerForTypeAndAttribute(eventNames().loadEvent, attr);
+ setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
} else if (attr->name() == onbeforeunloadAttr) {
// FIXME: should <frame> elements have beforeunload handlers?
- setInlineEventListenerForTypeAndAttribute(eventNames().beforeunloadEvent, attr);
+ setAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(this, attr));
} else
HTMLFrameOwnerElement::parseMappedAttribute(attr);
}
@@ -311,7 +313,7 @@ int HTMLFrameElementBase::width() const
return 0;
document()->updateLayoutIgnorePendingStylesheets();
- return renderer()->width();
+ return toRenderBox(renderer())->width();
}
int HTMLFrameElementBase::height() const
@@ -320,7 +322,7 @@ int HTMLFrameElementBase::height() const
return 0;
document()->updateLayoutIgnorePendingStylesheets();
- return renderer()->height();
+ return toRenderBox(renderer())->height();
}
} // namespace WebCore