OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); | 921 const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); |
922 if (ds) { | 922 if (ds) { |
923 KURL url = ds->request().url(); | 923 KURL url = ds->request().url(); |
924 ASSERT(!url.protocolIs(backForwardNavigationScheme)); | 924 ASSERT(!url.protocolIs(backForwardNavigationScheme)); |
925 | 925 |
926 bool isRedirect = ds->isRedirect(); | 926 bool isRedirect = ds->isRedirect(); |
927 | 927 |
928 WebNavigationType webnavType = | 928 WebNavigationType webnavType = |
929 WebDataSourceImpl::toWebNavigationType(action.type()); | 929 WebDataSourceImpl::toWebNavigationType(action.type()); |
930 | 930 |
931 RefPtr<Node> node; | 931 WebNode originatingNode; // FIXME: Delete this when the decidePolicy
ForNavigation API is updated. |
932 for (const Event* event = action.event(); event; event = event->unde
rlyingEvent()) { | |
933 if (event->isMouseEvent()) { | |
934 const MouseEvent* mouseEvent = | |
935 static_cast<const MouseEvent*>(event); | |
936 node = m_webFrame->frame()->eventHandler()->hitTestResultAtP
oint(mouseEvent->absoluteLocation()).innerNonSharedNode(); | |
937 break; | |
938 } | |
939 } | |
940 WebNode originatingNode(node); | |
941 | 932 |
942 navigationPolicy = m_webFrame->client()->decidePolicyForNavigation( | 933 navigationPolicy = m_webFrame->client()->decidePolicyForNavigation( |
943 m_webFrame, ds->request(), webnavType, originatingNode, | 934 m_webFrame, ds->request(), webnavType, originatingNode, |
944 navigationPolicy, isRedirect); | 935 navigationPolicy, isRedirect); |
945 } | 936 } |
946 | 937 |
947 if (navigationPolicy == WebNavigationPolicyCurrentTab) | 938 if (navigationPolicy == WebNavigationPolicyCurrentTab) |
948 policyAction = PolicyUse; | 939 policyAction = PolicyUse; |
949 else if (navigationPolicy == WebNavigationPolicyDownload) | 940 else if (navigationPolicy == WebNavigationPolicyDownload) |
950 policyAction = PolicyDownload; | 941 policyAction = PolicyDownload; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte
xtLostReason); | 1470 m_webFrame->client()->didLoseWebGLContext(m_webFrame, arbRobustnessConte
xtLostReason); |
1480 } | 1471 } |
1481 | 1472 |
1482 void FrameLoaderClientImpl::dispatchWillInsertBody() | 1473 void FrameLoaderClientImpl::dispatchWillInsertBody() |
1483 { | 1474 { |
1484 if (m_webFrame->client()) | 1475 if (m_webFrame->client()) |
1485 m_webFrame->client()->willInsertBody(m_webFrame); | 1476 m_webFrame->client()->willInsertBody(m_webFrame); |
1486 } | 1477 } |
1487 | 1478 |
1488 } // namespace WebKit | 1479 } // namespace WebKit |
OLD | NEW |