| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 Document* activeDocument = toDocument(context); | 117 Document* activeDocument = toDocument(context); |
| 118 if (!activeDocument) | 118 if (!activeDocument) |
| 119 return; | 119 return; |
| 120 | 120 |
| 121 if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*m_fra
me)) | 121 if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*m_fra
me)) |
| 122 return; | 122 return; |
| 123 | 123 |
| 124 if (distance) | 124 if (distance) |
| 125 m_frame->loader().client()->navigateBackForward(distance); | 125 m_frame->loader().client()->navigateBackForward(distance); |
| 126 else | 126 else |
| 127 m_frame->reload(NormalReload, ClientRedirect); | 127 m_frame->reload(FrameLoadTypeReload, ClientRedirect); |
| 128 } | 128 } |
| 129 | 129 |
| 130 KURL History::urlForState(const String& urlString) | 130 KURL History::urlForState(const String& urlString) |
| 131 { | 131 { |
| 132 Document* document = m_frame->document(); | 132 Document* document = m_frame->document(); |
| 133 | 133 |
| 134 if (urlString.isNull()) | 134 if (urlString.isNull()) |
| 135 return document->url(); | 135 return document->url(); |
| 136 if (urlString.isEmpty()) | 136 if (urlString.isEmpty()) |
| 137 return document->baseURL(); | 137 return document->baseURL(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 152 } | 152 } |
| 153 | 153 |
| 154 HistoryScrollRestorationType restorationType = ScrollRestorationAuto; | 154 HistoryScrollRestorationType restorationType = ScrollRestorationAuto; |
| 155 if (RuntimeEnabledFeatures::scrollRestorationEnabled() && options.scrollRest
oration() == "manual") | 155 if (RuntimeEnabledFeatures::scrollRestorationEnabled() && options.scrollRest
oration() == "manual") |
| 156 restorationType = ScrollRestorationManual; | 156 restorationType = ScrollRestorationManual; |
| 157 | 157 |
| 158 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig
ationHistoryApi, data, restorationType, type); | 158 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig
ationHistoryApi, data, restorationType, type); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |