| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2207 // it is necessary to check the value after calling init() and | 2207 // it is necessary to check the value after calling init() and |
| 2208 // return without loading URL. | 2208 // return without loading URL. |
| 2209 // NOTE: m_client will be null if this frame has been detached. | 2209 // NOTE: m_client will be null if this frame has been detached. |
| 2210 // (b:791612) | 2210 // (b:791612) |
| 2211 childFrame->init(); // create an empty document | 2211 childFrame->init(); // create an empty document |
| 2212 if (!childFrame->tree().parent()) | 2212 if (!childFrame->tree().parent()) |
| 2213 return nullptr; | 2213 return nullptr; |
| 2214 | 2214 |
| 2215 // If we're moving in the back/forward list, we might want to replace the co
ntent | 2215 // If we're moving in the back/forward list, we might want to replace the co
ntent |
| 2216 // of this child frame with whatever was there at that point. | 2216 // of this child frame with whatever was there at that point. |
| 2217 HistoryItem* childItem = 0; | 2217 RefPtr<HistoryItem> childItem; |
| 2218 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen
t()->loadEventFinished()) | 2218 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen
t()->loadEventFinished()) { |
| 2219 childItem = frame()->page()->historyController().itemForNewChildFrame(ch
ildFrame.get()); | 2219 childItem = PassRefPtr<HistoryItem>(webframe->client()->historyItemForNe
wChildFrame(webframe)); |
| 2220 if (!childItem) |
| 2221 childItem = frame()->page()->historyController().itemForNewChildFram
e(childFrame.get()); |
| 2222 } |
| 2220 | 2223 |
| 2221 if (childItem) | 2224 if (childItem) |
| 2222 childFrame->loader().loadHistoryItem(childItem); | 2225 childFrame->loader().loadHistoryItem(childItem.get()); |
| 2223 else | 2226 else |
| 2224 childFrame->loader().load(FrameLoadRequest(0, request.resourceRequest(),
"_self")); | 2227 childFrame->loader().load(FrameLoadRequest(0, request.resourceRequest(),
"_self")); |
| 2225 | 2228 |
| 2226 // A synchronous navigation (about:blank) would have already processed | 2229 // A synchronous navigation (about:blank) would have already processed |
| 2227 // onload, so it is possible for the frame to have already been destroyed by | 2230 // onload, so it is possible for the frame to have already been destroyed by |
| 2228 // script in the page. | 2231 // script in the page. |
| 2229 // NOTE: m_client will be null if this frame has been detached. | 2232 // NOTE: m_client will be null if this frame has been detached. |
| 2230 if (!childFrame->tree().parent()) | 2233 if (!childFrame->tree().parent()) |
| 2231 return nullptr; | 2234 return nullptr; |
| 2232 | 2235 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 | 2538 |
| 2536 // There is a possibility that the frame being detached was the only | 2539 // There is a possibility that the frame being detached was the only |
| 2537 // pending one. We need to make sure final replies can be sent. | 2540 // pending one. We need to make sure final replies can be sent. |
| 2538 flushCurrentScopingEffort(m_findRequestIdentifier); | 2541 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2539 | 2542 |
| 2540 cancelPendingScopingEffort(); | 2543 cancelPendingScopingEffort(); |
| 2541 } | 2544 } |
| 2542 } | 2545 } |
| 2543 | 2546 |
| 2544 } // namespace blink | 2547 } // namespace blink |
| OLD | NEW |