本文整理汇总了C++中FrameView::deref方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::deref方法的具体用法?C++ FrameView::deref怎么用?C++ FrameView::deref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameView
的用法示例。
在下文中一共展示了FrameView::deref方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initView
void WebKitPart::initView(QWidget* parentWidget, GUIProfile prof)
{
if (prof == DefaultGUI)
setXMLFile("WebKitPart.rc");
else if (prof == BrowserViewGUI)
setXMLFile("WebKitPartBrowser.rc");
m_client = new WebKitPartClient(this);
// Initialize WebCore in Qt platform mode...
Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(), new EditorClientQt(), new DragClientQt(), new InspectorClientQt());
Frame* frame = new FrameQt(page, 0, m_client);
m_frame = frame;
frame->deref(); // Frames are created with a refcount of 1. Release this ref, since we've assigned it to a RefPtr
page->setMainFrame(frame);
FrameView* frameView = new FrameView(frame);
m_frameView = frameView;
frameView->deref(); // FrameViews are created with a refcount of 1. Release this ref, since we've assigned it to a RefPtr
m_frame->setView(frameView);
m_frameView->setParentWidget(parentWidget);
m_frame->init();
// Initialize KParts widget...
setWidget(m_frame->view()->qwidget());
}
示例2: transitionToCommittedForNewPage
void FrameLoaderClientWx::transitionToCommittedForNewPage()
{
ASSERT(m_frame);
ASSERT(m_webView);
Page* page = m_frame->page();
ASSERT(page);
bool isMainFrame = m_frame == page->mainFrame();
m_frame->setView(0);
FrameView* frameView;
if (isMainFrame)
frameView = new FrameView(m_frame, IntRect(m_webView->GetRect()).size());
else
frameView = new FrameView(m_frame);
ASSERT(frameView);
m_frame->setView(frameView);
frameView->deref(); // FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame.
frameView->setPlatformWidget(m_webView);
if (m_frame->ownerRenderer())
m_frame->ownerRenderer()->setWidget(frameView);
if (HTMLFrameOwnerElement* owner = m_frame->ownerElement())
m_frame->view()->setScrollbarModes(owner->scrollingMode(), owner->scrollingMode());
}
示例3: transitionToCommittedForNewPage
void FrameLoaderClient::transitionToCommittedForNewPage(Frame* frame,
const IntSize& viewportSize,
const Color& backgroundColor, bool transparent,
const IntSize& fixedLayoutSize, bool useFixedLayout,
ScrollbarMode horizontalScrollbarMode, ScrollbarMode verticalScrollbarMode)
{
ASSERT(frame);
Page* page = frame->page();
ASSERT(page);
bool isMainFrame = frame == page->mainFrame();
if (isMainFrame && frame->view())
frame->view()->setParentVisible(false);
frame->setView(0);
FrameView* frameView;
if (isMainFrame) {
frameView = new FrameView(frame, viewportSize);
frameView->setFixedLayoutSize(fixedLayoutSize);
frameView->setUseFixedLayout(useFixedLayout);
} else
frameView = new FrameView(frame);
frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode);
frameView->updateDefaultScrollbarState();
frame->setView(frameView);
// FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame.
frameView->deref();
if (backgroundColor.isValid())
frameView->updateBackgroundRecursively(backgroundColor, transparent);
if (isMainFrame)
frameView->setParentVisible(true);
if (frame->ownerRenderer())
frame->ownerRenderer()->setWidget(frameView);
if (HTMLFrameOwnerElement* owner = frame->ownerElement())
frame->view()->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff);
}
示例4: webkit_gtk_frame_init_with_page
GObject* webkit_gtk_frame_init_with_page(WebKitGtkPage* page, HTMLFrameOwnerElement* element)
{
WebKitGtkFrame* frame = WEBKIT_GTK_FRAME(g_object_new(WEBKIT_GTK_TYPE_FRAME, NULL));
WebKitGtkFramePrivate* frameData = WEBKIT_GTK_FRAME_GET_PRIVATE(frame);
WebKitGtkPagePrivate* pageData = WEBKIT_GTK_PAGE_GET_PRIVATE(page);
frameData->client = new WebKit::FrameLoaderClient(frame);
frameData->frame = new Frame(pageData->page, element, frameData->client);
FrameView* frameView = new FrameView(frameData->frame);
frameView->setContainingWindow(GTK_CONTAINER(page));
frameData->frame->setView(frameView);
frameView->deref();
frameData->frame->init();
frameData->page = page;
return G_OBJECT(frame);
}
示例5: transitionToCommittedForNewPage
void WebFrameLoaderClient::transitionToCommittedForNewPage()
{
Frame* frame = core(m_webFrame);
ASSERT(frame);
Page* page = frame->page();
ASSERT(page);
bool isMainFrame = frame == page->mainFrame();
/* if (isMainFrame && frame->view())
frame->view()->detachFromWindow();*/
frame->setView(0);
m_webFrame->updateBackground();
WebView* webView = m_webFrame->webView();
FrameView* frameView;
if (isMainFrame) {
IntRect rect = webView->frameRect();
frameView = new FrameView(frame, rect.size());
} else
frameView = new FrameView(frame);
frame->setView(frameView);
frameView->deref(); // FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame.
BalWidget* viewWindow = webView->viewWindow();
if (viewWindow)
frameView->setContainingWindow(viewWindow);
/*if (isMainFrame)
frameView->attachToWindow();*/
if (frame->ownerRenderer())
frame->ownerRenderer()->setWidget(frameView);
if (HTMLFrameOwnerElement* owner = frame->ownerElement())
frame->view()->setScrollbarsMode(owner->scrollingMode());
}
示例6: transitionToCommittedForNewPage
void WebFrameLoaderClient::transitionToCommittedForNewPage()
{
Frame* frame = core(m_webFrame);
ASSERT(frame);
Page* page = frame->page();
ASSERT(page);
bool isMainFrame = frame == page->mainFrame();
if (isMainFrame && frame->view())
frame->view()->setParentVisible(false);
frame->setView(0);
WebView* webView = m_webFrame->webView();
FrameView* frameView;
if (isMainFrame) {
RECT rect;
webView->frameRect(&rect);
frameView = new FrameView(frame, IntRect(rect).size());
} else
frameView = new FrameView(frame);
frame->setView(frameView);
frameView->deref(); // FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame.
m_webFrame->updateBackground();
if (isMainFrame)
frameView->setParentVisible(true);
if (frame->ownerRenderer())
frame->ownerRenderer()->setWidget(frameView);
if (HTMLFrameOwnerElement* owner = frame->ownerElement())
frame->view()->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff);
}
示例7: transitionToCommittedForNewPage
void FrameLoaderClientQt::transitionToCommittedForNewPage()
{
ASSERT(m_frame);
ASSERT(m_webFrame);
Page* page = m_frame->page();
ASSERT(page);
bool isMainFrame = m_frame == page->mainFrame();
m_frame->setView(0);
FrameView* frameView;
if (isMainFrame)
frameView = new FrameView(m_frame, m_webFrame->page()->viewportSize());
else
frameView = new FrameView(m_frame);
if (!m_webFrame->d->allowsScrolling)
frameView->setScrollbarsMode(ScrollbarAlwaysOff);
if (m_webFrame->d->marginWidth != -1)
frameView->setMarginWidth(m_webFrame->d->marginWidth);
if (m_webFrame->d->marginHeight != -1)
frameView->setMarginHeight(m_webFrame->d->marginHeight);
if (m_webFrame->d->horizontalScrollBarPolicy != Qt::ScrollBarAsNeeded)
frameView->setHScrollbarMode((ScrollbarMode)m_webFrame->d->horizontalScrollBarPolicy);
if (m_webFrame->d->verticalScrollBarPolicy != Qt::ScrollBarAsNeeded)
frameView->setVScrollbarMode((ScrollbarMode)m_webFrame->d->verticalScrollBarPolicy);
m_frame->setView(frameView);
// FrameViews are created with a ref count of 1. Release this ref since we've assigned it to frame.
frameView->deref();
if (m_webFrame && m_webFrame->page())
m_webFrame->d->updateBackground();
if (m_frame->ownerRenderer())
m_frame->ownerRenderer()->setWidget(frameView);
}