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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // FIXME: Should we support enabling a11y while a popup is shown? | 252 // FIXME: Should we support enabling a11y while a popup is shown? |
253 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); | 253 m_page->settings().setAccessibilityEnabled(m_webView->page()->settings().acc
essibilityEnabled()); |
254 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); | 254 m_page->settings().setScrollAnimatorEnabled(m_webView->page()->settings().sc
rollAnimatorEnabled()); |
255 | 255 |
256 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); | 256 provideContextFeaturesTo(*m_page, adoptPtr(new PagePopupFeaturesClient())); |
257 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); | 257 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, emptyFrameLoa
derClient, (EmptyFrameLoaderClient::create())); |
258 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0); | 258 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(emptyFrameLoaderCl
ient.get(), &m_page->frameHost(), 0); |
259 frame->setPagePopupOwner(m_popupClient->ownerElement()); | 259 frame->setPagePopupOwner(m_popupClient->ownerElement()); |
260 frame->setView(FrameView::create(frame.get())); | 260 frame->setView(FrameView::create(frame.get())); |
261 frame->init(); | 261 frame->init(); |
| 262 frame->view()->setParentVisible(true); |
| 263 frame->view()->setSelfVisible(true); |
262 frame->view()->setTransparent(false); | 264 frame->view()->setTransparent(false); |
263 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) | 265 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) |
264 cache->childrenChanged(&m_popupClient->ownerElement()); | 266 cache->childrenChanged(&m_popupClient->ownerElement()); |
265 | 267 |
266 ASSERT(frame->localDOMWindow()); | 268 ASSERT(frame->localDOMWindow()); |
267 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient); | 269 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient); |
268 ASSERT(m_popupClient->ownerElement().document().existingAXObjectCache() == f
rame->document()->existingAXObjectCache()); | 270 ASSERT(m_popupClient->ownerElement().document().existingAXObjectCache() == f
rame->document()->existingAXObjectCache()); |
269 | 271 |
270 RefPtr<SharedBuffer> data = SharedBuffer::create(); | 272 RefPtr<SharedBuffer> data = SharedBuffer::create(); |
271 m_popupClient->writeDocument(data.get()); | 273 m_popupClient->writeDocument(data.get()); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 // A WebPagePopupImpl instance usually has two references. | 539 // A WebPagePopupImpl instance usually has two references. |
538 // - One owned by the instance itself. It represents the visible widget. | 540 // - One owned by the instance itself. It represents the visible widget. |
539 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 541 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
540 // WebPagePopupImpl to close. | 542 // WebPagePopupImpl to close. |
541 // We need them because the closing operation is asynchronous and the widget | 543 // We need them because the closing operation is asynchronous and the widget |
542 // can be closed while the WebViewImpl is unaware of it. | 544 // can be closed while the WebViewImpl is unaware of it. |
543 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 545 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
544 } | 546 } |
545 | 547 |
546 } // namespace blink | 548 } // namespace blink |
OLD | NEW |