| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } | 473 } |
| 474 | 474 |
| 475 void InspectorOverlay::drawViewSize() | 475 void InspectorOverlay::drawViewSize() |
| 476 { | 476 { |
| 477 if (m_resizeTimerActive && m_drawViewSize) | 477 if (m_resizeTimerActive && m_drawViewSize) |
| 478 evaluateInOverlay("drawViewSize", ""); | 478 evaluateInOverlay("drawViewSize", ""); |
| 479 } | 479 } |
| 480 | 480 |
| 481 float InspectorOverlay::windowToViewportScale() const | 481 float InspectorOverlay::windowToViewportScale() const |
| 482 { | 482 { |
| 483 return m_webViewImpl->chromeClient().windowToViewportScalar(1.0f); | 483 return m_webViewImpl->chromeClient().windowToViewportScalar(*m_webViewImpl->
mainFrameImpl()->frameView(), 1.0f); |
| 484 } | 484 } |
| 485 | 485 |
| 486 Page* InspectorOverlay::overlayPage() | 486 Page* InspectorOverlay::overlayPage() |
| 487 { | 487 { |
| 488 if (m_overlayPage) | 488 if (m_overlayPage) |
| 489 return m_overlayPage.get(); | 489 return m_overlayPage.get(); |
| 490 | 490 |
| 491 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 491 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| 492 | 492 |
| 493 DEFINE_STATIC_LOCAL(FrameLoaderClient, dummyFrameLoaderClient, (EmptyFrameLo
aderClient::create())); | 493 DEFINE_STATIC_LOCAL(FrameLoaderClient, dummyFrameLoaderClient, (EmptyFrameLo
aderClient::create())); |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 811 |
| 812 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 812 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
| 813 { | 813 { |
| 814 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg
ent) | 814 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg
ent) |
| 815 return; | 815 return; |
| 816 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); | 816 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); |
| 817 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); | 817 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); |
| 818 } | 818 } |
| 819 | 819 |
| 820 } // namespace blink | 820 } // namespace blink |
| OLD | NEW |