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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 LocalFrame* InspectorOverlay::overlayMainFrame() | 518 LocalFrame* InspectorOverlay::overlayMainFrame() |
519 { | 519 { |
520 return toLocalFrame(overlayPage()->mainFrame()); | 520 return toLocalFrame(overlayPage()->mainFrame()); |
521 } | 521 } |
522 | 522 |
523 void InspectorOverlay::reset(const IntSize& viewportSize, const IntPoint& docume
ntScrollOffset) | 523 void InspectorOverlay::reset(const IntSize& viewportSize, const IntPoint& docume
ntScrollOffset) |
524 { | 524 { |
525 RefPtr<JSONObject> resetData = JSONObject::create(); | 525 RefPtr<JSONObject> resetData = JSONObject::create(); |
526 resetData->setNumber("deviceScaleFactor", m_webViewImpl->page()->deviceScale
Factor()); | 526 resetData->setNumber("deviceScaleFactor", m_webViewImpl->page()->deviceScale
Factor()); |
| 527 resetData->setNumber("pageScaleFactor", m_webViewImpl->page()->pageScaleFact
or()); |
527 resetData->setObject("viewportSize", buildObjectForSize(viewportSize)); | 528 resetData->setObject("viewportSize", buildObjectForSize(viewportSize)); |
528 resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame
()->pageZoomFactor()); | 529 resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame
()->pageZoomFactor()); |
529 resetData->setNumber("scrollX", documentScrollOffset.x()); | 530 resetData->setNumber("scrollX", documentScrollOffset.x()); |
530 resetData->setNumber("scrollY", documentScrollOffset.y()); | 531 resetData->setNumber("scrollY", documentScrollOffset.y()); |
531 evaluateInOverlay("reset", resetData.release()); | 532 evaluateInOverlay("reset", resetData.release()); |
532 } | 533 } |
533 | 534 |
534 void InspectorOverlay::evaluateInOverlay(const String& method, const String& arg
ument) | 535 void InspectorOverlay::evaluateInOverlay(const String& method, const String& arg
ument) |
535 { | 536 { |
536 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 537 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 | 747 |
747 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 748 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
748 { | 749 { |
749 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) | 750 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) |
750 return; | 751 return; |
751 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); | 752 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); |
752 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); | 753 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); |
753 } | 754 } |
754 | 755 |
755 } // namespace blink | 756 } // namespace blink |
OLD | NEW |