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

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: use WheelController instead 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "WebTextInputInfo.h" 91 #include "WebTextInputInfo.h"
92 #include "WebViewClient.h" 92 #include "WebViewClient.h"
93 #include "WebWindowFeatures.h" 93 #include "WebWindowFeatures.h"
94 #include "core/accessibility/AXObjectCache.h" 94 #include "core/accessibility/AXObjectCache.h"
95 #include "core/css/resolver/StyleResolver.h" 95 #include "core/css/resolver/StyleResolver.h"
96 #include "core/dom/Document.h" 96 #include "core/dom/Document.h"
97 #include "core/dom/DocumentMarkerController.h" 97 #include "core/dom/DocumentMarkerController.h"
98 #include "core/dom/KeyboardEvent.h" 98 #include "core/dom/KeyboardEvent.h"
99 #include "core/dom/NodeRenderStyle.h" 99 #include "core/dom/NodeRenderStyle.h"
100 #include "core/dom/Text.h" 100 #include "core/dom/Text.h"
101 #include "core/dom/WheelController.h"
101 #include "core/dom/WheelEvent.h" 102 #include "core/dom/WheelEvent.h"
102 #include "core/editing/Editor.h" 103 #include "core/editing/Editor.h"
103 #include "core/editing/FrameSelection.h" 104 #include "core/editing/FrameSelection.h"
104 #include "core/editing/InputMethodController.h" 105 #include "core/editing/InputMethodController.h"
105 #include "core/editing/TextIterator.h" 106 #include "core/editing/TextIterator.h"
106 #include "core/html/HTMLInputElement.h" 107 #include "core/html/HTMLInputElement.h"
107 #include "core/html/HTMLMediaElement.h" 108 #include "core/html/HTMLMediaElement.h"
108 #include "core/html/HTMLTextAreaElement.h" 109 #include "core/html/HTMLTextAreaElement.h"
109 #include "core/html/HTMLVideoElement.h" 110 #include "core/html/HTMLVideoElement.h"
110 #include "core/inspector/InspectorController.h" 111 #include "core/inspector/InspectorController.h"
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 currentFrame = currentFrame->tree()->parent(); 1525 currentFrame = currentFrame->tree()->parent();
1525 } 1526 }
1526 return scrollHandled; 1527 return scrollHandled;
1527 } 1528 }
1528 1529
1529 void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer) 1530 void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer)
1530 { 1531 {
1531 if (popupContainer->popupType() == WebCore::PopupContainer::Select) { 1532 if (popupContainer->popupType() == WebCore::PopupContainer::Select) {
1532 ASSERT(!m_selectPopup); 1533 ASSERT(!m_selectPopup);
1533 m_selectPopup = popupContainer; 1534 m_selectPopup = popupContainer;
1535 Document* document = mainFrameImpl()->frame()->document();
1536 WheelController::from(document)->didAddWheelEventHandler(document);
1534 } 1537 }
1535 } 1538 }
1536 1539
1537 void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer) 1540 void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
1538 { 1541 {
1539 if (popupContainer->popupType() == WebCore::PopupContainer::Select) { 1542 if (popupContainer->popupType() == WebCore::PopupContainer::Select) {
1540 ASSERT(m_selectPopup); 1543 ASSERT(m_selectPopup);
1541 m_selectPopup = 0; 1544 m_selectPopup = 0;
1545 Document* document = mainFrameImpl()->frame()->document();
1546 WheelController::from(document)->didRemoveWheelEventHandler(document);
1542 } 1547 }
1543 } 1548 }
1544 1549
1545 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or iginBoundsInRootView) 1550 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or iginBoundsInRootView)
1546 { 1551 {
1547 ASSERT(client); 1552 ASSERT(client);
1548 if (hasOpenedPopup()) 1553 if (hasOpenedPopup())
1549 hidePopups(); 1554 hidePopups();
1550 ASSERT(!m_pagePopup); 1555 ASSERT(!m_pagePopup);
1551 1556
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 // the initial viewport width. 4176 // the initial viewport width.
4172 // 2. The author has disabled viewport zoom. 4177 // 2. The author has disabled viewport zoom.
4173 4178
4174 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4179 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4175 4180
4176 return fixedLayoutSize().width == m_size.width 4181 return fixedLayoutSize().width == m_size.width
4177 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4182 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4178 } 4183 }
4179 4184
4180 } // namespace WebKit 4185 } // 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