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 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1854 // be the first event after page load, and cause a form submission. In that | 1854 // be the first event after page load, and cause a form submission. In that |
1855 // case, the form submission happens before the autofill client is told | 1855 // case, the form submission happens before the autofill client is told |
1856 // to unblock the password values, and so the password values are not | 1856 // to unblock the password values, and so the password values are not |
1857 // submitted. To avoid that, GestureTap is handled explicitly: | 1857 // submitted. To avoid that, GestureTap is handled explicitly: |
1858 if (inputEvent.type == WebInputEvent::GestureTap && m_autofillClient) { | 1858 if (inputEvent.type == WebInputEvent::GestureTap && m_autofillClient) { |
1859 m_userGestureObserved = true; | 1859 m_userGestureObserved = true; |
1860 m_autofillClient->firstUserGestureObserved(); | 1860 m_autofillClient->firstUserGestureObserved(); |
1861 } | 1861 } |
1862 | 1862 |
1863 const AtomicString* inputEventName = inputTypeToName(inputEvent.type); | 1863 const AtomicString* inputEventName = inputTypeToName(inputEvent.type); |
1864 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputEventNam e ? TRACE_STR_COPY(inputEventName->ascii().data()) : "unknown"); | 1864 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputEventNam e ? inputEventName->ascii() : "unknown"); |
Xianzhu
2014/06/17 19:47:13
Because of the original "const char*" operator of
| |
1865 // If we've started a drag and drop operation, ignore input events until | 1865 // If we've started a drag and drop operation, ignore input events until |
1866 // we're done. | 1866 // we're done. |
1867 if (m_doingDragAndDrop) | 1867 if (m_doingDragAndDrop) |
1868 return true; | 1868 return true; |
1869 | 1869 |
1870 if (m_devToolsAgent && m_devToolsAgent->handleInputEvent(m_page.get(), input Event)) | 1870 if (m_devToolsAgent && m_devToolsAgent->handleInputEvent(m_page.get(), input Event)) |
1871 return true; | 1871 return true; |
1872 | 1872 |
1873 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. | 1873 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. |
1874 if (m_ignoreInputEvents) | 1874 if (m_ignoreInputEvents) |
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4137 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4137 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
4138 | 4138 |
4139 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4139 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4140 return false; | 4140 return false; |
4141 | 4141 |
4142 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4142 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4143 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4143 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4144 } | 4144 } |
4145 | 4145 |
4146 } // namespace blink | 4146 } // namespace blink |
OLD | NEW |