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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "WebRange.h" | 69 #include "WebRange.h" |
70 #include "WebSettingsImpl.h" | 70 #include "WebSettingsImpl.h" |
71 #include "WebTextInputInfo.h" | 71 #include "WebTextInputInfo.h" |
72 #include "WebViewClient.h" | 72 #include "WebViewClient.h" |
73 #include "WebWindowFeatures.h" | 73 #include "WebWindowFeatures.h" |
74 #include "WorkerGlobalScopeProxyProviderImpl.h" | 74 #include "WorkerGlobalScopeProxyProviderImpl.h" |
75 #include "core/accessibility/AXObjectCache.h" | 75 #include "core/accessibility/AXObjectCache.h" |
76 #include "core/clipboard/DataObject.h" | 76 #include "core/clipboard/DataObject.h" |
77 #include "core/dom/Document.h" | 77 #include "core/dom/Document.h" |
78 #include "core/dom/DocumentMarkerController.h" | 78 #include "core/dom/DocumentMarkerController.h" |
| 79 #include "core/dom/EventHandlerRegistry.h" |
79 #include "core/dom/Text.h" | 80 #include "core/dom/Text.h" |
80 #include "core/dom/WheelController.h" | |
81 #include "core/editing/Editor.h" | 81 #include "core/editing/Editor.h" |
82 #include "core/editing/FrameSelection.h" | 82 #include "core/editing/FrameSelection.h" |
83 #include "core/editing/InputMethodController.h" | 83 #include "core/editing/InputMethodController.h" |
84 #include "core/editing/TextIterator.h" | 84 #include "core/editing/TextIterator.h" |
85 #include "core/events/KeyboardEvent.h" | 85 #include "core/events/KeyboardEvent.h" |
86 #include "core/events/WheelEvent.h" | 86 #include "core/events/WheelEvent.h" |
87 #include "core/frame/FrameHost.h" | 87 #include "core/frame/FrameHost.h" |
88 #include "core/frame/FrameView.h" | 88 #include "core/frame/FrameView.h" |
89 #include "core/frame/LocalFrame.h" | 89 #include "core/frame/LocalFrame.h" |
90 #include "core/frame/PinchViewport.h" | 90 #include "core/frame/PinchViewport.h" |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 | 1426 |
1427 return frame->eventHandler().bubblingScroll(scrollDirection, scrollGranulari
ty); | 1427 return frame->eventHandler().bubblingScroll(scrollDirection, scrollGranulari
ty); |
1428 } | 1428 } |
1429 | 1429 |
1430 void WebViewImpl::popupOpened(PopupContainer* popupContainer) | 1430 void WebViewImpl::popupOpened(PopupContainer* popupContainer) |
1431 { | 1431 { |
1432 ASSERT(!m_selectPopup); | 1432 ASSERT(!m_selectPopup); |
1433 m_selectPopup = popupContainer; | 1433 m_selectPopup = popupContainer; |
1434 ASSERT(mainFrameImpl()->frame()->document()); | 1434 ASSERT(mainFrameImpl()->frame()->document()); |
1435 Document& document = *mainFrameImpl()->frame()->document(); | 1435 Document& document = *mainFrameImpl()->frame()->document(); |
1436 WheelController::from(document)->didAddWheelEventHandler(document); | 1436 EventHandlerRegistry::from(document)->didAddExternalEventHandler(document, E
ventTypeNames::wheel); |
1437 } | 1437 } |
1438 | 1438 |
1439 void WebViewImpl::popupClosed(PopupContainer* popupContainer) | 1439 void WebViewImpl::popupClosed(PopupContainer* popupContainer) |
1440 { | 1440 { |
1441 ASSERT(m_selectPopup); | 1441 ASSERT(m_selectPopup); |
1442 m_selectPopup = nullptr; | 1442 m_selectPopup = nullptr; |
1443 ASSERT(mainFrameImpl()->frame()->document()); | 1443 ASSERT(mainFrameImpl()->frame()->document()); |
1444 Document& document = *mainFrameImpl()->frame()->document(); | 1444 Document& document = *mainFrameImpl()->frame()->document(); |
1445 WheelController::from(document)->didRemoveWheelEventHandler(document); | 1445 EventHandlerRegistry::from(document)->didRemoveExternalEventHandler(document
, EventTypeNames::wheel); |
1446 } | 1446 } |
1447 | 1447 |
1448 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
iginBoundsInRootView) | 1448 PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& or
iginBoundsInRootView) |
1449 { | 1449 { |
1450 ASSERT(client); | 1450 ASSERT(client); |
1451 if (hasOpenedPopup()) | 1451 if (hasOpenedPopup()) |
1452 hidePopups(); | 1452 hidePopups(); |
1453 ASSERT(!m_pagePopup); | 1453 ASSERT(!m_pagePopup); |
1454 | 1454 |
1455 WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage); | 1455 WebWidget* popupWidget = m_client->createPopupMenu(WebPopupTypePage); |
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3998 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 3998 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
3999 | 3999 |
4000 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4000 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4001 return false; | 4001 return false; |
4002 | 4002 |
4003 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4003 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4004 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4004 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4005 } | 4005 } |
4006 | 4006 |
4007 } // namespace blink | 4007 } // namespace blink |
OLD | NEW |