Chromium Code Reviews| 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) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 932 FrameView* mainView = mainFrame->view(); | 932 FrameView* mainView = mainFrame->view(); |
| 933 if (frameView && mainView) { | 933 if (frameView && mainView) { |
| 934 IntPoint mainFramePoint = mainView->rootViewToContents(frameView ->contentsToRootView(roundedIntPoint(point))); | 934 IntPoint mainFramePoint = mainView->rootViewToContents(frameView ->contentsToRootView(roundedIntPoint(point))); |
| 935 return mainFrame->eventHandler()->hitTestResultAtPoint(mainFrame Point, hitType, padding); | 935 return mainFrame->eventHandler()->hitTestResultAtPoint(mainFrame Point, hitType, padding); |
| 936 } | 936 } |
| 937 } | 937 } |
| 938 } | 938 } |
| 939 | 939 |
| 940 HitTestResult result(point, padding.height(), padding.width(), padding.heigh t(), padding.width()); | 940 HitTestResult result(point, padding.height(), padding.width(), padding.heigh t(), padding.width()); |
| 941 | 941 |
| 942 if (!m_frame->contentRenderer()) | 942 if (!m_frame->contentRenderer() || !m_frame || !m_frame->view()->didFirstLay out()) |
|
jamesr
2013/05/14 03:03:44
no need to null-check m_frame just after dereferen
cbiesinger
2013/05/14 18:09:56
Whoops, that was supposed to check m_frame->view()
| |
| 943 return result; | 943 return result; |
| 944 | 944 |
| 945 // hitTestResultAtPoint is specifically used to hitTest into all frames, thu s it always allows child frame content. | 945 // hitTestResultAtPoint is specifically used to hitTest into all frames, thu s it always allows child frame content. |
| 946 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent); | 946 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent); |
| 947 m_frame->contentRenderer()->hitTest(request, result); | 947 m_frame->contentRenderer()->hitTest(request, result); |
| 948 if (!request.readOnly()) | 948 if (!request.readOnly()) |
| 949 m_frame->document()->updateHoverActiveState(request, result.innerElement ()); | 949 m_frame->document()->updateHoverActiveState(request, result.innerElement ()); |
| 950 | 950 |
| 951 if (request.disallowsShadowContent()) | 951 if (request.disallowsShadowContent()) |
| 952 result.setToNonShadowAncestor(); | 952 result.setToNonShadowAncestor(); |
| (...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3920 unsigned EventHandler::accessKeyModifiers() | 3920 unsigned EventHandler::accessKeyModifiers() |
| 3921 { | 3921 { |
| 3922 #if OS(DARWIN) | 3922 #if OS(DARWIN) |
| 3923 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3923 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3924 #else | 3924 #else |
| 3925 return PlatformEvent::AltKey; | 3925 return PlatformEvent::AltKey; |
| 3926 #endif | 3926 #endif |
| 3927 } | 3927 } |
| 3928 | 3928 |
| 3929 } // namespace WebCore | 3929 } // namespace WebCore |
| OLD | NEW |