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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 Loading... | |
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 |
OLD | NEW |