| 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 WebRect screenRect(rectInViewport); | 579 WebRect screenRect(rectInViewport); |
| 580 | 580 |
| 581 DCHECK(widget->isFrameView()); | 581 DCHECK(widget->isFrameView()); |
| 582 const FrameView* view = toFrameView(widget); | 582 const FrameView* view = toFrameView(widget); |
| 583 LocalFrame* frame = view->frame().localFrameRoot(); | 583 LocalFrame* frame = view->frame().localFrameRoot(); |
| 584 | 584 |
| 585 WebWidgetClient* client = WebLocalFrameImpl::fromFrame(frame)->frameWidget()
->client(); | 585 WebWidgetClient* client = WebLocalFrameImpl::fromFrame(frame)->frameWidget()
->client(); |
| 586 | 586 |
| 587 if (client) { | 587 if (client) { |
| 588 client->convertViewportToWindow(&screenRect); | 588 client->convertViewportToWindow(&screenRect); |
| 589 WebRect windowRect = client->windowRect(); | 589 WebRect viewRect = client->viewRect(); |
| 590 screenRect.x += windowRect.x; | 590 screenRect.x += viewRect.x; |
| 591 screenRect.y += windowRect.y; | 591 screenRect.y += viewRect.y; |
| 592 } | 592 } |
| 593 | 593 |
| 594 return screenRect; | 594 return screenRect; |
| 595 } | 595 } |
| 596 | 596 |
| 597 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const | 597 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const |
| 598 { | 598 { |
| 599 if (!m_webView->client()) | 599 if (!m_webView->client()) |
| 600 return scalarValue; | 600 return scalarValue; |
| 601 WebFloatRect viewportRect(0, 0, scalarValue, 0); | 601 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); | 1139 ScreenOrientationController::provideTo(frame, client ? client->webScreenOrie
ntationClient() : nullptr); |
| 1140 if (RuntimeEnabledFeatures::presentationEnabled()) | 1140 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1141 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); | 1141 PresentationController::provideTo(frame, client ? client->presentationCl
ient() : nullptr); |
| 1142 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1142 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1143 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); | 1143 provideAudioOutputDeviceClientTo(frame, AudioOutputDeviceClientImpl::cre
ate()); |
| 1144 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1144 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1145 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); | 1145 InstalledAppController::provideTo(frame, client ? client->installedAppCl
ient() : nullptr); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 } // namespace blink | 1148 } // namespace blink |
| OLD | NEW |