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

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

Issue 1814863002: Make page popups work under OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WebContentsImpl::SendScreenRects simplified Created 4 years, 9 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (WebLocalFrameImpl::fromFrame(frame) && WebLocalFrameImpl::fromFrame(fram e)->frameWidget()) { 500 if (WebLocalFrameImpl::fromFrame(frame) && WebLocalFrameImpl::fromFrame(fram e)->frameWidget()) {
501 WebLocalFrameImpl::fromFrame(frame)->frameWidget()->scheduleAnimation(); 501 WebLocalFrameImpl::fromFrame(frame)->frameWidget()->scheduleAnimation();
502 } else { 502 } else {
503 // TODO(lfg): We need to keep this for now because we still have some 503 // TODO(lfg): We need to keep this for now because we still have some
504 // WebViews who don't have a WebViewFrameWidget. This should be 504 // WebViews who don't have a WebViewFrameWidget. This should be
505 // removed once the WebViewFrameWidget refactor is complete. 505 // removed once the WebViewFrameWidget refactor is complete.
506 m_webView->scheduleAnimation(); 506 m_webView->scheduleAnimation();
507 } 507 }
508 } 508 }
509 509
510 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const 510 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport, const Widget* widget) const
bokan 2016/03/18 15:27:36 It seems like an awkward thing to have to pass in
kenrb 2016/03/18 17:46:10 The trouble is that there can be many local frame
bokan 2016/03/18 19:25:42 Ah, I see. ChromeClient still seems like an odd pl
511 { 511 {
512 WebRect screenRect(rectInViewport); 512 WebRect screenRect(rectInViewport);
513 513
514 if (m_webView->client()) { 514 ASSERT(widget->isFrameView());
bokan 2016/03/18 15:27:36 Just make the parameter a FrameView*?
kenrb 2016/03/18 17:46:10 I think it's a layering violation for HostWindow.h
bokan 2016/03/18 19:25:42 Ah, yah, you're right. Though that seems to imply
515 const FrameView* view = toFrameView(widget);
516 LocalFrame* frame = view->frame().localFrameRoot();
517
518 if (WebLocalFrameImpl::fromFrame(frame) && WebLocalFrameImpl::fromFrame(fram e)->frameWidget()) {
bokan 2016/03/18 15:27:36 Seems like the only difference in these branches i
kenrb 2016/03/18 17:46:10 Done.
519 WebFrameWidgetImpl* frameWidget = toWebFrameWidgetImpl(WebLocalFrameImpl ::fromFrame(frame)->frameWidget());
520 frameWidget->client()->convertViewportToWindow(&screenRect);
521 WebRect windowRect = frameWidget->client()->windowRect();
522 screenRect.x += windowRect.x;
523 screenRect.y += windowRect.y;
524 } else if (m_webView->client()) {
515 m_webView->client()->convertViewportToWindow(&screenRect); 525 m_webView->client()->convertViewportToWindow(&screenRect);
516 WebRect windowRect = m_webView->client()->windowRect(); 526 WebRect windowRect = m_webView->client()->windowRect();
517 screenRect.x += windowRect.x; 527 screenRect.x += windowRect.x;
518 screenRect.y += windowRect.y; 528 screenRect.y += windowRect.y;
519 } 529 }
520 return screenRect; 530 return screenRect;
521 } 531 }
522 532
523 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const 533 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const
524 { 534 {
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 if (m_webView->pageImportanceSignals()) 1068 if (m_webView->pageImportanceSignals())
1059 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); 1069 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript();
1060 } 1070 }
1061 1071
1062 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() 1072 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler()
1063 { 1073 {
1064 return m_webView->scheduler()->createFrameScheduler().release(); 1074 return m_webView->scheduler()->createFrameScheduler().release();
1065 } 1075 }
1066 1076
1067 } // namespace blink 1077 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698