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

Side by Side Diff: Source/web/WebPagePopupImpl.cpp

Issue 882813005: Respect the smooth scrolling setting in LayerScrollableArea. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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 | « Source/core/layout/LayerScrollableArea.cpp ('k') | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 m_chromeClient = adoptPtr(new PagePopupChromeClient(this)); 236 m_chromeClient = adoptPtr(new PagePopupChromeClient(this));
237 pageClients.chromeClient = m_chromeClient.get(); 237 pageClients.chromeClient = m_chromeClient.get();
238 238
239 m_page = adoptPtrWillBeNoop(new Page(pageClients)); 239 m_page = adoptPtrWillBeNoop(new Page(pageClients));
240 m_page->settings().setScriptEnabled(true); 240 m_page->settings().setScriptEnabled(true);
241 m_page->settings().setAllowScriptsToCloseWindows(true); 241 m_page->settings().setAllowScriptsToCloseWindows(true);
242 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); 242 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor());
243 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch()); 243 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi ceSupportsTouch());
244 // FIXME: Should we support enabling a11y while a popup is shown? 244 // FIXME: Should we support enabling a11y while a popup is shown?
245 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc essibilityEnabled()); 245 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc essibilityEnabled());
246 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc rollAnimatorEnabled());
246 247
247 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); 248 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient()));
248 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClien t(); 249 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClien t();
249 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl ient, &m_page->frameHost(), 0); 250 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl ient, &m_page->frameHost(), 0);
250 frame->setPagePopupOwner(m_popupClient->ownerElement()); 251 frame->setPagePopupOwner(m_popupClient->ownerElement());
251 frame->setView(FrameView::create(frame.get())); 252 frame->setView(FrameView::create(frame.get()));
252 frame->init(); 253 frame->init();
253 frame->view()->resize(m_popupClient->contentSize()); 254 frame->view()->resize(m_popupClient->contentSize());
254 frame->view()->setTransparent(false); 255 frame->view()->setTransparent(false);
255 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing AXObjectCache()) 256 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing AXObjectCache())
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // A WebPagePopupImpl instance usually has two references. 485 // A WebPagePopupImpl instance usually has two references.
485 // - One owned by the instance itself. It represents the visible widget. 486 // - One owned by the instance itself. It represents the visible widget.
486 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 487 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
487 // WebPagePopupImpl to close. 488 // WebPagePopupImpl to close.
488 // We need them because the closing operation is asynchronous and the widget 489 // We need them because the closing operation is asynchronous and the widget
489 // can be closed while the WebViewImpl is unaware of it. 490 // can be closed while the WebViewImpl is unaware of it.
490 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 491 return adoptRef(new WebPagePopupImpl(client)).leakRef();
491 } 492 }
492 493
493 } // namespace blink 494 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayerScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698