| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 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(FrameLoaderClient, emptyFrameLoaderClient, (EmptyFrameLo
aderClient::create())); | 280 DEFINE_STATIC_LOCAL(Persistent<FrameLoaderClient>, emptyFrameLoaderClient, (
EmptyFrameLoaderClient::create())); |
| 281 RawPtr<LocalFrame> frame = LocalFrame::create(&emptyFrameLoaderClient, &m_pa
ge->frameHost(), 0); | 281 RawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderClient.get(),
&m_page->frameHost(), 0); |
| 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 DCHECK(frame->localDOMWindow()); | 291 DCHECK(frame->localDOMWindow()); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // A WebPagePopupImpl instance usually has two references. | 560 // A WebPagePopupImpl instance usually has two references. |
| 561 // - One owned by the instance itself. It represents the visible widget. | 561 // - One owned by the instance itself. It represents the visible widget. |
| 562 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 562 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 563 // WebPagePopupImpl to close. | 563 // WebPagePopupImpl to close. |
| 564 // We need them because the closing operation is asynchronous and the widget | 564 // We need them because the closing operation is asynchronous and the widget |
| 565 // can be closed while the WebViewImpl is unaware of it. | 565 // can be closed while the WebViewImpl is unaware of it. |
| 566 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 566 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace blink | 569 } // namespace blink |
| OLD | NEW |