Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Side by Side Diff: third_party/WebKit/Source/web/InspectorOverlay.cpp

Issue 1574373002: Revert of [DevTools] More Device Mode polish. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/toolbar.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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());
528 resetData->setObject("viewportSize", buildObjectForSize(viewportSize)); 527 resetData->setObject("viewportSize", buildObjectForSize(viewportSize));
529 resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame ()->pageZoomFactor()); 528 resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame ()->pageZoomFactor());
530 resetData->setNumber("scrollX", documentScrollOffset.x()); 529 resetData->setNumber("scrollX", documentScrollOffset.x());
531 resetData->setNumber("scrollY", documentScrollOffset.y()); 530 resetData->setNumber("scrollY", documentScrollOffset.y());
532 evaluateInOverlay("reset", resetData.release()); 531 evaluateInOverlay("reset", resetData.release());
533 } 532 }
534 533
535 void InspectorOverlay::evaluateInOverlay(const String& method, const String& arg ument) 534 void InspectorOverlay::evaluateInOverlay(const String& method, const String& arg ument)
536 { 535 {
537 ScriptForbiddenScope::AllowUserAgentScript allowScript; 536 ScriptForbiddenScope::AllowUserAgentScript allowScript;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 746
748 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 747 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
749 { 748 {
750 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive()) 749 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive())
751 return; 750 return;
752 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); 751 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script());
753 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); 752 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true);
754 } 753 }
755 754
756 } // namespace blink 755 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/toolbar.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698