| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool equalIgnoringQueryAndFragment(const KURL& a, const KURL& b) { | 51 bool equalIgnoringQueryAndFragment(const KURL& a, const KURL& b) { |
| 52 return StringView(a.getString(), 0, a.pathEnd()) == | 52 return StringView(a.getString(), 0, a.pathEnd()) == |
| 53 StringView(b.getString(), 0, b.pathEnd()); | 53 StringView(b.getString(), 0, b.pathEnd()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| 58 History::History(LocalFrame* frame) | 58 History::History(LocalFrame* frame) |
| 59 : DOMWindowProperty(frame), m_lastStateObjectRequested(nullptr) {} | 59 : ContextClient(frame), m_lastStateObjectRequested(nullptr) {} |
| 60 | 60 |
| 61 DEFINE_TRACE(History) { | 61 DEFINE_TRACE(History) { |
| 62 DOMWindowProperty::trace(visitor); | 62 ContextClient::trace(visitor); |
| 63 } | 63 } |
| 64 | 64 |
| 65 unsigned History::length() const { | 65 unsigned History::length() const { |
| 66 if (!frame() || !frame()->loader().client()) | 66 if (!frame() || !frame()->loader().client()) |
| 67 return 0; | 67 return 0; |
| 68 return frame()->loader().client()->backForwardLength(); | 68 return frame()->loader().client()->backForwardLength(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 SerializedScriptValue* History::state() { | 71 SerializedScriptValue* History::state() { |
| 72 m_lastStateObjectRequested = stateInternal(); | 72 m_lastStateObjectRequested = stateInternal(); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 frame()->document()->url().elidedString() + "'."); | 220 frame()->document()->url().elidedString() + "'."); |
| 221 return; | 221 return; |
| 222 } | 222 } |
| 223 | 223 |
| 224 frame()->loader().updateForSameDocumentNavigation( | 224 frame()->loader().updateForSameDocumentNavigation( |
| 225 fullURL, SameDocumentNavigationHistoryApi, std::move(data), | 225 fullURL, SameDocumentNavigationHistoryApi, std::move(data), |
| 226 restorationType, type, frame()->document()); | 226 restorationType, type, frame()->document()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |