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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 23677012: Tell the root layer it has a wheel handler when a select is active (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 currentFrame = currentFrame->tree()->parent(); 1524 currentFrame = currentFrame->tree()->parent();
1525 } 1525 }
1526 return scrollHandled; 1526 return scrollHandled;
1527 } 1527 }
1528 1528
1529 void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer) 1529 void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer)
1530 { 1530 {
1531 if (popupContainer->popupType() == WebCore::PopupContainer::Select) { 1531 if (popupContainer->popupType() == WebCore::PopupContainer::Select) {
1532 ASSERT(!m_selectPopup); 1532 ASSERT(!m_selectPopup);
1533 m_selectPopup = popupContainer; 1533 m_selectPopup = popupContainer;
1534 m_rootLayer->setHaveWheelEventHandlers(true);
1534 } 1535 }
1535 } 1536 }
1536 1537
1537 void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer) 1538 void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
1538 { 1539 {
1539 if (popupContainer->popupType() == WebCore::PopupContainer::Select) { 1540 if (popupContainer->popupType() == WebCore::PopupContainer::Select) {
1540 ASSERT(m_selectPopup); 1541 ASSERT(m_selectPopup);
1541 m_selectPopup = 0; 1542 m_selectPopup = 0;
1543 m_rootLayer->setHaveWheelEventHandlers(false);
jamesr 2013/09/20 18:04:10 what if the root layer actually had wheel event ha
1542 } 1544 }
1543 } 1545 }
1544 1546
1545 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or iginBoundsInRootView) 1547 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or iginBoundsInRootView)
1546 { 1548 {
1547 ASSERT(client); 1549 ASSERT(client);
1548 if (hasOpenedPopup()) 1550 if (hasOpenedPopup())
1549 hidePopups(); 1551 hidePopups();
1550 ASSERT(!m_pagePopup); 1552 ASSERT(!m_pagePopup);
1551 1553
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 // the initial viewport width. 4173 // the initial viewport width.
4172 // 2. The author has disabled viewport zoom. 4174 // 2. The author has disabled viewport zoom.
4173 4175
4174 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4176 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4175 4177
4176 return fixedLayoutSize().width == m_size.width 4178 return fixedLayoutSize().width == m_size.width
4177 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4179 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4178 } 4180 }
4179 4181
4180 } // namespace WebKit 4182 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698