| Index: third_party/WebKit/Source/core/frame/History.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/History.cpp b/third_party/WebKit/Source/core/frame/History.cpp
|
| index 43f27ac0b018ae1f83f26d0cc1282159542ebf75..a8ade4515686b731d3e907916077cac755665ec9 100644
|
| --- a/third_party/WebKit/Source/core/frame/History.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/History.cpp
|
| @@ -77,8 +77,10 @@ SerializedScriptValue* History::stateInternal() const {
|
| if (!frame())
|
| return 0;
|
|
|
| - if (HistoryItem* historyItem = frame()->loader().currentItem())
|
| + if (HistoryItem* historyItem =
|
| + frame()->loader().documentLoader()->historyItem()) {
|
| return historyItem->stateObject();
|
| + }
|
|
|
| return 0;
|
| }
|
| @@ -93,7 +95,8 @@ void History::setScrollRestoration(const String& value) {
|
| if (scrollRestoration == scrollRestorationInternal())
|
| return;
|
|
|
| - if (HistoryItem* historyItem = frame()->loader().currentItem()) {
|
| + if (HistoryItem* historyItem =
|
| + frame()->loader().documentLoader()->historyItem()) {
|
| historyItem->setScrollRestorationType(scrollRestoration);
|
| frame()->loader().client()->didUpdateCurrentHistoryItem();
|
| }
|
| @@ -105,12 +108,10 @@ String History::scrollRestoration() {
|
| }
|
|
|
| HistoryScrollRestorationType History::scrollRestorationInternal() const {
|
| - if (frame()) {
|
| - if (HistoryItem* historyItem = frame()->loader().currentItem())
|
| - return historyItem->scrollRestorationType();
|
| - }
|
| -
|
| - return ScrollRestorationAuto;
|
| + HistoryItem* historyItem =
|
| + frame() ? frame()->loader().documentLoader()->historyItem() : nullptr;
|
| + return historyItem ? historyItem->scrollRestorationType()
|
| + : ScrollRestorationAuto;
|
| }
|
|
|
| bool History::stateChanged() const {
|
|
|