| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 void WebFrameWidgetImpl::themeChanged() { | 301 void WebFrameWidgetImpl::themeChanged() { |
| 302 FrameView* view = m_localRoot->frameView(); | 302 FrameView* view = m_localRoot->frameView(); |
| 303 | 303 |
| 304 WebRect damagedRect(0, 0, m_size.width, m_size.height); | 304 WebRect damagedRect(0, 0, m_size.width, m_size.height); |
| 305 view->invalidateRect(damagedRect); | 305 view->invalidateRect(damagedRect); |
| 306 } | 306 } |
| 307 | 307 |
| 308 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; | 308 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; |
| 309 | 309 |
| 310 WebInputEventResult WebFrameWidgetImpl::handleInputEvent( | 310 WebInputEventResult WebFrameWidgetImpl::handleInputEvent( |
| 311 const WebInputEvent& inputEvent) { | 311 const WebCoalescedInputEvent& coalescedEvent) { |
| 312 const WebInputEvent& inputEvent = coalescedEvent.event(); |
| 312 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", | 313 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", |
| 313 WebInputEvent::GetName(inputEvent.type())); | 314 WebInputEvent::GetName(inputEvent.type())); |
| 314 | 315 |
| 315 // If a drag-and-drop operation is in progress, ignore input events. | 316 // If a drag-and-drop operation is in progress, ignore input events. |
| 316 if (m_doingDragAndDrop) | 317 if (m_doingDragAndDrop) |
| 317 return WebInputEventResult::HandledSuppressed; | 318 return WebInputEventResult::HandledSuppressed; |
| 318 | 319 |
| 319 // Don't handle events once we've started shutting down. | 320 // Don't handle events once we've started shutting down. |
| 320 if (!page()) | 321 if (!page()) |
| 321 return WebInputEventResult::NotHandled; | 322 return WebInputEventResult::NotHandled; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 373 } |
| 373 | 374 |
| 374 node->dispatchMouseEvent( | 375 node->dispatchMouseEvent( |
| 375 PlatformMouseEventBuilder( | 376 PlatformMouseEventBuilder( |
| 376 m_localRoot->frameView(), | 377 m_localRoot->frameView(), |
| 377 static_cast<const WebMouseEvent&>(inputEvent)), | 378 static_cast<const WebMouseEvent&>(inputEvent)), |
| 378 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount); | 379 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount); |
| 379 return WebInputEventResult::HandledSystem; | 380 return WebInputEventResult::HandledSystem; |
| 380 } | 381 } |
| 381 | 382 |
| 382 return PageWidgetDelegate::handleInputEvent( | 383 return PageWidgetDelegate::handleInputEvent(*this, coalescedEvent, |
| 383 *this, WebCoalescedInputEvent(inputEvent), m_localRoot->frame()); | 384 m_localRoot->frame()); |
| 384 } | 385 } |
| 385 | 386 |
| 386 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible) { | 387 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible) { |
| 387 page()->setIsCursorVisible(isVisible); | 388 page()->setIsCursorVisible(isVisible); |
| 388 } | 389 } |
| 389 | 390 |
| 390 bool WebFrameWidgetImpl::hasTouchEventHandlersAt(const WebPoint& point) { | 391 bool WebFrameWidgetImpl::hasTouchEventHandlersAt(const WebPoint& point) { |
| 391 // FIXME: Implement this. Note that the point must be divided by | 392 // FIXME: Implement this. Note that the point must be divided by |
| 392 // pageScaleFactor. | 393 // pageScaleFactor. |
| 393 return true; | 394 return true; |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 return nullptr; | 1137 return nullptr; |
| 1137 } | 1138 } |
| 1138 | 1139 |
| 1139 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1140 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1140 if (!m_imeAcceptEvents) | 1141 if (!m_imeAcceptEvents) |
| 1141 return nullptr; | 1142 return nullptr; |
| 1142 return focusedLocalFrameInWidget(); | 1143 return focusedLocalFrameInWidget(); |
| 1143 } | 1144 } |
| 1144 | 1145 |
| 1145 } // namespace blink | 1146 } // namespace blink |
| OLD | NEW |