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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 | 574 |
575 DCHECK(widget->isFrameView()); | 575 DCHECK(widget->isFrameView()); |
576 const FrameView* view = toFrameView(widget); | 576 const FrameView* view = toFrameView(widget); |
577 LocalFrame* frame = view->frame().localFrameRoot(); | 577 LocalFrame* frame = view->frame().localFrameRoot(); |
578 | 578 |
579 WebWidgetClient* client = | 579 WebWidgetClient* client = |
580 WebLocalFrameImpl::fromFrame(frame)->frameWidget()->client(); | 580 WebLocalFrameImpl::fromFrame(frame)->frameWidget()->client(); |
581 | 581 |
582 if (client) { | 582 if (client) { |
583 client->convertViewportToWindow(&screenRect); | 583 client->convertViewportToWindow(&screenRect); |
584 WebRect windowRect = client->windowRect(); | 584 WebRect viewRect = client->viewRect(); |
585 screenRect.x += windowRect.x; | 585 screenRect.x += viewRect.x; |
586 screenRect.y += windowRect.y; | 586 screenRect.y += viewRect.y; |
587 } | 587 } |
588 | 588 |
589 return screenRect; | 589 return screenRect; |
590 } | 590 } |
591 | 591 |
592 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const { | 592 float ChromeClientImpl::windowToViewportScalar(const float scalarValue) const { |
593 if (!m_webView->client()) | 593 if (!m_webView->client()) |
594 return scalarValue; | 594 return scalarValue; |
595 WebFloatRect viewportRect(0, 0, scalarValue, 0); | 595 WebFloatRect viewportRect(0, 0, scalarValue, 0); |
596 m_webView->client()->convertWindowToViewport(&viewportRect); | 596 m_webView->client()->convertWindowToViewport(&viewportRect); |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 if (RuntimeEnabledFeatures::presentationEnabled()) | 1169 if (RuntimeEnabledFeatures::presentationEnabled()) |
1170 PresentationController::provideTo(frame, client->presentationClient()); | 1170 PresentationController::provideTo(frame, client->presentationClient()); |
1171 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1171 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
1172 provideAudioOutputDeviceClientTo(frame, | 1172 provideAudioOutputDeviceClientTo(frame, |
1173 AudioOutputDeviceClientImpl::create()); | 1173 AudioOutputDeviceClientImpl::create()); |
1174 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1174 if (RuntimeEnabledFeatures::installedAppEnabled()) |
1175 InstalledAppController::provideTo(frame, client->installedAppClient()); | 1175 InstalledAppController::provideTo(frame, client->installedAppClient()); |
1176 } | 1176 } |
1177 | 1177 |
1178 } // namespace blink | 1178 } // namespace blink |
OLD | NEW |