| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 6ee18f61e55afe37d3068e3a3602f06574072e3f..9fa52bd870e7c6bdb54a33ea9d2a3aa59382c2cd 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -727,12 +727,11 @@ Vector<String> Internals::formControlStateOfPreviousHistoryItem(ExceptionState&
|
| es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return Vector<String>();
|
| }
|
| - String uniqueName = frame()->tree()->uniqueName();
|
| - if (mainItem->target() != uniqueName && !mainItem->childItemWithTarget(uniqueName)) {
|
| + if (!frame()->loader()->history()->currentItem(frame())) {
|
| es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return Vector<String>();
|
| }
|
| - return mainItem->target() == uniqueName ? mainItem->documentState() : mainItem->childItemWithTarget(uniqueName)->documentState();
|
| + return frame()->loader()->history()->currentItem(frame())->documentState();
|
| }
|
|
|
| void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& state, ExceptionState& es)
|
| @@ -742,11 +741,8 @@ void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& s
|
| es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
| - String uniqueName = frame()->tree()->uniqueName();
|
| - if (mainItem->target() == uniqueName)
|
| - mainItem->setDocumentState(state);
|
| - else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName))
|
| - subItem->setDocumentState(state);
|
| + if (HistoryItem* item = frame()->loader()->history()->currentItem(frame()))
|
| + item->setDocumentState(state);
|
| else
|
| es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| }
|
| @@ -2065,8 +2061,8 @@ PassRefPtr<TypeConversions> Internals::typeConversions() const
|
|
|
| Vector<String> Internals::getReferencedFilePaths() const
|
| {
|
| - frame()->loader()->history()->saveDocumentAndScrollState();
|
| - return FormController::getReferencedFilePaths(frame()->loader()->history()->currentItem()->documentState());
|
| + frame()->loader()->history()->saveDocumentAndScrollState(frame());
|
| + return FormController::getReferencedFilePaths(frame()->loader()->history()->currentItem(frame())->documentState());
|
| }
|
|
|
| void Internals::startTrackingRepaints(Document* document, ExceptionState& es)
|
|
|