当前位置: 首页>>代码示例>>C++>>正文


C++ Page::backForwardList方法代码示例

本文整理汇总了C++中Page::backForwardList方法的典型用法代码示例。如果您正苦于以下问题:C++ Page::backForwardList方法的具体用法?C++ Page::backForwardList怎么用?C++ Page::backForwardList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Page的用法示例。


在下文中一共展示了Page::backForwardList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getPage

// BackForwardList.setCurrentIndex()
JNIEXPORT jint JNICALL Java_com_sun_webkit_BackForwardList_bflSetCurrentIndex(JNIEnv* env, jclass z, jlong jpage, jint index)
{
    Page* page = getPage(jpage);
    BackForwardList* bfl = page->backForwardList();
    if (index < 0 || index >= getSize(bfl))
        return -1;
    int distance = index - bfl->backListCount();
    page->goBackOrForward(distance);
    return index;
}
开发者ID:166MMX,项目名称:openjdk.java.net-openjfx-8u40-rt,代码行数:11,代码来源:BackForwardListJava.cpp

示例2: replaceState

void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
    Page* page = m_frame->page();
    ASSERT(page);
    HistoryItem* current = page->backForwardList()->currentItem();
    ASSERT(current);

    if (!urlString.isEmpty())
        current->setURLString(urlString);
    current->setTitle(title);
    current->setStateObject(stateObject);
}
开发者ID:matthiasbock,项目名称:Samsung-GT-S6102-platform,代码行数:12,代码来源:HistoryController.cpp

示例3: pushState

void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
    if (!m_currentItem)
        return;

    Page* page = m_frame->page();
    ASSERT(page);

    // Get a HistoryItem tree for the current frame tree.
    RefPtr<HistoryItem> item = createItemTree(m_frame, false);
    ASSERT(item->isTargetItem());
    
    // Override data in the target item to reflect the pushState() arguments.
    item->setTitle(title);
    item->setStateObject(stateObject);
    item->setURLString(urlString);

    page->backForwardList()->pushStateItem(item.release());
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例4: pushState

void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, const String& title, const String& urlString)
{
    Page* page = m_frame->page();
    ASSERT(page);

    // Get a HistoryItem tree for the current frame tree.
    RefPtr<HistoryItem> item = createItemTree(m_frame, false);
    ASSERT(item->isTargetItem());
    
    // Override data in the target item to reflect the pushState() arguments.
    item->setTitle(title);
    item->setStateObject(stateObject);
    item->setURLString(urlString);

    // Since the document isn't changed as a result of a pushState call, we
    // should preserve the DocumentSequenceNumber of the previous item.
    item->setDocumentSequenceNumber(m_previousItem->documentSequenceNumber());
    
    page->backForwardList()->pushStateItem(item.release());
}
开发者ID:mikezit,项目名称:Webkit_Code,代码行数:20,代码来源:HistoryController.cpp

示例5: finishedParsing

void WMLDocument::finishedParsing()
{
    if (Tokenizer* tokenizer = this->tokenizer()) {
        if (!tokenizer->wellFormed()) {
            Document::finishedParsing();
            return;
        }
    }

    bool hasAccess = initialize(true);
    Document::finishedParsing();

    if (!hasAccess) {
        m_activeCard = 0;

        WMLPageState* wmlPageState = wmlPageStateForDocument(this);
        if (!wmlPageState)
            return;

        Page* page = wmlPageState->page();
        if (!page)
            return;

        BackForwardList* list = page->backForwardList();
        if (!list)
            return;

        HistoryItem* item = list->backItem();
        if (!item)
            return;

        page->goToItem(item, FrameLoadTypeBackWMLDeckNotAccessible);
        return;
    }

    if (m_activeCard) {
        m_activeCard->handleIntrinsicEventIfNeeded();
        m_activeCard = 0;
    }
}
开发者ID:halfkiss,项目名称:ComponentSuperAccessor,代码行数:40,代码来源:WMLDocument.cpp

示例6: updateBackForwardListClippedAtTarget

void HistoryController::updateBackForwardListClippedAtTarget(bool doClip)
{
    // In the case of saving state about a page with frames, we store a tree of items that mirrors the frame tree.  
    // The item that was the target of the user's navigation is designated as the "targetItem".  
    // When this function is called with doClip=true we're able to create the whole tree except for the target's children, 
    // which will be loaded in the future. That part of the tree will be filled out as the child loads are committed.

    Page* page = m_frame->page();
    if (!page)
        return;

    if (m_frame->loader()->documentLoader()->urlForHistory().isEmpty())
        return;

    Frame* mainFrame = page->mainFrame();
    ASSERT(mainFrame);
    FrameLoader* frameLoader = mainFrame->loader();

    frameLoader->checkDidPerformFirstNavigation();

    RefPtr<HistoryItem> item = frameLoader->history()->createItemTree(m_frame, doClip);
    LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", item.get(), m_frame->loader()->documentLoader()->url().string().ascii().data());
    page->backForwardList()->addItem(item);
}
开发者ID:mikezit,项目名称:Webkit_Code,代码行数:24,代码来源:HistoryController.cpp

示例7: goToItem

// Main funnel for navigating to a previous location (back/forward, non-search snap-back)
// This includes recursion to handle loading into framesets properly
void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type)
{
    ASSERT(!m_frame->tree()->parent());
    
    // shouldGoToHistoryItem is a private delegate method. This is needed to fix:
    // <rdar://problem/3951283> can view pages from the back/forward cache that should be disallowed by Parental Controls
    // Ultimately, history item navigations should go through the policy delegate. That's covered in:
    // <rdar://problem/3979539> back/forward cache navigations should consult policy delegate
    Page* page = m_frame->page();
    if (!page)
        return;
    if (!m_frame->loader()->client()->shouldGoToHistoryItem(targetItem))
        return;

    // Set the BF cursor before commit, which lets the user quickly click back/forward again.
    // - plus, it only makes sense for the top level of the operation through the frametree,
    // as opposed to happening for some/one of the page commits that might happen soon
    BackForwardList* bfList = page->backForwardList();
    HistoryItem* currentItem = bfList->currentItem();    
    bfList->goToItem(targetItem);
    Settings* settings = m_frame->settings();
    page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : targetItem);
    recursiveGoToItem(targetItem, currentItem, type);
}
开发者ID:mikezit,项目名称:Webkit_Code,代码行数:26,代码来源:HistoryController.cpp


注:本文中的Page::backForwardList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。