| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 #include "bindings/core/v8/DOMWrapperWorld.h" | 38 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 39 #include "bindings/core/v8/ScriptController.h" | 39 #include "bindings/core/v8/ScriptController.h" |
| 40 #include "bindings/core/v8/SerializedScriptValue.h" | 40 #include "bindings/core/v8/SerializedScriptValue.h" |
| 41 #include "core/HTMLNames.h" | 41 #include "core/HTMLNames.h" |
| 42 #include "core/dom/Document.h" | 42 #include "core/dom/Document.h" |
| 43 #include "core/dom/Element.h" | 43 #include "core/dom/Element.h" |
| 44 #include "core/dom/ViewportDescription.h" | 44 #include "core/dom/ViewportDescription.h" |
| 45 #include "core/editing/Editor.h" | 45 #include "core/editing/Editor.h" |
| 46 #include "core/editing/UndoStack.h" | 46 #include "core/editing/UndoStack.h" |
| 47 #include "core/events/GestureEvent.h" |
| 47 #include "core/events/KeyboardEvent.h" | 48 #include "core/events/KeyboardEvent.h" |
| 48 #include "core/events/MouseEvent.h" | 49 #include "core/events/MouseEvent.h" |
| 49 #include "core/events/PageTransitionEvent.h" | 50 #include "core/events/PageTransitionEvent.h" |
| 50 #include "core/fetch/ResourceFetcher.h" | 51 #include "core/fetch/ResourceFetcher.h" |
| 51 #include "core/fetch/ResourceLoader.h" | 52 #include "core/fetch/ResourceLoader.h" |
| 52 #include "core/frame/LocalDOMWindow.h" | 53 #include "core/frame/LocalDOMWindow.h" |
| 53 #include "core/frame/FrameHost.h" | 54 #include "core/frame/FrameHost.h" |
| 54 #include "core/frame/FrameView.h" | 55 #include "core/frame/FrameView.h" |
| 55 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
| 56 #include "core/frame/PinchViewport.h" | 57 #include "core/frame/PinchViewport.h" |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 if (request.formState() && event->underlyingEvent()) | 742 if (request.formState() && event->underlyingEvent()) |
| 742 event = event->underlyingEvent(); | 743 event = event->underlyingEvent(); |
| 743 | 744 |
| 744 if (event->isMouseEvent()) { | 745 if (event->isMouseEvent()) { |
| 745 MouseEvent* mouseEvent = toMouseEvent(event); | 746 MouseEvent* mouseEvent = toMouseEvent(event); |
| 746 navigationPolicyFromMouseEvent(mouseEvent->button(), mouseEvent->ctrlKey
(), mouseEvent->shiftKey(), mouseEvent->altKey(), mouseEvent->metaKey(), &policy
); | 747 navigationPolicyFromMouseEvent(mouseEvent->button(), mouseEvent->ctrlKey
(), mouseEvent->shiftKey(), mouseEvent->altKey(), mouseEvent->metaKey(), &policy
); |
| 747 } else if (event->isKeyboardEvent()) { | 748 } else if (event->isKeyboardEvent()) { |
| 748 // The click is simulated when triggering the keypress event. | 749 // The click is simulated when triggering the keypress event. |
| 749 KeyboardEvent* keyEvent = toKeyboardEvent(event); | 750 KeyboardEvent* keyEvent = toKeyboardEvent(event); |
| 750 navigationPolicyFromMouseEvent(0, keyEvent->ctrlKey(), keyEvent->shiftKe
y(), keyEvent->altKey(), keyEvent->metaKey(), &policy); | 751 navigationPolicyFromMouseEvent(0, keyEvent->ctrlKey(), keyEvent->shiftKe
y(), keyEvent->altKey(), keyEvent->metaKey(), &policy); |
| 752 } else if (event->isGestureEvent()) { |
| 753 // The click is simulated when triggering the gesture-tap event |
| 754 GestureEvent* gestureEvent = toGestureEvent(event); |
| 755 navigationPolicyFromMouseEvent(0, gestureEvent->ctrlKey(), gestureEvent-
>shiftKey(), gestureEvent->altKey(), gestureEvent->metaKey(), &policy); |
| 751 } | 756 } |
| 752 return policy; | 757 return policy; |
| 753 } | 758 } |
| 754 | 759 |
| 755 void FrameLoader::load(const FrameLoadRequest& passedRequest) | 760 void FrameLoader::load(const FrameLoadRequest& passedRequest) |
| 756 { | 761 { |
| 757 ASSERT(m_frame->document()); | 762 ASSERT(m_frame->document()); |
| 758 | 763 |
| 759 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); | 764 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); |
| 760 | 765 |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 | 1414 |
| 1410 // FIXME: We need a way to propagate insecure requests policy flags to | 1415 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1411 // out-of-process frames. For now, we'll always use default behavior. | 1416 // out-of-process frames. For now, we'll always use default behavior. |
| 1412 if (!parentFrame->isLocalFrame()) | 1417 if (!parentFrame->isLocalFrame()) |
| 1413 return SecurityContext::InsecureRequestsDoNotUpgrade; | 1418 return SecurityContext::InsecureRequestsDoNotUpgrade; |
| 1414 | 1419 |
| 1415 return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy(); | 1420 return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy(); |
| 1416 } | 1421 } |
| 1417 | 1422 |
| 1418 } // namespace blink | 1423 } // namespace blink |
| OLD | NEW |