OLD | NEW |
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 m_page = Page::create(pageClients); | 271 m_page = Page::create(pageClients); |
272 m_page->settings().setScriptEnabled(true); | 272 m_page->settings().setScriptEnabled(true); |
273 m_page->settings().setAllowScriptsToCloseWindows(true); | 273 m_page->settings().setAllowScriptsToCloseWindows(true); |
274 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); | 274 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); |
275 // FIXME: Should we support enabling a11y while a popup is shown? | 275 // FIXME: Should we support enabling a11y while a popup is shown? |
276 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); | 276 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); |
277 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); | 277 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); |
278 | 278 |
279 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); | 279 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); |
280 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); | 280 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); |
281 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0); | 281 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0, nullptr); |
282 frame->setPagePopupOwner(m_popupClient->ownerElement()); | 282 frame->setPagePopupOwner(m_popupClient->ownerElement()); |
283 frame->setView(FrameView::create(frame.get())); | 283 frame->setView(FrameView::create(frame.get())); |
284 frame->init(); | 284 frame->init(); |
285 frame->view()->setParentVisible(true); | 285 frame->view()->setParentVisible(true); |
286 frame->view()->setSelfVisible(true); | 286 frame->view()->setSelfVisible(true); |
287 frame->view()->setTransparent(false); | 287 frame->view()->setTransparent(false); |
288 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) | 288 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) |
289 cache->childrenChanged(&m_popupClient->ownerElement()); | 289 cache->childrenChanged(&m_popupClient->ownerElement()); |
290 | 290 |
291 ASSERT(frame->localDOMWindow()); | 291 ASSERT(frame->localDOMWindow()); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // A WebPagePopupImpl instance usually has two references. | 557 // A WebPagePopupImpl instance usually has two references. |
558 // - One owned by the instance itself. It represents the visible widget. | 558 // - One owned by the instance itself. It represents the visible widget. |
559 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 559 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
560 // WebPagePopupImpl to close. | 560 // WebPagePopupImpl to close. |
561 // We need them because the closing operation is asynchronous and the widget | 561 // We need them because the closing operation is asynchronous and the widget |
562 // can be closed while the WebViewImpl is unaware of it. | 562 // can be closed while the WebViewImpl is unaware of it. |
563 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 563 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
564 } | 564 } |
565 | 565 |
566 } // namespace blink | 566 } // namespace blink |
OLD | NEW |