本文整理汇总了C++中HistoryItem::addChildItem方法的典型用法代码示例。如果您正苦于以下问题:C++ HistoryItem::addChildItem方法的具体用法?C++ HistoryItem::addChildItem怎么用?C++ HistoryItem::addChildItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HistoryItem
的用法示例。
在下文中一共展示了HistoryItem::addChildItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyFrameState
static void applyFrameState(HistoryItem& historyItem, const FrameState& frameState)
{
historyItem.setOriginalURLString(frameState.originalURLString);
historyItem.setReferrer(frameState.referrer);
historyItem.setTarget(frameState.target);
historyItem.setDocumentState(frameState.documentState);
if (frameState.stateObjectData) {
Vector<uint8_t> stateObjectData = frameState.stateObjectData.value();
historyItem.setStateObject(SerializedScriptValue::adopt(stateObjectData));
}
historyItem.setDocumentSequenceNumber(frameState.documentSequenceNumber);
historyItem.setItemSequenceNumber(frameState.itemSequenceNumber);
historyItem.setScrollPoint(frameState.scrollPoint);
historyItem.setPageScaleFactor(frameState.pageScaleFactor);
if (frameState.httpBody) {
const auto& httpBody = frameState.httpBody.value();
historyItem.setFormContentType(httpBody.contentType);
historyItem.setFormData(toFormData(httpBody));
}
#if PLATFORM(IOS)
historyItem.setExposedContentRect(frameState.exposedContentRect);
historyItem.setUnobscuredContentRect(frameState.unobscuredContentRect);
historyItem.setMinimumLayoutSizeInScrollViewCoordinates(frameState.minimumLayoutSizeInScrollViewCoordinates);
historyItem.setContentSize(frameState.contentSize);
historyItem.setScaleIsInitial(frameState.scaleIsInitial);
#endif
for (const auto& childFrameState : frameState.children) {
Ref<HistoryItem> childHistoryItem = HistoryItem::create(childFrameState.urlString, String());
applyFrameState(childHistoryItem, childFrameState);
historyItem.addChildItem(WTF::move(childHistoryItem));
}
}