| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 return false; | 1392 return false; |
| 1393 if (!ownerElement->hasTagName(iframeTag)) | 1393 if (!ownerElement->hasTagName(iframeTag)) |
| 1394 return false; | 1394 return false; |
| 1395 return ownerElement->fastHasAttribute(srcdocAttr); | 1395 return ownerElement->fastHasAttribute(srcdocAttr); |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 Frame* FrameLoader::findFrameForNavigation(const AtomicString& name, Document* a
ctiveDocument) | 1398 Frame* FrameLoader::findFrameForNavigation(const AtomicString& name, Document* a
ctiveDocument) |
| 1399 { | 1399 { |
| 1400 ASSERT(activeDocument); | 1400 ASSERT(activeDocument); |
| 1401 Frame* frame = m_frame->tree().find(name); | 1401 Frame* frame = m_frame->tree().find(name); |
| 1402 | |
| 1403 // From http://www.whatwg.org/specs/web-apps/current-work/#seamlessLinks: | |
| 1404 // | |
| 1405 // If the source browsing context is the same as the browsing context | |
| 1406 // being navigated, and this browsing context has its seamless browsing | |
| 1407 // context flag set, and the browsing context being navigated was not | |
| 1408 // chosen using an explicit self-navigation override, then find the | |
| 1409 // nearest ancestor browsing context that does not have its seamless | |
| 1410 // browsing context flag set, and continue these steps as if that | |
| 1411 // browsing context was the one that was going to be navigated instead. | |
| 1412 if (frame == m_frame && name != "_self" && m_frame->document()->shouldDispla
ySeamlesslyWithParent()) { | |
| 1413 for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree().pa
rent()) { | |
| 1414 if (!ancestor->document()->shouldDisplaySeamlesslyWithParent()) { | |
| 1415 frame = ancestor; | |
| 1416 break; | |
| 1417 } | |
| 1418 } | |
| 1419 ASSERT(frame != m_frame); | |
| 1420 } | |
| 1421 | |
| 1422 if (!activeDocument->canNavigate(frame)) | 1402 if (!activeDocument->canNavigate(frame)) |
| 1423 return 0; | 1403 return 0; |
| 1424 return frame; | 1404 return frame; |
| 1425 } | 1405 } |
| 1426 | 1406 |
| 1427 void FrameLoader::loadHistoryItem(HistoryItem* item, HistoryLoadType historyLoad
Type, ResourceRequestCachePolicy cachePolicy) | 1407 void FrameLoader::loadHistoryItem(HistoryItem* item, HistoryLoadType historyLoad
Type, ResourceRequestCachePolicy cachePolicy) |
| 1428 { | 1408 { |
| 1429 m_provisionalItem = item; | 1409 m_provisionalItem = item; |
| 1430 if (historyLoadType == HistorySameDocumentLoad) { | 1410 if (historyLoadType == HistorySameDocumentLoad) { |
| 1431 loadInSameDocument(item->url(), item->stateObject(), DoNotUpdateBackForw
ardList, NotClientRedirect); | 1411 loadInSameDocument(item->url(), item->stateObject(), DoNotUpdateBackForw
ardList, NotClientRedirect); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 { | 1461 { |
| 1482 SandboxFlags flags = m_forcedSandboxFlags; | 1462 SandboxFlags flags = m_forcedSandboxFlags; |
| 1483 if (Frame* parentFrame = m_frame->tree().parent()) | 1463 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1484 flags |= parentFrame->document()->sandboxFlags(); | 1464 flags |= parentFrame->document()->sandboxFlags(); |
| 1485 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1465 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1486 flags |= ownerElement->sandboxFlags(); | 1466 flags |= ownerElement->sandboxFlags(); |
| 1487 return flags; | 1467 return flags; |
| 1488 } | 1468 } |
| 1489 | 1469 |
| 1490 } // namespace WebCore | 1470 } // namespace WebCore |
| OLD | NEW |