OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 | 1795 |
1796 bool WebViewImpl::hasVerticalScrollbar() | 1796 bool WebViewImpl::hasVerticalScrollbar() |
1797 { | 1797 { |
1798 return mainFrameImpl()->frameView()->verticalScrollbar(); | 1798 return mainFrameImpl()->frameView()->verticalScrollbar(); |
1799 } | 1799 } |
1800 | 1800 |
1801 const WebInputEvent* WebViewImpl::m_currentInputEvent = 0; | 1801 const WebInputEvent* WebViewImpl::m_currentInputEvent = 0; |
1802 | 1802 |
1803 bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) | 1803 bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) |
1804 { | 1804 { |
| 1805 if (WebInputEvent::isUserGestureEventType(inputEvent.type)) |
| 1806 m_page->setUserGestureSeen(); |
| 1807 |
1805 TRACE_EVENT0("input", "WebViewImpl::handleInputEvent"); | 1808 TRACE_EVENT0("input", "WebViewImpl::handleInputEvent"); |
1806 // If we've started a drag and drop operation, ignore input events until | 1809 // If we've started a drag and drop operation, ignore input events until |
1807 // we're done. | 1810 // we're done. |
1808 if (m_doingDragAndDrop) | 1811 if (m_doingDragAndDrop) |
1809 return true; | 1812 return true; |
1810 | 1813 |
1811 if (m_devToolsAgent && m_devToolsAgent->handleInputEvent(m_page.get(), input
Event)) | 1814 if (m_devToolsAgent && m_devToolsAgent->handleInputEvent(m_page.get(), input
Event)) |
1812 return true; | 1815 return true; |
1813 | 1816 |
1814 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. | 1817 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. |
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4008 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4011 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4009 | 4012 |
4010 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4013 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4011 return false; | 4014 return false; |
4012 | 4015 |
4013 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4016 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4014 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4017 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4015 } | 4018 } |
4016 | 4019 |
4017 } // namespace blink | 4020 } // namespace blink |
OLD | NEW |