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