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

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 14735003: Remove compile time flag ENABLE_PAGE_POPUP . This is part of an overall effort to remove unneeded c… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/core/dom/ContextFeatures.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 83264fa77e06c5463bf13099a6011a45043cba78..e302545918ded2defd853c2bbce522729bef0a63 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -535,19 +535,13 @@ void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
// popup). We also save it so we can prevent a click on an element from immediately
// reopening the same popup.
RefPtr<WebCore::PopupContainer> selectPopup;
-#if ENABLE(PAGE_POPUP)
RefPtr<WebPagePopupImpl> pagePopup;
-#endif
if (event.button == WebMouseEvent::ButtonLeft) {
selectPopup = m_selectPopup;
-#if ENABLE(PAGE_POPUP)
pagePopup = m_pagePopup;
-#endif
hidePopups();
ASSERT(!m_selectPopup);
-#if ENABLE(PAGE_POPUP)
ASSERT(!m_pagePopup);
-#endif
}
m_lastMouseDownPoint = WebPoint(event.x, event.y);
@@ -575,13 +569,11 @@ void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
hideSelectPopup();
}
-#if ENABLE(PAGE_POPUP)
if (m_pagePopup && pagePopup && m_pagePopup->hasSamePopupClient(pagePopup.get())) {
// That click triggered a page popup that is the same as the one we just closed.
// It needs to be closed.
closePagePopup(m_pagePopup.get());
}
-#endif
// Dispatch the contextmenu event regardless of if the click was swallowed.
// On Windows, we handle it on mouse up, not down.
@@ -942,7 +934,6 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
// not the page.
if (m_selectPopup)
return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
-#if ENABLE(PAGE_POPUP)
if (m_pagePopup) {
m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
// We need to ignore the next Char event after this otherwise pressing
@@ -951,7 +942,6 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
m_suppressNextKeypressEvent = true;
return true;
}
-#endif
// Give Autocomplete a chance to consume the key events it is interested in.
if (autocompleteHandleKeyEvent(event))
@@ -1064,10 +1054,8 @@ bool WebViewImpl::handleCharEvent(const WebKeyboardEvent& event)
// not the page.
if (m_selectPopup)
return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
-#if ENABLE(PAGE_POPUP)
if (m_pagePopup)
return m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
-#endif
Frame* frame = focusedWebCoreFrame();
if (!frame)
@@ -1516,7 +1504,6 @@ void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer)
}
}
-#if ENABLE(PAGE_POPUP)
PagePopup* WebViewImpl::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView)
{
ASSERT(client);
@@ -1544,7 +1531,6 @@ void WebViewImpl::closePagePopup(PagePopup* popup)
m_pagePopup->closePopup();
m_pagePopup = 0;
}
-#endif
void WebViewImpl::hideAutofillPopup()
{
@@ -3520,10 +3506,8 @@ void WebViewImpl::hidePopups()
{
hideSelectPopup();
hideAutofillPopup();
-#if ENABLE(PAGE_POPUP)
if (m_pagePopup)
closePagePopup(m_pagePopup.get());
-#endif
}
void WebViewImpl::performCustomContextMenuAction(unsigned action)
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/core/dom/ContextFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698