Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: Source/WebCore/history/HistoryItem.cpp

Issue 10918017: Merge 126839 - REGRESSION(r109480): Form state for iframe content is not restored (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/history/HistoryItem.h ('k') | Source/WebCore/loader/HistoryController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/history/HistoryItem.cpp
===================================================================
--- Source/WebCore/history/HistoryItem.cpp (revision 127219)
+++ Source/WebCore/history/HistoryItem.cpp (working copy)
@@ -532,6 +532,18 @@
m_children.clear();
}
+bool HistoryItem::isAncestorOf(const HistoryItem* item) const
+{
+ for (size_t i = 0; i < m_children.size(); ++i) {
+ HistoryItem* child = m_children[i].get();
+ if (child == item)
+ return true;
+ if (child->isAncestorOf(item))
+ return true;
+ }
+ return false;
+}
+
// We do same-document navigation if going to a different item and if either of the following is true:
// - The other item corresponds to the same document (for history entries created via pushState or fragment changes).
// - The other item corresponds to the same set of documents, including frames (for history entries created via regular navigation)
« no previous file with comments | « Source/WebCore/history/HistoryItem.h ('k') | Source/WebCore/loader/HistoryController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698