Lines Matching full:item
56 static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item);
85 // Remove each item instead of using close(). close() is intended to be used
91 // Add the current item back to the list.
101 * current history item stored in the child frame's loader does not
102 * match the item found in the history tree. If we remove all the
107 * all the frames first and then look up the history item. We do this
108 * because the history item in the tree may be null at this point.
115 // Fix the top-level item.
118 // Remember the parent history item so we can search for a child item.
121 // Use the old history item since the current one may have a
123 WebCore::HistoryItem* item = parent->childItemWithTarget(child->tree()->name());
124 child->loader()->history()->setCurrentItem(item);
126 // item, then we do not need to traverse the children since there
127 // will be no parent history item.
129 if (item && (firstChild = child->tree()->firstChild()))
137 // Figure out the parent history item used when searching for
138 // the history item to use.
173 // Inflate the item recursively. If it fails, that is ok. We'll have an
175 // item.
184 // Add the new item to the back/forward list.
188 // Update the item.
196 jbyteArray WebHistory::Flatten(JNIEnv* env, WTF::Vector<char>& v, WebCore::HistoryItem* item)
198 if (!item)
204 // Write the top-level history item and then write all the children
206 LOG_ASSERT(item->bridge(), "Why don't we have a bridge object here?");
207 write_item(v, item);
208 write_children_recursive(v, item);
221 WebCore::HistoryItem* item) : WebCore::AndroidWebHistoryBridge(item) {
235 void WebHistoryItem::updateHistoryItem(WebCore::HistoryItem* item) {
253 item = webItem->historyItem();
254 if (!item) {
266 // Don't do anything if the item has been gc'd already
271 const WebCore::String& urlString = item->urlString();
275 const WebCore::String& originalUrlString = item->originalURLString();
282 const WebCore::String& titleString = item->title();
287 // Try to get the favicon from the history item. For some pages like Grand
289 // item, try to get the icon using the url without the ref.
291 WebCore::String url = item->urlString();
292 if (item->url().hasFragmentIdentifier()) {
303 jbyteArray array = WebHistory::Flatten(env, data, item);
314 static void historyItemChanged(WebCore::HistoryItem* item) {
315 LOG_ASSERT(item, "historyItemChanged called with a null item");
317 if (item->bridge())
318 item->bridge()->updateHistoryItem(item);
321 void WebHistory::AddItem(const AutoJObject& list, WebCore::HistoryItem* item)
323 LOG_ASSERT(item, "newItem must take a valid HistoryItem!");
324 // Item already added. Should only happen when we are inflating the list.
325 if (item->bridge() || !list.get())
333 // Create the bridge, make it active, and attach it to the item.
334 WebHistoryItem* bridge = new WebHistoryItem(env, newItem, item);
336 item->setBridge(bridge);
338 // Update the history item which will flatten the data and call update on
339 // the java item.
340 bridge->updateHistoryItem(item);
389 static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item)
392 write_string(v, item->originalURLString());
395 write_string(v, item->urlString());
398 write_string(v, item->title());
401 write_string(v, item->formContentType());
404 const WebCore::FormData* formData = item->formData();
414 write_string(v, item->target());
416 AndroidWebHistoryBridge* bridge = item->bridge();
427 const WTF::Vector<WebCore::String>& docState = item->documentState();
436 // Is target item
437 LOGV("Writing isTargetItem %d", item->isTargetItem());
438 v.append((char)item->isTargetItem());
441 unsigned childCount = item->children().size();
451 WebCore::HistoryItem* item = (*i).get();
453 "The parent item should have a bridge object!");
454 if (!item->bridge()) {
456 item->setBridge(bridge);
459 // The only time this item's parent may not be the same as the
462 WebHistoryItem* bridge = static_cast<WebHistoryItem*>(item->bridge());
466 "Somehow this item has an incorrect parent");
469 write_item(v, item);
470 write_children_recursive(v, item);
646 // Read is target item
652 LOGV("Target item %d", c);
673 // Read the child item.
697 WTF::RefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create();
698 WebCore::HistoryItem* testItem = item.get();
749 // Is target item