| Index: Source/web/WebPopupMenuImpl.cpp
|
| diff --git a/Source/web/WebPopupMenuImpl.cpp b/Source/web/WebPopupMenuImpl.cpp
|
| index 3a9134d708df741f1a82c70525529691308c6f0a..04cfcc5914bb849672ec295c276b0e90f6fd3ff0 100644
|
| --- a/Source/web/WebPopupMenuImpl.cpp
|
| +++ b/Source/web/WebPopupMenuImpl.cpp
|
| @@ -74,7 +74,6 @@ WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client)
|
| WebPopupMenuImpl::WebPopupMenuImpl(WebWidgetClient* client)
|
| : m_client(client)
|
| , m_layerTreeView(0)
|
| - , m_isAcceleratedCompositingActive(false)
|
| // Set to impossible point so we always get the first mouse position.
|
| , m_lastMousePosition(WebPoint(-1, -1))
|
| , m_widget(0)
|
| @@ -89,7 +88,6 @@ WebPopupMenuImpl::~WebPopupMenuImpl()
|
|
|
| void WebPopupMenuImpl::willCloseLayerTreeView()
|
| {
|
| - enterForceCompositingMode(false);
|
| m_layerTreeView = 0;
|
| }
|
|
|
| @@ -102,6 +100,19 @@ void WebPopupMenuImpl::initialize(FramelessScrollView* widget, const WebRect& bo
|
| m_client->setWindowRect(bounds);
|
| m_client->show(WebNavigationPolicy()); // Policy is ignored.
|
| }
|
| +
|
| + m_client->initializeLayerTreeView();
|
| + m_layerTreeView = m_client->layerTreeView();
|
| + if (m_layerTreeView) {
|
| + m_layerTreeView->setVisible(true);
|
| + m_client->didActivateCompositor();
|
| + m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
|
| + m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
|
| + m_rootLayer->layer()->setBounds(m_size);
|
| + m_layerTreeView->setRootLayer(*m_rootLayer->layer());
|
| + } else {
|
| + m_client->didDeactivateCompositor();
|
| + }
|
| }
|
|
|
| void WebPopupMenuImpl::handleMouseMove(const WebMouseEvent& event)
|
| @@ -204,40 +215,6 @@ void WebPopupMenuImpl::layout()
|
| {
|
| }
|
|
|
| -void WebPopupMenuImpl::enterForceCompositingMode(bool enter)
|
| -{
|
| - // FIXME: Is this function really correct? The other overrides of this function
|
| - // just used to set forceCompositingMode before we removed that setting.
|
| - // crbug.com/378029
|
| - if (m_isAcceleratedCompositingActive == enter)
|
| - return;
|
| -
|
| - if (!enter) {
|
| - m_isAcceleratedCompositingActive = false;
|
| - m_client->didDeactivateCompositor();
|
| - } else if (m_layerTreeView) {
|
| - m_isAcceleratedCompositingActive = true;
|
| - m_client->didActivateCompositor();
|
| - } else {
|
| - TRACE_EVENT0("webkit", "WebPopupMenuImpl::enterForceCompositingMode(true)");
|
| -
|
| - m_client->initializeLayerTreeView();
|
| - m_layerTreeView = m_client->layerTreeView();
|
| - if (m_layerTreeView) {
|
| - m_layerTreeView->setVisible(true);
|
| - m_client->didActivateCompositor();
|
| - m_isAcceleratedCompositingActive = true;
|
| - m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
|
| - m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
|
| - m_rootLayer->layer()->setBounds(m_size);
|
| - m_layerTreeView->setRootLayer(*m_rootLayer->layer());
|
| - } else {
|
| - m_isAcceleratedCompositingActive = false;
|
| - m_client->didDeactivateCompositor();
|
| - }
|
| - }
|
| -}
|
| -
|
| void WebPopupMenuImpl::paintContents(WebCanvas* canvas, const WebRect& rect, bool, WebFloatRect&,
|
| WebContentLayerClient::GraphicsContextStatus contextStatus)
|
| {
|
|
|