本文整理汇总了C++中webcore::FrameView::layout方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::layout方法的具体用法?C++ FrameView::layout怎么用?C++ FrameView::layout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::FrameView
的用法示例。
在下文中一共展示了FrameView::layout方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: result
static char*
_dumpFramesAsText(LayoutTestController* controller, WebCore::Frame* in_core_frame, bool is_main_frame)
{
WTF::String result("");
// Add header for all but the main frame.
WebCore::FrameView* view = in_core_frame->view();
if (view && view->layoutPending())
view->layout();
WebCore::Element* document_element = in_core_frame->document()->documentElement();
WTF::String inner_text = document_element->innerText();
if (!is_main_frame) {
WTF::String frame_name(in_core_frame->tree().name());
result.append("\n--------\nFrame: '");
result.append(frame_name);
result.append("'\n--------\n");
}
result.append(inner_text);
result.append("\n");
if (controller->dumpChildFramesAsText()) {
for (WebCore::Frame* child = in_core_frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
char* tmp = _dumpFramesAsText(controller, child, false);
result.append(tmp);
free(tmp);
}
}
return strdup(result.utf8().data());
}
示例2: setMediaType
void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type)
{
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
view->layout();
}
示例3: scroll
void BWebPage::scroll(int xOffset, int yOffset, const BRect& rectToScroll,
const BRect& clipRect)
{
if (!fWebView->LockLooper())
return;
BBitmap* bitmap = fWebView->OffscreenBitmap();
BView* offscreenView = fWebView->OffscreenView();
// Lock the offscreen bitmap while we still have the
// window locked. This cannot deadlock and makes sure
// the window is not deleting the offscreen view right
// after we unlock it and before locking the bitmap.
if (!bitmap->Lock()) {
fWebView->UnlockLooper();
return;
}
fWebView->UnlockLooper();
BRect clip = offscreenView->Bounds();
if (clipRect.IsValid())
clip = clip & clipRect;
BRect rectAtSrc = rectToScroll;
BRect rectAtDst = rectAtSrc.OffsetByCopy(xOffset, yOffset);
BRegion repaintRegion(rectAtSrc);
if (clip.Intersects(rectAtSrc) && clip.Intersects(rectAtDst)) {
// clip source rect
rectAtSrc = rectAtSrc & clip;
// clip dest rect
rectAtDst = rectAtDst & clip;
// move dest back over source and clip source to dest
rectAtDst.OffsetBy(-xOffset, -yOffset);
rectAtSrc = rectAtSrc & rectAtDst;
// remember the part that will be clean
rectAtDst.OffsetBy(xOffset, yOffset);
repaintRegion.Exclude(rectAtDst);
offscreenView->CopyBits(rectAtSrc, rectAtDst);
}
if (repaintRegion.Frame().IsValid()) {
WebCore::Frame* frame = fMainFrame->Frame();
WebCore::FrameView* view = frame->view();
// Make sure the view is layouted, since it will refuse to paint
// otherwise.
fLayoutingView = true;
view->layout(true);
fLayoutingView = false;
internalPaint(offscreenView, view, &repaintRegion);
}
bitmap->Unlock();
// Notify the view that it can now pull the bitmap in its own thread
fWebView->SetOffscreenViewClean(rectToScroll, false);
}
示例4: paint
void BWebPage::paint(BRect rect, bool immediate)
{
if (fLayoutingView || !rect.IsValid())
return;
// Block any drawing as long as the BWebView is hidden
// (should be extended to when the containing BWebWindow is not
// currently on screen either...)
if (!fPageVisible) {
fPageDirty = true;
return;
}
// NOTE: fMainFrame can be 0 because init() eventually ends up calling
// paint()! BWebFrame seems to cause an initial page to be loaded, maybe
// this ought to be avoided also for start-up speed reasons!
if (!fMainFrame)
return;
WebCore::Frame* frame = fMainFrame->Frame();
WebCore::FrameView* view = frame->view();
if (!view || !frame->contentRenderer())
return;
// Since calling layoutIfNeededRecursive can cycle back into paint(),
// call this method before locking the window and before holding the
// offscreen view lock.
fLayoutingView = true;
view->layout(true);
fLayoutingView = false;
if (!fWebView->LockLooper())
return;
BView* offscreenView = fWebView->OffscreenView();
// Lock the offscreen bitmap while we still have the
// window locked. This cannot deadlock and makes sure
// the window is not deleting the offscreen view right
// after we unlock it and before locking the bitmap.
if (!offscreenView->LockLooper()) {
fWebView->UnlockLooper();
return;
}
fWebView->UnlockLooper();
if (!rect.IsValid())
rect = offscreenView->Bounds();
BRegion region(rect);
internalPaint(offscreenView, view, ®ion);
offscreenView->UnlockLooper();
fPageDirty = false;
// Notify the window that it can now pull the bitmap in its own thread
fWebView->SetOffscreenViewClean(rect, immediate);
}
示例5: renderTreeDump
String DumpRenderTreeSupportEfl::renderTreeDump(Evas_Object* ewkFrame)
{
DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, String());
WebCore::FrameView *frameView = frame->view();
if (frameView && frameView->layoutPending())
frameView->layout();
return WebCore::externalRepresentation(frame);
}
示例6: layoutFrame
void DumpRenderTreeSupportEfl::layoutFrame(Evas_Object* ewkFrame)
{
WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
if (!frame)
return;
WebCore::FrameView* frameView = frame->view();
if (!frameView)
return;
frameView->layout();
}
示例7: strdup
char*
DumpRenderTreeWKC::dumpRenderTree(WKC::WKCWebFrame* frame)
{
WKC::Frame* wkcframe = frame->core();
WebCore::Frame* core_frame= wkcframe->priv().webcore();
if (!core_frame)
return strdup("");
WebCore::FrameView* view = core_frame->view();
if (view && view->layoutPending())
view->layout();
WTF::String string = WebCore::externalRepresentation(core_frame);
return strdup(string.utf8().data());
}