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

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

Issue 1456753002: Compute the popup location/size correctly when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 { 502 {
503 ASSERT(WebLocalFrameImpl::fromFrame(localRoot)); 503 ASSERT(WebLocalFrameImpl::fromFrame(localRoot));
504 // If the frame is still being created, it might not yet have a WebWidget. 504 // If the frame is still being created, it might not yet have a WebWidget.
505 // FIXME: Is this the right thing to do? Is there a way to avoid having 505 // FIXME: Is this the right thing to do? Is there a way to avoid having
506 // a local frame root that doesn't have a WebWidget? During initialization 506 // a local frame root that doesn't have a WebWidget? During initialization
507 // there is no content to draw so this call serves no purpose. 507 // there is no content to draw so this call serves no purpose.
508 if (WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()) 508 if (WebLocalFrameImpl::fromFrame(localRoot)->frameWidget())
509 toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(localRoot)->frameWidge t())->scheduleAnimation(); 509 toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(localRoot)->frameWidge t())->scheduleAnimation();
510 } 510 }
511 511
512 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const 512 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const
tkent 2015/11/18 07:06:39 We can't change the behavior of this function. Th
oshima 2015/11/18 13:03:24 Yes, this is to keep the same behavior in zoom-for
513 { 513 {
514 IntRect screenRect(rectInViewport); 514 WebRect screenRect(rectInViewport);
515 515
516 if (m_webView->client()) { 516 if (m_webView->client())
517 WebRect windowRect = m_webView->client()->windowRect(); 517 m_webView->client()->convertViewportToScreen(&screenRect);
518 screenRect.move(windowRect.x, windowRect.y);
519 }
520 518
521 return screenRect; 519 return screenRect;
522 } 520 }
523 521
524 WebScreenInfo ChromeClientImpl::screenInfo() const 522 WebScreenInfo ChromeClientImpl::screenInfo() const
525 { 523 {
526 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo(); 524 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo();
527 } 525 }
528 526
529 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const 527 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 if (m_webView->pageImportanceSignals()) 1007 if (m_webView->pageImportanceSignals())
1010 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); 1008 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript();
1011 } 1009 }
1012 1010
1013 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() 1011 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler()
1014 { 1012 {
1015 return m_webView->scheduler()->createFrameScheduler().release(); 1013 return m_webView->scheduler()->createFrameScheduler().release();
1016 } 1014 }
1017 1015
1018 } // namespace blink 1016 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698