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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 991 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Ac tive); | 991 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Ac tive); |
| 992 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent); | 992 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent); |
| 993 } | 993 } |
| 994 | 994 |
| 995 if (passMousePressEventToScrollbar(mev)) | 995 if (passMousePressEventToScrollbar(mev)) |
| 996 swallowEvent = true; | 996 swallowEvent = true; |
| 997 else | 997 else |
| 998 swallowEvent = handleMousePressEvent(mev); | 998 swallowEvent = handleMousePressEvent(mev); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 if (mev.hitTestResult().innerNode() && mouseEvent.button() == LeftButton) { | |
|
please use gerrit instead
2015/06/17 20:07:07
&& mouseEvent.type() == PlatformMouseEvent::MouseP
Yufeng Shen (Slow to review)
2015/06/17 20:12:57
This is inside handleMousePressEvent(), so it is g
please use gerrit instead
2015/06/17 20:58:05
In that case, please "ASSERT(mouseEvent.type() ==
Yufeng Shen (Slow to review)
2015/06/17 22:25:50
Done.
| |
| 1002 HitTestResult result = mev.hitTestResult(); | |
| 1003 result.setToShadowHostIfInUserAgentShadowRoot(); | |
| 1004 m_frame->chromeClient().onClickInput(result.innerNode()); | |
| 1005 } | |
| 1006 | |
| 1001 return swallowEvent; | 1007 return swallowEvent; |
| 1002 } | 1008 } |
| 1003 | 1009 |
| 1004 static DeprecatedPaintLayer* layerForNode(Node* node) | 1010 static DeprecatedPaintLayer* layerForNode(Node* node) |
| 1005 { | 1011 { |
| 1006 if (!node) | 1012 if (!node) |
| 1007 return nullptr; | 1013 return nullptr; |
| 1008 | 1014 |
| 1009 LayoutObject* layoutObject = node->layoutObject(); | 1015 LayoutObject* layoutObject = node->layoutObject(); |
| 1010 if (!layoutObject) | 1016 if (!layoutObject) |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2067 swallowMouseUpEvent = handleMouseReleaseEvent(MouseEventWithHitTestResul ts(fakeMouseUp, currentHitTest)); | 2073 swallowMouseUpEvent = handleMouseReleaseEvent(MouseEventWithHitTestResul ts(fakeMouseUp, currentHitTest)); |
| 2068 | 2074 |
| 2069 bool swallowed = swallowMouseDownEvent | swallowMouseUpEvent | swallowClickE vent; | 2075 bool swallowed = swallowMouseDownEvent | swallowMouseUpEvent | swallowClickE vent; |
| 2070 if (!swallowed && tappedNode && m_frame->page()) { | 2076 if (!swallowed && tappedNode && m_frame->page()) { |
| 2071 bool domTreeChanged = preDispatchDomTreeVersion != m_frame->document()-> domTreeVersion(); | 2077 bool domTreeChanged = preDispatchDomTreeVersion != m_frame->document()-> domTreeVersion(); |
| 2072 bool styleChanged = preDispatchStyleVersion != m_frame->document()->styl eVersion(); | 2078 bool styleChanged = preDispatchStyleVersion != m_frame->document()->styl eVersion(); |
| 2073 | 2079 |
| 2074 IntPoint tappedPositionInViewport = m_frame->page()->frameHost().pinchVi ewport().rootFrameToViewport(tappedPosition); | 2080 IntPoint tappedPositionInViewport = m_frame->page()->frameHost().pinchVi ewport().rootFrameToViewport(tappedPosition); |
| 2075 m_frame->chromeClient().showUnhandledTapUIIfNeeded(tappedPositionInViewp ort, tappedNode.get(), domTreeChanged || styleChanged); | 2081 m_frame->chromeClient().showUnhandledTapUIIfNeeded(tappedPositionInViewp ort, tappedNode.get(), domTreeChanged || styleChanged); |
| 2076 } | 2082 } |
| 2083 | |
| 2084 if (currentHitTest.innerNode()) { | |
|
please use gerrit instead
2015/06/17 20:07:07
&& gestureEvent.type() == PlatformEvent::GestureTa
Yufeng Shen (Slow to review)
2015/06/17 20:12:56
ditto, this is inside handleGestureTap().
please use gerrit instead
2015/06/17 20:58:05
Please "ASSERT(gestureEvent.type() == PlatformEven
Yufeng Shen (Slow to review)
2015/06/17 22:25:50
Done.
| |
| 2085 HitTestResult result = currentHitTest; | |
| 2086 result.setToShadowHostIfInUserAgentShadowRoot(); | |
| 2087 m_frame->chromeClient().onClickInput(result.innerNode()); | |
| 2088 } | |
| 2089 | |
| 2077 return swallowed; | 2090 return swallowed; |
| 2078 } | 2091 } |
| 2079 | 2092 |
| 2080 bool EventHandler::handleGestureLongPress(const GestureEventWithHitTestResults& targetedEvent) | 2093 bool EventHandler::handleGestureLongPress(const GestureEventWithHitTestResults& targetedEvent) |
| 2081 { | 2094 { |
| 2082 const PlatformGestureEvent& gestureEvent = targetedEvent.event(); | 2095 const PlatformGestureEvent& gestureEvent = targetedEvent.event(); |
| 2083 IntPoint adjustedPoint = gestureEvent.position(); | 2096 IntPoint adjustedPoint = gestureEvent.position(); |
| 2084 | 2097 |
| 2085 unsigned modifiers = gestureEvent.modifiers(); | 2098 unsigned modifiers = gestureEvent.modifiers(); |
| 2086 | 2099 |
| (...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3761 unsigned EventHandler::accessKeyModifiers() | 3774 unsigned EventHandler::accessKeyModifiers() |
| 3762 { | 3775 { |
| 3763 #if OS(MACOSX) | 3776 #if OS(MACOSX) |
| 3764 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3777 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3765 #else | 3778 #else |
| 3766 return PlatformEvent::AltKey; | 3779 return PlatformEvent::AltKey; |
| 3767 #endif | 3780 #endif |
| 3768 } | 3781 } |
| 3769 | 3782 |
| 3770 } // namespace blink | 3783 } // namespace blink |
| OLD | NEW |