Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 FrameView* view = m_localRoot->frameView(); | 304 FrameView* view = m_localRoot->frameView(); |
| 305 | 305 |
| 306 WebRect damagedRect(0, 0, m_size.width, m_size.height); | 306 WebRect damagedRect(0, 0, m_size.width, m_size.height); |
| 307 view->invalidateRect(damagedRect); | 307 view->invalidateRect(damagedRect); |
| 308 } | 308 } |
| 309 | 309 |
| 310 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; | 310 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; |
| 311 | 311 |
| 312 WebInputEventResult WebFrameWidgetImpl::handleInputEvent(const WebInputEvent& in putEvent) | 312 WebInputEventResult WebFrameWidgetImpl::handleInputEvent(const WebInputEvent& in putEvent) |
| 313 { | 313 { |
| 314 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", inputT ypeToName(inputEvent.type)); | |
| 314 | 315 |
| 315 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", inputT ypeToName(inputEvent.type)); | 316 // Don't handle events once we've started shutting down. |
| 317 if (!page()) | |
|
dtapuska
2016/04/29 14:31:27
Is it preferred to collapse this with the return b
bokan
2016/04/29 14:49:00
IMO, in this case, they're unrelated and it's more
dcheng
2016/04/29 18:36:29
Dumb question: how come we don't hit this in the W
| |
| 318 return WebInputEventResult::NotHandled; | |
| 316 | 319 |
| 317 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. | 320 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. |
| 318 if (m_ignoreInputEvents) | 321 if (m_ignoreInputEvents) |
| 319 return WebInputEventResult::NotHandled; | 322 return WebInputEventResult::NotHandled; |
| 320 | 323 |
| 321 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available. | 324 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available. |
| 322 | 325 |
| 323 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); | 326 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); |
| 324 | 327 |
| 325 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) { | 328 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) { |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1087 | 1090 |
| 1088 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) | 1091 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) |
| 1089 { | 1092 { |
| 1090 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); | 1093 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); |
| 1091 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 1094 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 1092 result.setToShadowHostIfInUserAgentShadowRoot(); | 1095 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 1093 return result; | 1096 return result; |
| 1094 } | 1097 } |
| 1095 | 1098 |
| 1096 } // namespace blink | 1099 } // namespace blink |
| OLD | NEW |