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

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

Issue 1127013005: Implement layoutAndPaintAsync() for WebPagePopupImpl and WebFrameWidgetImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: It also fixes crbug.com/485501 Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPagePopupImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 483 }
484 484
485 m_popupClient->didClosePopup(); 485 m_popupClient->didClosePopup();
486 } 486 }
487 487
488 LocalDOMWindow* WebPagePopupImpl::window() 488 LocalDOMWindow* WebPagePopupImpl::window()
489 { 489 {
490 return m_page->deprecatedLocalMainFrame()->localDOMWindow(); 490 return m_page->deprecatedLocalMainFrame()->localDOMWindow();
491 } 491 }
492 492
493 void WebPagePopupImpl::layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback* callb ack)
494 {
495 m_layerTreeView->layoutAndPaintAsync(callback);
496 }
497
493 void WebPagePopupImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCal lback* callback) 498 void WebPagePopupImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCal lback* callback)
494 { 499 {
495 ASSERT(isAcceleratedCompositingActive()); 500 ASSERT(isAcceleratedCompositingActive());
496 m_layerTreeView->compositeAndReadbackAsync(callback); 501 m_layerTreeView->compositeAndReadbackAsync(callback);
497 } 502 }
498 503
499 WebPoint WebPagePopupImpl::positionRelativeToOwner() 504 WebPoint WebPagePopupImpl::positionRelativeToOwner()
500 { 505 {
501 WebRect windowRect = m_webView->client()->rootWindowRect(); 506 WebRect windowRect = m_webView->client()->rootWindowRect();
502 return WebPoint(m_windowRectInScreen.x - windowRect.x, m_windowRectInScreen. y - windowRect.y); 507 return WebPoint(m_windowRectInScreen.x - windowRect.x, m_windowRectInScreen. y - windowRect.y);
503 } 508 }
504 509
505 // WebPagePopup ---------------------------------------------------------------- 510 // WebPagePopup ----------------------------------------------------------------
506 511
507 WebPagePopup* WebPagePopup::create(WebWidgetClient* client) 512 WebPagePopup* WebPagePopup::create(WebWidgetClient* client)
508 { 513 {
509 if (!client) 514 if (!client)
510 CRASH(); 515 CRASH();
511 // A WebPagePopupImpl instance usually has two references. 516 // A WebPagePopupImpl instance usually has two references.
512 // - One owned by the instance itself. It represents the visible widget. 517 // - One owned by the instance itself. It represents the visible widget.
513 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 518 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
514 // WebPagePopupImpl to close. 519 // WebPagePopupImpl to close.
515 // We need them because the closing operation is asynchronous and the widget 520 // We need them because the closing operation is asynchronous and the widget
516 // can be closed while the WebViewImpl is unaware of it. 521 // can be closed while the WebViewImpl is unaware of it.
517 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 522 return adoptRef(new WebPagePopupImpl(client)).leakRef();
518 } 523 }
519 524
520 } // namespace blink 525 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebPagePopupImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698