| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |