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

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

Issue 1855203002: Revert of Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/wtf/StdLibExtras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698