| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 LocalFrame* InspectorOverlay::overlayMainFrame() { | 582 LocalFrame* InspectorOverlay::overlayMainFrame() { |
| 583 return toLocalFrame(overlayPage()->mainFrame()); | 583 return toLocalFrame(overlayPage()->mainFrame()); |
| 584 } | 584 } |
| 585 | 585 |
| 586 void InspectorOverlay::reset(const IntSize& viewportSize, | 586 void InspectorOverlay::reset(const IntSize& viewportSize, |
| 587 const IntPoint& documentScrollOffset) { | 587 const IntPoint& documentScrollOffset) { |
| 588 std::unique_ptr<protocol::DictionaryValue> resetData = | 588 std::unique_ptr<protocol::DictionaryValue> resetData = |
| 589 protocol::DictionaryValue::create(); | 589 protocol::DictionaryValue::create(); |
| 590 resetData->setDouble( | 590 resetData->setDouble( |
| 591 "deviceScaleFactor", | 591 "deviceScaleFactor", |
| 592 m_frameImpl->frame()->host()->deviceScaleFactorDeprecated()); | 592 m_frameImpl->frame()->page()->deviceScaleFactorDeprecated()); |
| 593 resetData->setDouble("pageScaleFactor", | 593 resetData->setDouble("pageScaleFactor", |
| 594 m_frameImpl->frame()->host()->visualViewport().scale()); | 594 m_frameImpl->frame()->host()->visualViewport().scale()); |
| 595 | 595 |
| 596 IntRect viewportInScreen = | 596 IntRect viewportInScreen = |
| 597 m_frameImpl->frame()->page()->chromeClient().viewportToScreen( | 597 m_frameImpl->frame()->page()->chromeClient().viewportToScreen( |
| 598 IntRect(IntPoint(), viewportSize), m_frameImpl->frame()->view()); | 598 IntRect(IntPoint(), viewportSize), m_frameImpl->frame()->view()); |
| 599 resetData->setObject("viewportSize", | 599 resetData->setObject("viewportSize", |
| 600 buildObjectForSize(viewportInScreen.size())); | 600 buildObjectForSize(viewportInScreen.size())); |
| 601 | 601 |
| 602 // The zoom factor in the overlay frame already has been multiplied by the | 602 // The zoom factor in the overlay frame already has been multiplied by the |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 bool InspectorOverlay::shouldSearchForNode() { | 787 bool InspectorOverlay::shouldSearchForNode() { |
| 788 return m_inspectMode != InspectorDOMAgent::NotSearching; | 788 return m_inspectMode != InspectorDOMAgent::NotSearching; |
| 789 } | 789 } |
| 790 | 790 |
| 791 void InspectorOverlay::inspect(Node* node) { | 791 void InspectorOverlay::inspect(Node* node) { |
| 792 if (m_domAgent) | 792 if (m_domAgent) |
| 793 m_domAgent->inspect(node); | 793 m_domAgent->inspect(node); |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // namespace blink | 796 } // namespace blink |
| OLD | NEW |