summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 0d78729..6d71e5a 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -94,7 +94,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "GraphicsContext.h"
#include "HTMLCollection.h"
#include "HTMLHeadElement.h"
-#include "HTMLFrameOwnerElement.h"
#include "HTMLLinkElement.h"
#include "HTMLNames.h"
#include "HistoryItem.h"
@@ -185,6 +184,7 @@ using WebCore::FrameLoadType;
using WebCore::FrameTree;
using WebCore::FrameView;
using WebCore::HistoryItem;
+using WebCore::HTMLFrameElementBase;
using WebCore::IntRect;
using WebCore::KURL;
using WebCore::Node;
@@ -1455,12 +1455,12 @@ void WebFrameImpl::CreateFrameView() {
WebViewImpl* web_view = GetWebViewImpl();
- RefPtr<WebCore::FrameView> view;
+ WebCore::FrameView* view;
if (is_main_frame) {
IntSize size = webkit_glue::WebSizeToIntSize(web_view->size());
- view = FrameView::create(frame_, size);
+ view = new FrameView(frame_, size);
} else {
- view = FrameView::create(frame_);
+ view = new FrameView(frame_);
}
frame_->setView(view);
@@ -1471,7 +1471,7 @@ void WebFrameImpl::CreateFrameView() {
// TODO(darin): The Mac code has a comment about this possibly being
// unnecessary. See installInFrame in WebCoreFrameBridge.mm
if (frame_->ownerRenderer())
- frame_->ownerRenderer()->setWidget(view.get());
+ frame_->ownerRenderer()->setWidget(view);
if (HTMLFrameOwnerElement* owner = frame_->ownerElement()) {
view->setCanHaveScrollbars(
@@ -1480,6 +1480,10 @@ void WebFrameImpl::CreateFrameView() {
if (is_main_frame)
view->setParentVisible(true);
+
+ // FrameViews are created with a refcount of 1 so it needs releasing after we
+ // assign it to a RefPtr.
+ view->deref();
}
// static