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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 } | 550 } |
551 | 551 |
552 bool EventHandler::useHandCursor(Node* node, bool isOverLink) | 552 bool EventHandler::useHandCursor(Node* node, bool isOverLink) |
553 { | 553 { |
554 if (!node) | 554 if (!node) |
555 return false; | 555 return false; |
556 | 556 |
557 return ((isOverLink || isSubmitImage(node)) && !hasEditableStyle(*node)); | 557 return ((isOverLink || isSubmitImage(node)) && !hasEditableStyle(*node)); |
558 } | 558 } |
559 | 559 |
560 void EventHandler::cursorUpdateTimerFired(Timer<EventHandler>*) | 560 void EventHandler::cursorUpdateTimerFired(TimerBase*) |
561 { | 561 { |
562 ASSERT(m_frame); | 562 ASSERT(m_frame); |
563 ASSERT(m_frame->document()); | 563 ASSERT(m_frame->document()); |
564 | 564 |
565 updateCursor(); | 565 updateCursor(); |
566 } | 566 } |
567 | 567 |
568 void EventHandler::updateCursor() | 568 void EventHandler::updateCursor() |
569 { | 569 { |
570 TRACE_EVENT0("input", "EventHandler::updateCursor"); | 570 TRACE_EVENT0("input", "EventHandler::updateCursor"); |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 FrameView* view = m_frame->view(); | 2147 FrameView* view = m_frame->view(); |
2148 if (!view) | 2148 if (!view) |
2149 return; | 2149 return; |
2150 | 2150 |
2151 if (!quad.containsPoint(view->rootFrameToContents(m_lastKnownMousePosition))
) | 2151 if (!quad.containsPoint(view->rootFrameToContents(m_lastKnownMousePosition))
) |
2152 return; | 2152 return; |
2153 | 2153 |
2154 dispatchFakeMouseMoveEventSoon(); | 2154 dispatchFakeMouseMoveEventSoon(); |
2155 } | 2155 } |
2156 | 2156 |
2157 void EventHandler::fakeMouseMoveEventTimerFired(Timer<EventHandler>* timer) | 2157 void EventHandler::fakeMouseMoveEventTimerFired(TimerBase* timer) |
2158 { | 2158 { |
2159 TRACE_EVENT0("input", "EventHandler::fakeMouseMoveEventTimerFired"); | 2159 TRACE_EVENT0("input", "EventHandler::fakeMouseMoveEventTimerFired"); |
2160 ASSERT_UNUSED(timer, timer == &m_fakeMouseMoveEventTimer); | 2160 ASSERT_UNUSED(timer, timer == &m_fakeMouseMoveEventTimer); |
2161 ASSERT(!m_mousePressed); | 2161 ASSERT(!m_mousePressed); |
2162 | 2162 |
2163 Settings* settings = m_frame->settings(); | 2163 Settings* settings = m_frame->settings(); |
2164 if (settings && !settings->deviceSupportsMouse()) | 2164 if (settings && !settings->deviceSupportsMouse()) |
2165 return; | 2165 return; |
2166 | 2166 |
2167 FrameView* view = m_frame->view(); | 2167 FrameView* view = m_frame->view(); |
(...skipping 24 matching lines...) Expand all Loading... |
2192 void EventHandler::setResizingFrameSet(HTMLFrameSetElement* frameSet) | 2192 void EventHandler::setResizingFrameSet(HTMLFrameSetElement* frameSet) |
2193 { | 2193 { |
2194 m_frameSetBeingResized = frameSet; | 2194 m_frameSetBeingResized = frameSet; |
2195 } | 2195 } |
2196 | 2196 |
2197 void EventHandler::resizeScrollableAreaDestroyed() | 2197 void EventHandler::resizeScrollableAreaDestroyed() |
2198 { | 2198 { |
2199 m_scrollManager.clearResizeScrollableArea(true); | 2199 m_scrollManager.clearResizeScrollableArea(true); |
2200 } | 2200 } |
2201 | 2201 |
2202 void EventHandler::hoverTimerFired(Timer<EventHandler>*) | 2202 void EventHandler::hoverTimerFired(TimerBase*) |
2203 { | 2203 { |
2204 TRACE_EVENT0("input", "EventHandler::hoverTimerFired"); | 2204 TRACE_EVENT0("input", "EventHandler::hoverTimerFired"); |
2205 m_hoverTimer.stop(); | 2205 m_hoverTimer.stop(); |
2206 | 2206 |
2207 ASSERT(m_frame); | 2207 ASSERT(m_frame); |
2208 ASSERT(m_frame->document()); | 2208 ASSERT(m_frame->document()); |
2209 | 2209 |
2210 if (LayoutViewItem layoutItem = m_frame->contentLayoutItem()) { | 2210 if (LayoutViewItem layoutItem = m_frame->contentLayoutItem()) { |
2211 if (FrameView* view = m_frame->view()) { | 2211 if (FrameView* view = m_frame->view()) { |
2212 HitTestRequest request(HitTestRequest::Move); | 2212 HitTestRequest request(HitTestRequest::Move); |
2213 HitTestResult result(request, view->rootFrameToContents(m_lastKnownM
ousePosition)); | 2213 HitTestResult result(request, view->rootFrameToContents(m_lastKnownM
ousePosition)); |
2214 layoutItem.hitTest(result); | 2214 layoutItem.hitTest(result); |
2215 m_frame->document()->updateHoverActiveState(request, result.innerEle
ment()); | 2215 m_frame->document()->updateHoverActiveState(request, result.innerEle
ment()); |
2216 } | 2216 } |
2217 } | 2217 } |
2218 } | 2218 } |
2219 | 2219 |
2220 void EventHandler::activeIntervalTimerFired(Timer<EventHandler>*) | 2220 void EventHandler::activeIntervalTimerFired(TimerBase*) |
2221 { | 2221 { |
2222 TRACE_EVENT0("input", "EventHandler::activeIntervalTimerFired"); | 2222 TRACE_EVENT0("input", "EventHandler::activeIntervalTimerFired"); |
2223 m_activeIntervalTimer.stop(); | 2223 m_activeIntervalTimer.stop(); |
2224 | 2224 |
2225 if (m_frame | 2225 if (m_frame |
2226 && m_frame->document() | 2226 && m_frame->document() |
2227 && m_lastDeferredTapElement) { | 2227 && m_lastDeferredTapElement) { |
2228 // FIXME: Enable condition when http://crbug.com/226842 lands | 2228 // FIXME: Enable condition when http://crbug.com/226842 lands |
2229 // m_lastDeferredTapElement.get() == m_frame->document()->activeElement(
) | 2229 // m_lastDeferredTapElement.get() == m_frame->document()->activeElement(
) |
2230 HitTestRequest request(HitTestRequest::TouchEvent | HitTestRequest::Rele
ase); | 2230 HitTestRequest request(HitTestRequest::TouchEvent | HitTestRequest::Rele
ase); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 | 2586 |
2587 FrameHost* EventHandler::frameHost() const | 2587 FrameHost* EventHandler::frameHost() const |
2588 { | 2588 { |
2589 if (!m_frame->page()) | 2589 if (!m_frame->page()) |
2590 return nullptr; | 2590 return nullptr; |
2591 | 2591 |
2592 return &m_frame->page()->frameHost(); | 2592 return &m_frame->page()->frameHost(); |
2593 } | 2593 } |
2594 | 2594 |
2595 } // namespace blink | 2595 } // namespace blink |
OLD | NEW |