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

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 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // If the frame is still being created, it might not yet have a WebWidget. 505 // If the frame is still being created, it might not yet have a WebWidget.
506 // FIXME: Is this the right thing to do? Is there a way to avoid having 506 // FIXME: Is this the right thing to do? Is there a way to avoid having
507 // a local frame root that doesn't have a WebWidget? During initialization 507 // a local frame root that doesn't have a WebWidget? During initialization
508 // there is no content to draw so this call serves no purpose. 508 // there is no content to draw so this call serves no purpose.
509 if (WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()) 509 if (WebLocalFrameImpl::fromFrame(localRoot)->frameWidget())
510 toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(localRoot)->frameWidge t())->scheduleAnimation(); 510 toWebFrameWidgetImpl(WebLocalFrameImpl::fromFrame(localRoot)->frameWidge t())->scheduleAnimation();
511 } 511 }
512 512
513 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const 513 IntRect ChromeClientImpl::viewportToScreen(const IntRect& rectInViewport) const
514 { 514 {
515 IntRect screenRect(rectInViewport); 515 WebRect screenRect(rectInViewport);
516 516
517 if (m_webView->client()) { 517 if (m_webView->client()) {
518 m_webView->client()->convertViewportToWindow(&screenRect);
518 WebRect windowRect = m_webView->client()->windowRect(); 519 WebRect windowRect = m_webView->client()->windowRect();
519 screenRect.move(windowRect.x, windowRect.y); 520 screenRect.x += windowRect.x;
521 screenRect.y += windowRect.y;
520 } 522 }
521
522 return screenRect; 523 return screenRect;
523 } 524 }
524 525
525 WebScreenInfo ChromeClientImpl::screenInfo() const 526 WebScreenInfo ChromeClientImpl::screenInfo() const
526 { 527 {
527 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo(); 528 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo();
528 } 529 }
529 530
530 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const 531 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz e) const
531 { 532 {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 if (m_webView->pageImportanceSignals()) 1020 if (m_webView->pageImportanceSignals())
1020 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); 1021 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript();
1021 } 1022 }
1022 1023
1023 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() 1024 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler()
1024 { 1025 {
1025 return m_webView->scheduler()->createFrameScheduler().release(); 1026 return m_webView->scheduler()->createFrameScheduler().release();
1026 } 1027 }
1027 1028
1028 } // namespace blink 1029 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698