VisiblePosition vp = ....; Position p = vp.toPosition(); Position deepEqualPos = vp.deepEquivalent(p);
VisiblePosition vp = ....; Position startPos = vp.toPosition(); Position endPos = vp.next(); for (Position p = startPos; !p.isNull() && p != endPos; p = p.next()) { // Traverse nodes in the containing DOM tree }In this example, the deepEquivalent() function is not directly used, but the VisiblePosition is converted to a Position object which can be used to traverse the nodes in the containing DOM tree. Package Library: WebKit Library of C++