| 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 // RenderView::hitTest causes a layout, and we don't want to hit that until
the first |
| 943 // layout because until then, there is nothing shown on the screen - the use
r can't |
| 944 // have intentionally clicked on something belonging to this page. Furthermo
re, |
| 945 // mousemove events before the first layout should not lead to a premature l
ayout() |
| 946 // happening, which could show a flash of white. |
| 947 // See also the similar code in Document::prepareMouseEvent. |
| 948 if (!m_frame->contentRenderer() || !m_frame->view() || !m_frame->view()->did
FirstLayout()) |
| 943 return result; | 949 return result; |
| 944 | 950 |
| 945 // hitTestResultAtPoint is specifically used to hitTest into all frames, thu
s it always allows child frame content. | 951 // hitTestResultAtPoint is specifically used to hitTest into all frames, thu
s it always allows child frame content. |
| 946 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent); | 952 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent); |
| 947 m_frame->contentRenderer()->hitTest(request, result); | 953 m_frame->contentRenderer()->hitTest(request, result); |
| 948 if (!request.readOnly()) | 954 if (!request.readOnly()) |
| 949 m_frame->document()->updateHoverActiveState(request, result.innerElement
()); | 955 m_frame->document()->updateHoverActiveState(request, result.innerElement
()); |
| 950 | 956 |
| 951 if (request.disallowsShadowContent()) | 957 if (request.disallowsShadowContent()) |
| 952 result.setToNodesInDocumentTreeScope(); | 958 result.setToNodesInDocumentTreeScope(); |
| (...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3920 unsigned EventHandler::accessKeyModifiers() | 3926 unsigned EventHandler::accessKeyModifiers() |
| 3921 { | 3927 { |
| 3922 #if OS(DARWIN) | 3928 #if OS(DARWIN) |
| 3923 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3929 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3924 #else | 3930 #else |
| 3925 return PlatformEvent::AltKey; | 3931 return PlatformEvent::AltKey; |
| 3926 #endif | 3932 #endif |
| 3927 } | 3933 } |
| 3928 | 3934 |
| 3929 } // namespace WebCore | 3935 } // namespace WebCore |
| OLD | NEW |