Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 1884863003: Non passive touch end or touch cancel listeners should not block scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 { 156 {
157 return IntSize(0, 0); 157 return IntSize(0, 0);
158 } 158 }
159 159
160 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override 160 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override
161 { 161 {
162 if (m_popup->m_webView->client()) 162 if (m_popup->m_webView->client())
163 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor)) ; 163 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor)) ;
164 } 164 }
165 165
166 void setHaveTouchEventListeners(bool hasListeners) override
167 {
168 m_popup->widgetClient()->hasTouchEventHandlers(hasListeners);
169 }
170
166 void setEventListenerProperties(WebEventListenerClass eventClass, WebEventLi stenerProperties properties) override 171 void setEventListenerProperties(WebEventListenerClass eventClass, WebEventLi stenerProperties properties) override
167 { 172 {
168 if (eventClass == WebEventListenerClass::Touch)
169 m_popup->widgetClient()->hasTouchEventHandlers(properties != WebEven tListenerProperties::Nothing);
170 if (m_popup->m_layerTreeView) 173 if (m_popup->m_layerTreeView)
171 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, pro perties); 174 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, pro perties);
172 } 175 }
173 WebEventListenerProperties eventListenerProperties(WebEventListenerClass eve ntClass) const override 176 WebEventListenerProperties eventListenerProperties(WebEventListenerClass eve ntClass) const override
174 { 177 {
175 if (m_popup->m_layerTreeView) 178 if (m_popup->m_layerTreeView)
176 return m_popup->m_layerTreeView->eventListenerProperties(eventClass) ; 179 return m_popup->m_layerTreeView->eventListenerProperties(eventClass) ;
177 return WebEventListenerProperties::Nothing; 180 return WebEventListenerProperties::Nothing;
178 } 181 }
179 182
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // A WebPagePopupImpl instance usually has two references. 563 // A WebPagePopupImpl instance usually has two references.
561 // - One owned by the instance itself. It represents the visible widget. 564 // - One owned by the instance itself. It represents the visible widget.
562 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 565 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
563 // WebPagePopupImpl to close. 566 // WebPagePopupImpl to close.
564 // We need them because the closing operation is asynchronous and the widget 567 // We need them because the closing operation is asynchronous and the widget
565 // can be closed while the WebViewImpl is unaware of it. 568 // can be closed while the WebViewImpl is unaware of it.
566 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 569 return adoptRef(new WebPagePopupImpl(client)).leakRef();
567 } 570 }
568 571
569 } // namespace blink 572 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698