| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 513 |
| 514 if (m_webView->client()) { | 514 if (m_webView->client()) { |
| 515 m_webView->client()->convertViewportToWindow(&screenRect); | 515 m_webView->client()->convertViewportToWindow(&screenRect); |
| 516 WebRect windowRect = m_webView->client()->windowRect(); | 516 WebRect windowRect = m_webView->client()->windowRect(); |
| 517 screenRect.x += windowRect.x; | 517 screenRect.x += windowRect.x; |
| 518 screenRect.y += windowRect.y; | 518 screenRect.y += windowRect.y; |
| 519 } | 519 } |
| 520 return screenRect; | 520 return screenRect; |
| 521 } | 521 } |
| 522 | 522 |
| 523 FloatRect ChromeClientImpl::windowToViewport(const FloatRect& rectInWindow) cons
t | 523 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const |
| 524 { | 524 { |
| 525 WebFloatRect viewportRect(rectInWindow); | 525 if (!m_webView->client()) |
| 526 if (m_webView->client()) | 526 return scalarValue; |
| 527 m_webView->client()->convertWindowToViewport(&viewportRect); | 527 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
| 528 return viewportRect; | 528 m_webView->client()->convertWindowToViewport(&viewportRect); |
| 529 return viewportRect.width; |
| 529 } | 530 } |
| 530 | 531 |
| 531 WebScreenInfo ChromeClientImpl::screenInfo() const | 532 WebScreenInfo ChromeClientImpl::screenInfo() const |
| 532 { | 533 { |
| 533 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); | 534 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn
fo(); |
| 534 } | 535 } |
| 535 | 536 |
| 536 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const | 537 void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& siz
e) const |
| 537 { | 538 { |
| 538 m_webView->didChangeContentsSize(); | 539 m_webView->didChangeContentsSize(); |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 if (m_webView->pageImportanceSignals()) | 1058 if (m_webView->pageImportanceSignals()) |
| 1058 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); | 1059 m_webView->pageImportanceSignals()->setIssuedNonGetFetchFromScript(); |
| 1059 } | 1060 } |
| 1060 | 1061 |
| 1061 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() | 1062 PassOwnPtr<WebFrameScheduler> ChromeClientImpl::createFrameScheduler() |
| 1062 { | 1063 { |
| 1063 return m_webView->scheduler()->createFrameScheduler().release(); | 1064 return m_webView->scheduler()->createFrameScheduler().release(); |
| 1064 } | 1065 } |
| 1065 | 1066 |
| 1066 } // namespace blink | 1067 } // namespace blink |
| OLD | NEW |