| 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 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 } else { | 1566 } else { |
| 1567 if (Frame* parent = m_frame->tree()->parent()) | 1567 if (Frame* parent = m_frame->tree()->parent()) |
| 1568 loader->setOverrideEncoding(parent->loader()->documentLoader()->over
rideEncoding()); | 1568 loader->setOverrideEncoding(parent->loader()->documentLoader()->over
rideEncoding()); |
| 1569 | 1569 |
| 1570 policyChecker()->stopCheck(); | 1570 policyChecker()->stopCheck(); |
| 1571 setPolicyDocumentLoader(loader); | 1571 setPolicyDocumentLoader(loader); |
| 1572 if (loader->triggeringAction().isEmpty()) | 1572 if (loader->triggeringAction().isEmpty()) |
| 1573 loader->setTriggeringAction(NavigationAction(newURL, policyChecker()
->loadType(), isFormSubmission)); | 1573 loader->setTriggeringAction(NavigationAction(newURL, policyChecker()
->loadType(), isFormSubmission)); |
| 1574 | 1574 |
| 1575 if (Element* ownerElement = m_frame->ownerElement()) { | 1575 if (Element* ownerElement = m_frame->ownerElement()) { |
| 1576 if (!ownerElement->dispatchBeforeLoadEvent(loader->request().url().s
tring())) { | 1576 // We skip dispatching the beforeload event if we've already |
| 1577 // committed a real document load because the event would leak |
| 1578 // subsequent activity by the frame which the parent frame isn't |
| 1579 // supposed to learn. For example, if the child frame navigated to |
| 1580 // a new URL, the parent frame shouldn't learn the URL. |
| 1581 if (!m_stateMachine.committedFirstRealDocumentLoad() |
| 1582 && !ownerElement->dispatchBeforeLoadEvent(loader->request().url(
).string())) { |
| 1577 continueLoadAfterNavigationPolicy(loader->request(), formState,
false); | 1583 continueLoadAfterNavigationPolicy(loader->request(), formState,
false); |
| 1578 return; | 1584 return; |
| 1579 } | 1585 } |
| 1580 } | 1586 } |
| 1581 | 1587 |
| 1582 policyChecker()->checkNavigationPolicy(loader->request(), loader, formSt
ate, | 1588 policyChecker()->checkNavigationPolicy(loader->request(), loader, formSt
ate, |
| 1583 callContinueLoadAfterNavigationPolicy, this); | 1589 callContinueLoadAfterNavigationPolicy, this); |
| 1584 } | 1590 } |
| 1585 } | 1591 } |
| 1586 | 1592 |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3605 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); | 3611 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); |
| 3606 page->chrome()->setWindowRect(windowRect); | 3612 page->chrome()->setWindowRect(windowRect); |
| 3607 | 3613 |
| 3608 page->chrome()->show(); | 3614 page->chrome()->show(); |
| 3609 | 3615 |
| 3610 created = true; | 3616 created = true; |
| 3611 return frame; | 3617 return frame; |
| 3612 } | 3618 } |
| 3613 | 3619 |
| 3614 } // namespace WebCore | 3620 } // namespace WebCore |
| OLD | NEW |