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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 m_page = adoptPtrWillBeNoop(new Page(pageClients)); | 226 m_page = adoptPtrWillBeNoop(new Page(pageClients)); |
227 m_page->settings().setScriptEnabled(true); | 227 m_page->settings().setScriptEnabled(true); |
228 m_page->settings().setAllowScriptsToCloseWindows(true); | 228 m_page->settings().setAllowScriptsToCloseWindows(true); |
229 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); | 229 m_page->setDeviceScaleFactor(m_webView->deviceScaleFactor()); |
230 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); | 230 m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().devi
ceSupportsTouch()); |
231 // FIXME: Should we support enabling a11y while a popup is shown? | 231 // FIXME: Should we support enabling a11y while a popup is shown? |
232 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); | 232 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); |
233 | 233 |
234 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); | 234 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); |
235 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClie
nt(); | 235 static FrameLoaderClient* emptyFrameLoaderClient = new EmptyFrameLoaderClien
t(); |
236 RefPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderClient, &m_pag
e->frameHost(), 0); | 236 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient, &m_page->frameHost(), 0); |
237 frame->setPagePopupOwner(m_popupClient->ownerElement()); | 237 frame->setPagePopupOwner(m_popupClient->ownerElement()); |
238 frame->setView(FrameView::create(frame.get())); | 238 frame->setView(FrameView::create(frame.get())); |
239 frame->init(); | 239 frame->init(); |
240 frame->view()->resize(m_popupClient->contentSize()); | 240 frame->view()->resize(m_popupClient->contentSize()); |
241 frame->view()->setTransparent(false); | 241 frame->view()->setTransparent(false); |
242 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) | 242 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) |
243 cache->childrenChanged(&m_popupClient->ownerElement()); | 243 cache->childrenChanged(&m_popupClient->ownerElement()); |
244 | 244 |
245 ASSERT(frame->domWindow()); | 245 ASSERT(frame->domWindow()); |
246 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient); | 246 DOMWindowPagePopup::install(*frame->domWindow(), m_popupClient); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 // A WebPagePopupImpl instance usually has two references. | 433 // A WebPagePopupImpl instance usually has two references. |
434 // - One owned by the instance itself. It represents the visible widget. | 434 // - One owned by the instance itself. It represents the visible widget. |
435 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 435 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
436 // WebPagePopupImpl to close. | 436 // WebPagePopupImpl to close. |
437 // We need them because the closing operation is asynchronous and the widget | 437 // We need them because the closing operation is asynchronous and the widget |
438 // can be closed while the WebViewImpl is unaware of it. | 438 // can be closed while the WebViewImpl is unaware of it. |
439 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 439 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
440 } | 440 } |
441 | 441 |
442 } // namespace blink | 442 } // namespace blink |
OLD | NEW |