| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 return NavigationTypeBackForward; | 48 return NavigationTypeBackForward; |
| 49 return NavigationTypeOther; | 49 return NavigationTypeOther; |
| 50 } | 50 } |
| 51 | 51 |
| 52 NavigationAction::NavigationAction() | 52 NavigationAction::NavigationAction() |
| 53 : m_type(NavigationTypeOther) | 53 : m_type(NavigationTypeOther) |
| 54 { | 54 { |
| 55 } | 55 } |
| 56 | 56 |
| 57 NavigationAction::NavigationAction(const ResourceRequest& resourceRequest, Frame
LoadType frameLoadType, | 57 NavigationAction::NavigationAction(const ResourceRequest& resourceRequest, Frame
LoadType frameLoadType, |
| 58 bool isFormSubmission, PassRefPtr<Event> passEvent) | 58 bool isFormSubmission, PassRefPtrWillBeRawPtr<Event> passEvent) |
| 59 : m_resourceRequest(resourceRequest) | 59 : m_resourceRequest(resourceRequest) |
| 60 { | 60 { |
| 61 RefPtr<Event> event = passEvent; | 61 RefPtrWillBeRawPtr<Event> event = passEvent; |
| 62 m_type = navigationType(frameLoadType, isFormSubmission || resourceRequest.h
ttpBody(), event); | 62 m_type = navigationType(frameLoadType, isFormSubmission || resourceRequest.h
ttpBody(), event); |
| 63 m_eventTimeStamp = event ? event->timeStamp() : 0; | 63 m_eventTimeStamp = event ? event->timeStamp() : 0; |
| 64 | 64 |
| 65 const MouseEvent* mouseEvent = 0; | 65 const MouseEvent* mouseEvent = 0; |
| 66 if (m_type == NavigationTypeLinkClicked) { | 66 if (m_type == NavigationTypeLinkClicked) { |
| 67 ASSERT(event); | 67 ASSERT(event); |
| 68 if (event->isMouseEvent()) | 68 if (event->isMouseEvent()) |
| 69 mouseEvent = toMouseEvent(event.get()); | 69 mouseEvent = toMouseEvent(event.get()); |
| 70 } else if (m_type == NavigationTypeFormSubmitted && event && event->underlyi
ngEvent() && event->underlyingEvent()->isMouseEvent()) { | 70 } else if (m_type == NavigationTypeFormSubmitted && event && event->underlyi
ngEvent() && event->underlyingEvent()->isMouseEvent()) { |
| 71 mouseEvent = toMouseEvent(event->underlyingEvent()); | 71 mouseEvent = toMouseEvent(event->underlyingEvent()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 if (!mouseEvent || !navigationPolicyFromMouseEvent(mouseEvent->button(), mou
seEvent->ctrlKey(), mouseEvent->shiftKey(), mouseEvent->altKey(), mouseEvent->me
taKey(), &m_policy)) | 74 if (!mouseEvent || !navigationPolicyFromMouseEvent(mouseEvent->button(), mou
seEvent->ctrlKey(), mouseEvent->shiftKey(), mouseEvent->altKey(), mouseEvent->me
taKey(), &m_policy)) |
| 75 m_policy = NavigationPolicyCurrentTab; | 75 m_policy = NavigationPolicyCurrentTab; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } | 78 } |
| OLD | NEW |